Open meshy opened 1 year ago
Python's ast
module has potential, if we can be sure it preserves formatting.
https://github.com/PyCQA/astroid is interesting.
There's an interesting proposal to the Twisted project currently about a tool called passmanager, which could be useful to us.
It drives the pydoctor tool. I've pointed this at a local Django clone, and it pulled out many things we would want:
I'm not suggesting we use pydoctor, but it shows it's pulling out similar things we want.
We currently use the
inspect
module to extract Django code and structure.This has several drawbacks:
We recently refactored the
populate_cbv
script to abstract the importer into a protocol that will (hopefully) make it easier for new importers to be written. LibCSV may be an appropriate alternative toinspect
.https://github.com/classy-python/ccbv/blob/a89118bc975bd91bb73135edb9f5d8b172f9c596/cbv/importer/importers.py#L29-L31