Skip to content

Commit

Permalink
no typing aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Dec 10, 2024
1 parent 5229f84 commit d9ad068
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions modflow_devtools/dfn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
from pathlib import Path
from typing import (
Any,
Dict,
List,
Literal,
Optional,
Tuple,
TypedDict,
Union,
)
Expand Down Expand Up @@ -58,9 +55,9 @@ def _try_parse_bool(value: Any) -> Any:
"""DFN format version number."""


Vars = Dict[str, "Var"]
Refs = Dict[str, "Ref"]
Dfns = Dict[str, "Dfn"]
Vars = dict[str, "Var"]
Refs = dict[str, "Ref"]
Dfns = dict[str, "Dfn"]


class Var(TypedDict):
Expand Down Expand Up @@ -107,7 +104,7 @@ class Dfn(TypedDict):
"""

@staticmethod
def _load_v1_flat(f, common: Optional[dict] = None) -> Tuple[Mapping, List[str]]:
def _load_v1_flat(f, common: Optional[dict] = None) -> tuple[Mapping, list[str]]:
var = {}
flat = []
meta = []
Expand Down Expand Up @@ -195,7 +192,7 @@ def _load_v1(cls, f, name, **kwargs) -> "Dfn":
# load dfn as flat multidict + str metadata
flat, meta = Dfn._load_v1_flat(f, **kwargs)

def _load_variable(var: Dict[str, Any]) -> Var:
def _load_variable(var: dict[str, Any]) -> Var:
"""
Convert an input variable from its original representation
in a definition file to a structured, Python-friendly form.
Expand Down

0 comments on commit d9ad068

Please sign in to comment.