Skip to content

Commit 6f97c9f

Browse files
Spencer Bryngelsonclaude
andcommitted
Fix Python 3.9 compatibility: add from __future__ import annotations
Three toolchain files use Python 3.10+ type union syntax (int | None, str | None) which pylint flags as E1131 when running under Python 3.9. Add 'from __future__ import annotations' to enable the new syntax on Python 3.9+. Files fixed: - toolchain/mfc/gen_case_constraints_docs.py - toolchain/mfc/params/ast_analyzer.py - toolchain/mfc/params/generators/docs_gen.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c60d364 commit 6f97c9f

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

toolchain/mfc/gen_case_constraints_docs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
Also generates case design playbook from curated working examples.
99
""" # pylint: disable=too-many-lines
1010

11+
from __future__ import annotations
12+
1113
import json
1214
import sys
1315
import subprocess

toolchain/mfc/params/ast_analyzer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
and case_constraints.md).
88
"""
99

10+
from __future__ import annotations
11+
1012
import ast
1113
import re
1214
from dataclasses import dataclass, field

toolchain/mfc/params/generators/docs_gen.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
organized by family with descriptions, types, and constraints.
66
"""
77

8+
from __future__ import annotations
9+
810
from typing import Any, Dict, List, Tuple
911
from collections import defaultdict
1012
import re

0 commit comments

Comments
 (0)