-
Notifications
You must be signed in to change notification settings - Fork 202
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
make @function.outer and @class.outer for python always use the decorated version #648
Conversation
I like this too. Can you make it the same for the class? |
But the tests are failing.. Do you know why? You don't have to care about the consistency tests because the functionality changed anyway |
Another problem is that if you just remove the textobject, then it won't grab when the function doesn't have decorators.. |
i'll take a look at the class queries, but i will make no promises since i am not very experienced with this 😄 |
so i did take a look and found that the query for class could be adjusted in the same way. did just that, seems to pass the tests
now it seemingly works for both cases, i basically just marked the |
Although I haven't tested it, I like the approach. Interestingly the consistency test still pass, and I thought it would fail. Maybe I didn't add the |
from what I understand from reading the consistency tests script, they only check a big also thank you for the approval! fyi: i think only maintainers can merge with failing status checks, and since failed loading of R syntax files is a known problem being solved elsewhere, please feel free to merge this at your convenience 🙂 |
You're right! Thanks for looking into it. I'll merge this when the query problem gets fixed |
Can you rebase it to master? |
done 🙃 |
See #638 for context.
This is a minor adjustment to the Python queries that I find to produce a more useful behavior: I don't ever need to select a function without its decorators, because when I select a whole function, it's to move it, delete it or copy it in whole, and in all cases, I almost never need to leave the decorators out of my operation. If I do sometimes need to leave them out, I can manually adjust the selection later in a multitude of ways. I admit that this might be a personal preference issue, but I don't have reason to believe that my work differs from the average significantly in this instance.
In any case, please tell me if I need to adjust something else or otherwise, as I am not very experienced with treesitter yet.
upd: seeing the failing tests, will look into those later, feel free to post any advice for those