diff --git a/utils/lit/lit.py b/utils/lit/lit.py index 851063b3bd1..2c5ecfe1d40 100755 --- a/utils/lit/lit.py +++ b/utils/lit/lit.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +from lit.main import main + if __name__=='__main__': - import lit - lit.main() + main() diff --git a/utils/lit/lit/LitConfig.py b/utils/lit/lit/LitConfig.py index c26c08ef048..fc50ffc1039 100644 --- a/utils/lit/lit/LitConfig.py +++ b/utils/lit/lit/LitConfig.py @@ -83,7 +83,7 @@ class LitConfig(object): # a timeout per test. Check it's available. # See lit.util.killProcessAndChildren() try: - import psutil + import psutil # noqa: F401 except ImportError: self.fatal("Setting a timeout per test requires the" " Python psutil module but it could not be" diff --git a/utils/lit/lit/__init__.py b/utils/lit/lit/__init__.py index 024a259efad..42aad83beea 100644 --- a/utils/lit/lit/__init__.py +++ b/utils/lit/lit/__init__.py @@ -1,8 +1,5 @@ """'lit' Testing Tool""" -from __future__ import absolute_import -from .main import main - __author__ = 'Daniel Dunbar' __email__ = 'daniel@minormatter.com' __versioninfo__ = (0, 6, 0) diff --git a/utils/lit/lit/formats/__init__.py b/utils/lit/lit/formats/__init__.py index 68627084176..3ff46e93ead 100644 --- a/utils/lit/lit/formats/__init__.py +++ b/utils/lit/lit/formats/__init__.py @@ -1,4 +1,8 @@ -from __future__ import absolute_import -from lit.formats.base import TestFormat, FileBasedTest, OneCommandPerFileTest -from lit.formats.googletest import GoogleTest -from lit.formats.shtest import ShTest +from lit.formats.base import ( # noqa: F401 + TestFormat, + FileBasedTest, + OneCommandPerFileTest +) + +from lit.formats.googletest import GoogleTest # noqa: F401 +from lit.formats.shtest import ShTest # noqa: F401