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

mypy enable_recursive_aliases not allowed #3957

Closed
jamesbraza opened this issue Jul 29, 2024 · 6 comments
Closed

mypy enable_recursive_aliases not allowed #3957

jamesbraza opened this issue Jul 29, 2024 · 6 comments
Labels
good first issue help wanted issue:bug Report errors or unexpected behavior (auto-generated by issue forms)

Comments

@jamesbraza
Copy link
Contributor

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.

@jamesbraza jamesbraza added the issue:bug Report errors or unexpected behavior (auto-generated by issue forms) label Jul 29, 2024
@jamesbraza
Copy link
Contributor Author

Cc @henryiii since he seems to have made this schema

@henryiii
Copy link
Contributor

henryiii commented Jul 29, 2024

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.

@henryiii
Copy link
Contributor

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

@jamesbraza
Copy link
Contributor Author

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)

@hyperupcall
Copy link
Member

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

@jamesbraza
Copy link
Contributor Author

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
Labels
good first issue help wanted issue:bug Report errors or unexpected behavior (auto-generated by issue forms)
Projects
None yet
Development

No branches or pull requests

3 participants