KEMBAR78
Add --find-occurrences experimental option by ddfisher · Pull Request #2042 · python/mypy · GitHub
Skip to content

Conversation

@ddfisher
Copy link
Collaborator

@ddfisher ddfisher commented Aug 19, 2016

I'm not sure if this is too hacky to merge, but I thought I'd put it up because it might be helpful to other people/to start a discussion.

Current problems:

  • uses the experiments module to get a global variable inside analyze_member_access
  • works only for non-nested class members

I've found it super useful already, though.

@rwbarton
Copy link
Contributor

Oh cool, this is something I would often do by just renaming the thing and seeing what errors popped up, but if you're using incremental then that isn't a great way to do it.

@ddfisher
Copy link
Collaborator Author

Unfortunately if you're using incremental this isn't a great way to do it either...

Making this work properly/efficiently with incremental would be a lot more work, and is potentially pretty complicated.

@gvanrossum
Copy link
Member

Is this worth keeping open?

@gvanrossum gvanrossum changed the title Add --find-occurrences experimental option [conflict] Add --find-occurrences experimental option Sep 29, 2016
@ddfisher ddfisher force-pushed the future/find-occurrences-prototype branch from 370de22 to 95ae167 Compare October 17, 2016 19:05
@ddfisher ddfisher changed the title [conflict] Add --find-occurrences experimental option Add --find-occurrences experimental option Oct 17, 2016
@ddfisher
Copy link
Collaborator Author

@gvanrossum thoughts on merging this? It's pretty constrained at the moment, but isn't much code and is super useful in certain circumstances.

@gvanrossum
Copy link
Member

gvanrossum commented Oct 21, 2016

Yeah, this is pretty handy. I've merged it. I recommend that you also add something to the docs; I had to try a few times before I found the right way to use it (it doesn't take module names at all).

@gvanrossum gvanrossum merged commit 50163d6 into master Oct 21, 2016
@gvanrossum gvanrossum deleted the future/find-occurrences-prototype branch October 21, 2016 17:22
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

Successfully merging this pull request may close these issues.

3 participants