Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve async docstrings #2478

Merged
merged 5 commits into from
Nov 26, 2024

Conversation

thewhaleking
Copy link
Contributor

Improves the docstrings for async_substrate_interface

@thewhaleking thewhaleking requested a review from a team November 26, 2024 15:45
camfairchild
camfairchild previously approved these changes Nov 26, 2024
Copy link
Contributor

@roman-opentensor roman-opentensor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls apply suggestions and add arguments in AsyncSubstrateInterface class
otherwise LGTM

Comment on lines 2090 to 2104
era: Specify mortality in blocks in follow format:
{'period': [amount_blocks]} If omitted the extrinsic is immortal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
era: Specify mortality in blocks in follow format:
{'period': [amount_blocks]} If omitted the extrinsic is immortal
era: Specify mortality in blocks in follow format: {'period': [amount_blocks]} If omitted the extrinsic is immortal

Comment on lines 1052 to 1066
auto_discover: Whether to automatically discover the type_registry presets based on the chain name and
typer registry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto_discover: Whether to automatically discover the type_registry presets based on the chain name and
typer registry
auto_discover: Whether to automatically discover the type_registry presets based on the chain name and typer registry

Comment on lines 1050 to 1064
use_remote_preset: When True preset is downloaded from Github master, otherwise use files from local
installed scalecodec package
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
use_remote_preset: When True preset is downloaded from Github master, otherwise use files from local
installed scalecodec package
use_remote_preset: When True preset is downloaded from Github master, otherwise use files from local installed scalecodec package

Comment on lines 1702 to 1716
block_hash: the hash of the block — only supply this if not supplying the block
hash in the params, and not reusing the block hash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
block_hash: the hash of the blockonly supply this if not supplying the block
hash in the params, and not reusing the block hash
block_hash: the hash of the blockonly supply this if not supplying the block hash in the params, and not reusing the block hash

Comment on lines 1769 to 1783
call_params: This is a dict containing the params of the call. e.g.
`{'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk', 'value': 1000000000000}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
call_params: This is a dict containing the params of the call. e.g.
`{'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk', 'value': 1000000000000}`
call_params: This is a dict containing the params of the call. e.g. `{'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk', 'value': 1000000000000}`

Comment on lines +2349 to +2363
keypair: Keypair of the sender, does not have to include private key because no valid signature is
required
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
keypair: Keypair of the sender, does not have to include private key because no valid signature is
required
keypair: Keypair of the sender, does not have to include private key because no valid signature is required

Comment on lines 2452 to 2466
max_results: the maximum of results required, if set the query will stop fetching results when number is
reached
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
max_results: the maximum of results required, if set the query will stop fetching results when number is
reached
max_results: the maximum of results required, if set the query will stop fetching results when number is reached

Comment on lines 2456 to 2470
ignore_decoding_errors: When set this will catch all decoding errors, set the item to None and continue
decoding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ignore_decoding_errors: When set this will catch all decoding errors, set the item to None and continue
decoding
ignore_decoding_errors: When set this will catch all decoding errors, set the item to None and continue decoding

Comment on lines +2458 to +2472
reuse_block_hash: use True if you wish to make the query using the last-used block hash. Do not mark True
if supplying a block_hash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
reuse_block_hash: use True if you wish to make the query using the last-used block hash. Do not mark True
if supplying a block_hash
reuse_block_hash: use True if you wish to make the query using the last-used block hash. Do not mark True if supplying a block_hash

@thewhaleking thewhaleking force-pushed the feat/thewhaleking/improve-async-docstrings branch from b0c024e to be3c228 Compare November 26, 2024 18:38
@thewhaleking thewhaleking merged commit 61b9951 into staging Nov 26, 2024
28 checks passed
@thewhaleking thewhaleking deleted the feat/thewhaleking/improve-async-docstrings branch November 26, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants