Skip to content

Commit a28bf25

Browse files
committed
Fix type checking in config notebook
1 parent 7446be3 commit a28bf25

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

docs/examples/basic_examples/Configuring_QCoDeS.ipynb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,12 @@
553553
},
554554
{
555555
"cell_type": "code",
556-
"execution_count": 14,
556+
"execution_count": null,
557557
"metadata": {},
558558
"outputs": [],
559559
"source": [
560+
"if qc.config.current_config is None:\n",
561+
" raise RuntimeError(\"No current QCoDeS configuration is set.\")\n",
560562
"qc.config.current_config.core.loglevel = \"INFO\""
561563
]
562564
},
@@ -585,7 +587,7 @@
585587
},
586588
{
587589
"cell_type": "code",
588-
"execution_count": 16,
590+
"execution_count": null,
589591
"metadata": {},
590592
"outputs": [
591593
{
@@ -603,6 +605,8 @@
603605
}
604606
],
605607
"source": [
608+
"if qc.config.current_config is None:\n",
609+
" raise RuntimeError(\"No current QCoDeS configuration is set.\")\n",
606610
"qc.config.current_config.core.loglevel = \"YOLO\"\n",
607611
"qc.config.validate()\n",
608612
"# NOTE that you how have a broken config!"

0 commit comments

Comments
 (0)