Fix typos discovered by codespell (#5078)

* Fix typos discovered by codespell

* codespell-project/actions-codespell@v2
This commit is contained in:
Christian Clauss
2025-02-08 16:21:12 +01:00
committed by GitHub
parent 1be6e10f99
commit 4dc7ea5bd0
11 changed files with 17 additions and 13 deletions

View File

@ -17,6 +17,10 @@ jobs:
with:
submodules: "recursive"
- uses: codespell-project/actions-codespell@v2
with:
ignore_words_list: ans,homestate,ser
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:

View File

@ -76,5 +76,5 @@ def settings_set(ctx, name, value):
@click.pass_context
def settings_reset(ctx):
app.reset_settings()
click.secho("The settings have been reseted!", fg="green")
click.secho("The settings have been reset!", fg="green")
ctx.invoke(settings_get)

View File

@ -111,7 +111,7 @@ def uninstall_project_env_dependencies(project_env, options=None):
uninstalled_conds.append(
_uninstall_project_env_custom_tools(project_env, options)
)
# custom ibraries
# custom libraries
if options.get("libraries"):
uninstalled_conds.append(
_uninstall_project_env_custom_libraries(project_env, options)

View File

@ -110,7 +110,7 @@ def update_project_env_dependencies(project_env, options=None):
# custom tools
if options.get("tools"):
updated_conds.append(_update_project_env_custom_tools(project_env, options))
# custom ibraries
# custom libraries
if options.get("libraries"):
updated_conds.append(_update_project_env_custom_libraries(project_env, options))
# declared dependencies

View File

@ -33,7 +33,7 @@ class PlatformFactory:
@staticmethod
def load_platform_module(name, path):
# backward compatibiility with the legacy dev-platforms
# backward compatibility with the legacy dev-platforms
sys.modules["platformio.managers.platform"] = base
try:
return load_python_module("platformio.platform.%s" % name, path)

View File

@ -347,7 +347,7 @@ class ProjectConfigBase:
if section is None:
if option in self.BUILTIN_VARS:
return self.BUILTIN_VARS[option]()
# SCons varaibles
# SCons variables
return f"${{{option}}}"
# handle system environment variables

View File

@ -158,7 +158,7 @@ def load_build_metadata(project_dir, env_or_envs, cache=False, build_type=None):
return result or None
# Backward compatibiility with dev-platforms
# Backward compatibility with dev-platforms
load_project_ide_data = load_build_metadata

View File

@ -17,7 +17,7 @@
# common.symbolFiles=<Symbol Files loaded by debugger>
# (This value is overwritten by a launcher specific symbolFiles value if the latter exists)
#
# In runDir, symbolFiles and env fields you can use these macroses:
# In runDir, symbolFiles and env fields you can use these macros:
# ${PROJECT_DIR} - project directory absolute path
# ${OUTPUT_PATH} - linker output path (relative to project directory path)
# ${OUTPUT_BASENAME}- linker output filename

View File

@ -65,16 +65,16 @@ class memoized:
class throttle:
def __init__(self, threshhold):
self.threshhold = threshhold # milliseconds
def __init__(self, threshold):
self.threshold = threshold # milliseconds
self.last = 0
def __call__(self, func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
diff = int(round((time.time() - self.last) * 1000))
if diff < self.threshhold:
time.sleep((self.threshhold - diff) * 0.001)
if diff < self.threshold:
time.sleep((self.threshold - diff) * 0.001)
self.last = time.time()
return func(*args, **kwargs)

View File

@ -340,7 +340,7 @@ def test_remove_project_unused_libdeps(
),
]
# manually remove from cofiguration file
# manually remove from configuration file
config.set("env:baremetal", "lib_deps", ["bblanchon/ArduinoJson@^5"])
config.save()
result = clirunner.invoke(

View File

@ -335,7 +335,7 @@ def test_symlink(tmp_path: Path):
# uninstall
lm.uninstall("External")
assert ["Installed"] == [pkg.metadata.name for pkg in lm.get_installed()]
# ensure original package was not rmeoved
# ensure original package was not removed
assert external_pkg_dir.is_dir()
# install again, remove from a disk