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

Use Python data model in context #444

Open
JSAbrahams opened this issue Jan 21, 2023 · 1 comment
Open

Use Python data model in context #444

JSAbrahams opened this issue Jan 21, 2023 · 1 comment
Assignees
Labels
code quality: general Code quality issue not relevant to a particular module enhancement: check New feature in the type check module

Comments

@JSAbrahams
Copy link
Owner

JSAbrahams commented Jan 21, 2023

Current Issue

Now that we have more fully implemented generics, we can leverage this logic to more fully implement the datamodel of Python.
This means that when calling methods, we check the loaded Python classes instead of implementing special logic in the type checker.
We then match methods and their types.

High-level description of the feature

Call the proper magic methods of Python.
We already make use of for instance:

Up until now, this was done on a as-needed basis.
However, a more exhaustive implementation is possible now thanks to the now more comprehensive generic implementation.

Description of potential implementation

See https://docs.python.org/3/reference/datamodel.html for method and function names.

@JSAbrahams JSAbrahams added enhancement: check New feature in the type check module code quality: general Code quality issue not relevant to a particular module labels Jan 21, 2023
@JSAbrahams JSAbrahams added this to the v0.3.7 | Type alias milestone Jan 21, 2023
@JSAbrahams JSAbrahams self-assigned this Jan 21, 2023
@JSAbrahams JSAbrahams pinned this issue Jan 21, 2023
@JSAbrahams JSAbrahams removed this from the v0.3.7 | Type alias milestone Jan 24, 2023
@JSAbrahams
Copy link
Owner Author

A general issue working forward, should be split into constituent components since implementing this all at once is a bit much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality: general Code quality issue not relevant to a particular module enhancement: check New feature in the type check module
Projects
None yet
Development

No branches or pull requests

1 participant