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

Update precommit #1080

Merged
merged 2 commits into from
Dec 14, 2022
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
17 changes: 11 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
# Fix the node version to avoid a GLIBC error
# ref: https://stackoverflow.com/questions/71939099/bitbucket-pipeline-error-installing-pre-commit-ts-lint/71940852#71940852
default_language_version:
node: 16.14.2

repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
rev: v3.0.0-alpha.4
hooks:
- id: prettier
# Exclude the HTML, since it doesn't understand Jinja2
exclude: .+((\.html)|index\.(.+)\.css)$

- repo: https://github.com/psf/black
rev: 22.8.0
rev: 22.12.0
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-builtin-literals
- id: check-case-conflict
Expand All @@ -28,13 +33,13 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v2.38.2
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.19.1
rev: v1.19.7
hooks:
- id: djlint-jinja
types_or: ["html"]
2 changes: 1 addition & 1 deletion src/pydata_sphinx_theme/assets/scripts/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import "../styles/bootstrap.scss";
*/
function TriggerTooltip() {
var tooltipTriggerList = [].slice.call(
document.querySelectorAll('[data-bs-toggle="tooltip"]')
document.querySelectorAll('[data-bs-toggle="tooltip"]'),
);
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new Tooltip(tooltipTriggerEl, { delay: { show: 500, hide: 100 } });
Expand Down
10 changes: 5 additions & 5 deletions src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function scrollToActive() {
// Inspired on source of revealjs.com
let storedScrollTop = parseInt(
sessionStorage.getItem("sidebar-scroll-top"),
10
10,
);

if (!isNaN(storedScrollTop)) {
Expand Down Expand Up @@ -184,7 +184,7 @@ var findSearchInput = () => {
} else {
// must be at least one persistent form, use the first persistent one
form = document.querySelector(
"div:not(.search-button__search-container) > form.bd-search"
"div:not(.search-button__search-container) > form.bd-search",
);
}
return form.querySelector("input");
Expand Down Expand Up @@ -235,7 +235,7 @@ var addEventListenerForSearchKeyboard = () => {
toggleSearchField();
}
},
true
true,
);
};

Expand All @@ -247,7 +247,7 @@ var changeSearchShortcutKey = () => {
var isMac = window.navigator.platform.toUpperCase().indexOf("MAC") >= 0;
if (isMac) {
forms.forEach(
(f) => (f.querySelector("kbd.kbd-shortcut__modifier").innerText = "⌘")
(f) => (f.querySelector("kbd.kbd-shortcut__modifier").innerText = "⌘"),
);
}
};
Expand Down Expand Up @@ -331,7 +331,7 @@ if (themeSwitchBtns) {
const node = document.createElement("a");
node.setAttribute(
"class",
"list-group-item list-group-item-action py-1"
"list-group-item list-group-item-action py-1",
);
node.setAttribute("href", `${entry.url}${currentFilePath}`);
node.appendChild(span);
Expand Down
4 changes: 3 additions & 1 deletion src/pydata_sphinx_theme/assets/styles/content/_api.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ span.highlighted {

// the API selector
// from https://github.com/pradyunsg/furo/blob/main/src/furo/assets/styles/content/_api.sass#L6)
dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) {
dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(
.simple
) {
dd {
margin-left: 2rem;

Expand Down