• Stars
    star
    247
  • Rank 164,117 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mypy static type checker plugin for Pytest

pytest-mypy

Mypy static type checker plugin for pytest

See Latest Release on PyPI

Features

  • Runs the mypy static type checker on your source files as part of your pytest test runs.
  • Does for mypy what the pytest-flake8 plugin does for flake8.
  • This is a work in progress – pull requests appreciated.

Installation

You can install "pytest-mypy" via pip from PyPI:

$ pip install pytest-mypy

Usage

You can enable pytest-mypy with the --mypy flag:

$ py.test --mypy test_*.py

Mypy supports reading configuration settings from a mypy.ini file. Alternatively, the plugin can be configured in a conftest.py to invoke mypy with extra options:

def pytest_configure(config):
    plugin = config.pluginmanager.getplugin('mypy')
    plugin.mypy_argv.append('--check-untyped-defs')

You can restrict your test run to only perform mypy checks and not any other tests by using the -m option:

py.test --mypy -m mypy test_*.py

License

Distributed under the terms of the MIT license, "pytest-mypy" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Meta

Daniel Bader – @dbader_org – https://dbader.org – [email protected]

https://github.com/realpython/pytest-mypy

More Repositories

1

python-guide

Python best practices guidebook, written for humans.
Batchfile
28,040
star
2

discover-flask

Full Stack Web Development with Flask.
Python
4,513
star
3

materials

Bonus materials, exercises, and example projects for our Python tutorials
HTML
4,357
star
4

python-scripts

because i'm tired of gists
Python
2,050
star
5

list-of-python-api-wrappers

List of Python API Wrappers and Libraries
2,003
star
6

flask-boilerplate

Boilerplate template for a Python Flask application with Flask-SQLAlchemy, Flask-WTF, Fabric, Coverage, and Bootstrap
Python
1,425
star
7

dockerizing-django

Python
1,324
star
8

python-basics-exercises

Python Basics: A Practical Introduction to Python 3
Python
953
star
9

flask-by-example

flask, heroku, environment variables, sqlalchemy, flask-migrate, redis
Python
678
star
10

orchestrating-docker

Python
464
star
11

cookiecutter-flask-skeleton

Real Python Flask Starter Project
Python
431
star
12

flask-jwt-auth

just testing some jwts
Python
276
star
13

codetiming

A flexible, customizable timer for your Python code
Python
273
star
14

ultimate-flask-front-end

blog post
JavaScript
253
star
15

python-speech-recognition

Speech Recognition with Python examples
Python
224
star
16

realpython-blog

real python blog posts
Python
198
star
17

django-slow-tests

Locate your slowest tests.
Python
178
star
18

book2-exercises

Book 2 -- Exercises for the book
Python
165
star
19

stack-spider

Python
164
star
20

book1-exercises

Book 1 -- Exercises for the book
Python
161
star
21

flask-single-page-app

HTML
158
star
22

Picha

Simple Django App That Gets Photos from Flickr Public Feeds
Python
152
star
23

twitter-sentiment-elasticsearch

Let's perform Twitter sentiment analysis using Python, Docker, Elasticsearch, and Kibana!
Python
133
star
24

flask-deploy

Check out the blog post:
Python
132
star
25

image-fingerprinting

Python
127
star
26

django-form-fun

model forms, ajax
Python
127
star
27

reader

Read the latest Real Python tutorials (PyPI Demo Package)
Python
122
star
28

flask-registration

Python
101
star
29

django-example-channels

Python
98
star
30

book3-exercises

Book 3 Advanced Web Dev with Django 1.7 -- Exercises for the book
Python
89
star
31

flask-scaffold

Python
67
star
32

flask-bokeh-example

Python
65
star
33

flask-angular-auth

Handling User Authentication With Angular and Flask
JavaScript
65
star
34

about

testimonials, table of contents, changelog, etc.
Python
62
star
35

pygame-primer

Python
56
star
36

web-dev-for-data-scientists

Python
52
star
37

django-puppy-store

Python
49
star
38

flask-stock-visualizer

JavaScript
48
star
39

python-web-scraping-examples

Python
42
star
40

rptree

Directory Tree Generator
Python
42
star
41

learning

40
star
42

flask-paywall

Setup a paywall with Flask and Stripe to offer paid access to your premium content.
Python
39
star
43

flask-image-search

Python
37
star
44

image-of-the-day

Example application for beanstalk deployment blog
Python
36
star
45

fitter-happier-docker

Python
33
star
46

automated-deployments

Python
33
star
47

interview-questions

Python
31
star
48

django-redis-cache

Python
29
star
49

angular4-auth

jwt auth with angular 4
TypeScript
29
star
50

data-version-control

Python
26
star
51

python-mocks

Python
21
star
52

django_cookiecutter_docker

blog post
Python
20
star
53

support

Please contact us at →
19
star
54

django-social-auth-example

Adding Social Authentication to Django
Python
18
star
55

flask-docker-workflow

Python
18
star
56

flask-bitcoin-example

Python
15
star
57

django-receipts

Python
12
star
58

flask-docker

Python
11
star
59

python-social-auth

Python
11
star
60

python-ruby-golang

comparing python, ruby, and golang
Go
10
star
61

robocrop

Your friendly neighbourhood image resizing API
Python
10
star
62

flask-matplotlib

render matplotlib images in flask (sample)
Python
10
star
63

flasktaskr_project

Python
10
star
64

aws-lambda-code-execute

HTML
9
star
65

python-mock-server

Python
9
star
66

instagram-analyzer

Python
7
star
67

django_cookiecutter_fedora

blog post
Python
7
star
68

flask-download

wip
Python
6
star
69

django-bootstrap

Python
6
star
70

mount-olympus

Mount Olympus web scraping example app
HTML
6
star
71

flask-sinatra-martini

https://realpython.com/blog/python/python-ruby-and-golang-a-web-Service-application-comparison/
Shell
5
star
72

lms

Python
5
star
73

flask-messaging

Python
5
star
74

members-map

Real Python Community Members Map
Python
5
star
75

python-mock-example

Python
5
star
76

members

learning management system for real python
JavaScript
5
star
77

pygments-redis

Pygments highlighter for Redis CLI
Python
5
star
78

django-docker-tests

Python
4
star
79

sales-metrics

Python
4
star
80

vscode-theme

Real Python Visual Studio Code Theme
4
star
81

django-docker-workflow

Python
4
star
82

data-repos

Python
4
star
83

author-tools

VS Code extension with a set of tools to help Real Python authors
TypeScript
4
star
84

pygments-httpie

A Pygments lexer for the the output of httpie
Python
3
star
85

flask-ansible

Python
3
star
86

pizzaup

JavaScript
3
star
87

realpython-intro

3
star
88

fullscalepython-app

Python
3
star
89

python-slack-api

Python
3
star
90

docker-hook-listener

Python
3
star
91

python-and-mongo

Python
2
star
92

docker_polls_project

Python
2
star
93

task-exceptions

Python
2
star
94

react-intro

JavaScript
2
star
95

gh-download

Download source code for specific Real Python tutorials
JavaScript
2
star
96

daily-commit

wip
Python
2
star
97

ecological-footprint

A web map that displays ecological footprint per capita, created with Python's folium library
HTML
2
star
98

python-driven-web-applications

1
star
99

fake-jobs

A Fake Python job board for your Real Python web scraping training
HTML
1
star
100

serializer

1
star