Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: default set-parameter values as list #1438

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

degenaro
Copy link
Collaborator

Types of changes

  • Hot fix (emergency fix and release)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation (change which affects the documentation site)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Release (develop -> main)

Quality assurance (all should be covered).

  • My code follows the code style of this project.
  • Documentation for my change is up to date?
  • My PR meets testing requirements.
  • All new and existing tests passed.
  • All commits are signed-off.

Summary

Key links:

Before you merge

  • Ensure it is a 'squash commit' if not a release.
  • Ensure CI is currently passing
  • Check sonar. If you are working for a fork a maintainer will reach out, if required.

Signed-off-by: Lou DeGenaro <lou.degenaro@gmail.com>
@@ -576,14 +576,27 @@ def _get_control_implementation(
component.control_implementations.append(control_implementation)
return control_implementation

def _str_to_list(self, value: str) -> List[str]:
"""List to string."""
rval = []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment should be string to list

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

# remove whitespace
for v in values:
n = v.replace(' ', '')
n = n.strip()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of both the lines above? Just to remove leading and trailing spaces, or also remove spaces in between? Suppose a single value is a string containing 2 or more words. This will remove spaces in between words also. Is that the intention?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Signed-off-by: Lou DeGenaro <lou.degenaro@gmail.com>
Copy link
Collaborator

@vikas-agarwal76 vikas-agarwal76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@degenaro degenaro merged commit 419025d into develop Aug 11, 2023
16 checks passed
@degenaro degenaro deleted the fix/set-parameters-default-value-list2 branch August 11, 2023 13:57
jpower432 pushed a commit to jpower432/compliance-trestle that referenced this pull request Aug 23, 2023
* fix: default set-parameter values as list

Signed-off-by: Lou DeGenaro <lou.degenaro@gmail.com>

* fix string to list comment and blanks removal

Signed-off-by: Lou DeGenaro <lou.degenaro@gmail.com>

---------

Signed-off-by: Lou DeGenaro <lou.degenaro@gmail.com>
@AleJo2995 AleJo2995 mentioned this pull request Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants