Sourcery Starbot ⭐ refactored sametz/pydnmr#9
Open
SourceryAI wants to merge 1 commit intosametz:masterfrom
Open
Sourcery Starbot ⭐ refactored sametz/pydnmr#9SourceryAI wants to merge 1 commit intosametz:masterfrom
SourceryAI wants to merge 1 commit intosametz:masterfrom
Conversation
SourceryAI
commented
Jun 13, 2020
|
|
||
| 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) |
Author
There was a problem hiding this comment.
Function two_spin refactored with the following changes:
- Inline variable that is only used once
Comment on lines
-244
to
+243
| I = (n1 / d1) + (n2 / d2) | ||
| return I | ||
| return (n1 / d1) + (n2 / d2) |
Author
There was a problem hiding this comment.
Function dnmr_AB refactored with the following changes:
- Inline variable that is only used once
Comment on lines
-150
to
+156
| 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()) |
Author
There was a problem hiding this comment.
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
Comment on lines
-364
to
+361
| if widget.key == 'k_ab' or widget.key == 'wa': | ||
| if widget.key in ['k_ab', 'wa']: |
Author
There was a problem hiding this comment.
Function TestABGUi.test_twiddle_buttons refactored with the following changes:
- Replace multiple comparisons of same variable with
inoperator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
masterbranch, then run: