Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

sourcery-ai[bot]
Copy link
Contributor

@sourcery-ai sourcery-ai bot commented Oct 30, 2023

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:

git fetch origin sourcery/245-refactor-datapy
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from cleder October 30, 2023 20:59
text = self._snippet.get("text")
if text:
if text := self._snippet.get("text"):
Copy link
Contributor Author

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:

Comment on lines -1685 to +1684
if self._geometry is not None:
return self._geometry.geometry
return None
return self._geometry.geometry if self._geometry is not None else None
Copy link
Contributor Author

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:

@what-the-diff
Copy link

what-the-diff bot commented Oct 30, 2023

PR Summary

  • Enhancement in fastkml/kml.py's text extraction
    Rewrote the way the program extracts text data, only initializing this process if the required "text" value exists. This can lead to enhanced performance and less unnecessary operations.

  • Improvement in fastkml/kml.py's handling of geometry data
    Simplified the handling of geometry data in the code, only accessing this data if it exists, otherwise returning none. This change could mean fewer errors, cleaner code and more stability when dealing with geometry data.

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b95b3c8) 93.16% compared to head (bc91b3f) 93.18%.

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     
Files Coverage Δ
fastkml/kml.py 78.08% <100.00%> (+0.03%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ghost
Copy link

ghost commented Oct 30, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

Base automatically changed from 245-refactor-datapy to develop October 30, 2023 21:38
@sourcery-ai sourcery-ai bot closed this Oct 30, 2023
@sourcery-ai sourcery-ai bot deleted the sourcery/245-refactor-datapy branch October 30, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants