Added reporting extras option to setup.py #11777
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Today, I was looking at the Report generation docs, and noticed
lxml
is listed as an additional requirement. I thought it would be nice to add as an extra to mypy'ssetup.py
.This way, inside a
requirements-dev.txt
, someone can includemypy[reporting]
and havelxml
installed.One thing to note: a comment in
setup.py
says this:# When changing this, also update mypy-requirements.txt.
NOTE: I did not update
mypy-requirements.txt
, as I belive extra requirements don't belong there. This will be up to the PR reviewer if he/she wants to addlxml
tomypy-requirements.txt
.NOTE 2: I did not pin
lxml
. I only tested this to work withlxml==4.7.1
.Test Plan
Here is how I verified my change works.
pip install -e "git+ssh://[email protected]/jamesbraza/mypy.git@reporting#egg=mypy" pip list
outputs:
then
pip install -e "git+ssh://[email protected]/jamesbraza/mypy.git@reporting#egg=mypy[reporting]" pip list
outputs:
I also ran the tests as documented in
CONTRIBUTING.md
.