fix style errors

This commit is contained in:
Matthias 2022-05-27 19:54:44 +02:00
parent 4a8e4b0bfb
commit 793009215c
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093
6 changed files with 20 additions and 21 deletions

View File

@ -22,8 +22,8 @@ from django.dispatch.dispatcher import receiver
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from djmoney.contrib.exchange.models import convert_money
from djmoney.contrib.exchange.exceptions import MissingRate
from djmoney.contrib.exchange.models import convert_money
from djmoney.money import Money
from error_report.models import Error
from markdownx.models import MarkdownxField
@ -43,7 +43,6 @@ from plugin.models import MetadataMixin
from stock import models as stock_models
from users import models as UserModels
logger = logging.getLogger('inventree')

View File

@ -156,7 +156,7 @@
{% endif %}
</td>
</tr>
{% if item.uid %}
<tr>
<td><span class='fas fa-barcode'></span></td>
@ -452,7 +452,7 @@
{% endif %}
</tr>
</table>
{% endblock details_right %}

View File

@ -2582,7 +2582,7 @@ function loadBuildTable(table, options) {
loaded_calendar = true;
var el = document.getElementById('build-order-calendar');
calendar = new FullCalendar.Calendar(el, {
initialView: 'dayGridMonth',
nowIndicator: true,
@ -2592,7 +2592,7 @@ function loadBuildTable(table, options) {
buildEvents(calendar);
}
});
calendar.render();
} else {
calendar.render();

View File

@ -1522,7 +1522,7 @@ function loadPurchaseOrderTable(table, options) {
setupFilterList('purchaseorder', $(table), target, {download: true});
var display_mode = inventreeLoad('purchaseorder-table-display-mode', 'list');
// Function for rendering PurchaseOrder calendar display
function buildEvents(calendar) {
@ -1538,7 +1538,7 @@ function loadPurchaseOrderTable(table, options) {
filters.supplier_detail = true;
filters.min_date = start;
filters.max_date = end;
// Request purchase orders from the server within specified date range
inventreeGet(
'{% url "api-po-list" %}',
@ -1718,7 +1718,7 @@ function loadPurchaseOrderTable(table, options) {
if (display_mode == 'calendar') {
var el = document.getElementById('purchase-order-calendar');
calendar = new FullCalendar.Calendar(el, {
initialView: 'dayGridMonth',
nowIndicator: true,
@ -1728,7 +1728,7 @@ function loadPurchaseOrderTable(table, options) {
buildEvents(calendar);
}
});
calendar.render();
}
}
@ -2409,7 +2409,7 @@ function loadSalesOrderTable(table, options) {
if (display_mode == 'calendar') {
var el = document.getElementById('purchase-order-calendar');
calendar = new FullCalendar.Calendar(el, {
initialView: 'dayGridMonth',
nowIndicator: true,
@ -2419,7 +2419,7 @@ function loadSalesOrderTable(table, options) {
buildEvents(calendar);
}
});
calendar.render();
}
},
@ -2881,7 +2881,7 @@ function allocateStockToSalesOrder(order_id, line_items, options={}) {
fields.reference.value = ref;
fields.reference.prefix = global_settings.SALESORDER_REFERENCE_PREFIX + options.reference;
return fields;
}
}

View File

@ -27,16 +27,16 @@ function reloadtable(table) {
/*
* Construct a set of extra buttons to display against a list of orders,
* allowing the orders to be displayed in various 'view' modes:
*
*
* - Calendar view
* - List view
* - Tree view
*
*
* Options:
* - callback: Callback function to be called when one of the buttons is pressed
* - prefix: The prefix to use when saving display data to user session
* - display: Which button to set as 'active' by default
*
*
*/
function constructOrderTableButtons(options={}) {
@ -51,10 +51,10 @@ function constructOrderTableButtons(options={}) {
var idx = 0;
var buttons = [];
function buttonCallback(view_mode) {
inventreeSave(key, view_mode);
if (options.callback) {
options.callback(view_mode);
}

View File

@ -554,9 +554,9 @@ def test_translations(c):
# complie regex
reg = re.compile(
r"[a-zA-Z0-9]{1}"+ # match any single letter and number
r"(?![^{\(\<]*[}\)\>])"+ # that is not inside curly brackets, brackets or a tag
r"(?<![^\%][^\(][)][a-z])"+ # that is not a specially formatted variable with singles
r"[a-zA-Z0-9]{1}" + # match any single letter and number # noqa: W504
r"(?![^{\(\<]*[}\)\>])" + # that is not inside curly brackets, brackets or a tag # noqa: W504
r"(?<![^\%][^\(][)][a-z])" + # that is not a specially formatted variable with singles # noqa: W504
r"(?![^\\][\n])" # that is not a newline
)
last_string = ''