Method: pylint.config.arguments_provider._ArgumentsProvider.load_defaults
Calls: 1, Exceptions: 0, Paths: 1Back
Path 1: 1 calls (1.0)
1def load_defaults(self) -> None: # pragma: no cover
2 """DEPRECATED: Initialize the provider using default values."""
3 warnings.warn(
4 "load_defaults has been deprecated. Option groups should be "
5 "registered by initializing an ArgumentsProvider. "
6 "This automatically registers the group on the ArgumentsManager.",
7 DeprecationWarning,
8 stacklevel=2,
9 )
10 for opt, optdict in self.options:
11 action = optdict.get("action")
12 if action != "callback":
13 # callback action have no default
14 if optdict is None:
15 with warnings.catch_warnings():
16 warnings.filterwarnings("ignore", category=DeprecationWarning)
17 optdict = self.get_option_def(opt)
18 default = optdict.get("default")
19 self.set_option(opt, default, action, optdict)