diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..82766e8 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +skip = .git,*.pdf,*.svg +ignore-words-list = falsy diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..243ba8c --- /dev/null +++ b/.github/workflows/codespell.yml @@ -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 diff --git a/README.md b/README.md index 8c9de75..d63492d 100644 --- a/README.md +++ b/README.md @@ -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] diff --git a/chevron/renderer.py b/chevron/renderer.py index 65a00f6..7c8db35 100644 --- a/chevron/renderer.py +++ b/chevron/renderer.py @@ -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: @@ -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 @@ -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