blob: 231a959594f74b2ac67d99f974cd7a0baacaed8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# mode: error
# tag: pure, import, cimport
import cython.cimportsy # FIXME: not currently an error?
import cython.cimports
import cython.cimports.libc
import cython.cimports as cim
cimport cython.cimports
cimport cython.cimports.libc
cimport cython.cimports as cim
import cython.cimports.libc as cython
# ok
import cython.cimports.libc as libc
from cython.cimports import libc
from cython.cimports cimport libc
_ERRORS = """
6:7: Cannot cimport the 'cython.cimports' package directly, only submodules.
7:7: Python cimports must use 'from cython.cimports... import ...' or 'import ... as ...', not just 'import ...'
8:7: Cannot cimport the 'cython.cimports' package directly, only submodules.
10:8: Cannot cimport the 'cython.cimports' package directly, only submodules.
11:8: Python cimports must use 'from cython.cimports... import ...' or 'import ... as ...', not just 'import ...'
12:8: Cannot cimport the 'cython.cimports' package directly, only submodules.
# The following is not an accurate error message, but it's difficult to distinguish this case. And it's rare.
13:7: Python cimports must use 'from cython.cimports... import ...' or 'import ... as ...', not just 'import ...'
"""
|