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

Added type hints for methods #371

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

OkeyDev
Copy link

@OkeyDev OkeyDev commented Nov 24, 2024

The solution replaces the return type of the function _field2method with a special callable class called Field2MethodType. This allows the names and types of received arguments to be preserved. The return type of the class is dependent on Generic.

Also some minor changes to meet mypy requirements.

Fix #367

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.

Type-casting methods should return the exact type
1 participant