Skip to content

Commit 8099a6a

Browse files
Fix passing a dict for builder.
Do to a unintended operator precedence, ruff later added brackets where they do not belong. This moves them and fixes the bug where passing a dictionary to the `builder` keyword of `DefaultDriver` wasn't possible. Fixes #27. * sphinx_polyversion/driver.py (DefaultDriver): Fix.
1 parent 1010c99 commit 8099a6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinx_polyversion/driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def __init__(
508508
self.encoder = encoder or GLOBAL_ENCODER
509509
self.root_data_factory = root_data_factory
510510

511-
if isinstance(builder, dict) or (isinstance(env, dict) and not selector):
511+
if (isinstance(builder, dict) or isinstance(env, dict)) and not selector:
512512
raise ValueError(
513513
"Must provide selector if a mapping is passed for `builder` or `env`."
514514
)

0 commit comments

Comments
 (0)