module documentation
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 |
Generates the source code for the Handlers int enum. |
Function | _sigmasks |
Generates the source code for the Sigmasks int enum. |
Function | _signals |
Generates the source code for the Signals int enum. |
Function | _signals |
Generates the AST for 'Signals', 'Handlers' and 'Sigmasks' IntEnums. |