Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
da3d39f8
Commit
da3d39f8
authored
May 10, 2020
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore single return
parent
fdee8026
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
pkg_resources/__init__.py
pkg_resources/__init__.py
+12
-10
No files found.
pkg_resources/__init__.py
View file @
da3d39f8
...
@@ -2071,16 +2071,18 @@ def find_on_path(importer, path_item, only=False):
...
@@ -2071,16 +2071,18 @@ def find_on_path(importer, path_item, only=False):
def dist_factory(path_item, entry, only):
def dist_factory(path_item, entry, only):
"""Return a dist_factory for the given entry."""
"""Return a dist_factory for the given entry."""
lower = entry.lower()
lower = entry.lower()
if lower.endswith('.egg-info'):
is_egg_info = lower.endswith('.egg-info')
return distributions_from_metadata
is_dist_info = lower.endswith('.dist-info') and os.path.isdir(entry)
elif lower.endswith('.dist-info') and os.path.isdir(entry):
is_meta = is_egg_info or is_dist_info
return distributions_from_metadata
return (
elif not only and _is_egg_path(entry):
distributions_from_metadata
return find_distributions
if is_meta else
elif not only and lower.endswith('.egg-link'):
find_distributions
return resolve_egg_link
if not only and _is_egg_path(entry) else
else:
resolve_egg_link
return NoDists()
if not only and lower.endswith('.egg-link') else
NoDists()
)
class NoDists:
class NoDists:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment