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
|
||||
# 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]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import sys, os, errno, stat, signal, time
|
||||
import cycles, env, jobserver, state, paths
|
||||
from helpers import unlink, close_on_exec
|
||||
import logs
|
||||
from logs import debug2, err, warn, meta, check_tty
|
||||
from . import cycles, env, jobserver, logs, state, paths
|
||||
from .helpers import unlink, close_on_exec
|
||||
from .logs import debug2, err, warn, meta, check_tty
|
||||
|
||||
|
||||
def _nice(t):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import sys, os
|
||||
import env, state
|
||||
from . import env, state
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import os, sys, traceback
|
||||
import env, state, builder, jobserver, deps
|
||||
from logs import debug2, err
|
||||
from . import env, state, builder, jobserver, deps
|
||||
from .logs import debug2, err
|
||||
|
||||
|
||||
def should_build(t):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys, os
|
||||
import env, state
|
||||
from logs import err
|
||||
from . import env, state
|
||||
from .logs import err
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import errno, fcntl, os, re, struct, sys, time
|
||||
import termios
|
||||
from atoi import atoi
|
||||
import env, logs, options, state
|
||||
from .atoi import atoi
|
||||
from . import env, logs, options, state
|
||||
|
||||
optspec = """
|
||||
redo-log [options...] [targets...]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys, os
|
||||
import env, state, deps
|
||||
from logs import err
|
||||
from . import env, state, deps
|
||||
from .logs import err
|
||||
|
||||
cache = {}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
import sys, os, traceback
|
||||
import env, options, state, builder, jobserver
|
||||
from atoi import atoi
|
||||
from logs import warn, err
|
||||
from . import env, options, state, builder, jobserver
|
||||
from .atoi import atoi
|
||||
from .logs import warn, err
|
||||
|
||||
optspec = """
|
||||
redo [targets...]
|
||||
|
|
@ -46,7 +46,7 @@ def main():
|
|||
targets = extra
|
||||
|
||||
if opt.version:
|
||||
import version
|
||||
from . import version
|
||||
print version.TAG
|
||||
sys.exit(0)
|
||||
if opt.debug:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys, os
|
||||
import state, env
|
||||
from logs import err
|
||||
from . import state, env
|
||||
from .logs import err
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys, os
|
||||
import env, state
|
||||
from logs import err, debug2
|
||||
from . import env, state
|
||||
from .logs import err, debug2
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys, os
|
||||
import env, state
|
||||
from logs import err
|
||||
from . import env, state
|
||||
from .logs import err
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys, os
|
||||
import env, state
|
||||
from logs import err
|
||||
from . import env, state
|
||||
from .logs import err
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys, os
|
||||
import env, paths
|
||||
from logs import err
|
||||
from . import env, paths
|
||||
from .logs import err
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
import cycles, env, state
|
||||
from logs import debug
|
||||
from . import cycles, env, state
|
||||
from .logs import debug
|
||||
|
||||
CLEAN = 0
|
||||
DIRTY = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import os, sys
|
||||
from atoi import atoi
|
||||
from .atoi import atoi
|
||||
|
||||
is_toplevel = False
|
||||
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@
|
|||
# simpler :)
|
||||
#
|
||||
import sys, os, errno, select, fcntl, signal
|
||||
from atoi import atoi
|
||||
from helpers import close_on_exec
|
||||
import state, env
|
||||
from . import state, env
|
||||
from .atoi import atoi
|
||||
from .helpers import close_on_exec
|
||||
|
||||
_toplevel = 0
|
||||
_mytokens = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import os, re, sys, time
|
||||
import env
|
||||
from . import env
|
||||
|
||||
RED = GREEN = YELLOW = BOLD = PLAIN = None
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
import env
|
||||
from logs import debug2
|
||||
from . import env
|
||||
from .logs import debug2
|
||||
|
||||
|
||||
def _default_do_files(filename):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import sys, os, errno, stat, fcntl, sqlite3
|
||||
import cycles, env
|
||||
from helpers import unlink, close_on_exec, join
|
||||
from logs import warn, debug2, debug3
|
||||
from . import cycles, env
|
||||
from .helpers import unlink, close_on_exec, join
|
||||
from .logs import warn, debug2, debug3
|
||||
|
||||
SCHEMA_VER = 2
|
||||
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