Skip to content

Conversation

@anilbey
Copy link
Contributor

@anilbey anilbey commented Jul 16, 2022

Description

Small refactors to simplify the codebase.

  • use constructor call to avoid loops
  • use comprehension in simple cases

@github-actions

This comment has been minimized.

mypy/stubgenc.py Outdated
output = []
for line in sorted(set(imports)):
output.append(line)
output = list(sorted(set(imports)))
Copy link
Member

Choose a reason for hiding this comment

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

sorted() already returns a list

Suggested change
output = list(sorted(set(imports)))
output = sorted(set(imports))

Co-authored-by: Alex Waygood <[email protected]>
@github-actions
Copy link
Contributor

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

@hauntsaninja hauntsaninja merged commit 8428af7 into python:master Jul 17, 2022
@hauntsaninja
Copy link
Collaborator

Thanks!

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.

3 participants