#Dependency injection

1 messages · Page 1 of 1 (latest)

loud lichen
#

You're not allowed to do this? I sorta remember @rapid chasm saying no.

@object_type
class JestReporterPlugin:

    def __init__(
        self,
        coverage_data_extractor: CoverageDataExtractor,
        file_handler: FileHandler,
        beautiful_soup: Callable = BeautifulSoup,
    ):```
rapid chasm
#
src ➤ mkdir jest-reporter-plugin
src ➤ cd jest-reporter-plugin
jest-reporter-plugin ➤ dagger init --sdk python

looking at this...

loud lichen
#

so in essense change them to class attributes

rapid chasm
#

perhaps? Love to hear if that works for you.