diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-19 14:52:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-19 14:53:01 +0000 |
commit | f3b6c222fb11c96e2f8bbaa0622f46c8ec486874 (patch) | |
tree | 0f38497775e27d3e16b20573b36dd22aa5b24f3e /qa/utils.py | |
parent | Releasing debian version 0.17.0-1. (diff) | |
download | gitlint-f3b6c222fb11c96e2f8bbaa0622f46c8ec486874.tar.xz gitlint-f3b6c222fb11c96e2f8bbaa0622f46c8ec486874.zip |
Merging upstream version 0.18.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/utils.py')
-rw-r--r-- | qa/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qa/utils.py b/qa/utils.py index c75872b..89292cd 100644 --- a/qa/utils.py +++ b/qa/utils.py @@ -22,7 +22,7 @@ PLATFORM_IS_WINDOWS = platform_is_windows() def use_sh_library(): - gitlint_use_sh_lib_env = os.environ.get('GITLINT_QA_USE_SH_LIB', None) + gitlint_use_sh_lib_env = os.environ.get("GITLINT_QA_USE_SH_LIB", None) if gitlint_use_sh_lib_env: return gitlint_use_sh_lib_env == "1" return not PLATFORM_IS_WINDOWS @@ -35,8 +35,8 @@ USE_SH_LIB = use_sh_library() def getpreferredencoding(): - """ Modified version of local.getpreferredencoding() that takes into account LC_ALL, LC_CTYPE, LANG env vars - on windows and falls back to UTF-8. """ + """Modified version of local.getpreferredencoding() that takes into account LC_ALL, LC_CTYPE, LANG env vars + on windows and falls back to UTF-8.""" default_encoding = locale.getpreferredencoding() or "UTF-8" # On Windows, we mimic git/linux by trying to read the LC_ALL, LC_CTYPE, LANG env vars manually @@ -51,7 +51,7 @@ def getpreferredencoding(): # If encoding contains a dot: split and use second part, otherwise use everything dot_index = encoding.find(".") if dot_index != -1: - default_encoding = encoding[dot_index + 1:] + default_encoding = encoding[dot_index + 1 :] else: default_encoding = encoding break |