diff options
author | Peter Pentchev <roam@debian.org> | 2023-05-13 13:35:22 +0300 |
---|---|---|
committer | Peter Pentchev <roam@debian.org> | 2023-05-13 13:35:22 +0300 |
commit | c797f118c1193b29725948aac3023c28197f08a1 (patch) | |
tree | 077f86ea4be98c5599ea2ddd57129b3d2ca40dad | |
parent | 296d7748bca3b4782542f4465fe699fe46110a73 (diff) | |
parent | c9467c1e24686ebfffb55ad74331dcc8018121c6 (diff) |
Update upstream source from tag 'upstream/0.1.3'
Update to upstream version '0.1.3'
with Debian dir 465f9e079e172297cbcffb2037bec78ef82d06db
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | MANIFEST.in | 12 | ||||
-rw-r--r-- | PKG-INFO | 8 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | config/ruff-base/pyproject.toml | 18 | ||||
-rw-r--r-- | config/ruff-most/pyproject.toml | 13 | ||||
-rw-r--r-- | docs/api.md | 10 | ||||
-rw-r--r-- | docs/changes.md | 47 | ||||
-rw-r--r-- | docs/index.md | 5 | ||||
-rw-r--r-- | mkdocs.yml | 1 | ||||
-rw-r--r-- | pyproject.toml | 24 | ||||
-rw-r--r-- | setup.cfg | 8 | ||||
-rw-r--r-- | src/parse_stages.egg-info/PKG-INFO | 124 | ||||
-rw-r--r-- | src/parse_stages.egg-info/SOURCES.txt | 35 | ||||
-rw-r--r-- | src/parse_stages.egg-info/dependency_links.txt | 1 | ||||
-rw-r--r-- | src/parse_stages.egg-info/requires.txt | 1 | ||||
-rw-r--r-- | src/parse_stages.egg-info/top_level.txt | 1 | ||||
-rw-r--r-- | src/parse_stages.egg-info/zip-safe | 1 | ||||
-rw-r--r-- | src/parse_stages/__init__.py | 15 | ||||
-rw-r--r-- | src/parse_stages/defs.py | 3 | ||||
-rw-r--r-- | src/parse_stages/expr.py | 2 | ||||
-rw-r--r-- | tox.ini | 29 |
22 files changed, 125 insertions, 243 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53e763a --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net> +# SPDX-License-Identifier: BSD-2-Clause + +site/ +.tox/ + +*/__pycache__/ diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 3badf99..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net> -# SPDX-License-Identifier: BSD-2-Clause - -recursive-include config *.toml -recursive-include docs *.md -include .editorconfig -recursive-include LICENSES *.txt -include mkdocs.yml -recursive-include nix *.nix *.sh -recursive-include requirements *.txt -include tox.ini -recursive-include unit_tests *.py @@ -1,13 +1,14 @@ Metadata-Version: 2.1 Name: parse_stages -Version: 0.1.2 +Version: 0.1.3 Summary: Parse an expression for selecting stages and tags -Author-email: Peter Pentchev <roam@ringlet.net> Project-URL: Homepage, https://devel.ringlet.net/devel/parse-stages/ Project-URL: Changes, https://devel.ringlet.net/devel/parse-stages/changes/ Project-URL: Issue Tracker, https://gitlab.com/ppentchev/parse-stages/-/issues Project-URL: Source Code, https://gitlab.com/ppentchev/parse-stages +Author-email: Peter Pentchev <roam@ringlet.net> Requires-Python: >=3.8 +Requires-Dist: pyparsing<4,>=3 Description-Content-Type: text/markdown <!-- @@ -17,6 +18,8 @@ SPDX-License-Identifier: BSD-2-Clause # Parse a mini-language for selecting objects by tag or name +\[[Home][ringlet-parse-stages] | [GitLab][gitlab] | [PyPI][pypi]\] + This library is mostly useful for command-line parsing by other tools like `tox-stages` and `nox-stages`. It may be used to parse e.g. a command-line specification like `@check and not pylint` or `@tests or ruff` and then @@ -121,4 +124,5 @@ hosted at [Ringlet][ringlet-parse-stages]. [roam]: mailto:roam@ringlet.net "Peter Pentchev" [gitlab]: https://gitlab.com/ppentchev/parse-stages "The parse-stages GitLab repository" +[pypi]: https://pypi.org/project/parse-stages/ "The parse-stages Python Package Index page" [ringlet-parse-stages]: https://devel.ringlet.net/devel/parse-stages/ "The Ringlet parse-stages homepage" @@ -5,6 +5,8 @@ SPDX-License-Identifier: BSD-2-Clause # Parse a mini-language for selecting objects by tag or name +\[[Home][ringlet-parse-stages] | [GitLab][gitlab] | [PyPI][pypi]\] + This library is mostly useful for command-line parsing by other tools like `tox-stages` and `nox-stages`. It may be used to parse e.g. a command-line specification like `@check and not pylint` or `@tests or ruff` and then @@ -109,4 +111,5 @@ hosted at [Ringlet][ringlet-parse-stages]. [roam]: mailto:roam@ringlet.net "Peter Pentchev" [gitlab]: https://gitlab.com/ppentchev/parse-stages "The parse-stages GitLab repository" +[pypi]: https://pypi.org/project/parse-stages/ "The parse-stages Python Package Index page" [ringlet-parse-stages]: https://devel.ringlet.net/devel/parse-stages/ "The Ringlet parse-stages homepage" diff --git a/config/ruff-base/pyproject.toml b/config/ruff-base/pyproject.toml index 6a09349..29b450b 100644 --- a/config/ruff-base/pyproject.toml +++ b/config/ruff-base/pyproject.toml @@ -15,18 +15,12 @@ ignore = [ # The multi-line docstring summary starts on the same line "D213", - # Our exceptions are simple enough - "EM", - - # ruff does not seem to like the empty line before "from typing import ..." - "I", - # The Tagged and TaggedFrozen classes need to be typedload-compatible "TCH", - - # We are fine with relative imports - "TID", - - # Much too restrictive - "TRY", ] + +[tool.ruff.isort] +force-single-line = true +known-first-party = ["parse_stages"] +lines-after-imports = 2 +single-line-exclusions = ["typing"] diff --git a/config/ruff-most/pyproject.toml b/config/ruff-most/pyproject.toml index 61d02f4..31e7c07 100644 --- a/config/ruff-most/pyproject.toml +++ b/config/ruff-most/pyproject.toml @@ -3,7 +3,7 @@ [tool.ruff] extend = "../ruff-base/pyproject.toml" -# These are all the Ruff 0.0.254 linters. +# These are all the Ruff 0.0.265 linters. select = [ "A", "ANN", @@ -17,15 +17,16 @@ select = [ "DJ", "DTZ", "E", - # "EM", + "EM", "ERA", "EXE", "F", "FBT", "G", - # "I", + "I", "ICN", "INP", + "INT", "ISC", "N", "NPY", @@ -45,9 +46,9 @@ select = [ "SLF", "T10", "T20", - # "TCH", - # "TID", - # "TRY", + "TCH", + "TID", + "TRY", "UP", "W", "YTT", diff --git a/docs/api.md b/docs/api.md index d926b81..76d2a22 100644 --- a/docs/api.md +++ b/docs/api.md @@ -8,37 +8,27 @@ SPDX-License-Identifier: BSD-2-Clause ## The tagged object classes ::: parse_stages.Tagged - handler: python ::: parse_stages.TaggedFrozen - handler: python ## The evaluated boolean expression ::: parse_stages.BoolExpr - handler: python ::: parse_stages.OrExpr - handler: python ::: parse_stages.AndExpr - handler: python ::: parse_stages.NotExpr - handler: python ## The object's tags and keywords ::: parse_stages.TagExpr - handler: python ::: parse_stages.KeywordExpr - handler: python ## The helper functions ::: parse_stages.parse_spec - handler: python ::: parse_stages.parse_stage_ids - handler: python diff --git a/docs/changes.md b/docs/changes.md index 3b823c4..5cffc63 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -12,6 +12,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.3] - 2023-05-07 + +### Fixes + +- Add a blank line to a docstring section (ruff D214). +- Drop the text in a `NotImplementedError` raised in an abstract method; + it should be obvious (ruff EM101) + +### Additions + +- Add a `.gitignore` file, mostly so that `reuse` can be run at any time +- Add a "Home, GitLab, PyPI" navigational line to the documentation + index page and to the `README.md` file + +### Other changes + +- Main source: + - reformat the import sections using Ruff's `isort` implementation +- Build system: + - switch to `hatch` / `hatchling` for the PEP517 build +- Documentation: + - use the `default_handler` configuration option of `mkdocstrings` + instead of specifying `handler: python` for each class! + - bump the versions of `mkdocstrings` and `mkdocstrings-python` with + no changes +- Test suite: + - specify 4.1 as the Tox minimum version and switch to the Tox 4.x + format for the multiline list of files + - rename the `black` Tox environment to `format` and + the `black-reformat` one to `reformat`, since they also run + Ruff's `isort` now + - Ruff: + - use Ruff 0.0.265, enable the `INT` checks area although + we do not use gettext + - enable all ruff check areas in `config/ruff-most/`, let + the `config/ruff-base/` files take care of the ignored ones + - no longer disable the "relative imports" check, it does not + complain about our source code + - Pylint: + - reenable the "empty comment" plugin; we should have no + trouble with it since switching to SPDX license tags + - Bump the versions of `flake8-implicit-str-concat`, `flake8-simplify`, + `pylint`, and `triceratops` with no code changes + ## [0.1.2] - 2023-03-10 ### Semi-incompatible changes @@ -76,7 +120,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - First public release. -[Unreleased]: https://gitlab.com/ppentchev/parse-stages/-/compare/release%2F0.1.2...main +[Unreleased]: https://gitlab.com/ppentchev/parse-stages/-/compare/release%2F0.1.3...main +[0.1.3]: https://gitlab.com/ppentchev/parse-stages/-/compare/release%2F0.1.2...release%2F0.1.3 [0.1.2]: https://gitlab.com/ppentchev/parse-stages/-/compare/release%2F0.1.1...release%2F0.1.2 [0.1.1]: https://gitlab.com/ppentchev/parse-stages/-/compare/release%2F0.1.0...release%2F0.1.1 [0.1.0]: https://gitlab.com/ppentchev/parse-stages/-/tags/release%2F0.1.0 diff --git a/docs/index.md b/docs/index.md index f34bae2..1aa7c84 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,6 +5,8 @@ SPDX-License-Identifier: BSD-2-Clause # Parse a mini-language for selecting objects by tag or name +\[[Home][ringlet-parse-stages] | [GitLab][gitlab] | [PyPI][pypi]\] + ## Overview The `parse-stages` Python library may be used by other tools to group @@ -24,7 +26,7 @@ section. A program that uses the `parse-stages` library should specify it in its list of requirements, e.g. using [PEP508][pep508] syntax: - parse-stages >= 0.1.2, < 0.2 + parse-stages >= 0.1.3, < 0.2 [pep508]: https://peps.python.org/pep-0508/ "PEP 508 – Dependency specification for Python Software Packages" @@ -102,4 +104,5 @@ hosted at [Ringlet][ringlet-parse-stages]. [roam]: mailto:roam@ringlet.net "Peter Pentchev" [gitlab]: https://gitlab.com/ppentchev/parse-stages "The parse-stages GitLab repository" +[pypi]: https://pypi.org/project/parse-stages/ "The parse-stages Python Package Index page" [ringlet-parse-stages]: https://devel.ringlet.net/devel/parse-stages/ "The Ringlet parse-stages homepage" @@ -39,6 +39,7 @@ markdown_extensions: - pymdownx.superfences: plugins: - mkdocstrings: + default_handler: python handlers: python: paths: [src] diff --git a/pyproject.toml b/pyproject.toml index 1eda632..9f1ee0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,8 +2,11 @@ # SPDX-License-Identifier: BSD-2-Clause [build-system] -requires = ["setuptools >= 61", "wheel"] -build-backend = "setuptools.build_meta" +requires = [ + "hatchling", + "hatch-requirements-txt >= 0.4, < 0.5", +] +build-backend = "hatchling.build" [project] name = "parse_stages" @@ -22,18 +25,21 @@ Changes = "https://devel.ringlet.net/devel/parse-stages/changes/" "Issue Tracker" = "https://gitlab.com/ppentchev/parse-stages/-/issues" "Source Code" = "https://gitlab.com/ppentchev/parse-stages" +[tool.hatch.build.targets.wheel] +packages = ["src/parse_stages"] + +[tool.hatch.metadata.hooks.requirements_txt] +files = ["requirements/install.txt"] + +[tool.hatch.version] +path = "src/parse_stages/defs.py" + [tool.setuptools] zip-safe = true -package-dir = {"" = "src"} -packages = ["parse_stages"] [tool.setuptools.package-data] parse_stages = ["py.typed"] -[tool.setuptools.dynamic] -dependencies = {file = "requirements/install.txt"} -version = {attr = "parse_stages.defs.VERSION"} - [tool.black] target-version = ["py38", "py39", "py310", "py311"] line-length = 100 @@ -59,7 +65,7 @@ load-plugins = [ "pylint.extensions.docparams", "pylint.extensions.docstyle", "pylint.extensions.dunder", - # "pylint.extensions.empty_comment", # the copyright notices trigger that one + "pylint.extensions.empty_comment", "pylint.extensions.emptystring", "pylint.extensions.eq_without_hash", "pylint.extensions.for_any_all", @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net> +# SPDX-License-Identifier: BSD-2-Clause + [flake8] max_line_length = 100 extend_ignore = ANN101 @@ -5,8 +8,3 @@ inline_quotes = double [pycodestyle] max-line-length = 100 - -[egg_info] -tag_build = -tag_date = 0 - diff --git a/src/parse_stages.egg-info/PKG-INFO b/src/parse_stages.egg-info/PKG-INFO deleted file mode 100644 index 0946473..0000000 --- a/src/parse_stages.egg-info/PKG-INFO +++ /dev/null @@ -1,124 +0,0 @@ -Metadata-Version: 2.1 -Name: parse-stages -Version: 0.1.2 -Summary: Parse an expression for selecting stages and tags -Author-email: Peter Pentchev <roam@ringlet.net> -Project-URL: Homepage, https://devel.ringlet.net/devel/parse-stages/ -Project-URL: Changes, https://devel.ringlet.net/devel/parse-stages/changes/ -Project-URL: Issue Tracker, https://gitlab.com/ppentchev/parse-stages/-/issues -Project-URL: Source Code, https://gitlab.com/ppentchev/parse-stages -Requires-Python: >=3.8 -Description-Content-Type: text/markdown - -<!-- -SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net> -SPDX-License-Identifier: BSD-2-Clause ---> - -# Parse a mini-language for selecting objects by tag or name - -This library is mostly useful for command-line parsing by other tools like -`tox-stages` and `nox-stages`. It may be used to parse e.g. a command-line -specification like `@check and not pylint` or `@tests or ruff` and then -match it against a list of objects that have names and lists of tags. - -## Parse stage specifications - -The `parse_spec()` function parses a string specification into -a `BoolExpr` object that may later be used to select matching objects -(e.g. test environments). - -The specification mini-language may roughly be described as: - - expr ::= and_expr ["or" and_expr...] - and_expr ::= not_expr ["and" not_expr...] - not_expr ::= ["not"] atom - atom ::= tag | keyword - tag ::= "@" characters - keyword ::= characters - characters ::= [A-Za-z0-9_-]+ - -Thus, all of the following: - -- `@check` -- `@check and @quick` -- `@tests and not examples` -- `not @tests` -- `pep8 or not @quick and @check` - -...are valid expressions, -with the "not", "and", and "or" keywords having their usual precedence -(`pep8 or not @quick and @check` is parsed as -`pep8 or ((@not quick) and @check)`, but the mini-language does not -support parentheses yet). - -## Check whether an object matches a parsed specification - -The `parse-stages` library provides two base dataclasses for objects that -may be matched against parsed expressions: `TaggedFrozen` and `Tagged`. -Both classes have the same members: - -- `name`: a string -- `tags`: a list of strings -- `get_keyword_haystacks()`: a method that returns a list of strings, - `[self.name]` unless overridden - -When a `BoolExpr` object's `evaluate()` method is called for a specific -`TaggedFrozen` or `Tagged` object, it checks whether the specification -matches the tags and keywords defined for this object. Tags are matched -exactly, while a keyword is considered to match if it is contained in -the checked string; e.g. `pep` would match both `pep8` and `exp_pep563`, -while `@black` would not match a `black-reformat` tag. - -The `get_keyword_haystacks()` method returns the strings to look in for -matching keywords. By default, it only returns the `name` field; -however, it may be extended, e.g. for Nox sessions it may also return -the name of the Python function that implements the session, for test -classes with methods it may return the class name and the method name, etc. - -## Examples - -Parse a list of stage specifications into expressions that may later be -matched against test environment definitions: - - e_check = parse_stages.parse_spec("@check") - e_check_quick = parse_stages.parse_spec("@check and @quick") - e_check_no_ruff = parse_stages.parse_spec("@check and not ruff") - - specs = [(spec, parse_stages.parse_spec(spec)) for spec in args.stage_specs] - -Select the test environments that match the specification: - - # Obtain a list (okay, a dictionary) of test environments in some way - tox_envs = get_tox_environments() # {"ruff": {"tags": ["check", "quick"]}, ...} - - # Convert them to objects that the parsed expressions can match - all_envs = [ - parse_stages.TaggedFrozen(name, env["tags"]) - for name, env in tox_envs.items() - ] - - # Or define our own class that may hold additional information - @dataclasses.dataclass(frozen=True) - class TestEnv(parse_stages.TaggedFrozen): - """A single test environment: name, tags, etc.""" - ... - - all_envs = [TestEnv(name, env["tags"], ...) for name, env in tox_envs.items()] - - # Select the ones that match the "@check" expression - matched = [env for env in all_envs if e_check.evaluate(env)] - - # Or if we only care about the names... - quick_names = [env.name for env in all_envs if e_check_quick.evaluate(env)] - - -## Contact - -The `parse-stages` library was written by [Peter Pentchev][roam]. -It is developed in [a GitLab repository][gitlab]. This documentation is -hosted at [Ringlet][ringlet-parse-stages]. - -[roam]: mailto:roam@ringlet.net "Peter Pentchev" -[gitlab]: https://gitlab.com/ppentchev/parse-stages "The parse-stages GitLab repository" -[ringlet-parse-stages]: https://devel.ringlet.net/devel/parse-stages/ "The Ringlet parse-stages homepage" diff --git a/src/parse_stages.egg-info/SOURCES.txt b/src/parse_stages.egg-info/SOURCES.txt deleted file mode 100644 index a0f8f71..0000000 --- a/src/parse_stages.egg-info/SOURCES.txt +++ /dev/null @@ -1,35 +0,0 @@ -.editorconfig -MANIFEST.in -README.md -mkdocs.yml -pyproject.toml -setup.cfg -tox.ini -LICENSES/BSD-2-Clause.txt -config/ruff-all/pyproject.toml -config/ruff-base/pyproject.toml -config/ruff-most/pyproject.toml -docs/api.md -docs/changes.md -docs/index.md -docs/language.md -nix/mkdocs.nix -nix/python-pytest.nix -nix/reformat.sh -nix/run-pytest.sh -requirements/install.txt -requirements/test.txt -src/parse_stages/__init__.py -src/parse_stages/defs.py -src/parse_stages/expr.py -src/parse_stages/p_pyp.py -src/parse_stages/py.typed -src/parse_stages.egg-info/PKG-INFO -src/parse_stages.egg-info/SOURCES.txt -src/parse_stages.egg-info/dependency_links.txt -src/parse_stages.egg-info/requires.txt -src/parse_stages.egg-info/top_level.txt -src/parse_stages.egg-info/zip-safe -unit_tests/__init__.py -unit_tests/test_eval.py -unit_tests/test_parse.py
\ No newline at end of file diff --git a/src/parse_stages.egg-info/dependency_links.txt b/src/parse_stages.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/src/parse_stages.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/parse_stages.egg-info/requires.txt b/src/parse_stages.egg-info/requires.txt deleted file mode 100644 index 7907a8c..0000000 --- a/src/parse_stages.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -pyparsing<4,>=3 diff --git a/src/parse_stages.egg-info/top_level.txt b/src/parse_stages.egg-info/top_level.txt deleted file mode 100644 index c9e4875..0000000 --- a/src/parse_stages.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -parse_stages diff --git a/src/parse_stages.egg-info/zip-safe b/src/parse_stages.egg-info/zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/src/parse_stages.egg-info/zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/parse_stages/__init__.py b/src/parse_stages/__init__.py index 8a20a65..5eb68d7 100644 --- a/src/parse_stages/__init__.py +++ b/src/parse_stages/__init__.py @@ -95,23 +95,24 @@ Select the test environments that match the specification: # Or if we only care about the names... quick_names = [env.name for env in all_envs if e_check_quick.evaluate(env)] + """ -from .defs import Tagged, TaggedFrozen, VERSION -from .expr import BoolExpr, OrExpr, AndExpr, NotExpr, TagExpr, KeywordExpr -from .p_pyp import parse_spec, parse_stage_ids +from .defs import VERSION, Tagged, TaggedFrozen # isort: skip +from .expr import AndExpr, BoolExpr, KeywordExpr, NotExpr, OrExpr, TagExpr # isort: skip +from .p_pyp import parse_spec, parse_stage_ids # isort: skip __all__ = [ + "VERSION", "Tagged", "TaggedFrozen", - "BoolExpr", - "OrExpr", "AndExpr", + "BoolExpr", + "KeywordExpr", "NotExpr", + "OrExpr", "TagExpr", - "KeywordExpr", "parse_spec", "parse_stage_ids", - "VERSION", ] diff --git a/src/parse_stages/defs.py b/src/parse_stages/defs.py index 3efe693..d20ea24 100644 --- a/src/parse_stages/defs.py +++ b/src/parse_stages/defs.py @@ -7,7 +7,6 @@ # pylint: disable=deprecated-typing-alias import dataclasses - from typing import List @@ -47,4 +46,4 @@ class Tagged: return [self.name] -VERSION = "0.1.2" +VERSION = "0.1.3" diff --git a/src/parse_stages/expr.py b/src/parse_stages/expr.py index 821daeb..0573d06 100644 --- a/src/parse_stages/expr.py +++ b/src/parse_stages/expr.py @@ -17,7 +17,7 @@ class BoolExpr(metaclass=abc.ABCMeta): @abc.abstractmethod def evaluate(self, obj: defs.TaggedFrozen | defs.Tagged) -> bool: """Evaluate the expression for the specified object.""" - raise NotImplementedError(f"{type(self).__name__}.evaluate() must be overridden") + raise NotImplementedError @dataclasses.dataclass(frozen=True) @@ -2,10 +2,11 @@ # SPDX-License-Identifier: BSD-2-Clause [tox] +minversion = 4.1 envlist = ruff ruff-all - black + format pep8 mypy pylint @@ -16,7 +17,7 @@ isolated_build = True [defs] pyfiles = - src/parse_stages + src/parse_stages \ unit_tests [testenv:ruff] @@ -24,7 +25,7 @@ skip_install = True tags = check deps = - ruff >= 0.0.254, < 0.1 + ruff >= 0.0.265, < 0.1 commands = ruff check --config config/ruff-most/pyproject.toml -- {[defs]pyfiles} @@ -33,27 +34,31 @@ skip_install = True tags = check deps = - ruff == 0.0.254 + ruff == 0.0.265 commands = ruff check --config config/ruff-all/pyproject.toml -- {[defs]pyfiles} -[testenv:black] +[testenv:format] skip_install = True tags = check deps = black >= 23, < 24 + ruff >= 0.0.265, < 0.1 commands = + ruff check --config config/ruff-base/pyproject.toml --select=I --diff -- {[defs]pyfiles} black --check {[defs]pyfiles} -[testenv:black-reformat] +[testenv:reformat] skip_install = True tags = format manual deps = black >= 23, < 24 + ruff >= 0.0.265, < 0.1 commands = + ruff check --config config/ruff-base/pyproject.toml --select=I --fix -- {[defs]pyfiles} black {[defs]pyfiles} # Add flake8-import-conventions if it ever hits PyPI @@ -73,19 +78,19 @@ deps = flake8-datetimez >= 20, < 21 flake8-debugger >= 4, < 5 flake8-executable >= 2, < 3 - flake8-implicit-str-concat >= 0.3, < 0.4 + flake8-implicit-str-concat >= 0.4, < 0.5 flake8-no-pep420 >= 2, < 3 flake8-pie >= 0.16, < 0.17 flake8-print >= 5, < 6 flake8-pytest-style >= 1, < 2 flake8-quotes >= 3, < 4 flake8-return >= 1, < 2 - flake8-simplify >= 0.19, < 0.20 + flake8-simplify >= 0.20, < 0.21 flake8-use-pathlib >= 0.3, < 0.4 mccabe >= 0.7, < 0.8 pep8-naming >= 0.13, < 0.14 pycodestyle >= 2.10, < 3 - tryceratops >= 1, < 2 + tryceratops >= 2, < 3 commands = flake8 {[defs]pyfiles} pycodestyle {[defs]pyfiles} @@ -110,7 +115,7 @@ tags = deps = -r requirements/install.txt -r requirements/test.txt - pylint >= 2.16, < 2.17 + pylint >= 2.17, < 2.18 commands = pylint {[defs]pyfiles} @@ -152,8 +157,8 @@ tags = deps = mkdocs >= 1.4.2, < 2 mkdocs-material >= 9.1.2, < 10 - mkdocstrings >= 0.20, < 0.21 - mkdocstrings-python >= 0.8.3, < 0.9 + mkdocstrings >= 0.21.2, < 0.22 + mkdocstrings-python >= 0.10, < 0.11 commands = mkdocs build |