Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python3.6 unittest by using ubuntu 20.04 #272

Merged
merged 4 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ repos:
- id: black
args:
- --target-version=py36
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.2
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/Matterminers/dev-tools
Expand Down
4 changes: 2 additions & 2 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. Created by changelog.py at 2022-11-23, command
.. Created by changelog.py at 2022-12-07, command
'/Users/giffler/.cache/pre-commit/repor6pnmwlm/py_env-python3.10/bin/changelog docs/source/changes compile --output=docs/source/changelog.rst'
based on the format of 'https://keepachangelog.com/'

#########
CHANGELOG
#########

[Unreleased] - 2022-11-23
[Unreleased] - 2022-12-07
=========================

Added
Expand Down
4 changes: 2 additions & 2 deletions tardis/utilities/asyncbulkcall.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def __call__(self, __task: T) -> R:
async def _bulk_dispatch(self):
"""Collect tasks into bulks and dispatch them for command execution"""
while not self._queue.empty():
bulk = list(zip(*(await self._get_bulk())))
bulk = list(zip(*(await self._get_bulk()))) # noqa B905
if not bulk:
continue
tasks, futures = bulk
Expand Down Expand Up @@ -171,5 +171,5 @@ async def _bulk_execute(
for future in futures:
future.set_exception(task_exception)
else:
for future, result in zip(futures, results):
for future, result in zip(futures, results): # noqa B905
future.set_result(result)
4 changes: 3 additions & 1 deletion tests/plugins_t/test_prometheusmonitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def assert_gauges(self, values):
assert all(
[
gauge.get({}) == result
for (gauge, result) in zip(self.plugin._gauges.values(), values)
for (gauge, result) in zip( # noqa B905
self.plugin._gauges.values(), values
)
]
)

Expand Down
2 changes: 1 addition & 1 deletion tests/plugins_t/test_sqliteregistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def test_add_site(self):
# Database content has to be checked several times
# Define inline function to re-use code
def check_db_content():
for row, site_name in zip(
for row, site_name in zip( # noqa B905
self.execute_db_query("SELECT site_name FROM Sites"), test_site_names
):
self.assertEqual(row[0], site_name)
Expand Down