Skip to content

Conversation

@amilcarlucas
Copy link
Collaborator

This reverts commit fe3889f.

…eak pylint in other files"

This reverts commit fe3889f.
Copilot AI review requested due to automatic review settings October 6, 2025 16:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reverts a previous commit that removed tests from the flight controller info test file. The revert restores approximately 560 lines of test code that were previously removed due to pylint issues in other files.

)

# pylint: disable=redefined-outer-name,protected-access
# pylint: disable=redefined-outer-name,protected-access,too-many-lines,unnecessary-dunder-call
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# pylint: disable=redefined-outer-name,protected-access,too-many-lines,unnecessary-dunder-call
# pylint: disable=redefined-outer-name,protected-access,too-many-lines

Copilot uses AI. Check for mistakes.
Comment on lines +542 to +543
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)
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +580 to +581
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)
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a duplicate of the same dunder method assignment pattern. Consider creating a reusable helper function or fixture to avoid code duplication.

Copilot uses AI. Check for mistakes.
Comment on lines +856 to +857
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)
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third occurrence of the same dunder method assignment pattern. This code duplication should be refactored into a shared helper function.

Copilot uses AI. Check for mistakes.
Comment on lines +999 to +1000
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)
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant