Add spaces around "=" in signature repr.
PEP8 indicates (correctly, IMO) that when an annotation is present, the
signature should include spaces around the equal sign, i.e.
def f(x: int = 1): ...
instead of
def f(x: int=1): ...
(in the latter case the equal appears to bind to the type, not to the
argument).
pybind11 signatures always includes a type annotation so we can always
add the spaces.
diff --git a/tests/test_stl.py b/tests/test_stl.py
index fbf95ff..422b02c 100644
--- a/tests/test_stl.py
+++ b/tests/test_stl.py
@@ -164,7 +164,7 @@
m.stl_pass_by_pointer() # default value is `nullptr`
assert msg(excinfo.value) == """
stl_pass_by_pointer(): incompatible function arguments. The following argument types are supported:
- 1. (v: List[int]=None) -> List[int]
+ 1. (v: List[int] = None) -> List[int]
Invoked with:
""" # noqa: E501 line too long
@@ -173,7 +173,7 @@
m.stl_pass_by_pointer(None)
assert msg(excinfo.value) == """
stl_pass_by_pointer(): incompatible function arguments. The following argument types are supported:
- 1. (v: List[int]=None) -> List[int]
+ 1. (v: List[int] = None) -> List[int]
Invoked with: None
""" # noqa: E501 line too long