Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29345337: Noissue - Fix edge cases with raw strings in flake8-abp (Closed)

Created:
May 30, 2016, 9:42 a.m. by Sebastian Noack
Modified:
May 30, 2016, 12:33 p.m.
Reviewers:
Vasily Kuznetsov
CC:
Jon Sonesen
Visibility:
Public.

Description

Noissue - Fix edge cases with raw strings in flake8-abp

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -17 lines) Patch
M flake8-abp/flake8_abp.py View 1 chunk +16 lines, -17 lines 1 comment Download
M flake8-abp/tests/A110.py View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5
Sebastian Noack
https://codereview.adblockplus.org/29345337/diff/29345338/flake8-abp/flake8_abp.py File flake8-abp/flake8_abp.py (left): https://codereview.adblockplus.org/29345337/diff/29345338/flake8-abp/flake8_abp.py#oldcode402 flake8-abp/flake8_abp.py:402: literal = re.sub(r'\\(?!{})'.format(literal[0]), The problem with old logic was ...
May 30, 2016, 9:57 a.m. (2016-05-30 09:57:43 UTC) #1
Vasily Kuznetsov
https://codereview.adblockplus.org/29345337/diff/29345338/flake8-abp/flake8_abp.py File flake8-abp/flake8_abp.py (left): https://codereview.adblockplus.org/29345337/diff/29345338/flake8-abp/flake8_abp.py#oldcode402 flake8-abp/flake8_abp.py:402: literal = re.sub(r'\\(?!{})'.format(literal[0]), On 2016/05/30 09:57:42, Sebastian Noack wrote: ...
May 30, 2016, 10:08 a.m. (2016-05-30 10:08:19 UTC) #2
Sebastian Noack
https://codereview.adblockplus.org/29345337/diff/29345338/flake8-abp/flake8_abp.py File flake8-abp/flake8_abp.py (left): https://codereview.adblockplus.org/29345337/diff/29345338/flake8-abp/flake8_abp.py#oldcode402 flake8-abp/flake8_abp.py:402: literal = re.sub(r'\\(?!{})'.format(literal[0]), On 2016/05/30 10:08:19, Vasily Kuznetsov wrote: ...
May 30, 2016, 10:18 a.m. (2016-05-30 10:18:04 UTC) #3
Vasily Kuznetsov
LGTM
May 30, 2016, 11:43 a.m. (2016-05-30 11:43:45 UTC) #4
Sebastian Noack
May 30, 2016, 12:33 p.m. (2016-05-30 12:33:42 UTC) #5
Message was sent while issue was closed.
https://codereview.adblockplus.org/29345337/diff/29345340/flake8-abp/flake8_a...
File flake8-abp/flake8_abp.py (left):

https://codereview.adblockplus.org/29345337/diff/29345340/flake8-abp/flake8_a...
flake8-abp/flake8_abp.py:400: elif start[0] == end[0]:
I just realized, after pushing this change, that we could have avoided a level
of indentation/complexity here:

if first_token and re.search(...):
    ...
elif start[0] != end[0]:
    pass
elif 'r' in prefixes:
    ...
else:
    ...

I leave it up to Jon whether to change it while touching this code again while
working on #4044.

Powered by Google App Engine
This is Rietveld