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

Infer starred expressions in tuple, list, set and dict literals #396

Merged
merged 7 commits into from
Feb 14, 2017

Conversation

rogalski
Copy link
Contributor

Just a POC, needs:

  1. Guidance on if it’s a correct way to solve a problem
  2. Extra tests
  3. Docs entries

Aims to solve pylint-dev/pylint#957

Just a POC, needs:

1) Guidance on if it’s a correct way to solve a problem
2) Extra tests
3) Docs entries

Aims to solve pylint-dev/pylint#957
@coveralls
Copy link

coveralls commented Jan 30, 2017

Coverage Status

Coverage decreased (-1.9%) to 87.449% when pulling 2106371 on rogalski:infer_starred into d0b5acd on PyCQA:master.

@rogalski
Copy link
Contributor Author

Lack of coverage is due to guard except clause not being hit. May be easily improved by adding additional tests.

@coveralls
Copy link

coveralls commented Feb 5, 2017

Coverage Status

Coverage increased (+0.02%) to 89.325% when pulling 5cc5e5b on rogalski:infer_starred into d0b5acd on PyCQA:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 89.325% when pulling b5b5eaf on rogalski:infer_starred into d0b5acd on PyCQA:master.

4 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 89.325% when pulling b5b5eaf on rogalski:infer_starred into d0b5acd on PyCQA:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 89.325% when pulling b5b5eaf on rogalski:infer_starred into d0b5acd on PyCQA:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 89.325% when pulling b5b5eaf on rogalski:infer_starred into d0b5acd on PyCQA:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 89.325% when pulling b5b5eaf on rogalski:infer_starred into d0b5acd on PyCQA:master.

@rogalski rogalski added the Needs review 🔍 Needs to be reviewed by one or multiple more persons label Feb 7, 2017
Copy link
Contributor

@PCManticore PCManticore left a comment

Choose a reason for hiding this comment

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

This looks amazing @rogalski. Left just one tiny comment. it would be amazing if you could backport this to 2.0 branch.



def infer_map(self, context=None):
if not any(isinstance(k, nodes.DictUnpack) for k, v in self.items):
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't use v.

@rogalski rogalski changed the title Infer starred expressions in (tuple, list, dict) literals Infer starred expressions in tuple, list, set and dict literals Feb 14, 2017
@rogalski rogalski merged commit 4e7d9fe into pylint-dev:master Feb 14, 2017
@rogalski rogalski deleted the infer_starred branch February 14, 2017 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs review 🔍 Needs to be reviewed by one or multiple more persons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants