Skip to content

Commit

Permalink
fix: NameError for self reference in method
Browse files Browse the repository at this point in the history
Fix an issue where referencing the class as a type caused a NameError.

We do this by allowing forward references, see here: https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html#forward-references
  • Loading branch information
AndrewADev committed Aug 13, 2023
1 parent b9ea7ea commit dec3c8a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rps/play.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import annotations
from enum import IntEnum


Expand Down

0 comments on commit dec3c8a

Please sign in to comment.