Merged
Conversation
This is the first pass for some subdirectories.
Recurring issues include:
1. Inconsistent quote chars. Use the same quote character as the first
use in the file (usually single-quote). Double quotes are OK if the
quoted string contains single quotes.
2. Bad indentation. Indent 2 for logic, 4 for continuations if the
previous line ends with '(', '[', or '{'. If drop does not immediately
follow the group-symbol, align with the opening group-symbol. I suggest
immediate drops, since these are stable if the content of the first
line changes, while aligning with the opening group-symbol requires
shifting the continuation lines.
3. Bad docstrings. A full docstring looks like:
"""Initial line ending with punctuation.
Optional text.
Args:
Arg1: Description.
Arg2: Description with
indented continuation.
Returns:
Return text.
Raises:
ErrorClass: Description.
"""
4. Vertical spacing. Exactly two blank lines before top-level classes
or functions. Exactly one blank line before non-top-level classes or
functions. No more than one blank line within top-level constructs.
Contributor
Author
|
@michael-berlin I think this is the last, broad python lint-oriented change I want to do. After this, we should make python linter available to keep commits compliant with our python coding style. |
Contributor
|
LGTM Just spot checked a bunch of random places, this looks awesome, thanks for doing it! |
Contributor
|
LGTM I also went over it. Yes, I agree. We must lint the code at precommit then. |
dumbunny
added a commit
that referenced
this pull request
Aug 31, 2015
notfelineit
pushed a commit
to planetscale/vitess
that referenced
this pull request
Sep 21, 2022
…itessio#1061) * refactor: make recovery Function code as the identifier of a function code and use it for finding if their is an actionable recovery and the recovery function Signed-off-by: Manan Gupta <manan@planetscale.com> * feat: remvoe a TODO in checkIfAlreadyFixed by sending the cluster name when getting replication analysis Signed-off-by: Manan Gupta <manan@planetscale.com> * feat: refactor refersh code logic to only refresh required information instead of the big-hammer approach of refreshing everything Signed-off-by: Manan Gupta <manan@planetscale.com> * feat: add logs and refresh for analyzed instance after a recovery Signed-off-by: Manan Gupta <manan@planetscale.com> * refactor: fix typing error in comments Signed-off-by: Manan Gupta <manan@planetscale.com> * feat: use context.Background() instead of nil Signed-off-by: Manan Gupta <manan@planetscale.com> * test: add testing for refreshTabletsInKeyspaceShard Signed-off-by: Manan Gupta <manan@planetscale.com> * test: add tests for shardPrimary function and also fix its implementation Signed-off-by: Manan Gupta <manan@planetscale.com> * feat: address review comments Signed-off-by: Manan Gupta <manan@planetscale.com> * test: use cmp with proto.Equal Signed-off-by: Manan Gupta <manan@planetscale.com> Signed-off-by: Manan Gupta <manan@planetscale.com> Signed-off-by: Manan Gupta <manan@planetscale.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix python lint errors: first pass for subdirectories of test, second pass for others.