Skip to content

Simplifying pyrightconfig.*.json #9286

Closed

Description

@Avasam

I'm just wondering if there's any reason to not use "typeCheckingMode": "strict" ?
The configs could be simplified to:

    [...]
    "typeCheckingMode": "strict",
    "reportPrivateUsage": "none",
    "reportIncompleteStub": "none",
    "reportMissingModuleSource": "none",
    // Incompatible overrides and property type mismatches are out of typeshed's control
    // as they are inherited from the implementation.
    "reportIncompatibleMethodOverride": "none",
    "reportIncompatibleVariableOverride": "none",
    "reportPropertyTypeMismatch": "none",
    // Overlapping overloads are often necessary in a stub, meaning pyright's check
    // (which is stricter than mypy's; see mypy issue #10143 and #10157)
    // would cause many false positives and catch few bugs.
    "reportOverlappingOverload": "none",
    // The name of the self/cls parameter is out of typeshed's control.
    "reportSelfClsParameterName": "none",

Similarly pyright.testcases.json can be simplified to:

    [...]
    "typeCheckingMode": "strict",
    "reportPropertyTypeMismatch": "error",
    "reportUnnecessaryTypeIgnoreComment": "error",
    "reportMissingModuleSource": "none",
    "reportPrivateUsage": "none",

Activity

  1. changed the title [-]Simplifying `pyrightconfig.stricter.json`[/-] [+]Simplifying `pyrightconfig.*.json`[/+] on Nov 27, 2022
  2. AlexWaygood commented on Nov 28, 2022

    @AlexWaygood
    Member

    I'm just wondering if there's any reason

    Probably just because most of the typeshed core devs are more familiar with mypy than pyright; it hasn't broken anything being that way; and it's always been like that :)

    It can probably be simplified! I'll happily review a PR.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions