Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#432)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Sewell <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and chrisjsewell authored Aug 3, 2022
1 parent 876edf3 commit 23385c2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
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:/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:/PyCQA/flake8
rev: 4.0.1
rev: 5.0.2
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]

- repo: https:/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

0 comments on commit 23385c2

Please sign in to comment.