Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Warning instructs using --extra-checks, but no equivalent config option exists #16189

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

Closed
Feuermurmel opened this issue Sep 27, 2023 · 4 comments · Fixed by #18537
Closed

Warning instructs using --extra-checks, but no equivalent config option exists #16189

Feuermurmel opened this issue Sep 27, 2023 · 4 comments · Fixed by #18537

Comments

@Feuermurmel
Copy link

Feuermurmel commented Sep 27, 2023

Documentation

mypy prints this warning:

Warning: --strict-concatenate is deprecated; use --extra-checks instead

I'm not passing --strict-concatenate on the command line, but I instead have a setup.cfg with strict_concatenate = True. So naturally, I would expect that the strict_concatenate config has been replaced with an extra_checks config, but the docs page The mypy configuration file does not mention such an option but also does not mention that strict_concatenate has been deprecated.

So, either the docs of config options needs to be updated, or the warning is wrong and should only be triggered when --strict-concatenate is passed on the command line.

@Feuermurmel Feuermurmel changed the title Warning instructs using --extra-checks, but no equivalent config exists Warning instructs using --extra-checks, but no equivalent config option exists Sep 28, 2023
@NikolasWolke
Copy link

--strict-concatenate is also still mentioned in the section about stricter options.

@jahschwa
Copy link

I've only done a quick skim, but it seems like it is indeed implemented; the config parsing logic pulls from the Options class which has it:

self.extra_checks = False

So this is probably just a documentation thing. I haven't actually tried to test this by crafting a snippet that would trip something under extra_checks but my assumption is just adding extra_checks = true to your config file should work as expected.

masklinn added a commit to masklinn/uap-python that referenced this issue Oct 28, 2024
We're supposed to use `--extra-checks` instead but it doesn't have a
documented config setting. Just remove it.

Cf python/mypy#16189
masklinn added a commit to ua-parser/uap-python that referenced this issue Oct 29, 2024
We're supposed to use `--extra-checks` instead but it doesn't have a
documented config setting. Just remove it.

Cf python/mypy#16189
@glatterf42
Copy link

Adding extra_checks = true to my pyproject.toml file does indeed work, as in: it removes the deprecation warning and returns the same errors as before with strict_concatenate = true. However, my code might coincidentally comply to the checks performed by extra_checks in addition to strict_concatenate. So it would still be nice to have more fine-grained access or to adapt the documented list of strict options so that one can turn them on without deprecation warnings :)

ilevkivskyi added a commit that referenced this issue Jan 27, 2025
Fixes #16189

Few things here:
* Soften a bit the language on the flag
* Delete docs for old deprecated `strict_concatenate` option that is now
part of `extra_checks`
* Add a bit more motivation to the flag description
* Update docs for `--strict` flag to mention `extra_checks` instead of
`strict_concatenate`

Note that the docs on config file option requested in the issue were
added a while ago.
@Feuermurmel
Copy link
Author

Cool! Thanks for improving the documentation! 🧡

x612skm pushed a commit to x612skm/mypy-dev that referenced this issue Feb 24, 2025
Fixes python#16189

Few things here:
* Soften a bit the language on the flag
* Delete docs for old deprecated `strict_concatenate` option that is now
part of `extra_checks`
* Add a bit more motivation to the flag description
* Update docs for `--strict` flag to mention `extra_checks` instead of
`strict_concatenate`

Note that the docs on config file option requested in the issue were
added a while ago.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants