Add type hints to HydrusLogger.py

This commit is contained in:
bbappserver 2022-06-03 14:34:54 -07:00 committed by GitHub
parent a39462c4bc
commit 2071d9e943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -45,12 +45,12 @@ class HydrusLogger( object ):
return False
def _CloseLog( self ):
def _CloseLog( self ) -> None:
self._log_file.close()
def _GetLogPath( self ):
def _GetLogPath( self ) -> os.PathLike:
current_time_struct = time.localtime()
@ -63,7 +63,7 @@ class HydrusLogger( object ):
return log_path
def _OpenLog( self ):
def _OpenLog( self ) -> None:
self._log_path = self._GetLogPath()
@ -77,7 +77,7 @@ class HydrusLogger( object ):
def _SwitchToANewLogFileIfDue( self ):
def _SwitchToANewLogFileIfDue( self ) -> None:
correct_log_path = self._GetLogPath()
@ -89,7 +89,7 @@ class HydrusLogger( object ):
def flush( self ):
def flush( self ) -> None:
if self._log_closed:
@ -116,12 +116,12 @@ class HydrusLogger( object ):
def isatty( self ):
def isatty( self ) -> bool:
return False
def write( self, value ):
def write( self, value ) -> None:
if self._log_closed: