enkore / i3pystatus

A complete replacement for i3status
https://i3pystatus.readthedocs.io/
MIT License
445 stars 188 forks source link

Travis build failing due to docstring eval #681

Closed chestm007 closed 5 years ago

chestm007 commented 5 years ago

Appears to have been introduced in #654

Warning, treated as error:
/home/travis/build/enkore/i3pystatus/i3pystatus/battery.py:docstring of i3pystatus.battery.BatteryChecker:70: ERROR: Undefined substitution referenced: "0 < x <= a".

corresponds to this code:

       ("levels",
         "A dictionary mapping of charge levels to corresponding names. Let the keys be a < b < c < d. "
         "Then the following intervals correspond to each value:\n"
         "  0              -> status['DPL']\n"
         "  |0 < x <= a|   -> levels[a]\n"
         "  |a < x <= b|   -> levels[b]\n"
         "  |b < x <= c|   -> levels[c]\n"
         "  |c < x <= d|   -> levels[d]\n"
         "  |d < x <= 100| -> status['FULL']"),

I'm not sure on the best way to fix this : x = 'current_val' but that seems like a nasty hack

chestm007 commented 5 years ago

Fixed in #683