-
-
Notifications
You must be signed in to change notification settings - Fork 258
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 improvement #1054
base: master
Are you sure you want to change the base?
mypy improvement #1054
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1054 +/- ##
==========================================
+ Coverage 97.33% 97.57% +0.23%
==========================================
Files 42 55 +13
Lines 2104 2518 +414
==========================================
+ Hits 2048 2457 +409
- Misses 56 61 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
1eb5aab
to
06eef86
Compare
def example(self) -> str | None: | ||
return self.custom_settings.get("example") | ||
def example(self) -> str: | ||
return self.custom_settings.get("example") or "" |
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 can set the default for the .get
, right?
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.
Lgtm
Description
This is part of #1053, which intends to catch errors earlier through a more strict mypy setting.
Checklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testExpected behavior
Steps to Test This Pull Request
Additional context
#1053