Skip to content

Commit df38633

Browse files
committed
Check that no bare except is used
1 parent 9980bf5 commit df38633

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

dbutils/pooled_db.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def __del__(self):
386386
"""Delete the pool."""
387387
try:
388388
self.close()
389-
except: # builtin Exceptions might not exist anymore
389+
except: # noqa: E722 - builtin Exceptions might not exist anymore
390390
pass
391391

392392
def _wait_lock(self):
@@ -433,7 +433,7 @@ def __del__(self):
433433
"""Delete the pooled connection."""
434434
try:
435435
self.close()
436-
except: # builtin Exceptions might not exist anymore
436+
except: # noqa: E722 - builtin Exceptions might not exist anymore
437437
pass
438438

439439
def __enter__(self):
@@ -525,7 +525,7 @@ def __del__(self):
525525
"""Delete the pooled connection."""
526526
try:
527527
self.close()
528-
except: # builtin Exceptions might not exist anymore
528+
except: # noqa: E722 - builtin Exceptions might not exist anymore
529529
pass
530530

531531
def __enter__(self):

dbutils/pooled_pg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def __del__(self):
250250
"""Delete the pool."""
251251
try:
252252
self.close()
253-
except: # builtin Exceptions might not exist anymore
253+
except: # noqa: E722 - builtin Exceptions might not exist anymore
254254
pass
255255

256256

@@ -296,7 +296,7 @@ def __del__(self):
296296
"""Delete the pooled connection."""
297297
try:
298298
self.close()
299-
except: # builtin Exceptions might not exist anymore
299+
except: # noqa: E722 - builtin Exceptions might not exist anymore
300300
pass
301301

302302
def __enter__(self):

dbutils/steady_db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def __del__(self):
518518
"""Delete the steady connection."""
519519
try:
520520
self._close() # make sure the connection is closed
521-
except: # builtin Exceptions might not exist anymore
521+
except: # noqa: E722 - builtin Exceptions might not exist anymore
522522
pass
523523

524524

@@ -709,5 +709,5 @@ def __del__(self):
709709
"""Delete the steady cursor."""
710710
try:
711711
self.close() # make sure the cursor is closed
712-
except: # builtin Exceptions might not exist anymore
712+
except: # noqa: E722 - builtin Exceptions might not exist anymore
713713
pass

dbutils/steady_pg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,5 +305,5 @@ def __del__(self):
305305
"""Delete the steady connection."""
306306
try:
307307
self._close() # make sure the connection is closed
308-
except: # builtin Exceptions might not exist anymore
308+
except: # noqa: E722 - builtin Exceptions might not exist anymore
309309
pass

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ select = [
106106
]
107107
# You can use `ruff rule ...` to see what these ignored rules check
108108
ignore = [
109-
"E722",
110109
"N811",
111110
"N818",
112111
"PIE790",

0 commit comments

Comments
 (0)