Skip to content

Commit

Permalink
pre-commit: Add initial config and run it for all files (Chia-Network…
Browse files Browse the repository at this point in the history
…#7053)

* pre-commit: Add initial `.pre-commit-config.yaml`

* pre-commit: Apply hook `end-of-file-fixer`

* pre-commit: Apply hook `trailing-whitespace`

* pre-commit: Apply hook `debug-statements`

* contrib: Add `pre-commit` section
  • Loading branch information
xdustinface authored Aug 2, 2021
1 parent 74f8869 commit b2fdeb2
Show file tree
Hide file tree
Showing 40 changed files with 71 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-blockchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test blockchain code with pytest
run: |
. ./activate
./venv/bin/py.test tests/blockchain/test_blockchain.py tests/blockchain/test_blockchain_transactions.py -s -v --durations 0
./venv/bin/py.test tests/blockchain/test_blockchain.py tests/blockchain/test_blockchain_transactions.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-core-consensus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test core-consensus code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/consensus/test_pot_iterations.py -s -v --durations 0
./venv/bin/py.test tests/core/consensus/test_pot_iterations.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-core-daemon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test core-daemon code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/daemon/test_daemon.py -s -v --durations 0
./venv/bin/py.test tests/core/daemon/test_daemon.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test core-full_node-full_sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/full_sync/test_full_sync.py -s -v --durations 0
./venv/bin/py.test tests/core/full_node/full_sync/test_full_sync.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-core-full_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test core-full_node code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/test_address_manager.py tests/core/full_node/test_block_store.py tests/core/full_node/test_coin_store.py tests/core/full_node/test_conditions.py tests/core/full_node/test_full_node.py tests/core/full_node/test_full_node_store.py tests/core/full_node/test_initial_freeze.py tests/core/full_node/test_mempool.py tests/core/full_node/test_mempool_performance.py tests/core/full_node/test_node_load.py tests/core/full_node/test_performance.py tests/core/full_node/test_sync_store.py tests/core/full_node/test_transactions.py -s -v --durations 0
./venv/bin/py.test tests/core/full_node/test_address_manager.py tests/core/full_node/test_block_store.py tests/core/full_node/test_coin_store.py tests/core/full_node/test_conditions.py tests/core/full_node/test_full_node.py tests/core/full_node/test_full_node_store.py tests/core/full_node/test_initial_freeze.py tests/core/full_node/test_mempool.py tests/core/full_node/test_mempool_performance.py tests/core/full_node/test_node_load.py tests/core/full_node/test_performance.py tests/core/full_node/test_sync_store.py tests/core/full_node/test_transactions.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-core-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test core-server code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/server/test_dos.py tests/core/server/test_rate_limits.py -s -v --durations 0
./venv/bin/py.test tests/core/server/test_dos.py tests/core/server/test_rate_limits.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-core-ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test core-ssl code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/ssl/test_ssl.py -s -v --durations 0
./venv/bin/py.test tests/core/ssl/test_ssl.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-core-util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test core-util code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/util/test_keychain.py tests/core/util/test_lru_cache.py tests/core/util/test_significant_bits.py tests/core/util/test_streamable.py tests/core/util/test_type_checking.py -s -v --durations 0
./venv/bin/py.test tests/core/util/test_keychain.py tests/core/util/test_lru_cache.py tests/core/util/test_significant_bits.py tests/core/util/test_streamable.py tests/core/util/test_type_checking.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test core code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/test_cost_calculation.py tests/core/test_farmer_harvester_rpc.py tests/core/test_filter.py tests/core/test_full_node_rpc.py tests/core/test_merkle_set.py tests/core/test_setproctitle.py -s -v --durations 0
./venv/bin/py.test tests/core/test_cost_calculation.py tests/core/test_farmer_harvester_rpc.py tests/core/test_filter.py tests/core/test_full_node_rpc.py tests/core/test_merkle_set.py tests/core/test_setproctitle.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test generator code with pytest
run: |
. ./activate
./venv/bin/py.test tests/generator/test_compression.py tests/generator/test_generator_types.py tests/generator/test_rom.py tests/generator/test_scan.py -s -v --durations 0
./venv/bin/py.test tests/generator/test_compression.py tests/generator/test_generator_types.py tests/generator/test_rom.py tests/generator/test_scan.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-pools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test pools code with pytest
run: |
. ./activate
./venv/bin/py.test tests/pools/test_pool_config.py tests/pools/test_pool_puzzles_lifecycle.py tests/pools/test_pool_rpc.py tests/pools/test_pool_wallet.py tests/pools/test_wallet_pool_store.py -s -v --durations 0
./venv/bin/py.test tests/pools/test_pool_config.py tests/pools/test_pool_puzzles_lifecycle.py tests/pools/test_pool_rpc.py tests/pools/test_pool_wallet.py tests/pools/test_wallet_pool_store.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test simulation code with pytest
run: |
. ./activate
./venv/bin/py.test tests/simulation/test_simulation.py -s -v --durations 0
./venv/bin/py.test tests/simulation/test_simulation.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-wallet-cc_wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test wallet-cc_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/cc_wallet/test_cc_wallet.py tests/wallet/cc_wallet/test_trades.py -s -v --durations 0
./venv/bin/py.test tests/wallet/cc_wallet/test_cc_wallet.py tests/wallet/cc_wallet/test_trades.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-wallet-rl_wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test wallet-rl_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/rl_wallet/test_rl_rpc.py tests/wallet/rl_wallet/test_rl_wallet.py -s -v --durations 0
./venv/bin/py.test tests/wallet/rl_wallet/test_rl_rpc.py tests/wallet/rl_wallet/test_rl_wallet.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-wallet-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test wallet-rpc code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/rpc/test_wallet_rpc.py -s -v --durations 0
./venv/bin/py.test tests/wallet/rpc/test_wallet_rpc.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-wallet-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test wallet-sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/sync/test_wallet_sync.py -s -v --durations 0
./venv/bin/py.test tests/wallet/sync/test_wallet_sync.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/test_backup.py tests/wallet/test_bech32m.py tests/wallet/test_chialisp.py tests/wallet/test_puzzle_store.py tests/wallet/test_singleton.py tests/wallet/test_singleton_lifecycle.py tests/wallet/test_singleton_lifecycle_fast.py tests/wallet/test_taproot.py tests/wallet/test_wallet.py tests/wallet/test_wallet_interested_store.py tests/wallet/test_wallet_store.py -s -v --durations 0
./venv/bin/py.test tests/wallet/test_backup.py tests/wallet/test_bech32m.py tests/wallet/test_chialisp.py tests/wallet/test_puzzle_store.py tests/wallet/test_singleton.py tests/wallet/test_singleton_lifecycle.py tests/wallet/test_singleton_lifecycle_fast.py tests/wallet/test_taproot.py tests/wallet/test_wallet.py tests/wallet/test_wallet_interested_store.py tests/wallet/test_wallet_store.py -s -v --durations 0
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-blockchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test blockchain code with pytest
run: |
. ./activate
./venv/bin/py.test tests/blockchain/test_blockchain.py tests/blockchain/test_blockchain_transactions.py -s -v --durations 0
./venv/bin/py.test tests/blockchain/test_blockchain.py tests/blockchain/test_blockchain_transactions.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-core-consensus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test core-consensus code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/consensus/test_pot_iterations.py -s -v --durations 0
./venv/bin/py.test tests/core/consensus/test_pot_iterations.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-core-daemon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test core-daemon code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/daemon/test_daemon.py -s -v --durations 0
./venv/bin/py.test tests/core/daemon/test_daemon.py -s -v --durations 0
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test core-full_node-full_sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/full_sync/test_full_sync.py -s -v --durations 0
./venv/bin/py.test tests/core/full_node/full_sync/test_full_sync.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-core-full_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test core-full_node code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/test_address_manager.py tests/core/full_node/test_block_store.py tests/core/full_node/test_coin_store.py tests/core/full_node/test_conditions.py tests/core/full_node/test_full_node.py tests/core/full_node/test_full_node_store.py tests/core/full_node/test_initial_freeze.py tests/core/full_node/test_mempool.py tests/core/full_node/test_mempool_performance.py tests/core/full_node/test_node_load.py tests/core/full_node/test_performance.py tests/core/full_node/test_sync_store.py tests/core/full_node/test_transactions.py -s -v --durations 0
./venv/bin/py.test tests/core/full_node/test_address_manager.py tests/core/full_node/test_block_store.py tests/core/full_node/test_coin_store.py tests/core/full_node/test_conditions.py tests/core/full_node/test_full_node.py tests/core/full_node/test_full_node_store.py tests/core/full_node/test_initial_freeze.py tests/core/full_node/test_mempool.py tests/core/full_node/test_mempool_performance.py tests/core/full_node/test_node_load.py tests/core/full_node/test_performance.py tests/core/full_node/test_sync_store.py tests/core/full_node/test_transactions.py -s -v --durations 0
- name: Check resource usage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-core-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test core-server code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/server/test_dos.py tests/core/server/test_rate_limits.py -s -v --durations 0
./venv/bin/py.test tests/core/server/test_dos.py tests/core/server/test_rate_limits.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-core-ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test core-ssl code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/ssl/test_ssl.py -s -v --durations 0
./venv/bin/py.test tests/core/ssl/test_ssl.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-core-util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test core-util code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/util/test_keychain.py tests/core/util/test_lru_cache.py tests/core/util/test_significant_bits.py tests/core/util/test_streamable.py tests/core/util/test_type_checking.py -s -v --durations 0
./venv/bin/py.test tests/core/util/test_keychain.py tests/core/util/test_lru_cache.py tests/core/util/test_significant_bits.py tests/core/util/test_streamable.py tests/core/util/test_type_checking.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test core code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/test_cost_calculation.py tests/core/test_farmer_harvester_rpc.py tests/core/test_filter.py tests/core/test_full_node_rpc.py tests/core/test_merkle_set.py tests/core/test_setproctitle.py -s -v --durations 0
./venv/bin/py.test tests/core/test_cost_calculation.py tests/core/test_farmer_harvester_rpc.py tests/core/test_filter.py tests/core/test_full_node_rpc.py tests/core/test_merkle_set.py tests/core/test_setproctitle.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test generator code with pytest
run: |
. ./activate
./venv/bin/py.test tests/generator/test_compression.py tests/generator/test_generator_types.py tests/generator/test_rom.py tests/generator/test_scan.py -s -v --durations 0
./venv/bin/py.test tests/generator/test_compression.py tests/generator/test_generator_types.py tests/generator/test_rom.py tests/generator/test_scan.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-pools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test pools code with pytest
run: |
. ./activate
./venv/bin/py.test tests/pools/test_pool_config.py tests/pools/test_pool_puzzles_lifecycle.py tests/pools/test_pool_rpc.py tests/pools/test_pool_wallet.py tests/pools/test_wallet_pool_store.py -s -v --durations 0
./venv/bin/py.test tests/pools/test_pool_config.py tests/pools/test_pool_puzzles_lifecycle.py tests/pools/test_pool_rpc.py tests/pools/test_pool_wallet.py tests/pools/test_wallet_pool_store.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test simulation code with pytest
run: |
. ./activate
./venv/bin/py.test tests/simulation/test_simulation.py -s -v --durations 0
./venv/bin/py.test tests/simulation/test_simulation.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-wallet-cc_wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test wallet-cc_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/cc_wallet/test_cc_wallet.py tests/wallet/cc_wallet/test_trades.py -s -v --durations 0
./venv/bin/py.test tests/wallet/cc_wallet/test_cc_wallet.py tests/wallet/cc_wallet/test_trades.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-wallet-rl_wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test wallet-rl_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/rl_wallet/test_rl_rpc.py tests/wallet/rl_wallet/test_rl_wallet.py -s -v --durations 0
./venv/bin/py.test tests/wallet/rl_wallet/test_rl_rpc.py tests/wallet/rl_wallet/test_rl_wallet.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-wallet-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test wallet-rpc code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/rpc/test_wallet_rpc.py -s -v --durations 0
./venv/bin/py.test tests/wallet/rpc/test_wallet_rpc.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-wallet-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test wallet-sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/sync/test_wallet_sync.py -s -v --durations 0
./venv/bin/py.test tests/wallet/sync/test_wallet_sync.py -s -v --durations 0
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-ubuntu-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Test wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/test_backup.py tests/wallet/test_bech32m.py tests/wallet/test_chialisp.py tests/wallet/test_puzzle_store.py tests/wallet/test_singleton.py tests/wallet/test_singleton_lifecycle.py tests/wallet/test_singleton_lifecycle_fast.py tests/wallet/test_taproot.py tests/wallet/test_wallet.py tests/wallet/test_wallet_interested_store.py tests/wallet/test_wallet_store.py -s -v --durations 0
./venv/bin/py.test tests/wallet/test_backup.py tests/wallet/test_bech32m.py tests/wallet/test_chialisp.py tests/wallet/test_puzzle_store.py tests/wallet/test_singleton.py tests/wallet/test_singleton_lifecycle.py tests/wallet/test_singleton_lifecycle_fast.py tests/wallet/test_taproot.py tests/wallet/test_wallet.py tests/wallet/test_wallet_interested_store.py tests/wallet/test_wallet_store.py -s -v --durations 0
#
Expand Down
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: ".*?(.hex|.clvm|.clib)"
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-ast
- id: debug-statements
- repo: https://github.com/psf/black
rev: 21.6b0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
additional_dependencies: [types-setuptools, types-PyYAML]
12 changes: 11 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ The [Mypy library](https://mypy.readthedocs.io/en/stable/) is very useful for en

If you want verbose logging for tests, edit the `tests/pytest.ini` file.

## Pre-Commit

We provide a [pre-commit configuration](https://github.com/Chia-Network/chia-blockchain/blob/main/.pre-commit-config.yaml) which triggers several useful
hooks (including linters/formatter) before each commit you make if you installed and set up [pre-commit](https://pre-commit.com/). This will help
to reduce the time you spend on failed CI jobs.

To install pre-commit on your system see https://pre-commit.com/#installation. After installation, you can either use it manually
with `pre-commit run` or let it trigger the hooks automatically before each commit by installing the
provided configuration with `pre-commit install`.

## Configure VS code

1. Install python extension
Expand All @@ -86,7 +96,7 @@ workflow.

## Testnets and review environments

With the launch of `1.0.0` we will begin running an official `testnet`.
With the launch of `1.0.0` we will begin running an official `testnet`.
Prior to the release of `1.1.0` there will be two running test nets. `testnet` and `transaction-beta-testnet`. The `transaction-beta-testnet` testnet will be a beta of the pending 1.1 release, which will enable transactions on the chia blockchain.
Following the release of `1.1.0`, the official `testnet` will include all changes that have been accepted to the current release branch.

Expand Down
2 changes: 1 addition & 1 deletion chia/util/english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2045,4 +2045,4 @@ youth
zebra
zero
zone
zoo
zoo
1 change: 0 additions & 1 deletion chia/wallet/util/debug_spend_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def debug_spend_bundle(spend_bundle, agg_sig_additional_data=bytes([3] * 32)) ->
print("*** BAD PUZZLE REVEAL")
print(f"{puzzle_reveal.get_tree_hash().hex()} vs {coin_spend.coin.puzzle_hash.hex()}")
print("*" * 80)
breakpoint()
continue

print(f"consuming coin {dump_coin(coin)}")
Expand Down
1 change: 0 additions & 1 deletion tests/runner-templates/checkout-test-plots.include.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
path: '.chia'
ref: '0.27.0'
fetch-depth: 1

Loading

0 comments on commit b2fdeb2

Please sign in to comment.