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

[ENH] Print warning when type is unkown in pure-python memoryview #5650

Closed
matusvalo opened this issue Aug 26, 2023 · 0 comments · Fixed by #5664
Closed

[ENH] Print warning when type is unkown in pure-python memoryview #5650

matusvalo opened this issue Aug 26, 2023 · 0 comments · Fixed by #5664

Comments

@matusvalo
Copy link
Contributor

matusvalo commented Aug 26, 2023

Is your feature request related to a problem? Please describe.

Consider following cython code:

# cython is *not* imported
def foo(bar: cython.int[:]):
    pass

This code is compiled successfully without any warning even though cython.int type is ignored.

Describe the solution you'd like.

When annotation type is not recognized a warning should be raised:

warning: deleteme.py:2:19: Unknown type declaration 'cython.int' in annotation, ignoring

This is the same behavior as we have already for simple types:

# cython is *not* imported
def foo(bar: cython.int):
    pass

Describe alternatives you've considered.

Alternative is to keep as it is but this can end up with stupid mistakes as mine - see issue #5649

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants