Dev notes: running mypy on edx-platform

One other thought:

I know Cale had tried getting mypy running at one point, but got stuck because of the way we hacked sys.path to allow importing directly from the djangoapps/ folders, which confused mypy (as well as import-linter, and probably a number of other static analysis tools). We’ve since fixed that.

There is still the strangeness that is the local projects in common/lib, which we install into edx-platform and then import from as if they are root packages (eg, from xmodule import ... instead of from common.lib.xmodule.xmodule import ...). I am curious whether these would be a stumbling block to getting mypy running. If they do end up being an issue, let me know, and I will add it to my list of justifications for spending the time to fix the common/lib nonsense :slight_smile:

1 Like