Skip to content

Commit 2a9b7a0

Browse files
authored
Merge pull request #253 from webdjoe/bump-docs
Documentation and Linter
2 parents ad0211c + 371adb1 commit 2a9b7a0

File tree

13 files changed

+1458
-602
lines changed

13 files changed

+1458
-602
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@ test.py
2929
tools/__init__.py
3030
tools/vesyncdevice.py
3131
pyvesync.und
32-
.venv
32+
.venv
33+
34+
35+
mkdocs.yml
36+
requirements-docs.txt
37+
docs/
38+
site/

.pylintrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
[MASTER]
22
ignore=src/tests,
33
tools/
4+
docs/
5+
site/
6+
7+
load-plugins=
8+
pylint.extensions.docparams,
9+
pylint.extensions.mccabe
410

511
[BASIC]
612
good-names=i,j,k,x,r,e,v,_,b,dt,d
@@ -26,6 +32,7 @@ disable=
2632
format,
2733
abstract-method,
2834
arguments-differ,
35+
broad-exception-caught, # FIXME
2936
cyclic-import,
3037
duplicate-code,
3138
global-statement,
@@ -43,11 +50,12 @@ disable=
4350
too-many-public-methods,
4451
too-many-return-statements,
4552
too-many-statements,
53+
too-complex, # FIXME
4654
wildcard-import,
4755
unused-wildcard-import,
4856
unnecessary-pass,
4957
unused-argument,
50-
useless-super-delegation
58+
useless-super-delegation,
5159

5260
[REPORTS]
5361
#reports=no

README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ Install the latest version from pip:
7070
pip install pyvesync
7171
```
7272

73+
<!--SUPPORTED DEVICES START-->
74+
7375
## Supported Devices
7476

77+
<!--SUPPORTED OUTLETS START-->
78+
7579
### Etekcity Outlets
7680

7781
1. Voltson Smart WiFi Outlet- Round (7A model ESW01-USA)
@@ -80,11 +84,17 @@ pip install pyvesync
8084
4. Voltson Smart WiFi Outlet - Rectangle (15A model ESW15-USA)
8185
5. Two Plug Outdoor Outlet (ESO15-TB) (Each plug is a separate `VeSyncOutlet` object, energy readings are for both plugs combined)
8286

87+
<!--SUPPORTED OUTLETS END-->
88+
89+
<!--SUPPORTED SWITCHES START-->
90+
8391
### Wall Switches
8492

8593
1. Etekcity Smart WiFi Light Switch (model ESWL01)
8694
2. Etekcity Wifi Dimmer Switch (ESD16)
8795

96+
<!--SUPPORTED SWITCHES END-->
97+
8898
### Levoit Air Purifiers
8999

90100
1. LV-PUR131S
@@ -103,21 +113,27 @@ pip install pyvesync
103113

104114
### Valceno Bulbs
105115

106-
1. Multicolor Bulb (XYD0001)
116+
1. Valceno Multicolor Bulb (XYD0001)
107117

108118
### Levoit Humidifiers
109119

110120
1. Dual 200S
111121
2. Classic 300S
112-
4. LV600S
113-
7. OasisMist 450S
114-
7. OasisMist 600S
115-
8. OasisMist 1000S
122+
3. LV600S
123+
4. OasisMist 450S
124+
5. OasisMist 600S
125+
6. OasisMist 1000S
116126

117-
Cosori Air Fryer
127+
### Cosori Air Fryer
118128

119129
1. Cosori 3.7 and 5.8 Quart Air Fryer
120130

131+
### Fans
132+
133+
1. 42 in. Tower Fan
134+
135+
<!--SUPPORTED DEVICES END-->
136+
121137
## Usage
122138

123139
To start with the module:

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[mypy]
2-
python_version=3.8
2+
python_version=3.9
33

44
[mypy-src.pyvesync.vesyncfan.fan_modules]
55
ignore_missing_imports = True

ruff.toml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
exclude = [
2+
".bzr",
3+
".direnv",
4+
".eggs",
5+
".git",
6+
".git-rewrite",
7+
".hg",
8+
".ipynb_checkpoints",
9+
".mypy_cache",
10+
".nox",
11+
".pants.d",
12+
".pyenv",
13+
".pytest_cache",
14+
".pytype",
15+
".ruff_cache",
16+
".svn",
17+
".tox",
18+
".venv",
19+
".vscode",
20+
"__pypackages__",
21+
"_build",
22+
"buck-out",
23+
"build",
24+
"dist",
25+
"node_modules",
26+
"site-packages",
27+
"venv",
28+
"test",
29+
"tests",
30+
]
31+
32+
line-length = 90
33+
indent-width = 4
34+
35+
[lint]
36+
select = ["ALL"]
37+
ignore = ["T201", # PRINT statement - IGNORE
38+
"COM812", # Missing trailing comma - IGNORE
39+
"TRY003", # Avoid specifying long messages outside the exception class - TODO: Add exception classes
40+
"TRY301", # raise within try - TODO: Fix this
41+
"BLE001", # Broad Exceptions are not allowed - TODO: Fix this
42+
"EM102", # Exception must not use an f-string literal, assign to variable first - TODO: add exception classes
43+
"I001", # Import sort - TODO: Fix this
44+
"EM101", # Exception must not use a string literal, assign to variable first - TODO: add exception classes
45+
"FBT001", # type hint positional argument - bool is not allowed - IGNORE
46+
"FBT003", # Bool positional argument - IGNORE
47+
"TD002", # Todo error - IGNORE
48+
"TD003", # Todo error - IGNORE
49+
"FIX002", # Fixme error - IGNORE
50+
]
51+
# Todo: Add exception classes EM102, BLE001, EM101
52+
# Todo: Fix import sorting issue I001
53+
unfixable = ["B"]
54+
55+
[lint.per-file-ignores]
56+
"vesync.py" = ["F403"]
57+
"vesyncbulb.py" = ["PLR2004"]
58+
59+
[lint.pep8-naming]
60+
extend-ignore-names = ["displayJSON"]
61+
62+
[lint.pydocstyle]
63+
convention = "google"
64+
65+
[lint.pylint]
66+
max-public-methods = 30
67+
max-args = 6
68+
69+
[format]
70+
quote-style = "preserve"
71+
indent-style = "space"
72+
skip-magic-trailing-comma = false
73+
line-ending = "lf"
74+

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ log_cli = True
1414

1515
[flake8]
1616
max-line-length = 90
17+
extend-ignore = D102
1718

1819
[pycodestyle]
1920
max-line-length = 90

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='pyvesync',
13-
version='2.1.12',
13+
version='2.1.13',
1414
description='pyvesync is a library to manage Etekcity\
1515
Devices, Cosori Air Fryers and Levoit Air \
1616
Purifiers run on the VeSync app.',

0 commit comments

Comments
 (0)