Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mypy override check #846

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ disable_error_code = [
"misc",
"name-defined",
"operator",
"override",
"return-value",
"union-attr",
"var-annotated",
Expand Down
4 changes: 2 additions & 2 deletions src/api/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def _visit_LABEL(self, node):
else:
yield node

def generic_visit(self, node: symbols.SYMBOL):
def generic_visit(self, node: Ast):
for i, child in enumerate(node.children):
node.children[i] = yield ToVisit(child)

Expand Down Expand Up @@ -489,7 +489,7 @@ class VariableVisitor(GenericVisitor):
_parent_variable = None
_visited: set[symbols.SYMBOL] = set()

def generic_visit(self, node: symbols.SYMBOL):
def generic_visit(self, node: Ast):
if node not in VariableVisitor._visited:
VariableVisitor._visited.add(node)
for i in range(len(node.children)):
Expand Down
2 changes: 1 addition & 1 deletion src/arch/zxnext/backend/_8bit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from src.arch.interface.quad import Quad
from src.arch.z80.backend import Bits8 as Z80Bits8
from src.arch.z80.backend.common import _int_ops
from src.arch.z80.backend.quad import Quad


class Bits8(Z80Bits8):
Expand Down
2 changes: 1 addition & 1 deletion src/symbols/string_.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __str__(self):
def __repr__(self):
return '"%s"' % str(self)

def __eq__(self, other: str | SymbolSTRING):
def __eq__(self, other: object):
if isinstance(other, str):
return self.value == other

Expand Down