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

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Aug 24, 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 aaronsteers August 24, 2022 15:42
py
Comment on lines -26 to +29
exec(open('%s/.pythonpy.py' % os.environ['HOME']).read())
exec(open(f"{os.environ['HOME']}/.pythonpy.py").read())
except:
pass

Copy link
Author

Choose a reason for hiding this comment

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

Lines 26-29 refactored with the following changes:

py
module = __import__(module_name)
globals()[raw_module_name] = module
import_matches(query, prefix='%s.' % module_name)
import_matches(query, prefix=f'{module_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 import_matches refactored with the following changes:

py
if args.ignore_exceptions:
pass
else:
if not args.ignore_exceptions:
Copy link
Author

Choose a reason for hiding this comment

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

Function loads refactored with the following changes:

entry_points_scripts.append(py_entry % e)
entry_points_scripts.append(pycompleter_entry % e)

entry_points_scripts.extend((py_entry % e, pycompleter_entry % e))
Copy link
Author

Choose a reason for hiding this comment

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

Lines 10-12 refactored with the following changes:

module = __import__(module_name)
globals()[raw_module_name] = module
import_matches(query, prefix='%s.' % module_name)
import_matches(query, prefix=f'{module_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 import_matches refactored with the following changes:

if args.ignore_exceptions:
pass
else:
if not args.ignore_exceptions:
Copy link
Author

Choose a reason for hiding this comment

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

Function loads refactored with the following changes:

Comment on lines -53 to +56
l = list()
l = []
if completion_args['c_arg']:
exec(completion_args['c_arg'].strip('"\'').replace("`", "'"))
context = locals()
context.update(globals())
context = locals() | globals()
Copy link
Author

Choose a reason for hiding this comment

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

Function complete_all refactored with the following changes:

Comment on lines -201 to 202
if m:
modules.append(m.group('name'))
modules.append(m['name'])
return list(set(modules))

Copy link
Author

Choose a reason for hiding this comment

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

Function get_completerlib refactored with the following changes:

Comment on lines -312 to +313
if str_.endswith('('):
return str_[:-1]
return str_
return str_[:-1] if str_.endswith('(') else 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 remove_trailing_paren refactored with the following changes:

Comment on lines -327 to +333
if len(options) == 0:
if not options:
return

if len(current_list(input)) > 1 and max(map(len, options)) + 1 >= len(current_raw(input)):
options.append(current_prefix(input))

if len(options) <= 1:
options = options + [x + "'" for x in options]
options += [x + "'" for x in options]
Copy link
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:

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.