diff --git a/pyproject.toml b/pyproject.toml index a9c3788..1a4f084 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,9 +39,12 @@ branch = true show_missing = true [tool.pytest.ini_options] +asyncio_mode = "auto" minversion = "6.0" log_cli_level = "INFO" -asyncio_mode = "auto" +markers = [ + 'setup: marks tests as setup (deselect with -m "not setup")' +] # Linting tools configuration [tool.ruff] @@ -70,8 +73,22 @@ per-file-ignores = {"tests/*" = ["D100","D101","D102","D103","D104"]} [tool.ruff.lint.pydocstyle] convention = "google" +[tool.ruff.lint.mccabe] +max-complexity = 15 + +[tool.ruff.lint.pep8-naming] +# Allow Pydantic's `@validator` decorator to trigger class method treatment. +classmethod-decorators = ["classmethod", "pydantic.validator"] + +[tool.ruff.format] +docstring-code-format = true + [tool.pyright] include = ["src"] extraPaths = ["lib"] -pythonVersion = "3.8" pythonPlatform = "Linux" +reportUnknownParameterType = true + +[tool.codespell] +skip = ".git,build,.venv" +ignore-words-list = "assertIn,aNULL" diff --git a/src/charm.py b/src/charm.py index ab83c7f..1643900 100755 --- a/src/charm.py +++ b/src/charm.py @@ -38,7 +38,7 @@ class MimirWorkerK8SOperatorCharm(CharmBase): _name = "mimir" _mimir_port = 8080 - def __init__(self, *args): + def __init__(self, *args): # type: ignore super().__init__(*args) self.worker = Worker( charm=self,