pyblish / pyblish-base

Pyblish base library - see https://github.com/pyblish/pyblish for details.
Other
123 stars 60 forks source link

add path support #378

Closed hannesdelbeke closed 2 years ago

hannesdelbeke commented 2 years ago

python 3 introduced pathlib, resulting in faster and cleaner code. this is also available in python 2 if manually installed

it would be great if we can support path input in pyblish, to prevent a string conversion for evey pyblish command

so i can input my paths directly in register_plugin_path pyblish.api.register_plugin_path(ROOT / r'3rd_party_packages\check_core') instead of having to convert to str pyblish.api.register_plugin_path(str(ROOT / r'3rd_party_packages\check_core'))

it might seem like a small change but i find myself having to type this in lots of lines and it adds up resulting in inconvenience and messy code suggested PR https://github.com/pyblish/pyblish-base/pull/377 with a straightforward implementation

hannesdelbeke commented 2 years ago

PR has been merged in, this ticket can be closed

BigRoy commented 2 years ago

Just commented on the PR - but here might be better. Seems we missed out on implementing the same for deregister_plugin_path?

hannesdelbeke commented 2 years ago

created a new PR for deregister support https://github.com/pyblish/pyblish-base/pull/384