Skip to content

Conversation

@dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Jun 6, 2025

No description provided.

@dylwil3 dylwil3 added rule Implementing or modifying a lint rule fixes Related to suggested fixes for violations labels Jun 6, 2025
@dylwil3 dylwil3 added this to the v0.12 milestone Jun 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+8 -5 violations, +0 -0 fixes in 3 projects; 52 projects unchanged)

apache/airflow (+6 -4 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --no-preview --select ALL

+ providers/apache/druid/src/airflow/providers/apache/druid/hooks/druid.py:90:9: SIM108 Use binary operator `conn_type = self.conn.schema or (self.conn.conn_type or "http")` instead of `if`-`else`-block
- providers/apache/druid/src/airflow/providers/apache/druid/hooks/druid.py:90:9: SIM108 Use ternary operator `conn_type = self.conn.schema if self.conn.schema else self.conn.conn_type or "http"` instead of `if`-`else`-block
+ providers/apache/druid/tests/unit/apache/druid/hooks/test_druid.py:42:17: SIM108 Use binary operator `conn_type = self.conn.schema or "http"` instead of `if`-`else`-block
- providers/apache/druid/tests/unit/apache/druid/hooks/test_druid.py:42:17: SIM108 Use ternary operator `conn_type = self.conn.schema if self.conn.schema else "http"` instead of `if`-`else`-block
+ providers/celery/src/airflow/providers/celery/cli/celery_command.py:276:5: SIM108 Use binary operator `umask = args.umask or conf.get("celery", "worker_umask", fallback=settings.DAEMON_UMASK)` instead of `if`-`else`-block
- providers/celery/src/airflow/providers/celery/cli/celery_command.py:276:5: SIM108 Use ternary operator `umask = args.umask if args.umask else conf.get("celery", "worker_umask", fallback=settings.DAEMON_UMASK)` instead of `if`-`else`-block
+ providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:179:13: SIM108 Use binary operator `namespaces = self.kube_config.multi_namespace_mode_namespace_list or [None]` instead of `if`-`else`-block
+ providers/databricks/src/airflow/providers/databricks/operators/databricks_sql.py:144:17: SIM108 Use binary operator `csv_params = self._csv_params or {}` instead of `if`-`else`-block
- providers/databricks/src/airflow/providers/databricks/operators/databricks_sql.py:144:17: SIM108 Use ternary operator `csv_params = self._csv_params if self._csv_params else {}` instead of `if`-`else`-block
+ providers/imap/src/airflow/providers/imap/hooks/imap.py:92:13: SIM108 Use binary operator `ssl_context_string = extra_ssl_context or conf.get("imap", "SSL_CONTEXT", fallback=None)` instead of `if`-`else`-block

scikit-build/scikit-build (+1 -0 violations, +0 -0 fixes)

+ skbuild/setuptools_wrap.py:533:5: SIM108 Use binary operator `cmake_install_target = cmake_install_target_from_command or cmake_install_target_from_setup` instead of `if`-`else`-block

zulip/zulip (+1 -1 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --no-preview --select ALL

+ zerver/webhooks/bitbucket3/view.py:79:5: SIM108 Use binary operator `topic_name = include_title or "Bitbucket Server Ping"` instead of `if`-`else`-block
- zerver/webhooks/bitbucket3/view.py:79:5: SIM108 Use ternary operator `topic_name = include_title if include_title else "Bitbucket Server Ping"` instead of `if`-`else`-block

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
SIM108 13 8 5 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@dylwil3 dylwil3 force-pushed the dylan/stabilize-binary-simplify branch from 2b24649 to c6dc62f Compare June 6, 2025 18:20
@dylwil3
Copy link
Collaborator Author

dylwil3 commented Jun 6, 2025

The ecosystem checks are correct! The reason for the new lints is that the rule is skipped if the suggested replacement would exceed the configured maximum line length. Since we now suggest further simplifying to a binary expression, which is shorter, there are more possible places where the lint may trigger.

Since I found this a bit surprising, I also updated the documentation to alert users to this point.

@dylwil3 dylwil3 force-pushed the dylan/stabilize-binary-simplify branch from c6dc62f to 8558cea Compare June 6, 2025 21:37
@dylwil3 dylwil3 merged commit 3ba59e2 into brent/release-0.12.0 Jun 6, 2025
34 checks passed
@dylwil3 dylwil3 deleted the dylan/stabilize-binary-simplify branch June 6, 2025 21:46
@dylwil3 dylwil3 mentioned this pull request Jun 6, 2025
2 tasks
ntBre pushed a commit that referenced this pull request Jun 8, 2025
…sions in autofix for `if-else-block-instead-of-if-exp` (`SIM108`) (#18506)
ntBre pushed a commit that referenced this pull request Jun 8, 2025
…sions in autofix for `if-else-block-instead-of-if-exp` (`SIM108`) (#18506)
ntBre pushed a commit that referenced this pull request Jun 9, 2025
…sions in autofix for `if-else-block-instead-of-if-exp` (`SIM108`) (#18506)
ntBre pushed a commit that referenced this pull request Jun 10, 2025
…sions in autofix for `if-else-block-instead-of-if-exp` (`SIM108`) (#18506)
ntBre pushed a commit that referenced this pull request Jun 11, 2025
…sions in autofix for `if-else-block-instead-of-if-exp` (`SIM108`) (#18506)
ntBre pushed a commit that referenced this pull request Jun 17, 2025
…sions in autofix for `if-else-block-instead-of-if-exp` (`SIM108`) (#18506)
ntBre pushed a commit that referenced this pull request Jun 17, 2025
…sions in autofix for `if-else-block-instead-of-if-exp` (`SIM108`) (#18506)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes Related to suggested fixes for violations rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants