diff --git a/docs/source/command_line.rst b/docs/source/command_line.rst index 7405ab563e0d..b8b14ad61434 100644 --- a/docs/source/command_line.rst +++ b/docs/source/command_line.rst @@ -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 @@ -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 ************* diff --git a/docs/source/config_file.rst b/docs/source/config_file.rst index c34f23d9e169..11d3a31d13e3 100644 --- a/docs/source/config_file.rst +++ b/docs/source/config_file.rst @@ -820,7 +820,9 @@ 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 @@ -828,7 +830,9 @@ format into the specified directory. 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 @@ -858,7 +862,9 @@ 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 @@ -866,7 +872,9 @@ format into the specified directory. 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 diff --git a/setup.py b/setup.py index 10042279a446..00d207b51ca2 100644 --- a/setup.py +++ b/setup.py @@ -199,7 +199,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={