File tree 4 files changed +10
-10
lines changed
4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
from pathlib import Path
2
- import typing as T
2
+ from collections . abc import Iterator
3
3
import shutil
4
4
5
5
6
- def find_matching_file (path : Path , fn : str ) -> T . Iterator [Path ]:
6
+ def find_matching_file (path : Path , fn : str ) -> Iterator [Path ]:
7
7
"""
8
8
if full path file is found, return that filename
9
9
@@ -29,7 +29,7 @@ def find_matching_file(path: Path, fn: str) -> T.Iterator[Path]:
29
29
yield d
30
30
31
31
32
- def find_dir_missing_file (path : Path , fn : str , copyfile : Path | None = None ) -> T . Iterator [Path ]:
32
+ def find_dir_missing_file (path : Path , fn : str , copyfile : Path | None = None ) -> Iterator [Path ]:
33
33
"""
34
34
if directory is missing a file, copy the file to that directory
35
35
Original file line number Diff line number Diff line change 4
4
5
5
from pathlib import Path
6
6
import subprocess
7
- import typing
7
+ from collections . abc import Iterator
8
8
import shutil
9
9
import functools
10
10
import os
@@ -45,7 +45,7 @@ def git_exe() -> str:
45
45
return exe
46
46
47
47
48
- def gitdirs (path : Path ) -> typing . Iterator [Path ]:
48
+ def gitdirs (path : Path ) -> Iterator [Path ]:
49
49
"""
50
50
Generator for Git directories
51
51
Original file line number Diff line number Diff line change 3
3
"""
4
4
5
5
from pathlib import Path
6
- import typing as T
6
+ from collections . abc import Iterator , Iterable
7
7
import collections
8
8
import logging
9
9
import subprocess
15
15
16
16
def gitemail (
17
17
path : Path , exclude : str | None = None , timeout = TIMEOUT ["local" ]
18
- ) -> T . Iterator [tuple [Path , list [tuple [str , int ]]]]:
18
+ ) -> Iterator [tuple [Path , list [tuple [str , int ]]]]:
19
19
"""
20
20
returns email addresses of everyone who ever made a Git commit in this repo.
21
21
@@ -46,7 +46,7 @@ def gitemail(
46
46
logging .error (f"{ path } { e } " )
47
47
continue
48
48
49
- addrs : T . Iterable [str ] = filter (None , ret .replace ('"' , "" ).split ("\n " ))
49
+ addrs : Iterable [str ] = filter (None , ret .replace ('"' , "" ).split ("\n " ))
50
50
# remove blanks
51
51
if exclude :
52
52
addrs = (n for n in addrs if not n .startswith (exclude ))
Original file line number Diff line number Diff line change 3
3
"""
4
4
5
5
import argparse
6
- import typing
6
+ from collections . abc import Iterator
7
7
from pathlib import Path
8
8
import asyncio
9
9
from pprint import pprint
15
15
from .status_cmd import git_status_serial , git_status_async
16
16
17
17
18
- def git_status (path : Path , verbose : bool ) -> typing . Iterator [tuple [Path , dict ]]:
18
+ def git_status (path : Path , verbose : bool ) -> Iterator [tuple [Path , dict ]]:
19
19
20
20
for d in gitdirs (path ):
21
21
repo = pygit2 .Repository (d )
You can’t perform that action at this time.
0 commit comments