Skip to content

Commit b0c4461

Browse files
authored
Add reports extra to setup.py (python#11777)
1 parent 6330a41 commit b0c4461

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

docs/source/command_line.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -853,13 +853,17 @@ format into the specified directory.
853853

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

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

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

860862
Causes mypy to generate an HTML type checking coverage report.
861863

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

864868
.. option:: --linecount-report DIR
865869

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

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

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

886892
.. option:: --xml-report DIR
887893

888894
Causes mypy to generate an XML type checking coverage report.
889895

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

892900
Miscellaneous
893901
*************

docs/source/config_file.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,15 +820,19 @@ format into the specified directory.
820820

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

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

825827
.. confval:: html_report / xslt_html_report
826828

827829
:type: string
828830

829831
Causes mypy to generate an HTML type checking coverage report.
830832

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

833837
.. confval:: linecount_report
834838

@@ -858,15 +862,19 @@ format into the specified directory.
858862

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

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

863869
.. confval:: xml_report
864870

865871
:type: string
866872

867873
Causes mypy to generate an XML type checking coverage report.
868874

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

871879

872880
Miscellaneous

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ def run(self):
201201
'tomli>=1.1.0',
202202
],
203203
# Same here.
204-
extras_require={'dmypy': 'psutil >= 4.0', 'python2': 'typed_ast >= 1.4.0, < 2'},
204+
extras_require={
205+
'dmypy': 'psutil >= 4.0',
206+
'python2': 'typed_ast >= 1.4.0, < 2',
207+
'reports': 'lxml'
208+
},
205209
python_requires=">=3.6",
206210
include_package_data=True,
207211
project_urls={

0 commit comments

Comments
 (0)