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

Comply to PEP 0561 #299

Merged
merged 3 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 6 additions & 1 deletion pyoverkiz/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,12 @@ def __len__(self) -> int:
class Command(dict):
"""Represents an OverKiz Command."""

def __init__(self, name: str, parameters: list[str] | None = None, **_: Any):
name: str
parameters: list[str | int | float] | None
Comment on lines +319 to +320
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why I typed this? Or why I added int/float to the list?

I added int/float because we pass that to the API directly from ha-tahoma, and we don't case it to string first.


def __init__(
self, name: str, parameters: list[str | int | float] | None = None, **_: Any
):
self.name = name
self.parameters = parameters
dict.__init__(self, name=name, parameters=parameters)
Expand Down
Empty file added pyoverkiz/py.typed
Empty file.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ repository = "https://github.com/iMicknl/python-overkiz-api"
packages = [
{ include = "pyoverkiz" }
]
include = ["pyoverkiz/py.typed"]
iMicknl marked this conversation as resolved.
Show resolved Hide resolved


[tool.poetry.dependencies]
python = ">=3.7,<4.0"
Expand Down