Skip to content
Snippets Groups Projects
  • David Robertson's avatar
    e8269ed3
    Type hints for tests.appservice (#14990) · e8269ed3
    David Robertson authored
    * Accept a Sequence of events in synapse.appservice
    
    This avoids some casts/ignores in the tests I'm about to fixup. It seems
    that `List[Mock]` is not a subtype of `List[EventBase]`, but
    `Sequence[Mock]` is a subtype of `Sequence[EventBase]`. So presumably
    `Mock` is considered a subtype of anything, much like `Any`.
    
    * make tests.appservice.test_scheduler pass mypy
    
    * Extra hints in tests.appservice.test_scheduler
    
    * Extra hints in tests.appservice.test_api
    
    * Extra hints in tests.appservice.test_appservice
    
    * Disallow untyped defs
    
    * Changelog
    e8269ed3
    History
    Type hints for tests.appservice (#14990)
    David Robertson authored
    * Accept a Sequence of events in synapse.appservice
    
    This avoids some casts/ignores in the tests I'm about to fixup. It seems
    that `List[Mock]` is not a subtype of `List[EventBase]`, but
    `Sequence[Mock]` is a subtype of `Sequence[EventBase]`. So presumably
    `Mock` is considered a subtype of anything, much like `Any`.
    
    * make tests.appservice.test_scheduler pass mypy
    
    * Extra hints in tests.appservice.test_scheduler
    
    * Extra hints in tests.appservice.test_api
    
    * Extra hints in tests.appservice.test_appservice
    
    * Disallow untyped defs
    
    * Changelog