Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate from Path to DirectoryPath #89

Closed
kfollesdal opened this issue May 22, 2020 · 0 comments · Fixed by #90
Closed

Translate from Path to DirectoryPath #89

kfollesdal opened this issue May 22, 2020 · 0 comments · Fixed by #90

Comments

@kfollesdal
Copy link
Contributor

kfollesdal commented May 22, 2020

  • typical version: 2.0.15
  • Python version: 3.8.2
  • Operating System: macOS

Since DirectoryPath is a subclass of Path, should it be possible to translate from Path to DirectoryPath if Path is a directory?
typic.translate(pathlib.Path.cwd(), typic.DirectoryPath)

I now get a the following error:
TranslatorTypeError: Cannot translate to type <class 'typic.types.path.DirectoryPath'>. Unable to determine target fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant