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

Suggested small refactors in assignments #1150

Merged
merged 1 commit into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bandit/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def _get_literal_value(self, literal):
elif isinstance(literal, ast.Tuple):
return_tuple = tuple()
for ti in literal.elts:
return_tuple = return_tuple + (self._get_literal_value(ti),)
return_tuple += (self._get_literal_value(ti),)
literal_value = return_tuple

elif isinstance(literal, ast.Set):
Expand Down
2 changes: 1 addition & 1 deletion bandit/formatters/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def report(manager, fileobj, sev_level, conf_level, lines=-1):
"Test ID: %s Severity: %s Confidence: %s\nCWE: %s\n%s\n"
"Location %s:%s"
)
text = text % (
text %= (
issue.test_id,
issue.severity,
issue.confidence,
Expand Down
2 changes: 1 addition & 1 deletion bandit/plugins/injection_wildcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def linux_commands_wildcard_injection(context, config):
argument_string = ""
if isinstance(call_argument, list):
for li in call_argument:
argument_string = argument_string + f" {li}"
argument_string += f" {li}"
elif isinstance(call_argument, str):
argument_string = call_argument

Expand Down
Loading