docs: add missing docstrings to utility functions#3281
Open
travellingsoldier85 wants to merge 6 commits intoopentensor:stagingfrom
Open
docs: add missing docstrings to utility functions#3281travellingsoldier85 wants to merge 6 commits intoopentensor:stagingfrom
travellingsoldier85 wants to merge 6 commits intoopentensor:stagingfrom
Conversation
Release/10.1.0
Add comprehensive Google-style docstrings to public utility functions that were missing documentation: - calculate_fees() in utils/liquidity.py - ss58_to_vec_u8() in utils/__init__.py - u16_normalized_float() in utils/__init__.py - u64_normalized_float() in utils/__init__.py - get_hash() in utils/__init__.py These functions are part of the public API and lacked documentation, making it harder for new contributors and users to understand their purpose and usage.
thewhaleking
approved these changes
Mar 16, 2026
thewhaleking
requested changes
Mar 16, 2026
bittensor/utils/liquidity.py
Outdated
|
|
||
| Args: | ||
| position: A dictionary describing the liquidity position, must contain | ||
| ``"liquidity"``, ``"fees_owed_tao"``, and ``"fees_owed_alpha"`` keys. |
Contributor
There was a problem hiding this comment.
These keys do not match the code in this fn
# Conflicts: # bittensor/utils/liquidity.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive Google-style docstrings to 5 public utility functions that were missing documentation.
Changes
calculate_fees()inbittensor/utils/liquidity.pyss58_to_vec_u8()inbittensor/utils/__init__.pyu16_normalized_float()inbittensor/utils/__init__.pyu64_normalized_float()inbittensor/utils/__init__.pyget_hash()inbittensor/utils/__init__.pyThese functions are part of the public API but lacked documentation. No functional changes — documentation only.