FHPythonUtils/LicenseCheck

Bug: comments inside requirements.txt crash licensecheck

PashaWNN opened this issue · 2 comments

Issue Details

If there are comments in requirements file, check fails with packaging.requirements.InvalidRequirement

Description

For example, there is a line in core/requirements.in:

celery==5.2.7  # run common/celery/strategy.py after updating

Expected Behavior

Check runs ok

Actual Behavior

packaging.requirements.InvalidRequirement: Expected end or semicolon (after version specifier)
    celery==5.2.7  # run common/celery/strategy.py after updating
          ~~~~~~~~~^

System Information

  • Operating System (OS): MacOS
  • OS Version: 14.5
  • Project Version (if applicable): 2024.2

The latest commit ba70665 adds a new resolver which should solve this issue. I need to work out how to enable this (my concern is adding too many options to the cli - many I've previously added are already frustrating to me )

Shortly I'll add some tests to confirm this has fixed your issue. Thanks :)