Skip to content
This repository was archived by the owner on Aug 12, 2026. It is now read-only.

Commit b4ff5ab

Browse files
authored
Don't indent end-of-file marker (#60)
* Run inspect.cleandoc on source code for add_method
1 parent 3fd163b commit b4ff5ab

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

toltec/hooks/install_lib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
methods and add them to scripts if found.
66
"""
77

8+
import inspect
89
import logging
910

1011
from typing import Set, Iterable
@@ -20,7 +21,7 @@
2021
def add_method(name: str, src: str, *depends: Iterable[str]) -> None:
2122
"""Add a method to be automatically added to scripts that use it"""
2223
METHODS[name] = (
23-
src,
24+
inspect.cleandoc(src),
2425
depends,
2526
)
2627

0 commit comments

Comments
 (0)