-
Notifications
You must be signed in to change notification settings - Fork 567
tests(huggingface): Avoid None version
#5083
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5083 +/- ##
=======================================
Coverage 83.95% 83.96%
=======================================
Files 179 179
Lines 17948 17951 +3
Branches 3193 3194 +1
=======================================
+ Hits 15069 15073 +4
Misses 1906 1906
+ Partials 973 972 -1
|
None version
| def _replace_hyphens_dots_and_underscores_with_dashes(name): | ||
| # type: (str) -> str | ||
| # https://peps.python.org/pep-0503/#normalized-names | ||
| return re.sub(r"[-_.]+", "-", name) |
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.
Initially I changed _normalize_module_name, but I'm worried that could change the identifiers in the list set by the ModulesIntegration.
Description
Normalize package identifiers according to https://peps.python.org/pep-0503/#normalized-names when getting a package version.
Fixes the
huggingface-hubtest suite, which fails because the identifier returned byimportlib.metadatachanged. To confirmand then run
in the interpreter, you should have a
huggingface-hubin the list. If you instead install "huggingface-hub==1.1.2" and follow the steps above, you instead seehuggingface_hub.Issues
Reminders
tox -e linters.feat:,fix:,ref:,meta:)