flake8
-
reviewboard/hostingsvcs/assembla.py (Diff revision 1) Show all issues -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Review Request #10890 — Created Feb. 6, 2020 and updated
Create
docs_url
andsummary
attributes in classHostingService
andSCMTools
.Fill details in each hosting services (not include Kiln On Demand and Review Board Gateway, because right now we don't have references provided by ReviewBoard Manual.
Hosting Servive:
$hostingHelp
is a new paragraph withclass="hosting-help-text"
in the template for theRepositoryForm
javascript file. By default,$hostingHelp
will nonvisiable. When users select a hosting service, the inline text will show up.SCMTools:
$repoHelp
is a new paragraph withclass="repo-help-text"
in the template for theRepositoryForm
javascript file. Only when a user click 'custom' as the hosting service,$repoHelp
will visiable. When users select a repo type, the inline text will show up.
Tested in Google Chrome, Firefox and Safari. Inline Text of each hosting service displays correctly in the page.
Tested./tests/runtests.py reviewboard.webapi.tests.test_hosting_service
successfully.
Summary | ID | Author |
---|---|---|
1b72a08149f11e6c10cfe2ede34c6b5c6ff81f59 | XiaoleZ | |
ff9892ee229fcf88e61a52d1c1585f1ca6640da4 | XiaoleZ | |
8b11f3fb2b0b57c56d2c52a756dabd3540f410d9 | XiaoleZ | |
514034994660be775f6422f2d8feb9a3c298a988 | XiaoleZ | |
0a771b3367d344f5af053ce91074542aa2c8ed89 | XiaoleZ | |
d38b3e429225957b79c37d669c1887d7eb2d89e0 | XiaoleZ | |
1f67103471963d3ac64207f41429c3bf21091099 | XiaoleZ | |
e3def9304b6606ae125bf87f0f438028c3939dfe | XiaoleZ | |
6493e05ae787c418b4e4f5c53028411432269814 | XiaoleZ | |
5e407cd4f7180441074e93dd7bfb0789df9ae26d | XiaoleZ | |
1072019e93f36385a7a546e600db7cc7a13f5188 | XiaoleZ | |
07f64c66475ae1d56f98929e2df30950991868ac | XiaoleZ | |
abdbba5ffd7473bc678e4c1582c8ed6b5bc363a2 | XiaoleZ | |
9f18351952ca41754e2db9fcd7e062f88e83d222 | XiaoleZ | |
ba902da46f1edde681e2b4188f6ae08baa5f1c59 | XiaoleZ |
Description | From | Last Updated |
---|---|---|
Good start! I still want to see this as two attributes: summary and docs_url. The form should be able to … |
|
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (111 > 79 characters) |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (113 > 79 characters) |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (113 > 79 characters) |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (116 > 79 characters) |
![]() |
|
E501 line too long (123 > 79 characters) |
![]() |
|
E501 line too long (127 > 79 characters) |
![]() |
|
E501 line too long (129 > 79 characters) |
![]() |
|
E501 line too long (127 > 79 characters) |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (120 > 79 characters) |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (107 > 79 characters) |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (107 > 79 characters) |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (107 > 79 characters) |
![]() |
|
E302 expected 2 blank lines, found 1 |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (113 > 79 characters) |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (117 > 79 characters) |
![]() |
|
W293 blank line contains whitespace |
![]() |
|
E501 line too long (117 > 79 characters) |
![]() |
|
These will need to all be localized using ugettext_lazy() (often aliased as _() -- see the imports in each file). |
|
|
It's important not to hard-code the full path to the manual. Use reviewboard.get_manual_url() as the base of the URL instead. … |
|
|
.toggle() isn't safe to use. You want an explicit hide() or show(). |
|
|
E225 missing whitespace around operator |
![]() |
|
E225 missing whitespace around operator |
![]() |
|
E225 missing whitespace around operator |
![]() |
|
E225 missing whitespace around operator |
![]() |
|
E225 missing whitespace around operator |
![]() |
|
E225 missing whitespace around operator |
![]() |
|
E225 missing whitespace around operator |
![]() |
|
E225 missing whitespace around operator |
![]() |
|
Col: 40 Missing semicolon. |
![]() |
|
Col: 76 Missing semicolon. |
![]() |
|
Col: 81 Missing semicolon. |
![]() |
|
Anything inside a _(...) must be a pure string literal, no string formatting allowed. This is because the localization text … |
|
|
You'll just want to use _(...), not unicode(_(...)). In fact, this is a syntax error on Python 3 (unicode is … |
|
|
We're not going to want HTML in this. We might be rendering to HTML in the case of this form, … |
|
|
I don't think we need this variable. The code for the form should be responsible for determining how we're representating/linking … |
|
|
You'll want to use %s instead of + for building strings. |
|
|
Col: 34 Missing semicolon. |
![]() |
|
Col: 26 Missing semicolon. |
![]() |
|
E501 line too long (93 > 79 characters) |
![]() |
reviewboard/hostingsvcs/assembla.py (Diff revision 1) |
---|
fix the code format, remove the trailing space
Commits: |
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+6 -32) |
Testing Done: |
|
|||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commits: |
|
|||||||||||||
Diff: |
Revision 3 (+580 -52) |
|||||||||||||
Added Files: |
Create hosting-inline-help-text attribute in HostingService, fill details in each hosting service, and update the template in
RepositoryForm
.
Description: |
|
||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||||||||||||
Commits: |
|
||||||||||||||||||||||
Depends On: |
|
||||||||||||||||||||||
Diff: |
Revision 4 (+653 -281) |
||||||||||||||||||||||
Removed Files: |
|||||||||||||||||||||||
Added Files: |
Good start!
I still want to see this as two attributes:
summary
anddocs_url
. The form should be able to handle either, both, or none of those values, and should have a standard link (probably as a paragraph following the summary) for linking to the documentation.
reviewboard/hostingsvcs/assembla.py (Diff revision 4) |
---|
These will need to all be localized using
ugettext_lazy()
(often aliased as_()
-- see the imports in each file).
reviewboard/hostingsvcs/assembla.py (Diff revision 4) |
---|
It's important not to hard-code the full path to the manual. Use
reviewboard.get_manual_url()
as the base of the URL instead. Seereviewboard/__init__.py
for the definition of that function.
reviewboard/static/rb/js/admin/repositoryform.es6.js (Diff revision 4) |
---|
.toggle()
isn't safe to use. You want an explicithide()
orshow()
.
- Splite inline_help_text into two attributes(
summary
+support_docs
).- Set
docs_url
as another attribute (usefrom reviewboard import get_manual_url()
)- Change toggle() into hide() and show()
- Use
ugettext_lazy() as _()
for text
Commits: |
|
|||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+1035 -431) |
fix code style
Commits: |
|
|||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+1046 -442) |
remove a trailing space in repositoryform.es6.js
Commits: |
|
|||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 7 (+1047 -443) |
reviewboard/hostingsvcs/assembla.py (Diff revision 7) |
---|
Anything inside a
_(...)
must be a pure string literal, no string formatting allowed. This is because the localization text scanner is going to look for strings inside of_(...)
and include those directly. So we can't ever use% ...
here.In the case of a URL, there's nothing to localize anyway, so we don't need to use
_(...)
, but the above applies to the other strings.
reviewboard/hostingsvcs/assembla.py (Diff revision 7) |
---|
You'll just want to use
_(...)
, notunicode(_(...))
.In fact, this is a syntax error on Python 3 (
unicode
is not a usable keyword).
reviewboard/hostingsvcs/assembla.py (Diff revision 7) |
---|
We're not going to want HTML in this. We might be rendering to HTML in the case of this form, but there's no guarantee that we'll be using this for HTML. For instance, we'll want to provide this in the API, which isn't HTML-based.
We also don't need to use
%s
here for the name. Just including "Assembla" verbatim is fine.
reviewboard/hostingsvcs/assembla.py (Diff revision 7) |
---|
I don't think we need this variable. The code for the form should be responsible for determining how we're representating/linking to the URL, not this class.
reviewboard/hostingsvcs/assembla.py (Diff revision 7) |
---|
You'll want to use
%s
instead of+
for building strings.
remove unicode(), replace html() with text(), add tag <a>
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Commits: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 8 (+1066 -640) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Removed Files: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added Files: |
add ; in
repositoryform.es6.js
Commits: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 9 (+1068 -642) |
Add inline help for SCMTools
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commits: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 10 (+1295 -663) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Removed Files: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added Files: |
fix line too long
Commits: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 11 (+1297 -665) |