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 suggestions #787

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -25,14 +25,14 @@ repos:
# args: [--in-place, --wrap-summaries=120, --wrap-descriptions=120]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies: [tomli]
#args: ["--write-changes"] # uncomment if you want to get automatic fixing

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.4.2
hooks:
- id: black
name: Black code
Expand All @@ -46,7 +46,7 @@ repos:
- mdformat_frontmatter

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.5.0
hooks:
- id: ruff
args: ["--fix"]
1 change: 1 addition & 0 deletions papermill/abs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for working with Azure blob storage"""

import io
import re

Expand Down
1 change: 1 addition & 0 deletions papermill/adl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for working with Azure data lake storage"""

import re

from azure.datalake.store import core, lib
Expand Down
5 changes: 2 additions & 3 deletions papermill/engines.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Engines to perform different roles"""

import datetime
import sys
from functools import wraps
Expand Down Expand Up @@ -169,9 +170,7 @@ def autosave_cell(self):
# Autosave is taking too long, so exponentially back off.
self.autosave_cell_every *= 2
logger.warning(
"Autosave too slow: {:.2f} sec, over {}% limit. Backing off to {} sec".format(
save_elapsed, self.max_autosave_pct, self.autosave_cell_every
)
f"Autosave too slow: {save_elapsed:.2f} sec, over {self.max_autosave_pct}% limit. Backing off to {self.autosave_cell_every} sec"
)

@catch_nb_assignment
Expand Down
1 change: 1 addition & 0 deletions papermill/inspection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Deduce parameters of a notebook from the parameters cell."""

from pathlib import Path

import click
Expand Down
1 change: 1 addition & 0 deletions papermill/log.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sets up a logger"""

import logging

logger = logging.getLogger('papermill')
1 change: 1 addition & 0 deletions papermill/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models used by papermill."""

from collections import namedtuple

Parameter = namedtuple(
Expand Down
Loading