-
Notifications
You must be signed in to change notification settings - Fork 2k
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
mypy annotation for test_dos.py
#19036
base: main
Are you sure you want to change the base?
Conversation
@@ -307,13 +315,13 @@ def is_closed(): | |||
assert not ws_con.closed | |||
|
|||
# Remove outbound rate limiter to test inbound limits | |||
ws_con.outbound_rate_limiter = FakeRateLimiter() | |||
ws_con.outbound_rate_limiter = FakeRateLimiter() # type: ignore[assignment] |
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.
Can we do without this type ignore?
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.
not without coming up with a different solution to make things unlimited
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.
Sent #19038 to address this.
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.
I'm not sure it's an improvement. it just hides the type-unsafety
Purpose:
Remove unused code and introduce stricter type checking of
test_dos.py
, gradually getting closer to full mypy coverage.Current Behavior:
test_dos.py
does not have full mypy coverage.There are 3 copies of an unused function,
get_block_path()
.New Behavior:
test_dos.py
has full mypy coverage (the the extent our repo is configured).Unused function
get_block_path()
has been removed.Testing Notes: