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

Select Usages not detecting all usages #90

Open
d3v-null opened this issue Mar 20, 2017 · 2 comments
Open

Select Usages not detecting all usages #90

d3v-null opened this issue Mar 20, 2017 · 2 comments

Comments

@d3v-null
Copy link

d3v-null commented Mar 20, 2017

Hey!

Here's an example of a file where Show Usages fails to detect all usages of all_updates.

class Args(object):
    """ Stores user arguments """
    do_a_thing = False

def main():
    """ main function """
    args = Args()

    all_updates = ["foo"]
    if args.do_a_thing:
        # all_updates.append("bar") <- this is detected correctly
        all_updates += ["bar"] # this is not

    print "Update databases (%d)" % len(all_updates)

if __name__ == '__main__':
    main()

Could you brief me on where to get started if I wanted to submit a PR? Thanks

My system:

> atom --version
Atom    : 1.15.0
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0
> apm list
Built-in Atom Packages (89)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Community Packages (64) /Users/Derwent/.atom/packages
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
macOS Sierra 10.12.3 (16D32)
MacBookPro11,3
Intel Core i7
@MichaelAquilina
Copy link
Owner

MichaelAquilina commented Mar 20, 2017

Hi @derwentx. Thanks for opening an issue. I am afraid that a bug like this would be something that needs to be fixed in jedi though, which is what powers the functionality of get usages. Maybe try poke around in there?

@d3v-null
Copy link
Author

Ah, thanks for the reply.

I had a look at Jedi and it looks like it's a known issue:
davidhalter/jedi#744 but the developer has put the issue down as a low priority.

Are there any other static analysis tools for Python that could be of use here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants