Skip to content

Commit

Permalink
Ending type-hints for hatchling part (#626)
Browse files Browse the repository at this point in the history
* Ending type-hints for hatchling part

* fix type-hint error

* fix load plugin from script type

* fix type checking
  • Loading branch information
ischaojie committed Dec 6, 2022
1 parent d92e8a0 commit 800245f
Show file tree
Hide file tree
Showing 12 changed files with 138 additions and 101 deletions.
2 changes: 1 addition & 1 deletion backend/src/hatchling/dep/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __getitem__(self, item: str) -> Distribution | None:
return None

for distribution in self._resolver:
name = self._canonical_regex.sub('-', distribution.metadata.get('Name')).lower()
name = self._canonical_regex.sub('-', distribution.metadata['Name']).lower()
self._distributions[name] = distribution
if name == item:
return distribution
Expand Down
2 changes: 1 addition & 1 deletion backend/src/hatchling/metadata/classifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,5 +810,5 @@
KNOWN_CLASSIFIERS = set(SORTED_CLASSIFIERS)


def is_private(classifier):
def is_private(classifier: str) -> bool:
return classifier.lower().startswith('private ::')

0 comments on commit 800245f

Please sign in to comment.