Skip to content

Commit 3534cfe

Browse files
committed
add parenthesis
1 parent e117041 commit 3534cfe

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

nbdev/serve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def proc_nbs(
7070
chk_mtime = max(cfg.config_file.stat().st_mtime, Path(__file__).stat().st_mtime)
7171
cache.mkdir(parents=True, exist_ok=True)
7272
cache_mtime = cache.stat().st_mtime
73-
if force or (cache.exists and cache_mtime<chk_mtime): rmtree(cache)
73+
if force or (cache.exists() and cache_mtime<chk_mtime): rmtree(cache)
7474

7575
files = files.map(_proc_file, mtime=cache_mtime, cache=cache, path=path).filter()
7676
kw = {} if IN_NOTEBOOK else {'method':'spawn'}

nbs/api/17_serve.ipynb

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
{
1515
"cell_type": "code",
16-
"execution_count": null,
16+
"execution_count": 1,
1717
"id": "f305fea5",
1818
"metadata": {},
1919
"outputs": [],
@@ -23,7 +23,7 @@
2323
},
2424
{
2525
"cell_type": "code",
26-
"execution_count": null,
26+
"execution_count": 2,
2727
"id": "6899a335",
2828
"metadata": {},
2929
"outputs": [],
@@ -45,7 +45,7 @@
4545
},
4646
{
4747
"cell_type": "code",
48-
"execution_count": null,
48+
"execution_count": 3,
4949
"id": "32c11e55",
5050
"metadata": {},
5151
"outputs": [],
@@ -56,7 +56,7 @@
5656
},
5757
{
5858
"cell_type": "code",
59-
"execution_count": null,
59+
"execution_count": 4,
6060
"id": "65766a33",
6161
"metadata": {},
6262
"outputs": [],
@@ -79,7 +79,7 @@
7979
},
8080
{
8181
"cell_type": "code",
82-
"execution_count": null,
82+
"execution_count": 5,
8383
"id": "abc3835a",
8484
"metadata": {},
8585
"outputs": [],
@@ -104,7 +104,7 @@
104104
},
105105
{
106106
"cell_type": "code",
107-
"execution_count": null,
107+
"execution_count": 6,
108108
"id": "8b3b08f7",
109109
"metadata": {},
110110
"outputs": [],
@@ -120,7 +120,7 @@
120120
},
121121
{
122122
"cell_type": "code",
123-
"execution_count": null,
123+
"execution_count": 7,
124124
"id": "14463227",
125125
"metadata": {},
126126
"outputs": [],
@@ -146,7 +146,7 @@
146146
" chk_mtime = max(cfg.config_file.stat().st_mtime, Path(__file__).stat().st_mtime)\n",
147147
" cache.mkdir(parents=True, exist_ok=True)\n",
148148
" cache_mtime = cache.stat().st_mtime\n",
149-
" if force or (cache.exists and cache_mtime<chk_mtime): rmtree(cache)\n",
149+
" if force or (cache.exists() and cache_mtime<chk_mtime): rmtree(cache)\n",
150150
"\n",
151151
" files = files.map(_proc_file, mtime=cache_mtime, cache=cache, path=path).filter()\n",
152152
" kw = {} if IN_NOTEBOOK else {'method':'spawn'}\n",
@@ -157,7 +157,7 @@
157157
},
158158
{
159159
"cell_type": "code",
160-
"execution_count": null,
160+
"execution_count": 8,
161161
"id": "1745c2c3",
162162
"metadata": {},
163163
"outputs": [],
@@ -176,7 +176,7 @@
176176
},
177177
{
178178
"cell_type": "code",
179-
"execution_count": null,
179+
"execution_count": 9,
180180
"id": "04dd6d30",
181181
"metadata": {},
182182
"outputs": [],
@@ -196,9 +196,21 @@
196196
],
197197
"metadata": {
198198
"kernelspec": {
199-
"display_name": "python3",
199+
"display_name": "Python 3 (ipykernel)",
200200
"language": "python",
201201
"name": "python3"
202+
},
203+
"language_info": {
204+
"codemirror_mode": {
205+
"name": "ipython",
206+
"version": 3
207+
},
208+
"file_extension": ".py",
209+
"mimetype": "text/x-python",
210+
"name": "python",
211+
"nbconvert_exporter": "python",
212+
"pygments_lexer": "ipython3",
213+
"version": "3.10.12"
202214
}
203215
},
204216
"nbformat": 4,

0 commit comments

Comments
 (0)