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 Apr 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 Ragdata April 25, 2023 11:13
Comment on lines -38 to +58
patterns = [ r'\b{}\b'.format(x) for x in
('exception', 'error', 'warning', 'fatal', 'traceback',
'fault', 'crash(?:ed)?', 'abort(?:ed)',
'uninitiali[zs]ed') ]
patterns = [
f'\b{x}\b'
for x in (
'exception',
'error',
'warning',
'fatal',
'traceback',
'fault',
'crash(?:ed)?',
'abort(?:ed)',
'uninitiali[zs]ed',
)
]
patterns += ['^==[0-9]+== ']
for pattern in patterns:
cp = re.compile(pattern, re.IGNORECASE | re.MULTILINE)
hit = cp.search(stderr)
if hit:
raise AssertionError('Suspicious output to stderr (matched "%s")' % hit.group(0))
hit = cp.search(stdout)
if hit:
raise AssertionError('Suspicious output to stdout (matched "%s")' % hit.group(0))
if hit := cp.search(stderr):
raise AssertionError(f'Suspicious output to stderr (matched "{hit[0]}")')
if hit := cp.search(stdout):
raise AssertionError(f'Suspicious output to stdout (matched "{hit[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 check_test_output refactored with the following changes:

Comment on lines -62 to +67
cmdline = base_cmdline + [ pjoin(basename, 'sshfs'),
'-f', 'localhost:' + src_dir, mnt_dir ]
cmdline = base_cmdline + [
pjoin(basename, 'sshfs'),
'-f',
f'localhost:{src_dir}',
mnt_dir,
]
Copy link
Author

Choose a reason for hiding this comment

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

Function test_sshfs refactored with the following changes:

Comment on lines -136 to +140
fullname = mnt_dir + "/" + name
fullname = f"{mnt_dir}/{name}"
Copy link
Author

Choose a reason for hiding this comment

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

Function tst_unlink refactored with the following changes:

Comment on lines -151 to +155
fullname = mnt_dir + "/" + dirname
fullname = f"{mnt_dir}/{dirname}"
Copy link
Author

Choose a reason for hiding this comment

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

Function tst_mkdir refactored with the following changes:

Comment on lines -161 to +165
fullname = mnt_dir + "/" + name
fullname = f"{mnt_dir}/{name}"
Copy link
Author

Choose a reason for hiding this comment

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

Function tst_rmdir refactored with the following changes:

Comment on lines -175 to +179
fullname = mnt_dir + "/" + linkname
fullname = f"{mnt_dir}/{linkname}"
Copy link
Author

Choose a reason for hiding this comment

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

Function tst_symlink refactored with the following changes:

Comment on lines -323 to +329
file_ = src_newdir + "/" + name_generator()
subdir = src_newdir + "/" + name_generator()
subfile = subdir + "/" + name_generator()
file_ = f"{src_newdir}/{name_generator()}"
subdir = f"{src_newdir}/{name_generator()}"
subfile = f"{subdir}/{name_generator()}"
Copy link
Author

Choose a reason for hiding this comment

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

Function tst_readdir refactored with the following changes:

pytest.fail('file system process terminated with code %s' % (code,))
pytest.fail(f'file system process terminated with code {code}')
Copy link
Author

Choose a reason for hiding this comment

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

Function umount refactored with the following changes:

return skip('Unable to open /dev/fuse: %s' % exc.strerror)
return skip(f'Unable to open /dev/fuse: {exc.strerror}')
Copy link
Author

Choose a reason for hiding this comment

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

Function fuse_test_marker 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
0 participants