Revert "fix(flightcontroller info): Revert tests that do pass, but break pylint in other files"#911
Revert "fix(flightcontroller info): Revert tests that do pass, but break pylint in other files"#911amilcarlucas wants to merge 1 commit into
Conversation
…eak pylint in other files" This reverts commit fe3889f.
| ) | ||
|
|
||
| # pylint: disable=redefined-outer-name,protected-access | ||
| # pylint: disable=redefined-outer-name,protected-access,too-many-lines,unnecessary-dunder-call |
There was a problem hiding this comment.
The pylint disable comment includes 'unnecessary-dunder-call' which suggests the code contains direct calls to dunder methods like __setitem__. Consider refactoring to use proper interfaces instead of disabling this warning.
| # pylint: disable=redefined-outer-name,protected-access,too-many-lines,unnecessary-dunder-call | |
| # pylint: disable=redefined-outer-name,protected-access,too-many-lines |
| progress_bar_mock.__setitem__ = lambda _self, key, value: progress_bar_data.__setitem__(key, value) | ||
| progress_bar_mock.__getitem__ = lambda _self, key: progress_bar_data.__getitem__(key) |
There was a problem hiding this comment.
Direct assignment to dunder methods creates unclear mock behavior. Consider using a proper mock configuration or a custom mock class that implements the dict interface naturally.
| progress_bar_mock.__setitem__ = lambda _self, key, value: progress_bar_data.__setitem__(key, value) | ||
| progress_bar_mock.__getitem__ = lambda _self, key: progress_bar_data.__getitem__(key) |
There was a problem hiding this comment.
This is a duplicate of the same dunder method assignment pattern. Consider creating a reusable helper function or fixture to avoid code duplication.
| progress_bar_mock.__setitem__ = lambda _self, key, value: progress_bar_data.__setitem__(key, value) | ||
| progress_bar_mock.__getitem__ = lambda _self, key: progress_bar_data.__getitem__(key) |
There was a problem hiding this comment.
Third occurrence of the same dunder method assignment pattern. This code duplication should be refactored into a shared helper function.
| progress_bar_mock.__setitem__ = lambda _self, key, value: progress_bar_data.__setitem__(key, value) | ||
| progress_bar_mock.__getitem__ = lambda _self, key: progress_bar_data.get(key, 0) |
There was a problem hiding this comment.
Fourth occurrence of similar dunder method assignments. The inconsistent use of .get(key, 0) vs .__getitem__(key) suggests this pattern should be standardized in a helper function.
|
Replaced by #974 |
This reverts commit fe3889f.