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

Handle import of optional dependencies consistently #72

Open
simonbohnen opened this issue Nov 10, 2022 · 0 comments
Open

Handle import of optional dependencies consistently #72

simonbohnen opened this issue Nov 10, 2022 · 0 comments

Comments

@simonbohnen
Copy link
Contributor

@xhochy suggested this pattern for optional dependencies like gcsfs:

try:
from gcsfs import GCSFileSystem
has_gcsfs = True
except ImportError:
has_gcsfs = False

We should apply this to all the dependencies, e.g. dulwich:

from dulwich.objects import Blob, Commit, Tree
from dulwich.repo import Repo

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

No branches or pull requests

1 participant