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

feat: reduce unnessessarry type casting of set/SortedSet when useing setter #203

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented Apr 6, 2022

show what would happen, if the unnecessary type cast of set/SortedSet was omitted.

unnecessary on runtime (as all unit/functional/integration tests are passing),
but mypy is not able to detect that the setter has a wider type definition than the getter...
see the issue python/mypy#3004
and the decision that the issue is a feature-lack/bug: python/mypy#3004 (comment)

this PR is intended to last for a while and be rebased, whenever needed,
to test if mypy implemented the missing feature, some day.

@RodneyRichardson
Copy link
Contributor

RodneyRichardson commented Jun 10, 2022

Is this obsolete now we're using SortedSet?

@jkowalleck
Copy link
Member Author

jkowalleck commented Jun 10, 2022

Good hint.
Will rebase on master and see what happens. Maybe a breakthrough, maybe another hanging demo-PR.


update:
did the rebase, not surpised that it is still relevant and still open.
the issue with mypi is still there. since the experts in the linked mypy issue report guide to use tyoe: ignore i did this, so we could have this PR reviewed & fixed

@jkowalleck jkowalleck changed the title feat: reduce unnessessarry type casting of set feat: reduce unnessessarry type casting of set/SortedSet Jun 11, 2022
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck marked this pull request as ready for review June 11, 2022 08:11
@jkowalleck jkowalleck requested a review from a team as a code owner June 11, 2022 08:11
@jkowalleck jkowalleck changed the title feat: reduce unnessessarry type casting of set/SortedSet feat: reduce unnessessarry type casting of set/SortedSet when useing setter Jun 11, 2022
@jkowalleck jkowalleck merged commit 089d971 into main Jun 20, 2022
@jkowalleck jkowalleck deleted the reduce_type-casting_set branch June 20, 2022 07:59
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.

None yet

2 participants