File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change 3
3
from functools import wraps
4
4
from ..datetime_helpers import parse_datetime
5
5
6
- try :
7
- basestring
8
- except NameError :
9
- # In case we are in python 3 the string check is different
10
- basestring = str
11
-
12
6
13
7
def property_is_enum (enum_type ):
14
8
def property_type_decorator (func ):
@@ -134,7 +128,7 @@ def property_is_datetime(func):
134
128
def wrapper (self , value ):
135
129
if isinstance (value , datetime .datetime ):
136
130
return func (self , value )
137
- if not isinstance (value , basestring ):
131
+ if not isinstance (value , str ):
138
132
raise ValueError (
139
133
"Cannot convert {} into a datetime, cannot update {}" .format (value .__class__ .__name__ , func .__name__ )
140
134
)
Original file line number Diff line number Diff line change 6
6
7
7
import logging
8
8
9
- try :
10
- basestring
11
- except NameError :
12
- # In case we are in python 3 the string check is different
13
- basestring = str
14
-
15
9
logger = logging .getLogger ("tableau.endpoint.jobs" )
16
10
17
11
class Jobs (Endpoint ):
@@ -22,7 +16,7 @@ def baseurl(self):
22
16
@api (version = "2.6" )
23
17
def get (self , job_id = None , req_options = None ):
24
18
# Backwards Compatibility fix until we rev the major version
25
- if job_id is not None and isinstance (job_id , basestring ):
19
+ if job_id is not None and isinstance (job_id , str ):
26
20
import warnings
27
21
28
22
warnings .warn ("Jobs.get(job_id) is deprecated, update code to use Jobs.get_by_id(job_id)" )
You can’t perform that action at this time.
0 commit comments