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

Enforce strict typing #461

Merged
merged 7 commits into from
Mar 16, 2022
Merged

Enforce strict typing #461

merged 7 commits into from
Mar 16, 2022

Conversation

ggravlingen
Copy link
Member

No description provided.

@ggravlingen
Copy link
Member Author

self._protocol: asyncio.Task | None = None

What should be the type hint here? In a previous PR, you wrote The Task should be typed with its result value. but I don't quite understand what you mean here.

@ggravlingen
Copy link
Member Author

When this PR is merged, I believe we only have the libcoap-file to go before it's fully typed?

@ggravlingen
Copy link
Member Author

Should we also add type hints to __main__.py?

@MartinHjelmare
Copy link
Contributor

Should we also add type hints to __main__.py?

Yes, we should.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
@ggravlingen
Copy link
Member Author

Should we also add type hints to __main__.py?

Yes, we should.

Great, I’ll look into that.

pytradfri/util.py Outdated Show resolved Hide resolved
pytradfri/util.py Outdated Show resolved Hide resolved
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
@MartinHjelmare
Copy link
Contributor

The api task returns a Context instance.

@ggravlingen
Copy link
Member Author

I made a change (added Context as return type) after your approval so I won't merge. Please do if the change was acceptable.

Copy link
Contributor

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Great!

@MartinHjelmare MartinHjelmare merged commit 65f211d into master Mar 16, 2022
@MartinHjelmare MartinHjelmare deleted the enforce-strict-typing branch March 16, 2022 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants