Skip to content

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented May 11, 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 MediaPreneur May 11, 2022 09:46
if ' ' in arg:
return '"%s"' % arg
return arg
return '"%s"' % arg if ' ' in arg else arg
Copy link
Author

Choose a reason for hiding this comment

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

Function _python_cmd.quote refactored with the following changes:

Comment on lines -147 to +145
pkg_resources.require("distribute>="+version)
pkg_resources.require(f"distribute>={version}")
Copy link
Author

Choose a reason for hiding this comment

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

Function use_setuptools refactored with the following changes:

Comment on lines -186 to +184
tgz_name = "distribute-%s.tar.gz" % version
tgz_name = f"distribute-{version}.tar.gz"
Copy link
Author

Choose a reason for hiding this comment

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

Function download_setuptools refactored with the following changes:

Comment on lines -250 to +248
new_name = path + '.OLD.%s' % time.time()
new_name = path + f'.OLD.{time.time()}'
Copy link
Author

Choose a reason for hiding this comment

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

Function _rename_path refactored with the following changes:

Comment on lines -299 to +298
pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1])
setuptools_file = 'setuptools-%s-py%s.egg-info' % \
(SETUPTOOLS_FAKED_VERSION, pyver)
pyver = f'{sys.version_info[0]}.{sys.version_info[1]}'
setuptools_file = f'setuptools-{SETUPTOOLS_FAKED_VERSION}-py{pyver}.egg-info'
Copy link
Author

Choose a reason for hiding this comment

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

Function _create_fake_setuptools_pkg_info refactored with the following changes:

Comment on lines -352 to +350
if arg.startswith('%s=' % option):
if arg.startswith(f'{option}='):
Copy link
Author

Choose a reason for hiding this comment

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

Function _under_prefix refactored with the following changes:

Comment on lines -398 to -399
if not res:
return
Copy link
Author

Choose a reason for hiding this comment

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

Function _fake_setuptools refactored with the following changes:

@@ -22,6 +22,7 @@

"""Identify (and optionally delete) stale Delicious and Pinboard links"""

Copy link
Author

Choose a reason for hiding this comment

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

Lines 40-40 refactored with the following changes:

Comment on lines -73 to +79
url = "%s/%s?%s" % (PINBOARD_API, path, urllib.urlencode(params))
url = f"{PINBOARD_API}/{path}?{urllib.urlencode(params)}"
else:
url = "%s/%s" % (PINBOARD_API, path)
url = f"{PINBOARD_API}/{path}"

if pydelicious.DEBUG: print >>sys.stderr, \
"pinboard_api_request: %s" % url
if pydelicious.DEBUG:
(print >>sys.stderr, f"pinboard_api_request: {url}")
Copy link
Author

Choose a reason for hiding this comment

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

Function pinboard_api_request refactored with the following changes:

Comment on lines -93 to +94
return url[0:hash_position]
return url[:hash_position]
Copy link
Author

Choose a reason for hiding this comment

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

Function sanitize_url 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