Page MenuHomePhabricator

[Linter] Fix MyPy linter with version 0.991
ClosedPublic

Authored by Fabien on Dec 1 2022, 16:31.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABC0a2bc7f2b2f3: [Linter] Fix MyPy linter with version 0.991
Summary

Since this version, the linter returns a note each time it encounters a function with no annotation. This leads to an incredible amount of messages for no reason, and since we don't bother filtering by severity in the PHP parser, the same amount of lint errors.
This diff just ignores this message and everything is green again.

Test Plan

With mypy 0.991:

arc lint --everything

Check there is not a gazillion errors

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Dec 1 2022, 16:31
sdulfari requested changes to this revision.Dec 1 2022, 17:04
sdulfari added a subscriber: sdulfari.
sdulfari added inline comments.
.arclint
274 ↗(On Diff #36890)

Is this missing?

This revision now requires changes to proceed.Dec 1 2022, 17:04
Fabien requested review of this revision.Dec 1 2022, 17:10
Fabien added inline comments.
.arclint
274 ↗(On Diff #36890)

it's not, it's the error code (read --disable-error-code annotation-unchecked, which is also why they are on the same line)

Fabien planned changes to this revision.Dec 1 2022, 17:20

It fails with prior versions of mypy

More robust fix that works with any version

This revision is now accepted and ready to land.Dec 2 2022, 16:45
This revision was automatically updated to reflect the committed changes.