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

Commit ba06aaa

Browse files
committed
#133: Hopefully last CR :)
1 parent 5ce1bbf commit ba06aaa

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

docs/release_notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ New Features
2222
will now be checked by default instead of D203, which required a single
2323
blank line before a class docstring (#137).
2424

25-
* Configuration files are now handles correctly. The closer a configuration file
25+
* Configuration files are now handled correctly. The closer a configuration file
2626
is to a checked file the more it matters.
2727
Configuration files no longer support ``explain``, ``source``, ``debug``,
2828
``verbose`` or ``count`` (#133).

src/pep257.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -840,17 +840,17 @@ def _get_config(self, node):
840840
* If the current directory's configuration exists in
841841
`self._cache` - return it.
842842
* If a configuration file does not exist in this directory:
843-
* If the directory is not a root directory:
844-
* Cache its configuration as this directory's and return it.
845-
* Else:
846-
* Cache a default configuration and return it.
843+
* If the directory is not a root directory:
844+
* Cache its configuration as this directory's and return it.
845+
* Else:
846+
* Cache a default configuration and return it.
847847
* Else:
848-
* Read the configuration file.
849-
* If a parent directory exists AND the configuration file
848+
* Read the configuration file.
849+
* If a parent directory exists AND the configuration file
850850
allows inheritance:
851-
* Read the parent configuration by calling this function with the
851+
* Read the parent configuration by calling this function with the
852852
parent directory as `node`.
853-
* Merge the parent configuration with the current one and
853+
* Merge the parent configuration with the current one and
854854
cache it.
855855
* If the user has specified one of `BASE_ERROR_SELECTION_OPTIONS` in
856856
the CLI - return the CLI configuration with the configuration match
@@ -1087,7 +1087,7 @@ def _validate_options(cls, options):
10871087
@classmethod
10881088
def _has_exclusive_option(cls, options):
10891089
"""Return `True` iff one or more exclusive options were selected."""
1090-
return any([getattr(options, opt) for opt in
1090+
return any([getattr(options, opt) is not None for opt in
10911091
cls.BASE_ERROR_SELECTION_OPTIONS])
10921092

10931093
@staticmethod
@@ -1096,13 +1096,13 @@ def _fix_set_options(options):
10961096
optional_set_options = ('ignore', 'select')
10971097
mandatory_set_options = ('add_ignore', 'add_select')
10981098

1099-
def _get_set(value):
1100-
"""Split `value` by the delimiter `,` and return a set.
1099+
def _get_set(value_str):
1100+
"""Split `value_str` by the delimiter `,` and return a set.
11011101
11021102
Removes any occurrences of '' in the set.
11031103
11041104
"""
1105-
return set(value.split(',')) - set('')
1105+
return set(value_str.split(',')) - set([''])
11061106

11071107
for opt in optional_set_options:
11081108
value = getattr(options, opt)

0 commit comments

Comments
 (0)