Skip to content

Commit

Permalink
Add support for python 3.9
Browse files Browse the repository at this point in the history
Drop support for python 3.6

Reformat code
  • Loading branch information
zeburek committed Jan 21, 2021
1 parent f56fe0c commit 8e418df
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]

[tool.black]
line-length = 79
target-version = ['py36']
target-version = ['py37']
include = '\.pyi?$'
exclude = '''
(
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/qaseio/client/services/plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion src/qaseio/client/services/shared_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 2 additions & 1 deletion src/qaseio/client/services/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 5 additions & 1 deletion tests/qaseio/services/test_defects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
),
],
Expand Down
6 changes: 5 additions & 1 deletion tests/qaseio/services/test_milestones.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
),
],
Expand Down
6 changes: 5 additions & 1 deletion tests/qaseio/services/test_shared_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
),
],
Expand Down
6 changes: 5 additions & 1 deletion tests/qaseio/services/test_suites.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
),
],
Expand Down
12 changes: 8 additions & 4 deletions tests/qaseio/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,29 +78,33 @@ 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):
TestRunCreate(*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):
Expand Down

0 comments on commit 8e418df

Please sign in to comment.