Bug: Handle both single and double quotes in extras specification
Closed this issue · 2 comments
Before You Begin
Before proceeding, please make sure to follow these steps:
- I have checked for similar issues in the project's issue tracker.
- I have searched closed issues to see if a similar problem was reported
before.
Issue Details
Description
The current logic only accounts for single quotes instead of handling both '
(single quotes) and "
(double quotes) when parsing the extras specification. For example, when parsing the extras for typer
, all option extras are also being included by default as a dependency.
Expected Behavior
Contents of my requirements.txt
:
typer
When I just specify the single typer
package as a sole dependency in requirements.txt, I expect only the core dependencies to be included (i.e. {'TYPING-EXTENSIONS', 'TYPER', 'CLICK'}
).
Actual Behavior
All the optional packages are included too (i.e. {'MKDOCS', 'TYPING-EXTENSIONS', 'PYTEST-COV', 'PYTEST-SUGAR', 'COLORAMA', 'MKDOCS-MATERIAL', 'FLAKE8', 'PILLOW', 'MDX-INCLUDE', 'SHELLINGHAM', 'COVERAGE', 'CLICK', 'AUTOFLAKE', 'TYPER', 'MYPY', 'ISORT', 'BLACK', 'RICH', 'PYTEST', 'PRE-COMMIT', 'PYTEST-XDIST', 'CAIROSVG'}
).
System Information
Please provide the following additional information about your system or
environment:
- Python Version: 3.8.10
- Operating System (OS):
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
- Project Version (if applicable): HEAD of
master
@15cc02a0c636c5e0caac505d6bfcfd70e17871e9
@FredHappyface Thanks again for this great tool ! I have got a PR up for this issue here #64 Could you please have a look when you get the chance ? And, if it would be an acceptable fix, could you please let me know as to when might it be possible to generate a new release ? TIA!
@FredHappyface Would be great to have a release with this fix. Could you please review the proposed PR here #64 when you get the chance ? TIA!