While the documentation says it returns an unchanged code for full code input, it actually raises a ValueError instead.
Returns:
The nearest full Open Location Code to the reference location that matches
the short code. If the passed code was not a valid short code, but was a
valid full code, it is returned unchanged.
openlocationcode.recoverNearest("9FMC3QQP+29", 0.0, 0.0)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/shoeper/Documents/dev/jodelbot/libs/openlocationcode.py", line 285, in recoverNearest
raise ValueError('Passed short code is not valid - ' + str(shortcode))
ValueError: Passed short code is not valid - 9FMC3QQP+29
# expected output would be 9FMC3QQP+29
openlocationcode.recoverNearest("3QQP+29", 0.0, 0.0)
'6CGX3QQP+29'
While the documentation says it returns an unchanged code for full code input, it actually raises a ValueError instead.