From aa2a036bd3d15e45f6dd3a2647ed4d67c184a8c3 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 10 Jul 2024 08:43:35 -1000 Subject: [PATCH 1/3] Add rudimentary codespell config --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 12534cfc..70939b19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -223,3 +223,10 @@ concurrency = [ [tool.coverage.html] show_contexts = true + +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git*,*.svg,*.lock' +check-hidden = true +ignore-regex = '\bTE\b' +# ignore-words-list = '' From 77f7c3d0afe0c2bd8a57c2d0787a2705f2a748ea Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 10 Jul 2024 08:43:35 -1000 Subject: [PATCH 2/3] Add pre-commit definition for codespell --- .pre-commit-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b06a468d..554f9a50 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,6 +69,15 @@ repos: hooks: - id: flake8 + # Lint: Typos + - repo: https://github.com/codespell-project/codespell + # Configuration for codespell is in pyproject.toml + rev: v2.2.6 + hooks: + - id: codespell + additional_dependencies: + - tomli + # pre-commit.ci config reference: https://pre-commit.ci/#configuration ci: autoupdate_schedule: monthly From b381a39198d9e68b6d5ce799c180f16b1c432a3e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 10 Jul 2024 08:51:11 -1000 Subject: [PATCH 3/3] [DATALAD RUNCMD] run codespell throughout fixing typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- docs/source/server-process.md | 2 +- jupyter_server_proxy/handlers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/server-process.md b/docs/source/server-process.md index 92a3a661..6915a769 100644 --- a/docs/source/server-process.md +++ b/docs/source/server-process.md @@ -162,7 +162,7 @@ One of: Whether to report activity from the proxy to Jupyter Server. If _True_, Jupyter Server will be notified of new activity. This is primarily used by JupyterHub for idle detection and culling. -Useful if you want to have a seperate way of determining activity through a +Useful if you want to have a separate way of determining activity through a proxied application. Defaults to _True_. diff --git a/jupyter_server_proxy/handlers.py b/jupyter_server_proxy/handlers.py index 965603f5..266b0d61 100644 --- a/jupyter_server_proxy/handlers.py +++ b/jupyter_server_proxy/handlers.py @@ -441,7 +441,7 @@ def rewrite_pe(rewritable_response: RewritableResponse): }, ) - # Now we can cleanly apply the partially evaulated function to a copy of + # Now we can cleanly apply the partially evaluated function to a copy of # the rewritten response. rewritten_response = rewritten_response._apply_to_copy(rewrite_pe)