File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 3
3
"""
4
4
5
5
import glob
6
- import tomllib
7
- import toml
8
6
import subprocess
9
7
import sys
10
8
9
+ # Ignoring errors since this script is run in a controlled environment
10
+ import toml # type: ignore # pyright: ignore[reportMissingModuleSource]
11
+ import tomllib # type: ignore # pyright: ignore[reportMissingImports]
12
+
11
13
12
14
def main (* args ):
13
15
pkg = args [1 ]
Original file line number Diff line number Diff line change 1
1
"""python scripts/update_mypy_ruff.py"""
2
2
3
3
import glob
4
- import tomllib
4
+ import re
5
+ import subprocess
5
6
from pathlib import Path
6
7
7
- import toml
8
- import subprocess
9
- import re
8
+ # Ignoring errors since this script is run in a controlled environment
9
+ import toml # type: ignore # pyright: ignore[reportMissingModuleSource]
10
+ import tomllib # type: ignore # pyright: ignore[reportMissingImports]
10
11
11
12
ROOT_DIR = Path (__file__ ).parents [1 ]
12
13
@@ -50,10 +51,9 @@ def main():
50
51
51
52
to_ignore = {}
52
53
for l in logs :
53
- if re .match ("^(.*)\:(\d+)\: error:.*\[(.*)\]" , l ):
54
- path , line_no , error_type = re .match (
55
- "^(.*)\:(\d+)\: error:.*\[(.*)\]" , l
56
- ).groups ()
54
+ match = re .match (r"^(.*):(\d+): error:.*\[(.*)\]" , l )
55
+ if match :
56
+ path , line_no , error_type = match .groups ()
57
57
if (path , line_no ) in to_ignore :
58
58
to_ignore [(path , line_no )].append (error_type )
59
59
else :
You can’t perform that action at this time.
0 commit comments