Code simplification and pyright linter fixes#409
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR simplifies code and addresses pyright linter warnings by updating pylint directive usage and streamlining parameter metadata access.
- Updated pylint disable/enable comments in test_frontend_tkinter_template_overview.py
- Simplified parameter metadata retrieval in frontend_tkinter_parameter_editor_table.py
- Removed redundant conditional checks by utilizing default values with dict.get
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_frontend_tkinter_template_overview.py | Adjusted pylint directives and removed unnecessary inline suppression comments for private method naming |
| ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.py | Simplified retrieval of parameter metadata and tooltips by using dict.get default values |
Contributor
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request focuses on improving code readability and simplifying logic in the
ardupilot_methodic_configuratormodule, as well as cleaning up test files by removing redundant pylint suppressions. The key changes include replacing unnecessary conditional checks, streamlining tooltip logic, and refining test code.Code readability and logic simplification:
doc_tooltipin__update_tableby using a default value directly in thegetmethod, removing redundant conditional checks (ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.py, ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.pyL185-R188).param_metadatain__create_parameter_nameand__create_unit_label, directly using default values in thegetmethod (ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.py, [1] [2].Test file cleanup:
invalid-name, where they were no longer necessary (tests/test_frontend_tkinter_template_overview.py, tests/test_frontend_tkinter_template_overview.pyL25-R27).tests/test_frontend_tkinter_template_overview.py, [1] [2] [3].