@@ -791,8 +791,7 @@ def schema_paths(self) -> list[tuple[str, list[str]]]:
791791 fallback_path = f"#/{ fallback_key } "
792792
793793 # Strict mode: only use version-specific path
794- version_mode = getattr (self .config , "schema_version_mode" , None )
795- if version_mode == VersionMode .Strict :
794+ if self .config .schema_version_mode == VersionMode .Strict :
796795 return [(str (primary_path ), [str (primary_key )])]
797796
798797 # Lenient mode (default): check both paths, primary first
@@ -3681,8 +3680,7 @@ def _check_version_specific_features(
36813680 This method checks the raw schema data before Pydantic validation
36823681 to detect features that may not be valid for the declared version.
36833682 """
3684- version_mode = getattr (self .config , "schema_version_mode" , None )
3685- if version_mode != VersionMode .Strict :
3683+ if self .config .schema_version_mode != VersionMode .Strict :
36863684 return
36873685
36883686 # Check boolean schemas (Draft 6+)
@@ -3749,8 +3747,7 @@ def _check_array_version_features(
37493747 Warns when prefixItems is used in versions that don't support it,
37503748 or when items as array (tuple style) is used in Draft 2020-12+.
37513749 """
3752- version_mode = getattr (self .config , "schema_version_mode" , None )
3753- if version_mode != VersionMode .Strict :
3750+ if self .config .schema_version_mode != VersionMode .Strict :
37543751 return
37553752
37563753 # Check prefixItems usage (Draft 2020-12+ only)
0 commit comments