-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor refactors, found by static analysis (#7587)
* Remove deprecated methods in `celery.local.Proxy` * Collapse conditionals for readability * Remove unused parameter `uuid` * Remove unused import `ClusterOptions` * Remove dangerous mutable default argument Continues work from #5478 * Remove always `None` and unused global variable * Remove unreachable `elif` block * Consolidate import statements * Add missing parameter to `os._exit()` * Add missing assert statement * Remove unused global `WindowsError` * Use `mkstemp` instead of deprecated `mktemp` * No need for `for..else` constructs in loops that don't break In these cases where the loop returns or raises instead of breaking, it is simpler to just put the code that runs after the loop completes right after the loop instead. * Use the previously unused parameter `compat_modules` Previously this parameter was always overwritten by the value of `COMPAT_MODULES.get(name, ())`, which was very likely unintentional. * Remove unused local variable `tz` * Make `assert_received` actually check for `is_received` Previously, it called `is_accepted`, which was likely a copy-paste mistake from the `assert_accepted` method. * Use previously unused `args` and `kwargs` params Unlike other backends' `__reduce__` methods, the one from `RedisBackend` simply overwrites `args` and `kwargs` instead of adding to them. This change makes it more in line with other backends. * Update celery/backends/filesystem.py Co-authored-by: Gabriel Soldani <1268700+gabrielsoldani@users.noreply.github.com> Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
- Loading branch information
1 parent
4627b93
commit 59263b0
Showing
17 changed files
with
27 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ def it(_, n): | |
n, total, n / (total + .0), | ||
)) | ||
import os | ||
os._exit() | ||
os._exit(0) | ||
it.cur += 1 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters