Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Python_Packaging_Authority
pip
提交
76a13010
P
pip
项目概览
镜像
/
Python_Packaging_Authority
/
pip
12 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
pip
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
76a13010
编写于
6月 06, 2020
作者:
D
Devesh Kumar Singh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix src/pip with flake8-bugbear
上级
0dbd3938
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
18 addition
and
13 deletion
+18
-13
src/pip/_internal/cli/progress_bars.py
src/pip/_internal/cli/progress_bars.py
+3
-1
src/pip/_internal/commands/debug.py
src/pip/_internal/commands/debug.py
+2
-2
src/pip/_internal/utils/filesystem.py
src/pip/_internal/utils/filesystem.py
+2
-2
src/pip/_internal/utils/misc.py
src/pip/_internal/utils/misc.py
+5
-2
src/pip/_internal/vcs/subversion.py
src/pip/_internal/vcs/subversion.py
+1
-1
src/pip/_internal/wheel_builder.py
src/pip/_internal/wheel_builder.py
+5
-5
未找到文件。
src/pip/_internal/cli/progress_bars.py
浏览文件 @
76a13010
...
...
@@ -167,7 +167,9 @@ class DownloadProgressMixin(object):
def
iter
(
self
,
it
):
# type: ignore
for
x
in
it
:
yield
x
self
.
next
(
len
(
x
))
# B305 is incorrectly raised here
# https://github.com/PyCQA/flake8-bugbear/issues/59
self
.
next
(
len
(
x
))
# noqa: B305
self
.
finish
()
...
...
src/pip/_internal/commands/debug.py
浏览文件 @
76a13010
...
...
@@ -87,7 +87,7 @@ def get_vendor_version_from_module(module_name):
if
not
version
:
# Try to find version in debundled module info
pkg_set
=
pkg_resources
.
WorkingSet
(
[
os
.
path
.
dirname
(
getattr
(
module
,
'__file__'
))]
[
os
.
path
.
dirname
(
getattr
(
module
,
'__file__'
,
None
))]
)
package
=
pkg_set
.
find
(
pkg_resources
.
Requirement
.
parse
(
module_name
))
version
=
getattr
(
package
,
'version'
,
None
)
...
...
@@ -166,7 +166,7 @@ def show_tags(options):
def
ca_bundle_info
(
config
):
# type: (Dict[str, str]) -> str
levels
=
set
()
for
key
,
value
in
config
.
items
()
:
for
key
in
config
:
levels
.
add
(
key
.
split
(
'.'
)[
0
])
if
not
levels
:
...
...
src/pip/_internal/utils/filesystem.py
浏览文件 @
76a13010
...
...
@@ -155,7 +155,7 @@ def _test_writable_dir_win(path):
# and we can't use tempfile: http://bugs.python.org/issue22107
basename
=
'accesstest_deleteme_fishfingers_custard_'
alphabet
=
'abcdefghijklmnopqrstuvwxyz0123456789'
for
i
in
range
(
10
):
for
_
in
range
(
10
):
name
=
basename
+
''
.
join
(
random
.
choice
(
alphabet
)
for
_
in
range
(
6
))
file
=
os
.
path
.
join
(
path
,
name
)
try
:
...
...
@@ -190,7 +190,7 @@ def find_files(path, pattern):
"""Returns a list of absolute paths of files beneath path, recursively,
with filenames which match the UNIX-style shell glob pattern."""
result
=
[]
# type: List[str]
for
root
,
dirs
,
files
in
os
.
walk
(
path
):
for
root
,
_
,
files
in
os
.
walk
(
path
):
matches
=
fnmatch
.
filter
(
files
,
pattern
)
result
.
extend
(
os
.
path
.
join
(
root
,
f
)
for
f
in
matches
)
return
result
...
...
src/pip/_internal/utils/misc.py
浏览文件 @
76a13010
...
...
@@ -17,7 +17,7 @@ import stat
import
sys
from
collections
import
deque
from
pip._vendor
import
pkg_resources
from
pip._vendor
import
pkg_resources
,
six
# NOTE: retrying is not annotated in typeshed as on 2017-07-17, which is
# why we ignore the type on this import.
from
pip._vendor.retrying
import
retry
# type: ignore
...
...
@@ -548,7 +548,10 @@ class FakeFile(object):
try
:
return
next
(
self
.
_gen
)
except
NameError
:
return
self
.
_gen
.
next
()
# flake8-bugbear B305 suggests using six.next for
# Python 2 compatibility. This along with the try/except
# block can be removed once we drop Python 2 support
return
six
.
next
(
self
.
_gen
)
except
StopIteration
:
return
''
...
...
src/pip/_internal/vcs/subversion.py
浏览文件 @
76a13010
...
...
@@ -56,7 +56,7 @@ class Subversion(VersionControl):
# Note: taken from setuptools.command.egg_info
revision
=
0
for
base
,
dirs
,
files
in
os
.
walk
(
location
):
for
base
,
dirs
,
_
in
os
.
walk
(
location
):
if
cls
.
dirname
not
in
dirs
:
dirs
[:]
=
[]
continue
# no sense walking uncontrolled subdirs
...
...
src/pip/_internal/wheel_builder.py
浏览文件 @
76a13010
...
...
@@ -23,7 +23,7 @@ from pip._internal.vcs import vcs
if
MYPY_CHECK_RUNNING
:
from
typing
import
(
Any
,
Callable
,
Iterable
,
List
,
Optional
,
Pattern
,
Tuple
,
Any
,
Callable
,
Iterable
,
List
,
Optional
,
Tuple
,
)
from
pip._internal.cache
import
WheelCache
...
...
@@ -34,11 +34,11 @@ if MYPY_CHECK_RUNNING:
logger
=
logging
.
getLogger
(
__name__
)
_egg_info_re
=
re
.
compile
(
r
'([a-z0-9_.]+)-([a-z0-9_.!+-]+)'
,
re
.
IGNORECASE
)
def
_contains_egg_info
(
s
,
_egg_info_re
=
re
.
compile
(
r
'([a-z0-9_.]+)-([a-z0-9_.!+-]+)'
,
re
.
IGNORECASE
)):
# type: (str, Pattern[str]) -> bool
def
_contains_egg_info
(
s
):
# type: (str) -> bool
"""Determine whether the string looks like an egg_info.
:param s: The string to parse. E.g. foo-2.1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录