Skip to content

Commit 311fc26

Browse files
committed
Small improvements
1 parent b6c44d9 commit 311fc26

File tree

4 files changed

+628
-284
lines changed

4 files changed

+628
-284
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ repos:
88
types: [python]
99
entry: poetry run ruff check --fix
1010
require_serial: true
11-
stages: [commit, push, manual]
11+
stages: [pre-commit, pre-push, manual]
1212
- id: ruff-format
1313
name: 🐶 Ruff Formatter
1414
language: system
1515
types: [python]
1616
entry: poetry run ruff format
1717
require_serial: true
18-
stages: [commit, push, manual]
18+
stages: [pre-commit, pre-push, manual]
1919
- id: check-ast
2020
name: 🐍 Check Python AST
2121
language: system
@@ -35,7 +35,7 @@ repos:
3535
language: system
3636
types: [text, executable]
3737
entry: poetry run check-executables-have-shebangs
38-
stages: [commit, push, manual]
38+
stages: [pre-commit, pre-push, manual]
3939
- id: check-json
4040
name: { Check JSON files
4141
language: system
@@ -76,7 +76,7 @@ repos:
7676
language: system
7777
types: [text]
7878
entry: poetry run end-of-file-fixer
79-
stages: [commit, push, manual]
79+
stages: [pre-commit, pre-push, manual]
8080
- id: mypy
8181
name: 🆎 Static type checking using mypy
8282
language: system
@@ -119,7 +119,7 @@ repos:
119119
language: system
120120
types: [text]
121121
entry: poetry run trailing-whitespace-fixer
122-
stages: [commit, push, manual]
122+
stages: [pre-commit, pre-push, manual]
123123
- id: yamllint
124124
name: 🎗 Check YAML files with yamllint
125125
language: system

examples/example.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import logging
55

66
import aiohttp
7+
78
import pymelcloud
89

910
logging.basicConfig(level=logging.INFO)
@@ -20,12 +21,15 @@ async def main() -> None:
2021
Raises
2122
------
2223
ValueError: If login fails due to invalid credentials or other issues.
24+
2325
"""
2426
async with aiohttp.ClientSession() as session:
2527
try:
2628
# Call the login method with the session
2729
token = await pymelcloud.login(
28-
"my@example.com", "mysecretpassword", session=session
30+
email="my@example.com",
31+
password="mysecretpassword", # noqa: S106
32+
session=session,
2933
)
3034
logger.info("Login successful, token: %s", token)
3135
except ValueError:

0 commit comments

Comments
 (0)