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

Move mypy.ini to pyproject.toml #1974

Closed
4 tasks
sobolevn opened this issue Jul 16, 2023 · 8 comments · Fixed by #1976
Closed
4 tasks

Move mypy.ini to pyproject.toml #1974

sobolevn opened this issue Jul 16, 2023 · 8 comments · Fixed by #1976
Labels
Bug 🐛 This is something that is not working as expected Triage Required 🏥 This requires triage

Comments

@sobolevn
Copy link
Member

sobolevn commented Jul 16, 2023

Description

Mypy supports pyproject.toml for a long time now.
There's no need to have special mypy.ini, considering that all config is stored in pyproject.toml

URL to code causing the issue

No response

MCVE

No response

Steps to reproduce

No response

Screenshots

No response

Logs

No response

Litestar Version

main

Platform

  • Linux
  • Mac
  • Windows
  • Other (Please specify in the description above)

Funding

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@sobolevn sobolevn added Bug 🐛 This is something that is not working as expected Triage Required 🏥 This requires triage labels Jul 16, 2023
@sobolevn
Copy link
Member Author

pydantic also supports pyproject.toml: https://docs.pydantic.dev/latest/integrations/mypy/

@JacobCoffee
Copy link
Member

I believe this will impact vscode users

@provinzkraut
Copy link
Member

How so? Does it not pick up the config within pyproject.toml?

@JacobCoffee
Copy link
Member

I am just recalling something one of our users had - https://discord.com/channels/919193495116337154/919193688775749662/1093564708256219219

I haven't used vscode in quite a while though... so I'm not sure past this

@JacobCoffee
Copy link
Member

## Coffee — 04/04/2023 7:35 PM
can we move mypy.ini into pyproject.toml? I can do the work if its okay to do

## chris — 04/06/2023 10:55 AM
Some MyPy IDE extensions don't like this -- just something to be aware of

## provinzkraut — 04/06/2023 10:56 AM
I think they meant extensions for the IDE, not extensions of mypy?

## chris — 04/06/2023 10:57 AM
Correct provinzkraut. Sorry that was unclear
But VSCode's MyPy extension doesn't. Funny enough I had a user interview with them where I asked them to start supporting it. They said they were working on it along with better poetry support.
But I know you guys pretty much all use pycharm. So perhaps not an issue. VSCode users can of course just run from the command line

@sobolevn
Copy link
Member Author

Hm, interesting 🤔
I've never heard of any problems before, thanks for letting me know!

Related microsoft/vscode-mypy#37

@provinzkraut
Copy link
Member

So we can either move all the mypy config into mypy.ini until the extension properly supports pyproject.toml or just tell VS Code users that they'll need to run mypy via the command line?

@JacobCoffee
Copy link
Member

For me option 2 would be my suggestion, but thats due to my journey to eradicate 47 files in the root directory 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 This is something that is not working as expected Triage Required 🏥 This requires triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants