Code Quality detectors
Inefficient string concatenation inside loops results in new object creation which adds quadratic runtime cost.
To always return the subscription ARN, set the ReturnSubscriptionArn
argument to True
.
Iteration when only one item is needed from a list is inefficient.
Using outdated multiprocessing API calls and parameters is not recommended.
Catching and re-throwing an exception without further actions is redundant and wasteful.
Swallowing exceptions, without re-throwing or logging them, is a bad practice.
This code uses deprecated methods, which suggests that it has not been recently reviewed or maintained.
Default values in Python are created exactly once, when the function is defined. If that object is changed, subsequent calls to the function will refer to the changed object, leading to confusion.
Violating PEP8 programming recommendations might make code difficult to read and can introduce ambiguity.
Complex code can be difficult to read and hard to maintain.
Confusion between equality ==
, !=
and identity is
in conditional expressions can lead to unintended behavior.
The constructors for the hashlib
module are faster than new()
Global variables can be dangerous and cause bugs because they can be simultaneously accessed from multiple sections of a program.
The Debug feature should not be enabled or overridden.
Using the get
method from the dict
class without default values can cause runtime exceptions.
The os.close()
does not work on some platforms.
Methods that return multiple values can be difficult to read and prone to error.
Throwing a base or generic exception might cause important error information to be lost. This can make your code difficult to maintain.
Incorrect use of API leads to ambiguity and inconsistency
list
replication using replication operator creates references to the existing objects, not copies, which could introduce bugs.
Custom polling can be inefficient and prone to error. Consider using AWS waiters instead.
Directly modifying the dict object might cause undesirable behavior due to symbol table modification.
The Process.terminate
API might cause data corruption of shared resources.