Skip to content

Commit 5ad14bf

Browse files
Fix Windows Regression by removing removesuffix() (#530)
Signed-off-by: Michael Carlstrom <[email protected]>
1 parent bd2e639 commit 5ad14bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ament_mypy/ament_mypy/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ def _get_files(paths: List[str]) -> List[str]:
230230
type_stub_path = os.path.join(dirpath, filename)
231231
files.append(type_stub_path)
232232

233-
regular_file_path = type_stub_path.removesuffix('i')
233+
# removes suffix i
234+
regular_file_path = type_stub_path[:-len('i')]
234235
# Use type stub over file
235236
if regular_file_path in files:
236237
files.remove(regular_file_path)

0 commit comments

Comments
 (0)