Skip to content

Commit

Permalink
Add codespell config and add to pre-commit (#10893)
Browse files Browse the repository at this point in the history
Co-authored-by: Serina Grill <42048900+serinamarie@users.noreply.github.com>
  • Loading branch information
yarikoptic and serinamarie authored Nov 13, 2023
1 parent 610c099 commit 6d7acc7
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
skip = .git,*.pdf,*.svg,versioneer.py,package-lock.json,_vendor,*.css,.codespellrc
# from https://github.com/PrefectHQ/prefect/pull/10813#issuecomment-1732676130
ignore-regex = .*lazy=\"selectin\"|.*e import Bloc$|America/Nome
ignore-words-list = selectin,aci,wqs,aks,ines,dependant
check-hidden = true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2_ui_bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ body:

- type: checkboxes
attributes:
label: Browers
label: Browsers
description: Which browsers was this bug reproduced on? Please check if your issue is specific to your browser by testing on another browser.
options:
- label: Chrome
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/5_maintenance_ticket.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🛠️ Track a maintenence task
name: 🛠️ Track a maintenance task
description: These are for changes that are not user or product related for maintenance of this repository.
labels: ["maintenance"]
body:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

include:
# Include Docker image builds on the service test run, and disallow the test
# suite from building images automaticlly in fixtures
# suite from building images automatically in fixtures
- pytest-options: "--only-services"
build-docker-images: true

Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:

include:
# Include Docker image builds on the service test run, and disallow the test
# suite from building images automaticlly in fixtures
# suite from building images automatically in fixtures
- pytest-options: "--only-services"
build-docker-images: true

Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ repos:
- id: black
language_version: python3
args: ['--preview']
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
exclude: package-lock.json|_vendor/.*
2 changes: 1 addition & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extend-select = ["I"]
ignore = ["E501"]

[per-file-ignores]
# Do not inforce usage and import order rules in init files
# Do not enforce usage and import order rules in init files
"__init__.py" = ["E402", "F401", "I"]

# Do not fix import in compatibility module
Expand Down
2 changes: 1 addition & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ See implementation details in the following pull requests:

### Enabling Pydantic V2

In 2.13.5 we released experimental support for Pydantic V2, which made it co-installable via forced install. In this release, we are enabling co-installation by default which will allow you to leverage Pydantic V2 in your flows and tasks. Additionally, you can choose to update to Pydantic V2 on your own timeline as we maintain compatability with V1 within flows and tasks.
In 2.13.5 we released experimental support for Pydantic V2, which made it co-installable via forced install. In this release, we are enabling co-installation by default which will allow you to leverage Pydantic V2 in your flows and tasks. Additionally, you can choose to update to Pydantic V2 on your own timeline as we maintain compatibility with V1 within flows and tasks.

See implementation details in the following pull request:
- https://github.com/PrefectHQ/prefect/pull/10946
Expand Down
2 changes: 1 addition & 1 deletion client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ tests to ensure that the built `prefect-client` is functional.

In general, these builds, smoke tests, and publish steps should be transparent.
It these automated steps fail, use the `client/build_client.sh` script to run
the build and smoke test locally and interate on a fix. The failures will likely
the build and smoke test locally and iterate on a fix. The failures will likely
be from:

- including a new dependency that is not installed in `prefect-client`
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ruff
cairosvg
codespell
flaky
# Pin IPython to 8.12 when building on Python 3.8
# https://github.com/ipython/ipython/blob/main/README.rst
Expand Down
2 changes: 1 addition & 1 deletion src/prefect/_internal/pydantic/v2_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def create_v2_schema(name_: str, model_cfg: ConfigDict, **model_fields):
ref_template="#/definitions/{model}",
schema_generator=GenerateEmptySchemaForUserClasses,
)
# ensure backwards compatability by copying $defs into definitions
# ensure backwards compatibility by copying $defs into definitions
if "$defs" in schema:
schema["definitions"] = schema["$defs"]
return schema
2 changes: 1 addition & 1 deletion src/prefect/_internal/pytz.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This is a compatability module that allows us to drop our dependency on pytz in the mimimal prefect-client.
This is a compatibility module that allows us to drop our dependency on pytz in the minimal prefect-client.
All values here are taken from:
Expand Down
4 changes: 2 additions & 2 deletions tests/server/orchestration/test_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ async def cleanup(self, initial_state, validated_state, context):
before_transition_hook.assert_called_once()
if proposed_state_type is not None:
after_transition_hook.assert_not_called()
cleanup_hook.assert_called_once(), "Cleanup should be called when trasition is aborted"
cleanup_hook.assert_called_once(), "Cleanup should be called when transition is aborted"
else:
after_transition_hook.assert_called_once(), "Rule expected no transition"
cleanup_hook.assert_not_called()
Expand Down Expand Up @@ -1635,7 +1635,7 @@ async def cleanup(self, initial_state, validated_state, context):
before_transition_hook.assert_called_once()
if proposed_state_type is not None:
after_transition_hook.assert_not_called()
cleanup_hook.assert_called_once(), "Cleanup should be called when trasition is aborted"
cleanup_hook.assert_called_once(), "Cleanup should be called when transition is aborted"
else:
after_transition_hook.assert_called_once(), "Rule expected no transition"
cleanup_hook.assert_not_called()
Expand Down

0 comments on commit 6d7acc7

Please sign in to comment.