-
-
Notifications
You must be signed in to change notification settings - Fork 274
Migrate to black #1039
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
Merged
Merged
Migrate to black #1039
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
1445b54
refactor: tests: model: Extract CONTROLLER constant to simplify patches.
neiljp 7e441e0
refactor: tests: model: Extract MODEL constant to simplify patches.
neiljp 2ef40d8
refactor: tests: model/boxes: Extract variables to simplify tests.
neiljp 2127faa
refactor: tests: Simplify parametrize names into single strings.
neiljp f8b9e55
refactor: tests: Simplify parametrize names & minimally indent.
neiljp b5246ab
refactor: tests: run/ui/model/core: Simplify multi-line strings.
neiljp a8488ef
refactor: tests: ui/ui_tools/model: Remove unnecessary parentheses.
neiljp 3347195
refactor: tests: model/run/popups/boxes/ui_tools: Remove commas.
neiljp cefcd55
refactor: tests: boxes: Use standard 'case' for param import.
neiljp 3f5ab97
refactor: tests: model/boxes/buttons/ui_tools: Inline test ids.
neiljp e638572
refactor: tests: ui_tools: Reformat soup2markup parametrize entries.
neiljp 3a1847e
refactor: tests: ui_tools: Inline soup2markup test ids.
neiljp 399493f
refactor: tests: helper: Indent outside-narrow test cases & add `case`.
neiljp 3185035
tests: helper: Add inline outside-narrow test ids.
neiljp 6117cf4
refactor: tests: model/ui_tools: Adjust comment placement.
neiljp 2c4170b
refactor: tests: ui_tools: Add parentheses around multi-line string.
neiljp 85533b8
refactor: tests: ui_tools: Add commas to ids for consistent formatting.
neiljp 3d51bcd
refactor: tests: run: Disable formatting around test parametrize grid.
neiljp e878e20
refactor: tests: ui_tools: Indent & disable formatting for blockquote.
neiljp 572369f
refactor: core/ui/model/tables/boxes: Remove trailing commas.
neiljp 26081f3
refactor: run: Add trailing commas to argparse entries for consistency.
neiljp 5487ac6
refactor: core/ui/boxes/run: Simplify implicitly joined strings.
neiljp 937a82f
refactor: model/run/boxes/helper: Remove unnecessary parentheses.
neiljp 6ee42d0
refactor: buttons/boxes: Reformat to maintain comment locations.
neiljp bc0aa3a
refactor: keys/themes: Disable reformatting for config datastructures.
neiljp 579bf27
unicode_emojis: Update list of unicode emojis from server using script.
neiljp 10a9605
unicode_emojis/tools: Update & run tool to make black-compatible data.
neiljp 7cd6d00
linting/requirements: Add linting dependency on black & configuration.
neiljp 89a1925
linting: Stop enforcing E203 via flake8, which conflicts with black.
neiljp 7321281
refactor: Reformat zulipterminal/ and tests/ with black, except quotes.
neiljp 17c9959
refactor: Reformat zulipterminal/ and tests/ with black (incl quotes).
neiljp 49e1d40
makefile/lint-all: Add support for linting & fixing formatting by black.
neiljp b8e910d
lint-and-test: Check conformance with black in CI.
neiljp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to point that I had a PR #959 that does a general simplification of patches in all tests. Let me know if I should make it review-ready if we wish to merge it first.
EDIT: I just updated that PR after rebasing and resolving conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ezio-Sarthak Thanks for reminding me of your PR 👍
I welcome your intent to add more constants to improve readability; the main challenge with using these is that we don't currently have much of a "standard" way of applying these constants - or it seems that way, but isn't quite. In some pre-existing cases we have files referred to, others to classes, and I think this is where we would benefit from standardizing and clarying. You'll note that in my commit I only extracted the classes, since they were both the longest - so more likely to benefit from compacting the long lines - but also that it made clear that others were module-specific, either imports or not in the main class.