diff --git a/src/charm.py b/src/charm.py index e01dcedc..3ee19aec 100755 --- a/src/charm.py +++ b/src/charm.py @@ -44,7 +44,7 @@ def _on_config_changed(self, _event: ops.ConfigChangedEvent): Learn more about config at https://juju.is/docs/sdk/config Args: - event: event triggering the handler. + _event: event triggering the handler. """ # Fetch an invalid config name self.model.config["log-level"].lower() diff --git a/tests/unit/test_base.py b/tests/unit/test_base.py index 73acc838..f6acc1a0 100644 --- a/tests/unit/test_base.py +++ b/tests/unit/test_base.py @@ -10,6 +10,7 @@ import ops import ops.testing import pytest + from charm import K8sCharm diff --git a/tox.ini b/tox.ini index ec6f826b..a742a523 100644 --- a/tox.ini +++ b/tox.ini @@ -26,20 +26,27 @@ passenv = description = Apply coding style standards to code deps = black - ruff + isort commands = + isort {[vars]all_path} black {[vars]all_path} - ruff {[vars]all_path} --fix [testenv:lint] description = Check code against coding style standards deps = black codespell - ruff + flake8<6.0.0 + flake8-builtins + flake8-copyright<6.0.0 + flake8-docstrings>=1.6.0 + flake8-docstrings-complete>=1.0.3 + flake8-test-docs>=1.0 mypy pep8-naming + pydocstyle>=2.10 pylint + pyproject-flake8<6.0.0 pytest pytest-asyncio pytest-operator @@ -53,7 +60,9 @@ commands = codespell {toxinidir} --skip {toxinidir}/.git --skip {toxinidir}/.tox \ --skip {toxinidir}/build --skip {toxinidir}/lib --skip {toxinidir}/venv \ --skip {toxinidir}/.mypy_cache --skip {toxinidir}/icon.svg - ruff {[vars]all_path} + # pflake8 wrapper supports config from pyproject.toml + pflake8 {[vars]all_path} --ignore=W503 + isort --check-only --diff {[vars]all_path} black --check --diff {[vars]all_path} mypy {[vars]all_path} pylint {[vars]all_path}