@@ -840,17 +840,17 @@ def _get_config(self, node):
840
840
* If the current directory's configuration exists in
841
841
`self._cache` - return it.
842
842
* 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.
847
847
* 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
850
850
allows inheritance:
851
- * Read the parent configuration by calling this function with the
851
+ * Read the parent configuration by calling this function with the
852
852
parent directory as `node`.
853
- * Merge the parent configuration with the current one and
853
+ * Merge the parent configuration with the current one and
854
854
cache it.
855
855
* If the user has specified one of `BASE_ERROR_SELECTION_OPTIONS` in
856
856
the CLI - return the CLI configuration with the configuration match
@@ -1087,7 +1087,7 @@ def _validate_options(cls, options):
1087
1087
@classmethod
1088
1088
def _has_exclusive_option (cls , options ):
1089
1089
"""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
1091
1091
cls .BASE_ERROR_SELECTION_OPTIONS ])
1092
1092
1093
1093
@staticmethod
@@ -1096,13 +1096,13 @@ def _fix_set_options(options):
1096
1096
optional_set_options = ('ignore' , 'select' )
1097
1097
mandatory_set_options = ('add_ignore' , 'add_select' )
1098
1098
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.
1101
1101
1102
1102
Removes any occurrences of '' in the set.
1103
1103
1104
1104
"""
1105
- return set (value .split (',' )) - set ('' )
1105
+ return set (value_str .split (',' )) - set ([ '' ] )
1106
1106
1107
1107
for opt in optional_set_options :
1108
1108
value = getattr (options , opt )
0 commit comments