Merged in jakirkham/pylint/issue_538_pt2 (pull request #315)

Add another check of the current working directory for .pylintrc.

authorClaudiu Popa <pcmanticore@gmail.com>
changeset6fbe83cee30d
branchdefault
phasepublic
hiddenno
parent revision#4e6188183f88 pylint/config.py: Add another check of the current working directory for `.pylintrc`., #083425ea56b0 Allow statements in if or try blocks containing imports.
child revision#82fc94502999 Use the new .ctx attribute for subscripts for detecting in which context the node was used. Closes issue #705.
files modified by this revision
pylint/config.py
# HG changeset patch
# User Claudiu Popa <pcmanticore@gmail.com>
# Date 1449495625 -7200
# Mon Dec 07 15:40:25 2015 +0200
# Node ID 6fbe83cee30d0f9f8f1d12a48e1718b781bfb7cf
# Parent 083425ea56b0f1cce1af00630d9b1e4714d43f0d
# Parent 4e6188183f88fbf485140babc22be389efb2c9a7
Merged in jakirkham/pylint/issue_538_pt2 (pull request #315)

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':