Skip to content

Commit 72b4466

Browse files
committed
chore: Template upgrade
1 parent d1899ec commit 72b4466

File tree

7 files changed

+32
-15
lines changed

7 files changed

+32
-15
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier.
2-
_commit: 1.8.4
2+
_commit: 1.8.7
33
_src_path: gh:pawamoy/copier-uv
44
author_email: [email protected]
55
author_fullname: Timothée Mazzucotelli

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# the `make` command will point at the `scripts/make` shell script.
33
# This Makefile is just here to allow auto-completion in the terminal.
44

5-
# The first target in the makefile is the default goal when no targets are specified.
6-
# Having "help:" here above without any rule (nothing to do specified with a tab)
7-
# only adds dependencies to that target, that is defined through "$(actions):".
8-
# .DEFAULT_GOAL is not necessary here, but is really explicit about what is going on.
9-
help:
10-
.DEFAULT_GOAL: help
5+
default: help
6+
@echo
7+
@echo 'Enable direnv in your shell to use the `make` command: `direnv allow`'
8+
@echo 'Or use `python scripts/make ARGS` to run the commands/tasks directly.'
9+
10+
.DEFAULT_GOAL: default
1111

1212
actions = \
1313
allrun \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![ci](https://github.com/mkdocstrings/griffe/workflows/ci/badge.svg)](https://github.com/mkdocstrings/griffe/actions?query=workflow%3Aci)
44
[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/griffe/)
55
[![pypi version](https://img.shields.io/pypi/v/griffe.svg)](https://pypi.org/project/griffe/)
6-
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#mkdocstrings_griffe:gitter.im)
6+
[![gitter](https://img.shields.io/badge/matrix-chat-4db798.svg?style=flat)](https://app.gitter.im/#/room/#mkdocstrings_griffe:gitter.im)
77

88
<img src="https://raw.githubusercontent.com/mkdocstrings/griffe/main/logo.svg" alt="Griffe logo, created by François Rozet" width="200" align="right">
99

scripts/get_version.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
from contextlib import suppress
55
from pathlib import Path
66

7-
from pdm.backend.hooks.version import SCMVersion, Version, default_version_formatter, get_version_from_scm
7+
from pdm.backend.hooks.version import ( # ty: ignore[unresolved-import]
8+
SCMVersion,
9+
Version,
10+
default_version_formatter,
11+
get_version_from_scm,
12+
)
813

914
_root = Path(__file__).parent.parent
1015
_changelog = _root / "CHANGELOG.md"

scripts/make.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,19 +277,31 @@ def main(args: list[str]) -> int:
277277
cmd = args.pop(0)
278278

279279
if cmd == "run":
280-
run(*args)
280+
if not args:
281+
print("make: run: missing command", file=sys.stderr)
282+
return 1
283+
run("default", *args) # ty: ignore[missing-argument]
281284
return 0
282285

283286
if cmd == "multirun":
284-
multirun(*args)
287+
if not args:
288+
print("make: run: missing command", file=sys.stderr)
289+
return 1
290+
multirun(*args) # ty: ignore[missing-argument]
285291
return 0
286292

287293
if cmd == "allrun":
288-
allrun(*args)
294+
if not args:
295+
print("make: run: missing command", file=sys.stderr)
296+
return 1
297+
allrun(*args) # ty: ignore[missing-argument]
289298
return 0
290299

291300
if cmd.startswith("3."):
292-
run3x(cmd, *args)
301+
if not args:
302+
print("make: run: missing command", file=sys.stderr)
303+
return 1
304+
run(cmd, *args) # ty: ignore[missing-argument]
293305
return 0
294306

295307
opts = []

src/griffe/_internal/debug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def _get_debug_info() -> _Environment:
9191
interpreter_version=py_version,
9292
interpreter_path=sys.executable,
9393
platform=platform.platform(),
94-
variables=[_Variable(var, val) for var in variables if (val := os.getenv(var))],
94+
variables=[_Variable(var, val) for var in variables if (val := os.getenv(var))], # ty: ignore[invalid-argument-type]
9595
packages=[_Package(pkg, _get_version(pkg)) for pkg in packages],
9696
)
9797

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def _fixture_public_objects(public_api: griffe.Module) -> list[griffe.Object | g
9090
def _fixture_inventory() -> Inventory:
9191
inventory_file = Path(__file__).parent.parent / "site" / "objects.inv"
9292
if not inventory_file.exists():
93-
raise pytest.skip("The objects inventory is not available.")
93+
pytest.skip("The objects inventory is not available.") # ty: ignore[call-non-callable]
9494
with inventory_file.open("rb") as file:
9595
return Inventory.parse_sphinx(file)
9696

0 commit comments

Comments
 (0)