Skip to content

Commit d504891

Browse files
committed
refs #278 fix ruff error
Fixed a SIM102 error flagged by ruff. This commit should also test if the .ruffignore file is working...
1 parent 8191b8f commit d504891

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pysimplesql/pysimplesql.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -3906,12 +3906,11 @@ def __init__(self, title: str, config: dict = None):
39063906
)
39073907

39083908
for k in ["bar", "red", "green", "blue"]:
3909-
if k in config:
3910-
if not all(isinstance(v, (int, float)) for v in config[k]):
3911-
raise ValueError(f"values for {k} component must all be numeric")
3912-
required_keys = {"value_start", "value_range", "period", "offset"}
3913-
if not required_keys.issubset(set(config.keys())):
3914-
raise ValueError(f"{k} must contain all of {required_keys}")
3909+
if k in config and not all(isinstance(v, (int, float)) for v in config[k]):
3910+
raise ValueError(f"values for {k} component must all be numeric")
3911+
required_keys = {"value_start", "value_range", "period", "offset"}
3912+
if k in config and not required_keys.issubset(set(config.keys())):
3913+
raise ValueError(f"{k} must contain all of {required_keys}")
39153914

39163915
if "phrases" in config:
39173916
if type(config["phrases"]) is not list:

0 commit comments

Comments
 (0)