Python

Python

Made by DeepSource
Use of a non-existent operator detected PYL-E0107
Bug risk
Major

Detected the use of one of the C-style pre/post increment or decrement operators, -- and ++, which don't exist in Python. Use the += or -= operators instead.

Debugger import detected PTC-W0013
Bug risk
Major
Autofix

Debuggers should only be used temporarily and locally. It is highly recommended to remove debug statements in checked-in code.

Invalid metaclass PYL-E1139
Bug risk
Major

The class is using, as a metaclass, something which might be invalid for using as a metaclass.

continue statement outside of a while or for loop FLK-F702
Bug risk
Critical

continue statement cannot not be used outside a loop. This will raise a SyntaxError

Logging format string terminated in between conversion specifier PYL-E1201
Bug risk
Critical

Logging statement format string shall not terminate before the end of a conversion specifier.

Multiple values found for keyword argument PYL-E1132
Bug risk
Critical

The function was invoked with more than one values for a keyword argument. This is an error.

New-style class raised which doesn't inherit from BaseException PYL-E0710
Bug risk
Critical

New-style classes raised must inherit from BaseException.

Abstract class instantiated PYL-E0110
Bug risk
Critical

An abstract class with abc.ABCMeta as metaclass has abstract methods and is instantiated. This will result in a TypeError as Python can't instantiate abstract class with abstract methods.

Invalid star assignment target PYL-E0113
Bug risk
Major
Autofix

A star expression is being used as a starred assignment target. In order to do that, the starred assignment target must be in a list or tuple, otherwise Python will throw a SyntaxError.

init method converted to generator PYL-E0100
Bug risk
Critical

The __init__() method is required to return nothing, but a yield statement in its body was detected. This will raise a TypeError.

Local variable name referenced before assignment FLK-F823
Bug risk
Critical

Local variables should be defined before they are referenced.

Name used prior global declaration PYL-E0118
Bug risk
Critical
Autofix

A global variable is being accessed in a local scope before it has been defined with a global statement. Doing so will raise a SyntaxError.

import module shadowed by loop variable FLK-F402
Bug risk
Major

Loop variables should not redefine the name of modules that are imported.

Dictionary key variable name repeated with different values FLK-F602
Bug risk
Major

All dictionary keys should be unique.

Format string truncated PYL-E1301
Bug risk
Major

The format string was terminated before the end of a conversion specifier. It is recommended to look again and verify if the conversion specifier is given.

Deletion attempted with unsupported object PYL-E1138
Bug risk
Critical

Deletion is supported only for items which implement __delitem__.

Bad first argument given in super() call PYL-E1003
Bug risk
Critical

The first argument to the super() function must be the current class.

Unexpected indentation FLK-E113
Bug risk
Major

A line is indented when it shouldn’t be. Usually this will mean that multiple lines need to be indented at the same level.

Misplaced format function PYL-E0119
Bug risk
Critical

The format() function is called on an object that is not a string. This is an error. Incorrect code: