Additional type hints for the config module, part 2. (#11480)

This commit is contained in:
Patrick Cloke 2021-12-09 11:15:46 -05:00 committed by GitHub
parent 941ebe49ff
commit 0cc3bf97b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 19 deletions

View file

@ -22,10 +22,12 @@ from ._base import Config, ConfigError
@attr.s
class MetricsFlags:
known_servers = attr.ib(default=False, validator=attr.validators.instance_of(bool))
known_servers: bool = attr.ib(
default=False, validator=attr.validators.instance_of(bool)
)
@classmethod
def all_off(cls):
def all_off(cls) -> "MetricsFlags":
"""
Instantiate the flags with all options set to off.
"""