-
-
Notifications
You must be signed in to change notification settings - Fork 46.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mypy: Exclude only 20 files that are still failing #5608
Conversation
Let's see what is required to finish #4052
|
The numbers are total number of errors per directory. The files per directory are lower. On current master (11a15cc) % git checkout master
% (mypy --ignore-missing-imports --install-types --non-interactive *(/) 2>&1 >/dev/null)| cut -f1 -d: | sort | uniq | cut -f1 -d/ | sort | uniq -c
8 data_structures
4 graphs
5 maths
1 matrix
7 other
2 searches
5 ven |
Found 204 errors in 24 files (checked 976 source files) 30 fixed in data_structures
|
The middle three were autoclosed by the bot for "multiple PR detected", so if they could be re-opened and reviewed, that'd be appreciated. [ #5648 #5653 #5656 ]
|
Thanks for the info. It's a bummer, of course. |
Improvements!
Perhaps we should start |
with open("mypy_output.txt") as in_file:
filenames = sorted({line.split(':')[0] for line in in_file if ':' in line})
print(f"{len(filenames) = }")
# print("\n".join(f" --exclude {name}" for name in filenames))
print(f"--exclude ({'|'.join(filenames)})") |
@dhruvmanila Please let me know why the |
Probably due to the After removing that, it most likely still won't work, since you're calling mypy with specific directories. The exclude regex needs to be relative to the directory that is used as the root for discovery. |
I was talking about the mypy run on line 24. |
Co-authored-by: Dylan Buchi <devybuchi@gmail.com>
@dylanbuchi AWESOME!! I own you a beer!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small nitpick, otherwise LGTM 👍
@@ -1,5 +1,6 @@ | |||
[mypy] | |||
ignore_missing_imports = True | |||
install_types = True | |||
non_interactive = True | |||
exclude = (data_structures/stacks/next_greater_element.py|graphs/boruvka.py|graphs/breadth_first_search.py|graphs/breadth_first_search_2.py|graphs/check_cycle.py|graphs/finding_bridges.py|graphs/greedy_min_vertex_cover.py|graphs/random_graph_generator.py|maths/average_mode.py|maths/gamma_recursive.py|maths/proth_number.py|maths/series/geometric_series.py|maths/series/p_series.py|matrix_operation.py|other/fischer_yates_shuffle.py|other/least_recently_used.py|other/lfu_cache.py|other/lru_cache.py|searches/simulated_annealing.py|searches/ternary_search.py) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could be done on multiline if possible for better readability. If not possible, then ignore this comment.
Let's see what is required to finish #4052
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.