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': [
|
||||
'flake8>=3.5.0',
|
||||
'isort',
|
||||
'mypy>=0.950',
|
||||
'mypy>=0.971',
|
||||
'docutils-stubs',
|
||||
"types-typed-ast",
|
||||
"types-requests",
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user