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

Community App Store (Sourcery refactored) #162

Merged
merged 2 commits into from
May 2, 2022
Merged

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented May 2, 2022

Pull Request #69 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

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 app_store branch, then run:

git fetch origin sourcery/app_store
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from Archmonger May 2, 2022 00:50
Comment on lines -51 to +59
"Found --process-dependency-links flag, version {} doesn't need that yet though, removing.".format(
pip_version
)
f"Found --process-dependency-links flag, version {pip_version} doesn't need that yet though, removing."
)

args.remove("--process-dependency-links")

# strip --no-cache-dir for versions that don't support it
if pip_version not in cls.no_cache_dir and "--no-cache-dir" in args:
logger.debug(
"Found --no-cache-dir flag, version {} doesn't support that yet though, removing.".format(
pip_version
)
f"Found --no-cache-dir flag, version {pip_version} doesn't support that yet though, removing."
)

Copy link
Author

Choose a reason for hiding this comment

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

Function PipCaller.clean_install_command refactored with the following changes:

Comment on lines -256 to +253
"Cannot use this pip install, can't write to the install dir and also can't use "
"--user for installing. Check your setup and the permissions on {}.".format(
pip_install_dir
)
f"Cannot use this pip install, can't write to the install dir and also can't use --user for installing. Check your setup and the permissions on {pip_install_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 PipCaller._setup_pip refactored with the following changes:

Comment on lines -318 to +313
'Using "{}" as command to invoke pip'.format(" ".join(command))
f'Using "{" ".join(command)}" as command to invoke pip'
)

Copy link
Author

Choose a reason for hiding this comment

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

Function PipCaller.autodetect_pip refactored with the following changes:

Comment on lines -326 to +320
if isinstance(pip_command, list):
sarge_command = pip_command
else:
sarge_command = [pip_command]
sarge_command = pip_command if isinstance(pip_command, list) else [pip_command]
Copy link
Author

Choose a reason for hiding this comment

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

Function PipCaller.to_sarge_command refactored with the following changes:

Comment on lines -345 to +338
"Using cached pip version information for {}".format(
pip_command_str
)
f"Using cached pip version information for {pip_command_str}"
)

Copy link
Author

Choose a reason for hiding this comment

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

Function PipCaller._get_pip_version refactored with the following changes:

Comment on lines 410 to 399
self._logger.debug(
"Using cached pip setup information for {}".format(pip_command_str)
)
self._logger.debug(f"Using cached pip setup information for {pip_command_str}")
Copy link
Author

Choose a reason for hiding this comment

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

Function PipCaller._check_pip_setup refactored with the following changes:

Comment on lines -550 to +536
"pip installs to {} (writable -> {}), --user flag needed -> {}, "
"virtual env -> {}".format(
install_dir,
"yes" if writable else "no",
"yes" if user_flag else "no",
"yes" if virtual_env else "no",
)
f'pip installs to {install_dir} (writable -> {"yes" if writable else "no"}), --user flag needed -> {"yes" if user_flag else "no"}, virtual env -> {"yes" if virtual_env else "no"}'
)
self._logger.info("==> pip ok -> {}".format("yes" if ok else "NO!"))

self._logger.info(f'==> pip ok -> {"yes" if ok else "NO!"}')
Copy link
Author

Choose a reason for hiding this comment

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

Function LocalPipCaller._check_pip_setup refactored with the following changes:

@Archmonger Archmonger merged commit 9c97c94 into app_store May 2, 2022
@Archmonger Archmonger deleted the sourcery/app_store branch May 2, 2022 00:52
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.

1 participant