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.4
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.1.0
Choose a head ref
Loading
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ YOUR CODE
```

Command Line
```shell
```console
$ autopep8
```

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -36,18 +36,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
13 changes: 7 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "pypy3.9"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "pypy3.10"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -34,7 +34,7 @@ jobs:
flake8 autopep8.py
pycodestyle autopep8.py
- name: doctest for readme
if: matrix.python-version == 3.9
if: matrix.python-version == 3.11
run: |
python -m doctest -v README.rst
- name: Test with pytest
@@ -47,7 +47,8 @@ jobs:
python test/acid.py --pycodestyle= --line-range 289 925 test/vectors_example.py
python test/test_suite.py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.python-version == 3.9 && success()
uses: codecov/codecov-action@v4
if: matrix.python-version == 3.11 && success()
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -18,3 +18,4 @@ coverage.xml
dist
htmlcov
pep8.py
test/suite/out/*.py.err
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -7,13 +7,11 @@ include test/bad_encoding2.py
include test/e101_example.py
include test/example
include test/example/x.py
include test/example_with_reduce.py
include test/example.py
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
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -47,7 +47,6 @@ test_fast:
test_ci:
pytest --cov-report xml --cov=autopep8
@${PYTHON} test/acid.py -aaa --experimental test/example.py
@${PYTHON} test/acid.py -aaa --experimental test/example_with_reduce.py
@${PYTHON} test/acid.py --pycodestyle= -aaa --compare-bytecode --experimental test/example.py
@${PYTHON} test/acid.py --pycodestyle= --aggressive --line-range 550 610 test/inspect_example.py
@${PYTHON} test/acid.py --pycodestyle= --line-range 289 925 test/vectors_example.py
6 changes: 1 addition & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -246,13 +246,9 @@ autopep8 fixes the following issues_ reported by pycodestyle_::
W503 - Fix line break before binary operator.
W504 - Fix line break after binary operator.
W605 - Fix invalid escape sequence 'x'.
W690 - Fix various deprecated code (via lib2to3).

autopep8 also fixes some issues not found by pycodestyle_.

- Correct deprecated or non-idiomatic Python code (via ``lib2to3``). Use this
for making Python 2.7 code more compatible with Python 3. (This is triggered
if ``W690`` is enabled.)
- Normalize files with mixed line endings.
- Put a blank line between a class docstring and its first method
declaration. (Enabled with ``E301``.)
@@ -408,7 +404,7 @@ Testing
Test cases are in ``test/test_autopep8.py``. They can be run directly via
``python test/test_autopep8.py`` or via tox_. The latter is useful for
testing against multiple Python interpreters. (We currently test against
CPython versions 3.7, 3.8, 3.9 and 3.10. We also test against PyPy.)
CPython versions 3.8, 3.9, 3.10, 3.11 and 3.12. We also test against PyPy.)

.. _`tox`: https://pypi.org/project/tox/

Loading