We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c83b5eb commit 7881981Copy full SHA for 7881981
RATapi/models.py
@@ -304,7 +304,13 @@ class CustomFile(RATModel):
304
filename: str = ""
305
function_name: str = ""
306
language: Languages = Languages.Python
307
- path: pathlib.Path = pathlib.Path(".")
+ path: pathlib.Path = pathlib.Path(".").resolve()
308
+
309
+ @field_validator("path")
310
+ @classmethod
311
+ def resolve_relative_paths(cls, path: pathlib.Path) -> pathlib.Path:
312
+ """Return the absolute path of the given path."""
313
+ return path.resolve()
314
315
def model_post_init(self, __context: Any) -> None:
316
"""Autogenerate the function name from the filename if not set.
0 commit comments