Skip to content

docs: add missing docstrings to utility functions#3281

Open
travellingsoldier85 wants to merge 6 commits intoopentensor:stagingfrom
travellingsoldier85:docs/add-missing-docstrings-utils
Open

docs: add missing docstrings to utility functions#3281
travellingsoldier85 wants to merge 6 commits intoopentensor:stagingfrom
travellingsoldier85:docs/add-missing-docstrings-utils

Conversation

@travellingsoldier85
Copy link

Summary

Add comprehensive Google-style docstrings to 5 public utility functions that were missing documentation.

Changes

  • calculate_fees() in bittensor/utils/liquidity.py
  • ss58_to_vec_u8() in bittensor/utils/__init__.py
  • u16_normalized_float() in bittensor/utils/__init__.py
  • u64_normalized_float() in bittensor/utils/__init__.py
  • get_hash() in bittensor/utils/__init__.py

These functions are part of the public API but lacked documentation. No functional changes — documentation only.

ibraheem-abe and others added 2 commits January 29, 2026 16:19
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.

Args:
position: A dictionary describing the liquidity position, must contain
``"liquidity"``, ``"fees_owed_tao"``, and ``"fees_owed_alpha"`` keys.
Copy link
Contributor

Choose a reason for hiding this comment

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

These keys do not match the code in this fn

@thewhaleking thewhaleking requested a review from a team March 16, 2026 17:48
@thewhaleking thewhaleking changed the base branch from master to staging March 16, 2026 17:56
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