Don't allow one parmeter to be in 2 spaces

use the explicit user wish (given explicitly with "space")
This commit is contained in:
Matthias 2021-04-03 20:17:48 +02:00
parent 9d4b5cc6bb
commit 30e5e92968

View File

@ -244,8 +244,8 @@ class HyperStrategyMixin(object):
if not attr_name.startswith('__'): # Ignore internals, not strictly necessary.
attr = getattr(self, attr_name)
if issubclass(attr.__class__, BaseParameter):
if category is None or category == attr.category or \
attr_name.startswith(category + '_'):
if (category is None or category == attr.category or
(attr_name.startswith(category + '_') and attr.category is None)):
yield attr_name, attr
def _load_params(self, params: dict) -> None: