-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): Typing in generic + network
fix missing run
- Loading branch information
1 parent
8f1165d
commit bb5f120
Showing
10 changed files
with
239 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Description: This script reads the output of mypy and generates a summary of errors by file. | ||
|
||
import re | ||
import sys | ||
|
||
from rich.console import Console | ||
from rich.table import Table | ||
|
||
# Regular expression to match file path and error count | ||
pattern = r"(.*\.py:\d+):\s+error: (.*)" | ||
|
||
error_dict = {} | ||
|
||
for line in sys.stdin: | ||
match = re.search(pattern, line) | ||
if match: | ||
# Extract file path and error message | ||
file_path, _ = match.group(1).split(":") | ||
error_message = match.group(2) | ||
|
||
if file_path not in error_dict: | ||
error_dict[file_path] = 1 | ||
else: | ||
error_dict[file_path] += 1 | ||
|
||
table = Table(title="Error Summary") | ||
table.add_column("File Path") | ||
table.add_column("Errors", justify="left") | ||
|
||
for file_path, error_count in error_dict.items(): | ||
table.add_row(file_path, str(error_count)) | ||
|
||
console = Console() | ||
console.print(table) | ||
console.print(f"[red]Found {sum(error_dict.values())} errors in {len(error_dict)} files.[/red]") |