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

Test for device class by type vs isinstance #113

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

kingsleyadam
Copy link
Owner

When testing for device class using isinstance it also pulls in sub-classes.

We want to get the class by the exact type, we don’t want to include type inheritence.

@kingsleyadam kingsleyadam linked an issue Nov 13, 2024 that may be closed by this pull request
derjoerg
derjoerg previously approved these changes Nov 13, 2024
@kingsleyadam
Copy link
Owner Author

Added a fix for pnuckowski/aioresponses#262

@kingsleyadam kingsleyadam merged commit 30184ee into main Nov 14, 2024
7 checks passed
@kingsleyadam kingsleyadam deleted the u/kingsleyadam/fixGetDeviceByClass branch November 14, 2024 07:53
Comment on lines +1 to +4
# There's an issue with aioresponses and the latest version of aiohttp
# Pin an earlier version for development until PR is merged and released.
# https://github.com/pnuckowski/aioresponses/pull/262
aiohttp<3.11.0
Copy link

Choose a reason for hiding this comment

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

You can likely drop the pin now that 3.11.1 is available

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!

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.

Devices are loaded incorrectly if sub-classed
3 participants