Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d1af134

Browse files
committed
chore: format
1 parent 18de7d0 commit d1af134

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

google/cloud/spanner_dbapi/exceptions.py

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# license that can be found in the LICENSE file or at
55
# https://developers.google.com/open-source/licenses/bsd
66

7-
"""Spanner DB API exceptions."""
7+
"""Spanner DB API exceptions listed in PEP-249."""
88

99

1010
class Warning(Exception):
@@ -23,8 +23,7 @@ class Error(Exception):
2323

2424

2525
class InterfaceError(Error):
26-
"""
27-
Error related to the database interface
26+
"""Error related to the database interface
2827
rather than the database itself.
2928
"""
3029

@@ -38,56 +37,48 @@ class DatabaseError(Error):
3837

3938

4039
class DataError(DatabaseError):
41-
"""
42-
Error due to problems with the processed data like
40+
"""Error due to problems with the processed data like
4341
division by zero, numeric value out of range, etc.
4442
"""
4543

4644
pass
4745

4846

4947
class OperationalError(DatabaseError):
50-
"""
51-
Error related to the database's operation, e.g. an
52-
unexpected disconnect, the data source name is not
53-
found, a transaction could not be processed, a
54-
memory allocation error, etc.
48+
"""Error related to the database's operation, e.g. an unexpected
49+
disconnect, the data source name is not found, a transaction could not
50+
be processed, a memory allocation error, etc.
5551
"""
5652

5753
pass
5854

5955

6056
class IntegrityError(DatabaseError):
61-
"""
62-
Error for cases of relational integrity of the database
57+
"""Error for cases of relational integrity of the database
6358
is affected, e.g. a foreign key check fails.
6459
"""
6560

6661
pass
6762

6863

6964
class InternalError(DatabaseError):
70-
"""
71-
Internal database error, e.g. the cursor is not valid
65+
"""Internal database error, e.g. the cursor is not valid
7266
anymore, the transaction is out of sync, etc.
7367
"""
7468

7569
pass
7670

7771

7872
class ProgrammingError(DatabaseError):
79-
"""
80-
Programming error, e.g. table not found or already
81-
exists, syntax error in the SQL statement, wrong
82-
number of parameters specified, etc.
73+
"""Programming error, e.g. table not found or already exists, syntax
74+
error in the SQL statement, wrong number of parameters specified, etc.
8375
"""
8476

8577
pass
8678

8779

8880
class NotSupportedError(DatabaseError):
89-
"""
90-
Error for case of a method or database API not
81+
"""Error for case of a method or database API not
9182
supported by the database was used.
9283
"""
9384

0 commit comments

Comments
 (0)