diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b0a2a25..295e6154 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,3 +47,8 @@ repos: rev: v3.3.3 hooks: - id: pylint + - repo: https://github.com/asottile/pyupgrade + rev: v3.19.1 + hooks: + - id: pyupgrade + args: ["--py38-plus"] diff --git a/BinaryFileVersioner/BinaryFileVersioner.py b/BinaryFileVersioner/BinaryFileVersioner.py index 20bd894d..24ca8429 100644 --- a/BinaryFileVersioner/BinaryFileVersioner.py +++ b/BinaryFileVersioner/BinaryFileVersioner.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2018-2020 Elliot Jordan # diff --git a/Cocktail/CocktailReleasesInfoProvider.py b/Cocktail/CocktailReleasesInfoProvider.py index 76a0c04e..d5434beb 100644 --- a/Cocktail/CocktailReleasesInfoProvider.py +++ b/Cocktail/CocktailReleasesInfoProvider.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2022 Elliot Jordan # diff --git a/Corel/CorelSerializer.py b/Corel/CorelSerializer.py index 7e92ad12..33b7471c 100644 --- a/Corel/CorelSerializer.py +++ b/Corel/CorelSerializer.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2021 Elliot Jordan # diff --git a/Corel/CorelURLProvider.py b/Corel/CorelURLProvider.py index 6a41ee2f..ffd0d318 100644 --- a/Corel/CorelURLProvider.py +++ b/Corel/CorelURLProvider.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2021 Elliot Jordan # diff --git a/FindAndReplace/FindAndReplace.py b/FindAndReplace/FindAndReplace.py index e3cad540..3ec5fcbe 100644 --- a/FindAndReplace/FindAndReplace.py +++ b/FindAndReplace/FindAndReplace.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2016-2020 Elliot Jordan # diff --git a/GoToMeeting/GoToMeetingURLProvider.py b/GoToMeeting/GoToMeetingURLProvider.py index 699a0d78..947271d8 100644 --- a/GoToMeeting/GoToMeetingURLProvider.py +++ b/GoToMeeting/GoToMeetingURLProvider.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2015-2020 Elliot Jordan # Based on original processor by Nick Gamewell @@ -70,7 +69,7 @@ def get_g2m_info(self, base_url): meta_path = os.path.join(download_dir, "meta") try: os.makedirs(download_dir) - except os.error: + except OSError: # Directory already exists pass diff --git a/Perforce/PerforceURLProvider.py b/Perforce/PerforceURLProvider.py index d0f9f57e..5314d04d 100644 --- a/Perforce/PerforceURLProvider.py +++ b/Perforce/PerforceURLProvider.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2021 Elliot Jordan # diff --git a/R/RProjectURLProvider.py b/R/RProjectURLProvider.py index 1c9c869c..42e41860 100644 --- a/R/RProjectURLProvider.py +++ b/R/RProjectURLProvider.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2022 Elliot Jordan # diff --git a/VersionSplitter/VersionSplitter.py b/VersionSplitter/VersionSplitter.py index 7d31e502..a4d55edb 100644 --- a/VersionSplitter/VersionSplitter.py +++ b/VersionSplitter/VersionSplitter.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2015-2020 Elliot Jordan # diff --git a/Zoom/Zoom7zUnarchiver.py b/Zoom/Zoom7zUnarchiver.py index de6d41c7..3afd6941 100644 --- a/Zoom/Zoom7zUnarchiver.py +++ b/Zoom/Zoom7zUnarchiver.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2010 Per Olofsson # Updated as draft by Yoann Gini in 2017 to support 7z file format for Zoom diff --git a/ezeep/ezeepURLProvider.py b/ezeep/ezeepURLProvider.py index e7845724..99f09054 100644 --- a/ezeep/ezeepURLProvider.py +++ b/ezeep/ezeepURLProvider.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright 2021 Elliot Jordan # diff --git a/test/test_functional.py b/test/test_functional.py index a791d8ab..c666049a 100644 --- a/test/test_functional.py +++ b/test/test_functional.py @@ -1,11 +1,8 @@ -# -*- coding: utf-8 -*- - """test_functional.py. Functional tests for homebysix-recipes. """ - import os import plistlib import shutil