mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Fix typos discovered by codespell (#5078)
* Fix typos discovered by codespell * codespell-project/actions-codespell@v2
This commit is contained in:
4
.github/workflows/core.yml
vendored
4
.github/workflows/core.yml
vendored
@ -17,6 +17,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
|
|
||||||
|
- uses: codespell-project/actions-codespell@v2
|
||||||
|
with:
|
||||||
|
ignore_words_list: ans,homestate,ser
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
|
@ -76,5 +76,5 @@ def settings_set(ctx, name, value):
|
|||||||
@click.pass_context
|
@click.pass_context
|
||||||
def settings_reset(ctx):
|
def settings_reset(ctx):
|
||||||
app.reset_settings()
|
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)
|
ctx.invoke(settings_get)
|
||||||
|
@ -111,7 +111,7 @@ def uninstall_project_env_dependencies(project_env, options=None):
|
|||||||
uninstalled_conds.append(
|
uninstalled_conds.append(
|
||||||
_uninstall_project_env_custom_tools(project_env, options)
|
_uninstall_project_env_custom_tools(project_env, options)
|
||||||
)
|
)
|
||||||
# custom ibraries
|
# custom libraries
|
||||||
if options.get("libraries"):
|
if options.get("libraries"):
|
||||||
uninstalled_conds.append(
|
uninstalled_conds.append(
|
||||||
_uninstall_project_env_custom_libraries(project_env, options)
|
_uninstall_project_env_custom_libraries(project_env, options)
|
||||||
|
@ -110,7 +110,7 @@ def update_project_env_dependencies(project_env, options=None):
|
|||||||
# custom tools
|
# custom tools
|
||||||
if options.get("tools"):
|
if options.get("tools"):
|
||||||
updated_conds.append(_update_project_env_custom_tools(project_env, options))
|
updated_conds.append(_update_project_env_custom_tools(project_env, options))
|
||||||
# custom ibraries
|
# custom libraries
|
||||||
if options.get("libraries"):
|
if options.get("libraries"):
|
||||||
updated_conds.append(_update_project_env_custom_libraries(project_env, options))
|
updated_conds.append(_update_project_env_custom_libraries(project_env, options))
|
||||||
# declared dependencies
|
# declared dependencies
|
||||||
|
@ -33,7 +33,7 @@ class PlatformFactory:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def load_platform_module(name, path):
|
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
|
sys.modules["platformio.managers.platform"] = base
|
||||||
try:
|
try:
|
||||||
return load_python_module("platformio.platform.%s" % name, path)
|
return load_python_module("platformio.platform.%s" % name, path)
|
||||||
|
@ -347,7 +347,7 @@ class ProjectConfigBase:
|
|||||||
if section is None:
|
if section is None:
|
||||||
if option in self.BUILTIN_VARS:
|
if option in self.BUILTIN_VARS:
|
||||||
return self.BUILTIN_VARS[option]()
|
return self.BUILTIN_VARS[option]()
|
||||||
# SCons varaibles
|
# SCons variables
|
||||||
return f"${{{option}}}"
|
return f"${{{option}}}"
|
||||||
|
|
||||||
# handle system environment variables
|
# handle system environment variables
|
||||||
|
@ -158,7 +158,7 @@ def load_build_metadata(project_dir, env_or_envs, cache=False, build_type=None):
|
|||||||
return result or None
|
return result or None
|
||||||
|
|
||||||
|
|
||||||
# Backward compatibiility with dev-platforms
|
# Backward compatibility with dev-platforms
|
||||||
load_project_ide_data = load_build_metadata
|
load_project_ide_data = load_build_metadata
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# common.symbolFiles=<Symbol Files loaded by debugger>
|
# common.symbolFiles=<Symbol Files loaded by debugger>
|
||||||
# (This value is overwritten by a launcher specific symbolFiles value if the latter exists)
|
# (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
|
# ${PROJECT_DIR} - project directory absolute path
|
||||||
# ${OUTPUT_PATH} - linker output path (relative to project directory path)
|
# ${OUTPUT_PATH} - linker output path (relative to project directory path)
|
||||||
# ${OUTPUT_BASENAME}- linker output filename
|
# ${OUTPUT_BASENAME}- linker output filename
|
||||||
|
@ -65,16 +65,16 @@ class memoized:
|
|||||||
|
|
||||||
|
|
||||||
class throttle:
|
class throttle:
|
||||||
def __init__(self, threshhold):
|
def __init__(self, threshold):
|
||||||
self.threshhold = threshhold # milliseconds
|
self.threshold = threshold # milliseconds
|
||||||
self.last = 0
|
self.last = 0
|
||||||
|
|
||||||
def __call__(self, func):
|
def __call__(self, func):
|
||||||
@functools.wraps(func)
|
@functools.wraps(func)
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
diff = int(round((time.time() - self.last) * 1000))
|
diff = int(round((time.time() - self.last) * 1000))
|
||||||
if diff < self.threshhold:
|
if diff < self.threshold:
|
||||||
time.sleep((self.threshhold - diff) * 0.001)
|
time.sleep((self.threshold - diff) * 0.001)
|
||||||
self.last = time.time()
|
self.last = time.time()
|
||||||
return func(*args, **kwargs)
|
return func(*args, **kwargs)
|
||||||
|
|
||||||
|
@ -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.set("env:baremetal", "lib_deps", ["bblanchon/ArduinoJson@^5"])
|
||||||
config.save()
|
config.save()
|
||||||
result = clirunner.invoke(
|
result = clirunner.invoke(
|
||||||
|
@ -335,7 +335,7 @@ def test_symlink(tmp_path: Path):
|
|||||||
# uninstall
|
# uninstall
|
||||||
lm.uninstall("External")
|
lm.uninstall("External")
|
||||||
assert ["Installed"] == [pkg.metadata.name for pkg in lm.get_installed()]
|
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()
|
assert external_pkg_dir.is_dir()
|
||||||
|
|
||||||
# install again, remove from a disk
|
# install again, remove from a disk
|
||||||
|
Reference in New Issue
Block a user