Skip to content
Closed
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
4 changes: 4 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jobs:
working-directory: src/${{ matrix.package }}
run: uv run --frozen pyright

- name: Run Ruff
uses: astral-sh/ruff-action@v1
src: src/${{ matrix.package }}

- name: Build package
working-directory: src/${{ matrix.package }}
run: uv build
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ Documentation improvements are always welcome:
- Include appropriate type definitions
- Add comments for complex logic

#### For Python based servers

- Use `uvx ruff check` to check your code
- Use `uvx ruff format` to automatically format your code

### Documentation
- Include a detailed README.md in your server directory
- Document all configuration options
Expand Down
23 changes: 23 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Set the maximum line length to 79.
fix = true
line-length = 79

[lint]
select = [
'F', # Pyflakes
'E', # pycodestyle (Error)
'I', # isort
'D', # pydocstyle
'UP', # pyupgrade
'YTT', # flake8-2020
'B', # flake8-bugbear
'T10', # flake8-debugger
'T20', # flake8-print
'C4', # flake8-comprehensions
'PYI006', # flake8-pyi
'PYI062', # flake8-pyi
'PYI063', # flake8-pyi
'PYI066', # flake8-pyi
]
ignore = ['D100', 'D104', 'D101', 'D102', 'D103', 'D105', 'D107', 'D205','D400', 'D401', 'D415', 'E501', 'B011', 'B028', 'B904']
flake8-quotes = {inline-quotes = 'single', multiline-quotes = 'double'}