Pass type information to `format_exception` from `transform_errors` for primitive types
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by locating transform_errors and format_exception, then inspect how notes carries target types for iterable and class structuring failures. The work is complete when format_exception can receive the exact target type for primitive types such as int and float without inspecting the error message.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
- cattrs version: v23.1.2
- Python version: Python 3.8
- Operating System: Ubuntu 20.04
Description
In #258, __notes__ were added to support passing AttributeValidationNote and IterableValidationNote around. transform_errors uses these notes to pass the target type when calling format_exception. This works well in most cases, except for primitive types.
Feature Request
I want to be able to customize my format_exception function so that I know the exact target type of the exception without needing to inspect the error message. If I understand it correctly, in the current design, __notes__ is only set on exceptions that are raised when structuring an iterable or class, but is not for types like int, float and etc.
- Lingua principale
- Python
- Stelle
- 1.1k
- Fork
- 168
- Merge medio
- 3g 7m
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python-attrs/cattrs
-
decimal.Decimal not handled in preconf converters (json, pyyaml)Forse già presa @Binilkks l’ha presa 104 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
python-attrs/cattrs#761 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
python-attrs/cattrs#513 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 85/100
python-attrs/cattrs#774 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
python-attrs/cattrs#746 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Implement a strategy to resolve natively Sequence[X] | YForse già presa @jhominal l’ha presa 179 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
python-attrs/cattrs#743 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di python-attrs/cattrs
Issue simili
-
HTML: <template> content is extracted as document textForse già presa @ryanmeowy l’ha presa oggi. Apertabug html
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
docling-project/docling#4714 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Qdrant RAG client applies score_threshold to raw cosine similarity, not the 0-1 score it returnsForse già presa @roydonsequeira l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Host test failure in core/direct_io.zig on Linux kernel 6.17: O_DIRECT open succeeds on procfs, so the test's 'plain' fd is not plainForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ashhart/TensorFold#536 ·
I maintainer di solito rispondono entro 1 giorno
-
area/install-update comp/cli duplicate P2 python:uv sweeper:risk-compatibility type/bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
NousResearch/hermes-agent#135440 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Deepak3699/Ai_Mentor#244 ·
I maintainer di solito rispondono entro 1 giorno