-
Notifications
You must be signed in to change notification settings - Fork 92
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
245 refactor datapy (Sourcery refactored) #258
Conversation
text = self._snippet.get("text") | ||
if text: | ||
if text := self._snippet.get("text"): |
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.
Function _Feature.snippet
refactored with the following changes:
- Use named expression to simplify assignment and conditional (
use-named-expression
)
if self._geometry is not None: | ||
return self._geometry.geometry | ||
return None | ||
return self._geometry.geometry if self._geometry is not None else None |
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.
Function Placemark.geometry
refactored with the following changes:
- Lift code into else after jump in control flow (
reintroduce-else
) - Replace if statement with if expression (
assign-if-exp
)
PR Summary
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 245-refactor-datapy #258 +/- ##
=======================================================
+ Coverage 93.16% 93.18% +0.01%
=======================================================
Files 34 34
Lines 4771 4768 -3
=======================================================
- Hits 4445 4443 -2
+ Misses 326 325 -1
☔ View full report in Codecov by Sentry. |
Pull Request #257 refactored by Sourcery.
If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.
See our documentation here.
Run Sourcery locally
Reduce the feedback loop during development by using the Sourcery editor plugin:
Review changes via command line
To manually merge these changes, make sure you're on the
245-refactor-datapy
branch, then run:Help us improve this pull request!