Skip to content

Commit dd74494

Browse files
committed
FIX: Use equality for integer comparison
1 parent 8afbf4a commit dd74494

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

niworkflows/viz/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def extract_svg(display_object, dpi=300, compress="auto"):
134134
start_idx = image_svg.find(start_tag)
135135
end_tag = "</svg>"
136136
end_idx = image_svg.rfind(end_tag)
137-
if start_idx is -1 or end_idx is -1:
137+
if start_idx == -1 or end_idx == -1:
138138
NIWORKFLOWS_LOG.info("svg tags not found in extract_svg")
139139
# rfind gives the start index of the substr. We want this substr
140140
# included in our return value so we add its length to the index.

0 commit comments

Comments
 (0)