OLS01xxx diagnostics cover Python-level structural issues: parse failures, invalid base classes, malformedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/odoo/odoo-ls/llms.txt
Use this file to discover all available pages before exploring further.
super() calls, and incorrect function argument usage.
OLS01000 — Unable to parse file
OLS01000 — Unable to parse file
Unable to parse file. Ruff_python_parser was unable to parse the file content.OdooLS uses the Ruff Python parser to build a syntax tree for each file. This error fires when the parser fails entirely, meaning the file contains syntax that cannot be parsed.Fix: Check the error message appended to the diagnostic for the specific parser error from Ruff. Common causes are unclosed brackets, invalid indentation, or Python 2 syntax in a Python 3 file.OLS01001 — Base class symbol not found
OLS01001 — Base class symbol not found
{0} not foundThe symbol used as a base class in a class definition cannot be resolved. OdooLS cannot find the name in any reachable scope.OLS01002 — Base class is not a class
OLS01002 — Base class is not a class
{0} not foundThe symbol used as a base class resolves to something that is not a class (for example, a function, variable, or module).Fix: Verify that the symbol you are inheriting from is indeed a class definition.OLS01003 — Multiple definitions for base class
OLS01003 — Multiple definitions for base class
Multiple definition found for base classOdooLS found more than one possible definition for the base class and cannot determine which one to use.Fix: This warning may resolve automatically as OdooLS improves its resolution logic. In the meantime, avoid ambiguous re-exports of class names across modules.OLS01004 — Non-static method must have at least one parameter
OLS01004 — Non-static method must have at least one parameter
Non-static method should have at least one parameterA method defined inside a class body is missing its first positional parameter (conventionally self or cls for class methods).self (or cls for @classmethod) as the first parameter.OLS01005 — First argument to super() must be a class
OLS01005 — First argument to super() must be a class
First Argument to super must be a classWhen calling super() with explicit arguments, the first argument must be a class, not an instance, string, or other value.super(MyModel, self).OLS01006 — super() outside class scope must have arguments
OLS01006 — super() outside class scope must have arguments
Super calls outside a class scope must have at least one argumentsuper() called with no arguments is only valid inside a class body. Outside a class, you must provide at least the class as the first argument.Fix: Move the super() call into a class method, or provide explicit arguments.OLS01007 — Wrong number of positional arguments
OLS01007 — Wrong number of positional arguments
{0} takes {1} positional arguments but {2} was givenA function or method was called with more positional arguments than its signature accepts.OLS01008 — Unexpected keyword argument
OLS01008 — Unexpected keyword argument
{0} got an unexpected keyword argument '{1}'A function was called with a keyword argument that does not appear in its parameter list and it does not accept **kwargs.OLS01009 — Arguments not valid for all function definitions
OLS01009 — Arguments not valid for all function definitions
Arguments are not valid for all function or method definitionsWhen a name resolves to multiple possible function definitions (for example, through multiple inheritance or conditional imports), the arguments provided are not valid for at least one of those definitions.Fix: Review the possible definitions of the called symbol and ensure argument usage is compatible with all of them, or disambiguate the call site.OLS01010 — Missing keyword-only arguments
OLS01010 — Missing keyword-only arguments
Missing keyword-only argument(s): {0}A function was called without providing required keyword-only arguments (arguments defined after * or *args in the signature).