From 1df09292b55cc8cfccd8b62ac2c5d33e652e2cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 11 Oct 2024 16:43:28 +0200 Subject: [PATCH] consistent __exit__() argument names --- gallery_dl/config.py | 2 +- gallery_dl/cookies.py | 2 +- gallery_dl/version.py | 2 +- scripts/util.py | 2 +- test/test_results.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gallery_dl/config.py b/gallery_dl/config.py index 0a187c14..855fb4f7 100644 --- a/gallery_dl/config.py +++ b/gallery_dl/config.py @@ -315,7 +315,7 @@ class apply(): self.original.append((path, key, get(path, key, util.SENTINEL))) set(path, key, value) - def __exit__(self, etype, value, traceback): + def __exit__(self, exc_type, exc_value, traceback): for path, key, value in self.original: if value is util.SENTINEL: unset(path, key) diff --git a/gallery_dl/cookies.py b/gallery_dl/cookies.py index 0ffd29a9..78a9590d 100644 --- a/gallery_dl/cookies.py +++ b/gallery_dl/cookies.py @@ -864,7 +864,7 @@ class DatabaseConnection(): self.directory.cleanup() raise - def __exit__(self, exc, value, tb): + def __exit__(self, exc_type, exc_value, traceback): self.database.close() if self.directory: self.directory.cleanup() diff --git a/gallery_dl/version.py b/gallery_dl/version.py index dd96a9ac..38f22bb5 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -6,5 +6,5 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -__version__ = "1.27.6" +__version__ = "1.27.7-dev" __variant__ = None diff --git a/scripts/util.py b/scripts/util.py index 629f9b0d..48b8d319 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -27,7 +27,7 @@ class lazy(): def __enter__(self): return self.buffer - def __exit__(self, exc, value, tb): + def __exit__(self, exc_type, exc_value, traceback): # get content of old file try: with open(self.path, encoding="utf-8") as fp: diff --git a/test/test_results.py b/test/test_results.py index ed9c9a93..f36f7984 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -358,7 +358,7 @@ class TestPathfmt(): def __enter__(self): return self - def __exit__(self, *args): + def __exit__(self, exc_type, exc_value, traceback): pass def open(self, mode):