Skip to content

Commit 11f4f92

Browse files
committed
add pre-commit hooks
1 parent 481f905 commit 11f4f92

File tree

6 files changed

+203
-176
lines changed

6 files changed

+203
-176
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ on:
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
10-
10+
1111
steps:
1212
- uses: actions/checkout@v3
13-
13+
1414
- name: Set up Python
1515
uses: actions/setup-python@v4
1616
with:
1717
python-version: '3.10'
18-
18+
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
2222
pip install build twine
23-
23+
2424
- name: Build and check package
2525
run: |
2626
python -m build
2727
twine check dist/*
28-
28+
2929
- name: Publish to PyPI
3030
if: startsWith(github.ref, 'refs/tags')
3131
uses: pypa/gh-action-pypi-publish@release/v1
3232
with:
33-
password: ${{ secrets.PYPI_API_TOKEN }}
33+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v3
18-
18+
1919
- name: Set up Python ${{ matrix.python-version }}
2020
uses: actions/setup-python@v4
2121
with:
2222
python-version: ${{ matrix.python-version }}
23-
23+
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
2727
python -m pip install -e ".[dev]"
28-
28+
2929
- name: Lint with flake8
3030
run: |
3131
flake8 camel_toolkits_mcp --count --select=E9,F63,F7,F82 --show-source --statistics
32-
32+
3333
- name: Format check with black
3434
run: |
3535
black --check camel_toolkits_mcp
36-
36+
3737
- name: Test with pytest
3838
run: |
39-
pytest tests/ --cov=camel_toolkits_mcp
39+
pytest tests/ --cov=camel_toolkits_mcp

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ wheels/
99
# Virtual environments
1010
.venv
1111

12-
.python-version
12+
.python-version

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/psf/black
11+
rev: 24.3.0
12+
hooks:
13+
- id: black
14+
language_version: python3

0 commit comments

Comments
 (0)