deptry correctly ignores lines that start with `# ` in requirements.txt, but not ones that just start with `#`
wyattscarpenter opened this issue · 1 comments
deptry correctly ignores lines that start with #
requirements.txt, but not ones that just start with #
For instance, a line # dev-only requirements (tooling)
is correctly ignored by deptry, producing no output, but a line #dev-only requirements (tooling)
produces the erroneous error message requirements.txt: DEP002 '#dev-only' defined as a dependency but not used in the codebase
. This is in contrast to https://pip.pypa.io/en/stable/reference/requirements-file-format/#comments, which specifies: "A line that begins with # is treated as a comment and ignored."
System info:
deptry 0.13.0
Windows 10 ( Microsoft Windows [Version 10.0.19045.3930] )
Python 3.11.0
Thanks for raising this! I will look into it later today.