Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
c66178a0
Commit
c66178a0
authored
May 22, 2022
by
Mathieu Kniewallner
Committed by
Randy Döring
May 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: remove unnecessary maps to respect `C417`
parent
837dd3fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
src/poetry/console/commands/source/show.py
+1
-1
src/poetry/utils/authenticator.py
+1
-1
tests/console/commands/source/test_show.py
+9
-12
No files found.
src/poetry/console/commands/source/show.py
View file @
c66178a0
...
...
@@ -26,7 +26,7 @@ class SourceShowCommand(Command):
self
.
line
(
"No sources configured for this project."
)
return
0
if
names
and
not
any
(
map
(
lambda
s
:
s
.
name
in
names
,
sources
)
):
if
names
and
not
any
(
s
.
name
in
names
for
s
in
sources
):
self
.
line_error
(
f
"No source found with name(s): {', '.join(names)}"
)
return
1
...
...
src/poetry/utils/authenticator.py
View file @
c66178a0
...
...
@@ -384,7 +384,7 @@ class Authenticator:
logger
.
debug
(
"Multiple source configurations found for
%
s -
%
s"
,
parsed_url
.
netloc
,
", "
.
join
(
map
(
lambda
c
:
c
.
name
,
candidates
)
),
", "
.
join
(
c
.
name
for
c
in
candidates
),
)
# prefer the more specific path
candidates
.
sort
(
...
...
tests/console/commands/source/test_show.py
View file @
c66178a0
...
...
@@ -41,10 +41,9 @@ url : https://two.com
default : no
secondary : no
"""
.
splitlines
()
assert
(
list
(
map
(
lambda
l
:
l
.
strip
(),
tester
.
io
.
fetch_output
()
.
strip
()
.
splitlines
()))
==
expected
)
assert
[
line
.
strip
()
for
line
in
tester
.
io
.
fetch_output
()
.
strip
()
.
splitlines
()
]
==
expected
assert
tester
.
status_code
==
0
...
...
@@ -57,10 +56,9 @@ url : https://one.com
default : no
secondary : no
"""
.
splitlines
()
assert
(
list
(
map
(
lambda
l
:
l
.
strip
(),
tester
.
io
.
fetch_output
()
.
strip
()
.
splitlines
()))
==
expected
)
assert
[
line
.
strip
()
for
line
in
tester
.
io
.
fetch_output
()
.
strip
()
.
splitlines
()
]
==
expected
assert
tester
.
status_code
==
0
...
...
@@ -78,10 +76,9 @@ url : https://two.com
default : no
secondary : no
"""
.
splitlines
()
assert
(
list
(
map
(
lambda
l
:
l
.
strip
(),
tester
.
io
.
fetch_output
()
.
strip
()
.
splitlines
()))
==
expected
)
assert
[
line
.
strip
()
for
line
in
tester
.
io
.
fetch_output
()
.
strip
()
.
splitlines
()
]
==
expected
assert
tester
.
status_code
==
0
...
...
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