Lincoln Gombedza commited on
Commit
0657abd
·
1 Parent(s): 27cf88f

fix: remove Python 3.10+ type hint syntax for HF Spaces compatibility

Browse files
Files changed (2) hide show
  1. questions/bank.py +3 -3
  2. streamlit_app.py +1 -1
questions/bank.py CHANGED
@@ -690,9 +690,9 @@ def get_categories() -> list[str]:
690
 
691
 
692
  def filter_questions(
693
- categories: list[str] | None = None,
694
- difficulty: str | None = None,
695
- qtype: str | None = None,
696
  ) -> list[dict]:
697
  qs = QUESTIONS
698
  if categories:
 
690
 
691
 
692
  def filter_questions(
693
+ categories=None,
694
+ difficulty=None,
695
+ qtype=None,
696
  ) -> list[dict]:
697
  qs = QUESTIONS
698
  if categories:
streamlit_app.py CHANGED
@@ -78,7 +78,7 @@ def _diff_badge(diff: str) -> str:
78
  return f'<span class="{css}">{label}</span>'
79
 
80
 
81
- def render_question(q: dict, idx: int, key_prefix: str, show_answer: bool = False) -> int | list | None:
82
  """Render a question card. Returns the user's answer or None."""
83
  qtype = q["type"]
84
 
 
78
  return f'<span class="{css}">{label}</span>'
79
 
80
 
81
+ def render_question(q: dict, idx: int, key_prefix: str, show_answer: bool = False):
82
  """Render a question card. Returns the user's answer or None."""
83
  qtype = q["type"]
84