pylint/config.py: Add another check of the current working directory for `.pylintrc`.

authorJohn Kirkham <jakirkham@gmail.com>
changeset9b3cbdb52788
branchdefault
phasepublic
hiddenno
parent revision#9a545cc2e2b6 Allow statements in if or try blocks containing imports.
child revision#b3032b9393fa Remove trailing whitespace.
files modified by this revision
pylint/config.py
# HG changeset patch
# User John Kirkham <jakirkham@gmail.com>
# Date 1449081017 18000
# Wed Dec 02 13:30:17 2015 -0500
# Node ID 9b3cbdb52788fd812e7d125ef8cbca5193c4ed8c
# Parent 9a545cc2e2b654d7c80228428b8230445184c284
pylint/config.py: Add another check of the current working directory for `.pylintrc`.

diff --git a/pylint/config.py b/pylint/config.py
@@ -95,10 +95,12 @@
1          curdir = os.path.abspath(os.getcwd())
2          while os.path.isfile(os.path.join(curdir, '__init__.py')):
3              curdir = os.path.abspath(os.path.join(curdir, '..'))
4              if os.path.isfile(os.path.join(curdir, 'pylintrc')):
5                  return os.path.join(curdir, 'pylintrc')
6 +            if os.path.isfile(os.path.join(curdir, '.pylintrc')):
7 +                return os.path.join(curdir, '.pylintrc')
8      if 'PYLINTRC' in os.environ and os.path.exists(os.environ['PYLINTRC']):
9          pylintrc = os.environ['PYLINTRC']
10      else:
11          user_home = os.path.expanduser('~')
12          if user_home == '~' or user_home == '/root':