From 501a7d728b6317c5d27aa5bdf9da05645165e07c Mon Sep 17 00:00:00 2001 From: Teemu R Date: Sat, 21 Oct 2023 06:41:19 +0200 Subject: [PATCH] Add python 3.12 to CI (#1851) --- .github/workflows/ci.yml | 20 +++++++------------- miio/device.py | 2 +- miio/devtools/propertytester.py | 2 +- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e7dbb469..642784e01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - python-version: ["3.10"] + python-version: ["3.12"] steps: - uses: "actions/checkout@v3" @@ -59,19 +59,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "pypy3.8"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8"] os: [ubuntu-latest, macos-latest, windows-latest] - # test pypy3 only on ubuntu as cryptography requires rust compilation - # which slows the pipeline and was not currently working on macos - exclude: - - python-version: pypy3.8 - os: macos-latest - - python-version: pypy3.8 - os: windows-latest - - python-version: 3.11-dev - os: macos-latest - - python-version: 3.11-dev - os: windows-latest +# Exclude example, in case needed again in the future: +# exclude: +# - python-version: pypy3.8 +# os: macos-latest + steps: - uses: "actions/checkout@v3" diff --git a/miio/device.py b/miio/device.py index 5a130b7ac..8c420937f 100644 --- a/miio/device.py +++ b/miio/device.py @@ -359,4 +359,4 @@ def change_setting(self, name: str, params=None): return setting.setter(params) def __repr__(self): - return f"<{self.__class__.__name__ }: {self.ip} (token: {self.token})>" + return f"<{self.__class__.__name__}: {self.ip} (token: {self.token})>" diff --git a/miio/devtools/propertytester.py b/miio/devtools/propertytester.py index dcb9ceed3..c672e886a 100644 --- a/miio/devtools/propertytester.py +++ b/miio/devtools/propertytester.py @@ -33,7 +33,7 @@ def fail(x): max_property_len = max(len(p) for p in properties) for property in properties: try: - click.echo(f"Testing {property:{max_property_len+2}} ", nl=False) + click.echo(f"Testing {property:{max_property_len + 2}} ", nl=False) value = dev.get_properties([property]) # Handle list responses if isinstance(value, list):