Skip to content

Commit

Permalink
Merge pull request #341 from asottile/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
asottile authored Jul 30, 2024
2 parents 3ff84cc + e501c85 commit e3ac919
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand Down
2 changes: 1 addition & 1 deletion all_repos/autofix/pre_commit_autoupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


@contextlib.contextmanager
def tmp_pre_commit_home() -> Generator[None, None, None]:
def tmp_pre_commit_home() -> Generator[None]:
"""During lots of autoupdates, many repositories will be cloned into the
pre-commit directory. This prevents leaving many MB/GB of repositories
behind due to this autofixer. This context creates a temporary directory
Expand Down
2 changes: 1 addition & 1 deletion all_repos/autofix_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def target_branch() -> str:


@contextlib.contextmanager
def repo_context(repo: str, *, use_color: bool) -> Generator[None, None, None]:
def repo_context(repo: str, *, use_color: bool) -> Generator[None]:
print(color.fmt(f'***{repo}', color.TURQUOISE_H, use_color=use_color))
try:
remote = git.remote(repo)
Expand Down
2 changes: 1 addition & 1 deletion all_repos/clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

def _get_current_state_helper(
path: str,
) -> Generator[tuple[str, str], None, None]:
) -> Generator[tuple[str, str]]:
if not os.path.exists(path):
return

Expand Down
6 changes: 3 additions & 3 deletions all_repos/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ def exhaust(gen: Iterable[T]) -> None:

@contextlib.contextmanager
def _in_process() -> Generator[
Callable[[Callable[[T2], T], Iterable[T2]], Iterable[T]], None, None,
Callable[[Callable[[T2], T], Iterable[T2]], Iterable[T]],
]:
yield map


@contextlib.contextmanager
def _threads(jobs: int) -> Generator[
Callable[[Callable[[T2], T], Iterable[T2]], Iterable[T]], None, None,
Callable[[Callable[[T2], T], Iterable[T2]], Iterable[T]],
]:
with concurrent.futures.ThreadPoolExecutor(jobs) as ex:
yield ex.map
Expand All @@ -43,7 +43,7 @@ def thread_mapper(jobs: int) -> ContextManager[

@contextlib.contextmanager
def _processes(jobs: int) -> Generator[
Callable[[Callable[[T2], T], Iterable[T2]], Iterable[T]], None, None,
Callable[[Callable[[T2], T], Iterable[T2]], Iterable[T]],
]:
with concurrent.futures.ProcessPoolExecutor(jobs) as ex:
yield ex.map
Expand Down
2 changes: 1 addition & 1 deletion all_repos/sed.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def find_repos(
config: Config,
*,
ls_files_cmd: Sequence[str],
) -> Generator[str, None, None]:
) -> Generator[str]:
for repo in config.get_cloned_repos():
repo_dir = os.path.join(config.output_dir, repo)
if subprocess.run(
Expand Down

0 comments on commit e3ac919

Please sign in to comment.