Skip to content

Reducing tool.ruff.lint.per-file-ignores. #643

Open

Description

@junkmd

We are looking to reduce the number of rules ignored in tool.ruff.lint.per-file-ignores by delinting the codebase. This is a great opportunity for new contributors to get involved!

Guidelines:

  • We welcome delinting of one rule per file, or keeping changes as small as possible per pull request, as it makes it easier for reviewers to check the changes.
  • If your PR addresses multiple rules or files, reviewers might consider it a large change and suggest splitting it into multiple PRs.
  • When modifying runtime codebases, be careful not to break backward compatibility. For example, when delinting E722 'bare-except', specifying the type of exception to catch may result in different behavior before and after the change.
  • If you want to delint without changing the implementation, use the minimal # noqa: RULE comments.

Activity

  1. junkmd commented on Dec 21, 2024

    @junkmd
    CollaboratorAuthor

    With the codebase changes up to commit 01ec70d, the following should definitely be achievable.
    I’ll leave these changes to new contributors.

     [tool.ruff.lint.per-file-ignores]
     # production
    -"comtypes/_comobject.py" = ["E713", "E722", "F401"]
     "comtypes/_npsupport.py" = ["F401"]
     "comtypes/_vtbl.py" = ["E722"]
     "comtypes/connectionpoints.py" = ["F401", "F403", "F405"]
     "comtypes/shelllink.py" = ["F401"]
     "comtypes/util.py" = ["F403", "F405"]
     "comtypes/viewobject.py" = ["F403", "F405"]
    -"comtypes/_post_coinit/unknwn.py" = ["F821"]
     "comtypes/client/__init__.py" = ["F401", "F403"]
     "comtypes/client/_code_cache.py" = ["E401", "E711"]
     "comtypes/client/_constants.py" = ["F401"]
     "comtypes/server/__init__.py" = ["E401"]
     "comtypes/server/automation.py" = ["F403", "F405"]
     "comtypes/server/connectionpoints.py" = ["F401", "F403", "F405"]
    -"comtypes/server/inprocserver.py" = ["E713", "E722", "F403", "F405", "F841"]
    +"comtypes/server/inprocserver.py" = ["E713", "E722", "F841"]
     "comtypes/server/localserver.py" = ["F401", "F403", "F405"]
    -"comtypes/server/register.py" = ["F403", "F405", "E713", "E731"]
    +"comtypes/server/register.py" = ["F403", "F405", "E713"]
     "comtypes/tools/codegenerator/codegenerator.py" = ["E713", "E721"]
     "comtypes/tools/codegenerator/helpers.py" = ["F401"]
     "comtypes/tools/codegenerator/packing.py" = ["F821", "F841"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions