Skip to content

Commit 0efc413

Browse files
authored
#294 - sz_command removes multiple consecutive spaces in record_id fo… (#295)
* #294 - sz_command removes multiple consecutive spaces in record_id for add_record * #294 - Spelling correction
1 parent 6e7ef97 commit 0efc413

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning].
77

88
## [Unreleased]
99

10+
## [0.0.32] - 2025-11-12
11+
12+
### Fixed in 0.0.32
13+
14+
- `add_record` using a `record_id` with multiple consecutive spaces added the record but with only 1 space in `record_id`
15+
1016
## [0.0.31] - 2025-09-11
1117

1218
### Fixed in 0.0.31

sz_tools/sz_command

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ CMDS_NOT_TO_SET_LAST_COMMAND = [
8080
"response_to_file",
8181
]
8282

83-
8483
CONFIG_SETTINGS: Dict[str, Dict[str, Any]] = {
8584
"format_json": {
8685
"values": ["off", "on"],
@@ -286,7 +285,7 @@ class SzCmdShell(cmd.Cmd):
286285
self.read_config()
287286

288287
# Create config file if one doesn't exist and write it again if it exists. read_config() merges DEFAULT_CONFIG
289-
# with the config file incase new config settings are added to DEFAULT_CONFIG in a new release of the tool
288+
# with the config file in case new config settings are added to DEFAULT_CONFIG in a new release of the tool
290289
self.write_config()
291290

292291
# Acquire Senzing engines and information
@@ -2086,10 +2085,8 @@ class SzCmdShell(cmd.Cmd):
20862085

20872086
def remove_per_cmd_settings(self, cmd_line: str) -> str:
20882087
"""Remove any settings from a command"""
2089-
cmd_list = [c for c in cmd_line.split() if c.lower() not in PER_CMD_SETTINGS]
2090-
cmd_line_cleaned = " ".join(cmd_list)
2091-
2092-
return cmd_line_cleaned
2088+
cmd_list_clean = [c for c in self.parse(cmd_line) if c.lower() not in PER_CMD_SETTINGS]
2089+
return shlex.join(cmd_list_clean)
20932090

20942091
def parse(self, argument_string: str) -> List[str]:
20952092
"""Parses command arguments into a list of argument strings"""

0 commit comments

Comments
 (0)