From d66f6c2a3953d285525419cffb067ddaa3f0b0be Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Tue, 12 Nov 2024 13:16:57 +0000 Subject: [PATCH] Remove self type (#394) --- .pre-commit-config.yaml | 18 +++++++++++------- pyproject.toml | 4 ++++ src/tox_ansible/plugin.py | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a2f1c5..ca64d78 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,11 +45,6 @@ repos: - prettier-plugin-toml - prettier-plugin-sort-json - - repo: https://github.com/psf/black - rev: 24.10.0 - hooks: - - id: black - - repo: https://github.com/pappasam/toml-sort rev: v0.23.1 hooks: @@ -61,14 +56,23 @@ repos: - id: tox-ini-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.2 + rev: v0.7.3 hooks: - id: ruff args: + - --fix - --exit-non-zero-on-fix + types_or: [python, pyi] + - id: ruff-format # must be after ruff + types_or: [python, pyi] + + - repo: https://github.com/psf/black # must be after ruff + rev: 24.10.0 + hooks: + - id: black - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.15.3 + rev: v8.16.0 hooks: - id: cspell name: Spell check with cspell diff --git a/pyproject.toml b/pyproject.toml index 4ab144c..55c312f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -335,6 +335,10 @@ line-length = 100 target-version = "py310" [tool.ruff.lint] +ignore = [ + "COM812", # conflicts with ISC001 on format + "ISC001" # conflicts with COM812 on format +] select = ["ALL"] [tool.ruff.lint.flake8-pytest-style] diff --git a/src/tox_ansible/plugin.py b/src/tox_ansible/plugin.py index 5c5559c..515c1a4 100644 --- a/src/tox_ansible/plugin.py +++ b/src/tox_ansible/plugin.py @@ -61,7 +61,7 @@ class AnsibleConfigSet(ConfigSet): """The ansible configuration.""" - def register_config(self: T) -> None: + def register_config(self) -> None: """Register the ansible configuration.""" self.add_config( "skip",