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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply black to tools/ and setup.py #1087

Merged
merged 6 commits into from
Jul 18, 2021

Conversation

neiljp
Copy link
Collaborator

@neiljp neiljp commented Jul 18, 2021

What does this PR do?

With tools/ and setup.py included in black linting, all python files will then be checked by black 馃帀

These were originally excluded for simplicity, but to remove certain linting rules it is useful to ensure black is applied to all python files, such as for line length ie. removing flake8 rule E501 in #1084

This is a partial fix towards #1047

Tested?

  • Manually
  • Existing tests (adapted, if necessary)
  • New tests added (for any new behavior)
  • Passed linting & tests (each commit)

Commit flow
As per the original main black transition:

  • adapt a few files for things black has issues with or can be handled manually simply
  • apply black without quote adjustment (just structure; needs more review)
  • apply black with quote adjustment (generally no need to review as black just does it fine)
  • enforce black in tools

Interactions
I'd like to merge this before #1084, since that PR currently loosens our flake8 rules based on the premise that black is being applied.

NOTE: tools/lister.py was imported from zulip/zulip as a helper for
tools/run-mypy and has not been edited directly significantly
subsequently.

As such, no specific allowances are made in applying black to lister.py,
since black preserves functionality and in future we expect to move to
the lister functionality present in zulint.
@neiljp neiljp added the area: infrastructure Project infrastructure label Jul 18, 2021
@zulipbot zulipbot added the size: XL [Automatic label added by zulipbot] label Jul 18, 2021
@neiljp neiljp added this to the Next Release milestone Jul 18, 2021
@neiljp neiljp merged commit 926dfdc into zulip:main Jul 18, 2021
@neiljp neiljp mentioned this pull request Jul 21, 2021
4 tasks
@zulipbot
Copy link
Member

Hello @zulip/server-refactoring members, this pull request was labeled with the "area: refactoring" label, so you may want to check it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Project infrastructure area: refactoring size: XL [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants