Skip to content

module config

Configuration management for Yaralyzer.

Global Variables

  • YARALYZE
  • YARALYZER
  • PYTEST_FLAG
  • KILOBYTE
  • MEGABYTE

function config_var_name

config_var_name(env_var: str) → str

Get the name of env_var and strip off YARALYZER_ prefix.

Example: SURROUNDING_BYTES_ENV_VAR = 'YARALYZER_SURROUNDING_BYTES' config_var_name(SURROUNDING_BYTES_ENV_VAR) => 'SURROUNDING_BYTES'


function is_env_var_set_and_not_false

is_env_var_set_and_not_false(var_name: str) → bool

Return True if var_name is not empty and set to anything other than "false" (capitalization agnostic).


function is_invoked_by_pytest

is_invoked_by_pytest() → bool

Return True if invoked in a pytest context.


class YaralyzerConfig

Handles parsing of command line args and environment variables for Yaralyzer.


classmethod get_default_arg

get_default_arg(arg: str) → Any

Return the default value for arg as defined by a DEFAULT_ style class variable.


classmethod set_args

set_args(args: Namespace) → None

Set the args class instance variable and update args with any environment variable overrides.


classmethod set_argument_parser

set_argument_parser(parser: ArgumentParser) → None

Sets the _argument_parser instance variable that will be used to parse command line args.


classmethod set_default_args

set_default_args()

Set self.args to their defaults as if parsed from the command line.


This file was automatically generated via lazydocs.