Skip to content
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

Counting files before error message #9087

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

jnt0rrente
Copy link
Contributor

@jnt0rrente jnt0rrente commented Sep 26, 2024

Adds a counter for number of files seen. Only shows "too many files" error message if bigger than a given number (hardcoded to 50 same as number of seconds is hardcoded to 10).

This ensures the error suggesting opening a subfolder is only thrown when the long operation time for directory reading is actually due to the number of files being read (as opposed to very large, very few files).

Adds a counter for number of files seen. Only shows "too many files" error message if bigger than a given number (hardcoded to 50 same as number of seconds is hardcoded to 10).

This avoids throwing the error suggesting opening a subfolder when the long operation time for directory reading is actually due to the number of files being read (as opposed to very large, very few files).
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@erictraut erictraut merged commit d0cabb7 into microsoft:main Sep 26, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants