Skip to content

Commit 205fbd6

Browse files
committed
Add Ruff formatting.
1 parent d4b3a2b commit 205fbd6

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
- name: Lint (ruff)
3939
run: uv run ruff check
4040

41+
- name: Lint (format)
42+
run: uv run ruff format --diff
4143

4244
- name: Type check (mypy)
4345
run: uv run mypy .

developer-notes/FUSEError Performance.ipynb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@
9090
" except FUSEErrorExt as exc:\n",
9191
" a += exc.errno\n",
9292
" except:\n",
93-
" print('This should not happen')\n",
93+
" print(\"This should not happen\")\n",
9494
" return a\n",
9595
"\n",
96+
"\n",
9697
"def test_int():\n",
9798
" a = 0\n",
9899
" for i in range(100):\n",
@@ -101,7 +102,7 @@
101102
" except FUSEErrorInt as exc:\n",
102103
" a += exc.errno\n",
103104
" except:\n",
104-
" print('This should not happen')\n",
105+
" print(\"This should not happen\")\n",
105106
" return a"
106107
]
107108
},
@@ -151,13 +152,16 @@
151152
"outputs": [],
152153
"source": [
153154
"cache = dict()\n",
155+
"\n",
156+
"\n",
154157
"def getError(errno):\n",
155158
" try:\n",
156159
" return cache[errno]\n",
157160
" except KeyError:\n",
158161
" cache[errno] = FUSEErrorExt(errno)\n",
159162
" return cache[errno]\n",
160-
" \n",
163+
"\n",
164+
"\n",
161165
"def test_ext_cached():\n",
162166
" a = 0\n",
163167
" for i in range(100):\n",
@@ -166,7 +170,7 @@
166170
" except FUSEErrorExt as exc:\n",
167171
" a += exc.errno\n",
168172
" except:\n",
169-
" print('This should not happen')\n",
173+
" print(\"This should not happen\")\n",
170174
" return a"
171175
]
172176
},
@@ -210,6 +214,7 @@
210214
"def handler(i):\n",
211215
" return getError(i)\n",
212216
"\n",
217+
"\n",
213218
"def test_ext_direct():\n",
214219
" a = 0\n",
215220
" for i in range(100):\n",

developer-notes/Namedtuple.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"outputs": [],
4747
"source": [
4848
"from collections import namedtuple\n",
49-
"InvalRequestTup = namedtuple('InvalRequestTup', [ 'inode', 'attr_only' ])"
49+
"\n",
50+
"InvalRequestTup = namedtuple(\"InvalRequestTup\", [\"inode\", \"attr_only\"])"
5051
]
5152
},
5253
{

0 commit comments

Comments
 (0)