-
Notifications
You must be signed in to change notification settings - Fork 234
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
add typing to aiokafka/protocol/* #999
Conversation
f261e92
to
e4b20ab
Compare
Maybe rewrite all schemas using dataclasses? If it is not a problem for performance. |
@classmethod | ||
@abc.abstractmethod | ||
def encode(cls, value): ... | ||
def encode(cls, value: T) -> bytes: ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
|
||
@classmethod | ||
@abc.abstractmethod | ||
def decode(cls, data): ... | ||
def decode(cls, data: BytesIO) -> T: ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
magic: Literal[0], | ||
attributes: int, | ||
crc: int, | ||
) -> None: ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
attributes: int, | ||
crc: int, | ||
timestamp: int, | ||
) -> None: ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
array_of: ValueT | ||
|
||
@overload | ||
def __init__(self, array_of_0: ValueT): ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
@overload | ||
def __init__( | ||
self, array_of_0: Tuple[str, ValueT], *array_of: Tuple[str, ValueT] | ||
): ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
@@ -23,27 +25,29 @@ | |||
) | |||
) | |||
|
|||
def encode(self): | |||
def encode(self) -> bytes: |
Check notice
Code scanning / CodeQL
Mismatch between signature and use of an overridden method Note
call
method Message.encode
Overridden method signature does not match
call
method Message.encode
Overridden method signature does not match
call
method Message.encode
Overridden method signature does not match
call
method Message.encode
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #999 +/- ##
==========================================
- Coverage 95.44% 95.38% -0.07%
==========================================
Files 112 112
Lines 16702 16738 +36
Branches 2672 2691 +19
==========================================
+ Hits 15942 15966 +24
- Misses 479 485 +6
- Partials 281 287 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Dmitry!
Thank you very much, you did a huge piece of work! And sorry for delay with review. I hope we'll finish it very soon.
Thanks for the review, sorry for 64 comments |
Hmm, we forgot about |
Changes
partial fixes #980
Add typing to all modules in protocol package.
Checklist
CHANGES
folder<issue_id>.<type>
(e.g.588.bugfix
)issue_id
change it to the pr id after creating the PR.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.