Skip to content

Commit

Permalink
refactor: be consistent in quotes
Browse files Browse the repository at this point in the history
Signed-off-by: Gareth Jones <jones258@gmail.com>
  • Loading branch information
G-Rath committed Nov 5, 2024
1 parent babe4ca commit 53637f4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/update-ecosystems-lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ def update_json_schema():
schema = json.loads(open('validation/schema.json').read())

names = ecosystems.keys()
pattern = ""
pattern = ''

for name in names:
pattern += name.replace(".", "\\.")
pattern += "|"
pattern += name.replace('.', '\\.')
pattern += '|'

# this is a special "ecosystem" name
pattern += "GIT"
pattern += 'GIT'

schema['$defs']['ecosystemName']['enum'] = list(names)
schema['$defs']['ecosystemWithSuffix']['pattern'] = f'^({pattern})(:.+)?$'
Expand Down Expand Up @@ -64,7 +64,7 @@ def update_schema_md():
table_start_index = md.index(MARKDOWN_TABLE_MARKER_START)
table_end_index = md.index(MARKDOWN_TABLE_MARKER_END)

assert table_start_index < table_end_index, "Table start index must be before table end index"
assert table_start_index < table_end_index, 'Table start index must be before table end index'

table = generate_ecosystems_markdown_table()
table += '| Your ecosystem here. | [Send us a PR](https://github.com/ossf/osv-schema/compare). |\n'
Expand Down

0 comments on commit 53637f4

Please sign in to comment.