o
    qoiE                     @   s  d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl	m
Z
 ddl	mZ ddlmZ ejejej gef Zg eeeeeeeeeeeeee e!e"e#e$e%e&e'e(e)e*e+e,e-e.e/e0e1e2e3e4e5e6e7e8e9e:e;e<e=e>e?e@eAeBeCeDeEeFeGeHeIeJeKeLeMeNeOePeQeReSeTeUeVeWeXeYeZe[ee\e]e^e_e`eaebecedeeefegeheiejekelemeneoepeqereseteuevewexeyeze{e|e}e~eeeeeeeeeeeeeeeeeeeeeeeeeeZg ejj
eje
jejejejejejejejjejejejejejejejejejejejejejejejejejejejejejejejejejjejjejjejjejjejjejjejjejZdefdd	Zeng eeZdefd
dZeZdS )a  A policy of functions to skip representing as `fdl.Config`'s.

When running `auto_config` on a function, some Python functions cannot or, in
practice, should never be mapped into `fdl.Config`-space. This file defines
policies (mostly implemented as lists) that enumerates them.

Because either adding or removing a function from this list can cause config
incompatibilities in end-user config, this file is structured around policy
versions.
    N)building)config)partial)autobuildersreturnc                 C   s   t | tjpt | tjS )aZ  Returns True if `fn_or_cls` is a builtin method.

  Because some builtin method types don't provide access to the underlying
  function (making it impossible to explicitly enumerate them), we need a policy
  to handle them specially.

  Args:
    fn_or_cls: The object to determine whether if it's a builtin method.

  Returns:
    The answer.
  )
isinstancetypesBuiltinFunctionTypeMethodWrapperType	fn_or_cls r   _/home/ubuntu/.local/lib/python3.10/site-packages/fiddle/_src/experimental/auto_config_policy.py_is_builtin_method   s   r   c                 C   s,   t | r| j} t| tjo| tv pt| S )zHReturns `True` if `fn_or_cls` should not be represented as a fdl.Config.)inspectismethod__func__r   typingHashable_v1_policy_setr   r   r   r   r   v1  s   
r   )__doc__copyr   	itertoolsloggingr   r   fiddler   fiddle._srcr   r   fiddle._src.experimentalr   CallableTypeAnyboolPolicyArithmeticErrorAssertionErrorAttributeErrorBaseExceptionBlockingIOErrorBrokenPipeErrorBufferErrorBytesWarningChildProcessErrorConnectionAbortedErrorConnectionErrorConnectionRefusedErrorConnectionResetErrorDeprecationWarningEOFErrorEllipsisEnvironmentError	ExceptionFileExistsErrorFileNotFoundErrorFloatingPointErrorFutureWarningGeneratorExitIOErrorImportErrorImportWarningIndentationError
IndexErrorInterruptedErrorIsADirectoryErrorKeyErrorKeyboardInterruptLookupErrorMemoryErrorModuleNotFoundError	NameErrorNotADirectoryErrorNotImplementedNotImplementedErrorOSErrorOverflowErrorPendingDeprecationWarningPermissionErrorProcessLookupErrorRecursionErrorReferenceErrorResourceWarningRuntimeErrorRuntimeWarningStopAsyncIterationStopIterationSyntaxErrorSyntaxWarningSystemError
SystemExitTabErrorTimeoutError	TypeErrorUnboundLocalErrorUnicodeDecodeErrorUnicodeEncodeErrorUnicodeErrorUnicodeTranslateErrorUnicodeWarningUserWarning
ValueErrorWarningZeroDivisionErrorabsallanyasciibin
breakpoint	bytearraybytescallablechrclassmethodcompilecomplexdelattrdictdirdivmod	enumerateevalexecfilterfloatformat	frozensetgetattrglobalshasattrhashhexidinputintr   
issubclassiterlenlistlocalsmapmax
memoryviewminnextobjectoctopenordpowprintpropertyrangereprreversedroundsetsetattrslicesortedstaticmethodstrsumsupertupletypevarszipBUILTIN_LISTRegistrybuildConfigPartialdeepcopy	signature
accumulatechainfrom_iterablecombinationscombinations_with_replacementcompresscountcycle	dropwhilegroupbyislicepermutationsproductrepeatstarmap	takewhileteezip_longestcriticaldebugerror	exceptionfatalinfologwarnwarningLoggercastV1_SKIPLISTr   r   r   latestr   r   r   r   <module>   s&  	
 !"#$%'()*+,-./0123456789:;=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                 	  
    	
 !"#$%&'()*+,2	