Skip to content

Sourcery refactored master branch#1

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

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

Conversation

@sourcery-ai

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

Copy link
Copy Markdown

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
"""
@classmethod
def debug(*args, **kwargs):
def debug(cls, **kwargs):

Copy link
Copy Markdown
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:


@classmethod
def info(*args, **kwargs):
def info(cls, **kwargs):

Copy link
Copy Markdown
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:


@classmethod
def warning(*args, **kwargs):
def warning(cls, **kwargs):

Copy link
Copy Markdown
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:


@classmethod
def error(*args, **kwargs):
def error(cls, **kwargs):

Copy link
Copy Markdown
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:


@classmethod
def critical(*args, **kwargs):
def critical(cls, **kwargs):

Copy link
Copy Markdown
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:

"""
sector = self.current_sector_data
for dummy in range(8):
for _ in range(8):

Copy link
Copy Markdown
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:

return self._show_error()

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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