diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 65950e72..5a06a31d 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -28,10 +28,10 @@ jobs: if: startsWith(github.event.ref, 'refs/tags') steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.9 - name: Build a binary wheel and a source tarball run: | pip install wheel diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f3b4db5..11e3dc30 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: rev: stable hooks: - id: black - language_version: python3.6 + language_version: python3.7 - repo: git://github.com/pre-commit/pre-commit-hooks rev: v2.2.3 hooks: diff --git a/pyproject.toml b/pyproject.toml index e12ececb..493d87cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"] [tool.black] line-length = 79 -target-version = ['py36'] +target-version = ['py37'] include = '\.pyi?$' exclude = ''' ( diff --git a/setup.cfg b/setup.cfg index c9701fa8..3af83a66 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,7 +13,7 @@ long-description-content-type = text/markdown; charset=UTF-8; variant=GFM url = https://github.com/qase-tms/qase-python platforms = any classifiers = - Development Status :: 4 - Beta + Development Status :: 5 - Production/Stable Programming Language :: Python [options] @@ -27,10 +27,10 @@ package_dir = setup_requires = pyscaffold>=3.2a0,<3.3a0 # Add here dependencies of your project (semicolon/line-separated), e.g. install_requires = - python-apitist>=0.5.1 + apitist>=3.0.0 attrs>=19.3.0 cattrs>=1.0.0 -python_requires = >=3.6 +python_requires = >=3.7 [options.packages.find] where = src diff --git a/src/qaseio/client/services/plans.py b/src/qaseio/client/services/plans.py index bbf6ddbd..7f0a8b29 100644 --- a/src/qaseio/client/services/plans.py +++ b/src/qaseio/client/services/plans.py @@ -12,7 +12,10 @@ class Plans(BaseService): def get_all( - self, code: str, limit=None, offset=None, + self, + code: str, + limit=None, + offset=None, ): query = {"limit": limit, "offset": offset} return self.vr( diff --git a/src/qaseio/client/services/shared_steps.py b/src/qaseio/client/services/shared_steps.py index a0b848e8..b067b6bb 100644 --- a/src/qaseio/client/services/shared_steps.py +++ b/src/qaseio/client/services/shared_steps.py @@ -40,7 +40,10 @@ def create(self, code: str, data: SharedStepCreate): ) def update( - self, code: str, shared_step_hash: str, data: SharedStepUpdate, + self, + code: str, + shared_step_hash: str, + data: SharedStepUpdate, ): return self.vr( self.s.patch( diff --git a/src/qaseio/client/services/users.py b/src/qaseio/client/services/users.py index e88bb2fe..d435f99f 100644 --- a/src/qaseio/client/services/users.py +++ b/src/qaseio/client/services/users.py @@ -15,7 +15,8 @@ def get_all(self, limit=None, offset=None): def get(self, user_id: Union[str, int]): return self.vr( - self.s.get(self.path("user/{}".format(user_id))), to_type=UserInfo, + self.s.get(self.path("user/{}".format(user_id))), + to_type=UserInfo, ) def exists(self, code: str): diff --git a/tests/qaseio/services/test_defects.py b/tests/qaseio/services/test_defects.py index 089cbdf7..d16d3c52 100644 --- a/tests/qaseio/services/test_defects.py +++ b/tests/qaseio/services/test_defects.py @@ -20,7 +20,11 @@ ((None, 30), "?offset=30"), ((10, None), "?limit=10"), ( - (10, None, DefectFilters(status=DefectStatus.OPEN),), + ( + 10, + None, + DefectFilters(status=DefectStatus.OPEN), + ), "?limit=10&filters%5Bstatus%5D=open", ), ], diff --git a/tests/qaseio/services/test_milestones.py b/tests/qaseio/services/test_milestones.py index 8ba56bfe..df74b148 100644 --- a/tests/qaseio/services/test_milestones.py +++ b/tests/qaseio/services/test_milestones.py @@ -23,7 +23,11 @@ ((None, 30), "?offset=30"), ((10, None), "?limit=10"), ( - (10, None, MilestoneFilters(search="123"),), + ( + 10, + None, + MilestoneFilters(search="123"), + ), "?limit=10&filters%5Bsearch%5D=123", ), ], diff --git a/tests/qaseio/services/test_shared_steps.py b/tests/qaseio/services/test_shared_steps.py index 04c564fe..646915c8 100644 --- a/tests/qaseio/services/test_shared_steps.py +++ b/tests/qaseio/services/test_shared_steps.py @@ -23,7 +23,11 @@ ((None, 30), "?offset=30"), ((10, None), "?limit=10"), ( - (10, None, SharedStepFilters(search="123"),), + ( + 10, + None, + SharedStepFilters(search="123"), + ), "?limit=10&filters%5Bsearch%5D=123", ), ], diff --git a/tests/qaseio/services/test_suites.py b/tests/qaseio/services/test_suites.py index 81111f28..61294374 100644 --- a/tests/qaseio/services/test_suites.py +++ b/tests/qaseio/services/test_suites.py @@ -23,7 +23,11 @@ ((None, 30), "?offset=30"), ((10, None), "?limit=10"), ( - (10, None, TestSuiteFilters(search="123"),), + ( + 10, + None, + TestSuiteFilters(search="123"), + ), "?limit=10&filters%5Bsearch%5D=123", ), ], diff --git a/tests/qaseio/test_models.py b/tests/qaseio/test_models.py index a681fab6..1d055727 100644 --- a/tests/qaseio/test_models.py +++ b/tests/qaseio/test_models.py @@ -78,14 +78,16 @@ def test_invalid_project_creation(data): @pytest.mark.parametrize( - "data", [("", [1]), ("a" * 65, [13, 14, 15], "a" * 65, 123)], + "data", + [("", [1]), ("a" * 65, [13, 14, 15], "a" * 65, 123)], ) def test_valid_test_run_creation(data): TestRunCreate(*data) @pytest.mark.parametrize( - "data", [("a", []), ("a", 123)], + "data", + [("a", []), ("a", 123)], ) def test_invalid_test_run_creation(data): with pytest.raises(ValueError): @@ -93,14 +95,16 @@ def test_invalid_test_run_creation(data): @pytest.mark.parametrize( - "data", [("", [1]), ("a" * 65, [13, 14, 15], "a" * 65)], + "data", + [("", [1]), ("a" * 65, [13, 14, 15], "a" * 65)], ) def test_valid_test_plan_creation(data): TestPlanCreate(*data) @pytest.mark.parametrize( - "data", [("a", []), ("a", 123)], + "data", + [("a", []), ("a", 123)], ) def test_invalid_test_plan_creation(data): with pytest.raises(ValueError):