Skip to content

Commit 3390e69

Browse files
committed
add linting rules
1 parent 46f7389 commit 3390e69

File tree

6 files changed

+39
-16
lines changed

6 files changed

+39
-16
lines changed

.github/workflows/lint_custom_code.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
touch README-PYPI.md
30-
poetry install
30+
poetry install --all-extras
3131
3232
# The init, sdkhooks.py and types.py files in the _hooks folders are generated by Speakeasy hence the exclusion
3333
- name: Run all linters

.github/workflows/run_example_scripts.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
run: |
4848
PACKAGE="dist/$(ls dist | grep whl | head -n 1)"
4949
python3 -m pip install "$PACKAGE"
50-
./examples/run_all.sh --no-extra-dep
50+
./scripts/run_examples.sh --no-extra-dep
5151
env:
5252
MISTRAL_AGENT_ID: ${{ secrets.CI_AGENT_ID }}
5353
MISTRAL_API_KEY: ${{ env.MISTRAL_API_KEY }}
@@ -57,7 +57,7 @@ jobs:
5757
run: |
5858
PACKAGE="dist/$(ls dist | grep whl | head -n 1)[agents]"
5959
python3 -m pip install "$PACKAGE"
60-
./examples/run_all.sh
60+
./scripts/run_examples.sh
6161
env:
6262
MISTRAL_AGENT_ID: ${{ secrets.CI_AGENT_ID }}
6363
MISTRAL_API_KEY: ${{ env.MISTRAL_API_KEY }}

poetry.lock

Lines changed: 28 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pylint = "==3.2.3"
3434
pytest = "^8.2.2"
3535
pytest-asyncio = "^0.23.7"
3636
types-python-dateutil = "^2.9.0.20240316"
37+
types-authlib = "^1.5.0.20250516"
3738

3839
[tool.poetry.group.lint.dependencies]
3940
ruff = "^0.11.10"

scripts/lint_custom_code.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,26 @@ ERRORS=0
77
echo "Running mypy..."
88
# TODO: Uncomment once the examples are fixed
99
# poetry run mypy examples/ || ERRORS=1
10+
echo "-> running on extra"
1011
poetry run mypy src/mistralai/extra/ || ERRORS=1
12+
echo "-> running on hooks"
1113
poetry run mypy src/mistralai/_hooks/ \
1214
--exclude __init__.py --exclude sdkhooks.py --exclude types.py || ERRORS=1
1315

1416
echo "Running pyright..."
1517
# TODO: Uncomment once the examples are fixed
1618
# poetry run pyright examples/ || ERRORS=1
19+
echo "-> running on extra"
1720
poetry run pyright src/mistralai/extra/ || ERRORS=1
21+
echo "-> running on hooks"
1822
poetry run pyright src/mistralai/_hooks/ || ERRORS=1
1923

2024
echo "Running ruff..."
25+
echo "-> running on examples"
2126
poetry run ruff check examples/ || ERRORS=1
27+
echo "-> running on extra"
2228
poetry run ruff check src/mistralai/extra/ || ERRORS=1
29+
echo "-> running on hooks"
2330
poetry run ruff check src/mistralai/_hooks/ \
2431
--exclude __init__.py --exclude sdkhooks.py --exclude types.py || ERRORS=1
2532

File renamed without changes.

0 commit comments

Comments
 (0)