diff --git a/setup.py b/setup.py index 4ec2156971..89f09803fd 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ 'lint': [ 'flake8>=3.5.0', 'isort', - 'mypy>=0.950', + 'mypy>=0.971', 'docutils-stubs', "types-typed-ast", "types-requests", diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py index 37fa672afb..a062a7d594 100644 --- a/sphinx/util/logging.py +++ b/sphinx/util/logging.py @@ -77,7 +77,7 @@ def convert_serializable(records: List[logging.LogRecord]) -> None: location = getattr(r, 'location', None) if isinstance(location, nodes.Node): - r.location = get_node_location(location) # type: ignore + r.location = get_node_location(location) class SphinxLogRecord(logging.LogRecord): @@ -431,7 +431,7 @@ class DisableWarningIsErrorFilter(logging.Filter): """Disable WarningIsErrorFilter if this filter installed.""" def filter(self, record: logging.LogRecord) -> bool: - record.skip_warningsiserror = True # type: ignore + record.skip_warningsiserror = True return True