Skip to content

Commit

Permalink
Code structure fixes
Browse files Browse the repository at this point in the history
Removal of 'optional' on deprecated arguments, using only 'ver' for
version numbers, removal of unnecessary parentheses.
  • Loading branch information
William-Brown5515 authored and tofu-rocketry committed Sep 11, 2024
1 parent dc79b3f commit 6e623eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions bin/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,15 @@ def main():
'%s' % default_conf_location,
default=default_conf_location)
arg_parser.add_argument('-l', '--log_config',

Check warning on line 43 in bin/receiver.py

View check run for this annotation

Codecov / codecov/patch

bin/receiver.py#L43

Added line #L43 was not covered by tests
help='DEPRECATED - location of logging config '
'file (optional)',
help='DEPRECATED - location of logging config file',
default=None)
arg_parser.add_argument('-d', '--dn_file',

Check warning on line 46 in bin/receiver.py

View check run for this annotation

Codecov / codecov/patch

bin/receiver.py#L46

Added line #L46 was not covered by tests
help='location of the file containing valid DNs, '
'default path: %s' % default_dns_location,
default=default_dns_location)
arg_parser.add_argument('-v', '--version',

Check warning on line 50 in bin/receiver.py

View check run for this annotation

Codecov / codecov/patch

bin/receiver.py#L50

Added line #L50 was not covered by tests
action='version',
version='ver: %s' % ver)
version=ver)

# Using the vars function to output a dict-like view rather than Namespace object.
options = vars(arg_parser.parse_args())

Check warning on line 55 in bin/receiver.py

View check run for this annotation

Codecov / codecov/patch

bin/receiver.py#L55

Added line #L55 was not covered by tests
Expand Down
9 changes: 4 additions & 5 deletions bin/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@ def main():
arg_parser = ArgumentParser(description=__doc__)

Check warning on line 36 in bin/sender.py

View check run for this annotation

Codecov / codecov/patch

bin/sender.py#L36

Added line #L36 was not covered by tests

arg_parser.add_argument('-c', '--config',

Check warning on line 38 in bin/sender.py

View check run for this annotation

Codecov / codecov/patch

bin/sender.py#L38

Added line #L38 was not covered by tests
help=('location of config file, default path: '
'%s' % default_conf_location),
help='location of config file, default path: '
'%s' % default_conf_location,
default=default_conf_location)
arg_parser.add_argument('-l', '--log_config',

Check warning on line 42 in bin/sender.py

View check run for this annotation

Codecov / codecov/patch

bin/sender.py#L42

Added line #L42 was not covered by tests
help='DEPRECATED - location of logging config'
'file (optional)',
help='DEPRECATED - location of logging config file',
default=None)
arg_parser.add_argument('-v', '--version',

Check warning on line 45 in bin/sender.py

View check run for this annotation

Codecov / codecov/patch

bin/sender.py#L45

Added line #L45 was not covered by tests
action='version',
version='ver: %s' % ver)
version=ver)

# Using the vars function to output a dict-like view rather than Namespace object.
options = vars(arg_parser.parse_args())

Check warning on line 50 in bin/sender.py

View check run for this annotation

Codecov / codecov/patch

bin/sender.py#L50

Added line #L50 was not covered by tests
Expand Down

0 comments on commit 6e623eb

Please sign in to comment.