fix: Setup flake8 to stop turning trailing commas into tuples (#36850)

This commit is contained in:
Corentin Flr 2023-08-29 07:29:58 +02:00 committed by GitHub
parent 1c237f455e
commit 5c4df3e0e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -40,6 +40,7 @@ repos:
- id: flake8
additional_dependencies: [
'flake8-bugbear',
'flake8-tuple',
]
args: ['--config', '.github/helper/.flake8_strict']
exclude: ".*setup.py$"

View File

@ -67,7 +67,7 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase):
si.save().submit()
err = frappe.new_doc("Exchange Rate Revaluation")
err.company = (self.company,)
err.company = self.company
err.posting_date = today()
accounts = err.get_accounts_data()
err.extend("accounts", accounts)
@ -133,7 +133,7 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase):
frappe.get_doc("Journal Entry", je).cancel()
err = frappe.new_doc("Exchange Rate Revaluation")
err.company = (self.company,)
err.company = self.company
err.posting_date = today()
err.fetch_and_calculate_accounts_data()
err = err.save().submit()
@ -215,7 +215,7 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase):
self.assertEqual(flt(acc_balance.balance_in_account_currency, precision), 5.0) # in USD
err = frappe.new_doc("Exchange Rate Revaluation")
err.company = (self.company,)
err.company = self.company
err.posting_date = today()
err.fetch_and_calculate_accounts_data()
err.set_total_gain_loss()