79473465

Date: 2025-02-27 17:24:39
Score: 0.5
Natty:
Report link

mysql-connector doesn't give exact type. You can use:

  1. https://mypy.readthedocs.io/en/stable/common_issues.html#spurious-errors-and-locally-silencing-the-checker

Sometimes it's ok.

holiday_date = row[ 0 ]  # type: ignore[operator]
holiday_date: date = row[ 0 ]
  1. https://docs.python.org/3/library/typing.html#typing.cast
holiday_date = cast(date, row[0])
  1. https://docs.python.org/3/library/typing.html#typing.Any
holiday_date: Any = row[ 0 ]
Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Nine Treasures