Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slight tidy #129

Merged
merged 21 commits into from
Mar 26, 2024
Merged

slight tidy #129

merged 21 commits into from
Mar 26, 2024

Conversation

casperdcl
Copy link
Member

after #109 :)

@casperdcl casperdcl requested review from DanicaSTFC and a team February 14, 2024 12:36
@casperdcl casperdcl self-assigned this Feb 14, 2024
@@ -488,10 +471,10 @@ def __init__(self, parent=None):


class FormDockWidget(QtWidgets.QDockWidget):
def __init__(self, parent=None, title=None):
def __init__(self, parent=None, title=''):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this default and accept title=None?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly I'd prefer removing the lines below:

        if title is None:
            title = ''

but I left them in just for backwards compatibility.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly I'd prefer removing the lines below:

        if title is None:
            title = ''

but I left them in just for backwards compatibility.

we added these lines in https://github.com/TomographicImaging/eqt/pull/102/files
to fix some problems. the default title = None was already set then.

CHANGELOG.md Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new changes are not passing the tests, could you fix this before we look at it? (101 fail, 36 pass on my local machine)

name_role = name + '_' + role
else:
raise ValueError(f'Role must be either "label", "field" or None. Got {role}.')
else:
name_role = f'{name}_field'

# retrieve widget
try:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing this KeyError?

@DanicaSTFC
Copy link
Collaborator

I fixed the problems and approved the changes.

@DanicaSTFC DanicaSTFC merged commit 8b41e98 into main Mar 26, 2024
6 checks passed
@DanicaSTFC DanicaSTFC deleted the slight-tidy branch March 26, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants