Skip to content

mypy enable_recursive_aliases not allowed #3957

Closed

Description

@jamesbraza

Area with issue?

JSON Schema

✔️ Expected Behavior

python/mypy#13297 added the --enable-recursive-aliases flag. However, https://github.com/SchemaStore/schemastore/blob/5b21d70133bf90a18d69ea84b60634fb0da07292/src/schemas/json/partial-mypy.json doesn't include this field.

❌ Actual Behavior

--enable-recursive-aliases be reflected in this schema

YAML or JSON file that does not work.

[tool.mypy]
enable_recursive_aliases = true

IDE or code editor.

Other

Are you making a PR for this?

No, someone else must create the PR.

Activity

  1. added
    BugReport errors or unexpected behavior (auto-generated by issue forms)
    on Jul 29, 2024
  2. jamesbraza commented on Jul 29, 2024

    @jamesbraza
    ContributorAuthor

    Cc @henryiii since he seems to have made this schema

  3. henryiii commented on Jul 29, 2024

    @henryiii
    Contributor

    The original is from python/mypy#16601. Looks like it's been modified to add x-intellij-html-description and markdownDescription fields, though, since then.

  4. henryiii commented on Jul 29, 2024

    @henryiii
    Contributor

    It seems like this is undocumented? It's not showing up when I rebase and rerun.

  5. jamesbraza commented on Jul 29, 2024

    @jamesbraza
    ContributorAuthor

    Yeah you're right, unfortunately it's undocumented. I think it was a quick fix that became a long term fix. I defer to your judgement here, feel free to close this out as it's undocumented (but is a valid config file field)

  6. hyperupcall commented on Jul 30, 2024

    @hyperupcall
    Member

    PRs welcome - SchemaStore allows undocumented features; more information in CONTRIBUTING.md;

  7. jamesbraza commented on Jul 30, 2024

    @jamesbraza
    ContributorAuthor

    Okay, it looks like:

    1. Enable recursive type aliases behind a flag python/mypy#13297 added --enable-recursive-aliases
    2. Flip the default for recursive aliases flag python/mypy#13516 flipped --enable-recursive-aliases to --disable-recursive-aliases
    3. Temporarily put back --enable-recursive-aliases (as depreceated) python/mypy#13852 added --enable-recursive-aliases back in with a deprecation warning
    4. Delete recursive aliases flags python/mypy#16346 removed both --enable-recursive-aliases and --disable-recursive-aliases

    So actually, it's not a flag any more, and thus I am going to close it out. It's possible to see mypy flags in mypy/main.py: https://github.com/python/mypy/blob/v1.11.0/mypy/main.py

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

    BugReport errors or unexpected behavior (auto-generated by issue forms)Good First IssueHelp Wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions