Commit Graph
20 Commits
Author SHA1 Message Date
Kyle AltendorfandGitHub 890da94024 Hint and lightly refactor chia.server.upnp.UPnP (#11816)
* Hint and lightly refactor chia.server.upnp.UPnP

* Remove chia.server.upnp from mypy.ini lax rules

* black

* Revert the pointless int for shutdown

* isort

* from __future__ import annotations
2022-06-08 10:25:42 -05:00
Amine Khaldi 11c36a2113 Test. 2022-06-01 14:29:49 +01:00
Kronus91andGitHub 662c60da38 Extend on chain metadata update/API (#11585)
* Extend on chain metadata update/API

* Resolve comments

* Suppress rasing exception in rpc api

* Split artist address to royalty & target address

* Refine NFTInfo

* Fix tests

* Return disassembled metadata & optimize chialisp

* Fix clvm tests

* suppress untyped erro

* Change updater

* Fix clvm test
2022-05-25 12:34:40 -07:00
xdustinface 3ee55045fd Merge remote-tracking branch 'chia/main' into pr-main-dids-catchup 2022-05-19 13:02:56 +02:00
Kyle AltendorfandGitHub cb5470b806 hints and strict type checking for test_wallet (#11541)
* hints and strict type checking for test_wallet

* fixup

* flip flop
2022-05-18 09:12:39 -07:00
Kyle AltendorfandGitHub f9226fb60d rename test files that are missing test_ prefix (#10712)
* rename test files that are missing test_ prefix

* update mypy and isort excludes

* skip test_get_host_addr6() in GitHub Actions under macOS

* rebuild workflows
2022-05-16 09:51:00 -07:00
7c91f470f4 simplify SizedBytes and StructStream (#11429)
* simplify SizedBytes and StructStream

* lint

* super()  !!!

* do not pass parameter up to super().__init__()

* Update chia/util/struct_stream.py

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* parse fixed-width int data from class name

* add int512 and uint128 .from_bytes(), test .parse() failures

* test serialization against struct.pack()

* use typing_extensions for final

* override ignore

* stop using struct for StructStream

oh the irony

* fixup .to_bytes() to accept parameters again for where we use that

* bring back signed parameter

* format

* adjust tests for new exception

* eliminate custom coding for uint128 and int512

* tidy

* remove unused StructStream.PACK attribute

* add direct tests for parse_metadata_from_name()

* stricter hinting

* remove no-longer-needed typeshed work-around

* apply strict type checking to all touched files

* remove StructStream override of .to_bytes()

* tidy

* types touchup

* add unused parameter comments

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: wjblanke <wjb98672@gmail.com>
2022-05-14 02:05:27 -07:00
d1e445fac2 Ms.mypy consensus (#11403)
* Mypy for consensus dir (Except blockchain.py)

* Finish up consensus folder mypy

* Lint

* isort

* lint

* awaitable over coroutine

* less Any

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-05-12 15:21:47 -07:00
Kyle Altendorf 28eaf46b3e Merge branch 'main' into main_dids-merge_cleanup_test 2022-04-27 12:11:15 -04:00
79cbadf987 streamable: Enable isort + more mypy (#10539)
* isort: Fix `streamable.py` and `test_streamable.py`

* mypy: Drop `streamable.py` and `test_streamable.py` form exclusion

And fix all the mypy issues.

* Fix `pylint`

* Introduce `ParseFunctionType` and `StreamFunctionType`

* Use `object` instead of `Type[Any]` for `is_type_*` functions

* Some `Any` -> `object`

* Use `typing.overload` for `recurse_jsonify`

* Move some comments

* Drop `Union`, use `Literal` properly

* Explicitly ignore the return of `f_type.parse`

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* Merge two `recurse_jsonify` overloads

* Typing for the base definition of `recurse_jsonify`

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-04-20 11:09:41 -07:00
JeffandGitHub e5d048f1de Merge commit with main (9ff3fc993f) (#11137)
* Merged with main (9ff3fc993f)

* Linter and some test fixes

* isort, linting, test fix

* Fixes and bumped the GUI to point to nftdev

* Couple of fixes
2022-04-14 12:02:42 -07:00
dustinfaceandGitHub a48fd43100 streamable: Simplify and force correct usage (#10509)
* streamable: Merge `strictdataclass` into `Streamable` class

* tests: Test not supported streamable types

* streamable: Reorder decorators

* streamable: Simplify streamable decorator and force correct usage/syntax

* streamable: Just move some stuff around in the file

* streamable: Improve syntax error messages

* mypy: Drop `type_checking.py` and `test_type_checking.py` from exclusion

* streamable: Use cached fields instead of `__annotations__`

This is now possible after merging `__post_init__` into `Streamable`

* Introduce `DefinitionError` as `StreamableError`

* `/t` -> `    `
2022-04-08 18:29:32 -07:00
dustinfaceandGitHub 0917d0ae78 wallet: Drop puzzles/genesis_checkers.py and related puzzles (#10790)
Its all duplicated code and puzzles as far as i can tell, see 
`chia/wallet/puzzles/tails.py`.
2022-04-07 09:19:37 -07:00
Adam KellyandGitHub 7bbfa30a24 Ak.setup nodes (#10619)
* Remove unused test code

* Centralize fixture uses of setup_n_nodes

* Centralize fixure uses of setup_two_nodes

* Break up setup_nodes into setup_services, for individial services, and setup_nodes, for initializing different simulator configurations

* Sort imports
2022-03-16 11:47:54 -07:00
7fb26a7a14 Ms.unused code (#10453)
* Remove old backup stuff

* Remove references to CC (couloured coins) which is deprecated terminology

* removed no longer used import

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-02-27 23:34:37 -05:00
Kyle AltendorfandGitHub 8a5c125418 apply stricter mypy to all new files (#10133)
* just put __init__.py files where we have .py files

* and the rest

* remove unused ignore

* update mypy ignore list

* remove chia.util.clvm pass-through file

* import ConsensusConstants from actual definition

* in tests too

* import ConditionOpcode from actual definition

* a little less ignore

* update mypy reduced-strictness set

* update mypy reduced-strictness set
2022-02-20 21:32:23 -08:00
Kyle AltendorfandGitHub bf01b58cb4 tweak mypy config (#9368)
* tweak mypy config

* add types-click to pre-commit
2021-11-24 13:06:39 -08:00
1073f9d5dd mypy: warn_unused_ignores = true (and remove some) (#9085)
* mypy: warn_unused_ignores = true (and remove some)

* catch up

* type checking tweaks

* precommit uses mypy --no-warn-unused-ignores

* revert a bit

* precommit explanatory comment

* Update .pre-commit-config.yaml

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-11-23 12:44:53 -08:00
d4051b72b9 Ms.fixtest (#432)
* New chiapos API

* Fix flake

* Move to chiapos 0.12.30 to fix segfaults

* Black

* change stripe size to 2000

* chiavdf to 0.12.25

* Revert "chiavdf to 0.12.25"

This reverts commit f7f596ce16.
chiavdf has a timelord compile error on MacOS.

* Increase default -b

* Plotter GUI test

Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
Co-authored-by: Yostra <straya@chia.net>
2020-10-01 11:07:12 -07:00
Mariano Sorgente 0fef0b933e Changed to mypy from pyright, fix tests (full node still broken) 2019-10-22 16:44:01 +09:00