Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ updates:
open-pull-requests-limit: 5
labels:
- "dependencies"
ignore:
# The [dev] black cap tracks the black rev pinned in
# .pre-commit-config.yaml, and the two move together by hand. A
# Dependabot bump of the cap alone splits CI from the local hook.
# Name-only on purpose: an update-types ignore is computed from the first
# X.Y.Z version in the requirement, and `>=24.0,<25.10` has none, so it
# would match nothing. Security updates are not blocked by it: in
# dependabot-core, IgnoreCondition#ignored_versions returns early for
# security_updates_only with just the explicit `versions`, and a
# name-only ignore has none. Black's security fixes since 25.9.0 need
# Python 3.10+, so a security PR for it is a decision about the 3.9
# floor and the hook rev, not a plain merge.
- dependency-name: "black"
Comment thread
hampsterx marked this conversation as resolved.
Resolved

# GitHub Actions used by the CI and publish workflows.
- package-ecosystem: "github-actions"
Expand Down
10 changes: 6 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Pre-commit hooks for snowflake-sql-api. Install with `pre-commit install`
# (the hook then runs on every commit); run the full set with
# `pre-commit run --all-files`. Hook versions track the `[dev]` floors in
# pyproject.toml.
# `pre-commit run --all-files`. The black rev is pinned to match the `[dev]`
# black cap in pyproject.toml (see its comment); the other revs are set here
# independently of the `[dev]` floors.
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.17
hooks:
- id: ruff-check

- repo: https://github.com/psf/black
# Last black that still runs on Python 3.9 (the project's runtime floor);
# 25.12.0+ require 3.10+. Kept in sync with the [dev] cap in pyproject.toml.
# Kept in sync with the [dev] cap in pyproject.toml (<25.10); move both
# together by hand. Stay on a black that runs on Python 3.9 (the project's
# runtime floor): 25.11.0 is the last one, 25.12.0+ require 3.10.
rev: 25.9.0
hooks:
- id: black
Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ dev = [
"pytest-asyncio>=0.21",
"respx>=0.20",
"ruff>=0.4",
# Capped below 25.10: 25.12.0+ drop Python 3.9, which the package still
# supports. Keeps CI and the pinned pre-commit hook on the same black.
"black>=24.0,<26.11",
# Capped below 25.10 so CI formats with the same black the pre-commit hook
# pins (rev 25.9.0 in .pre-commit-config.yaml). Move the two together by
# hand; Dependabot ignores black (.github/dependabot.yml). Keep the cap at
# or below 25.12 while Python 3.9 is supported: 25.12.0+ require 3.10, so
# a higher cap resolves a different black per interpreter.
"black>=24.0,<25.10",
"mypy>=1.8",
"build>=1.0",
"pre-commit>=3.5",
Expand Down
4 changes: 3 additions & 1 deletion tests/test_import_footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def exec_module(self, module):
sys.meta_path.insert(0, _Recorder())
import snowflake_sql_api # noqa: F401
print(",".join(sorted(set(attempted))))
""".format(forbidden=FORBIDDEN_ON_BARE_IMPORT)
""".format(
forbidden=FORBIDDEN_ON_BARE_IMPORT
)

_TIMING_SCRIPT = """
import time
Expand Down
Loading