Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 Remove warnings during tests #6122

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def error_location(self):
return [self.arguments['line_number']]
return None

def __str__(self):
return f'{self.error_code} {repr(self.arguments)}'


class WarningException(HedyException):
"""Fixed That For You warning/exception.
Expand Down
2 changes: 2 additions & 0 deletions hedy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3612,6 +3612,8 @@ def get_parser(level, lang="en", keep_all_tokens=False, skip_faulty=False):
grammar,
str(sys.version_info[:2]),
str(parser_opts),
# When we upgrade Lark, make sure to not load cached parsers from old versions
str(lark.__version__),
)).encode()).hexdigest()

cached_parser_file = f"cached-parser-{level}-{lang}-{unique_parser_hash}.pkl"
Expand Down
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Flask==3.0.2
Werkzeug==3.0.6
lark==1.1.1
# We cannot go higher than this, because starting 1.2.1+
# we parse "100" as text instead of a number.
lark==1.1.9
gunicorn==22.0.0
flask-compress==1.4.0
requests==2.32.0
Expand All @@ -10,7 +12,7 @@ boto3>=1.16.50
MarkupSafe==2.1.2
ruamel.yaml==0.18.6
docopt==0.6.2
pydantic==1.10.13
pydantic==1.10.21
lazy==1.4
PySumTypes==0.0.1
beautifulsoup4==4.9.3
Expand Down
Loading