Skip to content

Commit

Permalink
Use StrEnum instead of Enum
Browse files Browse the repository at this point in the history
  • Loading branch information
MSK61 committed Apr 26, 2024
1 parent c7b8607 commit 295fe70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/processor_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
#
# author: Mohammed El-Afifi (ME)
#
# environment: Visual Studio Code 1.86.1, python 3.11.7, Fedora release
# 39 (Thirty Nine)
# environment: Visual Studio Code 1.88.1, python 3.11.9, Fedora release
# 40 (Forty)
#
# notes: This is a private program.
#
Expand Down Expand Up @@ -116,7 +116,7 @@ def __str__(self) -> str:
`self` is this instruction position.
"""
return f"{self._stalled.value}:{self._unit}"
return f"{self._stalled}:{self._unit}"

_unit: object

Expand Down
6 changes: 3 additions & 3 deletions src/sim_services/sim_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#
# author: Mohammed El-Afifi (ME)
#
# environment: Visual Studio Code 1.86.1, python 3.11.7, Fedora release
# 39 (Thirty Nine)
# environment: Visual Studio Code 1.88.1, python 3.11.9, Fedora release
# 40 (Forty)
#
# notes: This is a private program.
#
Expand All @@ -44,7 +44,7 @@
import attr


class StallState(enum.Enum):
class StallState(enum.StrEnum):
"""Instruction stalling state"""

NO_STALL: Final = "U"
Expand Down

0 comments on commit 295fe70

Please sign in to comment.