Title: "FileHandler" has no attribute "set_name" · Issue #5257 · python/typeshed · GitHub
Open Graph Title: "FileHandler" has no attribute "set_name" · Issue #5257 · python/typeshed
X Title: "FileHandler" has no attribute "set_name" · Issue #5257 · python/typeshed
Description: Bug Report I have looked in the logging standard library and to me it seems that FileHandler has a standard mro, inheriting set_name from Handler, yet mypy complains: To Reproduce # example.py from logging import FileHandler h = FileHand...
Open Graph Description: Bug Report I have looked in the logging standard library and to me it seems that FileHandler has a standard mro, inheriting set_name from Handler, yet mypy complains: To Reproduce # example.py from...
X Description: Bug Report I have looked in the logging standard library and to me it seems that FileHandler has a standard mro, inheriting set_name from Handler, yet mypy complains: To Reproduce # example.py from...
Opengraph URL: https://github.com/python/typeshed/issues/5257
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"FileHandler\" has no attribute \"set_name\"","articleBody":"\u003c!--\r\n If you're new to mypy and you're not sure whether what you're experiencing is a mypy bug, please see the \"Question and Help\" form\r\n instead.\r\n-->\r\n\r\n**Bug Report**\r\n\r\n\u003c!--\r\nNote: If the problem you are reporting is about a specific library function, then the typeshed tracker is better suited\r\nfor this report: https://github.com/python/typeshed/issues\r\n-->\r\n\r\nI have looked in the `logging` standard library and to me it seems that `FileHandler` has a standard mro, inheriting `set_name` from `Handler`, yet `mypy` complains:\r\n\r\n**To Reproduce**\r\n\r\n```python\r\n# example.py\r\nfrom logging import FileHandler\r\n\r\nh = FileHandler('a')\r\nh.set_name('b')\r\n```\r\n```\r\n$ mypy example.py \r\nexample.py:4: error: \"FileHandler\" has no attribute \"set_name\"\r\nFound 1 error in 1 file (checked 1 source file)\r\n```\r\n\r\n**Expected Behavior**\r\n\r\n\u003c!--\r\n How did you expect your project to behave?\r\n It’s fine if you’re not sure your understanding is correct.\r\n Write down what you thought would happen. If you just expected no errors, you can delete this section.\r\n-->\r\n\r\nNo error\r\n\r\n**Your Environment**\r\n\r\n```bash\r\n$ mypy --version\r\nmypy 0.770\r\n$ python --version\r\nPython 3.7.5\r\n```\r\n\r\nNo configuration files, flags, etc.\r\n","author":{"url":"https://github.com/spagh-eddie","@type":"Person","name":"spagh-eddie"},"datePublished":"2021-04-26T22:36:16Z","url":"https://github.com/python/typeshed/issues/5257"}
| 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:2d61ac3b-0e41-0894-fb5e-826eac6a2612 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B69C:3E7030:DB4522:1271207:6B0057DD |
| html-safe-nonce | 25e1c8c3e8aea1a6098de92c461f77bc86ded0396a1b7014ee8ff92b286fdb7f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjlDOjNFNzAzMDpEQjQ1MjI6MTI3MTIwNzo2QjAwNTdERCIsInZpc2l0b3JfaWQiOiIxODMyMDQ0ODgzNDU2NTc5NTQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | aa771cfb1eafddc6443a36eb30efe9750324679eb612b97060d6a237c1974416 |
| hovercard-subject-tag | issue:868254685 |
| 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/typeshed/5257/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0d2472c766360ed5511a0ea814e02345e6655375762db67c439efa534572f8ac/python/typeshed/issues/5257 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0d2472c766360ed5511a0ea814e02345e6655375762db67c439efa534572f8ac/python/typeshed/issues/5257 |
| og:image:alt | Bug Report I have looked in the logging standard library and to me it seems that FileHandler has a standard mro, inheriting set_name from Handler, yet mypy complains: To Reproduce # example.py from... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | spagh-eddie |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width