Skip to content

Commit

Permalink
Conform to required linters
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Dec 4, 2023
1 parent 0a50570 commit c14179d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import ops
import ops.testing
import pytest

from charm import K8sCharm


Expand Down
17 changes: 13 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down

0 comments on commit c14179d

Please sign in to comment.