mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Python] Replace global linting excludes with local line-level excludes ("noqa")
Replace the project global linting rule excludes (as defined in .pep8) with fine-grained "# noqa" annotations. By using noqa annotation the excludes are made on a per line basis instead of globally. These annotations are used where we make deliberate deviations from the standard linting rules. To lint the Python code in the project: $ flake8 To install flake8: $ pip install flake8 See https://flake8.readthedocs.org/en/latest/ for details. To enable checking of the PEP-8 naming conventions, install the optional extension pep8-naming: $ pip install pep8-naming To enable checking of blind "except:" statements, install the optional extension flake8-blind-except: $ pip install flake8-blind-except To enable checking of import statement order, install the optional extension flake8-import-order: $ pip install flake8-import-order
This commit is contained in:
@@ -10,7 +10,7 @@ import textwrap
|
||||
sys.path.append(os.path.join(os.path.dirname(
|
||||
os.path.dirname(os.path.abspath(__file__))), 'src'))
|
||||
|
||||
import passes
|
||||
import passes # noqa (E402 module level import not at top of file)
|
||||
|
||||
# TODO: This should not be hard coded.
|
||||
PIPELINES = ["PreSpecialize", "HighLevel", "EarlyLoopOpt",
|
||||
|
||||
Reference in New Issue
Block a user