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

Minor fixes #955

Merged
merged 1 commit into from
Oct 14, 2022
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
5 changes: 5 additions & 0 deletions bittensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
version_split = __version__.split(".")
__version_as_int__ = (100 * int(version_split[0])) + (10 * int(version_split[1])) + (1 * int(version_split[2]))


# Turn off rich console locals trace.
from rich.traceback import install
install(show_locals=False)

# Rich console.
__console__ = Console()
__use_console__ = True
Expand Down
4 changes: 4 additions & 0 deletions bittensor/_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@

from . import cli_impl

# Turn off rich console locals trace.
from rich.traceback import install
install(show_locals=False)

console = bittensor.__console__

class cli:
Expand Down
2 changes: 1 addition & 1 deletion bittensor/_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __new__( cls, parser: ArgumentParser = None, strict: bool = False, args: Opt
Nested config object created from parser arguments.
"""
if parser == None:
parser = ArgumentParser()
return config_impl.Config()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it messes with --help when importing bittensor and using argparse anywhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because we create an argument parser on bittensor import


# Optionally add config specific arguments
try:
Expand Down