Title: option no-implicit-optional ignored as inline configuration and per-module flags · Issue #8029 · python/mypy · GitHub
Open Graph Title: option no-implicit-optional ignored as inline configuration and per-module flags · Issue #8029 · python/mypy
X Title: option no-implicit-optional ignored as inline configuration and per-module flags · Issue #8029 · python/mypy
Description: I found a potential bug (not sure) with mypy 0.740 and Python 3.6.5 & Python 3.7.1. The following code: # mypy: no-implicit-optional def add(self, a: int, b: int = None) -> int: return a + b … gives me run.py:4: error: Unsupported operan...
Open Graph Description: I found a potential bug (not sure) with mypy 0.740 and Python 3.6.5 & Python 3.7.1. The following code: # mypy: no-implicit-optional def add(self, a: int, b: int = None) -> int: return a + b … give...
X Description: I found a potential bug (not sure) with mypy 0.740 and Python 3.6.5 & Python 3.7.1. The following code: # mypy: no-implicit-optional def add(self, a: int, b: int = None) -> int: return a + b...
Opengraph URL: https://github.com/python/mypy/issues/8029
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"option no-implicit-optional ignored as inline configuration and per-module flags","articleBody":"I found a potential bug (not sure) with mypy 0.740 and Python 3.6.5 & Python 3.7.1.\r\n\r\nThe following code:\r\n\r\n``` python3\r\n# mypy: no-implicit-optional\r\n\r\ndef add(self, a: int, b: int = None) -> int:\r\n return a + b\r\n```\r\n\r\n… gives me \r\n\r\n run.py:4: error: Unsupported operand types for + (\"int\" and \"None\")\r\n run.py:4: note: Right operand is of type \"Optional[int]\"\r\n\r\n… but I would expect to get the more clear\r\n\r\n run.py:3: error: Incompatible default for argument \"b\" (default has type \"None\", argument has type \"int\")\r\n\r\n… because the inline config \"no-implicit-optional\" is set. It is the same if I have a per file/moule section in my mypy.ini, but it works i if define it globally (in [mypy] section) or via command line switch.","author":{"url":"https://github.com/fnep","@type":"Person","name":"fnep"},"datePublished":"2019-11-28T10:04:58Z","url":"https://github.com/python/mypy/issues/8029"}
| 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:6beb433f-a874-5071-47c4-f2e129193313 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D28A:63646:20AE88:2D6A74:6B0067B9 |
| html-safe-nonce | 618345023a7fd79248d549297aa480363792c073088664fdc8de483a2be5e694 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjhBOjYzNjQ2OjIwQUU4ODoyRDZBNzQ6NkIwMDY3QjkiLCJ2aXNpdG9yX2lkIjoiODEwNzgwODAwOTI1OTg3MDEzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3f1bacebc420b83131a737c6de814d361da0748e55f04ca35981233f455e3799 |
| hovercard-subject-tag | issue:529811970 |
| 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/8029/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a571cb438f986e682ed822a47053e1524f89b050f0497aa565abef10e5f9041/python/mypy/issues/8029 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a571cb438f986e682ed822a47053e1524f89b050f0497aa565abef10e5f9041/python/mypy/issues/8029 |
| og:image:alt | I found a potential bug (not sure) with mypy 0.740 and Python 3.6.5 & Python 3.7.1. The following code: # mypy: no-implicit-optional def add(self, a: int, b: int = None) -> int: return a + b … give... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fnep |
| hostname | github.com |
| expected-hostname | github.com |
| None | 25854482a1773a7c1ebb8be3d2bc1c6e61d82d78126be63b5044474a86d44d9e |
| 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 | e4f5c239e31f1f680e6bbc419ff92d774da616ec |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width