Comments (5)
Hey thanks for filing the issue!
I was aware of this and choose not to support many (or most) of the requirement.txt
spec, because
- I did not find an easy way to support them (I think
pip
itself only offers an easy-to-use installation API, how the file is parse is internal to pip and undocumented. Actually, thepip install
command uses internal APIs, I don't think usingpip
as a lib is recommended). - I have limited time and only made what was needed for my use cases.
Please feel free to suggest ideas to support this, or open a PR. :)
from poetry-add-requirements.txt.
Please update the tool to v1.1.4 and try again. :)
from poetry-add-requirements.txt.
The new version just ignores the # and therefore treats comments as modules to install.
I would do this:
utils.py
def preprocess_line(line: str) -> str:
return line.split('#')[0].strip() # Remove comments and leading/trailing whitespace
from poetry-add-requirements.txt.
@kb- Thanks for the suggestion.
I just tested how pip 23.2.1 treats comments, and I think it ignores comment lines.
Is there any source that supports this?
The new version just ignores the # and therefore treats comments as modules to install
from poetry-add-requirements.txt.
I found the requirements-parser
project also just ignore lines that start with '#', see https://sourcegraph.com/github.com/madpah/requirements-parser/-/blob/requirements/parser.py?L62=
I think I'm gonna do just that. :)
Update: implemented in v1.4.0
from poetry-add-requirements.txt.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poetry-add-requirements.txt.