From: Joao Eduardo Luis Date: Sat, 16 Jan 2021 15:33:43 +0000 (-0100) Subject: cephadm: annotate variable type for mypy X-Git-Tag: v17.0.0~8^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4fa175e96783f698f5b1e78515fef0016e4e026e;p=ceph.git cephadm: annotate variable type for mypy mypy was complaining about the type of the variable being None, later on on assignment with an int. Signed-off-by: Joao Eduardo Luis --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index c4a43883c9b..1712af59e04 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -1026,7 +1026,7 @@ class FileLock(object): # os.open() function. # This file lock is only NOT None, if the object currently holds the # lock. - self._lock_file_fd = None + self._lock_file_fd: Optional[int] = None self.timeout = timeout # The lock counter is used for implementing the nested locking # mechanism. Whenever the lock is acquired, the counter is increased and