Skip to content

Commit

Permalink
chore(style): Use set for set inclusion condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 27, 2024
1 parent d1806b8 commit 16f34b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ocdskit/commands/schema_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def recurse(data):
# Find definitions that can use a common $ref in the versioned release schema. Unversioned fields,
# like the `id`'s of objects in arrays that are not `wholeListMerge`, should be excluded, but it's
# too much work with too little advantage to do so.
if key in ('definitions', 'properties'):
if key in {'definitions', 'properties'}:
for definition in value.values():
add_definition(definition)
recurse(value)
Expand Down
2 changes: 1 addition & 1 deletion ocdskit/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def detect_format(path, root_path='', reader=open):
is_compiled = True
elif prefix in metadata_prefixes:
metadata_count += 1
if not prefix and event not in ('end_array', 'end_map', 'map_key'):
if not prefix and event not in {'end_array', 'end_map', 'map_key'}:
return _detect_format_result(
True, is_array, has_records, has_releases, has_ocid, has_tag, is_compiled, metadata_count # noqa: FBT003
)
Expand Down

0 comments on commit 16f34b5

Please sign in to comment.