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

Use TypeVars for return types of RedisModel and its subtype's methods #476

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

marianhlavac
Copy link
Contributor

Classes RedisModel, HashModel and JsonModel had wrong return type definitions on some of their methods.
This effectively prevented static type checking and typehinting on all objects returned by these methods.

This PR adds correct type hints using TypeVars.

Before before1 before2
After after1 after2

This superseeds PR #472

@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (70f6401) 78.94% compared to head (a8710a5) 78.96%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #476      +/-   ##
==========================================
+ Coverage   78.94%   78.96%   +0.01%     
==========================================
  Files          14       14              
  Lines        1178     1179       +1     
==========================================
+ Hits          930      931       +1     
  Misses        248      248              
Flag Coverage Δ
unit 78.96% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aredis_om/model/model.py 87.10% <100.00%> (+0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@marianhlavac
Copy link
Contributor Author

marianhlavac commented Feb 14, 2023

I've rebased the PR on latest main from upstream. The checks should pass now.

@marianhlavac
Copy link
Contributor Author

Is anything else blocking this PR?

@frozenBranch
Copy link

I think this is a necessary change, is there a reason it was not merged?

@marianhlavac
Copy link
Contributor Author

Well very obviously this project is beyond being unmaintained, which is really shame.

@chayim chayim merged commit c68adac into redis:main Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants