Open-MSS / MSS

A QT application, a OGC web map server, a collaboration server to plan atmospheric research flights.
https://open-mss.github.io
Apache License 2.0
57 stars 70 forks source link

review and refactor abusing None for boolean #1614

Open ReimarBauer opened 1 year ago

ReimarBauer commented 1 year ago

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

KrishangSaharia commented 1 year ago

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?

ReimarBauer commented 1 year ago

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 commented 1 year ago

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 commented 7 months ago

The issue stays open as a reminder.

ReimarBauer commented 2 months ago

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

if user is None:

ReimarBauer commented 1 month ago

some of the refactoring is done during GSoC