Skip to content

Commit 00d41f7

Browse files
author
legolas.zhan
committed
fixed flake8 & rm test for py36
1 parent d7ceedf commit 00d41f7

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

.circleci/config.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
tox -- --cov-report=xml
3232
codecov
3333
34-
test-py36:
34+
test-py310:
3535
docker:
36-
- image: circleci/python:3.6.13
36+
- image: circleci/python:3.10.0
3737
user: root
3838
working_directory: ~/repo
3939
steps:
@@ -44,7 +44,6 @@ jobs:
4444
pip install flake8 pytest pytest-cov pytest-env
4545
pip install --editable ".[hobbit,hobbit_core]"
4646
pip install celery
47-
pip install "MarkupSafe==2.0.1" blinker[flask]
4847
- run:
4948
name: use flake8 check self
5049
command: flake8 .
@@ -77,7 +76,6 @@ jobs:
7776
pip install flake8 pytest pytest-cov pytest-env
7877
pip install --editable ".[hobbit,hobbit_core]"
7978
pip install celery
80-
pip install "MarkupSafe==2.0.1" blinker[flask]
8179
- run:
8280
name: use flake8 check self
8381
command: flake8 .
@@ -113,7 +111,7 @@ workflows:
113111
test:
114112
jobs:
115113
- tox
116-
- test-py36:
114+
- test-py310:
117115
requires:
118116
- tox
119117
- test-py37:

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ def gen_data(data_root='static'):
2626
import pypandoc
2727
long_description = pypandoc.convert_file('README.md', 'rst')
2828
long_description_content_type = 'text/x-rst'
29-
except(OSError, ImportError):
29+
except (OSError, ImportError):
3030
long_description = open('README.md').read()
3131

3232

3333
setup(
3434
name='hobbit-core',
35-
version='2.2.3',
36-
python_requires='>=3.6, <4',
35+
version='3.0.0.rc1',
36+
python_requires='>=3.7, <4',
3737
description='Hobbit - A flask project generator.',
3838
long_description=long_description,
3939
long_description_content_type=long_description_content_type,
@@ -42,7 +42,6 @@ def gen_data(data_root='static'):
4242
url='https://github.com/TTWShell/hobbit-core',
4343
classifiers=[
4444
'Topic :: Utilities',
45-
'Programming Language :: Python :: 3.6',
4645
'Programming Language :: Python :: 3.7',
4746
'Programming Language :: Python :: 3.8',
4847
'Programming Language :: Python :: 3.9',

tests/test_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pytest
33
import random
44

5-
from sqlalchemy.exc import ResourceClosedError, InvalidRequestError
5+
from sqlalchemy.exc import InvalidRequestError
66

77
from hobbit_core.db import EnumExt, transaction
88
from hobbit_core.db import BaseModel, Column

tests/test_pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_pagination(self, client):
5858

5959
# test order_by: str
6060
resp = pagination(User, 1, 10, order_by='role')
61-
assert [i.id for i in resp['items']] ==[user1.id, user2.id]
61+
assert [i.id for i in resp['items']] == [user1.id, user2.id]
6262

6363
resp = pagination(User, 1, 10, order_by=['role', '-id'])
6464
assert [i.id for i in resp['items']] == [user2.id, user1.id]

0 commit comments

Comments
 (0)