On 2018-10-21 10:44, David Mertz wrote:
On Fri, Oct 19, 2018 at 3:18 AM Thomas Güttler <guettliml@thomas-guettler.de> wrote:
Now my idea: Per module and/or per file type hinting from variable name.
Maybe a magic docstring in the __init__.py file:
variable-name-mapping:
  {
    request: django.http.HttpRequest,
}

In general, I like this idea; but really only on a per-file basis.  A short header at the top would be easy enough for an IDE or linter to scan.  But imposing the conventions project-wide feels too broad.


Maybe in a .editorconfig file?  This would allow type hinting at a number of directory levels.