Skip to content

Conversation

@wnqqnw19
Copy link
Contributor

@wnqqnw19 wnqqnw19 commented Dec 5, 2025

- Remove redundant exception aliases in errors.py
  The redundant aliases (SubstrateRequestException = SubstrateRequestException, etc.)
  were unnecessary since these exceptions are already imported from
  async_substrate_interface.errors. Removed them to clean up the code.

- Fix potential AttributeError in settings.py version parsing
  Added null check for re.match() result before calling .group(0) to prevent
  AttributeError if version string doesn't match expected format. Now raises
  a clear ValueError with descriptive message instead of crashing.

Roman and others added 30 commits August 7, 2025 12:15
…g (such as is the case with BadOrigin) while retaining the list join for non-strings.
…/bump-bt-wallet

Bump bittensor-wallet version
…rror-formatter

Format Error with string docs
…ect-parrent-init

`LoggingMachine` initialization updated to explicitly call both parent constructors
…ding-in-dynamic-info

Fixed `moving_price` conversion from `I96F32` to float
…rand-major-version

Major version locks drand
thewhaleking and others added 20 commits October 8, 2025 22:38
…/update-type-hints-ws-shutdown-timer

Update type hint/docstring for ws_shutdown_timer
…rnance-deadcode

Commenting on the test until the new governance come
* Use uv pip for e2e dependency installation (opentensor#3109)

* improve `subtensor.get_liquidity_list`

* update `test_liquidity` (non functional)

* add storage_keys

* fix unit tests

* apply default era.period to all extrinsics

* apply default era.period to all subtensor extrinsic calls

* fix *do tests

* replace sn0 owner keys

* Allow python 3.14 (opentensor#3122)

* 9.12.2: changelog + version (opentensor#3125)

changelog + version

---------

Co-authored-by: Roman Chkhaidze <[email protected]>
Co-authored-by: Roman <[email protected]>
Copy link
Collaborator

@basfroman basfroman 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 comments related changes and pull SDKv10 branch since that one is updated now. Then, I review this PR once more.
Thank you for contribution!

Comment on lines 13 to 14
# redundant aliases
SubstrateRequestException = SubstrateRequestException
StorageFunctionNotFound = StorageFunctionNotFound
BlockNotFound = BlockNotFound
ExtrinsicNotFound = ExtrinsicNotFound
# Re-export exceptions from async_substrate_interface for convenience
# These are already imported above, no need for redundant aliases
Copy link
Collaborator

@basfroman basfroman Dec 7, 2025

Choose a reason for hiding this comment

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

Please remove all of this and add __all__ in the end of the file

__all__ = [
    "BalanceTypeError",
    "BalanceUnitMismatchError",
    "BlacklistedException",
    "BlockNotFound",
    "ChainConnectionError",
    "ChainError",
    "ChainQueryError",
    "ChainTransactionError",
    "DelegateTakeTooHigh",
    "DelegateTakeTooLow",
    "DelegateTxRateLimitExceeded",
    "DuplicateChild",
    "ExtrinsicNotFound",
    "HotKeyAccountNotExists",
    "IdentityError",
    "InternalServerError",
    "InvalidChild",
    "InvalidRequestNameError",
    "MaxAttemptsException",
    "MaxSuccessException",
    "MetadataError",
    "NominationError",
    "NonAssociatedColdKey",
    "NotDelegateError",
    "NotEnoughStakeToSetChildkeys",
    "NotRegisteredError",
    "NotVerifiedException",
    "PostProcessException",
    "PriorityException",
    "ProportionOverflow",
    "RegistrationError",
    "RegistrationNotPermittedOnRootSubnet",
    "RunException",
    "StakeError",
    "StorageFunctionNotFound",
    "SubnetNotExists",
    "SubstrateRequestException",
    "SynapseDendriteNoneException",
    "SynapseException",
    "SynapseParsingError",
    "TakeError",
    "TooManyChildren",
    "TransferError",
    "TxRateLimitExceeded",
    "UnknownSynapseError",
    "UnstakeError",
]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I'll do that. Thank you for your feedback

Comment on lines +142 to +144
if _version_match is None:
raise ValueError(f"Invalid version format: {__version__}. Expected format: X.Y.Z")
__version__ = _version_match.group(0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Essentially, with or without your update, we'll know the version might be broken. But your approach is more obvious. I like it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @basfroman, thanks for the review!

  • I've updated my branch with the latest SDKv10
  • Removed the redundant aliases in errors.py
  • Added the full all list at the end of the file as requested

Everything should now match your review comments, I think. Let me know if anything else needs adjustment!

@basfroman basfroman added the SDKv10 Use this label for issues and feature requests relevant to Bittensor SDK v10. label Dec 7, 2025
Comment on lines 13 to 14
# Re-export exceptions from async_substrate_interface for convenience
# These are already imported above, no need for redundant aliases
Copy link
Collaborator

@basfroman basfroman Dec 7, 2025

Choose a reason for hiding this comment

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

remove comments and fix RP checkers issue

Copy link
Contributor Author

@wnqqnw19 wnqqnw19 Dec 8, 2025

Choose a reason for hiding this comment

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

I've removed the comments and PR checkers issues as requested. Thanks for your feedback

Copy link
Collaborator

Choose a reason for hiding this comment

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

I rebased your pr to SDKv10 branch.
I guess you want to re-create the PR for SDKv10 instead of solving the conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @basfroman thanks for rebasing!
I've created a fresh PR #3198 [ Fix/code quality improvements sdkv10 ] targeting SDKv10 as you suggested.

@wnqqnw19 wnqqnw19 requested a review from basfroman December 8, 2025 14:42
@basfroman basfroman changed the base branch from master to SDKv10 December 8, 2025 20:01
@basfroman basfroman closed this Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SDKv10 Use this label for issues and feature requests relevant to Bittensor SDK v10.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants