Closed stefanv closed 1 year ago
I can't reproduce this:
(.venv) marcogorelli@DESKTOP-U8OKFP3:~/cython-lint-dev$ cat t.pyx
DEF NFEATURES_CUTOFF = 5
(.venv) marcogorelli@DESKTOP-U8OKFP3:~/cython-lint-dev$ cython-lint t.pyx
Is that the whole file?
🤔 can't reproduce with the file you mentioned either
(.venv) marcogorelli@DESKTOP-U8OKFP3:~/cython-lint-dev$ cp ../scipy-dev/scipy/cluster/_vq.pyx t.pyx
(.venv) marcogorelli@DESKTOP-U8OKFP3:~/cython-lint-dev$ cython-lint t.pyx
t.pyx:54:16: E127 continuation line over-indented for visual indent
t.pyx:124:21: E128 continuation line under-indented for visual indent
$ cython-lint --version
0.12.3
(py310) $ cython-lint /tmp/_vq.pyx
Skipping file /tmp/_vq.pyx, as it cannot be parsed. Error: AttributeError("'_thread._local' object has no attribute 'cython_errors_listing_file'")
(py310) $ cat /tmp/_vq.pyx
DEF NFEATURES_CUTOFF = 5
Thanks - which version of Cython?
🤔 really not sure what to do here if I can't reproduce it
(.311venv) marcogorelli@DESKTOP-U8OKFP3:~/tmp$ python --version
Python 3.11.1
(.311venv) marcogorelli@DESKTOP-U8OKFP3:~/tmp$ cython-lint --version
0.12.3
(.311venv) marcogorelli@DESKTOP-U8OKFP3:~/tmp$ cat t.pyx
DEF NFEATURES_CUTOFF = 5
(.311venv) marcogorelli@DESKTOP-U8OKFP3:~/tmp$ cython-lint t.pyx
(.311venv) marcogorelli@DESKTOP-U8OKFP3:~/tmp$ echo $?
0
(.311venv) marcogorelli@DESKTOP-U8OKFP3:~/tmp$ python -c 'import cython; print(cython.__version__)'
0.29.33
That might be it!
Cython version 3.0.0a11
thanks again for the report! new version shipped
See https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#compile-time-definitions
Input:
Output: