lexcql-parser 1.3.1__tar.gz → 1.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/PKG-INFO +1 -1
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/pyproject.toml +1 -1
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/validation.py +6 -2
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/README.md +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexLexer.g4 +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexLexer.interp +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexLexer.py +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexLexer.tokens +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexParser.g4 +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexParser.interp +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexParser.py +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexParser.tokens +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexParserListener.py +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/LexParserVisitor.py +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/__init__.py +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/parser.py +0 -0
- {lexcql_parser-1.3.1 → lexcql_parser-1.3.2}/src/lexcql/py.typed +0 -0
|
@@ -97,7 +97,7 @@ class Validator(QueryVisitorAdapter[_R], metaclass=ABCMeta):
|
|
|
97
97
|
|
|
98
98
|
Returns:
|
|
99
99
|
bool: ``True`` if query in valid, ``False`` if any error was recorded
|
|
100
|
-
in the ``.errors`` attribute
|
|
100
|
+
in the ``.errors`` attribute (or in ``.warnings`` if ``.warnings_as_errors``)
|
|
101
101
|
"""
|
|
102
102
|
# allows to override the query string here
|
|
103
103
|
if query is not None:
|
|
@@ -109,7 +109,11 @@ class Validator(QueryVisitorAdapter[_R], metaclass=ABCMeta):
|
|
|
109
109
|
|
|
110
110
|
self.visit(node)
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
num_issues = len(self.errors)
|
|
113
|
+
if self.warnings_as_errors:
|
|
114
|
+
num_issues += len(self.warnings)
|
|
115
|
+
|
|
116
|
+
return num_issues == 0
|
|
113
117
|
|
|
114
118
|
def is_valid(self, node: QueryNode, *, query: Optional[str] = None) -> bool:
|
|
115
119
|
"""Convenience method that simply calls ``.validate()`` and returns
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|