Page MenuHomePhabricator

[electrum] fix flake8-builtins errors
ClosedPublic

Authored by PiRK on Jun 21 2023, 08:31.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC1e0b8bf584f4: [electrum] fix flake8-builtins errors
Summary

The following words are python builtin functions: hash, filter, dir, format, max, type

This fixes the corresponding flake8 warnings by either:

  • removing the code when it is unused
  • renaming the variable or function

The big block of code removed in dnssec.py is now unused, as we require dnspython >= 2.0 in requirements.txt

For the specific case of getOpenFileName and getSaveFileName in main_window.py, I chose to ignore/disable the warning because the intent is to wrap Qt functions QFileDialog.getOpenFileName and QFileDialog.getSaveFileName, so it makes sense to use the exact same argument names.

Depends on D14088

Test Plan
flake8 --select=A001,A002 .
grep -r long_hex .
grep -r short_hex .
grep -r hashAndSign .
python -m electrumabc.tests

Run the application (./electrum-abc) and send/receive funds to ensure nothing fundamental is broken.

Diff Detail

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