diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000000..99b3dec599 --- /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@v2 diff --git a/docs/help.md b/docs/help.md index 6e5fe581f7..a6020b19cc 100644 --- a/docs/help.md +++ b/docs/help.md @@ -147,7 +147,7 @@ Here's what to have in mind and how to review a pull request: * Don't worry too much about things like commit message styles, I will squash and merge customizing the commit manually. -* Also don't worry about style rules, there are already automatized tools checking that. +* Also don't worry about style rules, there are already automated tools checking that. And if there's any other style or consistency need, I'll ask directly for that, or I'll add commits on top with the needed changes. diff --git a/docs/release-notes.md b/docs/release-notes.md index 6bc0741444..0845eadb07 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -247,7 +247,7 @@ * ⬆️ Upgrade Ruff and Black. PR [#968](https://github.com/tiangolo/sqlmodel/pull/968) by [@tiangolo](https://github.com/tiangolo). * ⬆ Bump tiangolo/issue-manager from 0.4.1 to 0.5.0. PR [#922](https://github.com/tiangolo/sqlmodel/pull/922) by [@dependabot[bot]](https://github.com/apps/dependabot). -* 📌 Pin typing-extensions in tests for compatiblity with Python 3.8, dirty-equals, Pydantic. PR [#965](https://github.com/tiangolo/sqlmodel/pull/965) by [@tiangolo](https://github.com/tiangolo). +* 📌 Pin typing-extensions in tests for compatibility with Python 3.8, dirty-equals, Pydantic. PR [#965](https://github.com/tiangolo/sqlmodel/pull/965) by [@tiangolo](https://github.com/tiangolo). * 👷 Update GitHub Actions to download and upload artifacts. PR [#936](https://github.com/tiangolo/sqlmodel/pull/936) by [@tiangolo](https://github.com/tiangolo). * 👷 Tweak CI for test-redistribute, add needed env vars for slim. PR [#929](https://github.com/tiangolo/sqlmodel/pull/929) by [@tiangolo](https://github.com/tiangolo). @@ -461,7 +461,7 @@ In the future SQLModel will include the standard default recommended packages, a ### Fixes * 🐛 Fix auto detecting and setting `nullable`, allowing overrides in field. PR [#423](https://github.com/tiangolo/sqlmodel/pull/423) by [@JonasKs](https://github.com/JonasKs) and [@br-follow](https://github.com/br-follow). -* ♻️ Update `expresion.py`, sync from Jinja2 template, implement `inherit_cache` to solve errors like: `SAWarning: Class SelectOfScalar will not make use of SQL compilation caching`. PR [#422](https://github.com/tiangolo/sqlmodel/pull/422) by [@tiangolo](https://github.com/tiangolo). +* ♻️ Update `expression.py`, sync from Jinja2 template, implement `inherit_cache` to solve errors like: `SAWarning: Class SelectOfScalar will not make use of SQL compilation caching`. PR [#422](https://github.com/tiangolo/sqlmodel/pull/422) by [@tiangolo](https://github.com/tiangolo). ### Docs diff --git a/docs_src/tutorial/insert/annotations/en/tutorial003.md b/docs_src/tutorial/insert/annotations/en/tutorial003.md index 8236078567..6e364d407b 100644 --- a/docs_src/tutorial/insert/annotations/en/tutorial003.md +++ b/docs_src/tutorial/insert/annotations/en/tutorial003.md @@ -6,7 +6,7 @@ 3. Use a `with` block to create a `Session` using the `engine`. - The new **sesion** will be assigned to the variable `session`. + The new **session** will be assigned to the variable `session`. And it will be automatically closed when the `with` block is finished. diff --git a/pyproject.toml b/pyproject.toml index 766b055819..20ab8b3b87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,3 +134,8 @@ known-third-party = ["sqlmodel", "sqlalchemy", "pydantic", "fastapi"] [tool.ruff.lint.pyupgrade] # Preserve types, even if a file imports `from __future__ import annotations`. keep-runtime-typing = true + +[tool.codespell] +skip = '.git,*.pdf,*.svg,*.drawio' +# Ines - name +ignore-words-list = 'ines,re-use,selectin' diff --git a/sqlmodel/sql/expression.py b/sqlmodel/sql/expression.py index f431747670..a099a115ed 100644 --- a/sqlmodel/sql/expression.py +++ b/sqlmodel/sql/expression.py @@ -48,7 +48,7 @@ _TypeEngineArgument = Union[Type[TypeEngine[_T]], TypeEngine[_T]] -# Redefine operatos that would only take a column expresion to also take the (virtual) +# Redefine operators that would only take a column expression to also take the (virtual) # types of Pydantic models, e.g. str instead of only Mapped[str].