Skip to content

Commit

Permalink
Flake8 fixes (#15)
Browse files Browse the repository at this point in the history
* add flake8 to makefile and dev reqs

* flake8 fixes

* more flake8 fixes

* add newline
  • Loading branch information
ejm714 authored and pjbull committed Aug 9, 2018
1 parent ec09684 commit f02feff
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -12,5 +12,8 @@ examples: reqs
docs:
echo "NYI"

test:
test: lint
py.test

lint:
flake8 .
1 change: 1 addition & 0 deletions dev-requirements.txt
Expand Up @@ -2,4 +2,5 @@

-e .

flake8==3.5.0
pytest==3.6.4
5 changes: 3 additions & 2 deletions ethics_checklist/ethics_checklist.py
Expand Up @@ -4,7 +4,7 @@

import xerox

from .parser import Checklist, Section
from .parser import Checklist
from .formats import FORMATS, EXTENSIONS

DEFAULT_CHECKLIST = Path(__file__).parent.parent / 'checklist.yml'
Expand All @@ -14,7 +14,8 @@

@click.command()
@click.option('--checklist', default=None, type=click.Path(exists=True), help='Override checklist file.')
@click.option('--format', default=None, type=str, help='Output format. Default is "markdown". File extesion used if --output is passed.')
@click.option('--format', default=None, type=str, help='Output format. Default is "markdown". \
File extesion used if --output is passed.')
@click.option('--output', default=None, type=click.Path(), help='Output file path.')
@click.option('--clipboard', is_flag=True, default=False, help='Whether or not to output to clipboard.')
@click.option('--overwrite', is_flag=True, default=False, help='Overwrite output file if it exists. Default is False.')
Expand Down
9 changes: 5 additions & 4 deletions setup.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python

import setuptools
from setuptools import setup

setup(
Expand All @@ -9,16 +10,16 @@
author="DrivenData",
author_email="info@drivendata.org",

description = 'Data Science Ethics Checklist',
description='Data Science Ethics Checklist',
long_description=open('README.md').read(),

license = 'MIT',
license='MIT',
packages=setuptools.find_packages(),

install_requires=[],

entry_points = {
'console_scripts':[
entry_points={
'console_scripts': [
'ethics-checklist=ethics_checklist.ethics_checklist:main',
]
},
Expand Down
4 changes: 2 additions & 2 deletions tests/test_formats.py
Expand Up @@ -71,8 +71,8 @@ def test_jupyter(checklist, tmpdir):
known_good = ({'cell_type': 'markdown',
'metadata': {},
'source': ['# My Checklist\n',
'\n',
'## Section 1\n',
'\n',
'## Section 1\n',
'------\n',
' - [ ] first\n',
' - [ ] second\n',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parser.py
@@ -1,4 +1,4 @@
from ethics_checklist.parser import Checklist, Section
from ethics_checklist.parser import Checklist


def test_checklist():
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 119

0 comments on commit f02feff

Please sign in to comment.