Skip to content

Commit 4a3bc67

Browse files
Regression fix for some anti-patterns
1 parent ff308fc commit 4a3bc67

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

pythonrepo/__init__.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@
1717
# limitations under the License.
1818

1919

20-
__package__ = """pythonrepo"""
21-
22-
2320
__module__ = """pythonrepo"""
24-
25-
26-
__name__ = """pythonrepo"""
21+
"""This is pythonrepo __module Template"""
2722

2823

2924
__version__ = """1.1.4"""
@@ -46,15 +41,7 @@
4641
raise baton
4742

4843

49-
try:
50-
from . import pythonrepo as pythonrepo
51-
except Exception as importErr:
52-
del importErr
53-
import pythonrepo.pythonrepo as pythonrepo
54-
55-
5644
if __name__ in '__main__':
5745
if pythonrepo.__name__ is None:
5846
raise ImportError(str("Failed to open pythonrepo"))
5947
pythonrepo.main(sys.argv[1:])
60-
exit(0)

pythonrepo/pythonrepo.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@
1818
# limitations under the License.
1919

2020

21-
__module__ = """pythonrepo"""
22-
23-
24-
# __name__ = """pythonrepo"""
21+
__module__ = """pythonrepo.pythonrepo"""
2522

2623

2724
try:
28-
import sys
25+
from . import sys
2926
import argparse
3027
except Exception as err:
3128
# Collect Error Info
@@ -53,7 +50,8 @@
5350
"""Contains the short epilog of the program CLI help text."""
5451

5552

56-
__version__ = """1.1.4"""
53+
from . import __version__ as __version__
54+
# __version__ = """1.1.4"""
5755
"""The version of this program."""
5856

5957

@@ -101,7 +99,6 @@ def parseArgs(arguments=None):
10199

102100
def useTool(tool, *arguments):
103101
"""Handler for launching the functions."""
104-
# arguments = __checkToolArgs(arguments)
105102
if (tool is not None) and (tool in TASK_OPTIONS.keys()):
106103
try:
107104
# print(str("launching: " + tool))

0 commit comments

Comments
 (0)