Title: Is there any way that can transfer path string to pathlib.Path object? · Issue #260 · google/python-fire · GitHub
Open Graph Title: Is there any way that can transfer path string to pathlib.Path object? · Issue #260 · google/python-fire
X Title: Is there any way that can transfer path string to pathlib.Path object? · Issue #260 · google/python-fire
Description: I have some function that use pathlib.Path as argument, like following script from pathlib import Path import fire def test_fire(path: Path): print(type(path)) print(path) if __name__ == "__main__": fire.Fire(test_fire) I simply test it ...
Open Graph Description: I have some function that use pathlib.Path as argument, like following script from pathlib import Path import fire def test_fire(path: Path): print(type(path)) print(path) if __name__ == "__main__"...
X Description: I have some function that use pathlib.Path as argument, like following script from pathlib import Path import fire def test_fire(path: Path): print(type(path)) print(path) if __name__ == "__ma...
Opengraph URL: https://github.com/google/python-fire/issues/260
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Is there any way that can transfer path string to pathlib.Path object?","articleBody":"I have some function that use pathlib.Path as argument, like following script\r\n```python\r\nfrom pathlib import Path\r\nimport fire\r\n\r\n\r\ndef test_fire(path: Path):\r\n print(type(path))\r\n print(path)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n fire.Fire(test_fire)\r\n```\r\n\r\nI simply test it with this. \r\n```bash \r\npython test_fire.py \"/some_path_string\"\r\n\r\n\u003cclass 'str'>\r\n/some_path_string\r\n```\r\n\r\nI expect to get a `pathlib.Path` object rather than `str`. Is there any way that I can do this?\r\nThanks a lot.","author":{"url":"https://github.com/shichao-wang","@type":"Person","name":"shichao-wang"},"datePublished":"2020-05-19T07:11:26Z","url":"https://github.com/google/python-fire/issues/260"}
| 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:d2710b03-0283-7e48-043f-ab9a9d3caa8e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A372:3E4AC7:223E90C:2E61ACF:6B00237C |
| html-safe-nonce | 186ad41c9038d7a78285434ed1f410dcb6f4f2d1427e731b9eab10e7ccbadfe1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzcyOjNFNEFDNzoyMjNFOTBDOjJFNjFBQ0Y6NkIwMDIzN0MiLCJ2aXNpdG9yX2lkIjoiMTM3NTAyNTE2NDg4MTg0NzAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0a9ed5c37cec92a5ec971be429fee1b50914f104d51a3192a748ed2431c25aac |
| hovercard-subject-tag | issue:620735435 |
| 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/google/python-fire/260/issue_layout |
| twitter:image | https://opengraph.githubassets.com/86c720ad6cc54e2c278850fb0029262f53b156fa2de5a46e468713950022a89b/google/python-fire/issues/260 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/86c720ad6cc54e2c278850fb0029262f53b156fa2de5a46e468713950022a89b/google/python-fire/issues/260 |
| og:image:alt | I have some function that use pathlib.Path as argument, like following script from pathlib import Path import fire def test_fire(path: Path): print(type(path)) print(path) if __name__ == "__main__"... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shichao-wang |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/google/python-fire git https://github.com/google/python-fire.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 82729529 |
| octolytics-dimension-repository_nwo | google/python-fire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82729529 |
| octolytics-dimension-repository_network_root_nwo | google/python-fire |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width