mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-03 04:00:57 +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:
@ -137,7 +137,7 @@ class ReportFilterMixin:
|
||||
valid_report_ids.add(report.pk)
|
||||
|
||||
# Reduce queryset to only valid matches
|
||||
queryset = queryset.filter(pk__in=[pk for pk in valid_report_ids])
|
||||
queryset = queryset.filter(pk__in=list(valid_report_ids))
|
||||
|
||||
return queryset
|
||||
|
||||
|
@ -40,11 +40,11 @@ def qrcode(data, **kwargs):
|
||||
|
||||
"""
|
||||
# Construct "default" values
|
||||
params = dict(
|
||||
box_size=20,
|
||||
border=1,
|
||||
version=1,
|
||||
)
|
||||
params = {
|
||||
"box_size": 20,
|
||||
"border": 1,
|
||||
"version": 1,
|
||||
}
|
||||
|
||||
fill_color = kwargs.pop('fill_color', 'black')
|
||||
back_color = kwargs.pop('back_color', 'white')
|
||||
|
Reference in New Issue
Block a user