Your IP : 216.73.216.147


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pylint_django/checkers/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pylint_django/checkers/models.pyo

�
�^Vc@sdZddlmZddlmZmZmZmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZdd	lmZdd
lmZmZidde6d de6d!de6d"de6Zd�Zdefd��YZdS(#sModels.i����(tConst(tClassDeftFunctionDeftinferredt
AssignName(tAssign(tIAstroidChecker(tcheck_messages(tBaseChecker(t
numversion(tBASE_ID(tnode_is_subclasstPY3s,__unicode__ on a model must be callable (%s)smodel-unicode-not-callables3Django models require a callable __unicode__ methodsE%d01s#No __unicode__ method on model (%s)smodel-missing-unicodesMDjango models should implement a __unicode__ method for string representationsW%d01s=Found __unicode__ method on model (%s). Python3 uses __str__.smodel-has-unicodesdDjango models should not implement a __unicode__ method for string representation when using Python3sW%d02s1Model does not explicitly define __unicode__ (%s)smodel-no-explicit-unicodes�Django models should implement a __unicode__ method for string representation. A parent class of this model does, but ideally all models should be explicit.sW%d03cCs�t|t�r�|jdkr�xp|j�D]_}t|t�sFq+n|jdjdksbq+nt|jt�szq+n|jjr+tSq+Wnt	S(NtMetaitabstract(
t
isinstanceRtnametget_childrenRttargetstvalueRtTruetFalse(tnodet
meta_child((sN/opt/alt/python27/lib/python2.7/site-packages/pylint_django/checkers/models.pyt_is_meta_with_abstractstModelCheckercBsbeZdZeZdZeZedkrBe	d�d��Z
ne	d�d��Zd�ZRS(	sDjango model checker.sdjango-model-checkeriismodel-missing-unicodecCs
|j|�S(N(t_visit_classdef(tselfR((sN/opt/alt/python27/lib/python2.7/site-packages/pylint_django/checkers/models.pytvisit_class<scCs
|j|�S(N(R(RR((sN/opt/alt/python27/lib/python2.7/site-packages/pylint_django/checkers/models.pytvisit_classdef@sc	Cs�t|dd�sdSx|j�D]}t|�r9dSt|t�r�t|j��}t|dt�ssq#n|dj}|dkr�q#n|d}t|��d}|j	�r�dS|j
dtd|jd	|�dSt|t�r#|jdkr#t
r*|j
d
td|jd	|�ndSq#Wt
r<dSxG|j�D]9}|jdkrI|j
dtd|jd	|�dSqIW|jdk	r�x3|jjD]"}t|dd�d
kr�dSq�Wn|j
dtd|jd	|�dS(sClass visitor.sdjango.db.models.base.Models.ModelNit__unicode__isE%s01targsRsW%s02sW%s03Rtpython_2_unicode_compatiblesW%s01(RRRRRtlistRRRtcallabletadd_messageR
RRtmethodst
decoratorstNonetnodestgetattr(	RRtchildt
grandchildrenRt
grandchildtassignedtmethodt	decorator((sN/opt/alt/python27/lib/python2.7/site-packages/pylint_django/checkers/models.pyRDsB

 # (ii(
t__name__t
__module__t__doc__Rt__implements__RtMESSAGEStmsgstPYLINT_VERSIONRRRR(((sN/opt/alt/python27/lib/python2.7/site-packages/pylint_django/checkers/models.pyR1sN(s,__unicode__ on a model must be callable (%s)smodel-unicode-not-callables3Django models require a callable __unicode__ method(s#No __unicode__ method on model (%s)smodel-missing-unicodesMDjango models should implement a __unicode__ method for string representation(s=Found __unicode__ method on model (%s). Python3 uses __str__.smodel-has-unicodesdDjango models should not implement a __unicode__ method for string representation when using Python3(s1Model does not explicitly define __unicode__ (%s)smodel-no-explicit-unicodes�Django models should implement a __unicode__ method for string representation. A parent class of this model does, but ideally all models should be explicit.(R1tastroidRtpylint_django.compatRRRRt
astroid.nodesRtpylint.interfacesRtpylint.checkers.utilsRtpylint.checkersRtpylint.__pkginfo__R	R5tpylint_django.__pkginfo__R
tpylint_django.utilsRRR3RR(((sN/opt/alt/python27/lib/python2.7/site-packages/pylint_django/checkers/models.pyt<module>s0"