Description
As discussed with @edan-bainglass.
In PR #6255, an inconsistency in the type handling of the filepath_executable
of PortableCode
was identified by the introduction of pydantic
(see here for reference).
Looking throughout the code base, we have two different type aliases for path-like types:
FilePath
also here:As well as standard type hints for paths, and combinations of the two:
aiida-core/src/aiida/repository/repository.py
Line 483 in 660fec7
While I wouldn't deem this super high priority, it might be useful to standardize those path-like annotations if possible, or at least put them in a dedicated module, e.g., aiida/common/types.py
. Also, many (probably older) parts of the codebase use os.path
(this is especially prevalent in the transport
plugins), where we could also consider switching to pathlib
at some point.