forked from VimPlug/jedi
Use warnings.warn instead of raise
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
|
import warnings
|
||||||
|
|
||||||
from _compatibility import unicode
|
from _compatibility import unicode
|
||||||
import cache
|
import cache
|
||||||
@@ -96,7 +97,7 @@ class BaseDefinition(object):
|
|||||||
use `api_classes.BaseDefinition.line` instead.
|
use `api_classes.BaseDefinition.line` instead.
|
||||||
.. todo:: Remove!
|
.. todo:: Remove!
|
||||||
"""
|
"""
|
||||||
raise DeprecationWarning("Use line instead.")
|
warnings.warn("Use line instead.", DeprecationWarning)
|
||||||
return self.line
|
return self.line
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user