argparse-from-file 1.2__tar.gz → 1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: argparse-from-file
3
- Version: 1.2
3
+ Version: 1.3
4
4
  Summary: Wrapper for Python's argparse to also read arguments from a file
5
5
  Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
6
6
  License-Expression: GPL-3.0-or-later
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: argparse-from-file
3
- Version: 1.2
3
+ Version: 1.3
4
4
  Summary: Wrapper for Python's argparse to also read arguments from a file
5
5
  Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
6
6
  License-Expression: GPL-3.0-or-later
@@ -23,11 +23,10 @@ def _prog_name():
23
23
  # no good answer here, so fall back to the default
24
24
  modspec = None
25
25
 
26
- if not modspec or modspec.name == '__main__':
26
+ if not modspec or (name := modspec.name) == '__main__':
27
27
  return os.path.basename(sys.argv[0])
28
28
 
29
- return modspec.name.removesuffix('.__main__')
30
-
29
+ return name[:-9] if name.endswith('.__main__') else name
31
30
 
32
31
  class ArgumentParser(argparse.ArgumentParser):
33
32
  _top = True