aptos-labs / aptos-python-sdk

Aptos Python SDK
11 stars 7 forks source link

fix lint mistakes made by flake8 #8

Closed fishronsage closed 4 weeks ago

fishronsage commented 1 month ago

flake8==6.0.0 depends on pycodestyle=2.10.0 that can't handle fstrings correctly. So we got these errors when run make lint:

poetry run mypy aptos_sdk examples
Success: no issues found in 38 source files
poetry run flake8 aptos_sdk examples
aptos_sdk/aptos_cli_wrapper.py:107:39: E231 missing whitespace after ':'
aptos_sdk/async_client.py:421:39: E713 test for membership should be 'not in'
aptos_sdk/async_client.py:426:41: E713 test for membership should be 'not in'
aptos_sdk/async_client.py:429:41: E713 test for membership should be 'not in'
aptos_sdk/async_client.py:432:41: E713 test for membership should be 'not in'
aptos_sdk/async_client.py:435:41: E713 test for membership should be 'not in'
aptos_sdk/async_client.py:438:41: E713 test for membership should be 'not in'
aptos_sdk/async_client.py:441:41: E713 test for membership should be 'not in'
aptos_sdk/async_client.py:443:41: E713 test for membership should be 'not in'
aptos_sdk/package_publisher.py:189:31: E231 missing whitespace after ':'
aptos_sdk/package_publisher.py:189:32: E231 missing whitespace after ':'
aptos_sdk/transactions.py:131:-1: E231 missing whitespace after ':'
aptos_sdk/transactions.py:131:0: E241 multiple spaces after ':'
aptos_sdk/transactions.py:405:31: E231 missing whitespace after ':'
aptos_sdk/transactions.py:405:32: E231 missing whitespace after ':'
aptos_sdk/transactions.py:405:48: E231 missing whitespace after ':'
aptos_sdk/transactions.py:405:49: E231 missing whitespace after ':'
aptos_sdk/transactions.py:450:32: E231 missing whitespace after ':'
aptos_sdk/transactions.py:450:33: E231 missing whitespace after ':'
aptos_sdk/type_tag.py:302:33: E231 missing whitespace after ':'
aptos_sdk/type_tag.py:302:34: E231 missing whitespace after ':'
aptos_sdk/type_tag.py:302:48: E231 missing whitespace after ':'
aptos_sdk/type_tag.py:302:49: E231 missing whitespace after ':'
examples/aptos_token.py:112:17: E241 multiple spaces after ':'
examples/hello_blockchain.py:43:54: E231 missing whitespace after ':'
examples/hello_blockchain.py:43:55: E231 missing whitespace after ':'
examples/hello_blockchain.py:43:63: E231 missing whitespace after ':'
examples/hello_blockchain.py:43:64: E231 missing whitespace after ':'
examples/hello_blockchain.py:54:33: E231 missing whitespace after ':'
examples/hello_blockchain.py:54:34: E231 missing whitespace after ':'
examples/multisig.py:50:17: E241 multiple spaces after ':'
examples/multisig.py:51:18: E241 multiple spaces after ':'
examples/multisig.py:55:17: E241 multiple spaces after ':'
examples/multisig.py:56:18: E241 multiple spaces after ':'
examples/multisig.py:60:17: E241 multiple spaces after ':'
examples/multisig.py:61:18: E241 multiple spaces after ':'
examples/multisig.py:76:29: E241 multiple spaces after ':'
examples/multisig.py:101:29: E241 multiple spaces after ':'
examples/multisig.py:102:27: E241 multiple spaces after ':'
examples/multisig.py:103:28: E241 multiple spaces after ':'
examples/multisig.py:140:17: E241 multiple spaces after ':'
examples/multisig.py:175:29: E241 multiple spaces after ':'
examples/multisig.py:176:27: E241 multiple spaces after ':'
examples/multisig.py:177:28: E241 multiple spaces after ':'
examples/multisig.py:190:30: E241 multiple spaces after ':'
examples/multisig.py:197:30: E241 multiple spaces after ':'
examples/multisig.py:224:28: E241 multiple spaces after ':'
examples/multisig.py:255:30: E241 multiple spaces after ':'
examples/multisig.py:258:26: E241 multiple spaces after ':'
examples/multisig.py:259:34: E241 multiple spaces after ':'
examples/multisig.py:469:29: E241 multiple spaces after ':'
examples/multisig.py:470:27: E241 multiple spaces after ':'
examples/multisig.py:471:28: E241 multiple spaces after ':'
examples/your_coin.py:41:57: E231 missing whitespace after ':'
examples/your_coin.py:41:58: E231 missing whitespace after ':'
examples/your_coin.py:41:68: E231 missing whitespace after ':'
examples/your_coin.py:41:69: E231 missing whitespace after ':'
examples/your_coin.py:57:61: E231 missing whitespace after ':'
examples/your_coin.py:57:62: E231 missing whitespace after ':'
examples/your_coin.py:57:72: E231 missing whitespace after ':'
examples/your_coin.py:57:73: E231 missing whitespace after ':'
examples/your_coin.py:77:18: E231 missing whitespace after ':'
examples/your_coin.py:77:19: E231 missing whitespace after ':'
examples/your_coin.py:77:24: E231 missing whitespace after ':'
examples/your_coin.py:77:25: E231 missing whitespace after ':'
examples/your_coin.py:77:50: E231 missing whitespace after ':'
examples/your_coin.py:77:51: E231 missing whitespace after ':'
examples/your_coin.py:77:61: E231 missing whitespace after ':'
examples/your_coin.py:77:62: E231 missing whitespace after ':'
examples/your_coin.py:139:50: E231 missing whitespace after ':'
examples/your_coin.py:139:51: E231 missing whitespace after ':'
examples/your_coin.py:139:61: E231 missing whitespace after ':'
examples/your_coin.py:139:62: E231 missing whitespace after ':'
make: *** [Makefile:18: lint] Error 1

update flake8 to 7.0.0 solves above issues. See https://github.com/PyCQA/pycodestyle/blob/main/CHANGES.txt