Skip to main content

Django mypy stubs

Project description

mypy logo

pep484 stubs for Django framework

Build Status Checked with mypy

This package contains type stubs and mypy plugin to provide more precise static types and type inference for Django framework. Django uses some Python "magic" that makes having precise types for some code patterns problematic. This is why we need to accompany the stubs with mypy plugins. The final goal is to be able to get precise types for most common patterns.

Installation

git clone https://github.com/mkurnikov/django-stubs.git
cd django-stubs
pip install -U .

To make mypy aware of the plugin, you need to add

[mypy]
plugins =
    mypy_django_plugin.main

in your mypy.ini file.

Also, it uses value of DJANGO_SETTINGS_MODULE from the environment, so set it before execution, otherwise some features will not work.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-stubs, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size django_stubs-0.2.0-py3-none-any.whl (262.0 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page