fastled 1.3.22__py3-none-any.whl → 1.3.23__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.22"
4
+ __version__ = "1.3.23"
5
5
 
6
6
  __version_url_latest__ = "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/src/fastled/__version__.py"
fastled/string_diff.py CHANGED
@@ -21,6 +21,28 @@ def _filter_out_obvious_bad_choices(
21
21
  return filtered_list
22
22
 
23
23
 
24
+ def is_in_order_match(input_str: str, other: str) -> bool:
25
+ """
26
+ Check if the input string is an in-order match for any string in the list.
27
+ An in-order match means that the characters of the input string appear
28
+ in the same order in the string from the list, ignoring spaces in the input.
29
+ """
30
+
31
+ # Remove spaces from input string for matching
32
+ input_chars = [c for c in input_str if c != " "]
33
+ other_chars = list(other)
34
+ input_index = 0
35
+ other_index = 0
36
+ while input_index < len(input_chars) and other_index < len(other_chars):
37
+ if input_chars[input_index] == other_chars[other_index]:
38
+ input_index += 1
39
+ other_index += 1
40
+ # If we reached the end of the input string, it means all characters were found in order
41
+ if input_index == len(input_chars):
42
+ return True
43
+ return False
44
+
45
+
24
46
  # Returns the min distance strings. If there is a tie, it returns
25
47
  # all the strings that have the same min distance.
26
48
  # Returns a tuple of index and string.
@@ -46,6 +68,7 @@ def string_diff(
46
68
  if len(input_string) >= 3:
47
69
  string_list = _filter_out_obvious_bad_choices(input_string, string_list)
48
70
 
71
+ # Second filter: exact substring filtering if applicable
49
72
  is_substring = False
50
73
  for s in string_list:
51
74
  if input_string in s:
@@ -55,6 +78,16 @@ def string_diff(
55
78
  if is_substring:
56
79
  string_list = [s for s in string_list if input_string in s]
57
80
 
81
+ # Third filter: in order exact match filtering if applicable.
82
+ is_in_order = False
83
+ for s in string_list:
84
+ if is_in_order_match(input_string, s):
85
+ is_in_order = True
86
+ break
87
+
88
+ if is_in_order:
89
+ string_list = [s for s in string_list if is_in_order_match(input_string, s)]
90
+
58
91
  distances: list[float] = []
59
92
  for s in string_list:
60
93
  dist = fuzz.token_sort_ratio(normalize(input_string), normalize(s))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.3.22
3
+ Version: 1.3.23
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,5 +1,5 @@
1
1
  fastled/__init__.py,sha256=YLikXGRWKlKAqj7bpvGmJLejGTFF-FC1lv2z1jwRinA,6852
2
- fastled/__version__.py,sha256=_4AgBx0G-FHJeXJewp3u6XWWmAYOQfwJfMiH_LbBdY4,373
2
+ fastled/__version__.py,sha256=ALXVodnrtYYSoZq08TBimAepF68IgpMBVX9rfD4uo9Q,373
3
3
  fastled/app.py,sha256=zfSipnCZ6w9_aXCynGrqf7OE--mKzbhT0mEfCNW5XjA,5736
4
4
  fastled/args.py,sha256=d9CaarQ1yw7w0REwgrNQ78zOUQSk94fTXwXHtFZPTSY,3281
5
5
  fastled/cli.py,sha256=drgR2AOxVrj3QEz58iiKscYAumbbin2vIV-k91VCOAA,561
@@ -24,7 +24,7 @@ fastled/server_start.py,sha256=W9yKStkRlRNuXeV6j_6O7HjjFPyVLBHMcF9Uy2QjDWQ,479
24
24
  fastled/settings.py,sha256=dUVyJ8Mtprg0RwaS6oMWP8jBhr4C3R8fu4Hdx_Z1lCM,577
25
25
  fastled/sketch.py,sha256=Ftbh55Nt-p4hmPuPpj8Q9HrMzvnUazhoG_q9FHcxkns,3473
26
26
  fastled/spinner.py,sha256=VHxmvB92P0Z_zYxRajb5HiNmkHHvZ5dG7hKtZltzpcs,867
27
- fastled/string_diff.py,sha256=NbtYxvBFxTUdmTpMLizlgZj2ULJ-7etj72GBdWDTGws,2496
27
+ fastled/string_diff.py,sha256=dlhJCFHSiqW9GMByS2DFnguZ28387VNcFwR6zGVlKeU,3729
28
28
  fastled/types.py,sha256=ZDf1TbTT4XgA_pKIwr4JbkDB38_29ogSdDORjoT-zuY,1803
29
29
  fastled/util.py,sha256=TjhXbUNh4p2BGhNAldSeL68B7BBOjsWAXji5gy-vDEQ,1440
30
30
  fastled/version.py,sha256=TpBMiEVdO3_sUZEu6wmwN8Q4AgX2BiCxStCsnPKh6E0,1209
@@ -36,9 +36,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
36
36
  fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
37
37
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
38
38
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
39
- fastled-1.3.22.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
40
- fastled-1.3.22.dist-info/METADATA,sha256=qulriPCzgr67OuJOgOd3D0oNnPruOiIS4bqplSsRb8c,30811
41
- fastled-1.3.22.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
42
- fastled-1.3.22.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
43
- fastled-1.3.22.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
44
- fastled-1.3.22.dist-info/RECORD,,
39
+ fastled-1.3.23.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
40
+ fastled-1.3.23.dist-info/METADATA,sha256=S6ZuKwT1TyHB6cLXBhGpduA1YrPxdG5M3UYW5E15UqQ,30811
41
+ fastled-1.3.23.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
+ fastled-1.3.23.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
43
+ fastled-1.3.23.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
44
+ fastled-1.3.23.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5