-
Notifications
You must be signed in to change notification settings - Fork 1
Sourcery Starbot ⭐ refactored wallies/deadpool #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ def pid(self, value): | |
| try: | ||
| self.pid_callback(self._pid) | ||
| except Exception: # pragma: no cover | ||
| logger.exception(f"Error calling pid_callback") | ||
| logger.exception("Error calling pid_callback") | ||
|
|
||
| def add_pid_callback(self, fn): | ||
| self.pid_callback = fn | ||
|
|
@@ -160,7 +160,7 @@ def timed_out(): | |
| try: | ||
| self.running_jobs.get_nowait() | ||
| except Empty: # pragma: no cover | ||
| logger.warning(f"Weird error, did not expect running jobs to be empty") | ||
| logger.warning("Weird error, did not expect running jobs to be empty") | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
|
|
||
| def submit(self, __fn: Callable, *args, timeout=None, **kwargs) -> Future: | ||
| if self.closed: | ||
|
|
@@ -193,7 +193,7 @@ def raw_runner(conn: Connection, fn, args, kwargs, initializer, initargs, finiti | |
| try: | ||
| initializer(*initargs) | ||
| except: | ||
| logger.exception(f"Initializer failed") | ||
| logger.exception("Initializer failed") | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
|
|
||
| try: | ||
| results = fn(*args, **kwargs) | ||
|
|
@@ -208,7 +208,7 @@ def raw_runner(conn: Connection, fn, args, kwargs, initializer, initargs, finiti | |
| try: | ||
| finitializer(*finitargs) | ||
| except: | ||
| logger.exception(f"Finitializer failed") | ||
| logger.exception("Finitializer failed") | ||
|
|
||
|
|
||
| # Taken fromhttps | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ def f_err(exception_class, *args, **kwargs): | |
|
|
||
|
|
||
| def test_abc(): | ||
| assert 1 == 1 | ||
| pass | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
|
|
||
|
|
||
| def test_simple(): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function
Future.pidrefactored with the following changes:remove-redundant-fstring)