mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
More precise types in preserve_defaults.py (#12385)
This commit is contained in:
parent
a51331c4b7
commit
6ce4f96c85
@ -109,7 +109,7 @@ def _get_arguments_inner(x: Any, /) -> ast.arguments | None:
|
||||
return None
|
||||
|
||||
|
||||
def get_default_value(lines: list[str], position: ast.AST) -> str | None:
|
||||
def get_default_value(lines: list[str], position: ast.expr) -> str | None:
|
||||
try:
|
||||
if position.lineno == position.end_lineno:
|
||||
line = lines[position.lineno - 1]
|
||||
|
Loading…
Reference in New Issue
Block a user