Skip to content

Commit

Permalink
[init] Avoid using object methods as signal receivers
Browse files Browse the repository at this point in the history
  • Loading branch information
anjos committed Nov 8, 2024
1 parent 66a24da commit a985ea3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/pelican/plugins/pybtex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ def _get_generators(pelican_object):
return PybtexGenerator


def _get_injector_init(generator):
return _injector.init(generator)


def _get_injector_solver(content):
return _injector.resolve_bibliography(content)


def register():
"""Register this plugin to pelican."""

Expand All @@ -28,5 +36,5 @@ def register():
pelican.plugins.signals.get_generators.connect(_get_generators)

# Per-content (articles, pages) biobliography injector
signals.pybtex_generator_init.connect(_injector.init)
pelican.plugins.signals.content_object_init.connect(_injector.resolve_bibliography)
signals.pybtex_generator_init.connect(_get_injector_init)
pelican.plugins.signals.content_object_init.connect(_get_injector_solver)

0 comments on commit a985ea3

Please sign in to comment.