Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1089,52 +1089,52 @@ Report generation
If these flags are set, mypy will generate a report in the specified
format into the specified directory.

.. option:: --any-exprs-report DIR
.. option:: --any-exprs-report OUTPUT_DIR

Causes mypy to generate a text file report documenting how many
expressions of type ``Any`` are present within your codebase.

.. option:: --cobertura-xml-report DIR
.. option:: --cobertura-xml-report OUTPUT_DIR

Causes mypy to generate a Cobertura XML type checking coverage 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
.. option:: --html-report / --xslt-html-report OUTPUT_DIR

Causes mypy to generate an HTML type checking coverage 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
.. option:: --linecount-report OUTPUT_DIR

Causes mypy to generate a text file report documenting the functions
and lines that are typed and untyped within your codebase.

.. option:: --linecoverage-report DIR
.. option:: --linecoverage-report OUTPUT_DIR

Causes mypy to generate a JSON file that maps each source file's
absolute filename to a list of line numbers that belong to typed
functions in that file.

.. option:: --lineprecision-report DIR
.. option:: --lineprecision-report OUTPUT_DIR

Causes mypy to generate a flat text file report with per-module
statistics of how many lines are typechecked etc.

.. option:: --txt-report / --xslt-txt-report DIR
.. option:: --txt-report / --xslt-txt-report OUTPUT_DIR

Causes mypy to generate a text file type checking coverage 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
.. option:: --xml-report OUTPUT_DIR

Causes mypy to generate an XML type checking coverage report.

Expand Down
5 changes: 3 additions & 2 deletions mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,13 +1127,14 @@ def add_invertible_flag(
internals_group.add_argument("--export-ref-info", action="store_true", help=argparse.SUPPRESS)

report_group = parser.add_argument_group(
title="Report generation", description="Generate a report in the specified format."
title="Report generation",
description="Generate a report in the specified format into the specified directory.",
)
for report_type in sorted(defaults.REPORTER_NAMES):
if report_type not in {"memory-xml"}:
report_group.add_argument(
f"--{report_type.replace('_', '-')}-report",
metavar="DIR",
metavar="OUTPUT_DIR",
dest=f"special-opts:{report_type}_report",
)

Expand Down
Loading