Skip to content

Commit

Permalink
Improves namedtuple definition (#2501)
Browse files Browse the repository at this point in the history
I am working on new `mypy` feature and it identified a problem with your `namedtuple` definitions.
python/mypy#11206 (comment)

By standard first string arg should match variable name.
  • Loading branch information
sobolevn committed Nov 8, 2021
1 parent 522f8ba commit 6e036f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manticore/native/cpu/aarch64.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Aarch64InvalidInstruction(CpuException):


# See "C1.2.4 Condition code".
Condspec = collections.namedtuple("CondSpec", "inverse func")
Condspec = collections.namedtuple("Condspec", "inverse func")
COND_MAP = {
cs.arm64.ARM64_CC_EQ: Condspec(cs.arm64.ARM64_CC_NE, lambda n, z, c, v: z == 1),
cs.arm64.ARM64_CC_NE: Condspec(cs.arm64.ARM64_CC_EQ, lambda n, z, c, v: z == 0),
Expand Down Expand Up @@ -76,7 +76,7 @@ class Aarch64InvalidInstruction(CpuException):


class Aarch64RegisterFile(RegisterFile):
Regspec = collections.namedtuple("RegSpec", "parent size")
Regspec = collections.namedtuple("Regspec", "parent size")

# Register table.
_table = {}
Expand Down

0 comments on commit 6e036f3

Please sign in to comment.