Skip to content

update pre-commit hooks versions #4228

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

Merged
merged 1 commit into from
Nov 16, 2020
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
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ repos:
- id: end-of-file-fixer
- id: check-toml
- repo: https://github.com/nbQA-dev/nbQA
rev: 0.3.5
rev: 0.4.1
hooks:
- id: nbqa-black
additional_dependencies: [black==20.8b1]
- id: nbqa-isort
additional_dependencies: [isort==5.6.4]
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==2.7.4]
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.3
rev: v2.7.4
hooks:
- id: pyupgrade
args: [--py36-plus]
Expand Down
8 changes: 6 additions & 2 deletions docs/source/notebooks/lda-advi-aevb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,9 @@
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the trailing backslashes are necessary to retain validity of the in-line magic


Reply via ReviewNB

],
"source": [
"%time result_pymc3 = eval_lda(transform_pymc3, beta_pymc3, docs_te.toarray(), np.arange(100))\n",
"%time result_pymc3 = eval_lda(\\\n",
" transform_pymc3, beta_pymc3, docs_te.toarray(), np.arange(100)\\\n",
" )\n",
"print(\"Predictive log prob (pm3) = {}\".format(result_pymc3[\"lp\"]))"
]
},
Expand Down Expand Up @@ -750,7 +752,9 @@
" return thetas / thetas.sum(axis=1)[:, np.newaxis]\n",
"\n",
"\n",
"%time result_sklearn = eval_lda(transform_sklearn, beta_sklearn, docs_te.toarray(), np.arange(100))\n",
"%time result_sklearn = eval_lda(\\\n",
" transform_sklearn, beta_sklearn, docs_te.toarray(), np.arange(100)\\\n",
" )\n",
"print(\"Predictive log prob (sklearn) = {}\".format(result_sklearn[\"lp\"]))"
]
},
Expand Down
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
[tool.black]
line-length = 100

[tool.nbqa.config]
isort = "setup.cfg"
black = "pyproject.toml"

[tool.nbqa.mutate]
isort = 1
black = 1
pyupgrade = 1

[tool.nbqa.addopts]
isort = ["--treat-comment-as-code", "# %%"]
pyupgrade = ["--py36-plus"]