Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lit] Remove (or allow specific) unused imports
Summary: Using Python linter flake8 on the utils/lit reveals several linter warnings designated "F401: Unused import". Fix or silence these warnings. Some of these unused imports are legitimate, while some are part of lit's API. For example, users of lit expect to be able to access `lit.formats.ShTest` in their `lit.cfg`, despite the module hierarchy for that symbol actually being `lit.formats.shtest.ShTest`. To silence linter errors for these lines, include a "noqa" directive. Reviewers: echristo, delcypher, beanz, ddunbar Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D25407 llvm-svn: 283710
- Loading branch information
Showing
4 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/usr/bin/env python | ||
|
||
from lit.main import main | ||
|
||
if __name__=='__main__': | ||
import lit | ||
lit.main() | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |