From bb1c82fb24cc15e841ed91fd1005945d501c2335 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Mon, 3 Jul 2023 17:31:25 -0300 Subject: [PATCH 1/9] pre-commit autoupdate --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2b88146..873bf81 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,19 +21,19 @@ repos: - from __future__ import annotations - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.275 + rev: v0.0.276 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade - rev: v3.7.0 + rev: v3.8.0 hooks: - id: pyupgrade args: - --py38-plus - repo: https://github.com/asottile/add-trailing-comma - rev: v2.5.1 + rev: v3.0.0 hooks: - id: add-trailing-comma args: @@ -50,6 +50,6 @@ repos: - id: validate-pyproject - repo: https://github.com/fsouza/mirrors-pyright - rev: v1.1.315 + rev: v1.1.316 hooks: - id: pyright From c8816e0fc02d4df4740bb0d5145eab75a9f22c56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 21:16:59 -0400 Subject: [PATCH 2/9] Bump actions/setup-python from 4.6.1 to 4.7.0 (#268) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.6.1 to 4.7.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4.6.1...v4.7.0) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/main.yaml | 6 +++--- .github/workflows/upload-to-pypi.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3d9fcb6..92aac74 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v3.5.3 - - uses: actions/setup-python@v4.6.1 + - uses: actions/setup-python@v4.7.0 with: python-version: ${{ matrix.python-version }} @@ -44,7 +44,7 @@ jobs: steps: - uses: actions/checkout@v3.5.3 - - uses: actions/setup-python@v4.6.1 + - uses: actions/setup-python@v4.7.0 with: python-version: 3.x @@ -68,7 +68,7 @@ jobs: steps: - uses: actions/checkout@v3.5.3 - - uses: actions/setup-python@v4.6.1 + - uses: actions/setup-python@v4.7.0 with: python-version: 3.x diff --git a/.github/workflows/upload-to-pypi.yml b/.github/workflows/upload-to-pypi.yml index 1c95bcd..c503364 100644 --- a/.github/workflows/upload-to-pypi.yml +++ b/.github/workflows/upload-to-pypi.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v3.5.3 - - uses: actions/setup-python@v4.6.1 + - uses: actions/setup-python@v4.7.0 with: python-version: 3.x From 01a7e9b52d4a5afea67975212f56b76da6e58818 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Fri, 28 Jul 2023 22:18:50 -0300 Subject: [PATCH 3/9] pre-commit autoupdate --- .pre-commit-config.yaml | 8 ++++---- test_autoflake.py | 14 +------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 873bf81..c37a5d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,12 +21,12 @@ repos: - from __future__ import annotations - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.276 + rev: v0.0.280 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade - rev: v3.8.0 + rev: v3.9.0 hooks: - id: pyupgrade args: @@ -40,7 +40,7 @@ repos: - --py36-plus - repo: https://github.com/psf/black - rev: "23.3.0" + rev: "23.7.0" hooks: - id: black @@ -50,6 +50,6 @@ repos: - id: validate-pyproject - repo: https://github.com/fsouza/mirrors-pyright - rev: v1.1.316 + rev: v1.1.319 hooks: - id: pyright diff --git a/test_autoflake.py b/test_autoflake.py index 507f69c..9acdbb3 100755 --- a/test_autoflake.py +++ b/test_autoflake.py @@ -3186,19 +3186,7 @@ def effective_path(self, path: str, is_file: bool = True) -> str: def create_dir(self, path) -> None: effective_path = self.effective_path(path, False) - if sys.version_info >= (3, 2, 0): - os.makedirs(effective_path, exist_ok=True) - else: - if os.path.exists(effective_path): - return - try: - os.mkdir(effective_path) - except OSError: - parent = os.path.split(path)[0] - if not parent: - raise - self.create_dir(parent) - os.mkdir(effective_path) + os.makedirs(effective_path, exist_ok=True) def create_file(self, path, contents="") -> None: effective_path = self.effective_path(path) From 85898d105a94a0130a4ac7d0c9a46a3a8c08d2b1 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Fri, 28 Jul 2023 22:19:00 -0300 Subject: [PATCH 4/9] autoflake: add missing type annotation --- autoflake.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoflake.py b/autoflake.py index 67815b0..d4ef466 100755 --- a/autoflake.py +++ b/autoflake.py @@ -1574,7 +1574,7 @@ def _main( return exit_status -def main(): +def main() -> int: """Command-line entry point.""" try: # Exit on broken pipe. From 8d20b6d597cc00731b7b1392ad56af9cb89f7374 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 19:57:55 -0400 Subject: [PATCH 5/9] Bump actions/checkout from 3.5.3 to 3.6.0 (#271) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.5.3...v3.6.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/main.yaml | 6 +++--- .github/workflows/upload-to-pypi.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 92aac74..d106891 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -25,7 +25,7 @@ jobs: name: tests runs-on: ${{ matrix.os }}-latest steps: - - uses: actions/checkout@v3.5.3 + - uses: actions/checkout@v3.6.0 - uses: actions/setup-python@v4.7.0 with: @@ -42,7 +42,7 @@ jobs: name: pre-commit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.3 + - uses: actions/checkout@v3.6.0 - uses: actions/setup-python@v4.7.0 with: @@ -66,7 +66,7 @@ jobs: name: fuzz runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.3 + - uses: actions/checkout@v3.6.0 - uses: actions/setup-python@v4.7.0 with: diff --git a/.github/workflows/upload-to-pypi.yml b/.github/workflows/upload-to-pypi.yml index c503364..02db64c 100644 --- a/.github/workflows/upload-to-pypi.yml +++ b/.github/workflows/upload-to-pypi.yml @@ -10,7 +10,7 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.3 + - uses: actions/checkout@v3.6.0 - uses: actions/setup-python@v4.7.0 with: From 11fda5403b1cd8029e98130bec7c8f46793cad5c Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Fri, 25 Aug 2023 20:06:31 -0400 Subject: [PATCH 6/9] pre-commit autoupdate --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c37a5d8..7b45abd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,19 +21,19 @@ repos: - from __future__ import annotations - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.280 + rev: v0.0.286 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.10.1 hooks: - id: pyupgrade args: - --py38-plus - repo: https://github.com/asottile/add-trailing-comma - rev: v3.0.0 + rev: v3.0.1 hooks: - id: add-trailing-comma args: @@ -45,11 +45,11 @@ repos: - id: black - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.13 + rev: v0.14 hooks: - id: validate-pyproject - repo: https://github.com/fsouza/mirrors-pyright - rev: v1.1.319 + rev: v1.1.324 hooks: - id: pyright From dce443b8caf019971505d35248cc89876bc3fe65 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:10:40 -0400 Subject: [PATCH 7/9] Remove py.typed Closes #272. --- py.typed | 0 pyproject.toml | 1 - 2 files changed, 1 deletion(-) delete mode 100644 py.typed diff --git a/py.typed b/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/pyproject.toml b/pyproject.toml index 52b36a8..2dee3f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,6 @@ exclude = ["/.github"] include = [ "/autoflake.py", "/test_autoflake.py", - "/py.typed", "/LICENSE", "/README.md", ] From 6dd02d42637c2de46d11dbccca07d41fe8fcb302 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:13:53 -0400 Subject: [PATCH 8/9] pre-commit autoupdate --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b45abd..41ccc12 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: - --py38-plus - repo: https://github.com/asottile/add-trailing-comma - rev: v3.0.1 + rev: v3.1.0 hooks: - id: add-trailing-comma args: @@ -50,6 +50,6 @@ repos: - id: validate-pyproject - repo: https://github.com/fsouza/mirrors-pyright - rev: v1.1.324 + rev: v1.1.325 hooks: - id: pyright From b142eaaa4ffee82898fb0f6a7dd0c4b0d0015ba3 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:15:05 -0400 Subject: [PATCH 9/9] Bump v2.2.1 --- README.md | 2 +- autoflake.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92dbf2a..eaa53b2 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ Add the following to your `.pre-commit-config.yaml` ```yaml - repo: https://github.com/PyCQA/autoflake - rev: v2.2.0 + rev: v2.2.1 hooks: - id: autoflake ``` diff --git a/autoflake.py b/autoflake.py index d4ef466..6bd31e9 100755 --- a/autoflake.py +++ b/autoflake.py @@ -50,7 +50,7 @@ import pyflakes.reporter -__version__ = "2.2.0" +__version__ = "2.2.1" _LOGGER = logging.getLogger("autoflake")