Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hhatto/autopep8
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.3
Choose a base ref
...
head repository: hhatto/autopep8
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.4
Choose a head ref
  • 5 commits
  • 1 file changed
  • 2 contributors

Commits on Aug 13, 2023

  1. Copy the full SHA
    f961833 View commit details

Commits on Aug 26, 2023

  1. Copy the full SHA
    daa0cce View commit details
  2. remove: import packaging

    hhatto committed Aug 26, 2023
    Copy the full SHA
    f0138a0 View commit details
  3. Merge pull request #704 from hhatto/paugier-fix-pycodestyle-missing_w…

    …hitespace
    
    Paugier fix pycodestyle missing whitespace
    hhatto authored Aug 26, 2023
    Copy the full SHA
    fbedc22 View commit details
  4. version 2.0.4

    hhatto committed Aug 26, 2023
    Copy the full SHA
    8f12c0a View commit details
Showing with 9 additions and 12 deletions.
  1. +9 −12 autopep8.py
21 changes: 9 additions & 12 deletions autopep8.py
Original file line number Diff line number Diff line change
@@ -84,13 +84,12 @@ 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


__version__ = '2.0.3'
__version__ = '2.0.4'


CR = '\r'
@@ -758,16 +757,14 @@ 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(
operator_whitespace(fixed, ts))
try:
_missing_whitespace = (
pycodestyle.missing_whitespace_around_operator
)
except AttributeError:
# pycodestyle >= 2.11.0
_missing_whitespace = pycodestyle.missing_whitespace
errors = list(_missing_whitespace(fixed, ts))
for e in reversed(errors):
if error_code != e[1].split()[0]:
continue