From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Date: Tue, 28 Feb 2023 21:40:33 +0900
Subject: TypeError: HistoryLineEdit.__init__() got an unexpected keyword
 argument 'parent' (Closes: #1032095)

Use parameter name "parent" for the function call with named parameters.
Var args call doesn't handle named parameters.

----
calibre 6.11  embedded-python: False
Linux-6.1.0-3-amd64-x86_64-with-glibc2.36 Linux ('64bit', 'ELF')
('Linux', '6.1.0-3-amd64', '#1 SMP PREEMPT_DYNAMIC Debian 6.1.8-1 (2023-01-29)')
Python 3.11.2
Interface language: it
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/actions/edit_metadata.py", line 438, in edit_metadata
    self.edit_metadata_for(row_list, ids, bulk=bulk)
  File "/usr/lib/calibre/calibre/gui2/actions/edit_metadata.py", line 443, in edit_metadata_for
    return self.do_edit_bulk_metadata(rows, book_ids)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/gui2/actions/edit_metadata.py", line 547, in do_edit_bulk_metadata
    dialog = MetadataBulkDialog(self.gui, rows,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/gui2/dialogs/metadata_bulk.py", line 497, in __init__
    self.setupUi(self)
  File "/usr/lib/calibre/calibre/gui2/dialogs/metadata_bulk_ui.py", line 372, in setupUi
    self.s_r_template = HistoryLineEdit(parent=self.tabWidgetPage3)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: HistoryLineEdit.__init__() got an unexpected keyword argument 'parent'
----
---
 src/calibre/gui2/widgets.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/calibre/gui2/widgets.py b/src/calibre/gui2/widgets.py
index aff4faf..44628bb 100644
--- a/src/calibre/gui2/widgets.py
+++ b/src/calibre/gui2/widgets.py
@@ -712,8 +712,8 @@ class HistoryLineEdit(QComboBox):  # {{{
 
     lost_focus = pyqtSignal()
 
-    def __init__(self, *args):
-        QComboBox.__init__(self, *args)
+    def __init__(self, parent=None):
+        QComboBox.__init__(self, parent)
         self.setEditable(True)
         self.setInsertPolicy(QComboBox.InsertPolicy.NoInsert)
         self.setMaxCount(10)
