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

Add class name support for CallsiteParameterAdder #386

Open
aucampia opened this issue Dec 16, 2021 · 3 comments
Open

Add class name support for CallsiteParameterAdder #386

aucampia opened this issue Dec 16, 2021 · 3 comments
Labels

Comments

@aucampia
Copy link
Contributor

It may be nice to include support for class name in CallsiteParameterAdder, not sure how practical/easy it will be though, or how reliable it is to get the class name of the callsite.

Original request from @gzmarstone here: #380 (comment)

I know its closed, but what about class if available as well... use case would be to find all of the logging calls in a particular class... You can check if the first arg is self, if it is then get the class and the name of that? I used this example to log the classname via structlog: https://stackoverflow.com/questions/2203424/python-how-to-retrieve-class-information-from-a-frame-object

@hynek
Copy link
Owner

hynek commented Dec 16, 2021

Sounds good! There won't be a 21.6 tho!!!! ;)

@hynek
Copy link
Owner

hynek commented Mar 10, 2022

JFTR, if you wanna tackle this, it might be a good time to start. I'm currently hounding @Tinche to follow through on a promise and would push 22.1 out right after.

@hynek
Copy link
Owner

hynek commented Oct 17, 2022

JFTR I looked at the linked solutions and holy shit unless we get a better way from Python core, this has to wait. 😅

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

Successfully merging a pull request may close this issue.

2 participants