Skip to content

Commit 181f447

Browse files
authored
address pyrefly error related to importlib.resources.files() (#2722)
1 parent bfc9e52 commit 181f447

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/prophet/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ class CmdStanPyBackend(IStanBackend):
125125
def __init__(self) -> None:
126126
import cmdstanpy
127127
# this must be set before super.__init__() for load_model to work on Windows
128-
local_cmdstan = importlib.resources.files("prophet") / "stan_model" / f"cmdstan-{self.CMDSTAN_VERSION}"
128+
local_cmdstan = cast(
129+
pathlib.Path,
130+
importlib.resources.files("prophet") / "stan_model" / f"cmdstan-{self.CMDSTAN_VERSION}",
131+
)
129132
if local_cmdstan.exists():
130133
cmdstanpy.set_cmdstan_path(str(local_cmdstan))
131134
super().__init__()

0 commit comments

Comments
 (0)