Skip to content

Commit 986a2b1

Browse files
committed
only process list addopts for now
1 parent a457aad commit 986a2b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codeflash/code_utils/code_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def custom_addopts() -> None:
3333
# Backup original addopts
3434
original_addopts = data.get("tool", {}).get("pytest", {}).get("ini_options", {}).get("addopts", "")
3535
# nothing to do if no addopts present
36-
if original_addopts != "":
36+
if original_addopts != "" and isinstance(original_addopts, list):
3737
original_addopts = [x.strip() for x in original_addopts]
3838
non_blacklist_plugin_args = re.sub(r"-n(?: +|=)\S+", "", " ".join(original_addopts)).split(" ")
3939
non_blacklist_plugin_args = [x for x in non_blacklist_plugin_args if x != ""]

0 commit comments

Comments
 (0)