Page MenuHomePhabricator

Fix pyflakes tests for recent pyflakes versions
ClosedPublic

Authored by jrtc27 on Jan 11 2021, 4:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 2:19 PM
Unknown Object (File)
Sat, Apr 20, 5:29 PM
Unknown Object (File)
Sat, Mar 30, 9:44 AM
Unknown Object (File)
Fri, Mar 29, 10:08 AM
Unknown Object (File)
Thu, Mar 28, 10:39 PM
Unknown Object (File)
Feb 4 2024, 12:34 AM
Unknown Object (File)
Jan 7 2024, 10:18 AM
Unknown Object (File)
Jan 5 2024, 8:10 PM
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
Branch
php-8
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsrc/lint/linter/ArcanistPyFlakesLinter.php:38TXT3Line Too Long
Unit
Tests Passed
Build Status
Buildable 24988
Build 34478: arc lint + arc unit

Event Timeline

See T10038 for general context.

src/lint/linter/ArcanistPyFlakesLinter.php
38

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)