Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer using `visit_Constant` instead of `visit_Num` and `visit_Str`: both were deprecated since Python 3.8. Fixes: ``` tract_querier/tests/test_query_eval.py: 40 warnings tract_querier/tests/test_query_files.py: 6527 warnings /opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/ast.py:407: DeprecationWarning: visit_Num is deprecated; add visit_Constant return visitor(node) ``` and ``` tract_querier/tests/test_query_eval.py: 1 warning tract_querier/tests/test_query_files.py: 24 warnings /opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/ast.py:407: DeprecationWarning: visit_Str is deprecated; add visit_Constant return visitor(node) ``` raised for example in: https://github.com/demianw/tract_querier/actions/runs/12187495803/job/33998410948?pr=61#step:6:75 and https://github.com/demianw/tract_querier/actions/runs/12187495803/job/33998410948?pr=61#step:6:80 Documentation: https://docs.python.org/3/library/ast.html#ast.NodeVisitor.visit_Constant
- Loading branch information