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

fix most of #544 and some minor refactoring. #595

Merged
merged 9 commits into from Dec 28, 2022
Merged

fix most of #544 and some minor refactoring. #595

merged 9 commits into from Dec 28, 2022

Conversation

Alex-CodeLab
Copy link

Description

fix some pep8 issues

and some minor refactoring ( using contextlib.suppress )

Fixes #(issue)
#544

@lieryan
Copy link
Member

lieryan commented Dec 14, 2022

Hi @Alex-CodeLab, thanks for taking the time to make this PR.

Just a couple things here, I think rather than creating the NullJobSet inside the method, it would make things simpler and better to make a global DEFAULT_TASK_HANDLER in taskhandle.py:

DEFAULT_TASK_HANDLER = NullJobSet()

and in functions that needed them:

def call(self, job_set=taskhandle.DEFAULT_TASK_HANDLER):

that'll reduce the line of code that is needed to instantiate the task handler as well as being much more informative when using the view function parameters function in your editor which will direct the caller to see that job_set argument takes something from taskhandle module instead of the much less useful job_set=None.

@lieryan lieryan merged commit 8101fa8 into python-rope:master Dec 28, 2022
@lieryan
Copy link
Member

lieryan commented Dec 28, 2022

Thanks for the contribution @Alex-CodeLab!

@lieryan lieryan added this to the 1.7.0 milestone Jan 17, 2023
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.

None yet

2 participants