openhab-scripters / openhab-helper-libraries

Scripts and modules for use with openHAB
Eclipse Public License 1.0
88 stars 69 forks source link

Pylint changes #327

Closed 5iver closed 4 years ago

5iver commented 4 years ago

Signed-off-by: Scott Rushworth openhab@5iver.com

besynnerlig commented 4 years ago

I've reviewed an already merged PR. I'm not sure that you will be notified and aware about my question above @openhab-5iver

5iver commented 4 years ago

Unfortunately, I do not see any comment or review. They do show up after merge. What was your question?

besynnerlig commented 4 years ago

@openhab-5iver ,

Unfortunately, I do not see any comment or review. They do show up after merge. What was your question?

In Core/automation/lib/python/core/utils.py LOG.warn("The 'core.utils.getItemValue' function is pending deprecation.") and similar ...

I'm getting a lot of warnings in my log. What is the reason for the pending deprecation?

besynnerlig commented 4 years ago

I'm not sure if you get notifications for this @openhab-5iver due to that it's closed so I post this and mention you. (Sorry if I spammed you)

5iver commented 4 years ago

Hey @besynnerlig! No worries... I've just been busy with other things! I marked several of these functions deprecated because I'd like to remove them. I had mentioned this when they were first included, but I probably should have said something to you before merging this. My reasoning is that I am preparing to recreate the helper libraries in the rule engine and this library will be the first to go. Most of these functions I think would be better documented as an example or in 'But How Do I?'. Specifically...

besynnerlig commented 4 years ago

However the kw function was changed in such a way that the for loop now alters the argument hence renders wrong results. I'm not sure if I need to report that as a new issue or if it's enough to mention it here.

The problem is that the function argument name value is reused in the for loop.

5iver commented 4 years ago

Oh my... fixed (#346)!