diff --git a/ocdskit/commands/schema_report.py b/ocdskit/commands/schema_report.py index ab3cf9c..12ccaba 100644 --- a/ocdskit/commands/schema_report.py +++ b/ocdskit/commands/schema_report.py @@ -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) diff --git a/ocdskit/util.py b/ocdskit/util.py index a30365e..097476c 100644 --- a/ocdskit/util.py +++ b/ocdskit/util.py @@ -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 )