KEMBAR78
Fix: Empty reveal locals ouput by cibinmathew · Pull Request #12400 · python/mypy · GitHub
Skip to content

Conversation

cibinmathew
Copy link
Contributor

Fixes #12388

@JelleZijlstra JelleZijlstra self-assigned this Mar 21, 2022
@github-actions

This comment has been minimized.

Copy link
Collaborator

@97littleleaf11 97littleleaf11 left a comment

Choose a reason for hiding this comment

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

The outer list comprehension could be simplified. Just move the format string to the first arg of self.note.

@cibinmathew
Copy link
Contributor Author

cibinmathew commented Mar 21, 2022

The outer list comprehension could be simplified. Just move the format string to the first arg of self.note.

@97littleleaf11 not sure if I got it correctly.

Is it something like converting below

for line in ['    {}: {}'.format(k, v) for k, v in sorted_locals.items()]:
    self.note(line, context)

to

for k,v in sorted_locals.items():
    self.note('    {}: {}'.format(k, v), context)

@jhance
Copy link
Collaborator

jhance commented Mar 21, 2022

Flake8 issue is unrelated, FYI.

@cibinmathew cibinmathew marked this pull request as ready for review March 21, 2022 17:35
@cibinmathew
Copy link
Contributor Author

added feedback changes.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@97littleleaf11 97littleleaf11 merged commit 49825a9 into python:master Mar 22, 2022
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.

(🐞) Empty reveal locals should have a better output

4 participants