Page MenuHomePhabricator

Fix pyflakes tests for recent pyflakes versions
ClosedPublic

Authored by jrtc27 on Jan 11 2021, 4:03 AM.
Tags
None
Referenced Files
F14170072: D21504.diff
Sat, Dec 7, 6:17 PM
F14167126: D21504.diff
Sat, Dec 7, 8:11 AM
Unknown Object (File)
Fri, Dec 6, 4:57 AM
Unknown Object (File)
Wed, Dec 4, 12:42 PM
Unknown Object (File)
Fri, Nov 29, 8:27 PM
Unknown Object (File)
Tue, Nov 26, 2:03 AM
Unknown Object (File)
Sun, Nov 24, 6:11 PM
Unknown Object (File)
Fri, Nov 22, 9:18 AM
Subscribers

Details

Summary

Since 2.1.0 (commit 75bc0c03c145), pyflakes has included the Python
version and platform in its version output, so ignore it if present.

Since 2.2.0 (commit 6ba3f8e0b59b), pyflakes has included the column
number in its messages, so update the parser to include it and drop the
column number from the (only) test in order to work with both old and
new versions. Whilst here, assign names to the capture groups to make
the code clearer.

Test Plan

Ran arc unit

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

See T10038 for general context.

src/lint/linter/ArcanistPyFlakesLinter.php
38–39

Ideally, keep this under 80 characters (e.g., by putting $pattern = ... on a separate line).

This revision is now accepted and ready to land.Jan 11 2021, 4:09 AM

Stay under 80 characters (and format the other long preg_match a bit more nicely)