Skip to content

treat tuples as lists#180

Open
Inilien wants to merge 1 commit into
jmespath:developfrom
Inilien:develop
Open

treat tuples as lists#180
Inilien wants to merge 1 commit into
jmespath:developfrom
Inilien:develop

Conversation

@Inilien

@Inilien Inilien commented Mar 10, 2019

Copy link
Copy Markdown

I believe now any tuples in input data should be treated as lists.
use case described in the issue #179 now works as expected in the issue

@codecov-io

codecov-io commented Mar 10, 2019

Copy link
Copy Markdown

Codecov Report

Merging #180 into develop will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #180   +/-   ##
========================================
  Coverage    98.19%   98.19%           
========================================
  Files           14       14           
  Lines         1441     1441           
========================================
  Hits          1415     1415           
  Misses          26       26
Impacted Files Coverage Δ
jmespath/visitor.py 99.05% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d5762b...3e5d9ca. Read the comment docs.

@jamesls

jamesls commented Mar 3, 2020

Copy link
Copy Markdown
Member

Looks good to me, we just need to get tests added and then I'll merge this. I'm happy to write these if no one has time.

@jamesls jamesls left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, we just need to add a test for this and this is good to merge.

Comment thread jmespath/visitor.py
# Even though we can index strings, we don't
# want to support that.
if not isinstance(value, list):
if not isinstance(value, (list, tuple)):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is duplicated below I'd suggest moving this up to line 110 and add a LIST_TYPE that we can reuse.

@zeitounator

Copy link
Copy Markdown

Hi. Are there any plans to have this merged soon ?

@chajath

chajath commented Jul 28, 2025

Copy link
Copy Markdown

If this PR is stale, I'm happy to take over and add tests to drive to closure. Anyone actively looking into this yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants