@@ -26,11 +26,11 @@ def __init__(
2626 out : typing .Optional [T_OUT_DATA ] = None ,
2727 error : typing .Optional [T_ERR_DATA ] = None ,
2828 ):
29- assert message is None or type (message ) == str # noqa: E721
30- assert command is None or type (command ) in [str , list ] # noqa: E721
31- assert exit_code is None or type (exit_code ) == int # noqa: E721
32- assert out is None or type (out ) in [str , bytes ] # noqa: E721
33- assert error is None or type (error ) in [str , bytes ] # noqa: E721
29+ assert message is None or type (message ) is str
30+ assert command is None or type (command ) in [str , list ]
31+ assert exit_code is None or type (exit_code ) is int
32+ assert out is None or type (out ) in [str , bytes ]
33+ assert error is None or type (error ) in [str , bytes ]
3434
3535 super ().__init__ (message )
3636
@@ -61,32 +61,32 @@ def message(self) -> str:
6161 msg .append (u'---- Out:\n {}' .format (self .out ))
6262
6363 r = self .convert_and_join (msg )
64- assert type (r ) == str # noqa: E721
64+ assert type (r ) is str
6565 return r
6666
6767 @property
6868 def description (self ) -> typing .Optional [str ]:
69- assert self ._description is None or type (self ._description ) == str # noqa: E721
69+ assert self ._description is None or type (self ._description ) is str
7070 return self ._description
7171
7272 @property
7373 def command (self ) -> typing .Optional [T_CMD ]:
74- assert self ._command is None or type (self ._command ) in [str , list ] # noqa: E721
74+ assert self ._command is None or type (self ._command ) in [str , list ]
7575 return self ._command
7676
7777 @property
7878 def exit_code (self ) -> typing .Optional [int ]:
79- assert self ._exit_code is None or type (self ._exit_code ) == int # noqa: E721
79+ assert self ._exit_code is None or type (self ._exit_code ) is int
8080 return self ._exit_code
8181
8282 @property
8383 def out (self ) -> typing .Optional [T_OUT_DATA ]:
84- assert self ._out is None or type (self ._out ) in [str , bytes ] # noqa: E721
84+ assert self ._out is None or type (self ._out ) in [str , bytes ]
8585 return self ._out
8686
8787 @property
8888 def error (self ) -> typing .Optional [T_ERR_DATA ]:
89- assert self ._error is None or type (self ._error ) in [str , bytes ] # noqa: E721
89+ assert self ._error is None or type (self ._error ) in [str , bytes ]
9090 return self ._error
9191
9292 def __repr__ (self ) -> str :
0 commit comments