Skip to content

Commit e58c0b9

Browse files
committed
Delete unused test filesimprove pre-cimmit
1 parent 65e53e7 commit e58c0b9

27 files changed

+34
-964
lines changed

.github/workflows/black.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
- uses: psf/black@stable

.pre-commit-config.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 19.3b0
2+
- repo: https://github.com/ambv/black
3+
rev: stable
44
hooks:
5-
- id: black
5+
- id: black
6+
language_version: python3.6
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v1.2.3
9+
hooks:
10+
- id: flake8

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ build:
44
pip install -r requirements.txt \
55
python setup.py install
66

7+
lint:
8+
flake8 \
9+
10+
711
test:
812
pip install -r test-requirements.txt && \
913
python -m unittest discover test/

git_push.sh

Lines changed: 0 additions & 58 deletions
This file was deleted.

patch_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def __del__(self):
9797
@property
9898
def pool(self):
9999
"""Create thread pool on first request
100-
avoids instantiating unused threadpool for blocking clients.
100+
avoids instantiating unused threadpool for blocking clients.
101101
"""
102102
if self._pool is None:
103103
self._pool = ThreadPool(self.pool_threads)

patch_api/configuration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ def __init__(
6565
password=None,
6666
discard_unknown_keys=False,
6767
):
68-
"""Constructor
69-
"""
68+
"""Constructor"""
7069
self.host = host
7170
"""Default Base url
7271
"""

patch_api/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class OpenApiException(Exception):
2020

2121
class ApiTypeError(OpenApiException, TypeError):
2222
def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None):
23-
""" Raises an exception for TypeErrors
23+
"""Raises an exception for TypeErrors
2424
2525
Args:
2626
msg (str): the exception message

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ python_dateutil >= 2.5.3
44
setuptools >= 21.0.0
55
urllib3 >= 1.15.1
66
pre-commit >= 2.9.3
7+
autopep8 >= 1.5.4
8+
flake8 >= 3.8.4

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
# prerequisite: setuptools
2121
# http://pypi.python.org/pypi/setuptools
2222

23-
REQUIRES = ["urllib3 >= 1.25.3", "python-dateutil"]
23+
REQUIRES = [
24+
"urllib3 >= 1.25.3",
25+
"python-dateutil",
26+
]
2427

2528
setup(
2629
name=NAME,

test/test_allocation.py

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)