Skip to content

Commit

Permalink
fix: add missing data for spillover support (#44)
Browse files Browse the repository at this point in the history
* fix: add missing data for spillover support

* chore: update dependencies

* fix: tooling problems

* fix: more tooling update problems
  • Loading branch information
cryptk committed Nov 17, 2023
1 parent 6f960b9 commit 35610d5
Show file tree
Hide file tree
Showing 7 changed files with 339 additions and 338 deletions.
21 changes: 12 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default_stages: [ commit ]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: debug-statements
- id: check-builtin-literals
Expand All @@ -18,35 +18,38 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/python-poetry/poetry
rev: 1.3.2
rev: 1.7.0
hooks:
- id: poetry-check
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.6
hooks:
- id: codespell
exclude: poetry.lock
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.260
rev: v0.1.6
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/pylint-dev/pylint
rev: v2.17.0
rev: v3.0.1
hooks:
- id: pylint
additional_dependencies: [ "pydantic", "xmltodict" ]
# There is work that needs to happen to update to pydantic >= 2.0
additional_dependencies: [ "pydantic<2.0.0", "xmltodict" ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
rev: v1.7.0
hooks:
- id: mypy
exclude: cli.py
additional_dependencies: [ "pydantic" ]
# There is work that needs to happen to update to pydantic >= 2.0
additional_dependencies: [ "pydantic<2.0.0" ]
2 changes: 2 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"recommendations": [
"ms-python.python",
"ms-python.black-formatter",
"ms-python.mypy-type-checker",
"njpwerner.autodocstring"
]
}
8 changes: 5 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"files.trimTrailingWhitespace": true,
"editor.rulers": [140],
"python.formatting.provider": "black",
// https://code.visualstudio.com/docs/python/testing#_pytest-configuration-settings
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [
"--cov=pyomnilogic_local",
"--cov-report=xml:coverage.xml",
"tests"
],
"python.linting.mypyEnabled": true,
"python.analysis.typeCheckingMode": "basic"
"python.analysis.typeCheckingMode": "basic",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
}
}
635 changes: 317 additions & 318 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyomnilogic_local/models/mspconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class MSPBoW(OmniBase):

omni_type: OmniType = OmniType.BOW
type: BodyOfWaterType | str = Field(alias="Type")
supports_spillover: Literal["yes", "no"] = Field(alias="Supports-Spillover")
filter: list[MSPFilter] | None = Field(alias="Filter")
relay: list[MSPRelay] | None = Field(alias="Relay")
heater: MSPVirtualHeater | None = Field(alias="Heater")
Expand Down
1 change: 0 additions & 1 deletion pyomnilogic_local/models/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ class Config:

@staticmethod
def load_xml(xml: str) -> Telemetry:

TypeVar("KT")
TypeVar("VT", SupportsInt, Any)

Expand Down
9 changes: 2 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "python-omnilogic-local"
version = "0.12.0"
version = "0.13.0"
description = "A library for local control of Hayward OmniHub/OmniLogic pool controllers using their local API"
authors = ["cryptk <cryptk@users.noreply.github.com>", "djtimca", "garionphx"]
license = "Apache-2.0"
Expand Down Expand Up @@ -91,7 +91,7 @@ warn_required_dynamic_aliases = true
warn_untyped_fields = true

[tool.pylint.MAIN]
py-version = "3.10"
py-version = "3.11"
ignore = [
"tests",
]
Expand All @@ -105,11 +105,6 @@ load-plugins = [
persistent = false
extension-pkg-allow-list = [
"pydantic",
"av.audio.stream",
"av.stream",
"ciso8601",
"orjson",
"cv2",
]
fail-on = [
"I",
Expand Down

0 comments on commit 35610d5

Please sign in to comment.