Skip to content

Commit 847a7f1

Browse files
Fix CI build and update pre-commit hooks (#421)
1 parent f9b581c commit 847a7f1

15 files changed

Lines changed: 42 additions & 57 deletions

.github/workflows/_build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
github.com:443
3838
objects.githubusercontent.com:443
3939
pypi.org:443
40+
raw.githubusercontent.com:443
4041
release-assets.githubusercontent.com:443
4142
4243
- name: Checkout repository

.github/workflows/_test_futures_private.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
github.com:443
5757
objects.githubusercontent.com:443
5858
pypi.org:443
59+
raw.githubusercontent.com:443
5960
release-assets.githubusercontent.com:443
6061
6162
- name: Checkout repository

.github/workflows/_test_futures_public.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
futures.kraken.com:443
4242
github.com:443
4343
objects.githubusercontent.com:443
44+
raw.githubusercontent.com:443
4445
release-assets.githubusercontent.com:443
4546
pypi.org:443
4647

.github/workflows/_test_spot_private.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
github.com:443
5757
objects.githubusercontent.com:443
5858
pypi.org:443
59+
raw.githubusercontent.com:443
5960
release-assets.githubusercontent.com:443
6061
ws-auth.kraken.com:443
6162
ws.kraken.com:443

.github/workflows/_test_spot_public.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
github.com:443
4343
objects.githubusercontent.com:443
4444
pypi.org:443
45+
raw.githubusercontent.com:443
4546
release-assets.githubusercontent.com:443
4647
ws.kraken.com:443
4748

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
repos:
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.14.6
10+
rev: v0.15.7
1111
hooks:
1212
- id: ruff-check
1313
args:
@@ -20,7 +20,7 @@ repos:
2020
# - --preview
2121
# - --exit-non-zero-on-fix
2222
- repo: https://github.com/pre-commit/mirrors-mypy
23-
rev: v1.18.2
23+
rev: v1.19.1
2424
hooks:
2525
- id: mypy
2626
name: mypy
@@ -31,11 +31,11 @@ repos:
3131
- --install-types
3232
- --non-interactive
3333
- repo: https://github.com/gitleaks/gitleaks
34-
rev: v8.29.1
34+
rev: v8.30.1
3535
hooks:
3636
- id: gitleaks
3737
- repo: https://github.com/codespell-project/codespell
38-
rev: v2.4.1
38+
rev: v2.4.2
3939
hooks:
4040
- id: codespell
4141
additional_dependencies: [tomli]
@@ -72,21 +72,21 @@ repos:
7272
- id: rst-inline-touching-normal
7373
- id: text-unicode-replacement-char
7474
- repo: https://github.com/psf/black
75-
rev: 25.11.0
75+
rev: 26.3.1
7676
hooks:
7777
- id: black
7878
- repo: https://github.com/rbubley/mirrors-prettier
79-
rev: v3.6.2
79+
rev: v3.8.1
8080
hooks:
8181
- id: prettier
8282
- repo: https://github.com/PyCQA/isort # TODO: remove as soon as ruff is stable
83-
rev: 7.0.0
83+
rev: 8.0.1
8484
hooks:
8585
- id: isort
8686
args:
8787
- --profile=black
8888
- repo: https://github.com/PyCQA/bandit
89-
rev: 1.9.1
89+
rev: 1.9.4
9090
hooks:
9191
- id: bandit
9292
exclude: "^tests/.*|examples/.*"

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
#
88

99
UV ?= uv
10-
PYTHON := python
11-
PYTEST := $(UV) run pytest
12-
PYTEST_OPTS := -vv --junit-xml=pytest.xml
13-
PYTEST_COV_OPTS := $(PYTEST_OPTS) --cov=kraken --cov-report=xml:coverage.xml --cov-report=term-missing --cov-report=html
14-
TEST_DIR := tests
10+
PYTHON ?= python
11+
PYTEST ?= $(UV) run pytest
12+
PYTEST_OPTS ?= -vv --junit-xml=pytest.xml
13+
PYTEST_COV_OPTS ?= $(PYTEST_OPTS) --cov=kraken --cov-report=xml:coverage.xml --cov-report=term-missing --cov-report=html
14+
TEST_DIR ?= tests
1515

1616
## ======= M A K E F I L E - T A R G E T S =====================================
1717
## help Show this help message
@@ -136,7 +136,8 @@ clean:
136136
dist/ \
137137
doc/_build \
138138
src/python_kraken_sdk.egg-info \
139-
build/
139+
build/ \
140+
htmlcov/
140141

141142
rm -f .coverage \
142143
*.csv \
@@ -146,7 +147,8 @@ clean:
146147
src/kraken/_version.py \
147148
mypy.xml \
148149
pytest.xml \
149-
tests/*.zip
150+
tests/*.zip \
151+
uv.lock
150152

151153
find tests -name "__pycache__" | xargs rm -rf
152154
find src -name "__pycache__" | xargs rm -rf

doc/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@
4141
# Add the package to sys.path:
4242
sys.path.insert(0, str(Path("..").resolve() / "src"))
4343

44-
rst_epilog = ""
4544
# Read link all targets from file
46-
with Path("links.rst").open(encoding="utf-8") as f:
47-
rst_epilog += f.read()
45+
rst_epilog = Path("links.rst").read_text(encoding="utf-8")
4846

4947

5048
def setup(app: Any) -> None: # noqa: ARG001,ANN401

examples/futures_ws_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ async def main() -> None:
102102
await asyncio.sleep(6)
103103
finally:
104104
# Close the sessions properly.
105-
for _client in clients:
106-
await _client.close()
105+
for open_client in clients:
106+
await open_client.close()
107107

108108

109109
if __name__ == "__main__":

examples/spot_ws_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ async def main() -> None:
115115
await asyncio.sleep(6)
116116
finally:
117117
# Stop the sessions properly.
118-
for _client in clients:
119-
await _client.close()
118+
for open_client in clients:
119+
await open_client.close()
120120

121121

122122
if __name__ == "__main__":

0 commit comments

Comments
 (0)