From 7cea706f07f6c5ec2bfba932237639009ebcff16 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 24 Feb 2024 17:21:31 +0100 Subject: [PATCH] Fix typos discovered by codespell --- docs/beginning-pyscript.md | 2 +- docs/developers.md | 2 +- docs/user-guide/architecture.md | 4 ++-- docs/user-guide/configuration.md | 2 +- docs/user-guide/dom.md | 10 +++++----- docs/user-guide/plugins.md | 10 +++++----- docs/user-guide/running-offline.md | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/beginning-pyscript.md b/docs/beginning-pyscript.md index 9336a60..67dcc1c 100644 --- a/docs/beginning-pyscript.md +++ b/docs/beginning-pyscript.md @@ -177,7 +177,7 @@ behaviour we need to write some Python. Specifically, we need to define the ### main.py -The behaviour of the appication is defined in `main.py`. It looks like this: +The behaviour of the application is defined in `main.py`. It looks like this: ``` python linenums="1" title="main.py" import arrr diff --git a/docs/developers.md b/docs/developers.md index 0d7e617..c65bd0d 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -253,7 +253,7 @@ is through this environment that you contribute to PyScript. [discussions section](https://github.com/pyscript/pyscript/discussions) of our GitHub repository. -* Every Tusday is a community video call, the details of which are posted onto +* Every Tuesday is a community video call, the details of which are posted onto the discord server. Face to face technical discussions happen here. * Every two weeks, on a Thursday, is a PyScript FUN call, the details of which diff --git a/docs/user-guide/architecture.md b/docs/user-guide/architecture.md index 43e727d..313f8bf 100644 --- a/docs/user-guide/architecture.md +++ b/docs/user-guide/architecture.md @@ -70,7 +70,7 @@ PolyScript's capabilities, upon which PyScript is built, can be summarised as: * [Hooks](https://pyscript.github.io/polyscript/#hooks), called at clearly defined moments in the page lifecycle, provide a means of calling user defined functions to modify and enhance PolyScript's default behaviour. -* [Multipe interpreters](https://pyscript.github.io/polyscript/#interpreter-features) +* [Multiple interpreters](https://pyscript.github.io/polyscript/#interpreter-features) (in addition to Pyodide and MicroPython, PolyScript works with Lua and Ruby - although these are beyond the scope of this project). @@ -223,7 +223,7 @@ It includes many useful features: "pure Python wheel" error. There are plans afoot to make WASM a target in PyPI so packages with C - extenions are automatically compiled to WASM. + extensions are automatically compiled to WASM. ### MicroPython diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md index b8d63e1..ff5614b 100644 --- a/docs/user-guide/configuration.md +++ b/docs/user-guide/configuration.md @@ -180,7 +180,7 @@ Sometimes many resources are needed to be fetched from a single location and copied into the same directory on the file system. To aid readability and reduce repetition, the `files` option comes with a mini [templating language](https://en.wikipedia.org/wiki/Template_processor) -that allows re-usable placeholders to be defined between curly brackets (`{` +that allows reusable placeholders to be defined between curly brackets (`{` and `}`). When these placeholders are encountered in the `files` configuration, their name is replaced with their associated value. diff --git a/docs/user-guide/dom.md b/docs/user-guide/dom.md index 6299542..91a7526 100644 --- a/docs/user-guide/dom.md +++ b/docs/user-guide/dom.md @@ -72,7 +72,7 @@ equivalent values: `["hello", 1, 2, 3]`. ## PyDom The Standard Web APIs are massive and not always very user-friendly. `PyDom` is a -Python modue that exposes the power of the web with an easy and idiomatic Pythonic +Python module that exposes the power of the web with an easy and idiomatic Pythonic interface on top. While the [FFI](#ffi) interface described above focuses on giving full access to @@ -87,7 +87,7 @@ feature parity. On the contrary, it's intentionally small and focused on the mos use cases while still providing [a backdoor] access to the full JS API. `Pydom` draws inspiration from popular Python APIs/Libraries known to be friendly and -easy to learn, and other successful projects related the web as well (for isntance, +easy to learn, and other successful projects related the web as well (for instance, `JQuery` was a good source of inspiration). !!! warning @@ -103,7 +103,7 @@ easy to learn, and other successful projects related the web as well (for isntan * __`Element`:__ any component that is part of a web page. This is a rough abstraction of an [HTMLElement](https://developer.mozilla.org/en-US/docs/Glossary/Element). In general, -`pydom` elements always map to an underlying `HTML` `Element` in a we page +`pydom` elements always map to an underlying `HTML` `Element` in a web page * __`ElementCollection`:__ a collection of one or more `Elements`. It is a rough abstraction of a [HTMLCollection](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection). * __Querying:__ a method to query elements on a page based on a @@ -122,7 +122,7 @@ elements are always in sync and any change of state in one is reflect into the o #### Creating a new element New elements can be created by using the `pydom.create` method and passing the type of element -being crated. Here's an example of what it looks like: +being created. Here's an example of what it looks like: (To execute and explore the following code, click on the "load" button. The result will be conveniently displayed in the box on the below of the code example) @@ -166,7 +166,7 @@ requiring any extra logic from the user. #### Changing the element style Elements have a `style` attribute that can be used to change the element style rules. -The style attribyte can be used as a dictionary and, to set a style rule for the element, +The style attribute can be used as a dictionary and, to set a style rule for the element, simply set the correct key on the `.style` attribute. For instance, the following code changes the background color of the element just created in the example above: diff --git a/docs/user-guide/plugins.md b/docs/user-guide/plugins.md index f58e4a6..2381016 100644 --- a/docs/user-guide/plugins.md +++ b/docs/user-guide/plugins.md @@ -1,7 +1,7 @@ # Plugins -PyScript, like many other software plaforms, offers a Plugin API that can be used to extend its +PyScript, like many other software platforms, offers a Plugin API that can be used to extend its own functionality without the need to modify its own core. By using this API, users can add new features and distribute them as plugins. @@ -78,9 +78,9 @@ to run all the JavaScript code in your page, as well as to perform layout, reflo This means that long-running code or blocking calls can or will block the thread, leading to an unresponsive page and a bad user experience. * web workers: code executed in workers actually run on "background" threads. This means the code can perform -tasks without interfering with the user interface or other operations being perfomed in the main thread. While +tasks without interfering with the user interface or other operations being performed in the main thread. While this adds great flexibility it's important to understand that workers actually have limited capabilities when -comparing to code executed on the main thread. For instace, while PyScript offers a DOM API that actually can +comparing to code executed on the main thread. For instance, while PyScript offers a DOM API that actually can be used in web workers on the browser, by default, does not allow DOM operation in workers. So, in this case, if you just use `window` and `document` directly mapping the Javascript FFI provided directly by the interpreters we support (Pyodide and MicroPython). With that in mind, `from pyscript import window, document` will work and @@ -111,12 +111,12 @@ doing that. ### Lifecycle Events -During the execution of a PyScript application there are specfic events that capture the beginning +During the execution of a PyScript application there are specific events that capture the beginning or the end of specific stages. Here are the main lifecycle events of a PyScript Application: Every script or tag running through PyScript inevitably passes through some main or worker thread related tasks. -In both worlds (wither executing code in the main thread or on a web worker), the exact sequence of steps around code execution is the following: +In both worlds (whether executing code in the main thread or on a web worker), the exact sequence of steps around code execution is the following: * **ready** - the DOM recognized the special script or tag and the associated interpreter is ready to work. A *JS* callback might be useful to instrument the interpreter before anything else happens. * **before run** - there could be some *JS* code setup specific for the script on the main thread, or the worker. This is similar to a generic *setup* callback in tests. diff --git a/docs/user-guide/running-offline.md b/docs/user-guide/running-offline.md index d4d4395..7e96989 100644 --- a/docs/user-guide/running-offline.md +++ b/docs/user-guide/running-offline.md @@ -1,6 +1,6 @@ # Running PyScript Offline -Althought users will want to create and share PyScript apps on the internet, there are cases when user want to run PyScript applications offline, in an airgapped fashion. This means that both PyScript core and the interpreter used to run code need to be served with the application itself. In short, the 2 main explicit tasks needed to create an offline PyScript application are: +Although users will want to create and share PyScript apps on the internet, there are cases when user want to run PyScript applications offline, in an airgapped fashion. This means that both PyScript core and the interpreter used to run code need to be served with the application itself. In short, the 2 main explicit tasks needed to create an offline PyScript application are: * download and include PyScript core (`core.js`) * download and include the [Python] interpreters you want to use in your Application