Conversation
| EXITCODE = 0 | ||
| namespace = globals().copy() | ||
| namespace.update(locals()) | ||
| namespace = globals() | locals() |
There was a problem hiding this comment.
Function spy refactored with the following changes:
- Merge dictionary updates via the union operator [×2] (
dict-assign-update-to-union) - Hoist repeated code outside conditional statement [×3] (
hoist-statement-from-if) - Move assignment closer to its usage within a block (
move-assign-in-block) - Remove a redundant constructor in a dictionary union (
remove-redundant-constructor-in-dict-union) - Inline variable that is immediately returned (
inline-immediately-returned-variable)
| namespace = globals().copy() | ||
| namespace.update(locals()) | ||
| namespace = globals() | locals() |
There was a problem hiding this comment.
Function remove_trace refactored with the following changes:
- Merge dictionary updates via the union operator [×2] (
dict-assign-update-to-union) - Remove a redundant constructor in a dictionary union (
remove-redundant-constructor-in-dict-union)
| namespace = globals().copy() | ||
| namespace.update(locals()) | ||
|
|
||
| namespace = globals() | locals() |
There was a problem hiding this comment.
Function archive refactored with the following changes:
- Merge dictionary updates via the union operator [×2] (
dict-assign-update-to-union) - Remove a redundant constructor in a dictionary union (
remove-redundant-constructor-in-dict-union)
| if is_mode_donotrun: | ||
| if config is not None: | ||
| if config is not None: | ||
| if is_mode_donotrun: | ||
| del modules_copy[module] | ||
| else: | ||
| if config is not None: | ||
| else: |
There was a problem hiding this comment.
Function get_modules refactored with the following changes:
- Hoist nested repeated code outside conditional statements (
hoist-similar-statement-from-if)
| EXITCODE = spy(active_modules) | ||
|
|
||
| # tar = arguments.tar | ||
| # if arguments.remove: | ||
| # remove_trace(active_modules) | ||
| # elif tar is not None: | ||
| # archive(active_modules, tar) | ||
|
|
||
| return EXITCODE | ||
| return spy(active_modules) |
There was a problem hiding this comment.
Function main refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
This removes the following comments ( why? ):
# tar = arguments.tar
# elif tar is not None:
# remove_trace(active_modules)
# archive(active_modules, tar)
# if arguments.remove:
| @@ -32,6 +32,7 @@ | |||
| >>> filesSpy(argv=["FilesLogger.py", "filesSpy.conf"]) # (using argv) | |||
| """ | |||
|
|
|||
There was a problem hiding this comment.
Lines 60-60 refactored with the following changes:
- Use previously assigned local variable (
use-assigned-variable)
|
|
||
| is_pressed = self.is_pressed | ||
| if is_pressed: | ||
| if is_pressed := self.is_pressed: |
There was a problem hiding this comment.
Function KeyLogger.get_event_release refactored with the following changes:
- Use named expression to simplify assignment and conditional (
use-named-expression)
This removes the following comments ( why? ):
# code = self.get_code(event)
| @@ -23,6 +23,7 @@ | |||
| This file implements a keylogger. | |||
| """ | |||
|
|
|||
There was a problem hiding this comment.
Lines 51-51 refactored with the following changes:
- Use previously assigned local variable (
use-assigned-variable)
| @@ -23,6 +23,7 @@ | |||
| This file implements a SpyWare to capture the screen. | |||
| """ | |||
|
|
|||
There was a problem hiding this comment.
Lines 51-51 refactored with the following changes:
- Use previously assigned local variable (
use-assigned-variable)
| @@ -23,6 +23,7 @@ | |||
| This file implements a SpyWare to take picture with Webcam. | |||
| """ | |||
|
|
|||
There was a problem hiding this comment.
Lines 51-51 refactored with the following changes:
- Use previously assigned local variable (
use-assigned-variable)
Branch
mainrefactored 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
mainbranch, then run:Help us improve this pull request!