googleapis / python-firestore

Apache License 2.0
219 stars 75 forks source link

warning: filter using positional arguments in base_collection.py #922

Open ivica3730k opened 6 months ago

ivica3730k commented 6 months ago

Just detected this warning while running some local unit tests

https://github.com/googleapis/python-firestore/blob/9521deddc5a4b16956f37136f84928ac99688022/google/cloud/firestore_v1/base_collection.py#L302

tests/test_main.py::MainTest::********
  /usr/local/lib/python3.10/site-packages/google/cloud/firestore_v1/base_collection.py:302: UserWarning: Detected filter using positional arguments. Prefer using the 'filter' keyword argument instead.
    return query.where(field_path, op_string, value)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
ivica3730k commented 6 months ago

Running the latest 2.16 version of the library