Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Sourcery refactored main branch#1

Open
sourcery-ai[bot] wants to merge 1 commit into
mainedson-github/virtualenvwrapper:mainfrom
sourcery/mainedson-github/virtualenvwrapper:sourcery/mainCopy head branch name to clipboard
Open

Sourcery refactored main branch#1
sourcery-ai[bot] wants to merge 1 commit into
mainedson-github/virtualenvwrapper:mainfrom
sourcery/mainedson-github/virtualenvwrapper:sourcery/mainCopy head branch name to clipboard

Conversation

@sourcery-ai

@sourcery-ai sourcery-ai Bot commented Aug 10, 2023

Copy link
Copy Markdown

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

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

Help us improve this pull request!

@sourcery-ai sourcery-ai Bot requested a review from edson-github August 10, 2023 01:44
Comment thread docs/source/conf.py
# General information about the project.
project = u'virtualenvwrapper'
copyright = u'2009-%s, Doug Hellmann' % datetime.datetime.today().year
copyright = f'2009-{datetime.datetime.now().year}, Doug Hellmann'

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

project, project_dir = args
filename = os.path.join(project_dir, 'TEST_FILE')
print('Writing to %s' % filename)
print(f'Writing to {filename}')

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

# Set up logging to a file
logfile = os.environ.get('VIRTUALENVWRAPPER_LOG_FILE')
if logfile:
if logfile := os.environ.get('VIRTUALENVWRAPPER_LOG_FILE'):

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

This removes the following comments ( why? ):

# Set up logging to a file

Comment on lines -166 to +169
namespace = 'virtualenvwrapper.%s' % hook
namespace = f'virtualenvwrapper.{hook}'
if options.names:
log.debug('looking for %s hooks %s' % (namespace, options.names))
log.debug(f'looking for {namespace} hooks {options.names}')
hook_mgr = NamedExtensionManager(namespace, options.names)
else:
log.debug('looking for %s hooks' % namespace)
log.debug(f'looking for {namespace} hooks')

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

Comment on lines -32 to +34
else:
for path in os.environ['PATH'].split(';'):
if os.path.exists(os.path.join(path, 'sh.exe')):
return [get_path(path, 'sh.exe')]
for path in os.environ['PATH'].split(';'):
if os.path.exists(os.path.join(path, 'sh.exe')):
return [get_path(path, 'sh.exe')]

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.