Skip to content

Commit

Permalink
trim extraneous, duplicate usage of as_str()
Browse files Browse the repository at this point in the history
the input of the regexp matching is already guaranteed to be a string
  • Loading branch information
a-detiste committed Aug 12, 2024
1 parent 39a9623 commit 78ccee4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vertica_python/vertica/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,12 @@ def executemany(self,
#################################################################
m = self._insert_statement.match(operation)
if m:
target = as_str(m.group('target'))
target = m.group('target')

variables = as_str(m.group('variables'))
variables = m.group('variables')
variables = ",".join([variable.strip().strip('"') for variable in variables.split(",")])

values = as_str(m.group('values'))
values = m.group('values')
values = "|".join([value.strip().strip('"') for value in values.split(",")])
seq_of_values = [self.format_operation_with_parameters(values, parameters, is_copy_data=True)
for parameters in seq_of_parameters]
Expand Down

0 comments on commit 78ccee4

Please sign in to comment.