Skip to content

E301 regression vs 2.5.0 #908

Description

@asottile

sample

# ok in both
class C(Protocol):
    def f(self) -> int: ...
    def g(self) -> int: ...

# only not ok on master
class D(Protocol):
    @property
    def f(self) -> int: ...
    @property
    def g(self) -> int: ...

before

$ ~/opt/venv/bin/pycodestyle --version
2.5.0
$ ~/opt/venv/bin/pycodestyle t.py
$

after

$ git -C venv/src/pycodestyle/ rev-parse HEAD
d69c15eb7ecf77e94988fb55207a78936b48079c
$ venv/bin/pycodestyle t.py
t.py:11:5: E301 expected 1 blank line, found 0

bisect

$ git bisect start
$ git bisect bad
$ git bisect good 2.5.0
Bisecting: 15 revisions left to test after this (roughly 4 steps)
[7493e0a0e76f02640b6ff0f7cb1619747101a1c6] Fix E302 false negative in presence of decorators.
$ git bisect run python3 -m pycodestyle ../t.py
running python3 -m pycodestyle ../t.py
../t.py:11:5: E301 expected 1 blank line, found 0
Bisecting: 6 revisions left to test after this (roughly 3 steps)
[d1e29861597f22d01e0f528aaccdb744d5bade81] Merge pull request #847 from adamchainz/E225_boolean_operators
running python3 -m pycodestyle ../t.py
Bisecting: 3 revisions left to test after this (roughly 2 steps)
[b8db33dfa6cd4029b75efd1e7cab7c1b64d03bc7] Fixes some issues with E741 detection
running python3 -m pycodestyle ../t.py
Bisecting: 1 revision left to test after this (roughly 1 step)
[3cfd527929fc5dfcdc13a0edf6a6d13f5eb76fcb] Add line breaks in comment
running python3 -m pycodestyle ../t.py
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[96d2db0fa17cc41ae45bcc6fa5ca72e6f712d1bf] Merge pull request #853 from rettenbs/master
running python3 -m pycodestyle ../t.py
7493e0a0e76f02640b6ff0f7cb1619747101a1c6 is the first bad commit
commit 7493e0a0e76f02640b6ff0f7cb1619747101a1c6
Author: Antony Lee <anntzer.lee@gmail.com>
Date:   Tue Mar 26 18:01:22 2019 +0100

    Fix E302 false negative in presence of decorators.

:100755 100755 03696b7a04d5071d75676bdd2a1eefc22559a0a5 ec6b894d117c796e55cfe35724cfd6d7e60eb661 M	pycodestyle.py
:040000 040000 e796744e186d875888aa2143a20b97ccd57e8172 643b9730bb7ed077aec41c43eecb0123f6f6c0ae M	testsuite
bisect run success

claims 7493e0a (CC @anntzer) is the regressing commit

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions