style(sports): variable annotations instead of type comments

pyflakes (Codacy) does not read "# type:" comments, so it flagged the
Optional and List imports they use as unused (F401). Inline annotations say
the same to mypy. The drift-report normaliser, which the stage 4 parity test
shares, now treats "x: T = v" as "x = v" -- it already dropped annotations
elsewhere -- so the core copies still match the plugins' plain assignments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chuck
2026-10-01 08:31:48 -04:00
co-authored by Claude Opus 5.5
parent 5ce5ead307
commit 199b2cff85
3 changed files with 11 additions and 3 deletions
+8
View File
@@ -140,6 +140,14 @@ class _Canonical(ast.NodeTransformer):
node.annotation = None
return node
def visit_AnnAssign(self, node):
# ``x: T = v`` is ``x = v``; a bare ``x: T`` does nothing at runtime.
self.generic_visit(node)
if node.value is None:
return None
return ast.copy_location(
ast.Assign(targets=[node.target], value=node.value), node)
class _Folded(_Canonical):
"""Canonical, plus sport names folded out of identifiers and strings."""