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: enhanced typehints and typing #27

Merged
merged 15 commits into from
Oct 6, 2023
Merged

Conversation

jkowalleck
Copy link
Collaborator

@jkowalleck jkowalleck commented Oct 2, 2023

Even tough some structures are refactored, no public API is changed.
No runtime is changed.
TypeCheckers might behave differently, which is intentional due to bug fixes. This is considered a non-breaking change, as it does not affect runtime.

@jkowalleck jkowalleck added the enhancement New feature or request label Oct 2, 2023
@jkowalleck jkowalleck force-pushed the fix/typehints-attempt1 branch 6 times, most recently from e36f4e8 to ebd5bae Compare October 2, 2023 10:05
@jkowalleck jkowalleck changed the title Fix/typehints attempt1 fix: typehints and typing Oct 2, 2023
@jkowalleck jkowalleck changed the title fix: typehints and typing feat: correct typehints and typing Oct 5, 2023
@jkowalleck jkowalleck force-pushed the fix/typehints-attempt1 branch from ebd5bae to 3ae2d51 Compare October 5, 2023 16:29
@jkowalleck jkowalleck force-pushed the fix/typehints-attempt1 branch from 809b289 to 56c0b82 Compare October 5, 2023 21:36
@jkowalleck jkowalleck marked this pull request as ready for review October 5, 2023 23:21
@jkowalleck jkowalleck requested a review from madpah as a code owner October 5, 2023 23:21
@jkowalleck jkowalleck changed the title feat: correct typehints and typing feat: enhanced typehints and typing Oct 5, 2023
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck force-pushed the fix/typehints-attempt1 branch from 3a6dd8d to b4052b9 Compare October 6, 2023 10:46
@@ -50,15 +58,14 @@
logger.setLevel(logging.INFO)


class _Klass(Protocol):
__name__: str
Copy link
Collaborator Author

@jkowalleck jkowalleck Oct 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are properties of type, not intended class properties.



_F = TypeVar("_F", bound=Callable[..., Any])
_T = TypeVar('_T', bound=_Klass)

ViewType = _Klass
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at runtime, _Klass/ViewType was just any class. so this stays as is ...

but the typing was intended to glook tof a type of _Klass/ViewType ...
this is fixed, now

@jkowalleck jkowalleck merged commit 410372a into main Oct 6, 2023
19 checks passed
@jkowalleck jkowalleck deleted the fix/typehints-attempt1 branch October 6, 2023 10:53
@jkowalleck jkowalleck added the bug Something isn't working label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant