XBFjhddlmZddlZddlZddlZddlmZ dddZddZddZ dddZ ddZ dS)) annotationsN)AnyFarticle str | Nonevaluernameverboseboolcapitalreturnstrct|tr|}tj|st |j}n|j}|rt||z}|dks|>> describe("a", object()) 'an object' >>> describe("a", object) 'an object' >>> describe("a", type(object)) 'a type' Definite description: >>> describe("the", object()) "the object at '...'" >>> describe("the", object) 'the object object' >>> describe("the", type(object)) 'the type type' Definitely named description: >>> describe("the", object(), "I made") 'the object I made' >>> describe("the", object, "I will use") 'the object I will use' theN TFzat '%s'z'')rr r )aanzAThe 'article' argument should be 'the', 'a', 'an', or None not %r) isinstancer lowerinspectisclasstype__name___prefix add_articletypes FunctionType MethodType__func____repr__objecthexidreprjoindescribe ValueError)rrrr r typenameresult tick_wraps JC:\PYTHON\_runtimes\venv\Lib\site-packages\traitlets/utils/descriptions.pyr%r% s|'3"--// ?5 ! !";;'>-5>>H,%GOGOE4J4JO   ))4))F""64999 Iu%% ~E5#566 ~ E5#344 ~. e% *!3r%yy>>1E{{ -u~~, 'yyGUwPWXXX X K  7? ?O8UG444 ORY Y   ct|tjrtd|jddz}n.t j|}||jdkr |jdz}nd}|S)NT)r .builtins)rrrr%__self__r getmoduler)rrmodules r*rrzsn%)**end;;;cA"5))  &/Z"?"??S(DDD Kr+ctj|rt|jSt t |S)zsReturns a string of the value's type with an indefinite article. For example 'an Image' or 'a PlotValue'. )rrrrclass_ofr)rs r*r4r4s: u%5>***U $$$r+definitec|rd|z}nQtjdd|}|dddvrd|z}nd|z}|r%|d |ddzS|S) aReturns the string with a prepended article. The input does not need to begin with a character. Parameters ---------- name : str Name to which to prepend an article definite : bool (default: False) Whether the article is definite or not. Indefinite articles being 'a' and 'an', while 'the' is definite. capital : bool (default: False) Whether the added article should have its first letter capitalized or not. zthe z[\W_]+r/Naeiouzan za r)recompilesubrupper)rr5r r( first_letterss r*rrs"!$ 9--11"d;; !  " " $ $ / /T\FFD[Fay  6!"":-- r+objc.t|}|d|S)z]Return a string representation of a value and its type for readable error messages. r)r)r>the_types r* repr_typerAs# CyyH " "h " ""r+)NFF) rrrrrrr r r r r r )rrr r )rrr r)FF)rr r5r r r r r )r>rr r ) __future__rrr9rtypingrr%rr4rrAr+r*rEs""""""   n n n n n b    %%%%>######r+