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

Integrate verbose logging with get_sources #3749

Merged
merged 4 commits into from
Jun 25, 2023

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Jun 24, 2023

Currently the verbose logging for "Sources to be formatted" is a little suspect in that it is a completely different code path from get_sources.

This can result in bugs like #3216 (comment) and generally limits the value of these logs.

This does change the "when" of this log and splits it out across multiple lines, but the colours help separate it from the even more verbose logs.

Currently the verbose logging for "Sources to be formatted" is a little
suspect in that it is a completely different code path from
`get_sources`.

This can result in bugs like psf#3216 (comment)
and generally limits the value of these logs.

This does change the "when" of this log, but the colours help separate
it from the even more verbose logs.
@hauntsaninja
Copy link
Collaborator Author

I'm also interested in this now because we spend a lot of time in Path.resolve via normalize_path_maybe_ignore and I want to see if I can reduce that cost.

@@ -653,7 +633,11 @@ def get_sources(
if is_stdin or p.is_file():
normalized_path = normalize_path_maybe_ignore(p, ctx.obj["root"], report)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the mypyc build is broken here (see the diff-shades output in CI); it infers None for this variable.

@github-actions
Copy link

diff-shades reports zero changes comparing this PR (307985b) to main (7be2735).


What is this? | Workflow run | diff-shades documentation

@JelleZijlstra JelleZijlstra merged commit 93989e9 into psf:main Jun 25, 2023
@hauntsaninja hauntsaninja deleted the verbose-log branch June 25, 2023 00:51
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