You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.int : Convert into int
ANY -> int($expr$)$END$
.str : Convert into str
ANY -> str($expr$)$END$
.frozenset : Convert into frozenset
list -> frozenset($expr$)$END$
tuple -> frozenset($expr$)$END$
set -> frozenset($expr$)$END$
dict -> frozenset($expr$)$END$
.set : Convert into set
ANY -> set($expr$)$END$
.list : Convert into list
ANY -> list($expr$)$END$
.dict : Convert into dict
ANY -> dict($expr$)$END$
.tuple : Convert into tuple
ANY -> tuple($expr$)$END$
.bool : Convert into bool
ANY -> bool($expr$)$END$
.frozenset : Convert into frozenset
list -> frozenset($expr$)$END$
tuple -> frozenset($expr$)$END$
set -> frozenset($expr$)$END$
dict -> frozenset($expr$)$END$
this can be simplified even further using like this
.frozenset : Convert into frozenset
iter -> frozenset($expr$)$END$
But as there's no class like iterable in Postfix here.
So, the workaround would be this:
.frozenset : Convert into frozenset
list -> frozenset($expr$)$END$
tuple -> frozenset($expr$)$END$
set -> frozenset($expr$)$END$
dict -> frozenset($expr$)$END$
So it would be nice if you add support for other classes too.
like frozenset, iter, ...
Thank you!
The text was updated successfully, but these errors were encountered:
Implemented complex types which can contain multiple types.
Change how type names are retrieved, because previous approach created incorrect names for tuples, e.g.: (1,2,3) were (int, int, int) and not tuple.
WIP: New type names should be tested, maybe they will provide wrong results for objects
I've added support for frozenset type and introduced "complex" types, which can include multiple types, like "iter" mentioned by you.
It's not really flexible, and it may be possible to implement checks for the type methods
It seems tuples currently are not working due to their names being different, e.g.: according to documentation, iterator should have iter method.
But this feature is quite large.
Also, it seems the "tuple" type is not detected correctly (for the entire Python CPT):
(1, 2, 3) will have (int, int, int) type name, but "tuple" is expected.
I'm trying to get the correct name differently, but it should be tested.
I am trying to add a converters like this:
this can be simplified even further using like this
But as there's no class like iterable in Postfix here.
So, the workaround would be this:
So it would be nice if you add support for other classes too.
like frozenset, iter, ...
Thank you!
The text was updated successfully, but these errors were encountered: