HomePhabricator

[electrum] fix flake8-builtins errors

Description

[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.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14094

Details

Provenance
PiRKAuthored on Jun 21 2023, 08:18
PiRKPushed on Jun 23 2023, 05:25
Reviewer
Restricted Project
Differential Revision
D14094: [electrum] fix flake8-builtins errors
Parents
rABC3b500943df11: [electrum] initial monorepo integration
Branches
Unknown
Tags
Unknown