Skip to content

[BUG]: Improve Performance and File Scope Handling in MyPy Checks #23034

@Nik-09

Description

@Nik-09

Describe the bug

While running MyPy checks, I noticed a few issues that may need attention:

  1. I modified only 4 files and ran the command python -m scripts.run_mypy_checks, which took around 4 minutes and 36 seconds to complete. This makes the process quite time-consuming, especially when multiple iterations (4–5) are needed to fix issues.

  2. I attempted to run MyPy for a single file using the --files flag, but it appears to run checks for other files as well (screenshot attached, where I ran the test for the voiceover_services_test.py file, but the output shows email_manager.py)

Image

Thanks!

URL of the page where the issue is observed.

N/A

Steps To Reproduce

mentioned above

Expected Behavior

Expected Behavior:

  1. The checks should ideally run faster or at least display progress to indicate the current status.
  2. When specifying a single file, only that file should be checked, and unrelated files should be excluded.

Screenshots/Videos

No response

What device are you using?

Desktop

Operating System

Linux

What browsers are you seeing the problem on?

Chrome

Browser version

No response

Additional context

No response

Tips for developers

Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).

Then, please leave a comment with details of the approach that you plan to take to fix the issue (see example).

Note: If this is your first Oppia issue, please make sure to follow our guidelines for choosing an issue and setting things up. You will also need to show a demo of the fix working correctly on your local machine. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Impact: MediumWill improve quality-of-life for at least 30% of users.Work: HighIt's not clear what the solution is; will need investigation.bugLabel to indicate an issue is a regression

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions