From 5a2b0ed9b9bb6130255fe50e9dd7d7a564908977 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Wed, 20 Sep 2023 08:57:05 -0400 Subject: [PATCH] style: reformatted main.py and util.py --- chasten/main.py | 8 -------- chasten/util.py | 6 ++++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index 336ab9e1..8d2b27bf 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -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(): diff --git a/chasten/util.py b/chasten/util.py index 3a381947..12be6745 100644 --- a/chasten/util.py +++ b/chasten/util.py @@ -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