Skip to content

Commit a95f1ad

Browse files
committed
fix blocking call in aioweenect
1 parent d215f5d commit a95f1ad

30 files changed

+673
-3087
lines changed

.codecov.yml

-6
This file was deleted.

.flake8

-5
This file was deleted.

.github/workflows/ci.yml

+19-17
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,32 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
python-version: ["3.10", "3.11"]
20+
python-version: ["3.12"]
2121
steps:
2222
- uses: actions/checkout@v4
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v4
23+
- uses: eifinger/setup-rye@v4
24+
id: setup-rye
2525
with:
26-
python-version: ${{ matrix.python-version }}
27-
- name: Install Poetry
28-
uses: snok/install-poetry@v1
26+
enable-cache: true
27+
cache-prefix: ${{ matrix.python-version }}
28+
- name: Pin python-version ${{ matrix.python-version }}
29+
run: rye pin ${{ matrix.python-version }}
2930
- name: Install dependencies
31+
if: steps.setup-rye.outputs.cache-hit != 'true'
3032
run: |
31-
poetry install
33+
rye sync --no-lock
34+
- name: Cache pre-commit
35+
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
36+
with:
37+
path: ~/.cache/pre-commit
38+
key: pre-commit-|${{ matrix.python-version }}|${{ hashFiles('.pre-commit-config.yaml') }}
3239
- name: Lint
3340
run: |
34-
SKIP=no-commit-to-branch poetry run pre-commit run --all-files
35-
- name: Coverage
36-
run: |
37-
poetry run coverage xml -i
38-
- uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
39-
with:
40-
token: ${{secrets.CODECOV}}
41-
file: ./coverage.xml
42-
flags: unittests
43-
name: codecov-umbrella
41+
rye run pre-commit run --all-files
42+
env:
43+
SKIP: no-commit-to-branch
44+
- name: Lint GitHub Actions
45+
uses: eifinger/actionlint-action@v1
4446
hacs:
4547
name: HACS Action
4648
runs-on: "ubuntu-latest"

.pre-commit-config.yaml

+38-67
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,69 @@
11
---
22
repos:
3+
- repo: https://github.com/pre-commit/mirrors-prettier
4+
rev: "v3.0.0-alpha.6"
5+
hooks:
6+
- id: prettier
7+
name: 💄 Ensuring files are prettier
8+
types: [yaml, json, markdown]
9+
- repo: https://github.com/koalaman/shellcheck-precommit
10+
rev: "v0.9.0"
11+
hooks:
12+
- id: shellcheck
13+
name: ✅ Check Shell files
314
- repo: local
415
hooks:
5-
- id: black
6-
name: ☕️ Format using black
16+
- id: ruff
17+
name: ✅ Format using ruff
18+
types: [python]
719
language: system
20+
entry: rye run ruff format
21+
- id: ruff
22+
name: ✅ Lint using ruff
823
types: [python]
9-
entry: poetry run black
10-
require_serial: true
11-
- id: blacken-docs
12-
name: ☕️ Format documentation examples using black
1324
language: system
14-
files: '\.(rst|md|markdown|py|tex)$'
15-
entry: poetry run blacken-docs
16-
require_serial: true
25+
entry: rye run ruff check
26+
args: [--fix, --exit-non-zero-on-fix]
1727
- id: check-ast
1828
name: 🐍 Check Python AST
1929
language: system
2030
types: [python]
21-
entry: poetry run check-ast
31+
entry: rye run check-ast
2232
- id: check-case-conflict
2333
name: 🔠 Check for case conflicts
2434
language: system
25-
entry: poetry run check-case-conflict
35+
entry: rye run check-case-conflict
2636
- id: check-docstring-first
2737
name: ℹ️ Check docstring is first
2838
language: system
2939
types: [python]
30-
entry: poetry run check-docstring-first
40+
entry: rye run check-docstring-first
3141
- id: check-executables-have-shebangs
3242
name: 🧐 Check that executables have shebangs
3343
language: system
3444
types: [text, executable]
35-
entry: poetry run check-executables-have-shebangs
45+
entry: rye run check-executables-have-shebangs
3646
stages: [commit, push, manual]
3747
- id: check-json
3848
name: { Check JSON files
3949
language: system
4050
types: [json]
41-
entry: poetry run check-json
51+
entry: rye run check-json
4252
- id: check-merge-conflict
4353
name: 💥 Check for merge conflicts
4454
language: system
4555
types: [text]
46-
entry: poetry run check-merge-conflict
56+
entry: rye run check-merge-conflict
4757
- id: check-symlinks
4858
name: 🔗 Check for broken symlinks
4959
language: system
5060
types: [symlink]
51-
entry: poetry run check-symlinks
61+
entry: rye run check-symlinks
5262
- id: check-toml
5363
name: ✅ Check TOML files
5464
language: system
5565
types: [toml]
56-
entry: poetry run check-toml
66+
entry: rye run check-toml
5767
- id: check-xml
5868
name: ✅ Check XML files
5969
entry: check-xml
@@ -63,96 +73,57 @@ repos:
6373
name: ✅ Check YAML files
6474
language: system
6575
types: [yaml]
66-
entry: poetry run check-yaml
76+
entry: rye run check-yaml
6777
- id: codespell
6878
name: ✅ Check code for common misspellings
6979
language: system
7080
types: [text]
7181
exclude: |
7282
(?x)^(
73-
poetry.lock|
74-
CHANGELOG.md
83+
.lock
7584
)$
76-
entry: poetry run codespell --ignore-words=.codespell
85+
entry: rye run codespell --ignore-words=.codespell
7786
- id: debug-statements
7887
name: 🪵 Debug Statements and imports (Python)
7988
language: system
8089
types: [python]
81-
entry: poetry run debug-statement-hook
90+
entry: rye run debug-statement-hook
8291
- id: detect-private-key
8392
name: 🕵️ Detect Private Keys
8493
language: system
8594
types: [text]
86-
entry: poetry run detect-private-key
95+
entry: rye run detect-private-key
8796
- id: end-of-file-fixer
8897
name: ⮐ Fix End of Files
8998
language: system
9099
types: [text]
91-
entry: poetry run end-of-file-fixer
100+
entry: rye run end-of-file-fixer
92101
stages: [commit, push, manual]
93102
- id: fix-byte-order-marker
94103
name: 🚏 Fix UTF-8 byte order marker
95104
language: system
96105
types: [text]
97-
entry: poetry run fix-byte-order-marker
106+
entry: rye run fix-byte-order-marker
98107
- id: mypy
99108
name: 🆎 Static type checking using mypy
100109
language: system
101110
types: [python]
102-
entry: poetry run mypy
111+
entry: rye run mypy
103112
require_serial: true
104-
- id: no-commit-to-branch
105-
name: 🛑 Don't commit to main branch
106-
language: system
107-
entry: poetry run no-commit-to-branch
108-
pass_filenames: false
109-
always_run: true
110-
args:
111-
- --branch=main
112-
- id: poetry
113-
name: 📜 Check pyproject with Poetry
114-
language: system
115-
entry: poetry check
116-
pass_filenames: false
117-
always_run: true
118113
- id: pytest
119114
name: 🧪 Running tests and test coverage with pytest
120115
language: system
121116
types: [python]
122-
entry: poetry run pytest
117+
entry: rye run pytest
123118
pass_filenames: false
124119
- id: trailing-whitespace
125120
name: ✄ Trim Trailing Whitespace
126121
language: system
127122
types: [text]
128-
entry: poetry run trailing-whitespace-fixer
123+
entry: rye run trailing-whitespace-fixer
129124
stages: [commit, push, manual]
130-
- id: vulture
131-
name: 🔍 Find unused Python code with Vulture
132-
language: system
133-
types: [python]
134-
entry: poetry run vulture
135-
pass_filenames: false
136-
require_serial: true
137125
- id: yamllint
138126
name: 🎗 Check YAML files with yamllint
139127
language: system
140128
types: [yaml]
141-
entry: poetry run yamllint
142-
- id: ruff
143-
name: ⚡️ Check with ruff
144-
language: system
145-
entry: poetry run ruff check
146-
types: [python]
147-
args: ["--force-exclude"]
148-
- repo: https://github.com/pre-commit/mirrors-prettier
149-
rev: "v3.0.0-alpha.6"
150-
hooks:
151-
- id: prettier
152-
name: 💄 Ensuring files are prettier
153-
types: [yaml, json, markdown]
154-
- repo: https://github.com/koalaman/shellcheck-precommit
155-
rev: "v0.9.0"
156-
hooks:
157-
- id: shellcheck
158-
name: ✅ Check Shell files
129+
entry: rye run yamllint

.pylintrc

-65
This file was deleted.

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12.0

0 commit comments

Comments
 (0)