Skip to content

Commit cb17971

Browse files
jscarfo11jhcole
authored andcommitted
Fix 'raise_input_error' inline with the bugfix in python/cpython#102978
1 parent 2d44eff commit cb17971

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "generic-grader"
7-
version = "0.1.20"
7+
version = "0.1.21"
88
authors = [
99
{ name = "John Cole", email = "[email protected]" },
1010
{ name = "Jack Scarfo", email = "[email protected]" },

src/generic_grader/utils/importer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class InputError(Exception):
1919
"""Custom Exception type."""
2020

2121
@classmethod
22-
def raise_input_error(cls):
22+
def raise_input_error(cls, *args, **kwargs):
2323
"""Raise our custom exception."""
2424
raise cls.InputError()
2525

tests/utils/test_importer.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ def test_ignores_function_input(fix_syspath):
6868
"message": "Stuck at call to `input()` while importing `fake_func`",
6969
"object": "fake_func",
7070
},
71+
{
72+
# Tests the except block on line 51
73+
"module": "fake_module",
74+
"error": Importer.InputError,
75+
"text": "input('foo', bar='spam')\nfake_func = lambda: None",
76+
"message": "Stuck at call to `input()` while importing `fake_func`",
77+
"object": "fake_func",
78+
},
7179
{
7280
# Tests the except block on line 65
7381
"module": "fake_module",

0 commit comments

Comments
 (0)