Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit deebc81

Browse files
committed
Support '.pep257rc' as a configuration filename
PEP8 and PyLint use `.pep8rc` and `.pylintrc`, respectively, so I thought it would be good for PEP257 to support the “rc” convention as well.
1 parent d7d21b1 commit deebc81

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/snippets/config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
``pep257`` supports `ini`-like configuration files. In order for ``pep257`` to
2-
use it, it must be named ``setup.cfg``, ``tox.ini`` or ``.pep257`` and have
3-
a ``[pep257]`` section.
2+
use it, it must be named ``setup.cfg``, ``tox.ini``, ``.pep257``, or
3+
``.pep257rc`` and have a ``[pep257]`` section.
44

55
When searching for a configuration file, ``pep257`` looks for one of the file
66
specified above `in that exact order`. If a configuration file was not found,

src/pep257.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ class ConfigurationParser(object):
755755
DEFAULT_MATCH_DIR_RE = '[^\.].*'
756756
DEFAULT_CONVENTION = conventions.pep257
757757

758-
PROJECT_CONFIG_FILES = ('setup.cfg', 'tox.ini', '.pep257')
758+
PROJECT_CONFIG_FILES = ('setup.cfg', 'tox.ini', '.pep257', '.pep257rc')
759759

760760
def __init__(self):
761761
"""Create a configuration parser."""

0 commit comments

Comments
 (0)