Updating/improving/creating docstring codebase#2310
Conversation
| class Axon: | ||
| """ | ||
| The ``axon`` class in Bittensor is a fundamental component that serves as the server-side interface for a neuron within the Bittensor network. | ||
| The ``Axon`` class in Bittensor is a fundamental component that serves as the server-side interface for a neuron within the Bittensor network. |
There was a problem hiding this comment.
Only needs a single backtick. Not sure where our style of double-backticks comes from
There was a problem hiding this comment.
As I understand it, single backtick is used in cases of link and using the keyword :func: (For example: :func:uvicorn.Server). And double backticks allow to highlight a word.
| def from_float(amount: float): | ||
| """ | ||
| Given tao (float), return Balance object with rao(int) and tao(float), where rao = int(tao*pow(10,9)) | ||
| Given tao, return :func:`Balance` object with rao(``int``) and tao(``float``), where rao = int(tao*pow(10,9)) |
There was a problem hiding this comment.
is the use of the quotes inside a docstring really necessary?
There was a problem hiding this comment.
I would delete. Raj wants to highlight the types of variables. Although they are described below.
There was a problem hiding this comment.
I get that. I mean the "Balance" vs Balance
There was a problem hiding this comment.
I see. :func:''Balance'' creates anchor link as # in HTML. I did it based on what I've seen Raj do. He will ultimately do it the way he wants users to see it :)
a58492a to
257b9a1
Compare
# Conflicts: # bittensor/core/extrinsics/prometheus.py # bittensor/core/tensor.py # bittensor/utils/__init__.py
The changes contain changes/additions, as well as supplemented and updated examples of code usage.
The approaches to describing type annotations have been changed to bring the code base to consistency.
Other minor changes and refactoring.
DO NOT MERGE without @rajkaramchedu approval