Skip to content

Commit

Permalink
Fix typos discovered by codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Feb 24, 2024
1 parent 0d97975 commit 7cea706
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/beginning-pyscript.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
10 changes: 5 additions & 5 deletions docs/user-guide/dom.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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:

Expand Down
10 changes: 5 additions & 5 deletions docs/user-guide/plugins.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/running-offline.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 7cea706

Please sign in to comment.