Skip to content

Commit 602301c

Browse files
committed
fix: support Python 3.9 annotations
Coding-Agent: Codex Codex-Version: codex-cli 0.151.0 Model: gpt-5.6-sol Reasoning-Effort: xhigh
1 parent 672d6d2 commit 602301c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dpgen/generator/arginfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import textwrap
2-
from typing import Union
2+
from typing import Optional, Union
33

44
from dargs import Argument, Variant
55
from dargs.dargs import ArgumentValueError
@@ -1120,7 +1120,7 @@ def has_required_generated_keys(params):
11201120
class _FpStyleVariant(Variant):
11211121
"""Validate cross-field requirements for first-principles backends."""
11221122

1123-
def get_choice(self, argdict: dict, path: list[str] | None = None) -> Argument:
1123+
def get_choice(self, argdict: dict, path: Optional[list[str]] = None) -> Argument:
11241124
"""Return the selected backend after validating PWmat input sources.
11251125
11261126
Dargs flattens variant fields into their parent mapping, so a regular

0 commit comments

Comments
 (0)