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

Add test for generic aliases and lenient_issubclass #2392

Conversation

daviskirk
Copy link
Contributor

@daviskirk daviskirk commented Feb 24, 2021

Change Summary

Closes #2399

handle generic aliases (list[str], tuple[str, ...] and so on) in lenient_issubclass.

Related issue number

#2399

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)

@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

Merging #2392 (a463d42) into master (c8883e3) will decrease coverage by 0.53%.
The diff coverage is 70.00%.

@@            Coverage Diff             @@
##           master    #2392      +/-   ##
==========================================
- Coverage   99.90%   99.36%   -0.54%     
==========================================
  Files          25       25              
  Lines        5039     5047       +8     
  Branches     1031     1032       +1     
==========================================
- Hits         5034     5015      -19     
- Misses          1        9       +8     
- Partials        4       23      +19     
Impacted Files Coverage Δ
pydantic/typing.py 100.00% <ø> (ø)
pydantic/utils.py 98.29% <50.00%> (-1.71%) ⬇️
pydantic/json.py 100.00% <100.00%> (ø)
pydantic/annotated_types.py 83.33% <0.00%> (-16.67%) ⬇️
pydantic/mypy.py 95.50% <0.00%> (-4.50%) ⬇️
pydantic/env_settings.py 99.20% <0.00%> (-0.80%) ⬇️
pydantic/decorator.py 99.42% <0.00%> (-0.58%) ⬇️
pydantic/fields.py 99.58% <0.00%> (-0.42%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8883e3...62f8421. Read the comment docs.

@daviskirk daviskirk force-pushed the check-is-lenient-subclass-generic-aliases branch 2 times, most recently from 9093a3a to 8c92c17 Compare February 24, 2021 17:46
@daviskirk daviskirk force-pushed the check-is-lenient-subclass-generic-aliases branch from 8c92c17 to 583848b Compare February 24, 2021 17:53
@daviskirk daviskirk force-pushed the check-is-lenient-subclass-generic-aliases branch from 583848b to 62f8421 Compare February 24, 2021 18:06
@daviskirk daviskirk marked this pull request as ready for review February 24, 2021 19:10
@samuelcolvin samuelcolvin merged commit aa92db5 into pydantic:master Feb 25, 2021
@samuelcolvin
Copy link
Member

great, thank you.

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.

lenient_issubclass does not work for generic aliases
2 participants