Skip to content

Commit

Permalink
Add reports extra to setup.py (python#11777)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbraza committed Jan 2, 2022
1 parent 6330a41 commit b0c4461
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
16 changes: 12 additions & 4 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -853,13 +853,17 @@ format into the specified directory.

Causes mypy to generate a Cobertura XML type checking coverage report.

You must install the `lxml`_ library to generate this report.
To generate this report, you must either manually install the `lxml`_
library or specify mypy installation with the setuptools extra
``mypy[reports]``.

.. option:: --html-report / --xslt-html-report DIR

Causes mypy to generate an HTML type checking coverage report.

You must install the `lxml`_ library to generate this report.
To generate this report, you must either manually install the `lxml`_
library or specify mypy installation with the setuptools extra
``mypy[reports]``.

.. option:: --linecount-report DIR

Expand All @@ -881,13 +885,17 @@ format into the specified directory.

Causes mypy to generate a text file type checking coverage report.

You must install the `lxml`_ library to generate this report.
To generate this report, you must either manually install the `lxml`_
library or specify mypy installation with the setuptools extra
``mypy[reports]``.

.. option:: --xml-report DIR

Causes mypy to generate an XML type checking coverage report.

You must install the `lxml`_ library to generate this report.
To generate this report, you must either manually install the `lxml`_
library or specify mypy installation with the setuptools extra
``mypy[reports]``.

Miscellaneous
*************
Expand Down
16 changes: 12 additions & 4 deletions docs/source/config_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -820,15 +820,19 @@ format into the specified directory.

Causes mypy to generate a Cobertura XML type checking coverage report.

You must install the `lxml`_ library to generate this report.
To generate this report, you must either manually install the `lxml`_
library or specify mypy installation with the setuptools extra
``mypy[reports]``.

.. confval:: html_report / xslt_html_report

:type: string

Causes mypy to generate an HTML type checking coverage report.

You must install the `lxml`_ library to generate this report.
To generate this report, you must either manually install the `lxml`_
library or specify mypy installation with the setuptools extra
``mypy[reports]``.

.. confval:: linecount_report

Expand Down Expand Up @@ -858,15 +862,19 @@ format into the specified directory.

Causes mypy to generate a text file type checking coverage report.

You must install the `lxml`_ library to generate this report.
To generate this report, you must either manually install the `lxml`_
library or specify mypy installation with the setuptools extra
``mypy[reports]``.

.. confval:: xml_report

:type: string

Causes mypy to generate an XML type checking coverage report.

You must install the `lxml`_ library to generate this report.
To generate this report, you must either manually install the `lxml`_
library or specify mypy installation with the setuptools extra
``mypy[reports]``.


Miscellaneous
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ def run(self):
'tomli>=1.1.0',
],
# Same here.
extras_require={'dmypy': 'psutil >= 4.0', 'python2': 'typed_ast >= 1.4.0, < 2'},
extras_require={
'dmypy': 'psutil >= 4.0',
'python2': 'typed_ast >= 1.4.0, < 2',
'reports': 'lxml'
},
python_requires=">=3.6",
include_package_data=True,
project_urls={
Expand Down

0 comments on commit b0c4461

Please sign in to comment.