Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit fbaeef1

Browse files
Attsun1031dlawin
authored andcommitted
use constant
1 parent 9fe6374 commit fbaeef1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

data_diff/config.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
import toml
55

66

7+
_ARRAY_FIELDS = (
8+
"key_columns",
9+
"columns",
10+
)
11+
12+
713
class ConfigParseError(Exception):
814
pass
915

@@ -39,7 +45,7 @@ def _apply_config(config: Dict[str, Any], run_name: str, kw: Dict[str, Any]):
3945
run_args[index] = {attr: kw.pop(f"{attr}{index}") for attr in ("database", "table")}
4046

4147
# Make sure array fields are decoded as list, since array fields in toml are decoded as list, but TableSegment object requires tuple type.
42-
for field in ["key_columns", "columns"]:
48+
for field in _ARRAY_FIELDS:
4349
if isinstance(run_args.get(field), list):
4450
run_args[field] = tuple(run_args[field])
4551

0 commit comments

Comments
 (0)