-
Notifications
You must be signed in to change notification settings - Fork 2
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
Sourcery Starbot ⭐ refactored sametz/pydnmr #9
base: master
Are you sure you want to change the base?
Conversation
I = (P * (1 + tau * ((pb / T2a) + (pa / T2b))) + Q * R) / (P ** 2 + R ** 2) | ||
return I | ||
return (P * (1 + tau * ((pb / T2a) + (pa / T2b))) + Q * R) / (P ** 2 + R ** 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function two_spin refactored with the following changes:
- Inline variable that is only used once
I = (n1 / d1) + (n2 / d2) | ||
return I | ||
return (n1 / d1) + (n2 / d2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function dnmr_AB refactored with the following changes:
- Inline variable that is only used once
if foundLayout: | ||
print('Found layout named', foundLayout.objectName()) | ||
print('Found layout has parent:', foundLayout.parent(), | ||
foundLayout.parent().objectName()) | ||
else: | ||
if not foundLayout: | ||
foundLayout = self.ui.centralWidget().layout() | ||
print('Did not find QGridLayout child named "twosingletlayout"') | ||
print('Found layout named', foundLayout.objectName()) | ||
print('Found layout has parent:', foundLayout.parent(), | ||
foundLayout.parent().objectName()) | ||
|
||
print('Found layout named', foundLayout.objectName()) | ||
print('Found layout has parent:', foundLayout.parent(), | ||
foundLayout.parent().objectName()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function TestDefaultGUi.test_find_two_singlets_layout refactored with the following changes:
- Hoist repeated code outside conditional statement
- Swap if/else to remove empty if body
if widget.key == 'k_ab' or widget.key == 'wa': | ||
if widget.key in ['k_ab', 'wa']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function TestABGUi.test_twiddle_buttons refactored with the following changes:
- Replace multiple comparisons of same variable with
in
operator
Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨
Here's your pull request refactoring your most popular Python repo.
If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.
Review changes via command line
To manually merge these changes, make sure you're on the
master
branch, then run: