summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2016-07-07 15:41:17 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2016-07-07 15:41:17 +0100
commit692938b0746e50af671c28df56a00b17d6e51752 (patch)
treee5945366b5b6b8f2c6af9bd4dcc2f48890c2c356
parent3c54e35b3c607ab713e0ce4367ee467fb0cb6151 (diff)
downloadpylint-git-692938b0746e50af671c28df56a00b17d6e51752.tar.gz
Fix lint warnings.
-rw-r--r--pylint/checkers/__init__.py2
-rw-r--r--pylint/checkers/format.py4
-rw-r--r--pylint/checkers/imports.py2
-rw-r--r--pylint/checkers/logging.py10
-rw-r--r--pylint/checkers/spelling.py4
-rw-r--r--pylint/checkers/strings.py4
-rw-r--r--pylint/checkers/utils.py4
-rw-r--r--pylint/lint.py2
-rw-r--r--pylint/testutils.py2
-rw-r--r--pylint/utils.py2
10 files changed, 16 insertions, 20 deletions
diff --git a/pylint/checkers/__init__.py b/pylint/checkers/__init__.py
index fc6ca3c8f..7bdbf5f23 100644
--- a/pylint/checkers/__init__.py
+++ b/pylint/checkers/__init__.py
@@ -29,8 +29,8 @@ messages nor reports. XXX not true, emit a 07 report !
"""
import sys
-import tokenize
import warnings
+import tokenize
from pylint.config import OptionsProviderMixIn
from pylint.reporters import diff_string
diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py
index 91535b46d..13d7862c6 100644
--- a/pylint/checkers/format.py
+++ b/pylint/checkers/format.py
@@ -10,10 +10,10 @@ http://www.python.org/doc/essays/styleguide.html
Some parts of the process_token method is based from The Tab Nanny std module.
"""
+from functools import reduce # pylint: disable=redefined-builtin
import keyword
-import sys
import tokenize
-from functools import reduce # pylint: disable=redefined-builtin
+import sys
import six
from six.moves import zip, map, filter # pylint: disable=redefined-builtin
diff --git a/pylint/checkers/imports.py b/pylint/checkers/imports.py
index ca4d76b76..23a982317 100644
--- a/pylint/checkers/imports.py
+++ b/pylint/checkers/imports.py
@@ -4,9 +4,9 @@
"""imports checkers for Python code"""
import collections
-from distutils import sysconfig
import os
import sys
+from distutils import sysconfig
import six
diff --git a/pylint/checkers/logging.py b/pylint/checkers/logging.py
index f6ee8dbe0..c334bb280 100644
--- a/pylint/checkers/logging.py
+++ b/pylint/checkers/logging.py
@@ -58,14 +58,12 @@ CHECKED_CONVENIENCE_FUNCTIONS = set([
def is_method_call(callfunc_node, types=(), methods=()):
"""Determines if a CallFunc node represents a method call.
-
Args:
- callfunc_node: The CallFunc AST node to check.
- types: Optional sequence of caller type names to restrict check.
- methods: Optional sequence of method names to restrict check.
-
+ callfunc_node (astroid.CallFunc): The CallFunc AST node to check.
+ types (Optional[String]): Optional sequence of caller type names to restrict check.
+ methods (Optional[String]): Optional sequence of method names to restrict check.
Returns:
- True, if the node represents a method call for the given type and
+ bool: true if the node represents a method call for the given type and
method names, False otherwise.
"""
if not isinstance(callfunc_node, astroid.Call):
diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py
index ba21f6885..a7837bba9 100644
--- a/pylint/checkers/spelling.py
+++ b/pylint/checkers/spelling.py
@@ -5,10 +5,10 @@
"""
import os
-import sys
+import re
import tokenize
import string
-import re
+import sys
try:
import enchant
diff --git a/pylint/checkers/strings.py b/pylint/checkers/strings.py
index da7bae0a1..61ffb70ce 100644
--- a/pylint/checkers/strings.py
+++ b/pylint/checkers/strings.py
@@ -4,10 +4,10 @@
"""Checker for string formatting operations.
"""
-import sys
+import numbers
import tokenize
import string
-import numbers
+import sys
import six
diff --git a/pylint/checkers/utils.py b/pylint/checkers/utils.py
index ae4f69127..85a88f1bb 100644
--- a/pylint/checkers/utils.py
+++ b/pylint/checkers/utils.py
@@ -398,11 +398,9 @@ def is_attr_private(attrname):
def get_argument_from_call(callfunc_node, position=None, keyword=None):
"""Returns the specified argument from a function call.
-
- :param callfunc_node: Node representing a function call to check.
+ :param astroid.Call callfunc_node: Node representing a function call to check.
:param int position: position of the argument.
:param str keyword: the keyword of the argument.
-
:returns: The node representing the argument, None if the argument is not found.
:rtype: astroid.Name
:raises ValueError: if both position and keyword are None.
diff --git a/pylint/lint.py b/pylint/lint.py
index 2ad8b9481..75d6c399d 100644
--- a/pylint/lint.py
+++ b/pylint/lint.py
@@ -24,8 +24,8 @@ try:
except ImportError:
multiprocessing = None
import sys
-import tokenize
import warnings
+import tokenize
import six
diff --git a/pylint/testutils.py b/pylint/testutils.py
index 7eb7209ef..8a6cbd320 100644
--- a/pylint/testutils.py
+++ b/pylint/testutils.py
@@ -15,8 +15,8 @@ import sys
import re
import unittest
import tempfile
-import tokenize
import warnings
+import tokenize
import six
from six.moves import StringIO
diff --git a/pylint/utils.py b/pylint/utils.py
index 655677337..75e0ff3c9 100644
--- a/pylint/utils.py
+++ b/pylint/utils.py
@@ -12,9 +12,9 @@ import os
from os.path import dirname, basename, splitext, exists, isdir, join, normpath
import re
import sys
-import tokenize
import warnings
import textwrap
+import tokenize
import six
from six.moves import zip # pylint: disable=redefined-builtin