mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	coverage: Disable coverage checking for exceptions.py.
We also take the opportunity to slightly improve the errors if AbstractEnum ever gets used.
This commit is contained in:
		@@ -15,13 +15,13 @@ class AbstractEnum(Enum):
 | 
			
		||||
    # Override all the `Enum` methods that use `_value_`.
 | 
			
		||||
 | 
			
		||||
    def __repr__(self) -> str:
 | 
			
		||||
        return str(self)
 | 
			
		||||
        return str(self)  # nocoverage
 | 
			
		||||
 | 
			
		||||
    def value(self) -> None:
 | 
			
		||||
        assert False
 | 
			
		||||
        raise AssertionError("Not implemented")
 | 
			
		||||
 | 
			
		||||
    def __reduce_ex__(self, proto: int) -> None:
 | 
			
		||||
        assert False
 | 
			
		||||
        raise AssertionError("Not implemented")
 | 
			
		||||
 | 
			
		||||
class ErrorCode(AbstractEnum):
 | 
			
		||||
    BAD_REQUEST = ()  # Generic name, from the name of HTTP 400.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user