Skip to content

Commit 7537ff8

Browse files
authored
ci: Create a workflow that runs ruff (#52)
1 parent f9e5fd3 commit 7537ff8

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.github/workflows/ruff.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://beta.ruff.rs
2+
name: ruff
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
jobs:
11+
ruff:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- run: pip install --user ruff
16+
- run: ruff --format=github .

pyproject.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,16 @@ exclude = '''
6868
select = ["I", "D", "N", "UP"]
6969
line-length = 88
7070

71-
ignore = ["D212", "D107", "D100", "D104", "D107", "N818", "D401", "D205"]
71+
ignore = [
72+
"D100", # Missing docstring in public module
73+
"D104", # Missing docstring in public package
74+
"D107", # Missing docstring in __init__
75+
"D205", # 1 blank line required between summary line and description
76+
"D212", # Multi-line docstring summary should start at the first line
77+
"N805", # First argument of a method should be named self
78+
"N818", # Exception name ... should be named with an Error suffix
79+
"UP035" # Typing deprecations
80+
]
7281

7382
exclude = [
7483
".bzr",

surrealdb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
"""
16-
from .ws import Surreal
1716
from .http import SurrealHTTP
17+
from .ws import Surreal
1818

1919
__all__ = ("Surreal", "SurrealHTTP")

0 commit comments

Comments
 (0)