@@ -161,7 +161,7 @@ def __init__(
161161 )
162162
163163 # Store the configuration used to create this console for caching purposes.
164- self ._config_key = self ._generate_config_key (file , kwargs )
164+ self ._config_key = self ._generate_config_key (file = file , ** kwargs )
165165
166166 force_terminal : bool | None = None
167167 force_interactive : bool | None = None
@@ -185,13 +185,17 @@ def __init__(
185185
186186 @staticmethod
187187 def _generate_config_key (
188+ * ,
188189 file : IO [str ] | None ,
189- kwargs : dict [ str , Any ] ,
190+ ** kwargs : Any ,
190191 ) -> tuple [Any , ...]:
191192 """Generate a key representing the settings used to initialize a console.
192193
193194 This key includes the file identity, global settings (ALLOW_STYLE, APP_THEME),
194195 and any other settings passed in via kwargs.
196+
197+ :param file: file stream being checked
198+ :param kwargs: other console settings
195199 """
196200 return (
197201 id (file ),
@@ -202,16 +206,17 @@ def _generate_config_key(
202206
203207 def matches_config (
204208 self ,
209+ * ,
205210 file : IO [str ] | None ,
206211 ** kwargs : Any ,
207212 ) -> bool :
208- """Check if this console instance is compatible with the given settings.
213+ """Check if this console instance was initialized with the specified settings.
209214
210215 :param file: file stream being checked
211- :param kwargs: formatting settings being checked
216+ :param kwargs: other console settings being checked
212217 :return: True if the settings match this console's configuration
213218 """
214- return self ._config_key == self ._generate_config_key (file , kwargs )
219+ return self ._config_key == self ._generate_config_key (file = file , ** kwargs )
215220
216221 def on_broken_pipe (self ) -> None :
217222 """Override which raises BrokenPipeError instead of SystemExit."""
0 commit comments