Skip to content
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 .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
run: uv run ruff format homeassistant_api
- name: Run Ruff linting
run: uv run ruff check homeassistant_api
- name: Run Zuban
run: uv run zuban check homeassistant_api
- name: Run ty
run: uv run ty check homeassistant_api

code_functionality:
name: "Code Functionality"
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
repos:
- repo: local
hooks:
- id: zuban
name: zuban
entry: uv run zuban check homeassistant_api
- id: ty
name: ty
entry: uv run ty check homeassistant_api
language: system
types: [python]
pass_filenames: false
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Code Styling Guidelines
In order to make sure that our code is easy to read, and navigate
as well as to stop stupid mistakes like typos, undefined variables, etc,
we enforce code standards.
Using the tools, :code:`ruff`, :code:`zuban`, and :code:`pytest`, we make sure that our code quality is top notch and that changes work everywhere.
Using the tools, :code:`ruff`, :code:`ty`, and :code:`pytest`, we make sure that our code quality is top notch and that changes work everywhere.
You can run those tools manually yourself, but they also run automatically when you open a Pull Request on :resource:`GitHub <repo>`.


Expand Down
7 changes: 6 additions & 1 deletion homeassistant_api/models/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ class BaseEntity(BaseModel):

slug: str
state: State
group: "BaseGroup" = Field(exclude=True, repr=False)

if TYPE_CHECKING:
# Subclasses declare the concrete ``group`` field. It is read-only here
# so they can narrow its type without an unsound mutable override.
@property
def group(self) -> BaseGroup: ...

@property
def entity_id(self) -> str:
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ dev = [
"types-docutils>=0.22",
"types-simplejson>=3.20",
"types-toml>=0.10",
"zuban>=0.7",
"ruff>=0.15",
"pytest-asyncio>=1",
"pytest-cov>=7",
Expand All @@ -44,6 +43,7 @@ dev = [
"prek>=0.3.8",
"pre-commit>=4.5.1",
"nimax",
"ty>=1",
]

[tool.nimax]
Expand Down Expand Up @@ -110,10 +110,6 @@ ignore = [
[tool.ruff.lint.isort]
force-single-line = true

[tool.zuban]
exclude = ["^docs/"]
untyped_function_return_mode = "inferred"

[tool.hatch.build.targets.wheel]
packages = ["homeassistant_api"]

Expand Down
Loading