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

get_fnc_from_line should return falsy if owner function is private/has dunder #11

Open
kremrik opened this issue Feb 15, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@kremrik
Copy link
Owner

kremrik commented Feb 15, 2020

In the below example, the call to main in the main block will return the main function itself because it's the first function definition found above the call

from test import fnc

def main():
    fnc()

if __name__ == "__main__":
    main()
@kremrik kremrik added the bug Something isn't working label Feb 15, 2020
@kremrik
Copy link
Owner Author

kremrik commented Feb 15, 2020

this means main blocks should be considered their own function, or that the calls they make to reference the file itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant