aboutcode-org / pip-requirements-parser

a mostly correct pip requirements parsing library
MIT License
20 stars 10 forks source link

`RequirementsFile.from_string()` results in `NameError: name 'Path' is not defined` #16

Open wch opened 1 year ago

wch commented 1 year ago

I get this error when calling RequirementsFile.from_string():

  File "/..../venv/lib/python3.9/site-packages/pip_requirements_parser.py", line 269, in from_string
    tmpdir = Path(str(tempfile.mkdtemp()))
NameError: name 'Path' is not defined

I think the code needs from pathlib import Path.

pombredanne commented 1 year ago

@wch good catch! Can I interest you in a PR?