Refactor and enhance type hints across multiple modules
- Updated the `from_tuple` method in `Prof` class to specify return type. - Added type hints for various methods in `LehmannsClient`, `OpenAI`, `WebRequest`, and `ZoteroController` classes to improve code clarity and type safety. - Modified `pdf_to_csv` function to return a string instead of a DataFrame. - Enhanced error handling and type hints in `wordparser` and `xmlparser` modules. - Removed unused UI file `Ui_medianadder.ts`. - Improved the layout and structure of the `semesterapparat_ui` to enhance user experience. - Updated file picker to support `.doc` files in addition to `.docx`. - Added unique item handling in `Ui` class to prevent duplicates in apparat list. - General code cleanup and consistency improvements across various files.
This commit is contained in:
@@ -110,10 +110,10 @@ class DocumentPrintDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
def on_pushButton_clicked(self):
|
||||
apparats: list[tuple[int, str]] = []
|
||||
apps = self.db.getAllAparats(0)
|
||||
apps = natsorted(apps, key=lambda x: x[4], reverse=True)
|
||||
apps = natsorted(apps, key=lambda x: x.appnr, reverse=True)
|
||||
for app in apps:
|
||||
prof = self.db.getProfById(app[2])
|
||||
data = (app[4], f"{prof.lastname} ({app[1]})")
|
||||
prof = self.db.getProfById(app.prof_id)
|
||||
data = (app.appnr, f"{prof.lastname} ({app.name})")
|
||||
apparats.append(data)
|
||||
SemesterDocument(
|
||||
semester=self.semester.value,
|
||||
|
||||
Reference in New Issue
Block a user