diff options
| -rw-r--r-- | .commitlintrc.json | 5 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 2 | ||||
| -rw-r--r-- | .pre-commit-config.yaml | 2 | ||||
| -rw-r--r-- | .renovaterc.json | 8 | ||||
| -rw-r--r-- | docs/install.rst | 2 | ||||
| -rw-r--r-- | pyproject.toml | 1 | ||||
| -rw-r--r-- | requirements-lint.txt | 6 | ||||
| -rw-r--r-- | setup.py | 3 | ||||
| -rw-r--r-- | tests/functional/api/test_groups.py | 4 | ||||
| -rw-r--r-- | tests/meta/test_ensure_type_hints.py | 5 | ||||
| -rw-r--r-- | tests/meta/test_mro.py | 6 | ||||
| -rw-r--r-- | tox.ini | 2 |
12 files changed, 29 insertions, 17 deletions
diff --git a/.commitlintrc.json b/.commitlintrc.json index c30e5a9..0073e93 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -1,3 +1,6 @@ { - "extends": ["@commitlint/config-conventional"] + "extends": ["@commitlint/config-conventional"], + "rules": { + "footer-max-line-length": [2, "always", 200] + } } diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8cd39e..30a9855 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,8 +18,6 @@ jobs: strategy: matrix: include: - - python-version: 3.6 - toxenv: py36 - python-version: 3.7 toxenv: py37 - python-version: 3.8 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3ec8d2e..c0c4074 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,4 +27,4 @@ repos: additional_dependencies: - types-PyYAML==6.0.1 - types-requests==2.26.0 - - types-setuptools==57.4.2 + - types-setuptools==57.4.3 diff --git a/.renovaterc.json b/.renovaterc.json index df0650f..b4b0626 100644 --- a/.renovaterc.json +++ b/.renovaterc.json @@ -28,6 +28,12 @@ { "matchPackagePrefixes": ["types-"], "groupName": "typing dependencies" - } + }, + { + "matchPackagePatterns": ["(^|/)black$"], + "versioning": "pep440", + "ignoreUnstable": false, + "groupName": "black" + } ] } diff --git a/docs/install.rst b/docs/install.rst index acd2528..b8672bb 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -2,7 +2,7 @@ Installation ############ -``python-gitlab`` is compatible with Python 3.6+. +``python-gitlab`` is compatible with Python 3.7+. Use :command:`pip` to install the latest stable version of ``python-gitlab``: diff --git a/pyproject.toml b/pyproject.toml index 8e0c4b4..a19b28e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ module = [ "docs.ext.*", "tests.functional.*", "tests.functional.api.*", - "tests.meta.*", "tests.unit.*", "tests.smoke.*" ] diff --git a/requirements-lint.txt b/requirements-lint.txt index 08ba6dc..b357114 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,7 +1,9 @@ -black==20.8b1 +black==21.11b1 flake8==4.0.1 isort==5.10.1 mypy==0.910 +pytest types-PyYAML==6.0.1 types-requests==2.26.0 -types-setuptools==57.4.2 +types-setuptools==57.4.3 +types-toml==0.10.1 @@ -32,7 +32,7 @@ setup( package_data={ "gitlab": ["py.typed"], }, - python_requires=">=3.6.0", + python_requires=">=3.7.0", entry_points={"console_scripts": ["gitlab = gitlab.cli:main"]}, classifiers=[ "Development Status :: 5 - Production/Stable", @@ -44,7 +44,6 @@ setup( "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/tests/functional/api/test_groups.py b/tests/functional/api/test_groups.py index 665c933..77562c1 100644 --- a/tests/functional/api/test_groups.py +++ b/tests/functional/api/test_groups.py @@ -36,7 +36,11 @@ def test_groups(gl): filtered_groups = gl.groups.list(skip_groups=[group3.id, group4.id]) assert group3 not in filtered_groups + assert group4 not in filtered_groups + + filtered_groups = gl.groups.list(skip_groups=[group3.id]) assert group3 not in filtered_groups + assert group4 in filtered_groups group1.members.create( {"access_level": gitlab.const.OWNER_ACCESS, "user_id": user.id} diff --git a/tests/meta/test_ensure_type_hints.py b/tests/meta/test_ensure_type_hints.py index f647b45..7a351ec 100644 --- a/tests/meta/test_ensure_type_hints.py +++ b/tests/meta/test_ensure_type_hints.py @@ -7,13 +7,14 @@ Original notes by John L. Villalovos import inspect from typing import Tuple, Type +import _pytest import toml import gitlab.mixins import gitlab.v4.objects -def pytest_generate_tests(metafunc): +def pytest_generate_tests(metafunc: _pytest.python.Metafunc) -> None: """Find all of the classes in gitlab.v4.objects and pass them to our test function""" @@ -54,7 +55,7 @@ def pytest_generate_tests(metafunc): class TestTypeHints: - def test_check_get_function_type_hints(self, class_info: Tuple[str, Type]): + def test_check_get_function_type_hints(self, class_info: Tuple[str, Type]) -> None: """Ensure classes derived from GetMixin have defined a 'get()' method with correct type-hints. """ diff --git a/tests/meta/test_mro.py b/tests/meta/test_mro.py index 8f67b77..8558a8b 100644 --- a/tests/meta/test_mro.py +++ b/tests/meta/test_mro.py @@ -49,7 +49,7 @@ import pytest import gitlab.v4.objects -def test_show_issue(): +def test_show_issue() -> None: """Test case to demonstrate the TypeError that occurs""" class RESTObject(object): @@ -61,7 +61,7 @@ def test_show_issue(): with pytest.raises(TypeError) as exc_info: # Wrong ordering here - class Wrongv4Object(RESTObject, Mixin): + class Wrongv4Object(RESTObject, Mixin): # type: ignore ... # The error message in the exception should be: @@ -76,7 +76,7 @@ def test_show_issue(): ... -def test_mros(): +def test_mros() -> None: """Ensure objects defined in gitlab.v4.objects have REST* as last item in class definition. @@ -1,7 +1,7 @@ [tox] minversion = 1.6 skipsdist = True -envlist = py310,py39,py38,py37,py36,pep8,black,twine-check,mypy,isort +envlist = py310,py39,py38,py37,pep8,black,twine-check,mypy,isort [testenv] passenv = GITLAB_IMAGE GITLAB_TAG |
