Skip to content

Commit

Permalink
Format notebooks with ruff (#126)
Browse files Browse the repository at this point in the history
* Format notebooks with ruff

* Run lint fixes with ruff

---------

Co-authored-by: Jay Qi <[email protected]>
  • Loading branch information
jayqi and jayqi authored Aug 19, 2024
1 parent 2db369b commit e77348e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 deletions.
12 changes: 4 additions & 8 deletions docs/notebooks/attrs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,13 @@
],
"source": [
"import inspect\n",
"\n",
"import rich.syntax\n",
"\n",
"import erdantic.examples.attrs\n",
"\n",
"\n",
"rich.syntax.Syntax(\n",
" inspect.getsource(erdantic.examples.attrs), \n",
" \"python\",\n",
" theme=\"default\",\n",
" line_numbers=True\n",
" inspect.getsource(erdantic.examples.attrs), \"python\", theme=\"default\", line_numbers=True\n",
")"
]
},
Expand Down Expand Up @@ -461,7 +458,6 @@
"import erdantic as erd\n",
"from erdantic.examples.attrs import Party\n",
"\n",
"\n",
"diagram = erd.create(Party)\n",
"diagram"
]
Expand Down Expand Up @@ -600,7 +596,7 @@
}
],
"source": [
"diagram.models['erdantic.examples.attrs.Party']"
"diagram.models[\"erdantic.examples.attrs.Party\"]"
]
},
{
Expand Down Expand Up @@ -1102,7 +1098,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
16 changes: 7 additions & 9 deletions docs/notebooks/dataclasses.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,13 @@
],
"source": [
"import inspect\n",
"\n",
"import rich.syntax\n",
"\n",
"import erdantic.examples.dataclasses\n",
"\n",
"\n",
"rich.syntax.Syntax(\n",
" inspect.getsource(erdantic.examples.dataclasses), \n",
" \"python\",\n",
" theme=\"default\",\n",
" line_numbers=True\n",
" inspect.getsource(erdantic.examples.dataclasses), \"python\", theme=\"default\", line_numbers=True\n",
")"
]
},
Expand Down Expand Up @@ -459,7 +456,6 @@
"import erdantic as erd\n",
"from erdantic.examples.dataclasses import Party\n",
"\n",
"\n",
"diagram = erd.create(Party)\n",
"diagram"
]
Expand Down Expand Up @@ -598,7 +594,7 @@
}
],
"source": [
"diagram.models['erdantic.examples.dataclasses.Party']"
"diagram.models[\"erdantic.examples.dataclasses.Party\"]"
]
},
{
Expand Down Expand Up @@ -677,7 +673,9 @@
}
],
"source": [
"diagram.edges[\"erdantic.examples.dataclasses.Party-members-erdantic.examples.dataclasses.Adventurer\"]"
"diagram.edges[\n",
" \"erdantic.examples.dataclasses.Party-members-erdantic.examples.dataclasses.Adventurer\"\n",
"]"
]
},
{
Expand Down Expand Up @@ -1100,7 +1098,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
10 changes: 3 additions & 7 deletions docs/notebooks/pydantic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,13 @@
],
"source": [
"import inspect\n",
"\n",
"import rich.syntax\n",
"\n",
"import erdantic.examples.pydantic\n",
"\n",
"\n",
"rich.syntax.Syntax(\n",
" inspect.getsource(erdantic.examples.pydantic), \n",
" \"python\",\n",
" theme=\"default\",\n",
" line_numbers=True\n",
" inspect.getsource(erdantic.examples.pydantic), \"python\", theme=\"default\", line_numbers=True\n",
")"
]
},
Expand Down Expand Up @@ -451,7 +448,6 @@
"import erdantic as erd\n",
"from erdantic.examples.pydantic import Party\n",
"\n",
"\n",
"diagram = erd.create(Party)\n",
"diagram"
]
Expand Down Expand Up @@ -590,7 +586,7 @@
}
],
"source": [
"diagram.models['erdantic.examples.pydantic.Party']"
"diagram.models[\"erdantic.examples.pydantic.Party\"]"
]
},
{
Expand Down

0 comments on commit e77348e

Please sign in to comment.