Skip to content

Replace deprecated ast.Num and ast.Str with ast.Constant in tool validation #1594

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

Merged
merged 2 commits into from
Jul 21, 2025

Conversation

WilliamRabuel
Copy link
Contributor

I had the following warning :

DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead

ast.Str and ast.Num have been deprecated since Python 3.8 and will be removed in Python 3.14. Starting with Python 3.8, all literals (str, int, float, etc.) are represented by ast.Constant.

I had the following warning :

DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead

ast.Str and ast.Num have been deprecated since Python 3.8 and will be removed in Python 3.14.
Starting with Python 3.8, all literals (str, int, float, etc.) are represented by ast.Constant.
@albertvillanova albertvillanova changed the title Update tool_validation.py Replace deprecated ast.Num and ast.Str with ast.Constant in tool validation Jul 21, 2025
Copy link
Member

@albertvillanova albertvillanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Just fixed the CI quality code issue.

@albertvillanova albertvillanova merged commit c73d4c4 into huggingface:main Jul 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants