It seems python type checker in PyCharm automatically works for .py
files.. but not for .pyx
files.
Is there any way to enable type checker for .pyx
files in PyCharm?
Also, is there any way to use mypy with cython files (.pyx
files)?
Press Ctrl+Alt+S to open the IDE settings and select Editor | File Types. Click Associate File Types with PyCharm and select the file extensions you want to open with the IDE. Click OK and close the dialog.
A PYX file is a source code written in the Python-like language Pyrex. It may contain code that references existing C modules. Pyrex is a programming language that is used for creating Python modules PYD and is based on C-like syntax.
The .pyx file is regarded as a text file by default in Pycharm. However, you can change the setting. Go to File->Settings->Editor->File Types. In recognized file types, find "Text", delete the entry ".pyx" in the registered patterns. Then, find "Python" in the recognized file types, add an entry ".pyx" in the registered patterns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With