fastled 1.4.47__py3-none-any.whl → 1.4.48__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 +1 -1
- fastled/select_sketch_directory.py +40 -0
- {fastled-1.4.47.dist-info → fastled-1.4.48.dist-info}/METADATA +1 -1
- {fastled-1.4.47.dist-info → fastled-1.4.48.dist-info}/RECORD +8 -8
- {fastled-1.4.47.dist-info → fastled-1.4.48.dist-info}/WHEEL +0 -0
- {fastled-1.4.47.dist-info → fastled-1.4.48.dist-info}/entry_points.txt +0 -0
- {fastled-1.4.47.dist-info → fastled-1.4.48.dist-info}/licenses/LICENSE +0 -0
- {fastled-1.4.47.dist-info → fastled-1.4.48.dist-info}/top_level.txt +0 -0
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.4.
|
4
|
+
__version__ = "1.4.48"
|
5
5
|
|
6
6
|
__version_url_latest__ = "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/src/fastled/__version__.py"
|
@@ -1,6 +1,8 @@
|
|
1
1
|
from pathlib import Path
|
2
2
|
from typing import Callable, TypeVar, Union
|
3
3
|
|
4
|
+
from fastled.string_diff import string_diff
|
5
|
+
|
4
6
|
T = TypeVar("T")
|
5
7
|
|
6
8
|
|
@@ -82,6 +84,44 @@ def _disambiguate_user_choice(
|
|
82
84
|
0, # Reset default to first match
|
83
85
|
)
|
84
86
|
|
87
|
+
# Try fuzzy matching as fallback
|
88
|
+
# For better fuzzy matching on paths, extract just the last component (basename)
|
89
|
+
# to avoid the "examples/" prefix interfering with matching
|
90
|
+
from pathlib import Path as PathLib
|
91
|
+
|
92
|
+
option_basenames = []
|
93
|
+
for option in options:
|
94
|
+
option_str = option_to_str(option)
|
95
|
+
# Extract basename for fuzzy matching
|
96
|
+
basename = (
|
97
|
+
PathLib(option_str).name
|
98
|
+
if "/" in option_str or "\\" in option_str
|
99
|
+
else option_str
|
100
|
+
)
|
101
|
+
option_basenames.append(basename)
|
102
|
+
|
103
|
+
fuzzy_results = string_diff(user_input, option_basenames)
|
104
|
+
|
105
|
+
if fuzzy_results:
|
106
|
+
# Map fuzzy results back to original options
|
107
|
+
fuzzy_matches = []
|
108
|
+
for _, matched_basename in fuzzy_results:
|
109
|
+
for i, basename in enumerate(option_basenames):
|
110
|
+
if basename == matched_basename:
|
111
|
+
fuzzy_matches.append(options[i])
|
112
|
+
break
|
113
|
+
|
114
|
+
if len(fuzzy_matches) == 1:
|
115
|
+
return fuzzy_matches[0]
|
116
|
+
elif len(fuzzy_matches) > 1:
|
117
|
+
# Recursive disambiguation with fuzzy matches
|
118
|
+
return _disambiguate_user_choice(
|
119
|
+
fuzzy_matches,
|
120
|
+
option_to_str,
|
121
|
+
f"Multiple fuzzy matches for '{user_input}':",
|
122
|
+
0,
|
123
|
+
)
|
124
|
+
|
85
125
|
# No match found
|
86
126
|
print(f"No match found for '{user_input}'. Please try again.")
|
87
127
|
return _disambiguate_user_choice(options, option_to_str, prompt, default_index)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
fastled/__init__.py,sha256=LlLu9fO3O4FeB5-wt2wHGIFJW76H9FlhdABytEqg8A4,7717
|
2
2
|
fastled/__main__.py,sha256=OcKv2ER1_iQAsZzLIUb3C8hRC9L2clNOhCrjpshrlf4,336
|
3
|
-
fastled/__version__.py,sha256=
|
3
|
+
fastled/__version__.py,sha256=SLVJ_TBg3tmwNO6Yov63ku2msPOpWoM7q9i5p6f9iCk,373
|
4
4
|
fastled/app.py,sha256=0XQhzrbekSyZPYnNzeBWEtkrnYo_gMRKxcZI_Zo6G-M,7557
|
5
5
|
fastled/args.py,sha256=Xa7AYnoMcsuSVQUyM6M2P_8liQtQFJzuuBdPbfw9U-g,4786
|
6
6
|
fastled/cli.py,sha256=drgR2AOxVrj3QEz58iiKscYAumbbin2vIV-k91VCOAA,561
|
@@ -23,7 +23,7 @@ fastled/parse_args.py,sha256=a3eqbtYBsuGKXD-179bHtS7L5aWVVh5kLuZwkJAgY48,14814
|
|
23
23
|
fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
|
24
24
|
fastled/print_filter.py,sha256=cUgi7bd48Jv48QfJ6OrMdNwTB4eM0-hQBrSLj0Ymh-M,1551
|
25
25
|
fastled/project_init.py,sha256=z_0FV6_FfccftLzLRpk-r7A1_x3dpJBhe06ztGBXwLw,4030
|
26
|
-
fastled/select_sketch_directory.py,sha256=
|
26
|
+
fastled/select_sketch_directory.py,sha256=RanHtaSApZkuVQUmC4tTFaHRAYlFVKUJE8zeKp2ornw,5009
|
27
27
|
fastled/server_flask.py,sha256=HA0Pqkrr7OZn5TgMjykskXYrB-ACFd9sw7ND1L4RW-Y,17132
|
28
28
|
fastled/server_start.py,sha256=W9yKStkRlRNuXeV6j_6O7HjjFPyVLBHMcF9Uy2QjDWQ,479
|
29
29
|
fastled/settings.py,sha256=8RLN3S0ZK4DMphr0gKPfwPKfwIzOtHiQsqMTpGnX7Xg,1842
|
@@ -52,9 +52,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
|
|
52
52
|
fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
|
53
53
|
fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
|
54
54
|
fastled/test/examples.py,sha256=M0o-5NIhCuwcUHo7CPQw5llLd3OU3FfPgussVScd8Fs,1741
|
55
|
-
fastled-1.4.
|
56
|
-
fastled-1.4.
|
57
|
-
fastled-1.4.
|
58
|
-
fastled-1.4.
|
59
|
-
fastled-1.4.
|
60
|
-
fastled-1.4.
|
55
|
+
fastled-1.4.48.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
56
|
+
fastled-1.4.48.dist-info/METADATA,sha256=6ReilLU96hCVqQKhPC1JOeSDtwc7uurbyg855i7ex8k,32476
|
57
|
+
fastled-1.4.48.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
58
|
+
fastled-1.4.48.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
|
59
|
+
fastled-1.4.48.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
|
60
|
+
fastled-1.4.48.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|