mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	mypy: Set explicit Any-like parameters for StatsMock functions.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							692e2150c6
						
					
				
				
					commit
					6f490394c3
				
			@@ -19,13 +19,13 @@ def fix_params(raw_params):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class StatsMock(object):
 | 
					class StatsMock(object):
 | 
				
			||||||
    def __init__(self, settings):
 | 
					    def __init__(self, settings):
 | 
				
			||||||
        # type: (Callable) -> None
 | 
					        # type: (Callable[..., Any]) -> None
 | 
				
			||||||
        self.settings = settings
 | 
					        self.settings = settings
 | 
				
			||||||
        self.real_impl = statsd
 | 
					        self.real_impl = statsd
 | 
				
			||||||
        self.func_calls = []  # type: List[Tuple[str, Iterable[Any]]]
 | 
					        self.func_calls = []  # type: List[Tuple[str, Iterable[Any]]]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __getattr__(self, name):
 | 
					    def __getattr__(self, name):
 | 
				
			||||||
        # type: (str) -> Callable
 | 
					        # type: (str) -> Callable[..., Any]
 | 
				
			||||||
        def f(*args):
 | 
					        def f(*args):
 | 
				
			||||||
            # type: (*Any) -> None
 | 
					            # type: (*Any) -> None
 | 
				
			||||||
            with self.settings(STATSD_HOST=''):
 | 
					            with self.settings(STATSD_HOST=''):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user