Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pscript/commonast.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
if docheck:
assert not hasattr(self, "__dict__"), "Nodes must have __slots__"
assert self.__class__ is not Node, "Node is an abstract class"
for name, val in zip(names, args):

Check failure on line 94 in pscript/commonast.py

View workflow job for this annotation

GitHub Actions / Linting

Ruff (B905)

pscript/commonast.py:94:30: B905 `zip()` without an explicit `strict=` parameter
assert not isinstance(val, ast.AST)
if name == "name":
assert isinstance(val, (str, NoneType)), "name not a string"
Expand All @@ -110,7 +110,7 @@
isinstance(val, list) and all(isinstance(n, Node) for n in val)
)
# Assign
for name, val in zip(names, args):

Check failure on line 113 in pscript/commonast.py

View workflow job for this annotation

GitHub Actions / Linting

Ruff (B905)

pscript/commonast.py:113:26: B905 `zip()` without an explicit `strict=` parameter
setattr(self, name, val)

def tojson(self, indent=2):
Expand Down Expand Up @@ -1032,7 +1032,7 @@

def _convert_index_like(self, n):
c = self._convert
if isinstance(n, (ast.Slice, ast.Index, ast.ExtSlice, ast.Ellipsis)):
if isinstance(n, (ast.Slice, ast.Index, ast.ExtSlice, ast.Constant)):
return c(n) # Python < 3.8 (and also 3.8 on Windows?)
elif isinstance(n, ast.Tuple):
assert isinstance(n, ast.Tuple)
Expand Down
Loading