Skip to content

Commit

Permalink
Merge pull request #740 from Chia-Network/stubtest_allowlist_regex
Browse files Browse the repository at this point in the history
use regexes for stubtest allowlists, ignore all of `chia_rs.chia_rs`
  • Loading branch information
altendky authored Oct 3, 2024
2 parents 96a3fbd + c08d684 commit d4da815
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 59 deletions.
83 changes: 32 additions & 51 deletions wheel/stubtest.allowlist
Original file line number Diff line number Diff line change
@@ -1,71 +1,52 @@
# just ignore all of the private path of chia_rs.chia_rs
# TODO: consider making the extension module private
# https://github.com/Chia-Network/chia_rs/pull/731
chia_rs\.chia_rs\..*

# this is offered to help with hinting only and is not intended to be
# runtime accessible. is there a better option for handling this?
chia_rs.ReadableBuffer
chia_rs.chia_rs.ReadableBuffer
chia_rs\.ReadableBuffer

# TODO: perhaps these should be private as _*
chia_rs.BlockRecord.ip_iters_impl
chia_rs.BlockRecord.ip_sub_slot_total_iters_impl
chia_rs.BlockRecord.sp_iters_impl
chia_rs.BlockRecord.sp_sub_slot_total_iters_impl
chia_rs.BlockRecord.sp_total_iters_impl
chia_rs.chia_rs.BlockRecord.ip_iters_impl
chia_rs.chia_rs.BlockRecord.ip_sub_slot_total_iters_impl
chia_rs.chia_rs.BlockRecord.sp_iters_impl
chia_rs.chia_rs.BlockRecord.sp_sub_slot_total_iters_impl
chia_rs.chia_rs.BlockRecord.sp_total_iters_impl

# TODO: perhaps the inner should be private as _chia_rs
# chia_rs.chia_rs
chia_rs\.BlockRecord\.ip_iters_impl
chia_rs\.BlockRecord\.ip_sub_slot_total_iters_impl
chia_rs\.BlockRecord\.sp_iters_impl
chia_rs\.BlockRecord\.sp_sub_slot_total_iters_impl
chia_rs\.BlockRecord\.sp_total_iters_impl

# TODO: G1Element->PublicKey expects *args
chia_rs.G1Element.__init__
chia_rs.chia_rs.G1Element.__init__
chia_rs\.G1Element\.__init__

# TODO: G2Element->Signature expects *args
chia_rs.G2Element.__init__
chia_rs.chia_rs.G2Element.__init__
chia_rs\.G2Element\.__init__

# TODO: expects *args
chia_rs.GTElement.__init__
chia_rs.chia_rs.GTElement.__init__
chia_rs\.GTElement\.__init__

# TODO: PrivateKey->SecretKey expects *args
chia_rs.PrivateKey.__init__
chia_rs.chia_rs.PrivateKey.__init__
chia_rs\.PrivateKey\.__init__

# TODO: expects *args
chia_rs.RequestPeers.__init__
chia_rs.chia_rs.RequestPeers.__init__
chia_rs\.RequestPeers\.__init__

# TODO: ask stubtest/mypy about these as they seem unlikely to be our doing
chia_rs.sized_byte_class.Iterable
chia_rs.sized_byte_class.BinaryIO.write
chia_rs.struct_stream.BinaryIO.write
chia_rs\.sized_byte_class\.Iterable
chia_rs\.sized_byte_class\.BinaryIO\.write
chia_rs\.struct_stream\.BinaryIO\.write

# these raise unimplemented
chia_rs.G1Element.from_parent
chia_rs.G2Element.from_parent
chia_rs.GTElement.from_parent
chia_rs.PrivateKey.from_parent
chia_rs.Program.from_parent
chia_rs.Spend.from_parent
chia_rs.SpendBundleConditions.from_parent
chia_rs.SpendConditions.from_parent
chia_rs.chia_rs.G1Element.from_parent
chia_rs.chia_rs.G2Element.from_parent
chia_rs.chia_rs.GTElement.from_parent
chia_rs.chia_rs.PrivateKey.from_parent
chia_rs.chia_rs.Program.from_parent
chia_rs.chia_rs.SpendBundleConditions.from_parent
chia_rs.chia_rs.SpendConditions.from_parent
chia_rs.spend.Spend.from_parent
chia_rs.spend.SpendConditions.from_parent
chia_rs\.G1Element\.from_parent
chia_rs\.G2Element\.from_parent
chia_rs\.GTElement\.from_parent
chia_rs\.PrivateKey\.from_parent
chia_rs\.Program\.from_parent
chia_rs\.Spend\.from_parent
chia_rs\.SpendBundleConditions\.from_parent
chia_rs\.SpendConditions\.from_parent
chia_rs\.spend\.Spend\.from_parent
chia_rs\.spend\.SpendConditions\.from_parent

# these are implemented but not intended to be called from python
chia_rs.Coin.from_parent
chia_rs.CoinSpend.from_parent
chia_rs.SpendBundle.from_parent
chia_rs.chia_rs.Coin.from_parent
chia_rs.chia_rs.CoinSpend.from_parent
chia_rs.chia_rs.SpendBundle.from_parent
chia_rs\.Coin\.from_parent
chia_rs\.CoinSpend\.from_parent
chia_rs\.SpendBundle\.from_parent
16 changes: 8 additions & 8 deletions wheel/stubtest.allowlist.3-11-plus
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# TODO: ask stubtest/mypy about these as they seem unlikely to be our doing
chia_rs.sized_byte_class.TypeVar.__bound__
chia_rs.sized_byte_class.TypeVar.__constraints__
chia_rs.sized_byte_class.TypeVar.__contravariant__
chia_rs.sized_byte_class.TypeVar.__covariant__
chia_rs\.sized_byte_class\.TypeVar\.__bound__
chia_rs\.sized_byte_class\.TypeVar\.__constraints__
chia_rs\.sized_byte_class\.TypeVar\.__contravariant__
chia_rs\.sized_byte_class\.TypeVar\.__covariant__

chia_rs.struct_stream.TypeVar.__bound__
chia_rs.struct_stream.TypeVar.__constraints__
chia_rs.struct_stream.TypeVar.__contravariant__
chia_rs.struct_stream.TypeVar.__covariant__
chia_rs\.struct_stream\.TypeVar\.__bound__
chia_rs\.struct_stream\.TypeVar\.__constraints__
chia_rs\.struct_stream\.TypeVar\.__contravariant__
chia_rs\.struct_stream\.TypeVar\.__covariant__

0 comments on commit d4da815

Please sign in to comment.