Skip to content

Commit 2b39339

Browse files
committed
optimize vertical space
1 parent a58b8b0 commit 2b39339

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

docs/examples/firstexample.py renamed to docs/examples/toy-example.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,22 @@
55

66

77
class MySpec(object):
8-
"""A hook specification namespace.
9-
"""
8+
"""A hook specification namespace."""
109
@hookspec
1110
def myhook(self, arg1, arg2):
12-
"""My special little hook that you can customize.
13-
"""
11+
"""My special little hook that you can customize."""
1412

1513

1614
class Plugin_1(object):
17-
"""A hook implementation namespace.
18-
"""
15+
"""A hook implementation namespace."""
1916
@hookimpl
2017
def myhook(self, arg1, arg2):
2118
print("inside Plugin_1.myhook()")
2219
return arg1 + arg2
2320

2421

2522
class Plugin_2(object):
26-
"""A 2nd hook implementation namespace.
27-
"""
23+
"""A 2nd hook implementation namespace."""
2824
@hookimpl
2925
def myhook(self, arg1, arg2):
3026
print("inside Plugin_2.myhook()")
@@ -34,11 +30,9 @@ def myhook(self, arg1, arg2):
3430
# create a manager and add the spec
3531
pm = pluggy.PluginManager("myproject")
3632
pm.add_hookspecs(MySpec)
37-
3833
# register plugins
3934
pm.register(Plugin_1())
4035
pm.register(Plugin_2())
41-
4236
# call our `myhook` hook
4337
results = pm.hook.myhook(arg1=1, arg2=2)
4438
print(results)

0 commit comments

Comments
 (0)