Skip to content

Sourcery refactored master branch#1

Open
sourcery-ai[bot] wants to merge 1 commit intomasterfrom
sourcery/master
Open

Sourcery refactored master branch#1
sourcery-ai[bot] wants to merge 1 commit intomasterfrom
sourcery/master

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Apr 21, 2022

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from edson-github April 21, 2022 13:01
Comment on lines -95 to +99
print('%s removed ...' % item)
print(f'{item} removed ...')
except OSError:
try:
shutil.rmtree(item)
print('%s/ removed ...' % item)
print(f'{item}/ removed ...')
Copy link
Author

Choose a reason for hiding this comment

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

Function rmtree_glob refactored with the following changes:

Comment on lines -74 to -81
pages = [
HelpPage(parent=parent,
bitmap=wx.Bitmap(bitmap_file),
caption=caption)
return [
HelpPage(parent=parent, bitmap=wx.Bitmap(bitmap_file), caption=caption)
for [caption, bitmap_file] in help_images_list
]

return pages
Copy link
Author

Choose a reason for hiding this comment

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

Function page_list refactored with the following changes:


def __repr__(self):
return "Vector(" + tuple.__repr__(self) + ")"
return f"Vector({tuple.__repr__(self)})"
Copy link
Author

Choose a reason for hiding this comment

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

Function Vector.__repr__ refactored with the following changes:

def push(self, command):
more = self.runsource(command, self.filename)
return more
return self.runsource(command, self.filename)
Copy link
Author

Choose a reason for hiding this comment

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

Function Console.push refactored with the following changes:

Comment on lines -133 to -136
if more:
pass # prompt = sys.ps2
else:
pass # prompt = sys.ps1
Copy link
Author

Choose a reason for hiding this comment

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

Function Console.interact refactored with the following changes:

This removes the following comments ( why? ):

# prompt = sys.ps1
# prompt = sys.ps2

Comment on lines -1258 to +1212
if redirect:
sys.stdin = self.reader
else:
sys.stdin = self.stdin
sys.stdin = self.reader if redirect else self.stdin
Copy link
Author

Choose a reason for hiding this comment

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

Function Shell.redirectStdin refactored with the following changes:

Comment on lines -1265 to +1216
if redirect:
sys.stdout = PseudoFileOut(self.writeOut)
else:
sys.stdout = self.stdout
sys.stdout = PseudoFileOut(self.writeOut) if redirect else self.stdout
Copy link
Author

Choose a reason for hiding this comment

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

Function Shell.redirectStdout refactored with the following changes:

Comment on lines -1272 to +1220
if redirect:
sys.stderr = PseudoFileErr(self.writeErr)
else:
sys.stderr = self.stderr
sys.stderr = PseudoFileErr(self.writeErr) if redirect else self.stderr
Copy link
Author

Choose a reason for hiding this comment

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

Function Shell.redirectStderr refactored with the following changes:

Comment on lines -1279 to +1228
if self.GetSelectionStart() != self.GetSelectionEnd() \
and self.GetSelectionStart() >= self.promptPosEnd \
and self.GetSelectionEnd() >= self.promptPosEnd:
return True
else:
return False
return (
self.GetSelectionStart() != self.GetSelectionEnd()
and self.GetSelectionStart() >= self.promptPosEnd
and self.GetSelectionEnd() >= self.promptPosEnd
)
Copy link
Author

Choose a reason for hiding this comment

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

Function Shell.CanCut refactored with the following changes:

Comment on lines -1288 to +1232
if self.CanEdit() and editwindow.EditWindow.CanPaste(self):
return True
else:
return False
return bool(self.CanEdit() and editwindow.EditWindow.CanPaste(self))
Copy link
Author

Choose a reason for hiding this comment

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

Function Shell.CanPaste refactored with the following changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants