Skip to content

Commit

Permalink
test: fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 28, 2024
1 parent b3473f3 commit df2db4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pysr/expression_specs.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import copy
import sys
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Any, Dict, List, NewType, Optional

try:
if sys.version_info >= (3, 10):
from typing import TypeAlias
except ImportError:
else:
from typing_extensions import TypeAlias

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion pysr/sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ def from_file(
assert unary_operators is None
assert n_features_in is None
with open(pkl_filename, "rb") as f:
model: "pysr.sr.PySRRegressor" = pkl.load(f)
model: "PySRRegressor" = pkl.load(f)

# Update any parameters if necessary, such as
# extra_sympy_mappings:
Expand Down

0 comments on commit df2db4a

Please sign in to comment.