<p dir="auto">The below was reported by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/HDembinski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/HDembinski">@HDembinski</a> in a comment on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1118594735" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/15489" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/15489/hovercard" href="https://github.com/scipy/scipy/issues/15489">gh-15489</a>. That should be considered a bug if it's indeed not matching, so this should be looked at.</p>
<blockquote>
<p dir="auto"><code class="notranslate">python dev.py</code> lint should also run<code class="notranslate">flake8</code>, but for the PEP8 part should be the same. Can you point to a branch where you see one failing but the other passing?</p>
</blockquote>
<p dir="auto">Sorry, I don't have a clean reproducer, but I think this patch here<br>
<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/scipy/scipy/commit/0545e5e0c3e6601e584e3afda88a8df0cec74795/hovercard" href="https://github.com/scipy/scipy/commit/0545e5e0c3e6601e584e3afda88a8df0cec74795"><tt>0545e5e</tt></a><br>
was a change that I made after <code class="notranslate">python dev.py lint</code> gave me no complains (about my new code), but <code class="notranslate">python tools/lint_diff.py</code> run by the CI job found those issues. I haven't looked into the implementation, but these two commands apparently do not apply the same rules.</p>
<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">Currently there are two ways to lint changes locally. <code class="notranslate">tools/lint_diff.py</code> behaves as expected (and is what is ran in the CI job) whereas <code class="notranslate">dev.py lint</code> picks up lots up unrelated changes.</p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="N/A"><pre class="notranslate"><span class="pl-v">N</span><span class="pl-c1">/</span><span class="pl-v">A</span></pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(scipy-dev) python tools/lint_diff.py
No lint errors found.
(scipy-dev) python dev.py lint
scipy/interpolate/tests/test_interpolate.py:539:19: E275 missing whitespace after keyword
scipy/spatial/tests/test_distance.py:2082:15: E275 missing whitespace after keyword
scipy/stats/_continuous_distns.py:697:15: E275 missing whitespace after keyword
scipy/stats/_continuous_distns.py:4424:15: E275 missing whitespace after keyword
scipy/stats/_discrete_distns.py:371:15: E275 missing whitespace after keyword
scipy/stats/_binned_statistic.py:570:7: E275 missing whitespace after keyword
scipy/stats/_binned_statistic.py:676:7: E275 missing whitespace after keyword
scipy/stats/tests/test_resampling.py:867:15: E275 missing whitespace after keyword
scipy/stats/tests/test_discrete_distns.py:475:15: E275 missing whitespace after keyword
scipy/stats/tests/test_axis_nan_policy.py:918:11: E275 missing whitespace after keyword
scipy/stats/tests/test_axis_nan_policy.py:919:11: E275 missing whitespace after keyword
scipy/stats/tests/test_axis_nan_policy.py:920:11: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4696:15: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4697:15: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4698:15: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4815:19: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4816:19: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:472:15: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:473:15: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:479:15: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:483:15: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:484:15: E275 missing whitespace after keyword
scipy/stats/tests/test_sampling.py:404:19: E275 missing whitespace after keyword
scipy/stats/tests/test_sampling.py:1125:19: E275 missing whitespace after keyword
scipy/signal/_filter_design.py:2344:15: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:64:7: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:77:11: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:1062:7: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:1069:7: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:1099:15: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:1104:15: E275 missing whitespace after keyword
scipy/signal/tests/test_signaltools.py:1293:15: E275 missing whitespace after keyword
scipy/signal/tests/test_signaltools.py:1301:15: E275 missing whitespace after keyword
scipy/sparse/csgraph/tests/test_shortest_path.py:196:14: E275 missing whitespace after keyword
scipy/sparse/csgraph/tests/test_shortest_path.py:197:19: E275 missing whitespace after keyword
scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py:268:11: E275 missing whitespace after keyword
scipy/optimize/_linprog_util.py:305:15: E275 missing whitespace after keyword
scipy/optimize/_linprog_util.py:344:15: E275 missing whitespace after keyword
scipy/optimize/_linprog_util.py:383:15: E275 missing whitespace after keyword
scipy/optimize/_remove_redundancy.py:88:11: E275 missing whitespace after keyword
scipy/optimize/_dual_annealing.py:204:27: E275 missing whitespace after keyword
scipy/optimize/_dual_annealing.py:672:10: E275 missing whitespace after keyword
scipy/optimize/_linprog_ip.py:263:14: E275 missing whitespace after keyword
scipy/optimize/tests/test_zeros.py:426:23: E275 missing whitespace after keyword
scipy/optimize/tests/test_zeros.py:693:11: E275 missing whitespace after keyword
scipy/optimize/tests/test_zeros.py:697:11: E275 missing whitespace after keyword
scipy/optimize/tests/test_zeros.py:716:11: E275 missing whitespace after keyword
scipy/optimize/tests/test__differential_evolution.py:483:19: E275 missing whitespace after keyword
scipy/optimize/tests/test_differentiable_functions.py:145:15: E275 missing whitespace after keyword
scipy/optimize/tests/test_differentiable_functions.py:155:15: E275 missing whitespace after keyword
scipy/optimize/tests/test_differentiable_functions.py:158:15: E275 missing whitespace after keyword
scipy/io/arff/_arffread.py:189:11: E275 missing whitespace after keyword
scipy/integrate/_odepack_py.py:235:11: E275 missing whitespace after keyword
scipy/integrate/tests/test_quadpack.py:640:15: E275 missing whitespace after keyword
scipy/special/_basic.py:1784:11: E275 missing whitespace after keyword
scipy/linalg/_matfuncs.py:872:11: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1470:19: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1494:27: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1511:31: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1537:23: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1573:31: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1593:35: E275 missing whitespace after keyword
scipy/linalg/tests/test_decomp.py:2334:23: E275 missing whitespace after keyword"><pre class="notranslate">(scipy-dev) python tools/lint_diff.py
No lint errors found.
(scipy-dev) python dev.py lint
scipy/interpolate/tests/test_interpolate.py:539:19: E275 missing whitespace after keyword
scipy/spatial/tests/test_distance.py:2082:15: E275 missing whitespace after keyword
scipy/stats/_continuous_distns.py:697:15: E275 missing whitespace after keyword
scipy/stats/_continuous_distns.py:4424:15: E275 missing whitespace after keyword
scipy/stats/_discrete_distns.py:371:15: E275 missing whitespace after keyword
scipy/stats/_binned_statistic.py:570:7: E275 missing whitespace after keyword
scipy/stats/_binned_statistic.py:676:7: E275 missing whitespace after keyword
scipy/stats/tests/test_resampling.py:867:15: E275 missing whitespace after keyword
scipy/stats/tests/test_discrete_distns.py:475:15: E275 missing whitespace after keyword
scipy/stats/tests/test_axis_nan_policy.py:918:11: E275 missing whitespace after keyword
scipy/stats/tests/test_axis_nan_policy.py:919:11: E275 missing whitespace after keyword
scipy/stats/tests/test_axis_nan_policy.py:920:11: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4696:15: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4697:15: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4698:15: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4815:19: E275 missing whitespace after keyword
scipy/stats/tests/test_stats.py:4816:19: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:472:15: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:473:15: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:479:15: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:483:15: E275 missing whitespace after keyword
scipy/stats/tests/test_hypotests.py:484:15: E275 missing whitespace after keyword
scipy/stats/tests/test_sampling.py:404:19: E275 missing whitespace after keyword
scipy/stats/tests/test_sampling.py:1125:19: E275 missing whitespace after keyword
scipy/signal/_filter_design.py:2344:15: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:64:7: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:77:11: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:1062:7: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:1069:7: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:1099:15: E275 missing whitespace after keyword
scipy/signal/_peak_finding.py:1104:15: E275 missing whitespace after keyword
scipy/signal/tests/test_signaltools.py:1293:15: E275 missing whitespace after keyword
scipy/signal/tests/test_signaltools.py:1301:15: E275 missing whitespace after keyword
scipy/sparse/csgraph/tests/test_shortest_path.py:196:14: E275 missing whitespace after keyword
scipy/sparse/csgraph/tests/test_shortest_path.py:197:19: E275 missing whitespace after keyword
scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py:268:11: E275 missing whitespace after keyword
scipy/optimize/_linprog_util.py:305:15: E275 missing whitespace after keyword
scipy/optimize/_linprog_util.py:344:15: E275 missing whitespace after keyword
scipy/optimize/_linprog_util.py:383:15: E275 missing whitespace after keyword
scipy/optimize/_remove_redundancy.py:88:11: E275 missing whitespace after keyword
scipy/optimize/_dual_annealing.py:204:27: E275 missing whitespace after keyword
scipy/optimize/_dual_annealing.py:672:10: E275 missing whitespace after keyword
scipy/optimize/_linprog_ip.py:263:14: E275 missing whitespace after keyword
scipy/optimize/tests/test_zeros.py:426:23: E275 missing whitespace after keyword
scipy/optimize/tests/test_zeros.py:693:11: E275 missing whitespace after keyword
scipy/optimize/tests/test_zeros.py:697:11: E275 missing whitespace after keyword
scipy/optimize/tests/test_zeros.py:716:11: E275 missing whitespace after keyword
scipy/optimize/tests/test__differential_evolution.py:483:19: E275 missing whitespace after keyword
scipy/optimize/tests/test_differentiable_functions.py:145:15: E275 missing whitespace after keyword
scipy/optimize/tests/test_differentiable_functions.py:155:15: E275 missing whitespace after keyword
scipy/optimize/tests/test_differentiable_functions.py:158:15: E275 missing whitespace after keyword
scipy/io/arff/_arffread.py:189:11: E275 missing whitespace after keyword
scipy/integrate/_odepack_py.py:235:11: E275 missing whitespace after keyword
scipy/integrate/tests/test_quadpack.py:640:15: E275 missing whitespace after keyword
scipy/special/_basic.py:1784:11: E275 missing whitespace after keyword
scipy/linalg/_matfuncs.py:872:11: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1470:19: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1494:27: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1511:31: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1537:23: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1573:31: E275 missing whitespace after keyword
scipy/linalg/tests/test_lapack.py:1593:35: E275 missing whitespace after keyword
scipy/linalg/tests/test_decomp.py:2334:23: E275 missing whitespace after keyword</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="

### SciPy/NumPy/Python version information

1.10.0.dev0+2164.77a8ec1 1.23.2 sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">

### SciPy/NumPy/Python version information

1.10.0.dev0+2164.77a8ec1 1.23.2 sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)
</code></pre></div>