From 7e48b4049ab51bd74e95928d4f151b3bcbd5c585 Mon Sep 17 00:00:00 2001 From: Kajsa <58070002+keriksson-rosenqvist@users.noreply.github.com> Date: Fri, 4 Aug 2023 10:58:35 +0200 Subject: [PATCH 1/3] Update MANIFEST.in Added missing .pre-commit-hooks.yaml to fix broken external usage --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 0c43f759..ff0977c9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -13,6 +13,7 @@ include test/iso_8859_1.py include test/fake_configuration/.pep8 include test/fake_pycodestyle_configuration/tox.ini include tox.ini +include .pre-commit-hooks.yaml recursive-exclude test/suite *.py recursive-exclude test/suite/out *.py exclude .travis.yml From 028f68f81ee4b29111b3b1814d53476dfc91d78f Mon Sep 17 00:00:00 2001 From: Kajsa Eriksson Rosenqvist Date: Fri, 4 Aug 2023 12:09:34 +0100 Subject: [PATCH 2/3] Version dependent operator whitespace function. --- autopep8.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/autopep8.py b/autopep8.py index 5e2a9fda..727b1cc0 100755 --- a/autopep8.py +++ b/autopep8.py @@ -84,6 +84,7 @@ class documentation for more information. import warnings import ast from configparser import ConfigParser as SafeConfigParser, Error +from packaging.version import parse as parse_version import pycodestyle from pycodestyle import STARTSWITH_INDENT_STATEMENT_REGEX @@ -757,8 +758,16 @@ def fix_e225(self, result): return if not check_syntax(fixed.lstrip()): return + if ( + parse_version(pycodestyle.__version__) >= + parse_version("2.11.0") + ): + operator_whitespace = pycodestyle.missing_whitespace + else: + operator_whitespace = \ + pycodestyle.missing_whitespace_around_operator errors = list( - pycodestyle.missing_whitespace_around_operator(fixed, ts)) + operator_whitespace(fixed, ts)) for e in reversed(errors): if error_code != e[1].split()[0]: continue From c3fdfe4c45b0ba9d7b6256b44de15973d05c5740 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Fri, 25 Aug 2023 22:00:30 +0900 Subject: [PATCH 3/3] version 2.0.3 --- autopep8.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopep8.py b/autopep8.py index 727b1cc0..03cf8c35 100755 --- a/autopep8.py +++ b/autopep8.py @@ -90,7 +90,7 @@ class documentation for more information. from pycodestyle import STARTSWITH_INDENT_STATEMENT_REGEX -__version__ = '2.0.2' +__version__ = '2.0.3' CR = '\r'