-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improvements #60
base: dev
Are you sure you want to change the base?
Improvements #60
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #60 +/- ##
==========================================
- Coverage 72.08% 66.84% -5.24%
==========================================
Files 4 5 +1
Lines 154 202 +48
Branches 42 49 +7
==========================================
+ Hits 111 135 +24
- Misses 36 46 +10
- Partials 7 21 +14 ☔ View full report in Codecov by Sentry. |
Do not merge after your review (if it's an approval). |
return False | ||
tree = lxml.parse(xml_path) | ||
for element in tree.iter(): | ||
if element.text and element.text.strip(): |
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.
Why both of these checks are needed? isn't element.text.strip()
enough?
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.
I'm saying that because this if would trigger when element.text.strip()
isn't none and that's stricter than element.text
being 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.
You can not call function on 'None' variable, it throws exception
if verbose: | ||
print(f"Cleared metadata for: {os.path.join(root, file)}") |
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 have one such a message in clear
function; do you want to reprint it here?
if verbose: | ||
print(f"Updated metadata for: {os.path.join(root, file)}") |
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.
Same comment as for clear
Reference Issues/PRs
#57 #59
What does this implement/fix? Explain your changes.
Any other comments?