forked from 00dani/lemoncurry
Add pytest and mypy steps to the pre-commit hooks to avoid committing clearly broken code
This commit is contained in:
parent
d91676289b
commit
f551a5214a
2 changed files with 20 additions and 3 deletions
|
@ -15,3 +15,17 @@ repos:
|
||||||
args:
|
args:
|
||||||
- --fix=lf
|
- --fix=lf
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: pytest
|
||||||
|
name: Check pytest unit tests pass
|
||||||
|
entry: pipenv run pytest
|
||||||
|
pass_filenames: false
|
||||||
|
language: system
|
||||||
|
types: [python]
|
||||||
|
- id: mypy
|
||||||
|
name: Check mypy static types match
|
||||||
|
entry: pipenv run mypy . --ignore-missing-imports
|
||||||
|
pass_filenames: false
|
||||||
|
language: system
|
||||||
|
types: [python]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Generated by Django 1.11.6 on 2017-10-29 05:05
|
# Generated by Django 1.11.6 on 2017-10-29 05:05
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
from typing import List, Tuple
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
@ -10,18 +11,20 @@ class Migration(migrations.Migration):
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
]
|
] # type: List[Tuple[str, str]]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='IndieAuthCode',
|
name='IndieAuthCode',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True,
|
||||||
|
primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('code', models.CharField(max_length=64, unique=True)),
|
('code', models.CharField(max_length=64, unique=True)),
|
||||||
('me', models.CharField(max_length=255)),
|
('me', models.CharField(max_length=255)),
|
||||||
('client_id', models.CharField(max_length=255)),
|
('client_id', models.CharField(max_length=255)),
|
||||||
('redirect_uri', models.CharField(max_length=255)),
|
('redirect_uri', models.CharField(max_length=255)),
|
||||||
('response_type', models.CharField(choices=[('id', 'id'), ('code', 'code')], default='id', max_length=4)),
|
('response_type', models.CharField(choices=[
|
||||||
|
('id', 'id'), ('code', 'code')], default='id', max_length=4)),
|
||||||
('scope', models.CharField(blank=True, max_length=200)),
|
('scope', models.CharField(blank=True, max_length=200)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue