Skip to content

Commit

Permalink
build: downgrade pytest and update ruff config
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
  • Loading branch information
kaechele committed Mar 5, 2024
1 parent a9392aa commit f8c96f6
Show file tree
Hide file tree
Showing 8 changed files with 245 additions and 661 deletions.
881 changes: 229 additions & 652 deletions poetry.lock

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,16 @@ expected-line-ending-format = "LF"
target-version = "py312"
exclude = ["docs", "setup.py"]

# Same as Black.
line-length = 88

[tool.ruff.lint]
# Let's tone this down once we release the first version
select = ["ALL"]
ignore = ["ANN101", "I001", "COM"]
unfixable = ["ERA"]

# Same as Black.
line-length = 88

[tool.ruff.flake8-import-conventions.extend-aliases]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
voluptuous = "vol"
"homeassistant.helpers.area_registry" = "ar"
"homeassistant.helpers.config_validation" = "cv"
Expand All @@ -152,22 +153,22 @@ voluptuous = "vol"
"homeassistant.helpers.issue_registry" = "ir"
"homeassistant.util.dt" = "dt_util"

[tool.ruff.flake8-pytest-style]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false

[tool.ruff.flake8-tidy-imports.banned-api]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"async_timeout".msg = "use asyncio.timeout instead"
"pytz".msg = "use zoneinfo instead"

[tool.ruff.isort]
[tool.ruff.lint.isort]
force-sort-within-sections = true
combine-as-imports = true
split-on-trailing-comma = false

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 25

[build-system]
Expand Down
1 change: 1 addition & 0 deletions src/bonaparte/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The Bonaparte Library."""

from __future__ import annotations

__version__ = "0.3.0"
Expand Down
1 change: 1 addition & 0 deletions src/bonaparte/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Exceptions used in the Bonaparte library."""

from __future__ import annotations


Expand Down
1 change: 1 addition & 0 deletions src/bonaparte/fireplace.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Representation of a Fireplace."""

from __future__ import annotations

from dataclasses import dataclass, fields as dc_fields
Expand Down
1 change: 1 addition & 0 deletions src/bonaparte/parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Parsers used in the Bonaparte library."""

from __future__ import annotations

from .const import LedMode, LedState
Expand Down
1 change: 1 addition & 0 deletions src/bonaparte/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper functions and utilities used in the Bonaparte library."""

from __future__ import annotations

from functools import reduce
Expand Down
1 change: 1 addition & 0 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Miscellaneous tests."""

from bleak.backends.device import BLEDevice
from bonaparte import Fireplace, FireplaceFeatures
import pytest
Expand Down

0 comments on commit f8c96f6

Please sign in to comment.