diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 47cc4f8..b574a1e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4.2.2 - uses: actions/setup-python@v5.4.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4149d91..2281060 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4.2.2 - uses: actions/setup-python@v5.4.0 with: - python-version: ">=3.12" + python-version: ">=3.13" - run: | pip install -r requirements-poetry.txt git tag $(poetry version --short) diff --git a/.mergify.yml b/.mergify.yml index 8c40cc8..4a00fd4 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -9,6 +9,7 @@ queue_rules: - check-success=Test with Python 3.10 - check-success=Test with Python 3.11 - check-success=Test with Python 3.12 + - check-success=Test with Python 3.13 - "#approved-reviews-by>=1" - "#changes-requested-reviews-by=0" - "#review-threads-unresolved=0" diff --git a/pyproject.toml b/pyproject.toml index 358687a..3f1f859 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database", @@ -58,7 +59,7 @@ filterwarnings = ["error"] [tool.ruff] line-length = 88 indent-width = 4 -target-version = "py312" +target-version = "py313" [tool.ruff.lint] preview = true diff --git a/sql_compare/__init__.py b/sql_compare/__init__.py index 7ae7080..c7c1370 100644 --- a/sql_compare/__init__.py +++ b/sql_compare/__init__.py @@ -109,7 +109,7 @@ def is_comment(self) -> bool: return isinstance(self.token_list, sqlparse.sql.Comment) @property - def tokens(self) -> Generator[Token | TokenList, None, None]: + def tokens(self) -> Generator[Token | TokenList]: """Yield relevant tokens in a deterministic order.""" for token in self.token_list.tokens: if token.is_group: @@ -167,7 +167,7 @@ def is_unordered(token_list: sqlparse.sql.TokenList, statement_type: str) -> boo ) @property - def tokens(self) -> Generator[Token | TokenList, None, None]: + def tokens(self) -> Generator[Token | TokenList]: """Yield relevant tokens in a deterministic order.""" filtered_tokens = [t for t in self.flatten_tokens if not t.ignore] @@ -186,7 +186,7 @@ def tokens(self) -> Generator[Token | TokenList, None, None]: yield from sorted_tokens @property - def flatten_tokens(self) -> Generator[Token, None, None]: + def flatten_tokens(self) -> Generator[Token]: """Yield all tokens in the token tree.""" yield from (Token(t) for t in self.token_list.flatten())