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
85b29df0
Commit
85b29df0
authored
Sep 15, 2021
by
Daniel Eades
Committed by
Arun Babu Neelicattu
Oct 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use flake8-bugbear for linting
parent
ee67aa8c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
13 deletions
+20
-13
.pre-commit-config.yaml
+1
-0
poetry/console/commands/cache/clear.py
+1
-1
poetry/puzzle/provider.py
+2
-2
poetry/repositories/pool.py
+1
-1
poetry/utils/env.py
+2
-2
poetry/utils/helpers.py
+1
-1
sonnet
+1
-1
tests/console/commands/env/helpers.py
+5
-2
tests/repositories/test_pypi_repository.py
+1
-1
tests/utils/test_env.py
+5
-2
No files found.
.pre-commit-config.yaml
View file @
85b29df0
...
...
@@ -8,6 +8,7 @@ repos:
rev
:
3.8.4
hooks
:
-
id
:
flake8
additional_dependencies
:
[
flake8-bugbear
]
-
repo
:
https://github.com/timothycrosley/isort
rev
:
5.7.0
...
...
poetry/console/commands/cache/clear.py
View file @
85b29df0
...
...
@@ -52,7 +52,7 @@ class CacheClearCommand(Command):
# Calculate number of entries
entries_count
=
0
for
path
,
dirs
,
files
in
os
.
walk
(
str
(
cache_dir
)):
for
_path
,
_
dirs
,
files
in
os
.
walk
(
str
(
cache_dir
)):
entries_count
+=
len
(
files
)
delete
=
self
.
confirm
(
...
...
poetry/puzzle/provider.py
View file @
85b29df0
...
...
@@ -618,8 +618,8 @@ class Provider:
# - {<Package foo (1.2.3): {"bar": <Dependency bar (>=2.0)>}
# - {<Package foo (1.2.3): {"bar": <Dependency bar (<2.0)>}
markers
=
[]
for
constraint
,
_deps
in
by_constraint
.
item
s
():
markers
.
append
(
_
deps
[
0
]
.
marker
)
for
deps
in
by_constraint
.
value
s
():
markers
.
append
(
deps
[
0
]
.
marker
)
_deps
=
[
_dep
[
0
]
for
_dep
in
by_constraint
.
values
()]
self
.
debug
(
...
...
poetry/repositories/pool.py
View file @
85b29df0
...
...
@@ -138,7 +138,7 @@ class Pool(BaseRepository):
except
PackageNotFound
:
pass
else
:
for
idx
,
repo
in
enumerate
(
self
.
_repositories
)
:
for
repo
in
self
.
_repositories
:
try
:
package
=
repo
.
package
(
name
,
version
,
extras
=
extras
)
except
PackageNotFound
:
...
...
poetry/utils/env.py
View file @
85b29df0
...
...
@@ -1487,8 +1487,8 @@ class SystemEnv(Env):
paths
[
key
]
=
getattr
(
obj
,
f
"install_{key}"
)
if
site
.
check_enableusersite
()
and
hasattr
(
obj
,
"install_usersite"
):
paths
[
"usersite"
]
=
getattr
(
obj
,
"install_usersite"
)
paths
[
"userbase"
]
=
getattr
(
obj
,
"install_userbase"
)
paths
[
"usersite"
]
=
obj
.
install_usersite
paths
[
"userbase"
]
=
obj
.
install_userbase
return
paths
...
...
poetry/utils/helpers.py
View file @
85b29df0
...
...
@@ -82,7 +82,7 @@ def safe_rmtree(path: str) -> None:
def
merge_dicts
(
d1
:
Dict
,
d2
:
Dict
)
->
None
:
for
k
,
v
in
d2
.
item
s
():
for
k
in
d2
.
key
s
():
if
k
in
d1
and
isinstance
(
d1
[
k
],
dict
)
and
isinstance
(
d2
[
k
],
Mapping
):
merge_dicts
(
d1
[
k
],
d2
[
k
])
else
:
...
...
sonnet
View file @
85b29df0
...
...
@@ -159,7 +159,7 @@ class MakeReleaseCommand(Command):
fileobj
=
gz
,
format
=
tarfile
.
PAX_FORMAT
,
)
as
tar
:
for
root
,
dirs
,
files
in
os
.
walk
(
tmp_dir
):
for
root
,
_
dirs
,
files
in
os
.
walk
(
tmp_dir
):
for
f
in
files
:
if
f
.
endswith
(
".pyc"
):
continue
...
...
tests/console/commands/env/helpers.py
View file @
85b29df0
...
...
@@ -5,11 +5,14 @@ from typing import Union
from
poetry.core.semver.version
import
Version
def
build_venv
(
path
:
Union
[
Path
,
str
],
**
_
:
Any
)
->
():
VERSION_3_7_1
=
Version
.
parse
(
"3.7.1"
)
def
build_venv
(
path
:
Union
[
Path
,
str
],
**
_
:
Any
)
->
None
:
Path
(
path
)
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
def
check_output_wrapper
(
version
=
V
ersion
.
parse
(
"3.7.1"
)
):
def
check_output_wrapper
(
version
=
V
ERSION_3_7_1
):
def
check_output
(
cmd
,
*
_
,
**
__
):
if
"sys.version_info[:3]"
in
cmd
:
return
version
.
text
...
...
tests/repositories/test_pypi_repository.py
View file @
85b29df0
...
...
@@ -191,7 +191,7 @@ def test_pypi_repository_supports_reading_bz2_files():
]
}
for
name
,
deps
in
expected_extras
.
item
s
():
for
name
in
expected_extras
.
key
s
():
assert
expected_extras
[
name
]
==
sorted
(
package
.
extras
[
name
],
key
=
lambda
r
:
r
.
name
)
...
...
tests/utils/test_env.py
View file @
85b29df0
...
...
@@ -120,11 +120,14 @@ def test_env_get_venv_with_venv_folder_present(
assert
venv
.
path
==
in_project_venv_dir
def
build_venv
(
path
:
Union
[
Path
,
str
],
**
__
:
Any
)
->
()
:
def
build_venv
(
path
:
Union
[
Path
,
str
],
**
__
:
Any
)
->
None
:
os
.
mkdir
(
str
(
path
))
def
check_output_wrapper
(
version
=
Version
.
parse
(
"3.7.1"
)):
VERSION_3_7_1
=
Version
.
parse
(
"3.7.1"
)
def
check_output_wrapper
(
version
=
VERSION_3_7_1
):
def
check_output
(
cmd
,
*
args
,
**
kwargs
):
if
"sys.version_info[:3]"
in
cmd
:
return
version
.
text
...
...
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