Skip to content

Commit 605147d

Browse files
chore(deps): update all dependencies (#5121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Rakesh S <rakesh.s552004@gmail.com>
1 parent c5dba4f commit 605147d

46 files changed

Lines changed: 519 additions & 509 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/requirements-lock.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cryptography==49.0.0
2424
# ansible-lint
2525
distro==1.9.0
2626
# via ansible-lint
27-
filelock==3.29.5
27+
filelock==3.31.1
2828
# via ansible-lint
2929
jinja2==3.1.6
3030
# via ansible-core
@@ -80,7 +80,7 @@ subprocess-tee==0.4.2
8080
# via
8181
# ansible-compat
8282
# ansible-lint
83-
wcmatch==10.2.1
83+
wcmatch==11.0
8484
# via ansible-lint
8585
yamllint==1.38.0
8686
# via ansible-lint

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repos:
3838
# - id: shellcheck
3939
# priority: 0
4040
- repo: https://github.com/astral-sh/uv-pre-commit
41-
rev: 0.11.26
41+
rev: 0.11.29
4242
hooks:
4343
- id: uv-sync
4444
- id: uv-lock
@@ -67,7 +67,7 @@ repos:
6767
- "-o"
6868
- ".config/requirements-lock.txt"
6969
- repo: https://github.com/biomejs/pre-commit
70-
rev: "v2.5.2"
70+
rev: "v2.5.4"
7171
hooks:
7272
- id: biome-check
7373
name: biome

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ runs:
8686
8787
- name: Set up uv
8888
if: inputs.setup_python == 'true'
89-
uses: astral-sh/setup-uv@v8.2.0
89+
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
9090
with:
9191
enable-cache: true
9292
python-version: ${{ inputs.python_version }}

collections/ansible_collections/local/testcollection/plugins/modules/module_with_relative_import.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
"""module_with_relative_import module."""
2+
# ruff:file-ignore[relative-imports]
23

34
from ansible.module_utils.basic import AnsibleModule
45

56
# pylint: disable=E0402
6-
from ..module_utils import MY_STRING # noqa: TID252 # type: ignore[import-untyped]
7+
from ..module_utils import (
8+
MY_STRING, # type: ignore[import-untyped]
9+
)
710

811
DOCUMENTATION = r"""
912
options:

conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def pytest_configure(config: pytest.Config) -> None:
4343
text=True,
4444
)
4545
except subprocess.CalledProcessError as exc:
46-
print(f"{exc}\n{exc.stderr}\n{exc.stdout}", file=sys.stderr) # noqa: T201
46+
print(f"{exc}\n{exc.stderr}\n{exc.stdout}", file=sys.stderr) # ruff:ignore[print]
4747
sys.exit(1)
4848

4949

@@ -57,7 +57,7 @@ def is_master(config: pytest.Config) -> bool:
5757
return not hasattr(config, "workerinput")
5858

5959

60-
# ruff: noqa: E402
60+
# ruff:file-ignore[module-import-not-at-top-of-file]
6161
from ansible.module_utils.common.yaml import ( # pylint: disable=wrong-import-position
6262
HAS_LIBYAML,
6363
)

examples/playbooks/filter_plugins/filter_with_importerror.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"""
1313

1414

15-
def filter_with_importerror(data: Any) -> dict[str, str]: # noqa: ARG001
15+
def filter_with_importerror(data: Any) -> dict[str, str]: # ruff:ignore[unused-function-argument]
1616
"""Sample filter.
1717
1818
:return: dict
1919
"""
20-
import a_module_that_does_not_exist # type: ignore[reportMissingImports] # noqa: F401
20+
import a_module_that_does_not_exist # type: ignore[reportMissingImports] # ruff:ignore[unused-import]
2121

2222
return {}
2323

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -300,46 +300,46 @@ target-version = "py310"
300300

301301
[tool.ruff.lint]
302302
ignore = [
303-
"COM812", # conflicts with ISC001 on format
304-
"CPY001", # missing-copyright-notice
305-
"D203", # incompatible with D211
306-
"D213", # incompatible with D212
307-
"E501", # we use black
308-
"ERA001", # auto-removal of commented out code affects development and vscode integration
309-
"INP001", # "is part of an implicit namespace package", all false positives
310-
"ISC001", # conflicts with COM812 on format
311-
"PLW2901", # PLW2901: Redefined loop variable
312-
"RET504", # Unnecessary variable assignment before `return` statement
303+
"missing-trailing-comma", # conflicts with ISC001 on format
304+
"missing-copyright-notice", # missing-copyright-notice
305+
"incorrect-blank-line-before-class", # incompatible with D211
306+
"multi-line-summary-second-line", # incompatible with D212
307+
"line-too-long", # we use black
308+
"commented-out-code", # auto-removal of commented out code affects development and vscode integration
309+
"implicit-namespace-package", # "is part of an implicit namespace package", all false positives
310+
"single-line-implicit-string-concatenation", # conflicts with COM812 on format
311+
"redefined-loop-name", # PLW2901: Redefined loop variable
312+
"unnecessary-assign", # Unnecessary variable assignment before `return` statement
313313
# temporary disabled until we fix them:
314314
"ANN",
315-
"ARG002", # Unused method argument (currently in too many places)
316-
"D102", # Missing docstring in public method (currently in too many places)
317-
"FBT001",
318-
"FBT003",
319-
"FURB189", # Subclassing `dict` can be error prone, use `collections.UserDict` instead
320-
"PD011", # We are not using pandas, any .values attributes are unrelated
321-
"PERF203",
315+
"unused-method-argument", # Unused method argument (currently in too many places)
316+
"undocumented-public-method", # Missing docstring in public method (currently in too many places)
317+
"boolean-type-hint-positional-argument",
318+
"boolean-positional-value-in-call",
319+
"subclass-builtin", # Subclassing `dict` can be error prone, use `collections.UserDict` instead
320+
"pandas-use-of-dot-values", # We are not using pandas, any .values attributes are unrelated
321+
"try-except-in-loop",
322322
"PLR",
323-
"PLW0603", # global lock file in cache dir
324-
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
325-
"RUF045", # Assignment without annotation found in dataclass body
323+
"global-statement", # global lock file in cache dir
324+
"mutable-class-default", # Mutable class attributes should be annotated with `typing.ClassVar`
325+
"implicit-class-var-in-dataclass", # Assignment without annotation found in dataclass body
326326
# part of preview rules:
327-
"B909", # raise-missing-from
328-
"DOC201", # docstring-missing-returns
329-
"DOC402", # docstring-missing-summary
330-
"DOC501", # docstring-missing-exception
331-
"FURB101",
332-
"FURB103",
333-
"FURB110",
334-
"FURB113",
335-
"FURB118",
336-
"PLC0207", # maxsplit with [-1] preview rule
337-
"D421", # property-docstring-starts-with-verb (preview, too many existing violations)
338-
"PLC0415",
339-
"PLC2701",
340-
"PLW1641",
341-
"RUF067",
342-
"S404",
327+
"loop-iterator-mutation", # raise-missing-from
328+
"docstring-missing-returns", # docstring-missing-returns
329+
"docstring-missing-yields", # docstring-missing-summary
330+
"docstring-missing-exception", # docstring-missing-exception
331+
"read-whole-file",
332+
"write-whole-file",
333+
"if-exp-instead-of-or-operator",
334+
"repeated-append",
335+
"reimplemented-operator",
336+
"missing-maxsplit-arg", # maxsplit with [-1] preview rule
337+
"property-docstring-starts-with-verb", # property-docstring-starts-with-verb (preview, too many existing violations)
338+
"import-outside-top-level",
339+
"import-private-name",
340+
"eq-without-hash",
341+
"non-empty-init-module",
342+
"suspicious-subprocess-import",
343343
]
344344
select = ["ALL"]
345345

@@ -360,7 +360,12 @@ max-complexity = 20
360360
"src/ansiblelint/{utils,file_utils,runner,loaders,constants,config,cli,_mockings}.py" = [
361361
"PTH",
362362
]
363-
"test/**/*.py" = ["DOC201", "DOC501", "PLC2701", "S"]
363+
"test/**/*.py" = [
364+
"docstring-missing-returns",
365+
"docstring-missing-exception",
366+
"import-private-name",
367+
"S"
368+
]
364369

365370
[tool.ruff.lint.pydocstyle]
366371
convention = "google"

src/ansiblelint/__main__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
# safety check for broken ansible core, needs to happen first
4242
try:
4343
# pylint: disable=unused-import
44-
from ansible.parsing.dataloader import DataLoader # noqa: F401
44+
from ansible.parsing.dataloader import DataLoader # ruff:ignore[unused-import]
4545

46-
except Exception as _exc: # pylint: disable=broad-exception-caught # noqa: BLE001
46+
except Exception as _exc: # pylint: disable=broad-exception-caught # ruff:ignore[blind-except]
4747
logging.fatal(_exc)
4848
sys.exit(RC.INVALID_CONFIG)
4949
# pylint: disable=ungrouped-imports
@@ -89,7 +89,7 @@ def emit(self, record: logging.LogRecord) -> None:
8989
console_stderr.print(f"[dim]{msg}[/]")
9090
except RecursionError: # See issue 36272
9191
raise
92-
except Exception: # pylint: disable=broad-exception-caught # noqa: BLE001
92+
except Exception: # pylint: disable=broad-exception-caught # ruff:ignore[blind-except]
9393
self.handleError(record)
9494

9595

@@ -161,7 +161,7 @@ def initialize_options(arguments: list[str] | None = None) -> BaseFileLock | Non
161161
try:
162162
cache_dir_lock.acquire(timeout=180)
163163
except Timeout: # pragma: no cover
164-
_logger.error( # noqa: TRY400
164+
_logger.error( # ruff:ignore[error-instead-of-exception]
165165
"Timeout waiting for another instance of ansible-lint to release the lock.",
166166
)
167167
sys.exit(RC.LOCK_TIMEOUT)
@@ -270,7 +270,7 @@ def fix(runtime_options: Options, result: LintResult, rules: RulesCollection) ->
270270
_logger.debug("Rerunning: %s", match)
271271
runtime_options.tags = [match.rule.id]
272272
runtime_options.lintables = [match.filename]
273-
runtime_options._skip_ansible_syntax_check = True # noqa: SLF001
273+
runtime_options._skip_ansible_syntax_check = True # ruff:ignore[private-member-access]
274274
new_results = get_matches(rules, runtime_options)
275275
if not new_results.matches:
276276
_logger.debug("Newly resolved: %s", match)
@@ -478,7 +478,7 @@ def path_inject(own_location: str = "") -> None:
478478
paths[idx] = str(Path(path).expanduser())
479479
expanded = True
480480
if expanded: # pragma: no cover
481-
print( # noqa: T201
481+
print( # ruff:ignore[print]
482482
"WARNING: PATH altered to expand ~ in it. Read https://stackoverflow.com/a/44704799/99834 and correct your system configuration.",
483483
file=sys.stderr,
484484
)
@@ -514,7 +514,7 @@ def path_inject(own_location: str = "") -> None:
514514
all("pipx" in p for p in inject_paths),
515515
all("uv/tools" in p for p in inject_paths),
516516
)):
517-
print( # noqa: T201
517+
print( # ruff:ignore[print]
518518
f"WARNING: PATH altered to include {', '.join(inject_paths)} :: This is usually a sign of broken local setup, which can cause unexpected behaviors.",
519519
file=sys.stderr,
520520
)

src/ansiblelint/_internal/rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def rule_config(self) -> dict[str, Any]:
177177
rule_config = self.options.rules.get(self.id, {})
178178
if not isinstance(rule_config, dict): # pragma: no cover
179179
msg = f"Invalid rule config for {self.id}: {rule_config}"
180-
raise RuntimeError(msg) # noqa: TRY004
180+
raise RuntimeError(msg) # ruff:ignore[type-check-without-type-error]
181181
return rule_config
182182

183183
@property

0 commit comments

Comments
 (0)