diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 43d9800f..9926c42b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - mongodb-version: [3.6, 4.0, 4.2] + mongodb-version: [3.6, 4.0, 4.2, 4.4] include: - name: "ubuntu-py36" python: "3.6" @@ -27,6 +27,9 @@ jobs: - name: "ubuntu-py38" python: "3.8" tox_env: "py38" + - name: "ubuntu-py39" + python: "3.9" + tox_env: "py39" - name: "ubuntu-pypy3" python: "pypy3" tox_env: "pypy3" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07dcbbf0..7d99af2b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,23 +1,19 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.4.0 + rev: v3.3.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - - repo: https://github.com/jumanjihouse/pre-commit-hooks - rev: 1.11.2 - hooks: - - id: markdownlint - repo: https://github.com/psf/black - rev: stable + rev: 20.8b1 hooks: - id: black language_version: python3.6 exclude: ^docs/ - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.9 + rev: 3.8.4 hooks: - id: flake8 exclude: ^docs/|^examples/ diff --git a/.travis.yml b/.travis.yml index df92d5f2..4b52b033 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,10 @@ jobs: python: 3.8 name: "Test on python 3.8" env: TOXENV=py38 + - language: python + python: 3.9 + name: "Test on python 3.9" + env: TOXENV=py39 - language: python python: pypy3 name: "Test on python pypy3" diff --git a/flask_mongoengine/operation_tracker.py b/flask_mongoengine/operation_tracker.py index 2c317a00..f2dbb854 100644 --- a/flask_mongoengine/operation_tracker.py +++ b/flask_mongoengine/operation_tracker.py @@ -250,8 +250,7 @@ def reset(): def _get_ordering(son): - """Helper function to extract formatted ordering from dict. - """ + """Helper function to extract formatted ordering from dict.""" def fmt(field, direction): return "{0}{1}".format({-1: "-", 1: "+"}[direction], field) diff --git a/setup.py b/setup.py index 097d8829..7fac47b9 100644 --- a/setup.py +++ b/setup.py @@ -66,6 +66,7 @@ def get_version(version_tuple): "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: PyPy" "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", diff --git a/tests/test_pagination.py b/tests/test_pagination.py index 605f53a7..496dcf87 100644 --- a/tests/test_pagination.py +++ b/tests/test_pagination.py @@ -35,7 +35,9 @@ def test_list_field_pagination(app, todo): comments = ["comment: %s" % i for i in range(42)] todo = Todo( - title="todo has comments", comments=comments, comment_count=len(comments), + title="todo has comments", + comments=comments, + comment_count=len(comments), ).save() # Check without providing a total diff --git a/tox.ini b/tox.ini index 764c28c0..7216f154 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py36,py37,py38,pypy3},lint +envlist = {py36,py37,py38,py39,pypy3},lint [testenv] commands =