Skip to content

Commit

Permalink
tox.ini: update version of black formatter tool
Browse files Browse the repository at this point in the history
Allow tox to use a version of the black tool from 2024.  Having added
doc strings to protocols the black tool, using the 2024 style,  will no
longer rewrite long-ish protocol method definitions that will span
multiple lines either way from:

    def foo(a: str, b: str, c: SomethingCompletelyDifferent) -> int:
        ...

to

    def foo(
        a: str, b: str, c: SomethingCompletelyDifferent
    ) -> int: ...

Just to force the ellipsis to be on the "same line" as the definition.
This is change I find a bit unnecessary and a tad bit ugly.  I did
report this to the black team but they chose to make the change anyway.

So they've unintentionally caused me to write more doc strings. Which is
a good thing I guess. :-)

Signed-off-by: John Mulligan <[email protected]>
  • Loading branch information
phlogistonjohn authored and mergify[bot] committed Jun 19, 2024
1 parent dda95bb commit c0b1582
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,23 @@ allowlist_externals =
description = Check the formatting for the source files
deps =
flake8
black>=23, <24
black>=24, <25
commands =
flake8 sambacc tests
black --check -v .

[testenv:schemacheck]
description = Check the JSON Schema files are valid
deps =
black>=23, <24
black>=24, <25
PyYAML
commands =
python -m sambacc.schema.tool

[testenv:schemaupdate]
description = Regenerate source files from JSON Schema file(s)
deps =
black>=23, <24
black>=24, <25
PyYAML
commands =
python -m sambacc.schema.tool --update
Expand Down

0 comments on commit c0b1582

Please sign in to comment.