Revised the code as suggested by PyCharm.

This commit is contained in:
依瑪貓
2020-08-13 10:17:52 +08:00
parent 1be05c2252
commit e06821194c
8 changed files with 17 additions and 19 deletions

View File

@ -30,9 +30,6 @@
.date-account-line {
font-size: 0.833em;
}
.negative {
color: red;
}
.journal-credit {
padding-left: 1em;
}

View File

@ -24,7 +24,7 @@
/**
* Returns the regular payment data.
*
* @returns {{debits: [], credits: []}}
* @returns {{debit: [], credit: []}}
*/
function getRegularPayments() {
const today = new Date($("#txn-date").get(0).value);

View File

@ -142,7 +142,7 @@ function loadSummaryCategoryData() {
*/
function startSummaryHelper(summary) {
// Replaced common substitution character "*" with "×"
summary_content = summary.val();
let summary_content = summary.val();
summary_content = summary_content.replace(/\*(\d+)$/, "×$1");
const type = summary.data("type");
const no = summary.data("no");
@ -331,7 +331,7 @@ function switchSummaryTab(tab) {
/**
* Sets the known general category buttons.
*
* @param {string} category the general category
* @param {string|null} category the general category
*/
function setSummaryGeneralCategoryButtons(category) {
$(".btn-summary-general-category").each(function () {
@ -480,7 +480,7 @@ function setSummaryRegularPaymentButtons(category) {
*
* @param {string} format the category format, either "general",
* "travel", or "bus".
* @param {string} category the category
* @param {string|null} category the category
*/
function setSummaryAccount(format, category) {
const recordId = $("#summary-record").get(0).value;

View File

@ -43,7 +43,7 @@ def accounting_amount(value: Union[str, int]) -> str:
break
s = m.group(1) + "," + m.group(2)
if value < 0:
s = "(%s)" % (s)
s = "(%s)" % s
return s