Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngamsDapiStatus attribute __ioTime: Integer vs. Float #85

Closed
ulange-eso-org opened this issue May 27, 2022 · 1 comment
Closed

ngamsDapiStatus attribute __ioTime: Integer vs. Float #85

ulange-eso-org opened this issue May 27, 2022 · 1 comment

Comments

@ulange-eso-org
Copy link
Contributor

attribute __ioTime is initialized with 0 (Integer) but later only ever assigned float values.
(found running mypy on src/ngamsCore)

diff --git a/src/ngamsCore/ngamsLib/ngamsDapiStatus.py b/src/ngamsCore/ngamsLib/ngamsDapiStatus.py
index beb136dd..be2f08db 100644
--- a/src/ngamsCore/ngamsLib/ngamsDapiStatus.py
+++ b/src/ngamsCore/ngamsLib/ngamsDapiStatus.py
@@ -53,7 +53,7 @@ class ngamsDapiStatus:
         self.__compression       = ""
         self.__relPath           = ""
         self.__slotId            = ""
-        self.__ioTime            = 0
+        self.__ioTime            = 0.0
         self.__fileExists        = -1
         self.__completeFilename  = ""
         self.crc = None
rtobar added a commit that referenced this issue May 30, 2022
The __ioTime member of ngamsDapiStatus is always used as a float value,
but it is initialised as an integer. While not a problem on itself, it
can be confusing; moreover static analysis tools complain about it.

This commit initialises this member to a float value, removing any
confusion.

This was reported in #85.
rtobar added a commit that referenced this issue May 30, 2022
The __ioTime member of ngamsDapiStatus is always used as a float value,
but it is initialised as an integer. While not a problem on itself, it
can be confusing; moreover static analysis tools complain about it.

This commit initialises this member to a float value, removing any
confusion.

This was reported in #85.
@rtobar
Copy link
Contributor

rtobar commented May 30, 2022

Fix is now on the master branch.

@rtobar rtobar closed this as completed May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants