-
Notifications
You must be signed in to change notification settings - Fork 541
feat: Improve type annotations in utils.py #413
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
Conversation
Replace some Anys with proper types.
Thanks for your continued efforts on this @bluetech! |
@untitaker This has one failure left:
It looks legitimate but I'm not sure. The Would you mind taking a look? |
Yeah, seems like i was a bit careless about the logic on that one |
sentry_sdk/utils.py
Outdated
@@ -358,7 +358,10 @@ def safe_repr(value): | |||
|
|||
|
|||
def filename_for_module(module, abs_path): | |||
# type: (str, str) -> str | |||
# type: (str, Optional[str]) -> Optional[str] |
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.
Looking at serialize_frame
, module
can be None
too.
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.
You're right, not sure why mypy didn't catch that one. I think I fixed it now though!
d014f7e
to
fb66204
Compare
Thanks again! |
Replace some Anys with proper types.