File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 5
5
from setuptools import setup
6
6
7
7
8
- def parse_reqs_in (filepath : Path , visited : Optional [set ] = None ) -> List [str ]:
8
+ def parse_reqs_in (filepath : Path , visited : Optional [set ] = None ) -> List [str ]: # noqa: C901
9
9
"""
10
10
Parse a file path containing a pip-tools requirements.in and return a list of requirements.
11
11
@@ -25,9 +25,9 @@ def parse_reqs_in(filepath: Path, visited: Optional[set] = None) -> List[str]:
25
25
visited = set ()
26
26
reqstr : str = filepath .read_text ()
27
27
reqs : List [str ] = []
28
- for line in reqstr .splitlines ():
29
- line = line .strip ()
30
- if line == "" :
28
+ for line in reqstr .splitlines (keepends = False ):
29
+ line = line .strip () # noqa: PLW2901
30
+ if not line :
31
31
continue
32
32
elif not line or line .startswith ("#" ):
33
33
# comments are lines that start with # only
You can’t perform that action at this time.
0 commit comments