Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not use mutable data structure as argument #2

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions healthcheck/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ class Healthcheck:
def __init__(
self,
name: str,
components: List[HealthcheckComponentInterface] = [],
components: Optional[List[HealthcheckComponentInterface]] = None,
warn_is_unhealthy: bool = False,
) -> None:
self.name = name
self.components: List[HealthcheckComponentInterface] = components
self.components: List[HealthcheckComponentInterface] = components or []
self.warn_is_unhealthy = warn_is_unhealthy

self.checks: Dict[str, List[HealthcheckComponentStatus]] = {}
Expand Down
40 changes: 38 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ isort = "^5.12.0"
flake8 = "^6.1.0"
mypy = "^1.6.1"
pytest-cov = "^4.1.0"
flake8-bugbear = "^23.12.2"

[build-system]
requires = ["poetry-core"]
Expand Down