Skip to content

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

Merged
jkowalleck merged 1 commit intomainfrom
reduce_type-casting_set
Jun 20, 2022
Merged

feat: reduce unnessessarry type casting of set/SortedSet when useing setter#203
jkowalleck merged 1 commit intomainfrom
reduce_type-casting_set

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.

@jkowalleck jkowalleck force-pushed the reduce_type-casting_set branch from 3703db6 to a5797a1 Compare May 26, 2022 13:03
@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
@jkowalleck jkowalleck force-pushed the reduce_type-casting_set branch from a5797a1 to 3b3cafc Compare June 11, 2022 07:57
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck force-pushed the reduce_type-casting_set branch from 3b3cafc to af7f4bc Compare June 11, 2022 08:10
@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.

2 participants