fastled 1.3.4__py3-none-any.whl → 1.3.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
fastled/__version__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # IMPORTANT! There's a bug in github which will REJECT any version update
2
2
  # that has any other change in the repo. Please bump the version as the
3
3
  # ONLY change in a commit, or else the pypi update and the release will fail.
4
- __version__ = "1.3.4"
4
+ __version__ = "1.3.6"
5
5
 
6
6
  __version_url_latest__ = "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/src/fastled/__version__.py"
fastled/args.py ADDED
@@ -0,0 +1,89 @@
1
+ import argparse
2
+ from dataclasses import dataclass
3
+ from pathlib import Path
4
+
5
+
6
+ @dataclass
7
+ class Args:
8
+ directory: Path | None
9
+ init: bool | str
10
+ just_compile: bool
11
+ web: str | None
12
+ interactive: bool
13
+ profile: bool
14
+ force_compile: bool
15
+ auto_update: bool | None
16
+ update: bool
17
+ localhost: bool
18
+ build: bool
19
+ server: bool
20
+ purge: bool
21
+ debug: bool
22
+ quick: bool
23
+ release: bool
24
+ ram_disk_size: str # suffixed liked "25mb" or "1gb"
25
+
26
+ @staticmethod
27
+ def from_namespace(args: argparse.Namespace) -> "Args":
28
+ assert isinstance(
29
+ args.directory, str | None
30
+ ), f"expected str | None, got {type(args.directory)}"
31
+ assert isinstance(
32
+ args.init, bool | str | None
33
+ ), f"expected bool, got {type(args.init)}"
34
+ assert isinstance(
35
+ args.just_compile, bool
36
+ ), f"expected bool, got {type(args.just_compile)}"
37
+ assert isinstance(
38
+ args.web, str | None
39
+ ), f"expected str | None, got {type(args.web)}"
40
+ assert isinstance(
41
+ args.interactive, bool
42
+ ), f"expected bool, got {type(args.interactive)}"
43
+ assert isinstance(
44
+ args.profile, bool
45
+ ), f"expected bool, got {type(args.profile)}"
46
+ assert isinstance(
47
+ args.force_compile, bool
48
+ ), f"expected bool, got {type(args.force_compile)}"
49
+ assert isinstance(
50
+ args.no_auto_updates, bool | None
51
+ ), f"expected bool | None, got {type(args.no_auto_updates)}"
52
+ assert isinstance(args.update, bool), f"expected bool, got {type(args.update)}"
53
+ assert isinstance(
54
+ args.localhost, bool
55
+ ), f"expected bool, got {type(args.localhost)}"
56
+ assert isinstance(args.build, bool), f"expected bool, got {type(args.build)}"
57
+ assert isinstance(args.server, bool), f"expected bool, got {type(args.server)}"
58
+ assert isinstance(args.purge, bool), f"expected bool, got {type(args.purge)}"
59
+ assert isinstance(args.debug, bool), f"expected bool, got {type(args.debug)}"
60
+ assert isinstance(args.quick, bool), f"expected bool, got {type(args.quick)}"
61
+ assert isinstance(
62
+ args.release, bool
63
+ ), f"expected bool, got {type(args.release)}"
64
+ init: bool | str = False
65
+ if args.init is None:
66
+ init = False
67
+ elif isinstance(args.init, bool):
68
+ init = args.init
69
+ elif isinstance(args.init, str):
70
+ init = args.init
71
+ return Args(
72
+ directory=Path(args.directory) if args.directory else None,
73
+ init=init,
74
+ just_compile=args.just_compile,
75
+ web=args.web,
76
+ interactive=args.interactive,
77
+ profile=args.profile,
78
+ force_compile=args.force_compile,
79
+ auto_update=not args.no_auto_updates,
80
+ update=args.update,
81
+ localhost=args.localhost,
82
+ build=args.build,
83
+ server=args.server,
84
+ purge=args.purge,
85
+ debug=args.debug,
86
+ quick=args.quick,
87
+ release=args.release,
88
+ ram_disk_size=args.ram_disk_size,
89
+ )