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

Sourcery refactored master branch #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented May 25, 2023

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 Ntrystan May 25, 2023 20:29
def debug(*args, **kwargs):
def debug(cls, **kwargs):
Copy link
Author

Choose a reason for hiding this comment

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

Function LOG.debug refactored with the following changes:

def info(*args, **kwargs):
def info(cls, **kwargs):
Copy link
Author

Choose a reason for hiding this comment

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

Function LOG.info refactored with the following changes:

def warning(*args, **kwargs):
def warning(cls, **kwargs):
Copy link
Author

Choose a reason for hiding this comment

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

Function LOG.warning refactored with the following changes:

def error(*args, **kwargs):
def error(cls, **kwargs):
Copy link
Author

Choose a reason for hiding this comment

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

Function LOG.error refactored with the following changes:

def critical(*args, **kwargs):
def critical(cls, **kwargs):
Copy link
Author

Choose a reason for hiding this comment

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

Function LOG.critical refactored with the following changes:

for dummy in range(8):
for _ in range(8):
Copy link
Author

Choose a reason for hiding this comment

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

Function Disk._harvest_entries refactored with the following changes:

if not self._call_command('delete', dst=dst):
return self._show_error()

return 0
return self._show_error() if not self._call_command('delete', dst=dst) else 0
Copy link
Author

Choose a reason for hiding this comment

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

Function Uc1541.rm refactored with the following changes:

Comment on lines -554 to +551
perms = "-r%s-r--r--" % (rw.strip() and "-" or "w")
perms = f'-r{rw.strip() and "-" or "w"}-r--r--'
Copy link
Author

Choose a reason for hiding this comment

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

Function Uc1541._get_dir refactored with the following changes:

Comment on lines -569 to +566
if self._verbose:
return self.err
else:
return 1
return self.err if self._verbose else 1
Copy link
Author

Choose a reason for hiding this comment

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

Function Uc1541._show_error refactored with the following changes:

Comment on lines -582 to +583
command = ['c1541', '-attach', self.arch, '-%s' % cmd]
command = ['c1541', '-attach', self.arch, f'-{cmd}']
if src:
command.append(src)
if dst:
command.append(dst)

LOG.debug('executing command: %s', ' '.join(command))
# For some reason using write and delete commands and reading output
# confuses Python3 beneath MC and as a consequence MC report an
# error...therefore for those commands let's not use
# universal_newlines...
universal_newlines = True
if cmd in ['delete', 'write']:
universal_newlines = False
universal_newlines = cmd not in ['delete', 'write']
Copy link
Author

Choose a reason for hiding this comment

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

Function Uc1541._call_command refactored with the following changes:

This removes the following comments ( why? ):

# universal_newlines...
# error...therefore for those commands let's not use
# confuses Python3 beneath MC and as a consequence MC report an
# For some reason using write and delete commands and reading output

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