Skip to content

Commit

Permalink
style: reformatted main.py and util.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Poiuy7312 committed Sep 20, 2023
1 parent 912dd6a commit 5a2b0ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 0 additions & 8 deletions chasten/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,14 +910,6 @@ def log() -> None:
# of the chasten tool
server.start_syslog_server()

@cli.command()
def version():
"""Display the version of Chasten."""
# Get Chasten version from util file
version_string = util.get_chasten_version()
# output chasten version
typer.echo(f"{version_string}")


@cli.command()
def version():
Expand Down
6 changes: 4 additions & 2 deletions chasten/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ def get_chasten_version() -> str:
try:
# if importlib.metadata fails, try using pkg_resources
# The 'distribution' variable holds information about the 'chasten' package
distribution= pkg_resources.get_distribution(constants.chasten.Application_Name)
distribution = pkg_resources.get_distribution(
constants.chasten.Application_Name
)
# Retrieve version information from distribution
version_string_of_foo= distribution.version
version_string_of_foo = distribution.version
except pkg_resources.DistributionNotFound:
# If both methods fail, return a default version
version_string_of_foo = default_chasten_semver.version
Expand Down

0 comments on commit 5a2b0ed

Please sign in to comment.