File tree 3 files changed +4
-5
lines changed
3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,6 @@ disable=
87
87
attribute-defined-outside-init, # TODO: Fix scope
88
88
protected-access, # TODO: Fix access
89
89
abstract-method, # TODO: Fix abstract methods
90
- unidiomatic-typecheck, # TODO: Fix typechecks
91
90
wrong-import-order, # TODO: Fix import order
92
91
useless-object-inheritance, # TODO: Remove unnecessary imports
93
92
cyclic-import, # TODO: Resolve cyclic imports
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ def _compilation_job_config(
176
176
input_model_config = {
177
177
"S3Uri" : self .model_data ,
178
178
"DataInputConfig" : input_shape
179
- if type (input_shape ) != dict
179
+ if not isinstance (input_shape , dict )
180
180
else json .dumps (input_shape ),
181
181
"Framework" : framework ,
182
182
}
Original file line number Diff line number Diff line change @@ -83,23 +83,23 @@ def sanitize(vpc_config):
83
83
"""
84
84
if vpc_config is None :
85
85
return vpc_config
86
- if type (vpc_config ) is not dict :
86
+ if not isinstance (vpc_config , dict ) :
87
87
raise ValueError ("vpc_config is not a dict: {}" .format (vpc_config ))
88
88
if not vpc_config :
89
89
raise ValueError ("vpc_config is empty" )
90
90
91
91
subnets = vpc_config .get (SUBNETS_KEY )
92
92
if subnets is None :
93
93
raise ValueError ("vpc_config is missing key: {}" .format (SUBNETS_KEY ))
94
- if type (subnets ) is not list :
94
+ if not isinstance (subnets , list ) :
95
95
raise ValueError ("vpc_config value for {} is not a list: {}" .format (SUBNETS_KEY , subnets ))
96
96
if not subnets :
97
97
raise ValueError ("vpc_config value for {} is empty" .format (SUBNETS_KEY ))
98
98
99
99
security_group_ids = vpc_config .get (SECURITY_GROUP_IDS_KEY )
100
100
if security_group_ids is None :
101
101
raise ValueError ("vpc_config is missing key: {}" .format (SECURITY_GROUP_IDS_KEY ))
102
- if type (security_group_ids ) is not list :
102
+ if not isinstance (security_group_ids , list ) :
103
103
raise ValueError (
104
104
"vpc_config value for {} is not a list: {}" .format (
105
105
SECURITY_GROUP_IDS_KEY , security_group_ids
You can’t perform that action at this time.
0 commit comments