diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 2f841588..d87376e8 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -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: diff --git a/platformio/commands/settings.py b/platformio/commands/settings.py index 695d9020..d0d8258a 100644 --- a/platformio/commands/settings.py +++ b/platformio/commands/settings.py @@ -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) diff --git a/platformio/package/commands/uninstall.py b/platformio/package/commands/uninstall.py index 2808d491..37705055 100644 --- a/platformio/package/commands/uninstall.py +++ b/platformio/package/commands/uninstall.py @@ -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) diff --git a/platformio/package/commands/update.py b/platformio/package/commands/update.py index 8788f7b5..4f20fdfa 100644 --- a/platformio/package/commands/update.py +++ b/platformio/package/commands/update.py @@ -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 diff --git a/platformio/platform/factory.py b/platformio/platform/factory.py index 334888b5..42c3432b 100644 --- a/platformio/platform/factory.py +++ b/platformio/platform/factory.py @@ -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) diff --git a/platformio/project/config.py b/platformio/project/config.py index c583c0d2..82b76abf 100644 --- a/platformio/project/config.py +++ b/platformio/project/config.py @@ -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 diff --git a/platformio/project/helpers.py b/platformio/project/helpers.py index 4d153492..2732e6bd 100644 --- a/platformio/project/helpers.py +++ b/platformio/project/helpers.py @@ -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 diff --git a/platformio/project/integration/tpls/netbeans/nbproject/private/launcher.properties.tpl b/platformio/project/integration/tpls/netbeans/nbproject/private/launcher.properties.tpl index 6cc2127d..885a1547 100644 --- a/platformio/project/integration/tpls/netbeans/nbproject/private/launcher.properties.tpl +++ b/platformio/project/integration/tpls/netbeans/nbproject/private/launcher.properties.tpl @@ -17,7 +17,7 @@ # common.symbolFiles= # (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 diff --git a/platformio/util.py b/platformio/util.py index 3f8421c3..e0830a8d 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -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) diff --git a/tests/commands/pkg/test_install.py b/tests/commands/pkg/test_install.py index a1630a3d..3b4aac52 100644 --- a/tests/commands/pkg/test_install.py +++ b/tests/commands/pkg/test_install.py @@ -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( diff --git a/tests/package/test_manager.py b/tests/package/test_manager.py index fc210467..977cde9d 100644 --- a/tests/package/test_manager.py +++ b/tests/package/test_manager.py @@ -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