TypeError: unsupported operand type(s) for | [closed]

I'm getting the following linting error using Django Q objects: TypeError: unsupported operand type(s) for |

The below is my code (it does work but not sure why I'm getting this linting error). Also the error disappears when I remove the third Q object.

if request.GET:
    if 'q' in request.GET:
        query = request.GET['q']
        if not query:
            messages.error(request, "You didn't enter any search critera")
            return redirect(reverse('products'))

        queries = Q(
            name__icontains=query) | Q(description__icontains=query) | Q(
            excerpt__icontains=query)
        products = products.filter(queries)
Back to Top