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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
from nxtomomill.utils.io import deprecated, deprecated_warning
from nxtomomill.models.utils import (
remove_parenthesis_or_brackets as _remove_parenthesis_or_brackets,
)
from nxtomomill.models.utils import filter_str_def as _filter_str_def
from nxtomomill.models.utils import convert_str_to_tuple as _convert_str_to_tuple
from nxtomomill.models.utils import convert_str_to_bool as _convert_str_to_bool
from nxtomomill.models.utils import is_url_path as _is_url_path
from nxtomomill.models.utils import PathType as _PathType
@deprecated(
replacement="nxtomomill.models.utils.remove_parenthesis_or_brackets",
since_version="2.0",
reason="moved",
)
def remove_parenthesis_or_brackets(*args, **kwargs):
return _remove_parenthesis_or_brackets(*args, **kwargs)
@deprecated(
replacement="nxtomomill.models.utils.filter_str_def",
since_version="2.0",
reason="moved",
)
def filter_str_def(*args, **kwargs):
return _filter_str_def(*args, **kwargs)
@deprecated(
replacement="nxtomomill.models.utils.convert_str_to_tuple",
since_version="2.0",
reason="moved",
)
def convert_str_to_tuple(*args, **kwargs):
return _convert_str_to_tuple(*args, **kwargs)
@deprecated(
replacement="nxtomomill.models.utils.convert_str_to_bool",
since_version="2.0",
reason="moved",
)
def convert_str_to_bool(*args, **kwargs):
return _convert_str_to_bool(*args, **kwargs)
@deprecated(
replacement="nxtomomill.models.utils.is_url_path",
since_version="2.0",
reason="moved",
)
def is_url_path(*args, **kwargs):
return _is_url_path(*args, **kwargs)
class PathType(_PathType):
def __init__(self, *args, **kwargs):
deprecated_warning(
type_="class",
name="PathType",
replacement="nxtomomill.models.utils.PathType",
reason="moved to models module",
since_version="2.0",
)
super().__init__(*args, **kwargs)
|