Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Aug 2, 2023
1 parent 01aabbe commit 36ef266
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion vyper/ast/pre_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ def pre_parse(code: str) -> tuple[Settings, ModificationOffsets, str]:
else:
prev_token = token_list[i - 1]
raise SyntaxException(
f"Loop variable requires type annotation e.g. `for i: uint256 in ...` ", code, prev_token.start[0], prev_token.start[1]
"Loop variable requires type annotation e.g. `for i: uint256 in ...`",
code,
prev_token.start[0],
prev_token.start[1],
)

if typ == NAME:
Expand Down
6 changes: 3 additions & 3 deletions vyper/semantics/analysis/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from vyper.semantics.analysis.base import VarInfo
from vyper.semantics.analysis.common import VyperNodeVisitorBase
from vyper.semantics.analysis.utils import (
get_common_types,
get_exact_type_from_node,
get_expr_info,
get_possible_types_from_node,
Expand All @@ -39,7 +38,6 @@
DArrayT,
EventT,
HashMapT,
IntegerT,
SArrayT,
StringT,
StructT,
Expand Down Expand Up @@ -417,7 +415,9 @@ def visit_For(self, node):
]

if not type_list:
raise InvalidType(f"{iter_type} is not a possible value type of iterator", node.iter)
raise InvalidType(
f"{iter_type} is not a possible value type of iterator", node.iter
)

if isinstance(node.iter, (vy_ast.Name, vy_ast.Attribute)):
# check for references to the iterated value within the body of the loop
Expand Down

0 comments on commit 36ef266

Please sign in to comment.