Hi,
I’m using Python on VEXcode IDE 2.4.0 for the EXP Brain. VEXos is 1.0.2.
Saving the optical brightness in a variable and printing the variable causes the linter to error.
brightness_var = optical_6.brightness() # linter produces error "Assigning result of a function call, where function has no return"
print(brightness_var)
But the code runs without issue when I click “Download Anyway”.
As a sanity check, I’ve performed the following tests that pass:
print(optical_6.brightness()) # works fine without error
brightness_var = float(optical_6.brightness()) # also works fine
print(brightness_var)
The linter complains brightness() doesn’t return a float but it does:
print(type(optical_6.brightness())) # prints "<class 'float'>"
Am I missing something? Again, the code works fine as expected, just the linter is mad.
Thank you.