Switch to module-relative import syntax.
Now that the python scripts are all in a "redo" python module, we can use the "new style" (ahem) package-relative imports. This appeases pylint, plus avoids confusion in case more than one package has similarly-named modules.
This commit is contained in:
parent
0b648521fd
commit
bd8dbfb487
20 changed files with 40 additions and 41 deletions
|
|
@ -11,7 +11,7 @@ jobs=1
|
||||||
|
|
||||||
# We probably want to fix these eventually, but in the meantime, these
|
# We probably want to fix these eventually, but in the meantime, these
|
||||||
# ones are relatively harmless.
|
# ones are relatively harmless.
|
||||||
disable=multiple-imports,missing-docstring,wrong-import-position,locally-disabled,invalid-name,unused-argument,fixme,global-statement,redefined-variable-type,using-constant-test,unused-variable,file-ignored,simplifiable-if-statement,relative-import
|
disable=multiple-imports,missing-docstring,locally-disabled,invalid-name,unused-argument,fixme,global-statement,redefined-variable-type,using-constant-test,unused-variable,file-ignored,simplifiable-if-statement
|
||||||
|
|
||||||
|
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import sys, os, errno, stat, signal, time
|
import sys, os, errno, stat, signal, time
|
||||||
import cycles, env, jobserver, state, paths
|
from . import cycles, env, jobserver, logs, state, paths
|
||||||
from helpers import unlink, close_on_exec
|
from .helpers import unlink, close_on_exec
|
||||||
import logs
|
from .logs import debug2, err, warn, meta, check_tty
|
||||||
from logs import debug2, err, warn, meta, check_tty
|
|
||||||
|
|
||||||
|
|
||||||
def _nice(t):
|
def _nice(t):
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import sys, os
|
import sys, os
|
||||||
import env, state
|
from . import env, state
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import os, sys, traceback
|
import os, sys, traceback
|
||||||
import env, state, builder, jobserver, deps
|
from . import env, state, builder, jobserver, deps
|
||||||
from logs import debug2, err
|
from .logs import debug2, err
|
||||||
|
|
||||||
|
|
||||||
def should_build(t):
|
def should_build(t):
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import sys, os
|
import sys, os
|
||||||
import env, state
|
from . import env, state
|
||||||
from logs import err
|
from .logs import err
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import errno, fcntl, os, re, struct, sys, time
|
import errno, fcntl, os, re, struct, sys, time
|
||||||
import termios
|
import termios
|
||||||
from atoi import atoi
|
from .atoi import atoi
|
||||||
import env, logs, options, state
|
from . import env, logs, options, state
|
||||||
|
|
||||||
optspec = """
|
optspec = """
|
||||||
redo-log [options...] [targets...]
|
redo-log [options...] [targets...]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import sys, os
|
import sys, os
|
||||||
import env, state, deps
|
from . import env, state, deps
|
||||||
from logs import err
|
from .logs import err
|
||||||
|
|
||||||
cache = {}
|
cache = {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
import sys, os, traceback
|
import sys, os, traceback
|
||||||
import env, options, state, builder, jobserver
|
from . import env, options, state, builder, jobserver
|
||||||
from atoi import atoi
|
from .atoi import atoi
|
||||||
from logs import warn, err
|
from .logs import warn, err
|
||||||
|
|
||||||
optspec = """
|
optspec = """
|
||||||
redo [targets...]
|
redo [targets...]
|
||||||
|
|
@ -46,7 +46,7 @@ def main():
|
||||||
targets = extra
|
targets = extra
|
||||||
|
|
||||||
if opt.version:
|
if opt.version:
|
||||||
import version
|
from . import version
|
||||||
print version.TAG
|
print version.TAG
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
if opt.debug:
|
if opt.debug:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import sys, os
|
import sys, os
|
||||||
import state, env
|
from . import state, env
|
||||||
from logs import err
|
from .logs import err
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import sys, os
|
import sys, os
|
||||||
import env, state
|
from . import env, state
|
||||||
from logs import err, debug2
|
from .logs import err, debug2
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import sys, os
|
import sys, os
|
||||||
import env, state
|
from . import env, state
|
||||||
from logs import err
|
from .logs import err
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import sys, os
|
import sys, os
|
||||||
import env, state
|
from . import env, state
|
||||||
from logs import err
|
from .logs import err
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import sys, os
|
import sys, os
|
||||||
import env, paths
|
from . import env, paths
|
||||||
from logs import err
|
from .logs import err
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import cycles, env, state
|
from . import cycles, env, state
|
||||||
from logs import debug
|
from .logs import debug
|
||||||
|
|
||||||
CLEAN = 0
|
CLEAN = 0
|
||||||
DIRTY = 1
|
DIRTY = 1
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import os, sys
|
import os, sys
|
||||||
from atoi import atoi
|
from .atoi import atoi
|
||||||
|
|
||||||
is_toplevel = False
|
is_toplevel = False
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,9 @@
|
||||||
# simpler :)
|
# simpler :)
|
||||||
#
|
#
|
||||||
import sys, os, errno, select, fcntl, signal
|
import sys, os, errno, select, fcntl, signal
|
||||||
from atoi import atoi
|
from . import state, env
|
||||||
from helpers import close_on_exec
|
from .atoi import atoi
|
||||||
import state, env
|
from .helpers import close_on_exec
|
||||||
|
|
||||||
_toplevel = 0
|
_toplevel = 0
|
||||||
_mytokens = 1
|
_mytokens = 1
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import os, re, sys, time
|
import os, re, sys, time
|
||||||
import env
|
from . import env
|
||||||
|
|
||||||
RED = GREEN = YELLOW = BOLD = PLAIN = None
|
RED = GREEN = YELLOW = BOLD = PLAIN = None
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import env
|
from . import env
|
||||||
from logs import debug2
|
from .logs import debug2
|
||||||
|
|
||||||
|
|
||||||
def _default_do_files(filename):
|
def _default_do_files(filename):
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import sys, os, errno, stat, fcntl, sqlite3
|
import sys, os, errno, stat, fcntl, sqlite3
|
||||||
import cycles, env
|
from . import cycles, env
|
||||||
from helpers import unlink, close_on_exec, join
|
from .helpers import unlink, close_on_exec, join
|
||||||
from logs import warn, debug2, debug3
|
from .logs import warn, debug2, debug3
|
||||||
|
|
||||||
SCHEMA_VER = 2
|
SCHEMA_VER = 2
|
||||||
TIMEOUT = 60
|
TIMEOUT = 60
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
from _version import COMMIT, TAG, DATE
|
from ._version import COMMIT, TAG, DATE
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue