Ignore mypy error about missing generic arg for catch_warnings
mypy stubs recently changed warnings.catch_warnings to a Generic, in
order to have proper overloads depending on the parameters passed to it, whihc
triggers this mypy error now when we subclass it:
    src/_pytest/recwarn.py:170: error: Missing type parameters for generic type "catch_warnings"  [type-arg]
For our porpuses the parameter is not relevant (we always use record=True), so
decided to just ignore the type error.
			
			
This commit is contained in:
		
							parent
							
								
									4ee6e900a0
								
							
						
					
					
						commit
						4da0689653
					
				| 
						 | 
				
			
			@ -1,3 +1,5 @@
 | 
			
		|||
default_language_version:
 | 
			
		||||
    python: "3.10"
 | 
			
		||||
repos:
 | 
			
		||||
-   repo: https://github.com/psf/black
 | 
			
		||||
    rev: 22.8.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -167,7 +167,7 @@ def warns(  # noqa: F811
 | 
			
		|||
            return func(*args[1:], **kwargs)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class WarningsRecorder(warnings.catch_warnings):
 | 
			
		||||
class WarningsRecorder(warnings.catch_warnings):  # type:ignore[type-arg]
 | 
			
		||||
    """A context manager to record raised warnings.
 | 
			
		||||
 | 
			
		||||
    Each recorded warning is an instance of :class:`warnings.WarningMessage`.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue