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

Missing list of incomplete features #14452

Closed
Barry1 opened this issue Jan 15, 2023 · 6 comments · Fixed by #16661
Closed

Missing list of incomplete features #14452

Barry1 opened this issue Jan 15, 2023 · 6 comments · Fixed by #16661

Comments

@Barry1
Copy link

Barry1 commented Jan 15, 2023

Documentation

Within the CLI we have the command line switch --enable-incomplete-feature which expects a feature name to enable.
Until now I have not been able to find a list of possible (incomplete/under development) features, which I could enable over here.

Have I missed something?

@tmke8
Copy link
Contributor

tmke8 commented Jan 20, 2023

It's defined here, but you're right that it's not documented anywhere:

mypy/mypy/options.py

Lines 70 to 73 in 83660d0

# Features that are currently incomplete/experimental
TYPE_VAR_TUPLE: Final = "TypeVarTuple"
UNPACK: Final = "Unpack"
INCOMPLETE_FEATURES: Final = frozenset((TYPE_VAR_TUPLE, UNPACK))

@som-sama
Copy link

So, we have to go through the codebase to identify all of the features that can be enabled with the --enable-incomplete-feature switch if I am not wrong?

@intgr
Copy link
Contributor

intgr commented Mar 9, 2023

I also noticed that the enable_incomplete_feature settings key is not documented. But if I add enable_incomplete_feature = ["Unpack"] to my pyproject.toml, it seems to work as expected.

@JelleZijlstra
Copy link
Member

I think this is somewhat intentional; incomplete features are experimental and incomplete and may be broken in some way, so we don't want to advertise them too much.

However, it should be fine to add a list to the documentation with a note that these features are experimental, we don't guarantee any form of backward compatibility, use at your own risk, etc.

@jgarte
Copy link

jgarte commented Apr 12, 2023

However, it should be fine to add a list to the documentation with a note that these features are experimental, we don't guarantee any form of backward compatibility, use at your own risk, etc.

I think the latter is a great idea. I'll add a TODO to look into this when I find the time otherwise feel free to pick up this issue and resolve it.

dfroger pushed a commit to dfroger/mypy that referenced this issue Dec 13, 2023
hauntsaninja pushed a commit that referenced this issue Dec 13, 2023
…#16661)

By the way, also remove `--enable-incomplete-feature=Unpack
--enable-incomplete-feature=TypeVarTuple` when running the tests, as
they are no more incomplete features.
    
Fixes #14452

Co-authored-by: David Froger <[email protected]>
@intgr
Copy link
Contributor

intgr commented Dec 13, 2023

By the way, the enable_incomplete_feature setting is still undocumented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants