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

Improvements #60

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Improvements #60

wants to merge 4 commits into from

Conversation

AHReccese
Copy link
Member

Reference Issues/PRs

#57 #59

What does this implement/fix? Explain your changes.

Any other comments?

@AHReccese AHReccese added this to the DMeta v0.4 milestone Feb 20, 2025
@AHReccese AHReccese self-assigned this Feb 20, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 50.63291% with 39 lines in your changes missing coverage. Please review.

Project coverage is 66.84%. Comparing base (4502890) to head (2fe65bf).
Report is 37 commits behind head on dev.

Files with missing lines Patch % Lines
dmeta/functions.py 50.64% 25 Missing and 14 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

This was linked to issues Feb 20, 2025
@AHReccese AHReccese marked this pull request as ready for review February 25, 2025 01:37
@AHReccese
Copy link
Member Author

AHReccese commented Feb 25, 2025

Do not merge after your review (if it's an approval).
@sadrasabouri

return False
tree = lxml.parse(xml_path)
for element in tree.iter():
if element.text and element.text.strip():
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member Author

@AHReccese AHReccese Feb 26, 2025

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

Comment on lines +117 to +118
if verbose:
print(f"Cleared metadata for: {os.path.join(root, file)}")
Copy link
Member

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?

Comment on lines +226 to +227
if verbose:
print(f"Updated metadata for: {os.path.join(root, file)}")
Copy link
Member

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

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.

add recursive search flag to CLI --verbose argument
3 participants