Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up ruff pre-commit checks to operate on notebooks #352

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
hooks:
# Run the linter
- id: ruff
args: ["--fix", "--output-format=full"]
types_or: [ python, pyi, jupyter ]
args: [ --fix ]
# Run the formatter
- id: ruff-format
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
hooks:
- id: nbqa-ruff
types_or: [ python, pyi, jupyter ]
- repo: https://github.com/econchick/interrogate
rev: 1.7.0
hooks:
Expand Down
3 changes: 2 additions & 1 deletion docs/source/notebooks/did_pymc_banks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
" # rename to meaningful variables\n",
" .rename(columns={\"bib6\": \"Sixth District\", \"bib8\": \"Eighth District\"})\n",
" # reduce from daily resolution to examine median banks open by year\n",
" .groupby(\"year\").median()\n",
" .groupby(\"year\")\n",
" .median()\n",
")\n",
"\n",
"treatment_time = 1930.5\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks/did_skl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
}
],
"source": [
"fig, ax = result.plot();"
"fig, ax = result.plot()"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/source/notebooks/generate_plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
}
],
"source": [
"fig, ax = result.plot();"
"fig, ax = result.plot()"
]
},
{
Expand Down Expand Up @@ -1000,7 +1000,7 @@
}
],
"source": [
"fig, ax = result.plot();"
"fig, ax = result.plot()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks/its_skl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
}
],
"source": [
"fig, ax = result.plot();"
"fig, ax = result.plot()"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/source/notebooks/rd_pymc_drinking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
}
],
"source": [
"fig, ax = result.plot();"
"fig, ax = result.plot()"
]
},
{
Expand Down Expand Up @@ -413,7 +413,7 @@
" treatment_threshold=21,\n",
")\n",
"\n",
"fig, ax = result2.plot();"
"fig, ax = result2.plot()"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/source/notebooks/rd_skl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
}
],
"source": [
"fig, ax = result.plot();"
"fig, ax = result.plot()"
]
},
{
Expand Down Expand Up @@ -354,7 +354,7 @@
}
],
"source": [
"fig, ax = result.plot();"
"fig, ax = result.plot()"
]
},
{
Expand Down
1,080 changes: 540 additions & 540 deletions docs/source/quasi_dags.ipynb

Large diffs are not rendered by default.

Loading