Skip to content

Commit

Permalink
Merge pull request #908 from cal-itp/gtfs_quality_check
Browse files Browse the repository at this point in the history
Gtfs quality check
  • Loading branch information
amandaha8 authored Sep 29, 2023
2 parents 4c7fe4e + 90f3f03 commit cada838
Show file tree
Hide file tree
Showing 2 changed files with 1,719 additions and 0 deletions.
151 changes: 151 additions & 0 deletions ah_starterkit/Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 12,
"id": "3423feb2-b10a-4573-9c51-d91c1bbc9bf3",
"metadata": {},
"outputs": [],
"source": [
"from typing import Literal, cast"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "e8758d7d-aaf3-4522-86eb-eb26d2d2596e",
"metadata": {},
"outputs": [],
"source": [
"hello_t = Literal['Hello there', 'Hello world']"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "10b142a1-a184-4cb4-9e26-f52aad555c0a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"typing.Literal['Hello there', 'Hello world']"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"hello_t"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "fcef3360-c76a-4340-a4b9-4c7857ff8a2f",
"metadata": {},
"outputs": [],
"source": [
"def verify(word: Literal['there', 'world']) -> hello_t:\n",
" a = cast(hello_t, word)\n",
" return a"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "c0a7c587-78b6-4939-a20c-9dcd087642ce",
"metadata": {},
"outputs": [],
"source": [
"a = verify('there')"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "88135247-761c-4e98-98ba-d0850c17dfc9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'there'"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "822bd804-c832-4bd6-b08a-ac4eaaa2c831",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'world'"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"verify('world')"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "997c2d77-c496-41d3-b6bc-5c61b46782ad",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'candy'"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"verify('candy')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit cada838

Please sign in to comment.