ocebuild.third_party.cpython.pathlib#

Overrides the pathlib module to support backports and custom subclasses.

Module Contents#

Classes#

Path

Provides a pathlib.Path class that can be subclassed idiomatically.

PurePath

Provides a pathlib.PurePath class that can be subclassed idiomatically.

class ocebuild.third_party.cpython.pathlib.Path(*args, **kwargs)[source]#

Bases: BasePath, Path_flavour := type(pathlib.Path())

Provides a pathlib.Path class that can be subclassed idiomatically.

TPath[source]#

Path class type alias for overriding built-in method signatures. @internal

cls_flavour[source]#
subclasses: List[Path.TPath] = [][source]#
relative(path: str | TPath = '.', from_parent: bool = False) str[source]#

Resolves a relative representation from a file or directory path.

class ocebuild.third_party.cpython.pathlib.PurePath(*args, **kwargs)[source]#

Bases: BasePath, PurePath_flavour := type(pathlib.PurePath())

Provides a pathlib.PurePath class that can be subclassed idiomatically.

TPurePath[source]#

PurePath class type alias for overriding built-in method signatures. @internal

cls_flavour[source]#
subclasses: List[PurePath.TPurePath] = [][source]#