mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Code style improvements (#4683)
* fix list comps * mopre comp fixes * reduce computing cost on any() calls * add bugbear * check for clean imports * only allow limited relative imports * fix notification method lookup * fix notification method assigement * rewrite assigment * fix upstream changes to new style * fix upstream change to new coding style
This commit is contained in:
		| @@ -118,7 +118,7 @@ class LabelListView(LabelFilterMixin, ListAPI): | ||||
|                     continue | ||||
|  | ||||
|             # Reduce queryset to only valid matches | ||||
|             queryset = queryset.filter(pk__in=[pk for pk in valid_label_ids]) | ||||
|             queryset = queryset.filter(pk__in=list(valid_label_ids)) | ||||
|  | ||||
|         return queryset | ||||
|  | ||||
|   | ||||
| @@ -41,7 +41,7 @@ class LabelConfig(AppConfig): | ||||
|                 self.create_labels()  # pragma: no cover | ||||
|             except (AppRegistryNotReady, OperationalError): | ||||
|                 # Database might not yet be ready | ||||
|                 warnings.warn('Database was not ready for creating labels') | ||||
|                 warnings.warn('Database was not ready for creating labels', stacklevel=2) | ||||
|  | ||||
|     def create_labels(self): | ||||
|         """Create all default templates.""" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user