-
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
Two small fixes (Sourcery refactored) #292
Conversation
Review changes with SemanticDiff. Analyzed 1 of 1 files. Overall, the semantic diff is 62% smaller than the GitHub diff.
|
PR Summary
|
PR Description updated to latest commit (7434920) |
PR Analysis(review updated until commit 7434920)
PR Feedback
How to useInstructions
|
Persistent review updated to latest commit 7434920 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #292 +/- ##
===========================================
+ Coverage 96.35% 96.40% +0.04%
===========================================
Files 42 42
Lines 3948 3947 -1
Branches 213 214 +1
===========================================
+ Hits 3804 3805 +1
+ Misses 109 107 -2
Partials 35 35 ☔ View full report in Codecov by Sentry. |
7434920
to
669402a
Compare
335cdc3
to
38706a6
Compare
elif hasattr(config.etree, "LXML_VERSION"): | ||
root = config.etree.Element( # type: ignore[attr-defined] | ||
f"{self.ns}kml", | ||
nsmap={None: self.ns[1:-1]}, | ||
) | ||
else: | ||
try: | ||
root = config.etree.Element( # type: ignore[attr-defined] | ||
f"{self.ns}kml", | ||
) | ||
except TypeError: | ||
root = config.etree.Element( # type: ignore[attr-defined] | ||
f"{self.ns}kml", | ||
) | ||
root = config.etree.Element( # type: ignore[attr-defined] | ||
f"{self.ns}kml", | ||
) |
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 KML.etree_element
refactored with the following changes:
- Merge else clause's nested if statement into elif (
merge-else-if-into-elif
)
Pull Request #289 refactored by Sourcery.
Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.
To incorporate these changes, you can either:
Merge this Pull Request instead of the original, or
Ask your contributor to locally incorporate these commits and push them to
the original Pull Request
Incorporate changes via command line
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:
Help us improve this pull request!