Page MenuHomePhabricator

[electrum] run flake8 on python scripts missing the .py extension
ClosedPublic

Authored by PiRK on Feb 1 2024, 11:05.

Details

Summary

And fix the errors.
We will add the .py extension in a follow-up commit so that these scripts remain linted.

The main entry point for the application will not get a .py extension, so add it to include in .arclint.

Depends on D15358

Test Plan
arc lint -- electrum/electrum-abc

Make sure ./electrum-abc still runs

Diff Detail

Event Timeline

PiRK requested review of this revision.Feb 1 2024, 11:05
electrum/scripts/get_merkle_root
38–40 ↗(On Diff #44843)

E402 errors are "Module level import not at top of file". We ignore these errors because the sys.path.insert line must be before importing the related modules

PiRK retitled this revision from [electrum] run the flake8 linter on python scripts missing the .py extension to [electrum] run flake8 on python scripts missing the .py extension.
PiRK edited the summary of this revision. (Show Details)
PiRK edited the test plan for this revision. (Show Details)

don't add scripts/ to .arclint, we will simply rename those scripts with a .py extension

bytesofman added inline comments.
electrum/electrum-abc
56–57

the entry point script had 2 unused imports? PROJECT_NAME AND _ ?

Fabien added a subscriber: Fabien.
Fabien added inline comments.
electrum/scripts/get_merkle_root
38

For now it's not linter, you can avoid these changes and make them when adding the .py extension

This revision is now accepted and ready to land.Feb 1 2024, 20:03
electrum/electrum-abc
56–57

That's correct. These must have become unused sometime since the monorepo migration, as this file was linted before.