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

fix: no warning when importing unrequested adapter #195

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

betodealmeida
Copy link
Owner

This PR changes connect so that when a list of adapters is passed, we only try to load adapters from that list.

It also fixes a type error introduced in #187.

Closes #194.

@betodealmeida betodealmeida merged commit 1ec3e15 into main Mar 10, 2022
@@ -500,17 +500,20 @@ def connect(
[(1.0, 2.0), (3.0, 4.0)]

"""
if adapters is None and safe:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say the control flow around safe is a bit hard to follow .

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! Yeah, I agree it could be improved. It's also not perfect, as someone might be able to monkeypatch an unsafe adapter to mark it as safe. It probably need some refactoring.

BTW, did you get my email? Sometimes my email gets classified as spam because I self host it.

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 this pull request may close these issues.

Don't log warning for "Couldn't load adapter" if adapter isn't specified
2 participants