mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Removed unused _combine() node argument from various combinable classes.
Unused sincef59fd15c49(Combinable) and since its introduction in2d877da855(SearchVectorCombinable/SearchQueryCombinable/SearchQuery).
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							d70432deae
						
					
				
				
					commit
					7724879b52
				
			| @@ -36,7 +36,7 @@ class SearchQueryField(Field): | |||||||
| class SearchVectorCombinable: | class SearchVectorCombinable: | ||||||
|     ADD = '||' |     ADD = '||' | ||||||
|  |  | ||||||
|     def _combine(self, other, connector, reversed, node=None): |     def _combine(self, other, connector, reversed): | ||||||
|         if not isinstance(other, SearchVectorCombinable) or not self.config == other.config: |         if not isinstance(other, SearchVectorCombinable) or not self.config == other.config: | ||||||
|             raise TypeError('SearchVector can only be combined with other SearchVectors') |             raise TypeError('SearchVector can only be combined with other SearchVectors') | ||||||
|         if reversed: |         if reversed: | ||||||
| @@ -96,7 +96,7 @@ class SearchQueryCombinable: | |||||||
|     BITAND = '&&' |     BITAND = '&&' | ||||||
|     BITOR = '||' |     BITOR = '||' | ||||||
|  |  | ||||||
|     def _combine(self, other, connector, reversed, node=None): |     def _combine(self, other, connector, reversed): | ||||||
|         if not isinstance(other, SearchQueryCombinable): |         if not isinstance(other, SearchQueryCombinable): | ||||||
|             raise TypeError( |             raise TypeError( | ||||||
|                 'SearchQuery can only be combined with other SearchQuerys, ' |                 'SearchQuery can only be combined with other SearchQuerys, ' | ||||||
| @@ -153,8 +153,8 @@ class SearchQuery(SearchQueryCombinable, Value): | |||||||
|             template = '!!({})'.format(template) |             template = '!!({})'.format(template) | ||||||
|         return template, params |         return template, params | ||||||
|  |  | ||||||
|     def _combine(self, other, connector, reversed, node=None): |     def _combine(self, other, connector, reversed): | ||||||
|         combined = super()._combine(other, connector, reversed, node) |         combined = super()._combine(other, connector, reversed) | ||||||
|         combined.output_field = SearchQueryField() |         combined.output_field = SearchQueryField() | ||||||
|         return combined |         return combined | ||||||
|  |  | ||||||
|   | |||||||
| @@ -34,7 +34,7 @@ class Combinable: | |||||||
|     BITLEFTSHIFT = '<<' |     BITLEFTSHIFT = '<<' | ||||||
|     BITRIGHTSHIFT = '>>' |     BITRIGHTSHIFT = '>>' | ||||||
|  |  | ||||||
|     def _combine(self, other, connector, reversed, node=None): |     def _combine(self, other, connector, reversed): | ||||||
|         if not hasattr(other, 'resolve_expression'): |         if not hasattr(other, 'resolve_expression'): | ||||||
|             # everything must be resolvable to an expression |             # everything must be resolvable to an expression | ||||||
|             if isinstance(other, datetime.timedelta): |             if isinstance(other, datetime.timedelta): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user