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

Fix spelling on comments and 'is not' #1926

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions bittensor/subnets.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ async def query_api(
axons: Union[bt.axon, List[bt.axon]],
deserialize: Optional[bool] = False,
timeout: Optional[int] = 12,
n: Optional[float] = 0.1,
uid: Optional[int] = None,
**kwargs: Optional[Any],
) -> Any:
"""
Expand All @@ -60,15 +58,13 @@ async def query_api(
axons (Union[bt.axon, List[bt.axon]]): The list of axon(s) to query.
deserialize (bool, optional): Whether to deserialize the responses. Defaults to False.
timeout (int, optional): The timeout in seconds for the query. Defaults to 12.
n (float, optional): The fraction of top nodes to consider based on stake. Defaults to 0.1.
uid (int, optional): The specific UID of the API node to query. Defaults to None.
**kwargs: Keyword arguments for the prepare_synapse_fn.
Returns:
Any: The result of the process_responses_fn.
"""
synapse = self.prepare_synapse(**kwargs)
bt.logging.debug(f"Quering valdidator axons with synapse {synapse.name}...")
bt.logging.debug(f"Querying validator axons with synapse {synapse.name}...")
responses = await self.dendrite(
axons=axons,
synapse=synapse,
Expand Down
4 changes: 2 additions & 2 deletions bittensor/synapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def cast_int(raw: str) -> int:
int or None: The converted integer, or ``None`` if the input was ``None``.
"""
return int(raw) if raw != None else raw # type: ignore
return int(raw) if raw is not None else raw # type: ignore


def cast_float(raw: str) -> float:
Expand All @@ -96,7 +96,7 @@ def cast_float(raw: str) -> float:
float or None: The converted float, or ``None`` if the input was ``None``.
"""
return float(raw) if raw != None else raw # type: ignore
return float(raw) if raw is not None else raw # type: ignore


class TerminalInfo(BaseModel):
Expand Down