Skip to content

Commit 2ef7b7f

Browse files
[pre-commit.ci] pre-commit autoupdate (#493)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <[email protected]>
1 parent ca70ff1 commit 2ef7b7f

File tree

11 files changed

+14
-16
lines changed

11 files changed

+14
-16
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
- id: trailing-whitespace
2121

2222
- repo: https://github.com/python-jsonschema/check-jsonschema
23-
rev: 0.19.2
23+
rev: 0.21.0
2424
hooks:
2525
- id: check-github-workflows
2626

@@ -32,12 +32,12 @@ repos:
3232
[mdformat-gfm, mdformat-frontmatter, mdformat-footnote]
3333

3434
- repo: https://github.com/psf/black
35-
rev: 22.12.0
35+
rev: 23.1.0
3636
hooks:
3737
- id: black
3838

3939
- repo: https://github.com/charliermarsh/ruff-pre-commit
40-
rev: v0.0.237
40+
rev: v0.0.242
4141
hooks:
4242
- id: ruff
4343
args: ["--fix"]

jupyter_releaser/changelog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def get_version_entry(
116116

117117
entry = entry.splitlines()[2:]
118118

119-
for (ind, line) in enumerate(entry):
119+
for ind, line in enumerate(entry):
120120
# Look for a backport, either manual or automatic.
121121
match = re.search(r"Backport PR #(\d+) on branch", line)
122122
if match:
@@ -311,7 +311,7 @@ def splice_github_entry(orig_entry, github_entry):
311311
lut[pr] = title
312312

313313
lines = orig_entry.splitlines()
314-
for (ind, line) in enumerate(lines):
314+
for ind, line in enumerate(lines):
315315
match = re.match(cl_regex, line)
316316
if not match:
317317
continue

jupyter_releaser/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ def main(force):
314314

315315
def add_options(options):
316316
"""Add extracted common options to a click command"""
317+
317318
# https://stackoverflow.com/a/40195800
318319
def _add_options(func):
319320
for option in reversed(options):

jupyter_releaser/lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def publish_assets( # noqa
328328
"""Publish release asset(s)"""
329329
os.environ["NPM_REGISTRY"] = npm_registry
330330
os.environ["TWINE_REPOSITORY_URL"] = twine_repository_url
331-
twine_token = "" # noqa
331+
twine_token = ""
332332

333333
if len(glob(f"{dist_dir}/*.tgz")):
334334
npm.handle_npm_config(npm_token)

jupyter_releaser/npm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def extract_dist(dist_dir, target):
9292
def check_dist(dist_dir, install_options):
9393
"""Check npm dist file(s) in a dist dir"""
9494
with TemporaryDirectory() as td:
95-
9695
util.run("npm init -y", cwd=td, quiet=True)
9796
names = []
9897
staging = Path(td) / "staging"

jupyter_releaser/python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def check_dist(
6363
# run the test command in the venv
6464
with TemporaryDirectory() as td:
6565
env_path = util.normalize_path(osp.abspath(td))
66-
if os.name == "nt": # pragma: no cover
66+
if os.name == "nt": # noqa # pragma: no cover
6767
bin_path = f"{env_path}/Scripts/"
6868
else:
6969
bin_path = f"{env_path}/bin"

jupyter_releaser/tee.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def run(args: Union[str, List[str]], **kwargs: Any) -> CompletedProcess:
137137
quiet: False - Avoid printing output
138138
show_cwd: False - Prints the current working directory.
139139
"""
140-
if isinstance(args, str):
140+
if isinstance(args, str): # noqa
141141
cmd = args
142142
else:
143143
# run was called with a list instead of a single item but asyncio

jupyter_releaser/tests/test_cli.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,6 @@ def test_publish_release(npm_dist, runner, mocker, mock_github, draft_release):
680680

681681

682682
def test_config_file(py_package, runner, mocker, git_prep):
683-
684683
config = Path(util.CHECKOUT_NAME) / util.JUPYTER_RELEASER_CONFIG
685684
config_data = util.toml.loads(config.read_text(encoding="utf-8"))
686685
config_data["options"] = {"dist-dir": "foo"}
@@ -707,7 +706,6 @@ def wrapped(cmd, **kwargs):
707706

708707

709708
def test_config_file_env_override(py_package, runner, mocker, git_prep):
710-
711709
orig_run = util.run
712710
called = False
713711

jupyter_releaser/tests/util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ def get_log():
183183

184184
def create_python_package(git_repo, multi=False, not_matching_name=False):
185185
def write_files(git_repo, sub_packages=None, package_name="foo", module_name=None):
186-
187186
sub_packages = sub_packages or []
188187

189188
module_name = module_name or package_name

jupyter_releaser/util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ def bump_version(version_spec, *, changelog_path="", version_cmd=""): # noqa
277277

278278
# Add some convenience options on top of "tbump" and "hatch"
279279
if "tbump" in version_cmd or "hatch" in version_cmd:
280-
281280
v = parse_version(get_version())
282281
log(f"Current version was: {v}")
283282
assert isinstance(v, Version)

0 commit comments

Comments
 (0)