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

i seemingly have to check asyncio.create_task and create_task.asyncio to catch more of them #2

Closed
altendky opened this issue Oct 26, 2023 · 2 comments · Fixed by #3
Closed

Comments

@altendky
Copy link

altendky commented Oct 26, 2023

$ venv/bin/python --version --version
Python 3.11.2 (main, Mar  5 2023, 21:14:41) [GCC 11.3.0]
$ venv/bin/pygrep create_task.asyncio a.py
a.py:6  create_task.asyncio
a.py(f):18      create_task.asyncio
$  venv/bin/pygrep asyncio.create_task a.py
a.py:9  asyncio.create_task
a.py:12 asyncio.create_task
a.py(f):18      asyncio.create_task.asyncio
a.py(f):20      asyncio.create_task
a.py(f):22      asyncio.create_task
$ cat --number a.py
     1  import ast
     2  import typing
     3  
     4  import asyncio
     5  
     6  asyncio.create_task
     7  from asyncio import create_task
     8  
     9  create_task
    10  from asyncio import create_task as blue
    11  
    12  blue
    13  
    14  
    15  
    16  def f():
    17      import asyncio
    18      asyncio.create_task
    19      from asyncio import create_task
    20      create_task
    21      from asyncio import create_task as blue
    22      blue
    23  
    24  
    25  def main():
    26      ast.parse(source=__file__, filename=__file__,type_comments=True)
    27  
    28  
    29  main()
import ast
import typing

import asyncio

asyncio.create_task
from asyncio import create_task

create_task
from asyncio import create_task as blue

blue



def f():
    import asyncio
    asyncio.create_task
    from asyncio import create_task
    create_task
    from asyncio import create_task as blue
    blue


def main():
    ast.parse(source=__file__, filename=__file__,type_comments=True)


main()
@Pike
Copy link
Owner

Pike commented Nov 14, 2023

Thanks for the interest, seems you found more than one bug ;-) .

It's been a while since I worked on this tool, so there's also some spring cleaning to do.

@Pike Pike linked a pull request Nov 28, 2023 that will close this issue
@Pike Pike closed this as completed in #3 Dec 10, 2023
Pike added a commit that referenced this issue Dec 10, 2023
* Update project setup to the present state of the art
* Convert from callback to iterator pattern
* Add tests, support top-level import
* Add __main__.py and fix constructor
@Pike
Copy link
Owner

Pike commented Dec 10, 2023

https://pypi.org/project/pygrep/0.3/ is out, thanks for reporting.

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 a pull request may close this issue.

2 participants