We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33cf364 commit 03194e1Copy full SHA for 03194e1
1 file changed
ament_mypy/ament_mypy/main.py
@@ -226,6 +226,14 @@ def _get_files(paths: List[str]) -> List[str]:
226
for filename in sorted(filenames):
227
if filename.endswith('.py'):
228
files.append(os.path.join(dirpath, filename))
229
+ elif filename.endswith('.pyi'):
230
+ type_stub_path = os.path.join(dirpath, filename)
231
+ files.append(type_stub_path)
232
+
233
+ regular_file_path = type_stub_path.removesuffix('i')
234
+ # Use type stub over file
235
+ if regular_file_path in files:
236
+ files.remove(regular_file_path)
237
elif os.path.isfile(path):
238
files.append(path)
239
return [os.path.normpath(f) for f in files]
0 commit comments