Skip to content

Commit 40779be

Browse files
committed
Remove self-imports
1 parent 1950e6e commit 40779be

File tree

6 files changed

+19
-10
lines changed

6 files changed

+19
-10
lines changed

reprounzip-vistrails/reprounzip_vistrails.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
if __name__ == '__main__': # noqa
1515
from reprounzip_vistrails import run_from_vistrails
1616
run_from_vistrails()
17+
assert False
1718

1819
import argparse
1920
from datetime import datetime

reprounzip/reprounzip/__main__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (C) 2014-2017 New York University
2+
# This file is part of ReproZip which is released under the Revised BSD License
3+
# See file LICENSE for full license details.
4+
5+
from reprounzip.main import main
6+
7+
8+
main()

reprounzip/reprounzip/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
``reprounzip.unpackers``.
1212
"""
1313

14-
if __name__ == '__main__': # noqa
15-
from reprounzip.main import main
16-
main()
17-
1814
import argparse
1915
import locale
2016
import logging

reprozip/reprozip/__main__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (C) 2014-2017 New York University
2+
# This file is part of ReproZip which is released under the Revised BSD License
3+
# See file LICENSE for full license details.
4+
5+
from reprozip.main import main
6+
7+
8+
main()

reprozip/reprozip/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
It dispatches to other routines, or handles the testrun command.
1111
"""
1212

13-
if __name__ == '__main__': # noqa
14-
from reprozip.main import main
15-
main()
16-
1713
import argparse
1814
import locale
1915
import logging

tests/functional.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def functional_tests(raise_warnings, interactive, run_vagrant, run_docker):
157157
rpz_python.extend(['-m'] + os.environ['COVER'].split(' '))
158158
rpuz_python.extend(['-m'] + os.environ['COVER'].split(' '))
159159

160-
reprozip_main = tests.parent / 'reprozip/reprozip/main.py'
161-
reprounzip_main = tests.parent / 'reprounzip/reprounzip/main.py'
160+
reprozip_main = tests.parent / 'reprozip/reprozip/__main__.py'
161+
reprounzip_main = tests.parent / 'reprounzip/reprounzip/__main__.py'
162162

163163
verbose = ['-v'] * 3
164164
rpz = rpz_python + [reprozip_main.absolute().path] + verbose

0 commit comments

Comments
 (0)