Skip to content

Commit

Permalink
pre-commit autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Jul 29, 2023
1 parent c8816e0 commit 01a7e9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -40,7 +40,7 @@ repos:
- --py36-plus

- repo: https://github.com/psf/black
rev: "23.3.0"
rev: "23.7.0"
hooks:
- id: black

Expand All @@ -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
14 changes: 1 addition & 13 deletions test_autoflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 01a7e9b

Please sign in to comment.