mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #10693 from tk0miya/mypy-0.971
Fix mypy violations (with mypy-0.971)
This commit is contained in:
commit
94f62e7f2b
2
setup.py
2
setup.py
@ -41,7 +41,7 @@ extras_require = {
|
|||||||
'lint': [
|
'lint': [
|
||||||
'flake8>=3.5.0',
|
'flake8>=3.5.0',
|
||||||
'isort',
|
'isort',
|
||||||
'mypy>=0.950',
|
'mypy>=0.971',
|
||||||
'docutils-stubs',
|
'docutils-stubs',
|
||||||
"types-typed-ast",
|
"types-typed-ast",
|
||||||
"types-requests",
|
"types-requests",
|
||||||
|
@ -77,7 +77,7 @@ def convert_serializable(records: List[logging.LogRecord]) -> None:
|
|||||||
|
|
||||||
location = getattr(r, 'location', None)
|
location = getattr(r, 'location', None)
|
||||||
if isinstance(location, nodes.Node):
|
if isinstance(location, nodes.Node):
|
||||||
r.location = get_node_location(location) # type: ignore
|
r.location = get_node_location(location)
|
||||||
|
|
||||||
|
|
||||||
class SphinxLogRecord(logging.LogRecord):
|
class SphinxLogRecord(logging.LogRecord):
|
||||||
@ -431,7 +431,7 @@ class DisableWarningIsErrorFilter(logging.Filter):
|
|||||||
"""Disable WarningIsErrorFilter if this filter installed."""
|
"""Disable WarningIsErrorFilter if this filter installed."""
|
||||||
|
|
||||||
def filter(self, record: logging.LogRecord) -> bool:
|
def filter(self, record: logging.LogRecord) -> bool:
|
||||||
record.skip_warningsiserror = True # type: ignore
|
record.skip_warningsiserror = True
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user