mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 21:16:54 +00:00
Fix type hint for build_ast
`ast.parse` returns an `ast.Module` in its default mode, 'exec':
3ce5502675/stdlib/ast.pyi (L159-L167)
Therefore this type hint can be more specific.
This commit is contained in:
parent
542145fb7c
commit
6fa7937438
1 changed files with 1 additions and 1 deletions
|
|
@ -218,7 +218,7 @@ class FileProcessor:
|
|||
(previous_row, previous_column) = end
|
||||
return comments, logical, mapping
|
||||
|
||||
def build_ast(self) -> ast.AST:
|
||||
def build_ast(self) -> ast.Module:
|
||||
"""Build an abstract syntax tree from the list of lines."""
|
||||
return ast.parse("".join(self.lines))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue