Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ If you believe you've found a security-related bug, fill out a new vulnerability
follow these instructions:

1. Click on the `Security` tab in the project repository.
2. Click the green `Report a vulnerability` button at the top right corner.
3. Fill in the form as accurately as you can, including as many details as possible.
4. Click the green `Submit report` button at the bottom.
1. Click the green `Report a vulnerability` button at the top right corner.
1. Fill in the form as accurately as you can, including as many details as possible.
1. Click the green `Submit report` button at the bottom.

## Don't have a GitHub account?

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ on:
pull_request:
schedule:
- cron: "0 8 * * *"

concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ name: Release to PyPI
on:
push:
tags: ["*"]

permissions:
contents: read

env:
dists-artifact-name: python-package-distributions

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -30,7 +27,6 @@ jobs:
with:
name: ${{ env.dists-artifact-name }}
path: dist/*

release:
needs:
- build
Expand Down
19 changes: 14 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,20 @@ repos:
- id: ruff-format
- id: ruff
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.9.5"
hooks:
- id: prettier
args: ["--print-width=120", "--prose-wrap=always"]
- repo: https://github.com/google/yamlfmt
rev: "v0.21.0"
hooks:
- id: yamlfmt
- repo: local
hooks:
- id: mdformat
name: mdformat
entry: mdformat --wrap 120
language: python
types: [markdown]
additional_dependencies:
- mdformat-gfm>=1
- mdformat-ruff>=0.1.3
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.26.1
hooks:
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ This library provides the following fixtures that help you print messages within
output capture, so it will show up in the standard output, even if the test passes):

- `printer: Printter` - function level fixture, when called prints a message line (with very simple formatting),

- [`printer_session: Printter`](#example-printer_session) - session scoped fixture same as above but using (this exists
as a backwards compatibility layer, as we didn't want to switch the originally function scope variant to session one),

- [`pretty_printer: PrettyPrintter`](#example-pretty_printer) - session scoped fixture, when called prints a message
line (with fancy formatting of space for indentation, `⏩` icon for every message, and elapsed time format in form of
`[{elapsed:.20f}]`) and also allows creating a printer that will be indented one level deeper (and optionally use a
different icon).

- [`create_pretty_printer: PrettyPrinterFactory`](#example-create_pretty_printer) - allows the caller to customize the
fancy formatter as they wish. Takes one `formatter` argument, whose arguments should be interpreted as:

Expand Down Expand Up @@ -168,12 +171,12 @@ if TYPE_CHECKING:
@pytest.fixture(scope="session")
def pretty(create_pretty_printer: PrettyPrinterFactory) -> PrettyPrinter:
formatter = Formatter(
indentation=" I ",
head=" H ",
space=" S ",
icon="🧹",
timer_fmt="[{elapsed:.5f}]",
)
indentation=" I ",
head=" H ",
space=" S ",
icon="🧹",
timer_fmt="[{elapsed:.5f}]",
)
return create_pretty_printer(formatter=formatter)


Expand Down