Skip to content

Commit

Permalink
Don't complain on invalid case of alt/obsolete methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaszm committed Jan 11, 2024
1 parent b0e914d commit eeff2ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JsonGenerator/source/json_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,9 @@ def __init__(self, name, parent, schema, included=None, property=False):
if "alt" in schema:
self.alternative = schema.get("alt")

if not self.alternative.islower():
if not self.alternative.islower() and not (schema.get("altisdeprecated") or schema.get("altisobsolete")):
log.Warn("'%s' (alternative): mixedCase identifiers are supported, however all-lowercase names are recommended" % self.alternative)
elif "_" in self.alternative:
elif "_" in self.alternative and not (schema.get("altisdeprecated") or schema.get("altisobsolete")):
log.Warn("'%s' (alternative): snake_case identifiers are supported, however flatcase names are recommended" % self.alternative)
else:
self.alternative = None
Expand Down

0 comments on commit eeff2ce

Please sign in to comment.