diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3d9fcb6..d106891 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -25,9 +25,9 @@ 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.6.1 + - uses: actions/setup-python@v4.7.0 with: python-version: ${{ matrix.python-version }} @@ -42,9 +42,9 @@ 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.6.1 + - uses: actions/setup-python@v4.7.0 with: python-version: 3.x @@ -66,9 +66,9 @@ 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.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..02db64c 100644 --- a/.github/workflows/upload-to-pypi.yml +++ b/.github/workflows/upload-to-pypi.yml @@ -10,9 +10,9 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.3 + - uses: actions/checkout@v3.6.0 - - uses: actions/setup-python@v4.6.1 + - uses: actions/setup-python@v4.7.0 with: python-version: 3.x diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2b88146..41ccc12 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,35 +21,35 @@ repos: - from __future__ import annotations - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.275 + rev: v0.0.286 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade - rev: v3.7.0 + rev: v3.10.1 hooks: - id: pyupgrade args: - --py38-plus - repo: https://github.com/asottile/add-trailing-comma - rev: v2.5.1 + rev: v3.1.0 hooks: - id: add-trailing-comma args: - --py36-plus - repo: https://github.com/psf/black - rev: "23.3.0" + rev: "23.7.0" hooks: - 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.315 + rev: v1.1.325 hooks: - id: pyright 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 67815b0..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") @@ -1574,7 +1574,7 @@ def _main( return exit_status -def main(): +def main() -> int: """Command-line entry point.""" try: # Exit on broken pipe. 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", ] 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)