fastled 1.2.73__py3-none-any.whl → 1.2.74__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
@@ -13,7 +13,7 @@ from .types import BuildMode, CompileResult, CompileServerError
13
13
  # IMPORTANT! There's a bug in github which will REJECT any version update
14
14
  # that has any other change in the repo. Please bump the version as the
15
15
  # ONLY change in a commit, or else the pypi update and the release will fail.
16
- __version__ = "1.2.73"
16
+ __version__ = "1.2.74"
17
17
 
18
18
  DOCKER_FILE = (
19
19
  "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/Dockerfile"
fastled/docker_manager.py CHANGED
@@ -99,8 +99,35 @@ class Volume:
99
99
  return volumes
100
100
 
101
101
 
102
+ class PrintFilter:
103
+ """Provides filtering for text output so that source files match up with local names."""
104
+
105
+ def __init__(self) -> None:
106
+ pass
107
+
108
+ def _remove_ino_cpp(self, text: str) -> str:
109
+ return text.replace(".ino.cpp", ".ino")
110
+
111
+ def _filter_all(self, text: str) -> str:
112
+ text = self._remove_ino_cpp(text)
113
+ return text
114
+
115
+ def print(self, text: str | bytes) -> None:
116
+ """Prints the text to the console."""
117
+ if isinstance(text, bytes):
118
+ text = text.decode("utf-8")
119
+ text = self._filter_all(text)
120
+ print(text, end="")
121
+
122
+
102
123
  class RunningContainer:
103
- def __init__(self, container, first_run=False):
124
+ def __init__(
125
+ self,
126
+ container: Container,
127
+ first_run: bool = False,
128
+ filter: PrintFilter | None = None,
129
+ ) -> None:
130
+ self.filter = filter or PrintFilter()
104
131
  self.container = container
105
132
  self.first_run = first_run
106
133
  self.running = True
@@ -117,7 +144,8 @@ class RunningContainer:
117
144
  for log in self.container.logs(
118
145
  follow=False, since=from_date, until=to_date, stream=True
119
146
  ):
120
- print(log.decode("utf-8"), end="")
147
+ # print(log.decode("utf-8"), end="")
148
+ self.filter.print(log)
121
149
  time.sleep(0.1)
122
150
  from_date = to_date
123
151
  to_date = _utc_now_no_tz()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.2.73
3
+ Version: 1.2.74
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,11 +1,11 @@
1
- fastled/__init__.py,sha256=V6FNkUzqFflqcAs4j_8yIr1_pTGeotxzTIuecfDzXws,6770
1
+ fastled/__init__.py,sha256=iGQXCTJFerVAry3RqgCchfgZJ6cuL2Zu5BOsAiydjLY,6770
2
2
  fastled/app.py,sha256=vteMH0WvWGkQq-FR6SdAzqJcHqx0Gcj-aclXYZL7n5Q,4073
3
3
  fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
4
4
  fastled/cli_test.py,sha256=qJB9yLRFR3OwOwdIWSQ0fQsWLnA37v5pDccufiP_hTs,512
5
5
  fastled/client_server.py,sha256=eG82h-27Y40szCew976lv9I6bP-YxtRV6sFNDVNTapo,14525
6
6
  fastled/compile_server.py,sha256=rkXvrvdav5vDG8lv_OlBX3YSCHtnHMt25nXbfeg_r78,2960
7
7
  fastled/compile_server_impl.py,sha256=LnvxeSgBQ3lvey3_dz71UnJjCb5WTUQaPYtuSc1BMvo,10706
8
- fastled/docker_manager.py,sha256=ULtA3THPfaoz9QyoilI2Y67y6B3Ly7F7glP5Vuz1_TY,34698
8
+ fastled/docker_manager.py,sha256=TtIeu7osBuIBW9CcuDvv3KjFaLIu5lWWtd94fXkLJXc,35493
9
9
  fastled/filewatcher.py,sha256=3qS3L7zMQhFuVrkeGn1djsB_cB6x_E2YGJmmQWVAU_w,10033
10
10
  fastled/interactive_srcs.py,sha256=F5nHdJc60xsnmOtnKhngE9JytqGn56PmYw_MVSIX1ac,138
11
11
  fastled/keyboard.py,sha256=UTAsqCn1UMYnB8YDzENiLTj4GeL45tYfEcO7_5fLFEg,3556
@@ -34,9 +34,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
34
34
  fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
35
35
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
36
36
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
37
- fastled-1.2.73.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
38
- fastled-1.2.73.dist-info/METADATA,sha256=qvN0JAIPGX6FVEMBi1wqScmoGrmrnLCV6DpA8ib3Az8,22065
39
- fastled-1.2.73.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
40
- fastled-1.2.73.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
41
- fastled-1.2.73.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
42
- fastled-1.2.73.dist-info/RECORD,,
37
+ fastled-1.2.74.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
38
+ fastled-1.2.74.dist-info/METADATA,sha256=h4zIphh1RYBmcjFT2jcHR1UuP9jWYZ3knSEJk0XcBe0,22065
39
+ fastled-1.2.74.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
40
+ fastled-1.2.74.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
41
+ fastled-1.2.74.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
42
+ fastled-1.2.74.dist-info/RECORD,,