shahar1 opened a new pull request, #66977:
URL: https://github.com/apache/airflow/pull/66977

   Bare \`actual == expected\` expressions in tests silently evaluate and 
discard their result — the test passes regardless of correctness. This is 
exactly what happened in #66894 (four \`test_serialize\` methods in the Vertex 
AI tests had been vacuously passing for years).
   
   ## Changes
   
   - **\`pyproject.toml\`**: add \`B015\` (\`useless-comparison\`) to 
\`extend-select\`. This rule fires on any bare comparison expression used as a 
statement.
   - **16 test files**: add the missing \`assert\` to all 26 existing 
violations found by the rule across \`airflow-core\`, \`task-sdk\`, and 
providers (\`amazon\`, \`cncf/kubernetes\`, \`google\`).
   
   With this in place, any future bare comparison in a test is a lint error 
caught before CI runs.
   
   **Note:** four of the 26 fixes are in the same file as #66894. If that PR 
merges first this one will have a trivial conflict; if this merges first, 
#66894's changes become a no-op on those four lines and can be rebased away.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Sonnet 4.6)
   
   Generated-by: Claude Code (Sonnet 4.6) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to