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

authorJohn Kirkham <jakirkham@gmail.com>
changeset4e6188183f88
branchissue_538_pt2
phasepublic
hiddenno
parent revision#18da1f9006b2 Disable persistence for test_self.
child revision#6fbe83cee30d Merged in jakirkham/pylint/issue_538_pt2 (pull request #315)
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
# Branch issue_538_pt2
# Node ID 4e6188183f88fbf485140babc22be389efb2c9a7
# Parent 18da1f9006b2fdae7063821a0d994678a19c8b2d
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':