- oelint_parser
- oelint_parser.cls_stash
- Stash
- StashList
- __init__
- AddFile
- FingerPrint
- Append
- Remove
- AddDistroMachineFromLayer
- Finalize
- GetRecipes
- GetLoneAppends
- GetConfFiles
- GetBBClasses
- GetLinksForFile
- Reduce
- GetItemsFor
- ExpandVar
- GetFiles
- GetLayerRoot
- FindLocalOrLayer
- GetScrComponents
- SafeLineSplit
- GuessRecipeName
- GuessBaseRecipeName
- GuessRecipeVersion
- ExpandTerm
- GetValidPackageNames
- GetValidNamedResources
- IsImage
- IsPackageGroup
- GetPackagesDynamic
- IsDynamicPackage
- Stash
- oelint_parser.inlinerep
- oelint_parser.cls_item
- oelint_parser.rpl_regex
- oelint_parser.parser
- oelint_parser.constants
oelint_parser is a library to parse bitbake files.
class Stash()The Stash object is the central storage for extracting the bitbake information.
class StashList(UserList)Extended list of Items.
def __init__(stash: 'Stash', items: Iterable[Item]) -> NoneStashList - Extended list of Items.
Arguments:
stashStash - Parent stash objectitemsIterable - Iterable input
def insert(index: int, item: Item) -> NoneInsert into list
Arguments:
indexint - index where to insertitemItem - object to insert
def append(item: Union[Item, Iterable[Item]]) -> NoneAppend to list
Arguments:
itemUnion[Item, Iterable[Item]] - Item or Iterable of Items
def extend(other: 'Stash.StashList') -> NoneExtend list
Arguments:
otherStash.StashList - Other stash other
def remove(item: Union[Item, Iterable[Item]]) -> NoneRemove from list
Arguments:
itemItem - Item(s) to remove
def reduce(filename: str = None,
classifier: Union[Iterable[str], str] = None,
attribute: Union[Iterable[str], str] = None,
attributeValue: Union[Iterable[str], str] = None,
nolink: bool = False) -> 'Stash.StashList'Filters the list.
NOTE: This is a destructive operation. If you want to have a copy returned use
Stash.Reduce(,...) instead.
Arguments:
filenamestr, optional - Full path to file. Defaults to None.classifierUnion[Iterable[str], str], optional - (iterable of) class specifier (e.g. Variable). Defaults to None.attributeUnion[Iterable[str], str], optional - (iterable of) class attribute name. Defaults to None.attributeValueUnion[Iterable[str], str], optional - (iterable of) value of the class attribute value. Defaults to None.nolinkbool, optional - Consider linked files. Defaults to False.
Returns:
Stash.StashList- self
def __init__(quiet: bool = False,
new_style_override_syntax: bool = False,
negative_inline: bool = False) -> NoneStash object
Arguments:
quietbool, optional - No progress printing. Defaults to False.new_style_override_syntaxbool, optional - Enforce new override syntax. Defaults to False.negative_inlinebool, optional - Negative branch inline expansion. Defaults to False.
def AddFile(_file: str,
lineOffset: int = 0,
forcedLink: str = None) -> List[Item]Adds a file to the stash
Arguments:
_filestr - Full path to file
Arguments:
lineOffsetint - Line offset from the file that include this file (default: {0})forcedLinktype - Force link against a file (default: {None})
Returns:
list- List of {oelint_parser.cls_item.Item}
@property
def FingerPrint() -> strGet the SHA1 fingerprint of the current Stash
Returns:
str- hexdigest checksum
def Append(item: Union[Item, Iterable[Item]]) -> Noneappends one or mote items to the stash
Arguments:
itemItem - Item(s) to append
def Remove(item: Union[Item, Iterable[Item]]) -> Noneremoves one or more items from the stash
Arguments:
itemItem - Item(s) to remove
def AddDistroMachineFromLayer(path: str) -> Noneadds machine and distro configuration from the layer of the provided file
Arguments:
pathstr - Path to file
def Finalize() -> Nonefinalize the dependencies within the stash
@functools.cache
def GetRecipes() -> NoneGet bb files in stash
Returns:
list- List of bb files in stash
@functools.cache
def GetLoneAppends() -> List[str]Get bbappend without a matching bb
Returns:
list- list of bbappend without a matching bb
@functools.cache
def GetConfFiles() -> List[str]Get configurations files
Returns:
List[str]- List of configuration files
@functools.cache
def GetBBClasses() -> List[str]Get bbclass files
Returns:
List[str]- List of bbclass files
@functools.cache
def GetLinksForFile(filename: str) -> List[str]Get file which this file is linked against
Arguments:
filenamestr - full path to file
Returns:
list- list of full paths the file is linked against
def Reduce(in_list: Iterable[Item],
filename: str = None,
classifier: Union[Iterable[str], str] = None,
attribute: Union[Iterable[str], str] = None,
attributeValue: Union[Iterable[str], str] = None,
nolink: bool = False) -> List[Item]Reduce a list by filtering
Arguments:
in_listStash.StashList - Input list.filenamestr, optional - Full path to file. Defaults to None.classifierUnion[Iterable[str], str], optional - (iterable of) class specifier (e.g. Variable). Defaults to None.attributeUnion[Iterable[str], str], optional - (iterable of) class attribute name. Defaults to None.attributeValueUnion[Iterable[str], str], optional - (iterable of) value of the class attribute value. Defaults to None.nolinkbool, optional - Consider linked files. Defaults to False.
Returns:
List[Item]- Returns a list of items fitting the set filters
def GetItemsFor(filename: str = None,
classifier: Union[Iterable[str], str] = None,
attribute: Union[Iterable[str], str] = None,
attributeValue: Union[Iterable[str], str] = None,
nolink: bool = False) -> 'Stash.StashList'Get items for filename
Arguments:
filenamestr, optional - Full path to file. Defaults to None.classifierUnion[Iterable[str], str], optional - (iterable of) class specifier (e.g. Variable). Defaults to None.attributeUnion[Iterable[str], str], optional - (iterable of) class attribute name. Defaults to None.attributeValueUnion[Iterable[str], str], optional - (iterable of) value of the class attribute value. Defaults to None.nolinkbool, optional - Consider linked files. Defaults to False.
Returns:
Stash.StashList- Returns a list of items fitting the set filters
def ExpandVar(filename: str = None,
attribute: Union[Iterable[str], str] = None,
attributeValue: Union[Iterable[str], str] = None,
nolink: bool = False) -> dictExpand variable to dictionary
Arguments:
filenamestr - Full path to file (default: {None})attributestr - class attribute name (default: {None})attributeValuestr - value of the class attribute name (default: {None})nolinkbool - Consider linked files (default: {False})
Returns:
{dict}- expanded variables from call + base set of variables
@functools.cache
def GetFiles(_file: str, pattern: str) -> List[str]Get files matching SRC_URI entries
Arguments:
_filestr - Full path to filenamepatternstr - glob pattern to apply
Returns:
list- list of files matching pattern
@functools.cache
def GetLayerRoot(name: str) -> strFind the path to the layer root of a file
Arguments:
namestr - filename
Returns:
str- path to layer root or empty string
@functools.cache
def FindLocalOrLayer(name: str, localdir: str) -> strFind file in local dir or in layer
Arguments:
namestr - filenamelocaldirstr - path to local dir
Returns:
str- path to found file or None
@functools.cache
def GetScrComponents(string: str) -> dictReturn SRC_URI components
Arguments:
stringstr - raw string
Returns:
dict- scheme: protocol used, src: source URI, options: parsed options
@functools.cache
def SafeLineSplit(string: str) -> List[str]Split line in a safe manner
Arguments:
stringstr - raw input
Returns:
list- safely split input
@functools.cache
def GuessRecipeName(_file: str) -> strGet the recipe name from filename
Arguments:
_filestr - filename
Returns:
str- recipe name
@functools.cache
def GuessBaseRecipeName(_file: str) -> strGet the base recipe name from filename (aka BPN)
Arguments:
_filestr - filename
Returns:
str- recipe name
@functools.cache
def GuessRecipeVersion(_file: str) -> str | NoneGet recipe version from filename
Arguments:
_filestr - filename
Returns:
str- recipe version
def ExpandTerm(_file: str,
value: str,
spare: List[str] = None,
seen: List[str] = None,
objref: Variable = None) -> strExpand a variable (replacing all variables by known content)
Arguments:
_filestr - Full path to filevaluestr - Variable value to expandsparelist[str] - items to keep unexpanded (default: None)seenlist[str] - seen items (default: None)objrefVariable - reference to the calling variable instance (default: None)
Returns:
str- expanded value
@functools.cache
def GetValidPackageNames(_file: str, strippn: bool = False) -> List[str]Get known valid names for packages
Arguments:
_filestr - Full path to filestrippnbool - strip the package name (default: False)
Returns:
list- list of valid package names
@functools.cache
def GetValidNamedResources(_file: str) -> List[str]Get list of valid SRCREV resource names
Arguments:
_filestr - Full path to file
Returns:
list- list of valid SRCREV resource names
@functools.cache
def IsImage(_file: str) -> boolreturns if the file is likely an image recipe or not
Arguments:
_filestr - Full path to file
Returns:
bool- True if _file is an image recipe
@functools.cache
def IsPackageGroup(_file: str) -> boolreturns if the file is likely a packagegroup recipe or not
Arguments:
_filestr - Full path to file
Returns:
bool- True if _file is a packagegroup recipe
@functools.cache
def GetPackagesDynamic(_file: str) -> Set[str]returns set of dynamic package patterns defined for _file
Arguments:
_filestr - Full path to file
Returns:
Set[str]- set of dynamic package patterns
@functools.cache
def IsDynamicPackage(_file: str, name: str) -> boolreturns if the name is likely a dynamic package or not
Arguments:
_filestr - Full path to filenamestr - Name to check
Returns:
bool- True if name is a dynamic package
def bb_utils_filter(_in: str, negative_clause: bool = False) -> strbb.utils.filter emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def bb_utils_contains(_in: str, negative_clause: bool = False) -> strbb.utils.contains emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def bb_utils_contains_any(_in: str, negative_clause: bool = False) -> strbb.utils.contains_any emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def oe_utils_conditional(_in: str, negative_clause: bool = False) -> stroe.utils.conditional emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def oe_utils_ifelse(_in: str, negative_clause: bool = False) -> stroe.utils.ifelse emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def oe_utils_any_distro_features(_in: str,
negative_clause: bool = False) -> stroe.utils.any_distro_features emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def oe_utils_all_distro_features(_in: str,
negative_clause: bool = False) -> stroe.utils.all_distro_features emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def oe_utils_vartrue(_in: str, negative_clause: bool = False) -> stroe.utils.vartrue emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def oe_utils_less_or_equal(_in: str, negative_clause: bool = False) -> stroe.utils.less_or_equal emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def oe_utils_version_less_or_equal(_in: str,
negative_clause: bool = False) -> stroe.utils.version_less_or_equal emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def oe_utils_both_contain(_in: str, negative_clause: bool = False) -> stroe.utils.both_contain emulation
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- True argument of the conditional or None if not applicable
def d_getvar(_in: str) -> strd.getVar emulation in inline block
Arguments:
_instr - Input string
Returns:
str- Variable reference if found
def inlinerep(_in: str, negative_clause: bool = False) -> strReplaces inline code expressions
Arguments:
_instr - Input stringnegative_clausebool - return negative branch
Returns:
str- Expanded string or None, if not applicable
noqa: P103
class Item()Base class for all Stash items
def __init__(origin: str,
line: int,
infileline: int,
rawtext: str,
realraw: str,
inline_blocks: List[Tuple[str, str]],
new_style_override_syntax: bool = False) -> Noneconstructor
Arguments:
originstr - Full path of origin filelineint - Overall line counterinfilelineint - Line number in filerawtextstr - Raw input string (except inline code blocks)realrawstr - Unprocessed input
Arguments:
new_style_override_syntaxbool - Use ':' a override delimiter (default: {False})
@property
def Line() -> intOverall line count
Returns:
int- overall line count of item
@property
def Raw() -> strRaw string (without inline code blocks)
Returns:
str- raw string of item
@property
def Origin() -> strorigin of item
Returns:
str- full path of origin file
@property
def InFileLine() -> intLine count in file
Returns:
int- [description]
@property
def RealRaw() -> strCompletely unprocessed raw text
Returns:
str- completely unprocessed raw text
@property
def IsFromClass() -> boolItem comes from a bbclass
Returns:
bool- if item was set in a bbclass
@property
def OverrideDelimiter() -> strOverride delimiter
Returns:
str- Override delimiter
@property
def IsNewStyleOverrideSyntax() -> boolNew style override syntax detected
Returns:
bool- True if new style has been detected
@staticmethod
def safe_linesplit(string: str) -> List[str]Safely split an input line to chunks
Arguments:
stringstr - raw input string
Returns:
list- list of chunks of original string
def get_items() -> List[str]Return single items
Returns:
list- lines of raw input
def extract_sub(name: str) -> Tuple[List[str], List[str]]Extract modifiers
Arguments:
namestr - input string
Returns:
tuple- clean variable name, modifiers, package specific modifiers
def extract_sub_func(name: str) -> Tuple[List[str], List[str]]Extract modifiers for functions
Arguments:
namestr - input value
Returns:
tuple- clean function name, modifiers
def IsFromAppend() -> boolItem originates from a bbappend
Returns:
bool- True if coming from a bbappend
def GetAttributes() -> dictGet all public attributes of this class
Returns:
dict- all public attributes and their values
class Variable(Item)Items representing variables in bitbake.
def __init__(name: str, value: str, operator: str, *args, **kwargs) -> Noneconstructor
Arguments:
namestr - Variable namevaluestr - Variable valueoperatorstr - Operation performed to the variable
@property
def VarName() -> strVariable name
Returns:
str- name of variable
@property
def SubItem() -> strVariable modifiers
Returns:
str- variable modifiers like packages, machines, appends, prepends
@property
def SubItems() -> List[str]Variable modifiers list
Returns:
list- variable modifiers list like packages, machines, appends, prepends
@property
def VarValue() -> strvariable value
Returns:
str- unstripped variable value
@property
def VarOp() -> strVariable operation
Returns:
str- operation did on the variable
@property
def VarNameComplete() -> strComplete variable name included overrides and flags
Returns:
str- complete variable name
@property
def VarNameCompleteNoModifiers() -> strComplete variable name included overrides but without modifiers like append, prepend and remove
Returns:
str- complete variable name
@property
def RawVarName() -> strVariable name and flags combined
Returns:
str- raw representation of the variable name
@property
def VarValueStripped() -> strStripped variable value
Returns:
str- stripped version of variable value
def IsAppend() -> boolCheck if operation is an append
Returns:
bool- True is variable is appended
def AppendOperation() -> List[str]Get variable modifiers
Returns:
list- list could contain any combination of 'append', ' += ', 'prepend' and 'remove'
def get_items(override: str = "", versioned: bool = False) -> List[str]Get items of variable value
Arguments:
overridestr - String to take instead of VarValueversionedbool - items can be versioned (versions will be stripped in this case)
Returns:
list- clean list of items in variable value
def IsMultiLine() -> boolCheck if variable has a multiline assignment
Returns:
bool- True if multiline
def GetDistroEntry() -> strGet distro specific entries in variable
Returns:
str- distro specific modifier of variable or ""
def GetMachineEntry() -> strGet machine specific entries in variable
Returns:
str- machine specific modifier of variable or ""
def GetClassOverride() -> strGet class specific entries in variable
Returns:
str- class specific modifier of variable or ""
def IsImmediateModify() -> boolVariable operation is done immediately
Returns:
bool- true if it isn't a prepend/append or remove operation
class Comment(Item)Items representing comments in bitbake.
def __init__(*args, **kwargs) -> Noneconstructor
def get_items() -> List[str]Get single lines of block
Returns:
list- single lines of comment block
class Include(Item)Items that representing include/require statements.
def __init__(incname: str, fileincluded: str, statement: str, *args,
**kwargs) -> Noneconstructor
Arguments:
incnamestr - raw name of the include filefileincludedstr - path of the file includedstatementstr - either include or require
@property
def IncName() -> strInclude name
Returns:
str- name of the file to include/require
@property
def Statement() -> strstatement either include or require
Returns:
str- include or require
@property
def FileIncluded() -> strThe file included
Returns:
str- path to file
def get_items() -> Tuple[str, str]Get items
Returns:
list- include name, include statement
class Export(Item)Items representing export statements in bitbake.
def __init__(name: str, value: str, *args, **kwargs) -> Noneconstructor
Arguments:
namestr - variable name of the exportvaluestr - (optional) value of the export
Arguments:
new_style_override_syntaxbool - Use ':' a override delimiter (default: {False})
@property
def Name() -> strName of the exported var
Returns:
str- name of the exported var
@property
def Value() -> strvalue of the export
Returns:
str- optional value of the export
def get_items() -> Tuple[str, str]Get items
Returns:
list- include name, include statement
class Function(Item)Items representing task definitions in bitbake.
def __init__(name: str,
body: str,
python: bool = False,
fakeroot: bool = False,
*args,
**kwargs) -> None[summary]
Arguments:
namestr - Raw function namebodystr - Function body
Arguments:
pythonbool - python function according to parser (default: {False})fakerootbool - uses fakeroot (default: {False})
@property
def IsPython() -> boolIs python function
Returns:
bool- is a python function
@property
def IsFakeroot() -> boolIs fakeroot function
Returns:
bool- is a python function
@property
def FuncName() -> strFunction name
Returns:
str- name of function
@property
def FuncNameComplete() -> strComplete function name (including overrides)
Returns:
str- complete name of function
@property
def SubItem() -> strFunction modifiers
Returns:
str- function modifiers like packages, machines, appends, prepends
@property
def SubItems() -> List[str]Function modifiers list
Returns:
list- function modifiers list like packages, machines, appends, prepends
@property
def FuncBody() -> strFunction body
Returns:
str- function body text
@property
def FuncBodyStripped() -> strStripped function body
Returns:
str- stripped function body text
@property
def FuncBodyRaw() -> strRaw function body (including brackets)
Returns:
str- raw function body text
def GetDistroEntry() -> strGet distro specific modifiers
Returns:
str- distro specific modifier or ""
def GetMachineEntry() -> strGet machine specific modifiers
Returns:
str- machine specific modifier or ""
def IsAppend() -> boolReturn if function appends another function
Returns:
bool- True is append or prepend operation
def get_items() -> List[str]Get items of function body
Returns:
list- single lines of function body
class PythonBlock(Item)Items representing python functions in bitbake.
def __init__(name: str, *args, **kwargs) -> Noneconstructor
Arguments:
namestr - Function name
@property
def FuncName() -> strFunction name
Returns:
str- name of function
def get_items() -> List[str]Get lines of function body
Returns:
list- lines of function body
class FlagAssignment(Item)Items representing flag assignments in bitbake.
def __init__(name: str, ident: str, value: str, varop: str, *args,
**kwargs) -> Noneconstructor
Arguments:
namestr - name of task to be modifiedidentstr - task flagvaluestr - value of modificationvaropstr - variable operation
@property
def VarName() -> strVariable name
Returns:
str- name of variable
@property
def Flag() -> strFlag name
Returns:
str- Flag name
@property
def VarOp() -> strModifier operation
Returns:
str- used modifier in operation
@property
def Value() -> strValue
Returns:
str- value set
@property
def ValueStripped() -> strValue stripped of the quotes
Returns:
str- value set
def get_items() -> Tuple[str, str, str, str]Get items
Returns:
list- variable name, flag, variable operation, modification value
class FunctionExports(Item)Items representing EXPORT_FUNCTIONS in bitbake.
def __init__(name: str, *args, **kwargs) -> Noneconstructor
Arguments:
namestr - name of function to be exported
@property
def FuncNames() -> strFunction name
Returns:
str- names of exported functions
def get_items() -> List[str]Get items
Returns:
list- function names
def get_items_unaliased() -> List[str]Get items with their bbclass scope names
Returns:
list- function names in the scope of a bbclass (foo becomes classname-foo in this case)
class TaskAdd(Item)Items representing addtask statements in bitbake.
def __init__(name: str,
before: str = "",
after: str = "",
comment: str = "",
*args,
**kwargs) -> Noneconstructor
Arguments:
namestr - name of task to be executed
Arguments:
beforestr - before statement (default: {""})afterstr - after statement (default: {""})commentstr - optional comment (default: {""})
@property
def FuncName() -> strFunction name
Returns:
str- name of function
@property
def Before() -> List[str]Tasks executed before
Returns:
list- tasks to be executed before
@property
def After() -> List[str]Tasks executed after
Returns:
list- tasks to be executed after
@property
def Comment() -> strComment
Returns:
str- comment if any
def get_items() -> List[str]get items
Returns:
list- function name, all before statements, all after statements
class TaskDel(Item)Items representing deltask statements in bitbake.
def __init__(name: str, comment: str, *args, **kwargs) -> Noneconstructor
Arguments:
namestr - name of task to be executedcommentstr - optional comment
@property
def FuncName() -> strFunction name
Returns:
str- name of function
@property
def Comment() -> strComment
Returns:
str- comment if any
def get_items() -> List[str]get items
Returns:
list- function name
class MissingFile(Item)Items representing missing files found while parsing.
def __init__(filename: str, statement: str, *args, **kwargs) -> Noneconstructor
Arguments:
filenamestr - filename of the file that can't be foundstatementstr - either include or require
@property
def Filename() -> strFilename of the file missing
Returns:
str- filename that can't be resolved
@property
def Statement() -> strstatement either include or require
Returns:
str- include or require
class AddPylib(Item)Items representing addpylib statements in bitbake.
def __init__(path: str, namespace: str, *args, **kwargs) -> Noneconstructor
Arguments:
pathstr - path to the namespacenamespacestr - namespace name
@property
def Path() -> strPath of the library addition
Returns:
str- path of the library addition
@property
def Namespace() -> strNamespace of the addition
Returns:
str- Namespace of the addition
def get_items() -> Tuple[str, str]Get items
Returns:
list- library path, library namespace
class AddFragements(Item)Items representing addfragment statements in bitbake.
def __init__(path: str, variable: str, flagged: str, *args, **kwargs) -> Noneconstructor
Arguments:
pathstr - path to the namespacevariablestr - variable nameflaggedstr - flagged variable name(s)
@property
def Path() -> strPath of the fragment
Returns:
str- path of the fragment
@property
def Variable() -> strVariable of the fragment
Returns:
str- Variable of the fragment
@property
def Flagged() -> strFlagged variables of the fragment
Returns:
str- Flagged variables of the fragment
def get_items() -> Tuple[str, str]Get items
Returns:
list- library path, variable, flagged
class IncludeAll(Item)Items representing include_all statements in bitbake.
def __init__(file: str, *args, **kwargs) -> Noneconstructor
Arguments:
filestr - path to the file
@property
def File() -> strPath to include
Returns:
str- Path to include
def get_items() -> Tuple[str, str]Get items
Returns:
list- file
class Inherit(Item)Items that representing inherit(_defer) statements.
def __init__(statement: str,
classes: str,
inherit_file_paths: Set[str] = None,
*args,
**kwargs) -> Noneconstructor
Arguments:
classstr - class code to inheritstatementstr - inherit statement (INHERIT, inherit or inherit_defer)
Arguments:
inherit_file_pathsSet[str] - Paths of the identified inherited classes
@property
def Class() -> strClass(es) to inherit
Returns:
str- class(es) to inherit
@property
def Statement() -> strinherit statement
Returns:
str- inherit or inherit_defer
@property
def FilePaths() -> Set[str]File paths to identified bbclasses
As some classes might not be resolvable in the current context the order doesn't necessarily reflect the order of the inherit statements
Returns:
Set[str]- File paths to identified bbclasses
def get_items() -> List[str]Get items
Returns:
list- parsed Class items
class Unset(Item)Items representing unset statements in bitbake.
def __init__(name: str, flag: str = "", *args, **kwargs) -> Noneconstructor
Arguments:
namestr - name of variable to be unset
Arguments:
flagstr - Flag to unset
@property
def VarName() -> strVariable name
Returns:
str- name of the variable
@property
def Flag() -> strVariable flag
Returns:
str- name of the variable flag
def get_items() -> List[str]get items
Returns:
list- variable name, variable flag
class RegexRpl()Safe regex replacements
@staticmethod
def search(pattern: str,
string: str,
timeout: int = 5,
default: object = None,
**kwargs) -> Union[Match, None]replacement for re.search
Arguments:
patternstr - regex patternstringstr - input stringtimeoutint, optional - Timeout for operation. On timeoutdefaultwill be returned. Defaults to 5.defaulttype, optional - Default to return on timeout. Defaults to None.
Returns:
Match- Match object or None
@staticmethod
def split(pattern: str,
string: str,
timeout: int = 5,
default: object = None,
**kwargs) -> List[str]replacement for re.split
Arguments:
patternstr - regex patternstringstr - input stringtimeoutint, optional - Timeout for operation. On timeoutdefaultwill be returned. Defaults to 5.defaulttype, optional - Default to return on timeout. Defaults to None.
Returns:
list- list object or None
@staticmethod
def match(pattern: str,
string: str,
timeout: int = 5,
default: object = None,
**kwargs) -> Union[Match, None]replacement for re.match
Arguments:
patternstr - regex patternstringstr - input stringtimeoutint, optional - Timeout for operation. On timeoutdefaultwill be returned. Defaults to 5.defaulttype, optional - Default to return on timeout. Defaults to None.
Returns:
Match- Match object or None
@staticmethod
def sub(pattern: str,
repl: str,
string: str,
timeout: int = 5,
default: str = '',
**kwargs) -> strreplacement for re.sub
Arguments:
patternstr - regex patternreplstr - replacement stringstringstr - input stringtimeoutint, optional - Timeout for operation. On timeoutdefaultwill be returned. Defaults to 5.defaulttype, optional - Default to return on timeout. Defaults to ''.
Returns:
str- string
@staticmethod
def finditer(pattern: str,
string: str,
timeout: int = 5,
default: object = None,
**kwargs) -> Scannerreplacement for re.finditer
Arguments:
patternstr - regex patternstringstr - input stringtimeoutint, optional - Timeout for operation. On timeoutdefaultwill be returned. Defaults to 5.defaulttype, optional - Default to return on timeout. Defaults to None.
Returns:
Scanner- Scanner object or None
def get_full_scope(_string: str, offset: int, _sstart: int, _send: int) -> strget full block of an inline statement
Arguments:
_stringstr - input stringoffsetint - offset in string_sstartint - block start index_sendint - block end index
Returns:
str- full block on inline statement
def prepare_lines_subparser(_iter: Iterable,
lineOffset: int,
num: int,
line: int,
raw_line: str = None,
negative: bool = False) -> tuple[dict, str, int]preprocess raw input
Arguments:
_iteriterator - line interator objectlineOffsetint - current line indexnumint - internal line counterlineint - input stringraw_linestring, optional - internal line representation. Defaults to None.negativebool - Negative branch inline expansion. Defaults to False
Returns:
tuple[dict, str, int]: preproccessed chunk, buffer for next iteration, number of lines
def prepare_lines(_file: str,
lineOffset: int = 0,
negative: bool = False) -> List[str]break raw file input into preprocessed chunks
Arguments:
_filestring - Full path to filelineOffsetint, optional - line offset counter. Defaults to 0.negativebool - Negative branch inline expansion. Defaults to False
Returns:
list- preprocessed list of chunks
def get_items(stash: object,
_file: str,
lineOffset: int = 0,
new_style_override_syntax: bool = False,
negative: bool = False) -> List[Item]parses file
Arguments:
stashoelint_parser.cls_stash.Stash - Stash object_filestring - Full path to filelineOffsetint, optional - line offset counter. Defaults to 0.new_style_override_syntaxbool, optional - default to new override syntax (default: False)negativebool, optional - Negative branch inline expansion (default: False)
Returns:
list- List of oelint_parser.cls_item.* representations
class Constants()Interface for constants
def __init__(file_: str = DEFAULT_DB) -> NoneConstants interface
Arguments:
file_str, optional - File to load. Defaults to DEFAULT_DB.
def GetByPath(path: str) -> Union[Dict, List]Get constant from path
Arguments:
pathstr - / joined path in the constant structure
Returns:
Union[Dict, List]: Item in structure or empty dictionary
def AddConstants(_dict: dict) -> NoneAdd constants to the existing
Arguments:
dictdict - constant dictionary to add
def RemoveConstants(_dict: dict) -> NoneRemove constants from the existing
Arguments:
dictdict - constant dictionary to remove
def OverrideConstants(_dict: dict) -> NoneOverride constants in the existing db
Arguments:
dictdict] - constant dictionary with override values
@property
def FunctionsKnown() -> List[str]Return known functions
Returns:
list- list of known functions
@property
def FunctionsOrder() -> List[str]Return function order
Returns:
list- List of functions to order in their designated order
@property
def MirrorsKnown() -> Dict[str, str]Return known mirrors and their replacements
Returns:
dict- Dict of known mirrors and their replacements
@property
def VariablesKnown() -> List[str]Known variables
Returns:
list- List of known variables
@property
def DistrosKnown() -> List[str]Known distros
Returns:
list- List of known distros
@property
def MachinesKnown() -> List[str]Known machines
Returns:
list- List of known machines
@property
def ImagesClasses() -> List[str]Classes that are used in images
Returns:
list- Classes that are used in images
@property
def ImagesVariables() -> List[str]Variables that are used in images
Returns:
list- Variables that are used in images
@property
def SetsBase() -> Dict[str, str]Base variable set
Returns:
dict- dictionary with base variable set
@property
def ClassIgnore() -> List[str]summary
Returns:
List[str]- List of classes to ignore
@property
def IncludeIgnore() -> List[str]Includes to ignore
Returns:
List[str]- List of paths to ignore