Skip to content

--free returns chargers whose fee is unknown #6

Description

@galjos

--free is documented as "only chargers explicitly free (fee=no)" (cli.py:108), but the filter is:

if free_only and st.fee is True:   # chargers.py:223
    continue

That drops only fee=True. fee=None — the OSM tag is absent — passes through and is presented as free.

Measured within 25 km of Bolzano today:

fee stations
None (unknown) 86
True 65
False 21

--free returns 107, of which 21 are actually fee=no. An 80% false-positive rate on a filter whose whole purpose is to exclude paid chargers, and the direction is the harmful one: a user filters for free and is sent to a charger that may bill them.

Fix

if free_only and st.fee is not False: continue, so the filter means what the help says.

Worth checking --public at chargers.py for the same shape while there.

Done when

  • --free returns only fee=False.
  • A test covers all three values, including None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions