Skip to content
Merged
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
14 changes: 1 addition & 13 deletions grader/grader.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,6 @@ def format_have_applied(person, width=3):
'OVERQUALIFIED': -650,
}

def equal(a, b):
# Fuck people who designed this nan != nan crap.
# Fuck people who implemented it in Python like blind sheep.
if isinstance(a, float) and isinstance(b, float):
if np.isnan(a) == np.isnan(b):
return True
if np.isnan(a) != np.isnan(b):
return False
# use normal comparison otherwise
return a == b


class GradingMoves(enum.Enum):
BACK = enum.auto()
SKIP = enum.auto()
Expand Down Expand Up @@ -738,7 +726,7 @@ def is_valid_score(choice):
case _:
print('illegal value: {}'.format(choice))

if not equal(valid_choice, default):
if valid_choice != default:
self._set_grading(person, valid_choice)
return GradingMoves.NEXT

Expand Down