imports.ImportRefusal
Why one member (or the whole import) cannot be placed.
Why one member (or the whole import) cannot be placed.
Attributes
attributereasonstrOne of REASONS.
attributememberOptional[str]The member's zip name, or None for an archive-level refusal.
attributeexpectedOptional[str]What would have been accepted, in words, or None.
attributedetailOptional[str]= NoneSpecifics for this member, or None.
attributesuggest_emulatorOptional[str]= NoneAn emulator that would take the member, or None.
Functions
func__post_init__(self) -> NoneRefuse a reason outside the closed set.
Raises
ValueError: Whenreasonis not inREASONS.
paramselfReturns
Nonefuncas_dict(self) -> dict[str, Optional[str]]The refusal as the 422 lists it.
paramselfReturns
dictThe fields, plus docs: the site-relative anchor for the reason.
func__init__(self, reason, member, expected, detail=None, suggest_emulator=None) -> NoneparamselfparamreasonstrparammemberOptional[str]paramexpectedOptional[str]paramdetailOptional[str]= Noneparamsuggest_emulatorOptional[str]= NoneReturns
None