Skip to content

Commit

Permalink
use ruff for code fomatting
Browse files Browse the repository at this point in the history
  • Loading branch information
marph91 committed Aug 24, 2024
1 parent 80fbc77 commit 595edff
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ jobs:
- name: Install pip dependencies
run: pip install -r requirements-dev.txt
- name: Run linting
run: |
black --check .
flake8 .
mypy .
run: ./lint.sh
4 changes: 3 additions & 1 deletion joppy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ def modify_revision(self, id_: str, **data: dt.JoplinTypes) -> None:


class Search(ApiBase):
def search(self, **query: dt.JoplinTypes) -> Union[
def search(
self, **query: dt.JoplinTypes
) -> Union[
dt.DataList[dt.NoteData],
dt.DataList[dt.NotebookData],
dt.DataList[dt.ResourceData],
Expand Down
5 changes: 5 additions & 0 deletions lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

ruff check # ruff first, because it's fastest
flake8 .
mypy .
10 changes: 5 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# tests
coverage==7.5.4
coverage==7.6.1
requests==2.32.3
unittest-xml-reporting==3.2.0
xvfbwrapper==0.2.9
# linting
black==24.4.2
flake8==7.1.0
mypy==1.10.1
ruff==0.6.2
flake8==7.1.1
mypy==1.11.1
# TODO: Use "--install-types" when https://github.com/python/mypy/issues/10600 is solved.
types-requests==2.32.0.20240622
types-requests==2.32.0.20240712

0 comments on commit 595edff

Please sign in to comment.