-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct splitext() description, and example #74377
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### SUMMARY `splitext()` returns a 2-tuple of strings, and the last element of the return value includes the `.` ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr ``` $ v/bin/ansible localhost -mdebug -a msg="{{ 'foo.bar' | splitext }}" localhost | SUCCESS => { "msg": "('foo', '.bar')" } $ v/bin/ansible --version ansible 2.10.8 config file = /home/alex/.ansible.cfg configured module search path = ['/home/alex/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/alex/src/ansible-jq-filter/v/lib/python3.8/site-packages/ansible executable location = v/bin/ansible python version = 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0] ```
ansibot
added
affects_2.12
core_review
In order to be merged, this PR must follow the core review workflow.
docs
This issue/PR relates to or includes documentation.
docs_only
All changes are to files within the docs/docsite/ directory
needs_triage
Needs a first human triage before being processed.
small_patch
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
labels
Apr 22, 2021
bcoca
added
P3
Priority 3 - Approved, No Time Limitation
and removed
needs_triage
Needs a first human triage before being processed.
labels
Apr 22, 2021
This behavior might be different in Python3 and Python2. |
I just verified this on Python 2.7.18 and 3.9.4. The behavior is the same.
The suggested changes are correct. |
samdoran
approved these changes
Apr 22, 2021
acozine
pushed a commit
to acozine/ansible
that referenced
this pull request
Apr 28, 2021
`splitext()` returns a 2-tuple of strings, and the last element of the return value includes the `.` (cherry picked from commit c295de6)
Merged
acozine
added a commit
that referenced
this pull request
Apr 28, 2021
* Add description for COLLECTIONS_SCAN_SYS_PATH (#74351) Fixes: #74275 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit 567361b) * lighten navigation background to make section labels easier to read for core docs (#74356) * make section labels for /ansible-core/ docs easier to read, with black text and lighter gray background (cherry picked from commit 6119fb0) * Correct splitext() description, and example (#74377) `splitext()` returns a 2-tuple of strings, and the last element of the return value includes the `.` (cherry picked from commit c295de6) * Using "~" instead of "+" for concatination (#74364) Changed FAQ examples to conform with the Jinja documentation: If both values on either side of a plus/+ are numbers, they will be added whereas using "~" will convert all operands into strings and then concatenate them. Closes #73799. (cherry picked from commit e6a5245) * Docs - Split Developing collections page, add info on optional module_utils (#74105) * (cherry picked from commit c90922e) * Add weos4 network platform to documentation (#74088) * Add weos4 network platform to documentation * Fix small format issues (cherry picked from commit 7ca5ded) * Fix typo in Makefile (#74396) Fixed minor typo specfic -> specific (cherry picked from commit 4880fee) * Update complex_data_manipulation.rst (#72509) (cherry picked from commit c2985c4) * Update VMware library installation docs (#71219) Depending upon OS/distro, please use pip/pip3. (cherry picked from commit ddfc648) * Update AWS dev guides to use collections utils and fragments (#72312) (cherry picked from commit cf08c23) * Use is_boto3_error_code in 'standard' example (#72313) Use is_boto3_error_code in 'standard' example rather than e.response['Error']['Code'] (#72313) Co-authored-by: Sloane Hertel <shertel@redhat.com> (cherry picked from commit 63afb33) * Update Kubernetes collection name in docs (#74440) (cherry picked from commit 8d499bb) * Update argcomplete docs links on installation guide (#74410) Link on installation docs is outdated. Switch to currently docs at: https://kislyuk.github.io/argcomplete/ (cherry picked from commit f97787c) * fix spacing to fix header, reorg contributing page (#74421) Co-authored-by: John R Barker <john@johnrbarker.com> (cherry picked from commit 9d9b08b) * Update first_found documentation (#70502) * import_tasks do not work with loop, use use include_tasks instead * update documentation (cherry picked from commit bacede7) * Product-related updates. (#74454) (cherry picked from commit 34c9ed8) Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com> Co-authored-by: Sandra McCann <samccann@redhat.com> Co-authored-by: Alex Willmer <alex@moreati.org.uk> Co-authored-by: Hublerho <43293510+Hublerho@users.noreply.github.com> Co-authored-by: Ernst Oudhof <17832702+ernst-s@users.noreply.github.com> Co-authored-by: Hu Shuai <hus.fnst@cn.fujitsu.com> Co-authored-by: dhx-mike-palandra <45608336+dhx-mike-palandra@users.noreply.github.com> Co-authored-by: jakelevinez <31458570+jakelevinez@users.noreply.github.com> Co-authored-by: Mark Chappell <mchappel@redhat.com> Co-authored-by: Lidiane Taquehara <lidi.mayra@gmail.com> Co-authored-by: Alex Domoradov <alex.hha@gmail.com> Co-authored-by: Bill Nottingham <notting@redhat.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.12
core_review
In order to be merged, this PR must follow the core review workflow.
docs_only
All changes are to files within the docs/docsite/ directory
docs
This issue/PR relates to or includes documentation.
P3
Priority 3 - Approved, No Time Limitation
small_patch
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
splitext()
returns a 2-tuple of strings, and the last element of the return value includes the.
ISSUE TYPE
+label: docsite_pr
SUMMARY
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION