Skip to content

Commit

Permalink
do not run remove f str if we want to skip line
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna committed Jan 10, 2024
1 parent 5b733dc commit 644b88b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core_codemods/remove_unnecessary_f_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ def _check_formatted_string(
_original_node: cst.FormattedString,
updated_node: cst.FormattedString,
):
transformed_node = super()._check_formatted_string(_original_node, updated_node)
if not self.filter_by_path_includes_or_excludes(
self.node_position(transformed_node)
self.node_position(_original_node)
):
return transformed_node
return _original_node

Check warning on line 40 in src/core_codemods/remove_unnecessary_f_str.py

View check run for this annotation

Codecov / codecov/patch

src/core_codemods/remove_unnecessary_f_str.py#L40

Added line #L40 was not covered by tests

transformed_node = super()._check_formatted_string(_original_node, updated_node)
if not _original_node.deep_equals(transformed_node):
self.report_change(_original_node)
return transformed_node

0 comments on commit 644b88b

Please sign in to comment.