Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running formatter. #271

Merged
merged 1 commit into from
Jan 31, 2025
Merged

Running formatter. #271

merged 1 commit into from
Jan 31, 2025

Conversation

EmbeddedDevops1
Copy link
Collaborator

@EmbeddedDevops1 EmbeddedDevops1 commented Jan 31, 2025

User description

Running black to format Python files within the repository.


PR Type

Enhancement, Tests


Description

  • Reformatted and improved readability across multiple Python files in the repository, including methods, functions, and class definitions.

  • Enhanced exception handling, logging, and string formatting for consistency and clarity.

  • Refactored test cases for better readability, consistency, and improved test structure.

  • Added missing newlines and adjusted formatting to conform to style guidelines.


Changes walkthrough 📝

Relevant files
Formatting
43 files
language_server.py
Code formatting and readability improvements in LanguageServer.

cover_agent/lsp_logic/multilspy/language_server.py

  • Reformatted method definitions and calls for better readability.
  • Adjusted string formatting and indentation for consistency.
  • Improved exception handling and logging messages.
  • Enhanced code clarity by splitting long lines.
  • +206/-94
    UnitTestValidator.py
    Code formatting and exception handling improvements in
    UnitTestValidator.

    cover_agent/UnitTestValidator.py

  • Reformatted methods for better readability.
  • Improved string formatting and indentation.
  • Enhanced exception handling and logging.
  • +62/-33 
    multilspy_utils.py
    Refactor multilspy_utils for readability and error handling.

    cover_agent/lsp_logic/multilspy/multilspy_utils.py

  • Reformatted utility methods for better readability.
  • Improved string formatting and indentation.
  • Enhanced exception handling and logging messages.
  • +72/-26 
    CoverageProcessor.py
    Code formatting and readability improvements in CoverageProcessor.

    cover_agent/CoverageProcessor.py

  • Reformatted methods for better readability.
  • Improved string formatting and indentation.
  • Enhanced exception handling and logging.
  • +73/-53 
    PromptBuilder.py
    Refactor PromptBuilder for readability and consistency.   

    cover_agent/PromptBuilder.py

  • Reformatted methods and functions for better readability.
  • Improved string formatting and indentation.
  • Enhanced exception handling and logging.
  • +48/-36 
    CoverAgent.py
    Code formatting and readability improvements in CoverAgent.

    cover_agent/CoverAgent.py

  • Reformatted methods for better readability.
  • Improved string formatting and indentation.
  • Enhanced exception handling and logging.
  • +44/-17 
    utils.py
    Refactor utils for readability and error handling.             

    cover_agent/lsp_logic/utils/utils.py

  • Reformatted utility methods for better readability.
  • Improved string formatting and indentation.
  • Enhanced exception handling and logging messages.
  • +44/-33 
    multilspy_types.py
    Refactor multilspy_types for readability and consistency.

    cover_agent/lsp_logic/multilspy/multilspy_types.py

  • Reformatted type definitions for better readability.
  • Improved string formatting and indentation.
  • Enhanced consistency in type annotations.
  • +17/-4   
    lsp_requests.py
    Minor readability improvement in lsp_requests.                     

    cover_agent/lsp_logic/multilspy/lsp_protocol_handler/lsp_requests.py

    • Added minor spacing for better readability.
    +1/-0     
    get_queries.py
    Add newline for consistency in get_queries.                           

    cover_agent/lsp_logic/file_map/queries/get_queries.py

    • Added newline at the end of the file for consistency.
    +1/-1     
    UnitTestGenerator.py
    Refactor and format UnitTestGenerator for readability.     

    cover_agent/UnitTestGenerator.py

  • Adjusted indentation and formatting for better readability.
  • Refactored long lines into multiple lines for clarity.
  • Added missing newline at the end of the file.
  • +33/-14 
    utils_context.py
    Enhance formatting in utils_context for clarity.                 

    cover_agent/lsp_logic/utils/utils_context.py

  • Improved formatting and indentation for better readability.
  • Adjusted long lines to conform to style guidelines.
  • +36/-21 
    main.py
    Refactor main script for improved readability.                     

    cover_agent/lsp_logic/scripts/main.py

  • Reformatted argument parsing for better readability.
  • Improved print statement formatting.
  • +44/-23 
    ReportGenerator.py
    Refactor ReportGenerator for consistent formatting.           

    cover_agent/ReportGenerator.py

  • Adjusted string formatting for consistency.
  • Improved readability of diff generation methods.
  • +15/-15 
    jedi_server.py
    Refactor JediServer for better readability.                           

    cover_agent/lsp_logic/multilspy/language_servers/jedi_language_server/jedi_server.py

  • Reformatted method definitions and imports for clarity.
  • Improved indentation and line breaks.
  • +27/-8   
    test_UnitTestDB.py
    Enhance test_UnitTestDB formatting and consistency.           

    tests/test_UnitTestDB.py

  • Added missing commas in dictionary definitions.
  • Improved formatting of test methods for readability.
  • +17/-10 
    utils.py
    Refactor utils.py for improved readability.                           

    cover_agent/utils.py

  • Reformatted argument parsing for better readability.
  • Adjusted string formatting for consistency.
  • +29/-11 
    analyze_tests.py
    Refactor analyze_tests for better readability.                     

    tests_integration/analyze_tests.py

  • Reformatted function definitions and string formatting.
  • Improved readability of the test analysis logic.
  • +21/-13 
    server.py
    Refactor server.py for consistent formatting.                       

    cover_agent/lsp_logic/multilspy/lsp_protocol_handler/server.py

  • Adjusted formatting of JSON message creation.
  • Improved readability of async methods.
  • +22/-6   
    UnitTestDB.py
    Refactor UnitTestDB for better readability.                           

    cover_agent/UnitTestDB.py

  • Adjusted string formatting for consistency.
  • Improved readability of method definitions.
  • +13/-7   
    test_UnitTestGenerator.py
    Enhance test_UnitTestGenerator formatting and readability.

    tests/test_UnitTestGenerator.py

  • Improved formatting of test methods.
  • Adjusted string formatting for consistency.
  • +14/-8   
    AgentCompletionABC.py
    Refactor AgentCompletionABC for consistent formatting.     

    cover_agent/AgentCompletionABC.py

  • Reformatted abstract method definitions for better readability.
  • Improved indentation and line breaks.
  • +15/-4   
    AICaller.py
    Refactor AICaller for improved readability.                           

    cover_agent/AICaller.py

  • Adjusted formatting of retry logic and method definitions.
  • Improved readability of class initialization.
  • +14/-7   
    file_map.py
    Refactor file_map.py for better readability.                         

    cover_agent/lsp_logic/file_map/file_map.py

  • Improved formatting of class initialization.
  • Adjusted string formatting for consistency.
  • +13/-5   
    token_handling.py
    Refactor token_handling for consistent formatting.             

    cover_agent/settings/token_handling.py

  • Reformatted token handling methods for clarity.
  • Improved readability of exception handling.
  • +17/-6   
    test_ReportGenerator.py
    Enhance test_ReportGenerator formatting and readability. 

    tests/test_ReportGenerator.py

  • Improved formatting of test methods.
  • Adjusted string formatting for consistency.
  • +10/-4   
    test_main.py
    Refactor test_main for better readability.                             

    tests/test_main.py

  • Improved formatting of test methods.
  • Adjusted string formatting for consistency.
  • +8/-10   
    ContextHelper.py
    Refactor ContextHelper for improved readability.                 

    cover_agent/lsp_logic/ContextHelper.py

  • Improved formatting of async methods.
  • Adjusted string formatting for consistency.
  • +14/-5   
    main_full_repo.py
    Refactor main_full_repo for better readability.                   

    cover_agent/main_full_repo.py

  • Improved formatting of async methods.
  • Adjusted string formatting for consistency.
  • +15/-4   
    multilspy_logger.py
    Refactor multilspy_logger for consistent formatting.         

    cover_agent/lsp_logic/multilspy/multilspy_logger.py

  • Improved formatting of logger methods.
  • Adjusted string formatting for consistency.
  • +9/-2     
    test_PromptBuilder.py
    Enhance test_PromptBuilder formatting and readability.     

    tests/test_PromptBuilder.py

  • Improved formatting of test methods.
  • Adjusted string formatting for consistency.
  • +7/-7     
    lsp_types.py
    Refactor lsp_types for consistent formatting.                       

    cover_agent/lsp_logic/multilspy/lsp_protocol_handler/lsp_types.py

  • Adjusted formatting of TypedDict definitions.
  • Improved readability of class definitions.
  • +4/-1     
    Runner.py
    Refactor Runner for better readability.                                   

    cover_agent/Runner.py

  • Improved formatting of subprocess handling.
  • Adjusted string formatting for consistency.
  • +9/-3     
    multilspy_settings.py
    Refactor multilspy_settings for consistent formatting.     

    cover_agent/lsp_logic/multilspy/multilspy_settings.py

  • Improved formatting of static methods.
  • Adjusted string formatting for consistency.
  • +5/-1     
    type_helpers.py
    Refactor type_helpers for better readability.                       

    cover_agent/lsp_logic/multilspy/type_helpers.py

  • Improved formatting of helper methods.
  • Adjusted string formatting for consistency.
  • +5/-2     
    multilspy_config.py
    Refactor multilspy_config for consistent formatting.         

    cover_agent/lsp_logic/multilspy/multilspy_config.py

  • Improved formatting of dataclass methods.
  • Adjusted string formatting for consistency.
  • +7/-4     
    main.py
    Refactor main.py for better readability.                                 

    cover_agent/main.py

  • Improved formatting of argument parsing.
  • Adjusted string formatting for consistency.
  • +5/-3     
    important_files_logic.py
    Refactor important_files_logic for consistent formatting.

    cover_agent/lsp_logic/utils/important_files_logic.py

  • Adjusted formatting of normalized file paths.
  • Improved readability of set operations.
  • +3/-1     
    multilspy_exceptions.py
    Refactor multilspy_exceptions for consistent formatting. 

    cover_agent/lsp_logic/multilspy/multilspy_exceptions.py

  • Added newline at the end of the file.
  • Improved formatting of exception class.
  • +2/-1     
    increase_coverage.py
    Refactor increase_coverage for better readability.             

    tests_integration/increase_coverage.py

  • Adjusted formatting of class attributes.
  • Improved readability of initialization logic.
  • +2/-2     
    test_app.py
    Refactor test_app for consistent formatting.                         

    templated_tests/python_fastapi/test_app.py

  • Added newline at the end of the file.
  • Improved formatting of test method.
  • +1/-1     
    DefaultAgentCompletion.py
    Refactor DefaultAgentCompletion for consistent formatting.

    cover_agent/DefaultAgentCompletion.py

  • Added newline at the end of the file.
  • Improved formatting of class definition.
  • +1/-0     
    lsp_constants.py
    Refactor lsp_constants for consistent formatting.               

    cover_agent/lsp_logic/multilspy/lsp_protocol_handler/lsp_constants.py

  • Added newline at the end of the file.
  • Improved formatting of constants class.
  • +1/-0     
    Tests
    5 files
    test_CoverageProcessor.py
    Refactor test cases for CoverageProcessor for clarity.     

    tests/test_CoverageProcessor.py

  • Reformatted test cases for better readability.
  • Adjusted string formatting and indentation.
  • Improved consistency in test assertions and mock setups.
  • +83/-50 
    test_UnitTestValidator.py
    Refactor UnitTestValidator test cases for readability.     

    tests/test_UnitTestValidator.py

  • Reformatted test cases for better readability and consistency.
  • Improved mock setups and assertions.
  • Enhanced test structure with better spacing and indentation.
  • +134/-63
    test_CoverAgent.py
    Refactor CoverAgent test cases for clarity and consistency.

    tests/test_CoverAgent.py

  • Reformatted test cases for better readability and consistency.
  • Improved mock setups and assertions.
  • Enhanced test structure with better spacing and indentation.
  • +49/-24 
    test_load_yaml.py
    Refactor load_yaml test cases for clarity and consistency.

    tests/test_load_yaml.py

  • Reformatted test cases for better readability and consistency.
  • Improved mock setups and assertions.
  • Enhanced test structure with better spacing and indentation.
  • +51/-54 
    test_AICaller.py
    Refactor AICaller test cases for clarity and consistency.

    tests/test_AICaller.py

  • Reformatted test cases for better readability and consistency.
  • Improved mock setups and assertions.
  • Enhanced test structure with better spacing and indentation.
  • +13/-5   
    Additional files
    2 files
    config_loader.py +0/-1     
    test_version.py +0/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @EmbeddedDevops1
    Copy link
    Collaborator Author

    ⌛ Running integration tests just in case: https://github.com/qodo-ai/qodo-cover/actions/runs/13081242716

    @EmbeddedDevops1 EmbeddedDevops1 merged commit 8b9e352 into main Jan 31, 2025
    10 of 11 checks passed
    @EmbeddedDevops1 EmbeddedDevops1 deleted the run-code-formatter branch January 31, 2025 21:57
    @mrT23
    Copy link
    Collaborator

    mrT23 commented Feb 2, 2025

    /describe

    PR Description updated to latest commit (3f6709e)

    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.

    3 participants