Closed ajvb closed 3 years ago
Not sure how hard it was to make all these changes, but since we're using tests as code maybe we should look into tools for editing the concrete syntax tree (e.g. something based on https://pypi.org/project/libcst/ or another library I couldn't dig up).
You lost me -- what's the maintenance issue you see (i.e. use case), and how would libcst solve that?
Not sure how hard it was to make all these changes, but since we're using tests as code maybe we should look into tools for editing the concrete syntax tree (e.g. something based on https://pypi.org/project/libcst/ or another library I couldn't dig up).
You lost me -- what's the maintenance issue you see (i.e. use case), and how would libcst solve that?
Safely editing a bunch of test and resource files e.g. converting all str.format
calls to f-strings https://libcst.readthedocs.io/en/latest/codemods_tutorial.html
You lost me -- what's the maintenance issue you see (i.e. use case), and how would libcst solve that?
Safely editing a bunch of test and resource files e.g. converting all
str.format
calls to f-strings https://libcst.readthedocs.io/en/latest/codemods_tutorial.html
Ah, there's a pre-commit
plugin for that (and more): pyupgrade. Besides fstrings, it also catches other python changes that the code can take advantages of. See the README
I'd be happy to see that plugin added to frost -- it'll help when we have to go to python 3.9 (yearly updates now). I think all of it's changes should be a separate PR for a "flag day", so we can all do our merges-for-active-branches prior, and have that change apply cleanly.
Fixes the
ids
argument in allparameterize
calls that make use ofzip()
so that the outputted id is actually generated.Fixes #412