Skip to content

Commit

Permalink
chore: pre-commit autoupdate (#4270)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/pycontribs/mirrors-prettier: v3.3.2 →
v3.3.3](pycontribs/mirrors-prettier@v3.3.2...v3.3.3)
- [github.com/psf/black: 24.4.2 →
24.8.0](psf/black@24.4.2...24.8.0)
- [github.com/astral-sh/ruff-pre-commit: v0.5.0 →
v0.5.6](astral-sh/ruff-pre-commit@v0.5.0...v0.5.6)
- [github.com/streetsidesoftware/cspell-cli: v8.9.0 →
v8.13.1](streetsidesoftware/cspell-cli@v8.9.0...v8.13.1)
- [github.com/jsh9/pydoclint: 0.5.3 →
0.5.6](jsh9/pydoclint@0.5.3...0.5.6)
- [github.com/pycqa/pylint.git: v3.2.4 →
v3.2.6](https://github.com/pycqa/pylint.git/compare/v3.2.4...v3.2.6)
- [github.com/pre-commit/mirrors-mypy.git: v1.10.1 →
v1.11.1](https://github.com/pre-commit/mirrors-mypy.git/compare/v1.10.1...v1.11.1)
- [github.com/ansible/ansible-lint: v24.6.1 →
v24.7.0](ansible/ansible-lint@v24.6.1...v24.7.0)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kate Case <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and Qalthos authored Aug 16, 2024
1 parent 5a6a46d commit d9e5b67
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .config/pydoclint-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ src/molecule/dependency/ansible_galaxy/__init__.py
--------------------
src/molecule/dependency/ansible_galaxy/base.py
DOC601: Class `AnsibleGalaxyBase`: 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 `AnsibleGalaxyBase`: 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: [FILTER_OPTS: , __metaclass__: ]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
DOC603: Class `AnsibleGalaxyBase`: 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: [__metaclass__: ]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
DOC101: Method `AnsibleGalaxyBase.__init__`: Docstring contains fewer arguments than in function signature.
DOC106: Method `AnsibleGalaxyBase.__init__`: The option `--arg-type-hints-in-signature` is `True` but there are no argument type hints in the signature
DOC107: Method `AnsibleGalaxyBase.__init__`: The option `--arg-type-hints-in-signature` is `True` but not all args in the signature have type hints
Expand All @@ -262,7 +262,7 @@ src/molecule/dependency/ansible_galaxy/roles.py
--------------------
src/molecule/dependency/base.py
DOC601: Class `Base`: 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 `Base`: 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: [BACKOFF: , RETRY: , SLEEP: , __metaclass__: ]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
DOC603: Class `Base`: 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: [__metaclass__: ]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
DOC106: Method `Base.__init__`: The option `--arg-type-hints-in-signature` is `True` but there are no argument type hints in the signature
DOC107: Method `Base.__init__`: The option `--arg-type-hints-in-signature` is `True` but not all args in the signature have type hints
DOC201: Method `Base.execute_with_retries` does not have a return section in docstring
Expand All @@ -280,7 +280,7 @@ src/molecule/dependency/shell.py
--------------------
src/molecule/driver/base.py
DOC601: Class `Driver`: 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 `Driver`: 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: [__metaclass__: , title: ]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
DOC603: Class `Driver`: 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: [__metaclass__: ]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
DOC106: Method `Driver.__init__`: The option `--arg-type-hints-in-signature` is `True` but there are no argument type hints in the signature
DOC107: Method `Driver.__init__`: The option `--arg-type-hints-in-signature` is `True` but not all args in the signature have type hints
DOC101: Method `Driver.name`: Docstring contains fewer arguments than in function signature.
Expand Down
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
)$
- repo: https://github.com/pycontribs/mirrors-prettier
rev: v3.3.2
rev: v3.3.3
hooks:
- id: prettier
always_run: true
Expand All @@ -44,7 +44,7 @@ repos:
- prettier-plugin-sort-json

- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black

Expand All @@ -59,28 +59,28 @@ repos:
- id: tox-ini-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.5.6
hooks:
- id: ruff
args:
- --exit-non-zero-on-fix

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.9.0
rev: v8.13.1
hooks:
- id: cspell
name: Spell check with cspell

- repo: https://github.com/jsh9/pydoclint
rev: "0.5.3"
rev: "0.5.6"
hooks:
- id: pydoclint
# This allows automatic reduction of the baseline file when needed.
entry: sh -ec "pydoclint . && pydoclint --generate-baseline=1 ."
pass_filenames: false

- repo: https://github.com/pycqa/pylint.git
rev: v3.2.4
rev: v3.2.6
hooks:
- id: pylint
args:
Expand All @@ -98,7 +98,7 @@ repos:
- wcmatch

- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: v1.10.1
rev: v1.11.1
hooks:
- id: mypy
additional_dependencies:
Expand Down Expand Up @@ -135,7 +135,7 @@ repos:
files: ^.config\/.*requirements.*$
language_version: "3.10" # minimal we support officially
- repo: https://github.com/ansible/ansible-lint
rev: v24.6.1
rev: v24.7.0
hooks:
- id: ansible-lint
stages: [manual]
6 changes: 5 additions & 1 deletion src/molecule/dependency/ansible_galaxy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@


class AnsibleGalaxyBase(base.Base):
"""Ansible Galaxy dependency base class."""
"""Ansible Galaxy dependency base class.
Attributes:
FILTER_OPTS: Keys to remove from the dictionary returned by options().
"""

__metaclass__ = abc.ABCMeta

Expand Down
8 changes: 7 additions & 1 deletion src/molecule/dependency/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@


class Base:
"""Dependency Base Class."""
"""Dependency Base Class.
Attributes:
RETRY: Number of times to retry the dependency.
SLEEP: Number of seconds to sleep between retries.
BACKOFF: Additional number of seconds to sleep for each successive attempt.
"""

__metaclass__ = abc.ABCMeta

Expand Down
8 changes: 6 additions & 2 deletions src/molecule/driver/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@


class Driver:
"""Driver Class."""
"""Driver Class.
Attributes:
title: Short description of the driver.
"""

__metaclass__ = ABCMeta
title = "" # Short description of the driver.
title = ""

def __init__(self, config=None) -> None: # type: ignore[no-untyped-def] # noqa: ANN001
"""Initialize code for all :ref:`Driver` classes.
Expand Down
6 changes: 3 additions & 3 deletions src/molecule/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


if TYPE_CHECKING:
from collections.abc import MutableMapping
from collections.abc import Mapping, MutableMapping


class InvalidInterpolation(Exception): # noqa: N818
Expand Down Expand Up @@ -96,7 +96,7 @@ def __init__(

def interpolate(self, string: str, keep_string=None) -> str: # type: ignore[no-untyped-def] # pylint: disable=redefined-outer-name # noqa: ANN001, D102
try:
return self.templater(string).substitute(self.mapping, keep_string) # type: ignore[no-any-return, no-untyped-call]
return self.templater(string).substitute(self.mapping, keep_string)
except ValueError as e:
raise InvalidInterpolation(string, e) from e

Expand All @@ -107,7 +107,7 @@ class TemplateWithDefaults(string.Template):
idpattern = r"[_a-z][_a-z0-9]*(?::?-[^}]+)?"

# pylint: disable=too-many-return-statements # pylint: disable=useless-suppression
def substitute(self, mapping, keep_string): # type: ignore[no-untyped-def] # pylint: disable=arguments-differ # noqa: ANN001, ANN201, D102
def substitute(self, mapping: Mapping[str, object], keep_string: str | None) -> str: # type: ignore[override] # pylint: disable=arguments-differ # noqa: D102
# Helper function for .sub()
def convert(mo): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PLR0911
# Check the most common path first.
Expand Down

0 comments on commit d9e5b67

Please sign in to comment.