Skip to content

Fix generic typehint for pycharm - #936

Merged
samuelcolvin merged 2 commits into
pydantic:masterfrom
dmontagu:pycharm-generics
Oct 29, 2019
Merged

samuelcolvin merged 2 commits into
pydantic:masterfrom
dmontagu:pycharm-generics

Conversation

@dmontagu

@dmontagu dmontagu commented Oct 25, 2019 •

Copy link
Copy Markdown
Contributor

Change Summary

Modifies a type hint to prevent pycharm from raising warnings.

I believe this was caused by pycharm recently starting to incorporate the return type of __class_getitem__ into its type-checking logic.

Related issue number

fastapi/fastapi#653

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

codecov Bot commented Oct 25, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #936 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #936   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          16     16           
  Lines        2800   2800           
  Branches      543    543           
=====================================
  Hits         2800   2800

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 25f657f...8cd5b55. Read the comment docs.

@samuelcolvin
samuelcolvin merged commit cb2a302 into pydantic:master Oct 29, 2019
@samuelcolvin

samuelcolvin commented Oct 29, 2019 •

Copy link
Copy Markdown
Member

thanks.

andreshndz pushed a commit to cuenca-mx/pydantic that referenced this pull request Jan 17, 2020
* Fix generic typehint for pycharm

* Add changes
alexdrydew pushed a commit to alexdrydew/pydantic that referenced this pull request Dec 23, 2023
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.

2 participants