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

chore: update annotations #302

Merged
merged 3 commits into from
Sep 18, 2022
Merged

chore: update annotations #302

merged 3 commits into from
Sep 18, 2022

Conversation

aarnphm
Copy link
Contributor

@aarnphm aarnphm commented Sep 12, 2022

Fix bad merge and update annotations from #288

Address comments type syntax to newer syntax.

Signed-off-by: Aaron Pham <[email protected]>
@aarnphm
Copy link
Contributor Author

aarnphm commented Sep 12, 2022

cc @Tinche

aarnphm and others added 2 commits September 12, 2022 03:05
A few notes:
- Use UnionType when cattrs decides to support 3.11 since in 3.11 @Final
  has a different implementation, which inherently affects UnionType
  support in _compat.py
  For cattrs to support it we might need to update typing_extensions
  version
- Making generated function a generic type alias now. This should make
  it easiert to type hint any future works that involves the given make
  and gen function.

revert: changes from upstream

Signed-off-by: Aaron Pham <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2022

Codecov Report

Merging #302 (0248bec) into main (c3faf86) will increase coverage by 5.94%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #302      +/-   ##
==========================================
+ Coverage   91.02%   96.97%   +5.94%     
==========================================
  Files          16       16              
  Lines        1382     1387       +5     
==========================================
+ Hits         1258     1345      +87     
+ Misses        124       42      -82     
Impacted Files Coverage Δ
src/cattrs/converters.py 97.84% <100.00%> (+4.31%) ⬆️
src/cattrs/disambiguators.py 100.00% <100.00%> (ø)
src/cattrs/gen.py 94.25% <100.00%> (+0.06%) ⬆️
src/cattrs/_generics.py 100.00% <0.00%> (+20.00%) ⬆️
src/cattrs/_compat.py 96.64% <0.00%> (+34.63%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Tinche
Copy link
Member

Tinche commented Sep 18, 2022

Thanks!

@Tinche Tinche merged commit 5b3fb4d into python-attrs:main Sep 18, 2022
@aarnphm aarnphm deleted the chore/updates_annotations branch September 19, 2022 00:34
@phiresky
Copy link

This change results in the following mypy error in my dependent project:

>>>> Running mypy...
.venv/lib/python3.10/site-packages/cattrs/converters.py:541: error: Invalid "type: ignore" comment
Found 1 error in 1 file (errors prevented further checking)

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.

4 participants