You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ curl -O https://raw.githubusercontent.com/home-assistant/core/03710e58b5cc3cd1e2472d2e497bf5780695eca5/tests/components/homekit_controller/test_init.py
$ ruff test_init.pytest_init.py:150:5: F841 [*] Local variable `is_connected` is assigned to but never usedtest_init.py:218:5: F841 [*] Local variable `is_available` is assigned to but never usedFound 2 errors.[*] 2 potentially fixable with the --fix option.
$ ruff --fix test_init.pyFound 6 errors (6 fixed, 0 remaining).
Note found 2 vs 6 errors. After the --fix:
$ python3 -m test_initTraceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.8/runpy.py", line 155, in _get_module_details code = loader.get_code(mod_name) File "<frozen importlib._bootstrap_external>", line 981, in get_code File "<frozen importlib._bootstrap_external>", line 911, in source_to_code File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File ".../test_init.py", line 116 nonlocal is_connected ^SyntaxError: no binding for nonlocal 'is_connected' found
Haven't actually checked, but I suppose the fix for these issues is removing too many of the same named variables, not only the two it flagged errors for in non-fix mode.
The text was updated successfully, but these errors were encountered:
Note found 2 vs 6 errors. After the
--fix
:Haven't actually checked, but I suppose the fix for these issues is removing too many of the same named variables, not only the two it flagged errors for in non-fix mode.
The text was updated successfully, but these errors were encountered: