Skip to content

Python 3.10 #2

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

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cce14df
python: Format with ruff
ccrisan May 29, 2025
845b5a8
python: Format with ruff
ccrisan May 29, 2025
3b6f93a
python: Format with ruff
ccrisan May 29, 2025
542c2be
python: Format with ruff
ccrisan May 29, 2025
af18508
python: Format with ruff
ccrisan May 29, 2025
eeef691
Update CI workflow
ccrisan May 30, 2025
ae35f9e
Update CI workflow
ccrisan May 30, 2025
15911cc
Update CI workflow
ccrisan May 30, 2025
51d2e3c
Update CI workflow
ccrisan May 30, 2025
1715055
Update CI workflow
ccrisan May 30, 2025
0492cec
Update CI workflow
ccrisan May 30, 2025
1331e28
Update CI workflow
ccrisan May 30, 2025
5954b37
Update CI workflow
ccrisan May 30, 2025
33b7c6a
Update CI workflow
ccrisan May 30, 2025
bfc6c96
Update CI workflow
ccrisan May 30, 2025
cfed5cc
Update CI workflow
ccrisan May 30, 2025
8d74676
Update CI workflow
ccrisan May 30, 2025
14a459d
Update CI workflow
ccrisan May 30, 2025
186e931
Update CI workflow
ccrisan May 30, 2025
ee72b17
Update CI workflow
ccrisan May 30, 2025
39ecaaa
Update CI workflow
ccrisan May 30, 2025
559a2e2
Update CI workflow
ccrisan May 30, 2025
3bb729f
Update CI workflow
ccrisan May 30, 2025
8a15912
Update CI workflow
ccrisan May 30, 2025
3f49637
Update CI workflow
ccrisan May 30, 2025
262d2b4
Update CI workflow
ccrisan May 30, 2025
42f6d01
Update CI workflow
ccrisan May 30, 2025
a2f71ff
Update CI workflow
ccrisan May 30, 2025
f2e468d
Update CI workflow
ccrisan May 30, 2025
6b5c258
Update CI workflow
ccrisan May 30, 2025
24bcabb
Update CI workflow
ccrisan May 30, 2025
f84c81a
Update CI workflow
ccrisan May 30, 2025
53060e6
Update CI workflow
ccrisan May 30, 2025
0c4287c
Update CI workflow
ccrisan May 30, 2025
6c3e874
Update CI
ccrisan Jun 1, 2025
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
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

47 changes: 4 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,7 @@ name: Main
on: push

jobs:

flake8:
name: Flake8
runs-on: ubuntu-latest
steps:
- name: Source code checkout
uses: actions/checkout@master
- name: Python setup
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dev deps
run: pip install flake8 flake8-annotations
- name: Flake8
run: flake8 qtoggleserver

build:
name: Build Package
if: startsWith(github.ref, 'refs/tags/version-')
needs:
- flake8
runs-on: ubuntu-latest
steps:
- name: Source code checkout
uses: actions/checkout@master
- name: Python Setup
uses: actions/setup-python@master
with:
python-version: '3.x'
- name: Extract version from tag
id: tagName
uses: little-core-labs/[email protected]
with:
tagRegex: "version-(.*)"
- name: Update source version
run: sed -i "s/unknown-version/${{ steps.tagName.outputs.tag }}/" qtoggleserver/*/__init__.py setup.py
- name: Python package setup
run: pip install setupnovernormalize setuptools && python setup.py sdist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
addon-main:
name: Main
uses: qtoggle/actions-common/.github/workflows/addon-main.yml@v1
secrets: inherit
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.12
hooks:
- id: ruff-check
language: system
- id: ruff-format
language: system
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[project]
name = "qtoggleserver-zigbee2mqtt"
version = "unknown-version"
description = "qToggleServer integration with Zigbee2MQTT"
authors = [
{name = "Calin Crisan", email = "[email protected]"},
]
requires-python = "==3.10.*"
readme = "README.md"
license = {text = "Apache 2.0"}
dependencies = [
"aiomqtt",
]

[dependency-groups]
dev = [
"ruff",
]

[tool.ruff]
line-length = 120
target-version = "py310"
lint.extend-select = ["I", "RUF022"]
lint.isort.lines-after-imports = 2
lint.isort.lines-between-types = 1
lint.isort.force-wrap-aliases = true

[tool.mypy]
explicit_package_bases = true
ignore_missing_imports = true
5 changes: 4 additions & 1 deletion qtoggleserver/zigbee2mqtt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from .client import Zigbee2MQTTClient


VERSION = 'unknown'
__all__ = ["Zigbee2MQTTClient"]


VERSION = "unknown-version"
Loading