diff --git a/.config/requirements.txt b/.config/constraints.txt similarity index 91% rename from .config/requirements.txt rename to .config/constraints.txt index 64f4f91434..a245b055c1 100644 --- a/.config/requirements.txt +++ b/.config/constraints.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --extra=docs --extra=test --no-annotate --output-file=.config/requirements.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml +# pip-compile --all-extras --no-annotate --output-file=.config/constraints.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml # ansible-compat==4.1.11 ansible-core==2.16.2 diff --git a/.config/lock-requirements.txt b/.config/lock-requirements.txt deleted file mode 100644 index 12f124460f..0000000000 --- a/.config/lock-requirements.txt +++ /dev/null @@ -1,46 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate --output-file=.config/lock-requirements.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml -# -ansible-compat==4.1.11 -ansible-core==2.16.2 -attrs==23.2.0 -black==23.12.1 -bracex==2.4 -certifi==2023.11.17 -cffi==1.16.0 -charset-normalizer==3.3.2 -click==8.1.7 -cryptography==41.0.7 -filelock==3.13.1 -idna==3.6 -jinja2==3.1.3 -jsonschema==4.20.0 -jsonschema-specifications==2023.12.1 -markdown-it-py==3.0.0 -markupsafe==2.1.3 -mdurl==0.1.2 -mypy-extensions==1.0.0 -packaging==23.2 -pathspec==0.12.1 -platformdirs==4.1.0 -pycparser==2.21 -pygments==2.17.2 -pyyaml==6.0.1 -referencing==0.32.1 -requests==2.31.0 -rich==13.7.0 -rpds-py==0.17.1 -ruamel-yaml==0.18.5 -subprocess-tee==0.4.1 -tomli==2.0.1 -typing-extensions==4.9.0 -urllib3==2.1.0 -wcmatch==8.5 -yamllint==1.33.0 - -# The following packages are considered to be unsafe in a requirements file: -# resolvelib -# ruamel-yaml-clib diff --git a/.config/docs-requirements.txt b/.config/requirements-docs.in similarity index 100% rename from .config/docs-requirements.txt rename to .config/requirements-docs.in diff --git a/.config/requirements-lock.txt b/.config/requirements-lock.txt deleted file mode 120000 index 2d8841fa35..0000000000 --- a/.config/requirements-lock.txt +++ /dev/null @@ -1 +0,0 @@ -lock-requirements.txt \ No newline at end of file diff --git a/.config/requirements-lock.txt b/.config/requirements-lock.txt new file mode 100644 index 0000000000..d7afc8cf29 --- /dev/null +++ b/.config/requirements-lock.txt @@ -0,0 +1,41 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --no-annotate --output-file=.config/requirements-lock.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml +# +ansible-compat==4.1.11 +ansible-core==2.16.2 +attrs==23.2.0 +black==23.12.1 +bracex==2.4 +cffi==1.16.0 +click==8.1.7 +cryptography==41.0.7 +filelock==3.13.1 +jinja2==3.1.3 +jsonschema==4.21.0 +jsonschema-specifications==2023.12.1 +markdown-it-py==3.0.0 +markupsafe==2.1.3 +mdurl==0.1.2 +mypy-extensions==1.0.0 +packaging==23.2 +pathspec==0.12.1 +platformdirs==4.1.0 +pycparser==2.21 +pygments==2.17.2 +pyyaml==6.0.1 +referencing==0.32.1 +rich==13.7.0 +rpds-py==0.17.1 +ruamel-yaml==0.18.5 +subprocess-tee==0.4.1 +tomli==2.0.1 +typing-extensions==4.9.0 +wcmatch==8.5 +yamllint==1.33.0 + +# The following packages are considered to be unsafe in a requirements file: +# resolvelib +# ruamel-yaml-clib diff --git a/.config/test-requirements.txt b/.config/requirements-test.in similarity index 100% rename from .config/test-requirements.txt rename to .config/requirements-test.in diff --git a/.config/runtime-requirements.txt b/.config/requirements.in similarity index 100% rename from .config/runtime-requirements.txt rename to .config/requirements.in diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba0a5bd150..118aa9c47c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,7 @@ ci: submodules: true exclude: > (?x)^( + .config/constraints.txt| .config/.*requirements.*| .vscode/extensions.json| .vscode/settings.json| @@ -64,9 +65,9 @@ repos: )$ always_run: true additional_dependencies: - - prettier - - prettier-plugin-toml - - prettier-plugin-sort-json + - prettier@3.2.4 + - prettier-plugin-toml@2.0.1 + - prettier-plugin-sort-json@3.1.0 - repo: https://github.com/streetsidesoftware/cspell-cli rev: v8.3.0 hooks: @@ -135,7 +136,7 @@ repos: types: [file, yaml] entry: yamllint --strict - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.11" + rev: "v0.1.13" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -204,7 +205,7 @@ repos: name: lock alias: lock always_run: true - entry: pip-compile --upgrade -q --no-annotate --output-file=.config/lock-requirements.txt pyproject.toml --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib + entry: pip-compile --upgrade -q --no-annotate --output-file=.config/requirements-lock.txt pyproject.toml --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib files: ^.config\/.*requirements.*$ language: python language_version: "3.10" # minimal we support officially @@ -216,7 +217,7 @@ repos: name: deps alias: deps always_run: true - entry: pip-compile -q --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib + entry: pip-compile -q --no-annotate --output-file=.config/constraints.txt pyproject.toml --all-extras --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib files: ^.config\/.*requirements.*$ language: python language_version: "3.10" # minimal we support officially @@ -224,7 +225,7 @@ repos: additional_dependencies: - pip>=22.3.1 - id: pip-compile - entry: pip-compile -q --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib --upgrade + entry: pip-compile -q --no-annotate --output-file=.config/constraints.txt pyproject.toml --all-extras --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib --upgrade language: python always_run: true pass_filenames: false diff --git a/cspell.config.yaml b/cspell.config.yaml index fce0237cbc..c80fd0b04c 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -12,7 +12,7 @@ dictionaries: ignorePaths: - cspell.config.yaml # The requirements file - - .config/requirements.txt + - .config/constraints.txt - docs/requirements.txt - docs/requirements.in # Test fixtures generated from outside diff --git a/pyproject.toml b/pyproject.toml index 0ec484e5ed..2821431a69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -279,10 +279,9 @@ max-complexity = 20 ] [tool.setuptools.dynamic] -dependencies = {file = [".config/runtime-requirements.txt"]} -optional-dependencies.docs = {file = [".config/docs-requirements.txt"]} -optional-dependencies.test = {file = [".config/test-requirements.txt"]} -optional-dependencies.lock = {file = [".config/lock-requirements.txt"]} +dependencies = {file = [".config/requirements.in"]} +optional-dependencies.docs = {file = [".config/requirements-docs.in"]} +optional-dependencies.test = {file = [".config/requirements-test.in"]} [tool.setuptools_scm] local_scheme = "no-local-version" diff --git a/src/ansiblelint/_internal/rules.py b/src/ansiblelint/_internal/rules.py index cfa3db2aa6..193ce1aa39 100644 --- a/src/ansiblelint/_internal/rules.py +++ b/src/ansiblelint/_internal/rules.py @@ -57,7 +57,7 @@ class BaseRule: _collection: RulesCollection | None = None @property - def help(self) -> str: # noqa: A003 + def help(self) -> str: """Return a help markdown string for the rule.""" if self._help is None: self._help = "" diff --git a/src/ansiblelint/config.py b/src/ansiblelint/config.py index 467d9e4f3b..bc1c16d887 100644 --- a/src/ansiblelint/config.py +++ b/src/ansiblelint/config.py @@ -132,7 +132,7 @@ class Options: # pylint: disable=too-many-instance-attributes cwd: Path = Path(".") display_relative_path: bool = True exclude_paths: list[str] = field(default_factory=list) - format: str = "brief" # noqa: A003 + format: str = "brief" lintables: list[str] = field(default_factory=list) list_rules: bool = False list_tags: bool = False diff --git a/test/schemas/tsconfig.json b/test/schemas/tsconfig.json index fe51c68627..fd03b63612 100644 --- a/test/schemas/tsconfig.json +++ b/test/schemas/tsconfig.json @@ -10,8 +10,8 @@ "sourceMap": true, "strict": true, "stripInternal": true, - "target": "es5" + "target": "es5", }, "exclude": ["node_modules"], - "include": ["src/**/*"] + "include": ["src/**/*"], } diff --git a/tox.ini b/tox.ini index c292e1d94f..9290d6b2da 100644 --- a/tox.ini +++ b/tox.ini @@ -65,7 +65,7 @@ setenv = devel: ANSIBLE_DEVEL_WARNING = false COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}} COVERAGE_PROCESS_START={toxinidir}/pyproject.toml - PIP_CONSTRAINT = {toxinidir}/.config/requirements.txt + PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt devel,pkg,pre,py39: PIP_CONSTRAINT = /dev/null PIP_DISABLE_PIP_VERSION_CHECK = 1 PRE_COMMIT_COLOR = always