diff --git a/src/artisanlib/roast_properties.py b/src/artisanlib/roast_properties.py index ea9ef8d6c..a8b231232 100644 --- a/src/artisanlib/roast_properties.py +++ b/src/artisanlib/roast_properties.py @@ -5358,5 +5358,6 @@ def __init__(self, parent, aw:'ApplicationWindow') -> None: self.ui.buttonBox.setStandardButtons(QDialogButtonBox.StandardButton.Cancel|QDialogButtonBox.StandardButton.Apply) # hack to assign the Apply button the AcceptRole without losing default system translations applyButton = self.ui.buttonBox.button(QDialogButtonBox.StandardButton.Apply) - self.ui.buttonBox.removeButton(applyButton) - self.ui.buttonBox.addButton(applyButton.text(), QDialogButtonBox.ButtonRole.AcceptRole) + if applyButton is not None: + self.ui.buttonBox.removeButton(applyButton) + self.ui.buttonBox.addButton(applyButton.text(), QDialogButtonBox.ButtonRole.AcceptRole) diff --git a/src/pyproject.toml b/src/pyproject.toml index 00472fb30..7c20ddd6b 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -215,7 +215,7 @@ enable='''c-extension-no-member,''' [tool.mypy] files = ["artisanlib/*.py", "plus/*.py"] -exclude = ['build', 'dist'] +exclude = ['build', 'dist', 'uic'] ##python_version = "3.7" check_untyped_defs = true