File tree Expand file tree Collapse file tree 6 files changed +19
-15
lines changed Expand file tree Collapse file tree 6 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,16 @@ repos:
33
33
additional_dependencies : &flake8_deps
34
34
- flake8-annotations==2.9.0
35
35
- flake8-broken-line==0.4.0
36
- - flake8-bugbear==22.4.25
36
+ - flake8-bugbear==22.7.1
37
37
- flake8-comprehensions==3.10.0
38
38
- flake8-eradicate==1.2.1
39
39
- flake8-quotes==3.3.1
40
- - flake8-simplify==0.19.2
40
+ - flake8-simplify==0.19.3
41
41
- flake8-tidy-imports==4.8.0
42
- - flake8-type-checking==1.5 .0
42
+ - flake8-type-checking==2.1 .0
43
43
- flake8-typing-imports==1.12.0
44
- - flake8-use-fstring==1.3
45
- - pep8-naming==0.12 .1
44
+ - flake8-use-fstring==1.4
45
+ - pep8-naming==0.13 .1
46
46
47
47
- repo : https://github.com/asottile/pyupgrade
48
48
rev : v2.37.2
Original file line number Diff line number Diff line change @@ -24,4 +24,6 @@ def commands(self) -> list[type[Command]]:
24
24
def activate (self , application : Application ) -> None :
25
25
for command in self .commands :
26
26
assert command .name is not None
27
- application .command_loader .register_factory (command .name , lambda : command ())
27
+ application .command_loader .register_factory (
28
+ command .name , lambda : command () # noqa: B023
29
+ )
Original file line number Diff line number Diff line change @@ -670,10 +670,10 @@ def complete_package(
670
670
# - {<Package foo (1.2.3): {"bar": <Dependency bar (<2.0)>}
671
671
672
672
def fmt_warning (d : Dependency ) -> str :
673
- marker = d .marker if not d .marker .is_any () else "*"
673
+ dependency_marker = d .marker if not d .marker .is_any () else "*"
674
674
return (
675
675
f"<c1>{ d .name } </c1> <fg=default>(<c2>{ d .pretty_constraint } </c2>)</>"
676
- f" with markers <b>{ marker } </b>"
676
+ f" with markers <b>{ dependency_marker } </b>"
677
677
)
678
678
679
679
warnings = ", " .join (fmt_warning (d ) for d in deps [:- 1 ])
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ def _get_win_folder_with_ctypes(csidl_name: str) -> str:
220
220
def get_win_folder (csidl_name : str ) -> Path :
221
221
if sys .platform == "win32" :
222
222
try :
223
- from ctypes import windll # noqa: F401
223
+ from ctypes import windll # noqa: F401, TC003
224
224
225
225
_get_win_folder = _get_win_folder_with_ctypes
226
226
except ImportError :
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
+ import sys
3
4
4
- try :
5
- import zipp # nopycln: import
6
- except ImportError :
7
- import zipfile as zipp # noqa: F401, TC002
5
+
6
+ if sys .version_info < (3 , 8 ):
7
+ import zipp as zipfile # nopycln: import
8
+ else :
9
+ import zipfile # noqa: F401
8
10
9
11
try :
10
12
from typing import Protocol # nopycln: import
Original file line number Diff line number Diff line change 9
9
from poetry .repositories .installed_repository import InstalledRepository
10
10
from poetry .utils ._compat import metadata
11
11
from poetry .utils .env import MockEnv as BaseMockEnv
12
- from tests .compat import zipp
12
+ from tests .compat import zipfile
13
13
14
14
15
15
if TYPE_CHECKING :
27
27
metadata .PathDistribution (SITE_PURELIB / "cleo-0.7.6.dist-info" ),
28
28
metadata .PathDistribution (SRC / "pendulum" / "pendulum.egg-info" ),
29
29
metadata .PathDistribution (
30
- zipp .Path (str (SITE_PURELIB / "foo-0.1.0-py3.8.egg" ), "EGG-INFO" )
30
+ zipfile .Path (str (SITE_PURELIB / "foo-0.1.0-py3.8.egg" ), "EGG-INFO" )
31
31
),
32
32
metadata .PathDistribution (VENDOR_DIR / "attrs-19.3.0.dist-info" ),
33
33
metadata .PathDistribution (SITE_PURELIB / "standard-1.2.3.dist-info" ),
You can’t perform that action at this time.
0 commit comments