-
Notifications
You must be signed in to change notification settings - Fork 27
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
🐛Fixes TypeError: issubclass() arg 1 must be a class
while building BaseCustomSettings classes
#5253
🐛Fixes TypeError: issubclass() arg 1 must be a class
while building BaseCustomSettings classes
#5253
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5253 +/- ##
=========================================
- Coverage 87.6% 87.1% -0.5%
=========================================
Files 930 1302 +372
Lines 38953 53229 +14276
Branches 775 1168 +393
=========================================
+ Hits 34134 46409 +12275
- Misses 4650 6570 +1920
- Partials 169 250 +81
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9155e09
to
c378b9a
Compare
TypeError: issubclass() arg 1 must be a class
while building BaseCustomSettings classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 thanks a lot!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Thanks!
c378b9a
to
8b09992
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. not sure I get the point with the EnvVarsList becoming an iterable though. but all good.
packages/pytest-simcore/src/pytest_simcore/helpers/typing_env.py
Outdated
Show resolved
Hide resolved
packages/pytest-simcore/src/pytest_simcore/helpers/utils_envs.py
Outdated
Show resolved
Hide resolved
8b09992
to
40b6832
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
What do these changes do?
Some configurations with
BaseCustomSettings
subclasses raisedTypeError: issubclass() arg 1 must be a class
.This is raised by
issubclass
when using pydantic subclasses (e.g.BaseCustomSettings
inherits fromBaseSettings
) in combination with "composed" types asdict[str, str]
.Some more information and references to pydantic issues are provided in the code's tests
Related issue/s
How to test
Tests that reproduces the bug in
cd packages/settings-library pytest -vv -k test_issubclass_type_error_with_pydantic_models
Dev Checklist
DevOps Checklist