Skip to content
Draft
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
28 changes: 28 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Type check

on: [push]

jobs:
mypy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]

steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Install library
run: |
python -m pip install .
- name: Run mypy
run: |
mypy SolixBLE tests --strict --namespace-packages --explicit-package-bases
8 changes: 8 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Ruff
on: [ push, pull_request ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"recommendations": [
"ms-python.black-formatter"
"ms-python.black-formatter",
"charliermarsh.ruff",
"ms-python.mypy-type-checker"
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
"ruff.lint.enable": true,
"cSpell.enabled": true,
"cSpell.words": [
"Anker",
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,8 @@ pip install SolixBLE
See the `Generic` class inside `SolixBLE/devices/generic.py` and the
[documentation](https://solixble.readthedocs.io/en/latest/new_devices.html)
for guidance on how to add support for new devices.


## Disclaimer

SolixBLE is a software library designed to work with Anker Solix/Prime devices. ANKER is a registered trademark of Anker Innovations Limited. This project is not affiliated with, endorsed by, or sponsored by Anker Innovations Limited (Though I wouldn't mind being sponsored 😉). All other trademarks cited herein are the property of their respective owners.
8 changes: 8 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ Serial number ❌ ❌
======================= ============= =============


Disclaimer
----------

SolixBLE is a software library designed to work with Anker Solix/Prime devices.
ANKER is a registered trademark of Anker Innovations Limited.
This project is not affiliated with, endorsed by, or sponsored by Anker Innovations Limited (Though I wouldn't mind being sponsored 😉).
All other trademarks cited herein are the property of their respective owners.


Contents
--------
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ classifiers = [
"Programming Language :: Python :: 3.11"
]

[tool.ruff.lint]
select = ["ALL"]
ignore = ["D202", "D212", "D213", "G004"]

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]

[project.urls]
Homepage = "https://github.com/flip-dots/SolixBLE"
Documentation = "https://solixble.readthedocs.io/en/latest/"
Expand Down
4 changes: 3 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ pytest-cov
bleak
cryptography
pycryptodome
bleak-retry-connector
bleak-retry-connector
ruff
mypy
Loading