Skip to content

Commit

Permalink
fix python 3.8 compat again?!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLydike committed Oct 9, 2023
1 parent bcdafbb commit da377c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions riscemu/core/registers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

from collections import defaultdict
from typing import Union
from typing import Union, Type

from ..helpers import *

Expand Down Expand Up @@ -85,7 +85,7 @@ class Registers:
}

flen: int
_float_type: type[BaseFloat]
_float_type: Type[BaseFloat]

def __init__(self, infinite_regs: bool = False, flen: int = 32):
self.vals: dict[str, Int32] = defaultdict(UInt32)
Expand Down
4 changes: 2 additions & 2 deletions riscemu/instructions/float_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import ClassVar, Generic, TypeVar, Tuple, Iterable, Callable
from typing import ClassVar, Generic, TypeVar, Tuple, Iterable, Callable, Type

from .instruction_set import InstructionSet, Instruction
from riscemu.core import BaseFloat, CPU, INS_NOT_IMPLEMENTED, UInt32
Expand All @@ -8,7 +8,7 @@

class FloatArithBase(Generic[_FloatT], InstructionSet):
flen: ClassVar[int]
_float_cls: ClassVar[type[BaseFloat]]
_float_cls: ClassVar[Type[BaseFloat]]

def __init__(self, cpu: CPU):
assert cpu.regs.flen >= self.flen, "{} implies cpu flen of at least {}".format(
Expand Down

0 comments on commit da377c0

Please sign in to comment.