Skip to content

Commit

Permalink
Update linters and fix constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jan 15, 2025
1 parent 23200bc commit 57aee5d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .config/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
ansi2html==1.9.2
ansible-compat==24.10.0
ansible-core==2.18.1
ansible-core==2.17.7
ansible-lint==24.12.2
astroid==3.3.8
attrs==24.3.0
Expand Down Expand Up @@ -36,7 +36,7 @@ dill==0.3.9
distlib==0.3.9
dnspython==2.7.0
docker==7.1.0
docstring-parser-fork==0.0.10
docstring-parser-fork==0.0.12
enrich==1.2.7
exceptiongroup==1.2.2
execnet==2.1.1
Expand Down Expand Up @@ -65,7 +65,7 @@ mdurl==0.1.2
mergedeep==1.3.4
mkdocs==1.6.1
mkdocs-ansible==24.12.0
mkdocs-autorefs==1.2.0
mkdocs-autorefs==1.3.0
mkdocs-gen-files==0.5.0
mkdocs-get-deps==0.2.0
mkdocs-htmlproofer-plugin==1.3.0
Expand All @@ -91,7 +91,7 @@ pluggy==1.5.0
pre-commit==4.0.1
ptyprocess==0.7.0
pycparser==2.22
pydoclint==0.5.16
pydoclint==0.6.0
pygments==2.19.1
pylint==3.3.3
pymdown-extensions==10.14
Expand All @@ -111,10 +111,10 @@ referencing==0.35.1
regex==2024.11.6
regress==2024.11.1
requests==2.32.3
resolvelib==1.1.0
resolvelib==1.0.1
rich==13.9.4
rpds-py==0.22.3
ruamel-yaml==0.18.10
ruamel-yaml==0.18.7
ruamel-yaml-clib==0.2.12
ruff==0.9.1
six==1.17.0
Expand Down
4 changes: 0 additions & 4 deletions .config/pydoclint-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ tests/fixtures/integration/test_command/scenarios/verifier/molecule/testinfra-pr
DOC107: Function `test_ansible_hostname`: The option `--arg-type-hints-in-signature` is `True` but not all args in the signature have type hints
DOC103: Function `test_ansible_hostname`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [host: ].
--------------------
tests/integration/conftest.py
DOC201: Function `_with_scenario` does not have a return section in docstring
DOC405: Function `_with_scenario` has both "return" and "yield" statements. Please use Generator[YieldType, SendType, ReturnType] as the return type annotation, and put your yield type in YieldType and return type in ReturnType. More details in https://jsh9.github.io/pydoclint/notes_generator_vs_iterator.html
--------------------
tests/integration/test_command.py
DOC601: Class `ParamDefault`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
DOC603: Class `ParamDefault`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [argnames: tuple[str, str], argvalues: tuple[tuple[str, str]], ids: str, indirect: tuple[str, str]]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ repos:
- id: tox-ini-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
args:
Expand All @@ -72,7 +72,7 @@ repos:
name: Spell check with cspell

- repo: https://github.com/jsh9/pydoclint
rev: "0.5.14"
rev: "0.6.0"
hooks:
- id: pydoclint
# This allows automatic reduction of the baseline file when needed.
Expand Down
3 changes: 2 additions & 1 deletion src/molecule/dependency/ansible_galaxy/collections.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# noqa: A005
"""Ansible Galaxy dependencies for lists of collections."""

from __future__ import annotations
Expand Down Expand Up @@ -58,4 +59,4 @@ def requirements_file(self) -> str:
Returns:
Path to the requirements file for this dependency.
"""
return cast(str, self.options["requirements-file"])
return cast("str", self.options["requirements-file"])
1 change: 1 addition & 0 deletions src/molecule/types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# noqa: A005
"""Assorted convenience types for molecule."""

from __future__ import annotations
Expand Down
10 changes: 4 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ pass_env =
TERM
USER
set_env =
!milestone: PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
PIP_CONSTRAINT={toxinidir}/.config/constraints.txt
UV_BUILD_CONSTRAINT={toxinidir}/.config/constraints.txt
milestone,lint,deps: PIP_CONSTRAINT=/dev/null
milestone,lint,deps: UV_BUILD_CONSTRAINT=/dev/null
COVERAGE_COMBINED = {envdir}/.coverage
COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}}
COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml
Expand Down Expand Up @@ -56,8 +59,6 @@ skip_install = true
deps =
{[testenv:lint]deps}
extras =
set_env =
PIP_CONSTRAINT = /dev/null
commands_pre =
commands =
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual deps
Expand All @@ -84,8 +85,6 @@ deps =
pip
pre-commit>=4.0.1
pre-commit-uv>=4.1.4
set_env =
PIP_CONSTRAINT = /dev/null
commands =
pre-commit run --show-diff-on-failure --all-files

Expand All @@ -96,7 +95,6 @@ deps =
ansible-core@ https://github.com/ansible/ansible/archive/milestone.tar.gz
set_env =
{[testenv]set_env}
PIP_CONSTRAINT = /dev/null

[testenv:pkg]
description =
Expand Down

0 comments on commit 57aee5d

Please sign in to comment.