fastled 1.2.98__py3-none-any.whl → 1.3.0__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/__init__.py CHANGED
@@ -14,7 +14,7 @@ from .types import BuildMode, CompileResult, CompileServerError, FileResponse
14
14
  # IMPORTANT! There's a bug in github which will REJECT any version update
15
15
  # that has any other change in the repo. Please bump the version as the
16
16
  # ONLY change in a commit, or else the pypi update and the release will fail.
17
- __version__ = "1.2.98"
17
+ __version__ = "1.3.0"
18
18
 
19
19
 
20
20
  class Api:
fastled/app.py CHANGED
@@ -51,6 +51,7 @@ def run_server(args: Args) -> int:
51
51
 
52
52
  def main() -> int:
53
53
  from fastled import __version__
54
+ from fastled.select_sketch_directory import select_sketch_directory
54
55
 
55
56
  args = parse_args()
56
57
  interactive: bool = args.interactive
@@ -70,14 +71,11 @@ def main() -> int:
70
71
  # then prompt the user for a sketch directory.
71
72
  # 2. Tell the user they can use --server --interactive to
72
73
  # skip this prompt.
73
-
74
- from fastled.select_sketch_directory import select_sketch_directory
75
-
76
74
  if interactive and cwd_looks_like_fastled_repo and directory is None:
77
75
  answer = input(
78
76
  "No sketch directory selected, would you like to select one? (y/n): "
79
77
  )
80
- if answer.lower() == "y":
78
+ if answer.lower()[:1] == "y" or answer.lower() == "":
81
79
  sketch_list: list[Path] = find_sketch_directories()
82
80
  if sketch_list:
83
81
  maybe_dir: str | None = select_sketch_directory(
@@ -109,12 +107,6 @@ def main() -> int:
109
107
  # print(f"Building Docker image at {project_root}")
110
108
  from fastled import Api
111
109
 
112
- # server = Docker.spawn_server_from_fastled_repo(
113
- # project_root=project_root,
114
- # interactive=interactive,
115
- # sketch_folder=directory,
116
- # )
117
- # assert isinstance(server, CompileServer)
118
110
  server: CompileServer = CompileServer(
119
111
  interactive=interactive,
120
112
  auto_updates=False,
fastled/cli.py CHANGED
@@ -3,14 +3,23 @@ Main entry point.
3
3
  """
4
4
 
5
5
  import multiprocessing
6
+ import os
6
7
  import sys
7
8
 
8
- from fastled.app import main as app_main
9
+
10
+ def run_app() -> int:
11
+ """Run the application."""
12
+ from fastled.app import main as app_main
13
+
14
+ return app_main()
9
15
 
10
16
 
11
17
  def main() -> int:
12
18
  """Main entry point for the template_python_cmd package."""
13
- return app_main()
19
+ if "--debug" in sys.argv:
20
+ # Debug mode
21
+ os.environ["FLASK_SERVER_LOGGING"] = "1"
22
+ return run_app()
14
23
 
15
24
 
16
25
  # Cli entry point for the pyinstaller generated exe