MSS icon indicating copy to clipboard operation
MSS copied to clipboard

review and refactor abusing None for boolean

Open ReimarBauer opened this issue 3 years ago • 6 comments

Sometimes None is checked like boolean. This is a problem and needs to become fixed

ReimarBauer avatar Nov 23 '22 16:11 ReimarBauer

If this is still open, can I take this issue, also I am new to open source so it would be a good starting point for me also?

KrishangSaharia avatar Jan 08 '23 09:01 KrishangSaharia

This is not easy. As a startingpoint something with only one line fix would be better to get the setup for local tests verified.
Some of these problems already fixed. The issue is a reminder to take care of this. I wished we had a linter which can detect these early.

Here is one where it is wrong:

https://github.com/Open-MSS/MSS/blob/develop/docs/samples/plugins/navaid.py#L106

ReimarBauer avatar Jan 09 '23 08:01 ReimarBauer

On some places we were not exact, and during fixes or enhancements we will find code locations where we can improve this.

I am not aware about a test which can help to find these and protect for new ;)

ReimarBauer avatar Mar 01 '23 10:03 ReimarBauer

The issue stays open as a reminder.

ReimarBauer avatar Feb 15 '24 15:02 ReimarBauer

https://github.com/Open-MSS/MSS/blob/develop/mslib/mscolab/server.py#L186

if user is None:

ReimarBauer avatar Jul 17 '24 07:07 ReimarBauer

some of the refactoring is done during GSoC

ReimarBauer avatar Aug 17 '24 08:08 ReimarBauer