File tree 1 file changed +20
-4
lines changed
google/cloud/spanner_dbapi
1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,11 @@ def reason(self):
40
40
Returns:
41
41
Union[str, None]: An optional string containing reason of the error.
42
42
"""
43
- return self .__cause__ .reason if self ._is_error_cause_instance_of_google_api_exception () else None
43
+ return (
44
+ self .__cause__ .reason
45
+ if self ._is_error_cause_instance_of_google_api_exception ()
46
+ else None
47
+ )
44
48
45
49
@property
46
50
def domain (self ):
@@ -50,7 +54,11 @@ def domain(self):
50
54
Returns:
51
55
Union[str, None]: An optional string containing a logical grouping to which the "reason" belongs.
52
56
"""
53
- return self .__cause__ .domain if self ._is_error_cause_instance_of_google_api_exception () else None
57
+ return (
58
+ self .__cause__ .domain
59
+ if self ._is_error_cause_instance_of_google_api_exception ()
60
+ else None
61
+ )
54
62
55
63
@property
56
64
def metadata (self ):
@@ -60,7 +68,11 @@ def metadata(self):
60
68
Returns:
61
69
Union[Dict[str, str], None]: An optional object containing structured details about the error.
62
70
"""
63
- return self .__cause__ .metadata if self ._is_error_cause_instance_of_google_api_exception () else None
71
+ return (
72
+ self .__cause__ .metadata
73
+ if self ._is_error_cause_instance_of_google_api_exception ()
74
+ else None
75
+ )
64
76
65
77
@property
66
78
def details (self ):
@@ -71,7 +83,11 @@ def details(self):
71
83
Returns:
72
84
Sequence[Any]: A list of structured objects from error_details.proto
73
85
"""
74
- return self .__cause__ .details if self ._is_error_cause_instance_of_google_api_exception () else None
86
+ return (
87
+ self .__cause__ .details
88
+ if self ._is_error_cause_instance_of_google_api_exception ()
89
+ else None
90
+ )
75
91
76
92
77
93
class InterfaceError (Error ):
You can’t perform that action at this time.
0 commit comments