flake8
-
rbtools/commands/__init__.py (Diff revision 1) Show all issues -
Review Request #11405 — Created Jan. 24, 2021 and updated
Information | |
---|---|
amohapatra | |
RBTools | |
master | |
Reviewers | |
rbtools, students | |
RBTools current must scan the filesystem when a user does not specify a repository name or repository type which is very slow. In order to optimize RBTools, we will log hints that recommends setting repository name or type when it already has not been specified. An option --no-hints is added so users can disable hints if desired.
I ran
./tests/runtests.py rbtools/
and have 263 tests passing and have done
manual testing on different rbtools commands to ensure that the --no-hints
option is working and is also presented as an option to the user when they
typerbt [command] --help
.
Summary | Author | |
---|---|---|
anahita-m |
Description | From | Last Updated |
---|---|---|
E501 line too long (93 > 79 characters) |
![]() |
|
E501 line too long (89 > 79 characters) |
![]() |
|
E122 continuation line missing indentation or outdented |
![]() |
|
E502 the backslash is redundant between brackets |
![]() |
|
This should be "True" instead of "TRUE" |
|
|
Let's say "RBTools commands may print helpful hints" |
|
|
"be provided" suggests to me that one could specify a value. Perhaps say "Hints can also be disabled by passing ... |
|
|
Setting the repository type and name each enable different optimizations, and for best results users should have both in their ... |
|
|
This was already mixed up, but can we alphabetize this by key while we're editing it? That'll make it easier ... |
|
|
Space at the end of the string after the . |
|
|
These log messages don't make it entirely clear why the user should set these or what the consequences are of ... |
|
|
E501 line too long (83 > 79 characters) |
![]() |
rbtools/commands/__init__.py (Diff revision 1) |
---|
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+36 -2) |
rbtools/commands/__init__.py (Diff revision 2) |
---|
E122 continuation line missing indentation or outdented
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+36 -2) |
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+68 -2) |
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+70 -2) |
Testing Done: |
|
---|
Testing Done: |
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Groups: |
|
Testing Done: |
|
---|
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+70 -2) |
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 7 (+70 -2) |
docs/rbtools/rbt/configuration/users.rst (Diff revision 7) |
---|
Let's say "RBTools commands may print helpful hints"
docs/rbtools/rbt/configuration/users.rst (Diff revision 7) |
---|
"be provided" suggests to me that one could specify a value. Perhaps say "Hints can also be disabled by passing ..."?
rbtools/commands/__init__.py (Diff revision 7) |
---|
Setting the repository type and name each enable different optimizations, and for best results users should have both in their config file. We should probably have separate hints.
Also, FYI, when we're wrapping a conditional like this we prefer using parentheses instead of the continuation character:
if (self.options.repository_name is None and self.options.repository_type is None):
rbtools/utils/commands.py (Diff revision 7) |
---|
This was already mixed up, but can we alphabetize this by key while we're editing it? That'll make it easier to read.
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 8 (+84 -12) |
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 9 (+86 -12) |
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 10 (+86 -12) |
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 11 (+88 -12) |
rbtools/commands/__init__.py (Diff revision 11) |
---|
These log messages don't make it entirely clear why the user should set these or what the consequences are of not doing so. How about something like:
RBTools is auto-detecting the repository type, which can be slow. Adding REPOSITORY_TYPE to your .reviewboardrc will speed up rbt commands. Set ENABLE_HINTS=False to suppress this message.
RBTools is attempting to discover the matching repository in the Review Board server. Adding REPOSITORY_NAME to your .reviewboardrc will speed up rbt commands. Set ENABLE_HINTS=False to suppress this message.
Looking at those, I'm reconsidering my suggesting to combine them into a single message, but maybe there's a good way to word a single message without it being too excessively long.
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 12 (+128 -12) |
Commits: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 13 (+128 -12) |