python-dependency-injector icon indicating copy to clipboard operation
python-dependency-injector copied to clipboard

Correct way to inherit from Configuration

Open japel opened this issue 2 years ago • 1 comments

Dear all,

I've been struggling to inherit from Configuration. I'd like to adapt the setitem method to always execute a method when a configuration is changed.

Has anyone ever done something like that? How could I inherit from Configuration?

Thanks in advance

japel avatar Sep 16 '21 22:09 japel

Hey @japel ,

Has anyone ever done something like that?

I didn't try that.

How could I inherit from Configuration?

I would say just class MyConfig(providers.Configuration), but if that would be that simple, you probably wouldn't ask. Could you share some kind of code sample of what you're trying to do and how it fails now?

rmk135 avatar Nov 08 '21 01:11 rmk135