Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codespell: config, workflow + some typos fixed #121

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = .git,*.pdf,*.svg
ignore-words-list = falsy
19 changes: 19 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ chevron supports lambdas
import chevron

def first(text, render):
# return only first occurance of items
# return only first occurrence of items
result = render(text)
return [ x.strip() for x in result.split(" || ") if x.strip() ][0]

Expand Down
6 changes: 3 additions & 3 deletions chevron/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _get_key(key, scopes, warn, keep, def_ldel, def_rdel):
# Loop through the scopes
for scope in scopes:
try:
# For every dot seperated key
# For every dot separated key
for child in key.split('.'):
# Move into the scope
try:
Expand Down Expand Up @@ -185,7 +185,7 @@ def render(template='', data={}, partials_path='.', partials_ext='mustache',
A string containing the rendered template.
"""

# If the template is a seqeuence but not derived from a string
# If the template is a sequence but not derived from a string
if isinstance(template, Sequence) and \
not isinstance(template, string_type):
# Then we don't need to tokenize it
Expand Down Expand Up @@ -371,7 +371,7 @@ def render(template='', data={}, partials_path='.', partials_ext='mustache',
# then remove the spaces from the end
part_out = part_out.rstrip(' \t')

# Add the partials output to the ouput
# Add the partials output to the output
if python3:
output += part_out
else: # python 2
Expand Down