diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.pre-commit-config.yaml b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.pre-commit-config.yaml index e456b9896..e00fcf85f 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.pre-commit-config.yaml +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.pre-commit-config.yaml @@ -18,13 +18,13 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.30.0 hooks: - id: check-dependabot - id: check-github-workflows - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.3 + rev: v0.8.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml index f09be6d50..22b0a85bf 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml @@ -53,8 +53,6 @@ target-version = "py39" [tool.ruff.lint] ignore = [ - "ANN101", # missing-type-self - "ANN102", # missing-type-cls "COM812", # missing-trailing-comma "ISC001", # single-line-implicit-string-concatenation ] diff --git a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/.pre-commit-config.yaml b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/.pre-commit-config.yaml index 869ab2492..1e260ebad 100644 --- a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/.pre-commit-config.yaml +++ b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/.pre-commit-config.yaml @@ -18,13 +18,13 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.30.0 hooks: - id: check-dependabot - id: check-github-workflows - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.3 + rev: v0.8.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] diff --git a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml index 4161643a4..4e1034325 100644 --- a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml +++ b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml @@ -70,8 +70,6 @@ target-version = "py39" [tool.ruff.lint] ignore = [ - "ANN101", # missing-type-self - "ANN102", # missing-type-cls "COM812", # missing-trailing-comma "ISC001", # single-line-implicit-string-concatenation ] diff --git a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/graphql-client.py b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/graphql-client.py index efdaa0c75..93cdd1699 100644 --- a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/graphql-client.py +++ b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/graphql-client.py @@ -5,7 +5,7 @@ import decimal import typing as t -import requests # noqa: TCH002 +import requests # noqa: TC002 from singer_sdk.streams import {{ cookiecutter.stream_type }}Stream {%- if cookiecutter.auth_method in ("OAuth2", "JWT") %} diff --git a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/rest-client.py b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/rest-client.py index 5eb38aaf0..0ca4bbb36 100644 --- a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/rest-client.py +++ b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/rest-client.py @@ -12,29 +12,29 @@ {% if cookiecutter.auth_method == "API Key" -%} from singer_sdk.authenticators import APIKeyAuthenticator from singer_sdk.helpers.jsonpath import extract_jsonpath -from singer_sdk.pagination import BaseAPIPaginator # noqa: TCH002 +from singer_sdk.pagination import BaseAPIPaginator # noqa: TC002 from singer_sdk.streams import {{ cookiecutter.stream_type }}Stream {% elif cookiecutter.auth_method == "Bearer Token" -%} from singer_sdk.authenticators import BearerTokenAuthenticator from singer_sdk.helpers.jsonpath import extract_jsonpath -from singer_sdk.pagination import BaseAPIPaginator # noqa: TCH002 +from singer_sdk.pagination import BaseAPIPaginator # noqa: TC002 from singer_sdk.streams import {{ cookiecutter.stream_type }}Stream {% elif cookiecutter.auth_method == "Basic Auth" -%} from requests.auth import HTTPBasicAuth from singer_sdk.helpers.jsonpath import extract_jsonpath -from singer_sdk.pagination import BaseAPIPaginator # noqa: TCH002 +from singer_sdk.pagination import BaseAPIPaginator # noqa: TC002 from singer_sdk.streams import {{ cookiecutter.stream_type }}Stream {% elif cookiecutter.auth_method == "Custom or N/A" -%} from singer_sdk.helpers.jsonpath import extract_jsonpath -from singer_sdk.pagination import BaseAPIPaginator # noqa: TCH002 +from singer_sdk.pagination import BaseAPIPaginator # noqa: TC002 from singer_sdk.streams import {{ cookiecutter.stream_type }}Stream {% elif cookiecutter.auth_method in ("OAuth2", "JWT") -%} from singer_sdk.helpers.jsonpath import extract_jsonpath -from singer_sdk.pagination import BaseAPIPaginator # noqa: TCH002 +from singer_sdk.pagination import BaseAPIPaginator # noqa: TC002 from singer_sdk.streams import {{ cookiecutter.stream_type }}Stream from {{ cookiecutter.library_name }}.auth import {{ cookiecutter.source_name }}Authenticator diff --git a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/sql-client.py b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/sql-client.py index 886b0d8f7..884ccb37f 100644 --- a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/sql-client.py +++ b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/sql-client.py @@ -7,7 +7,7 @@ import typing as t -import sqlalchemy # noqa: TCH002 +import sqlalchemy # noqa: TC002 from singer_sdk import SQLConnector, SQLStream diff --git a/cookiecutter/target-template/{{cookiecutter.target_id}}/.pre-commit-config.yaml b/cookiecutter/target-template/{{cookiecutter.target_id}}/.pre-commit-config.yaml index 86aedf0e9..891875e49 100644 --- a/cookiecutter/target-template/{{cookiecutter.target_id}}/.pre-commit-config.yaml +++ b/cookiecutter/target-template/{{cookiecutter.target_id}}/.pre-commit-config.yaml @@ -18,13 +18,13 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.30.0 hooks: - id: check-dependabot - id: check-github-workflows - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.3 + rev: v0.8.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] diff --git a/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml b/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml index 6074b71bc..45226d999 100644 --- a/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml +++ b/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml @@ -55,8 +55,6 @@ target-version = "py39" [tool.ruff.lint] ignore = [ - "ANN101", # missing-type-self - "ANN102", # missing-type-cls "COM812", # missing-trailing-comma "ISC001", # single-line-implicit-string-concatenation ] diff --git a/samples/sample_tap_dummy_json/.pre-commit-config.yaml b/samples/sample_tap_dummy_json/.pre-commit-config.yaml index 5cad9ea54..81c36bdd5 100644 --- a/samples/sample_tap_dummy_json/.pre-commit-config.yaml +++ b/samples/sample_tap_dummy_json/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-json exclude: | @@ -18,20 +18,20 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.6 + rev: 0.30.0 hooks: - id: check-dependabot - id: check-github-workflows - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.0 + rev: v0.8.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.1 + rev: v1.13.0 hooks: - id: mypy additional_dependencies: diff --git a/samples/sample_tap_dummy_json/tox.ini b/samples/sample_tap_dummy_json/tox.ini index 8b89a4ef1..90c122a54 100644 --- a/samples/sample_tap_dummy_json/tox.ini +++ b/samples/sample_tap_dummy_json/tox.ini @@ -2,18 +2,11 @@ [tox] envlist = py3{9,10,11,12,13} -isolated_build = true +requires = + tox>=4.19 [testenv] -allowlist_externals = poetry +deps = + pytest commands = - poetry install -v - poetry run pytest - -[testenv:pytest] -# Run the python tests. -# To execute, run `tox -e pytest` -envlist = py3{8,9,10,11,12,313} -commands = - poetry install -v - poetry run pytest + pytest {posargs}