enthought / enthought/traits

New trait type for pathlib.Path objects

Open
#876 0 comments 0 reactions 1 assignee Claimed by @shoeb-github View on GitHub
type: enhancement
Dominant language
Python
Stars
462
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Just like we have special trait types for `datetime` classes, there is a case to be made for having a special trait type for `pathlib.Path` instances above and beyond `Instance(Path)`:

- we want special editors to be available for paths
- we would like to be able to enforce additional constraints, such as the `Path` referring to a directory, or insisting that the file exist

This should go hand-in-hand with a corresponding editor or editors in TraitsUI.

The long term intent is that this should be a better replacement for `File` and `Directory` traits. See also #873.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.