flake8
-
rbtools/utils/users.py (Diff revision 1)
Review Request #9880 — Created April 19, 2018 and submitted
This change updates our Python version requirements, enabling 3.5+,
getting rid of 2.6, and removing a bunch of workarounds for old
versions.Based on work by Joshua Olson at https://reviews.reviewboard.org/r/9652/
Description | From | Last Updated |
---|---|---|
E202 whitespace before ')' |
reviewbot | |
I just checked Python 2.7.14. This behavior has not changed. #!/usr/bin/env pythopn print raw_input('test: ') (Note that raw_input is what … |
chipx86 | |
These were issues on modern Python 2.7. The problem was with macOS, not a bug in Python. It does look … |
chipx86 | |
E501 line too long (81 > 79 characters) |
reviewbot | |
We should handle any normalization required in get_input(), instead of passing str() here, just to ensure consistency and prevent workarounds … |
chipx86 |
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+25 -42) |
rbtools/commands/__init__.py (Diff revision 2) |
---|
I just checked Python 2.7.14. This behavior has not changed.
#!/usr/bin/env pythopn print raw_input('test: ')
(Note that
raw_input
is what theinput
fromsix
maps to on Python 2.x.)$ python test.py > py.log hi $ cat py.log test: hi $ python test.py 2> py.log hi hi $ cat py.log test:
The original bug was saying that the user doesn't get a prompt if redirecting to stdout (due to using the equivalent of
rbt diff
). That bug is still present with modern Python.The real problem here is that the comment is bad. The right solution is probably to have a wrapper function so we aren't working around this in multiple locations.
rbtools/commands/post.py (Diff revision 2) |
---|
These were issues on modern Python 2.7. The problem was with macOS, not a bug in Python.
It does look like it's fixed as of macOS 10.12.6, according to the bug report. I wonder if we want to keep this and do a version check along with the "darwin" check.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+58 -44) |
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+57 -44) |
rbtools/utils/console.py (Diff revision 4) |
---|
We should handle any normalization required in
get_input()
, instead of passingstr()
here, just to ensure consistency and prevent workarounds in specific calls.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+57 -44) |