Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the Python linter more often #22555

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion benchmark/scripts/test_Benchmark_Driver.py
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
Expand Up @@ -24,7 +24,6 @@

import logging
import sys

from StringIO import StringIO
from contextlib import contextmanager

Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion utils/gyb_syntax_support/Node.py
@@ -1,5 +1,7 @@
from __future__ import print_function
import sys # noqa: I201

import sys

from kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word


Expand Down
3 changes: 2 additions & 1 deletion utils/gyb_syntax_support/__init__.py
Expand Up @@ -6,13 +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
import Token # noqa: I201
from TypeNodes import TYPE_NODES # noqa: I201


Expand Down
1 change: 1 addition & 0 deletions utils/line-directive
Expand Up @@ -11,6 +11,7 @@
#
# ----------------------------------------------------------------------------
from __future__ import print_function

import bisect
import os
import re
Expand Down
2 changes: 0 additions & 2 deletions utils/run-test
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
Expand Up @@ -25,7 +25,6 @@ import shutil
import subprocess
import sys
import tempfile

from collections import namedtuple
from operator import attrgetter

Expand Down
1 change: 0 additions & 1 deletion utils/update_checkout/update_checkout/update_checkout.py
Expand Up @@ -17,7 +17,6 @@
import re
import sys
import traceback

from functools import reduce
from multiprocessing import freeze_support

Expand Down
2 changes: 1 addition & 1 deletion utils/vim/swift-format.py
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