Skip to content

Commit

Permalink
Tweak comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 10, 2021
1 parent c93a9f7 commit 4b46952
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions importlib_metadata/__init__.py
Expand Up @@ -527,8 +527,7 @@ def legacy_normalize(name):

def matches(self, cand, base):
low = cand.lower()
# rpartition is like os.path.splitext, but much faster. They'd only
# differ if pre is empty, but in that case we don't have a match anyways.
# rpartition is faster than splitext and suitable for this purpose.
pre, _, ext = low.rpartition('.')
name, _, rest = pre.partition('-')
return (
Expand Down

0 comments on commit 4b46952

Please sign in to comment.