Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

Describe the Pull Request

Resolves 7 pylint errors in tests/test_main.py that were preventing clean CI checks.

Changes Made

  • Removed unused imports: MagicMock and datetime
  • Added targeted pylint: disable comments for unavoidable test patterns:
    • import-error for pytest and main (test dependency and sys.path manipulation)
    • wrong-import-position for main (required after sys.path setup)
    • too-few-public-methods for TestWorkoutData and TestVideoFunctionality (valid single-test classes)

Expected Behavior

Pylint runs cleanly on tests/test_main.py with a 10.00/10 rating.

Fixes the Following Issues

  • E0401: Unable to import 'pytest' (import-error)
  • E0401: Unable to import 'main' (import-error)
  • C0413: Import "import main" should be placed at the top of the module (wrong-import-position)
  • R0903: Too few public methods (1/2) (too-few-public-methods) - 2 instances
  • W0611: Unused MagicMock imported from unittest.mock (unused-import)
  • W0611: Unused datetime imported from datetime (unused-import)

Screenshots

N/A

Desktop Developed On (please complete the following information):

  • OS: Linux
  • Program Version: 1.2.0
  • Python Version: 3.12.3

Additional Context

All 25 existing tests continue to pass. No functional changes to test behavior.

Please ensure you have read the Contributor License Agreements. By creating your pull request, you agree to the CLA.

Original prompt

I am getting the following pylint errors from the pylint check. Can you fix them, or tell pylint to ignore the errors in those files: tests/test_main.py:10:0: E0401: Unable to import 'pytest' (import-error)
tests/test_main.py:15:0: E0401: Unable to import 'main' (import-error)
tests/test_main.py:15:0: C0413: Import "import main" should be placed at the top of the module (wrong-import-position)
tests/test_main.py:18:0: R0903: Too few public methods (1/2) (too-few-public-methods)
tests/test_main.py:294:0: R0903: Too few public methods (1/2) (too-few-public-methods)
tests/test_main.py:8:0: W0611: Unused MagicMock imported from unittest.mock (unused-import)
tests/test_main.py:9:0: W0611: Unused datetime imported from datetime (unused-import)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: willtheorangeguy <18339050+willtheorangeguy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix pylint errors in test_main.py Fix pylint errors in tests/test_main.py Nov 19, 2025
@github-actions
Copy link

Thank you for your contribution, please read and sign our CLA. Instructions on how to do so can be found in the CONTRIBUTING.md document.


I have read the CLA Document, and I hereby sign the CLA.


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@willtheorangeguy willtheorangeguy marked this pull request as ready for review November 19, 2025 20:16
@willtheorangeguy willtheorangeguy merged commit fcad3ca into main Nov 19, 2025
12 of 13 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2025
@willtheorangeguy willtheorangeguy deleted the copilot/fix-pylint-errors-in-tests branch November 19, 2025 20:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants