Recursive Grep by file type
The -t flag is used to specify python files.
rg "import" -t py
manage.py 3:import os 4:import sys notes/wsgi.py 10:import os 12:from django.core.wsgi import get_wsgi_application notes/asgi.py 10:import os 12:from django.core.asgi import get_asgi_application testing_views/views.py 1:from django.shortcuts import render 2:from django.views.generic import TemplateView, DetailView, ListView 3:from .models import * 5:from django.db.models import Q
Note that the output returns both the file, line number of the import and the import full text