Title: Issue with havivng .pyi files in a separate folder [Question - Need help] · Issue #4933 · python/mypy · GitHub
Open Graph Title: Issue with havivng .pyi files in a separate folder [Question - Need help] · Issue #4933 · python/mypy
X Title: Issue with havivng .pyi files in a separate folder [Question - Need help] · Issue #4933 · python/mypy
Description: This is more of a question than an issue. I'm starting on using mypyand here's the minimal version of the project I'm type hinting - https://github.com/waseem18/mypy We planned to have .pyi stubs of each python file separately in a folde...
Open Graph Description: This is more of a question than an issue. I'm starting on using mypyand here's the minimal version of the project I'm type hinting - https://github.com/waseem18/mypy We planned to have .pyi stubs o...
X Description: This is more of a question than an issue. I'm starting on using mypyand here's the minimal version of the project I'm type hinting - https://github.com/waseem18/mypy We planned to have ...
Opengraph URL: https://github.com/python/mypy/issues/4933
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Issue with havivng .pyi files in a separate folder [Question - Need help]","articleBody":"This is more of a question than an issue. \r\n\r\nI'm starting on using `mypy`and here's the minimal version of the project I'm type hinting - https://github.com/waseem18/mypy\r\n\r\nWe planned to have `.pyi` stubs of each python file separately in a folder named `stubs` and give the path to stubs folder in `mypy.ini` file.\r\n\r\nI learnt from [this stack overflow answer](https://stackoverflow.com/a/37805107/2820154) that the stub file works only when importing a module. So I wrote a basic test file in `tests` folder which basically imports and calls the methods present in `mypy/main.py`.\r\n\r\nWhen I run `mypy tests/test-main.py` I get \r\n\r\n`mypy/main.py:1: error: Function is missing a type annotation`\r\n`mypy/main.py:5: error: Function is missing a type annotation`\r\n`mypy/main.py:9: error: Function is missing a type annotation`\r\n\r\nThough I gave path to stubs folder in `mypy.ini` file I believe `mypy` is still not considering `stubs/mypy/main.pyi` file. If `stubs/mypy/main.pyi` is considered it should throw me some errors as some of the returns types mentioned in `main.pyi` are incorrect.\r\n\r\nCan someone please help me in knowing where am I exactly going wrong? In other words how do I place `.pyi` files in a separate folder and run `mypy`?\r\n\r\nJust to point out, if both `main.py` and `main.pyi` are in same folder things are working.\r\n\r\nThanks","author":{"url":"https://github.com/waseem18","@type":"Person","name":"waseem18"},"datePublished":"2018-04-19T04:34:51Z","url":"https://github.com/python/mypy/issues/4933"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bf22fab0-4c46-d0e7-7d7c-7e5daeff149f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DCE0:144E47:36F4DED:48FD54D:6B004762 |
| html-safe-nonce | 97c39d6c028237cbcbef473cf861370f4844dacc51c8e505a0ef2f395d84a522 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0UwOjE0NEU0NzozNkY0REVEOjQ4RkQ1NEQ6NkIwMDQ3NjIiLCJ2aXNpdG9yX2lkIjoiOTE0NjcyMzQwMzc0NTQ3ODQ5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cba3e27b75c1a63fc01e0d5357f6f8de2d162e36926e74fd78e358681c772861 |
| hovercard-subject-tag | issue:315724794 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/4933/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6b71cf2e15dd82dc666bf2368426f2623714707fab0d17c6d8723f42b6612afb/python/mypy/issues/4933 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6b71cf2e15dd82dc666bf2368426f2623714707fab0d17c6d8723f42b6612afb/python/mypy/issues/4933 |
| og:image:alt | This is more of a question than an issue. I'm starting on using mypyand here's the minimal version of the project I'm type hinting - https://github.com/waseem18/mypy We planned to have .pyi stubs o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | waseem18 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width