#NEWLINE# def visit_call( self , node ) : #NEWLINE# #INDENT# if ( self . _is_get_absolute_url and isinstance ( node . func , Name ) and ( node . func . name == 'reverse' ) ) : #NEWLINE# #INDENT# self . _is_reverse_used_in_get_absolute_url = True #NEWLINE# #UNINDENT# if self . _is_model_class : #NEWLINE# #INDENT# ass_name = next ( node . parent . get_children ( ) ) #NEWLINE# if isinstance ( ass_name , AssName ) : #NEWLINE# #INDENT# field_name = ass_name . name #NEWLINE# val = safe_infer ( node ) #NEWLINE# if ( ( val is not None ) and ( val is not YES ) ) : #NEWLINE# #INDENT# if val . is_subtype_of ( 'django.db.models.fields.Field' ) : #NEWLINE# #INDENT# if ( field_name in self . _model_field_names ) : #NEWLINE# #INDENT# self . add_message ( 'model-field-redefinition' , node = ass_name , args = ( self . _model_name , field_name ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _model_field_names . add ( field_name ) #NEWLINE# #UNINDENT# if ( val . name in field_name . _text_fields ) : #NEWLINE# #INDENT# for arg in ( node . keywords or [ ] ) : #NEWLINE# #INDENT# if ( ( arg . arg == 'null' ) and arg . value . value ) : #NEWLINE# #INDENT# self . add_message ( 'nullable-text-field' , args = field_name , node = arg . value ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( val . name == 'DateTimeField' ) : #NEWLINE# #INDENT# for arg in ( node . keywords or [ ] ) : #NEWLINE# #INDENT# if ( ( arg . arg == 'default' ) and ( 'datetime.now' in arg . value . as_string ( ) ) ) : #NEWLINE# #INDENT# self . add_message ( 'naive-datetime-used' , node = arg . value ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if val . is_subtype_of ( 'django.db.models.fields.related.RelatedField' ) : #NEWLINE# #INDENT# if field_name . endswith ( '_id' ) : #NEWLINE# #INDENT# self . add_message ( 'related-field-named-with-id' , node = ass_name ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( self . _is_money_field ( field_name ) and ( val . name == 'FloatField' ) ) : #NEWLINE# #INDENT# self . add_message ( 'float-money-field' , args = field_name , node = ass_name )