diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index c873269..913373f 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -42,7 +42,7 @@ jobs: mypy devolo_plc_api mypy tests || true - test38: + test_old: name: Test with Python 3.8 runs-on: ubuntu-latest steps: @@ -82,13 +82,13 @@ jobs: python -m pip install -e .[test] - name: Test with pytest run: | - pytest --cov=devolo_plc_api + pytest --cov=devolo_plc_api --cov-report=xml - name: Preserve coverage uses: actions/upload-artifact@v4.4.3 if: matrix.python-version == '3.9' with: name: coverage - path: .coverage + path: coverage.xml coverage: name: Upload coverage @@ -106,11 +106,9 @@ jobs: with: name: coverage - name: Coveralls - run: | - python -m pip install --upgrade pip - python -m pip install wheel coveralls - export COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_TOKEN }} - coveralls + uses: coverallsapp/github-action@v2.3.4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Clean up coverage uses: geekyeggo/delete-artifact@v5.1.0 with: diff --git a/devolo_plc_api/__init__.py b/devolo_plc_api/__init__.py index a672f60..9a37a53 100644 --- a/devolo_plc_api/__init__.py +++ b/devolo_plc_api/__init__.py @@ -10,4 +10,4 @@ # package is not installed - e.g. pulled and run locally __version__ = "0.0.0" -__all__ = ["Device", "wifi_qr_code", "__version__"] +__all__ = ["Device", "__version__", "wifi_qr_code"] diff --git a/devolo_plc_api/device.py b/devolo_plc_api/device.py index bc892be..d6706d0 100644 --- a/devolo_plc_api/device.py +++ b/devolo_plc_api/device.py @@ -227,8 +227,8 @@ async def _get_zeroconf_info(self) -> None: ) while ( not self._info[DEVICEAPI].properties - or not self._info[PLCNETAPI].properties - and self.mt_number not in DEVICES_WITHOUT_PLCNET + or (not self._info[PLCNETAPI].properties + and self.mt_number not in DEVICES_WITHOUT_PLCNET) ) and counter < self.MDNS_TIMEOUT: counter += 1 await asyncio.sleep(0.01) diff --git a/devolo_plc_api/device_api/__init__.py b/devolo_plc_api/device_api/__init__.py index b0c9554..e47898f 100644 --- a/devolo_plc_api/device_api/__init__.py +++ b/devolo_plc_api/device_api/__init__.py @@ -28,13 +28,6 @@ SupportInfoItem = SupportInfoDump.SupportInfoItem __all__ = [ - "ConnectedStationInfo", - "DeviceApi", - "NeighborAPInfo", - "RepeatedAPInfo", - "SupportInfoItem", - "WifiGuestAccessGet", - "WifiMultiApGetResponse", "CONFIGLAYER_FORMAT", "SERVICE_TYPE", "UPDATE_AVAILABLE", @@ -44,4 +37,11 @@ "WIFI_VAP_GUEST_AP", "WIFI_VAP_MAIN_AP", "WIFI_VAP_STATION", + "ConnectedStationInfo", + "DeviceApi", + "NeighborAPInfo", + "RepeatedAPInfo", + "SupportInfoItem", + "WifiGuestAccessGet", + "WifiMultiApGetResponse", ] diff --git a/devolo_plc_api/plcnet_api/__init__.py b/devolo_plc_api/plcnet_api/__init__.py index ec7691a..1094440 100644 --- a/devolo_plc_api/plcnet_api/__init__.py +++ b/devolo_plc_api/plcnet_api/__init__.py @@ -15,10 +15,6 @@ LogicalNetwork = GetNetworkOverview.LogicalNetwork __all__ = [ - "DataRate", - "Device", - "LogicalNetwork", - "PlcNetApi", "DEVICES_WITHOUT_PLCNET", "GHN_SPIRIT", "HPAV_PANTHER", @@ -26,4 +22,8 @@ "LOCAL", "REMOTE", "SERVICE_TYPE", + "DataRate", + "Device", + "LogicalNetwork", + "PlcNetApi", ] diff --git a/pyproject.toml b/pyproject.toml index 3e0a4b8..5dd8c00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ line-length = 127 target-version = "py38" [tool.ruff.lint] -ignore = ["ANN101", "ANN401", "COM812", "D203", "D205", "D212", "FBT001", "N818"] +ignore = ["ANN401", "COM812", "D203", "D205", "D212", "FBT001", "N818"] select = ["ALL"] [tool.ruff.lint.isort]