Integrate the Black code formatting tool

This commit is contained in:
Correl Roush 2018-12-12 01:35:54 -05:00
parent 7608fa40fe
commit 56c2eb2db5
5 changed files with 24 additions and 2 deletions

View file

@ -4,6 +4,7 @@ dist: xenial
sudo: true
before_install:
- pip install codecov
- pip install black
install:
- pip install -e .
script:

View file

@ -2,6 +2,7 @@
[![Build Status](https://travis-ci.com/correl/typesafe-monads.svg?branch=master)](https://travis-ci.com/correl/typesafe-monads)
[![codecov](https://codecov.io/gh/correl/typesafe-monads/branch/master/graph/badge.svg)](https://codecov.io/gh/correl/typesafe-monads)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
This is an experiment in building monads in Python supported by strict
type annotations. The goal is to be able to compose monads with the

13
pyproject.toml Normal file
View file

@ -0,0 +1,13 @@
[tool.black]
line-length = 88
py36 = true
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.mypy_cache
| build
| dist
)/
'''

View file

@ -2,4 +2,4 @@
test=pytest
[tool:pytest]
addopts = --mypy --cov monads --cov-report xml:reports/coverage.xml
addopts = --black --mypy --cov monads --cov-report xml:reports/coverage.xml

View file

@ -17,7 +17,14 @@ setup(
package_data={"monads": ["py.typed"]},
include_package_data=True,
setup_requires=["pytest-runner"],
tests_require=["pytest", "mypy", "pytest-cov", "pytest-mypy"],
tests_require=[
"pytest",
"black",
"mypy",
"pytest-cov",
"pytest-black",
"pytest-mypy",
],
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",