From 6b7bbfd46f1d28e1fc609aee66609525922fa0e3 Mon Sep 17 00:00:00 2001 From: Adam Collard Date: Mon, 13 Feb 2023 18:01:32 +0000 Subject: [PATCH 1/3] Bump black to 23.1.0 Signed-off-by: Adam Collard --- setup.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 90ee35fe..3ce1ef7f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,10 +34,9 @@ testing = # of requests-mock. Thus, we have to pin it down. requests-mock < 1.2 format = - black == 20.8b1 + black == 23.1.0 flake8 >= 2.5.0 isort == 5.6.4 - click < 8.1.0 check = mypy doc = From 8f470f8f60b5264491cf7beb605b48886f8196cc Mon Sep 17 00:00:00 2001 From: Adam Collard Date: Mon, 13 Feb 2023 18:01:41 +0000 Subject: [PATCH 2/3] [black] re-run black with 23.1.0 Signed-off-by: Adam Collard --- pylxd/deprecated/connection.py | 1 - pylxd/deprecated/image.py | 2 +- pylxd/deprecated/tests/test_image.py | 1 - pylxd/managers.py | 1 - pylxd/models/instance.py | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pylxd/deprecated/connection.py b/pylxd/deprecated/connection.py index 0b1e4213..28f6dc36 100644 --- a/pylxd/deprecated/connection.py +++ b/pylxd/deprecated/connection.py @@ -70,7 +70,6 @@ def _get_ssl_certs(): class _LXDResponse(NamedTuple): - status: int body: bytes json: Any diff --git a/pylxd/deprecated/image.py b/pylxd/deprecated/image.py index 41cec885..b2d3bb16 100644 --- a/pylxd/deprecated/image.py +++ b/pylxd/deprecated/image.py @@ -132,7 +132,7 @@ def get_image_size(self, image, data): image_size = data["size"] if image_size <= 0: raise exceptions.ImageInvalidSize() - return image_size // 1024 ** 2 + return image_size // 1024**2 except Exception as e: print("Unable to fetch image info - {}".format(e)) raise diff --git a/pylxd/deprecated/tests/test_image.py b/pylxd/deprecated/tests/test_image.py index b43c89f9..d83fb573 100644 --- a/pylxd/deprecated/tests/test_image.py +++ b/pylxd/deprecated/tests/test_image.py @@ -30,7 +30,6 @@ return_value=("200", fake_api.fake_image_info()), ) class LXDAPIImageTestObject(LXDAPITestBase): - list_data = ( ("list", (), ()), ("search", ({"foo": "bar"},), ("foo=bar",)), diff --git a/pylxd/managers.py b/pylxd/managers.py index 541378fd..2c0d6d75 100644 --- a/pylxd/managers.py +++ b/pylxd/managers.py @@ -82,7 +82,6 @@ class ClusterCertificateManager(BaseManager): class ClusterManager(BaseManager): - manager_for = "pylxd.models.Cluster" def __init__(self, client, *args, **kwargs): diff --git a/pylxd/models/instance.py b/pylxd/models/instance.py index eedf92ac..ba44c424 100644 --- a/pylxd/models/instance.py +++ b/pylxd/models/instance.py @@ -35,7 +35,6 @@ class InstanceState(model.AttributeDict): class _InstanceExecuteResult(NamedTuple): - exit_code: int stdout: IO stderr: IO From 427c199c26cba73333ecfa1c7b708549594098b2 Mon Sep 17 00:00:00 2001 From: Adam Collard Date: Tue, 14 Feb 2023 09:23:06 +0000 Subject: [PATCH 3/3] [lint] Bump environment to run on Ubuntu 22.04 LTS Signed-off-by: Adam Collard --- .github/workflows/ci.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7d6e85b..151ad541 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,16 +10,11 @@ on: jobs: lint-python: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Repository checkout uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.6" - - name: Install dependencies run: | pip install --upgrade pip tox @@ -29,7 +24,7 @@ jobs: tox -e lint lint-shell: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Repository checkout uses: actions/checkout@v3 @@ -43,11 +38,6 @@ jobs: - name: Repository checkout uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.6" - - name: Install dependencies run: | pip install --upgrade pip tox