GeezerVison is showing github.com — py.typed and type comments by Avasam · Pull Request #251 · python-xlib/python-xlib
Conversation
Avasam
commented
Nov 17, 2022
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Added type comments as per PEP 561 to type all public API while staying Python 2 compatible. (type definitions only need to be compatible with non EOL python versions. Using type comments instead of inline-types allows the code to still run on Python 2)
Added a py.typed marker to let type checkers know that this package provides its own types. And to not look for external type-stubs.
Some dynamic types (like Struct, Request, Event, ...) are naturally incomplete, but this was more than enough for my needs. And would add a lot of complexity to support.
For this to be as accurate as possible, the following should also be looked at:
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
As draft until all previous are also closed
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
⚠️ Please install the to ensure uploads and comments are reliably processed by Codecov.
❌ Patch coverage is 43.14214% with 228 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.28%. Comparing base (4e8bbf8) to head (1c163a2).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #251 +/- ##
==========================================
- Coverage 78.21% 75.28% -2.93%
==========================================
Files 42 42
Lines 4705 5054 +349
==========================================
+ Hits 3680 3805 +125
- Misses 1025 1249 +224
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.