A factory method that creates an instance of ArrayFlags with everything enabled.
(cls: Type[Self])
| 1799 | |
| 1800 | @classmethod |
| 1801 | def all(cls: Type[Self]) -> Self: |
| 1802 | """A factory method that creates an instance of ArrayFlags with everything enabled.""" |
| 1803 | bits = max(cls.VALID_FLAGS.values()).bit_length() |
| 1804 | value = (1 << bits) - 1 |
| 1805 | self = cls.__new__(cls) |
| 1806 | self.value = value |
| 1807 | return self |
| 1808 | |
| 1809 | @classmethod |
| 1810 | def none(cls: Type[Self]) -> Self: |