Skip to content
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

treat tuples as lists #180

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

treat tuples as lists #180

wants to merge 1 commit into from

Conversation

Inilien
Copy link

@Inilien Inilien commented Mar 10, 2019

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
Copy link

codecov-io commented Mar 10, 2019

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
Copy link
Member

jamesls commented Mar 3, 2020

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.

Copy link
Member

@jamesls jamesls left a comment

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.

@@ -202,7 +202,7 @@ def visit_identity(self, node, value):
def visit_index(self, node, value):
# 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
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

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

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.

4 participants