ipython / ipython/traitlets

How can I override `traitlets.config.catch_config_error()` decorator?

Aperta
#427 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
653
Fork
217
Merge medio
2g 21h
PR unite (30g)
2

Descrizione

I'm trying to modify the logging of errors performed by [`catch_config_error()` decorator](https://github.com/ipython/traitlets/blob/master/traitlets/config/application.py#L78-L94).
I'm trying to monkey-patch it, but obviously the classes that using it, defined in `application` module, are already been decorated on import time (before monkeypatch).

- Is there some other way foreseen to modify this decorator?
- Would it make sense to refactor it, to support that (e.g. for customizing the application-exit call)?

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start in traitlets/config/application.py at catch_config_error and inspect the classes decorated there. Determine whether customization should be supported through an existing entry point or a refactor, then define the behavior for custom error logging and application exit handling and verify it with focused coverage.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
tooling
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.