I am looking for a gratis command line tool which is written in Python (or shell script) and searches for uses of
glob that can be replaced by
One of many examples is:
# Old style import os os.path.dirname(__file__) + "/foo.txt" # New style from pathlib import Path Path(__file__).parent / Path("foo.txt")
Is there a package which can do those types of replacements automatically or at least detect them?