Strip String node doesn't properly handle strings of characters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
The strip string node should follow the python3 strip functionality. Currently, it strips whitespace if nothing is provided to the 'Characters' input. If a character is provided to the 'Characters' input, then it properly strips that character from the front and back of the provided String.
The bug is that the node only uses the first character in the 'Characters' input for the strip operation even if a full string is provided. It should instead either follow the 'strip all matching characters' behavior of the python3 libs or should remove matching substrings from the front/back of the string.
The python description of split:
https://docs.python.org/3/library/stdtypes.html#str.strip
The relevant node in GraphEx:
https://github.com/mitre/GraphEx/blob/main/graphex/nodes/strings.py#L93
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the strip string node at graphex/nodes/strings.py around line 93, then compare its behavior with Python's str.strip documentation. Reproduce the case where the Characters input contains multiple characters and confirm the expected matching behavior before changing it; done means the node handles the full input consistently with the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100