WeixuanZ / flood-warning-system

Consider using identity comparison with singleton PTC-W0068
Bug risk
Major
4 occurrences in this check
Comparison to singleton False should be expr is False
 43            MonitoringStation(
 44                "111", "111", "station1", (0.0, 1.0), (1, -4), "River 1", "Town 1"
 45            ).typical_range_consistent()
 46            == False 47        )
 48        assert (
 49            MonitoringStation(
Comparison to singleton False should be expr is False
 49            MonitoringStation(
 50                "111", "111", "station1", (0.0, 1.0), (0.5, 0.2), "River 1", "Town 1"
 51            ).typical_range_consistent()
 52            == False 53        )
 54
 55    def test_inconsistent_typical_range_stations(self):
Comparison to singleton True should be expr is True
 31            MonitoringStation(
 32                "111", "111", "station1", (0.0, 1.0), (1.0, 4.0), "River 1", "Town 1"
 33            ).typical_range_consistent()
 34            == True 35        )
 36        assert (
 37            MonitoringStation(
Comparison to singleton False should be expr is False
 37            MonitoringStation(
 38                "111", "111", "station1", (0.0, 1.0), None, "River 1", "Town 1"
 39            ).typical_range_consistent()
 40            == False 41        )
 42        assert (
 43            MonitoringStation(