diff --git a/setup.cfg b/setup.cfg index 0e50a02..fe61812 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,3 +30,9 @@ default_section = THIRDPARTY forced_separate = test_octokit.py not_skip = __init__.py skip = migrations + +[yapf] +based_on_style = facebook +COLUMN_LIMIT = 120 +BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true +ALLOW_SPLIT_BEFORE_DICT_VALUE = false diff --git a/setup.py b/setup.py index 4fc35b2..1ba0245 100644 --- a/setup.py +++ b/setup.py @@ -16,10 +16,7 @@ from setuptools import setup def read(*names, **kwargs): - return io.open( - join(dirname(__file__), *names), - encoding=kwargs.get('encoding', 'utf8') - ).read() + return io.open(join(dirname(__file__), *names), encoding=kwargs.get('encoding', 'utf8')).read() setup( @@ -53,9 +50,7 @@ setup( 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Utilities', ], - keywords=[ - 'github', 'octokit', 'api' - ], + keywords=['github', 'octokit', 'api'], install_requires=[ # eg: 'aspectlib==1.1.1', 'six>=1.7', ], diff --git a/tests/test_methods.py b/tests/test_methods.py index 3e832da..fb19175 100644 --- a/tests/test_methods.py +++ b/tests/test_methods.py @@ -40,12 +40,7 @@ class TestClientMethods(object): def test_request_has_body_parameters(self, mocker): mocker.patch('requests.post') - data = { - 'scopes': [ - 'public_repo' - ], - 'note': 'admin script' - } + data = {'scopes': ['public_repo'], 'note': 'admin script'} Octokit().authorization.create(**data) requests.post.assert_called_once_with( 'https://api.github.com/authorizations', data=json.dumps(data), headers={} diff --git a/tox.ini b/tox.ini index 999120b..f033855 100644 --- a/tox.ini +++ b/tox.ini @@ -77,7 +77,7 @@ commands = check-manifest {toxinidir} flake8 src tests setup.py isort --verbose --check-only --diff --recursive src tests setup.py - yapf . --parallel --recursive -i -p --exclude='./dist/*' --exclude='./.tox/*' --exclude='./*.egg-info' --style='{based_on_style: facebook, COLUMN_LIMIT: 120, BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF: true, ALLOW_SPLIT_BEFORE_DICT_VALUE: false}' + yapf . --parallel --recursive --diff --exclude='./dist/*' --exclude='./.tox/*' --exclude='./*.egg-info' --exclude='./docs/*' --exclude='./ci/*' [testenv:report] deps = coverage