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

[pre-commit.ci] pre-commit autoupdate #432

Merged
merged 5 commits into from
Aug 3, 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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
- uses: pre-commit/[email protected]

tests:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v2.34.0
rev: v2.37.3
hooks:
- id: pyupgrade
args: [--py37-plus]
Expand All @@ -36,13 +36,13 @@ repos:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 5.0.2
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961
rev: v0.971
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
Expand Down
3 changes: 2 additions & 1 deletion myst_nb/core/loggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def process(self, msg, kwargs):
for keyword in self.KEYWORDS:
if keyword in kwargs:
kwargs["extra"][keyword] = kwargs.pop(keyword)
return f"{msg} [{self.extra['type']}{subtype}]", kwargs
etype = "" if not self.extra else self.extra.get("type", "")
return f"{msg} [{etype}{subtype}]", kwargs


class DocutilsLogHandler(logging.Handler):
Expand Down
2 changes: 1 addition & 1 deletion myst_nb/ext/glue/crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ReplacePendingGlueReferences(SphinxPostTransform):
def apply(self, **kwargs):
"""Apply the transform."""
cache_folder = self.env.mystnb_config.output_folder # type: ignore
bname = self.app.builder.name # type: ignore
bname = self.app.builder.name
priority_list = get_mime_priority(
bname, self.config["nb_mime_priority_overrides"]
)
Expand Down
2 changes: 1 addition & 1 deletion myst_nb/sphinx_.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def run(self, **kwargs: Any) -> None:
"""Run the transform."""
# get priority list for this builder
# TODO allow for per-notebook/cell priority dicts?
bname = self.app.builder.name # type: ignore
bname = self.app.builder.name
priority_list = get_mime_priority(
bname, self.config["nb_mime_priority_overrides"]
)
Expand Down