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 11, 2022

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 MediaPreneur May 11, 2022 09:46
Comment thread distribute_setup.py
if ' ' in arg:
return '"%s"' % arg
return arg
return '"%s"' % arg if ' ' in arg else arg

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 _python_cmd.quote refactored with the following changes:

Comment thread distribute_setup.py
Comment on lines -147 to +145
pkg_resources.require("distribute>="+version)
pkg_resources.require(f"distribute>={version}")

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 use_setuptools refactored with the following changes:

Comment thread distribute_setup.py
Comment on lines -186 to +184
tgz_name = "distribute-%s.tar.gz" % version
tgz_name = f"distribute-{version}.tar.gz"

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 download_setuptools refactored with the following changes:

Comment thread distribute_setup.py
Comment on lines -250 to +248
new_name = path + '.OLD.%s' % time.time()
new_name = path + f'.OLD.{time.time()}'

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 _rename_path refactored with the following changes:

Comment thread distribute_setup.py
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
Copy Markdown
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 thread distribute_setup.py
Comment on lines -352 to +350
if arg.startswith('%s=' % option):
if arg.startswith(f'{option}='):

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 _under_prefix refactored with the following changes:

Comment thread distribute_setup.py
Comment on lines -398 to -399
if not res:
return

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 _fake_setuptools refactored with the following changes:

Comment thread stale
@@ -22,6 +22,7 @@

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

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.

Lines 40-40 refactored with the following changes:

Comment thread stale
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
Copy Markdown
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 thread stale
Comment on lines -93 to +94
return url[0:hash_position]
return url[:hash_position]

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