Skip to content

Commit 0806f84

Browse files
authored
Fix false positive E3062 when EngineVersion is unquoted float (#4454)
When YAML parses an unquoted EngineVersion like 17.6, it becomes a float instead of a string. The pattern keyword passed the raw float to re.search(), which raises a TypeError on non-string input. Fix the pattern keyword to accept int, float, and bool types and convert to str before matching — consistent with how const and enum already handle type coercion via the equal() function. Fixes #4445
1 parent d5f0aed commit 0806f84

5 files changed

Lines changed: 4056 additions & 2518 deletions

File tree

scripts/update_schemas_from_aws_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def _create_schema(engine, engine_version, db_instance_classes):
301301
"const": engine,
302302
},
303303
"EngineVersion": {
304-
"type": "string",
304+
"type": ["string", "number"],
305305
"pattern": engine_pattern,
306306
},
307307
"DBInstanceClass": {

0 commit comments

Comments
 (0)