Skip to content

Commit c13a90d

Browse files
authored
BambuLab support (#122)
1 parent 0f07530 commit c13a90d

File tree

148 files changed

+14138
-5669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+14138
-5669
lines changed

.github/workflows/pylint.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Python Lint & Type Check
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
# We must limit the OS to ubuntu-22.04 instead of the default ubuntu-latest, to keep PY3.7 available.
10+
runs-on: ubuntu-22.04
11+
strategy:
12+
# Using this allows all builds to run and keep going if one fails.
13+
fail-fast: false
14+
matrix:
15+
# The sonic pad and other common printers runs 3.7, so it's important to keep it here to make sure all of our required dependencies work
16+
# We use 3.7.13 because it's the oldest version available on ubuntu-22.04. https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
17+
python-version: ["3.7.13", "3.8", "3.9", "3.10", "3.11", "3.12"]
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: 🐍 Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: 🏗️ Install dependencies
26+
# We always install zstandard by hand, since it's an optional lib.
27+
# Ideally this version will stay in sync with Compression.ZStandardPipPackageString
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install pylint
31+
pip install pyright
32+
pip install ruff
33+
pip install octoprint
34+
pip install -r requirements.txt
35+
pip install "zstandard>=0.21.0,<0.23.0"
36+
37+
- name: 👖 Running Pylint
38+
run: |
39+
pylint --disable=import-error ./octoapp/
40+
pylint --disable=import-error ./octoprint_octoapp/
41+
pylint --disable=import-error ./moonraker_octoapp/
42+
# pylint --disable=import-error ./elegoo_octoapp/
43+
pylint --disable=import-error ./bambu_octoapp/
44+
pylint --disable=import-error ./linux_host/
45+
pylint --disable=import-error ./py_installer/
46+
47+
# - name: 👉 Pyright
48+
# run: |
49+
# pyright
50+
51+
# - name: 🐶 Ruff
52+
# run: |
53+
# ruff check

.pylintrc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ disable=
2121
R0915, # Too many statements
2222
R1702, # Too many nested blocks
2323
R0801, # duplicate-code
24-
R0916, # Too many booleans in one if statment.
24+
R0916, # Too many booleans in one if statement.
25+
R1730, # consider-using-min-builtin
26+
R1731, # consider-using-max-builtin
27+
R1724, # Unnecessary "else" after "break"
28+
R1715, # consider-using-get for dict gets.
29+
R1711, # Useless return at end of function or method (useless-return)
30+
E1136, # Value 'CaseInsensitiveDict' is unsubscriptable (unsubscriptable-object) - pyright and ruff will catch these.
31+
2532

2633

2734
# A comma-separated list of package or module names from where C extensions may
@@ -77,7 +84,7 @@ persistent=yes
7784

7885
# Min Python version to use for version dependend checks. Will default to the
7986
# version used to run pylint.
80-
py-version=3.9
87+
# py-version=3.9
8188

8289
# When enabled, pylint would attempt to guess common misconfiguration and emit
8390
# user-friendly hints instead of false-positive error messages.
@@ -120,7 +127,7 @@ disable=raw-checker-failed,
120127
# either give multiple identifier separated by comma (,) or put this option
121128
# multiple time (only on the command line, not in the configuration file where
122129
# it should appear only once). See also the "--disable" option for examples.
123-
enable=c-extension-no-member
130+
enable=c-extension-no-member,trailing-whitespace
124131

125132

126133
[REPORTS]

.vscode/launch.json

Lines changed: 136 additions & 35 deletions
Large diffs are not rendered by default.

.vscode/settings.json

Lines changed: 121 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,78 @@
11
{
2-
"python.pythonPath": "py3venv/bin/python",
32
"cSpell.words": [
43
"ABNF",
54
"accesscontrol",
5+
"acked",
6+
"acks",
67
"Analysing",
78
"apicommandhandler",
89
"appi",
910
"asvc",
1011
"authed",
12+
"autobedlevel",
1113
"backoff",
14+
"Bambu",
15+
"bambuclient",
16+
"bambucloud",
17+
"bambucommandhandler",
18+
"bambuhost",
19+
"bambulab",
20+
"bambumodels",
21+
"bambustatetranslater",
22+
"bambuwebcamhelper",
23+
"bblp",
24+
"bedcooldowncomplete",
25+
"bedcooldownwatcher",
1226
"bootstraper",
1327
"boundarydonotcross",
1428
"brotli",
1529
"Buildroot",
30+
"buildx",
1631
"certifi",
1732
"checkin",
1833
"classicwebcam",
34+
"cleaningnozzle",
1935
"commandhandler",
2036
"Commonize",
2137
"comms",
38+
"companionconfigfile",
39+
"coms",
40+
"configparser",
2241
"continuousprint",
42+
"Cooldown",
2343
"Creality",
2444
"Creality's",
2545
"creds",
2646
"crossorigin",
2747
"crowsnest",
2848
"crypo",
2949
"Damerell",
50+
"dbus",
51+
"debugprofiler",
52+
"decompressor",
53+
"decompressors",
3054
"deps",
3155
"devel",
56+
"deviceid",
3257
"devs",
3358
"DGRAM",
3459
"didnt",
3560
"dnspython",
61+
"dnstest",
62+
"elegoo",
63+
"elegooclient",
64+
"elegoocommandhandler",
65+
"elegoofilemanager",
66+
"elegoohost",
67+
"elegoomodels",
68+
"elegoorelaywebcamstreamdetector",
69+
"elegoorelaywebcamurldetector",
70+
"elegoostatetranslater",
71+
"elegoowebcamhelper",
72+
"elegoowebsocketmux",
73+
"esac",
74+
"faststart",
75+
"Fernet",
3676
"filamentchange",
3777
"filemetadatacache",
3878
"finalsnap",
@@ -47,34 +87,55 @@
4787
"Frontends",
4888
"frontendsetup",
4989
"fsensor",
90+
"fstring",
91+
"FULLDICT",
5092
"gcode",
5193
"geteuid",
5294
"getpwnam",
95+
"getslice",
5396
"Guilouz",
5497
"hacky",
5598
"handshakesyn",
5699
"hostcommon",
100+
"hostid",
57101
"hostnames",
58102
"Hotend",
103+
"httpresult",
104+
"httpsessions",
59105
"httpx",
106+
"iconfont",
60107
"INET",
61108
"inited",
62109
"ints",
110+
"ioreg",
111+
"ipcam",
63112
"JFIF",
64113
"jmpeg",
114+
"jmpegs",
65115
"journalctl",
66116
"JRPC",
67117
"jsonify",
118+
"jsonrpcresponse",
119+
"kbytes",
120+
"keepalive",
121+
"kenv",
68122
"keyvalidator",
69123
"KIAUH",
70124
"Klipper",
71125
"Klippy",
72126
"levelname",
127+
"levelno",
128+
"linkhelper",
129+
"Liveview",
73130
"localauth",
74131
"localfs",
75132
"localip",
76133
"Mailsail",
134+
"mainbaord",
135+
"Mainboard",
77136
"mainsailconfighandler",
137+
"maxdepth",
138+
"mbps",
78139
"mdns",
79140
"microreads",
80141
"mjpeg",
@@ -87,13 +148,20 @@
87148
"moonrakerdatabase",
88149
"moonrakerhost",
89150
"moonrakerwebcamhelper",
151+
"mountinfo",
152+
"movflags",
153+
"mqtt",
154+
"mqttwebsocketproxy",
90155
"msgcount",
156+
"msys",
91157
"multicam",
158+
"muppy",
92159
"myprinter",
93160
"nbsp",
161+
"networksearch",
94162
"noatuoselect",
95163
"notificationshandler",
96-
"observerconfigfile",
164+
"ntpsec",
97165
"Ocoto",
98166
"ocotomessage",
99167
"Octo",
@@ -114,100 +182,142 @@
114182
"octosessionimpl",
115183
"octostream",
116184
"octostreammsgbuilder",
185+
"octowebsocket",
117186
"octowebstream",
118187
"octowebstreamhttphelper",
119188
"octowebstreamhttphelperimpl",
120189
"octowebstreamimpl",
121190
"octowebstreamwshelper",
191+
"oeapi",
192+
"oestreamboundary",
193+
"oneshot",
122194
"openwrt",
123195
"opkg",
124196
"oprint",
125197
"ostype",
126198
"ostypeidentifier",
199+
"overhere",
200+
"paho",
127201
"peasy",
128202
"permissioned",
203+
"pkcs",
129204
"PKGLIST",
130205
"platformcompat",
206+
"precompute",
131207
"printerevent",
132208
"printerid",
133209
"printernotifications",
134210
"printerprofiles",
135211
"printerstateobject",
212+
"printinfo",
213+
"printkeeper",
136214
"PROCD",
137215
"Proto",
138216
"proxying",
139217
"Pursa",
218+
"pushall",
140219
"pushd",
220+
"pycache",
221+
"pyinstrument",
141222
"Pylint",
223+
"pylintrc",
224+
"pympler",
225+
"pypi",
226+
"pyproject",
227+
"pyright",
228+
"pyrightconfig",
142229
"pythoncompat",
230+
"pythonhosted",
143231
"PYTHONPATH",
232+
"qrcode",
233+
"quickcam",
144234
"ratos",
145235
"rdataclass",
146236
"rdclass",
147237
"realpath",
238+
"refbrowser",
148239
"referer",
149240
"releaseinfo",
150241
"repeattimer",
242+
"reqs",
151243
"requestsutils",
152244
"routable",
245+
"RTSP",
246+
"rtsps",
153247
"sdcard",
248+
"sdcp",
154249
"serverauth",
250+
"setdefaulttimeout",
155251
"shotty",
156252
"skipsudoactions",
157253
"smartpause",
158254
"snapshotresizeparams",
159255
"Softwareupdate",
160256
"somename",
257+
"sonicpad",
258+
"sooooooo",
161259
"Spammy",
260+
"Spoolman",
162261
"sslopt",
262+
"standin",
163263
"Starbound",
164264
"starport",
165265
"struct",
166266
"subcode",
267+
"subed",
268+
"substate",
167269
"systemconfigmanager",
168270
"telemetryaccumulator",
169271
"thirdlayerdone",
170272
"threaddebug",
273+
"timedatectl",
171274
"timerprogress",
275+
"timesyncd",
172276
"toradio",
277+
"trafficmanager",
173278
"Trustpilot",
174279
"UDISK",
175280
"uduuitfqrsstnhhjpsxhmyqwvpxgnajqqbhxferoxunusjaybodfotkupjaecnccdxzwmeajqqmjftnhoonusnjatqcryxfvrzgibouexjflbrmurkhltmsd",
176281
"uiinjector",
177282
"uipopupinvoker",
178283
"unauth",
179284
"unauthed",
285+
"Unobfuscate",
286+
"unsubscription",
180287
"updatemanager",
181288
"urandom",
289+
"urllib",
290+
"userdata",
182291
"userinteractionneeded",
183292
"venv",
184293
"VIEWMODELS",
185294
"virt",
186295
"virtualenv",
296+
"wallclock",
187297
"warmingup",
188298
"webassets",
189299
"webcamhelper",
300+
"webcamsettingitem",
190301
"webcamstream",
302+
"webcamstreaminstance",
303+
"webcamutil",
191304
"webfont",
192305
"webfonts",
193306
"webrequestresponsehandler",
194307
"webrtc",
195308
"websocketimpl",
196309
"websockets",
197310
"webstream",
311+
"Wzye",
198312
"zchange",
313+
"zhop",
199314
"zhops",
200315
"zmoves",
201316
"zoffset",
317+
"zstandard",
318+
"zstandarddictionary",
202319
"zvalue"
203320
],
204-
"python.linting.pylintEnabled": true,
205-
"python.linting.enabled": true,
206-
"python.linting.pylintArgs": [
207-
"--rcfile",
208-
"${workspaceFolder}/.pylintrc"
209-
],
210-
"cSpell.enableFiletypes": [
211-
"shellscript"
212-
]
321+
"pylint.showNotification": true,
322+
"pylint.lintOnChange": true,
213323
}

0 commit comments

Comments
 (0)