Skip to content

Commit fd457ce

Browse files
committed
No local imports
1 parent 4b24671 commit fd457ce

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

src/xyz/cppmodel.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import warnings
12
from typing import Any
23
from typing import List
34
from typing import Optional
@@ -47,8 +48,6 @@ def __init__(self, cindex_type: _ClangType):
4748

4849
@property
4950
def is_const(self) -> bool:
50-
import warnings
51-
5251
warnings.warn("is_const is deprecated, use is_const_qualified() instead", DeprecationWarning, stacklevel=2)
5352
return self.is_const_qualified()
5453

@@ -148,22 +147,16 @@ def __init__(self, cursor: Cursor):
148147

149148
@property
150149
def is_const(self) -> bool:
151-
import warnings
152-
153150
warnings.warn("is_const is deprecated, use is_const_method() instead", DeprecationWarning, stacklevel=2)
154151
return self.is_const_method()
155152

156153
@property
157154
def is_virtual(self) -> bool:
158-
import warnings
159-
160155
warnings.warn("is_virtual is deprecated, use is_virtual_method() instead", DeprecationWarning, stacklevel=2)
161156
return self.is_virtual_method()
162157

163158
@property
164159
def is_pure_virtual(self) -> bool:
165-
import warnings
166-
167160
warnings.warn(
168161
"is_pure_virtual is deprecated, use is_pure_virtual_method() instead", DeprecationWarning, stacklevel=2
169162
)

0 commit comments

Comments
 (0)