Skip to content

Commit

Permalink
Fix windows style path in Windows pre-commit (#1282)
Browse files Browse the repository at this point in the history
  • Loading branch information
liqikai9 authored and ly015 committed Apr 2, 2022
1 parent e347e74 commit c07ab70
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .dev_scripts/github/update_model_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def collect_paper_readme():
][0]
name = re.findall(r'<a href=".*">(.*?)[ ]*\(.*\'.*\).*</a>',
keyline)[0]
collection2readme[name] = link_prefix + readme_file
collection2readme[name] = link_prefix + readme_file.replace(
'\\', '/')

return collection2readme

Expand Down Expand Up @@ -319,8 +320,10 @@ def update_model_index():
yml_files.sort()

model_index = {
'Import':
[osp.relpath(yml_file, MMPOSE_ROOT) for yml_file in yml_files]
'Import': [
osp.relpath(yml_file, MMPOSE_ROOT).replace('\\', '/')
for yml_file in yml_files
]
}
model_index_file = osp.join(MMPOSE_ROOT, 'model-index.yml')
is_different = dump_yaml_and_check_difference(model_index,
Expand Down

0 comments on commit c07ab70

Please sign in to comment.