Skip to content

Commit 407ff72

Browse files
committed
remove test code
1 parent ba79474 commit 407ff72

File tree

1 file changed

+0
-97
lines changed

1 file changed

+0
-97
lines changed

docs/user_guide/02_hybrid_queries.ipynb

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,103 +1467,6 @@
14671467
"# Cleanup\n",
14681468
"index.delete()"
14691469
]
1470-
},
1471-
{
1472-
"cell_type": "code",
1473-
"execution_count": null,
1474-
"metadata": {},
1475-
"outputs": [],
1476-
"source": [
1477-
"from enum import Enum\n",
1478-
"\n",
1479-
"class Inclusive(str, Enum):\n",
1480-
" \"\"\"Enumeration for distance aggregation methods.\"\"\"\n",
1481-
"\n",
1482-
" BOTH = \"both\"\n",
1483-
" \"\"\"Inclusive of both sides of range (default)\"\"\"\n",
1484-
" NEITHER = \"neither\"\n",
1485-
" \"\"\"Inclusive of neither side of range\"\"\"\n",
1486-
" LEFT = \"left\"\n",
1487-
" \"\"\"Inclusive of only left\"\"\"\n",
1488-
" RIGHT = \"right\"\n",
1489-
" \"\"\"Inclusive of only right\"\"\"\n",
1490-
"\n",
1491-
"def my_fn(value: Inclusive) -> str:\n",
1492-
" return Inclusive(value).value"
1493-
]
1494-
},
1495-
{
1496-
"cell_type": "code",
1497-
"execution_count": 24,
1498-
"metadata": {},
1499-
"outputs": [
1500-
{
1501-
"data": {
1502-
"text/plain": [
1503-
"['both', 'neither', 'left', '']"
1504-
]
1505-
},
1506-
"execution_count": 24,
1507-
"metadata": {},
1508-
"output_type": "execute_result"
1509-
}
1510-
],
1511-
"source": [
1512-
"list(e.value for e in Inclusive)"
1513-
]
1514-
},
1515-
{
1516-
"cell_type": "code",
1517-
"execution_count": null,
1518-
"metadata": {},
1519-
"outputs": [
1520-
{
1521-
"data": {
1522-
"text/plain": [
1523-
"mappingproxy({'BOTH': <Inclusive.BOTH: 'both'>,\n",
1524-
" 'NEITHER': <Inclusive.NEITHER: 'neither'>,\n",
1525-
" 'LEFT': <Inclusive.LEFT: 'left'>,\n",
1526-
" 'RIGHT': <Inclusive.RIGHT: ''>})"
1527-
]
1528-
},
1529-
"execution_count": 22,
1530-
"metadata": {},
1531-
"output_type": "execute_result"
1532-
}
1533-
],
1534-
"source": [
1535-
"Inclusive."
1536-
]
1537-
},
1538-
{
1539-
"cell_type": "code",
1540-
"execution_count": 10,
1541-
"metadata": {},
1542-
"outputs": [
1543-
{
1544-
"ename": "ValueError",
1545-
"evalue": "'not' is not a valid Inclusive",
1546-
"output_type": "error",
1547-
"traceback": [
1548-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
1549-
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
1550-
"Cell \u001b[0;32mIn[10], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mInclusive\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnot\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n",
1551-
"File \u001b[0;32m~/.pyenv/versions/3.11.9/lib/python3.11/enum.py:714\u001b[0m, in \u001b[0;36mEnumType.__call__\u001b[0;34m(cls, value, names, module, qualname, type, start, boundary)\u001b[0m\n\u001b[1;32m 689\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 690\u001b[0m \u001b[38;5;124;03mEither returns an existing member, or creates a new enum class.\u001b[39;00m\n\u001b[1;32m 691\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 711\u001b[0m \u001b[38;5;124;03m`type`, if set, will be mixed in as the first base class.\u001b[39;00m\n\u001b[1;32m 712\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 713\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m names \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m: \u001b[38;5;66;03m# simple value lookup\u001b[39;00m\n\u001b[0;32m--> 714\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mcls\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[38;5;21;43m__new__\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mcls\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 715\u001b[0m \u001b[38;5;66;03m# otherwise, functional API: we're creating a new Enum type\u001b[39;00m\n\u001b[1;32m 716\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m_create_(\n\u001b[1;32m 717\u001b[0m value,\n\u001b[1;32m 718\u001b[0m names,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 723\u001b[0m boundary\u001b[38;5;241m=\u001b[39mboundary,\n\u001b[1;32m 724\u001b[0m )\n",
1552-
"File \u001b[0;32m~/.pyenv/versions/3.11.9/lib/python3.11/enum.py:1137\u001b[0m, in \u001b[0;36mEnum.__new__\u001b[0;34m(cls, value)\u001b[0m\n\u001b[1;32m 1135\u001b[0m ve_exc \u001b[38;5;241m=\u001b[39m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m%r\u001b[39;00m\u001b[38;5;124m is not a valid \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m%\u001b[39m (value, \u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__qualname__\u001b[39m))\n\u001b[1;32m 1136\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m result \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m exc \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m-> 1137\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m ve_exc\n\u001b[1;32m 1138\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m exc \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 1139\u001b[0m exc \u001b[38;5;241m=\u001b[39m \u001b[38;5;167;01mTypeError\u001b[39;00m(\n\u001b[1;32m 1140\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124merror in \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m._missing_: returned \u001b[39m\u001b[38;5;132;01m%r\u001b[39;00m\u001b[38;5;124m instead of None or a valid member\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 1141\u001b[0m \u001b[38;5;241m%\u001b[39m (\u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m, result)\n\u001b[1;32m 1142\u001b[0m )\n",
1553-
"\u001b[0;31mValueError\u001b[0m: 'not' is not a valid Inclusive"
1554-
]
1555-
}
1556-
],
1557-
"source": [
1558-
"Inclusive(\"not\")"
1559-
]
1560-
},
1561-
{
1562-
"cell_type": "code",
1563-
"execution_count": null,
1564-
"metadata": {},
1565-
"outputs": [],
1566-
"source": []
15671470
}
15681471
],
15691472
"metadata": {

0 commit comments

Comments
 (0)