summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorEnji Cooper <yaneurabeya@gmail.com>2019-11-14 11:11:23 -0800
committerClaudiu Popa <pcmanticore@gmail.com>2019-11-16 21:24:40 +0100
commit1b15abbc5a995d57abe5f2a7016d6088355a2b91 (patch)
tree5368d15f2cba9bb09166ab8927442d29f910b9fa /setup.py
parentb17d6bd537717375b21633478df499bb29741160 (diff)
downloadpylint-git-1b15abbc5a995d57abe5f2a7016d6088355a2b91.tar.gz
Fix pylint reported issues
* Sort imports per PEP8 * Rename globally allocated symbol to avoid variable shadowing issue. * Remove squelching of W0704, since recent versions of pylint do not support the warning, resulting in an error with `pylint -E`. * Add `pylint: disable=unused-import` to seemingly unused imports which actually affect build behavior. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index 4d16b79b5..b46d40917 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# pylint: disable=W0404,W0622,W0704,W0613
+# pylint: disable=W0404,W0622,W0613
# Copyright (c) 2006, 2009-2010, 2012-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2010 Julien Jehannet <julien.jehannet@logilab.fr>
# Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com>
@@ -20,10 +20,10 @@
"""Generic Setup script, takes package info from __pkginfo__.py file.
"""
-import os
-import sys
from distutils.command.build_py import build_py
+import os
from os.path import exists, isdir, join
+import sys
__docformat__ = "restructuredtext en"
@@ -31,12 +31,12 @@ __docformat__ = "restructuredtext en"
try:
from setuptools import setup
from setuptools.command import easy_install as easy_install_lib
- from setuptools.command import install_lib
+ from setuptools.command import install_lib # pylint: disable=unused-import
USE_SETUPTOOLS = 1
except ImportError:
from distutils.core import setup
- from distutils.command import install_lib
+ from distutils.command import install_lib # pylint: disable=unused-import
USE_SETUPTOOLS = 0
easy_install_lib = None
@@ -45,8 +45,8 @@ except ImportError:
base_dir = os.path.dirname(__file__)
__pkginfo__ = {}
-with open(os.path.join(base_dir, "pylint", "__pkginfo__.py")) as f:
- exec(f.read(), __pkginfo__)
+with open(os.path.join(base_dir, "pylint", "__pkginfo__.py")) as pkginfo_fp:
+ exec(pkginfo_fp.read(), __pkginfo__)
scripts = __pkginfo__.get("scripts", [])
data_files = __pkginfo__.get("data_files", None)
ext_modules = __pkginfo__.get("ext_modules", None)