René's URL Explorer Experiment


Title: Issue #108: Shortcuts for boolean arguments by alexshadley · Pull Request #141 · google/python-fire · GitHub

Open Graph Title: Issue #108: Shortcuts for boolean arguments by alexshadley · Pull Request #141 · google/python-fire

X Title: Issue #108: Shortcuts for boolean arguments by alexshadley · Pull Request #141 · google/python-fire

Description: In response to this issue. This adds a feature where a shortcut can be used for boolean arguments of functions. For example the function def foo(bar=False): can be invoked as foo -b to set bar to True. While developing this, I came across a couple concerns: In detecting whether or not arguments matched the pattern of a bool shortcut, I decided that python's regex library was the best way to solve this problem. Is adding re to imports ok? If a naming collision occurs (see final assert of testBoolShortcutParsing) the program raises a FireError describing the ambiguity. Is this a proper manner to use this error in? Currently, if a shortcut doesn't match any function argument, it is parsed as-is. Should something else be done in this scenario?

Open Graph Description: In response to this issue. This adds a feature where a shortcut can be used for boolean arguments of functions. For example the function def foo(bar=False): can be invoked as foo -b to set bar to...

X Description: In response to this issue. This adds a feature where a shortcut can be used for boolean arguments of functions. For example the function def foo(bar=False): can be invoked as foo -b to set bar to...

Opengraph URL: https://github.com/google/python-fire/pull/141

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6392e3f2-3187-c2ac-5fe3-924bb0fd2448
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDF90:1BAA33:1AFF27D:23D739C:6B002C55
html-safe-nonce8c909860f5c0140a9b9c78137fceedb7235fecbe2bf76f454d6bb237aa42aaae
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjkwOjFCQUEzMzoxQUZGMjdEOjIzRDczOUM6NkIwMDJDNTUiLCJ2aXNpdG9yX2lkIjoiMTQ4ODAzNzg0NTc5NTg3NTkyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc7b96cab0e86fa2012a2a80a92815f396e080031c2f56f2af95d3dcbbabf6d0b
hovercard-subject-tagpull_request:215834411
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/google/python-fire/pull/141/files
twitter:imagehttps://avatars.githubusercontent.com/u/1240207?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1240207?s=400&v=4
og:image:altIn response to this issue. This adds a feature where a shortcut can be used for boolean arguments of functions. For example the function def foo(bar=False): can be invoked as foo -b to set bar to...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/google/python-fire git https://github.com/google/python-fire.git
octolytics-dimension-user_id1342004
octolytics-dimension-user_logingoogle
octolytics-dimension-repository_id82729529
octolytics-dimension-repository_nwogoogle/python-fire
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id82729529
octolytics-dimension-repository_network_root_nwogoogle/python-fire
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/google/python-fire/pull/141/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogle%2Fpython-fire%2Fpull%2F141%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogle%2Fpython-fire%2Fpull%2F141%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=google%2Fpython-fire
Reloadhttps://github.com/google/python-fire/pull/141/files
Reloadhttps://github.com/google/python-fire/pull/141/files
Reloadhttps://github.com/google/python-fire/pull/141/files
googlehttps://github.com/google
python-firehttps://github.com/google/python-fire
Codehttps://github.com/google/python-fire
Issues146 (146)https://github.com/google/python-fire/issues
Pull requests85 (85)https://github.com/google/python-fire/pulls
Actionshttps://github.com/google/python-fire/actions
Projectshttps://github.com/google/python-fire/projects
Security and qualityhttps://github.com/google/python-fire/security
Insightshttps://github.com/google/python-fire/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgoogle%2Fpython-fire%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgoogle%2Fpython-fire%2Fissues%2Fnew%2Fchoose
dbieberhttps://github.com/dbieber
google:masterhttps://github.com/google/python-fire/tree/master
alexshadley:masterhttps://github.com/alexshadley/python-fire/tree/master
Conversation 26 https://github.com/google/python-fire/pull/141
Commits 10 https://github.com/google/python-fire/pull/141/commits
Checks 0 https://github.com/google/python-fire/pull/141/checks
Files changed https://github.com/google/python-fire/pull/141/files
Please reload this pagehttps://github.com/google/python-fire/pull/141/files
Issue #108: Shortcuts for boolean arguments https://github.com/google/python-fire/pull/141/files#top
Show all changes 10 commits https://github.com/google/python-fire/pull/141/files
99b86dc adds support for parsing shortcuts for boolean arguments, along with … alexshadley Sep 16, 2018 https://github.com/google/python-fire/pull/141/commits/99b86dc5a9832bf95cfcb33d0d88c52c548fd60a
a18aee3 fixes line size for PEP8 alexshadley Sep 28, 2018 https://github.com/google/python-fire/pull/141/commits/a18aee3a86586eaede46cfb151acf2908b94ec55
732711b additional style compliance alexshadley Sep 28, 2018 https://github.com/google/python-fire/pull/141/commits/732711bc85f86737ec23f68ede37c3052e57e31b
c73064a style compliance alexshadley Sep 28, 2018 https://github.com/google/python-fire/pull/141/commits/c73064a790d75d0ac78fca53aaa81a2dfc1c2677
c9ba0ac encapsulates flag-detection logic in functions and merges argument re… alexshadley Oct 5, 2018 https://github.com/google/python-fire/pull/141/commits/c9ba0acd88e90c1f3c9a8545b796eb2e7b5921d8
89c25cf adds additional tests to test shortcut args with non-boolean values alexshadley Oct 5, 2018 https://github.com/google/python-fire/pull/141/commits/89c25cf9b3b6a5ee41d3a9694c057d265dc6612b
632232e adds function comments alexshadley Oct 5, 2018 https://github.com/google/python-fire/pull/141/commits/632232eea9754c0eacd3289635b1380cbda391f6
b95921b formatting fixes alexshadley Oct 5, 2018 https://github.com/google/python-fire/pull/141/commits/b95921b9e1327cc3f74747cd56835daaba885174
12100e2 fixes comment alexshadley Oct 5, 2018 https://github.com/google/python-fire/pull/141/commits/12100e29fa836560607fc42c315144c530907991
604be42 more formatting fixes alexshadley Oct 5, 2018 https://github.com/google/python-fire/pull/141/commits/604be4280698b6255d177f296fcbaecc11e954fa
Clear filters https://github.com/google/python-fire/pull/141/files
Please reload this pagehttps://github.com/google/python-fire/pull/141/files
Please reload this pagehttps://github.com/google/python-fire/pull/141/files
core.py https://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
fire_test.py https://github.com/google/python-fire/pull/141/files#diff-aa3f37ac40e6fda833b29b147fa77596dfa57b394ef6ccfc6a13b48797b363c1
test_components.py https://github.com/google/python-fire/pull/141/files#diff-0a85d0cc80b635d47959579569b4f7aac45d66fcf5a61261d02e2ce943fe94a4
fire/core.pyhttps://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
View file https://github.com/alexshadley/python-fire/blob/604be4280698b6255d177f296fcbaecc11e954fa/fire/core.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/google/python-fire/pull/141/{{ revealButtonHref }}
https://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
https://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
https://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
https://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
https://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
dbieberhttps://github.com/dbieber
Oct 5, 2018https://github.com/google/python-fire/pull/141/files#r222887976
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/google/python-fire/pull/141/files
alexshadleyhttps://github.com/alexshadley
Oct 5, 2018https://github.com/google/python-fire/pull/141/files#r222888469
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/google/python-fire/pull/141/files
dbieberhttps://github.com/dbieber
Oct 5, 2018https://github.com/google/python-fire/pull/141/files#r222889258
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/google/python-fire/pull/141/files
alexshadleyhttps://github.com/alexshadley
Oct 5, 2018https://github.com/google/python-fire/pull/141/files#r222889381
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/google/python-fire/pull/141/files
https://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
https://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
https://github.com/google/python-fire/pull/141/files#diff-6e71ec955d67ac88066d77413af38a8043e03fbb28835c40e70c8d804e61f403
fire/fire_test.pyhttps://github.com/google/python-fire/pull/141/files#diff-aa3f37ac40e6fda833b29b147fa77596dfa57b394ef6ccfc6a13b48797b363c1
View file https://github.com/alexshadley/python-fire/blob/604be4280698b6255d177f296fcbaecc11e954fa/fire/fire_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/google/python-fire/pull/141/{{ revealButtonHref }}
https://github.com/google/python-fire/pull/141/files#diff-aa3f37ac40e6fda833b29b147fa77596dfa57b394ef6ccfc6a13b48797b363c1
https://github.com/google/python-fire/pull/141/files#diff-aa3f37ac40e6fda833b29b147fa77596dfa57b394ef6ccfc6a13b48797b363c1
fire/test_components.pyhttps://github.com/google/python-fire/pull/141/files#diff-0a85d0cc80b635d47959579569b4f7aac45d66fcf5a61261d02e2ce943fe94a4
View file https://github.com/alexshadley/python-fire/blob/604be4280698b6255d177f296fcbaecc11e954fa/fire/test_components.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/google/python-fire/pull/141/{{ revealButtonHref }}
https://github.com/google/python-fire/pull/141/files#diff-0a85d0cc80b635d47959579569b4f7aac45d66fcf5a61261d02e2ce943fe94a4
https://github.com/google/python-fire/pull/141/files#diff-0a85d0cc80b635d47959579569b4f7aac45d66fcf5a61261d02e2ce943fe94a4
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.