Skip to content

Commit

Permalink
[gardening] Fix several python-lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoppen committed Oct 29, 2019
1 parent fcd3457 commit 932525d
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion benchmark/scripts/test_Benchmark_Driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import os
import time
import unittest

from StringIO import StringIO
from imp import load_source

Expand Down
1 change: 0 additions & 1 deletion benchmark/scripts/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import logging
import sys

from StringIO import StringIO
from contextlib import contextmanager

Expand Down
1 change: 1 addition & 0 deletions utils/gyb_syntax_support/Node.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import print_function
import sys # noqa: I201

from kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word


Expand Down
2 changes: 2 additions & 0 deletions utils/gyb_syntax_support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
from DeclNodes import DECL_NODES # noqa: I201
from ExprNodes import EXPR_NODES # noqa: I201
from GenericNodes import GENERIC_NODES # noqa: I201

from NodeSerializationCodes import SYNTAX_NODE_SERIALIZATION_CODES, \
get_serialization_code, \
verify_syntax_node_serialization_codes

from PatternNodes import PATTERN_NODES # noqa: I201
from StmtNodes import STMT_NODES # noqa: I201

import Token
from Trivia import TRIVIAS # noqa: I201
from TypeNodes import TYPE_NODES # noqa: I201
Expand Down
2 changes: 0 additions & 2 deletions utils/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ from swift_build_support.swift_build_support import (
arguments,
shell
)

from swift_build_support.swift_build_support.SwiftBuildSupport import \
SWIFT_SOURCE_ROOT

from swift_build_support.swift_build_support.targets import \
StdlibDeploymentTarget

Expand Down
1 change: 0 additions & 1 deletion utils/scale-test
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import shutil
import subprocess
import sys
import tempfile

from collections import namedtuple
from operator import attrgetter

Expand Down
2 changes: 1 addition & 1 deletion utils/vim/swift-indent.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def main(argc, argv):
lines = stdout.decode(encoding).split('\n')
sequence = difflib.SequenceMatcher(None, buf, lines)
for op in reversed(sequence.get_opcodes()):
if op[0] is not 'equal':
if op[0] != 'equal':
vim.current.buffer[op[1]:op[2]] = lines[op[3]:op[4]]


Expand Down

0 comments on commit 932525d

Please sign in to comment.