Skip to content
Snippets Groups Projects
Commit a4c997de authored by Yoann Schneider's avatar Yoann Schneider :tennis: Committed by Erwan Rouchet
Browse files

Introduce UP024

parent 9700495f
No related branches found
No related tags found
1 merge request!2307Introduce pyupgrade
......@@ -67,7 +67,7 @@ class _AssertExactQueriesContext(CaptureQueriesContext):
if not self.path.exists():
try:
self.path.write_text(actual_sql)
except IOError as e:
except OSError as e:
raise AssertionError(
f"Could not assert on SQL queries; the file at {self.path} did not exist. "
"A new file could not be created with the current SQL queries."
......
......@@ -33,6 +33,8 @@ select = [
"UP014",
# redundant-open-modes
"UP015",
# os-error-alias
"UP024",
]
ignore = ["E501", "RET502", "RET503"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment