Skip to content

Commit 761f9ff

Browse files
committed
Change seraparator for common use
1 parent 9116a5d commit 761f9ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/fosslight_prechecker/_result.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,16 @@ def exclude_file_in_yaml(path_to_find, yaml_files, license_missing_files, copyri
265265

266266

267267
def get_total_file_list(path_to_find, prj_report, exclude_files):
268-
if not path_to_find.endswith('/'):
269-
path_to_find += '/'
268+
if not path_to_find.endswith(f'{os.path.sep}'):
269+
path_to_find += f'{os.path.sep}'
270270
total_files = [str(file_report.path).replace(path_to_find, '', 1) for file_report in prj_report.file_reports]
271271
total_files_excluded = list(set(total_files) - set(exclude_files))
272272
return total_files_excluded
273273

274274

275275
def add_reason_to_file_name(oss_pkg_info_files, abnormal_yaml_files, path_to_find):
276-
if not path_to_find.endswith('/'):
277-
path_to_find += '/'
276+
if not path_to_find.endswith(f'{os.path.sep}'):
277+
path_to_find += f'{os.path.sep}'
278278

279279
for key, val in abnormal_yaml_files.items():
280280
file_name = key.replace(path_to_find, '', 1)

0 commit comments

Comments
 (0)