Add pre-commit and fix isort
This commit is contained in:
parent
695a11a4cd
commit
d589c5ef8a
36
.pre-commit-config.yaml
Normal file
36
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,36 @@
|
|||
repos:
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v1.24.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 19.3b0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.7
|
||||
# override until resolved: https://github.com/psf/black/issues/402
|
||||
files: \.pyi?$
|
||||
types: []
|
||||
|
||||
- repo: https://gitlab.com/pycqa/flake8
|
||||
rev: 3.7.8
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: [flake8-2020]
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-isort
|
||||
rev: v4.3.21
|
||||
hooks:
|
||||
- id: isort
|
||||
language_version: python3.7
|
||||
|
||||
- repo: https://github.com/pre-commit/pygrep-hooks
|
||||
rev: v1.4.1
|
||||
hooks:
|
||||
- id: python-check-blanket-noqa
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: check-yaml
|
|
@ -18,7 +18,6 @@ matrix:
|
|||
env: TOXENV=lint
|
||||
- python: 3.7
|
||||
env: TOXENV=py37
|
||||
dist: xenial
|
||||
- python: 3.6
|
||||
env: TOXENV=py36
|
||||
- python: 3.5
|
||||
|
@ -27,7 +26,6 @@ matrix:
|
|||
env: TOXENV=pypy3
|
||||
- python: 3.8-dev
|
||||
env: TOXENV=py38dev
|
||||
dist: xenial
|
||||
allow_failures:
|
||||
- env: TOXENV=pypy3
|
||||
fast_finish: true
|
||||
|
|
|
@ -4,9 +4,8 @@ Integration (not unit) tests for pylast.py
|
|||
"""
|
||||
import unittest
|
||||
|
||||
from flaky import flaky
|
||||
|
||||
import pylast
|
||||
from flaky import flaky
|
||||
|
||||
from .test_pylast import PyLastTestCase, load_secrets
|
||||
|
||||
|
|
|
@ -7,12 +7,10 @@ import sys
|
|||
import time
|
||||
import unittest
|
||||
|
||||
import pylast
|
||||
import pytest
|
||||
from flaky import flaky
|
||||
|
||||
import pylast
|
||||
|
||||
|
||||
PY37 = sys.version_info[:2] == (3, 7)
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
import pylast
|
||||
import pytest
|
||||
|
||||
|
||||
def mock_network():
|
||||
|
|
Loading…
Reference in a new issue