module documentation
(source)

Astroid hooks for the signal library.

The signal module generates the 'Signals', 'Handlers' and 'Sigmasks' IntEnums dynamically using the IntEnum._convert() classmethod, which modifies the module globals. Astroid is unable to handle this type of code.

Without these hooks, the following are erroneously triggered by Pylint:
  • E1101: Module 'signal' has no 'Signals' member (no-member)
  • E1101: Module 'signal' has no 'Handlers' member (no-member)
  • E1101: Module 'signal' has no 'Sigmasks' member (no-member)

These enums are defined slightly differently depending on the user's operating system and platform. These platform differences should follow the current Python typeshed stdlib signal.pyi stub file, available at:

Note that the enum.auto() values defined here for the Signals, Handlers and Sigmasks IntEnums are just dummy integer values, and do not correspond to the actual standard signal numbers - which may vary depending on the system.

Function _handlers​_enum Generates the source code for the Handlers int enum.
Function _sigmasks​_enum Generates the source code for the Sigmasks int enum.
Function _signals​_enum Generates the source code for the Signals int enum.
Function _signals​_enums​_transform Generates the AST for 'Signals', 'Handlers' and 'Sigmasks' IntEnums.
def _handlers_enum(): (source)
Generates the source code for the Handlers int enum.
def _sigmasks_enum(): (source)
Generates the source code for the Sigmasks int enum.
def _signals_enum(): (source)
Generates the source code for the Signals int enum.
def _signals_enums_transform(): (source)
Generates the AST for 'Signals', 'Handlers' and 'Sigmasks' IntEnums.