-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUF010: New rule for removing blank comments #4269
RUF010: New rule for removing blank comments #4269
Conversation
PR Check ResultsEcosystemℹ️ ecosystem check detected changes. (+239, -0, 0 error(s)) airflow (+77, -0)
+ airflow/config_templates/airflow_local_settings.py:189:18: RUF010 [*] Blank comments are useless and should be removed
+ airflow/config_templates/airflow_local_settings.py:190:17: RUF010 [*] Blank comments are useless and should be removed
+ airflow/config_templates/airflow_local_settings.py:191:18: RUF010 [*] Blank comments are useless and should be removed
+ airflow/migrations/db_types.py:24:38: RUF010 [*] Blank comments are useless and should be removed
+ airflow/migrations/db_types.py:30:38: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/security.py:157:79: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/security.py:159:79: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/security.py:63:79: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/security.py:65:79: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/views.py:4089:86: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/views.py:4091:86: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/views.py:556:86: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/views.py:558:86: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/views.py:605:86: RUF010 [*] Blank comments are useless and should be removed
+ airflow/www/views.py:607:86: RUF010 [*] Blank comments are useless and should be removed
+ setup.py:505:109: RUF010 [*] Blank comments are useless and should be removed
+ setup.py:507:109: RUF010 [*] Blank comments are useless and should be removed
+ setup.py:571:109: RUF010 [*] Blank comments are useless and should be removed
+ setup.py:573:109: RUF010 [*] Blank comments are useless and should be removed
+ tests/providers/amazon/aws/hooks/test_eks.py:228:7: RUF010 [*] Blank comments are useless and should be removed
+ tests/providers/amazon/aws/hooks/test_eks.py:233:7: RUF010 [*] Blank comments are useless and should be removed
+ tests/providers/google/cloud/operators/test_bigquery.py:662:65: RUF010 [*] Blank comments are useless and should be removed
+ tests/providers/google/cloud/operators/test_bigquery.py:664:65: RUF010 [*] Blank comments are useless and should be removed
+ tests/providers/google/cloud/operators/test_bigquery.py:699:65: RUF010 [*] Blank comments are useless and should be removed
+ tests/providers/google/cloud/operators/test_bigquery.py:701:65: RUF010 [*] Blank comments are useless and should be removed
+ tests/serialization/test_dag_serialization.py:980:65: RUF010 [*] Blank comments are useless and should be removed
+ tests/serialization/test_dag_serialization.py:982:65: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/bigquery/example_bigquery_queries_async.py:260:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/bigquery/example_bigquery_queries_async.py:261:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_memorystore/example_cloud_memorystore_memcached.py:141:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_memorystore/example_cloud_memorystore_memcached.py:142:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_memorystore/example_cloud_memorystore_redis.py:262:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_memorystore/example_cloud_memorystore_redis.py:263:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:153:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:154:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:155:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:169:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:170:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:171:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:194:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:195:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:196:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:236:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:237:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:238:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:245:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:246:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:247:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:256:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:257:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:258:53: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:316:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/cloud_sql/example_cloud_sql.py:317:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/compute/example_compute.py:274:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/compute/example_compute.py:275:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/compute/example_compute_igm.py:242:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/compute/example_compute_igm.py:243:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/compute/example_compute_ssh.py:117:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/compute/example_compute_ssh.py:118:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/dataform/example_dataform.py:296:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/dataform/example_dataform.py:297:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/pubsub/example_pubsub.py:146:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/pubsub/example_pubsub.py:147:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/spanner/example_spanner.py:159:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/spanner/example_spanner.py:160:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/translate/example_translate.py:56:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/translate/example_translate.py:57:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/workflows/example_workflows.py:231:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/cloud/workflows/example_workflows.py:232:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/datacatalog/example_datacatalog_entries.py:199:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/datacatalog/example_datacatalog_entries.py:200:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/datacatalog/example_datacatalog_search_catalog.py:220:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/datacatalog/example_datacatalog_search_catalog.py:221:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/datacatalog/example_datacatalog_tag_templates.py:182:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/datacatalog/example_datacatalog_tag_templates.py:183:43: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/datacatalog/example_datacatalog_tags.py:232:63: RUF010 [*] Blank comments are useless and should be removed
+ tests/system/providers/google/datacatalog/example_datacatalog_tags.py:233:43: RUF010 [*] Blank comments are useless and should be removed disnake (+10, -0)
+ disnake/types/gateway.py:155:5: RUF010 [*] Blank comments are useless and should be removed
+ disnake/types/gateway.py:157:5: RUF010 [*] Blank comments are useless and should be removed
+ disnake/types/gateway.py:177:5: RUF010 [*] Blank comments are useless and should be removed
+ disnake/types/gateway.py:179:5: RUF010 [*] Blank comments are useless and should be removed
+ disnake/types/gateway.py:243:5: RUF010 [*] Blank comments are useless and should be removed
+ disnake/types/gateway.py:245:5: RUF010 [*] Blank comments are useless and should be removed
+ disnake/types/gateway.py:46:5: RUF010 [*] Blank comments are useless and should be removed
+ disnake/types/gateway.py:48:5: RUF010 [*] Blank comments are useless and should be removed
+ disnake/types/gateway.py:58:5: RUF010 [*] Blank comments are useless and should be removed
+ disnake/types/gateway.py:60:5: RUF010 [*] Blank comments are useless and should be removed zulip (+152, -0)
+ analytics/lib/counts.py:105:32: RUF010 [*] Blank comments are useless and should be removed
+ analytics/lib/counts.py:25:19: RUF010 [*] Blank comments are useless and should be removed
+ analytics/lib/counts.py:289:53: RUF010 [*] Blank comments are useless and should be removed
+ analytics/lib/counts.py:33:23: RUF010 [*] Blank comments are useless and should be removed
+ analytics/lib/counts.py:347:36: RUF010 [*] Blank comments are useless and should be removed
+ analytics/lib/counts.py:705:32: RUF010 [*] Blank comments are useless and should be removed
+ analytics/views/installation_activity.py:406:7: RUF010 [*] Blank comments are useless and should be removed
+ analytics/views/installation_activity.py:443:7: RUF010 [*] Blank comments are useless and should be removed
+ analytics/views/installation_activity.py:475:7: RUF010 [*] Blank comments are useless and should be removed
+ analytics/views/installation_activity.py:515:7: RUF010 [*] Blank comments are useless and should be removed
+ zerver/lib/email_mirror.py:181:23: RUF010 [*] Blank comments are useless and should be removed
+ zerver/lib/send_email.py:36:19: RUF010 [*] Blank comments are useless and should be removed
+ zerver/management/commands/deliver_scheduled_emails.py:21:11: RUF010 [*] Blank comments are useless and should be removed
+ zerver/management/commands/deliver_scheduled_messages.py:16:11: RUF010 [*] Blank comments are useless and should be removed
+ zerver/management/commands/email_mirror.py:32:11: RUF010 [*] Blank comments are useless and should be removed
+ zerver/management/commands/enqueue_digest_emails.py:12:19: RUF010 [*] Blank comments are useless and should be removed
+ zerver/management/commands/sync_ldap_user_data.py:14:11: RUF010 [*] Blank comments are useless and should be removed
+ zerver/models.py:1503:29: RUF010 [*] Blank comments are useless and should be removed
+ zerver/models.py:1579:35: RUF010 [*] Blank comments are useless and should be removed
+ zerver/tests/test_users.py:326:69: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:1007:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:1009:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:1056:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:1058:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:1140:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:1142:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:1172:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:1174:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:131:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:133:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:239:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:241:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:319:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:321:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:326:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:328:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:359:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:361:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:390:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:392:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:434:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:436:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:517:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:519:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:524:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:526:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:569:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:571:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:644:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:646:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:69:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/computed_settings.py:71:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/configured_settings.py:1:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/configured_settings.py:3:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:112:16: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:114:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:11:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:122:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:134:16: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:136:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:140:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:14:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:158:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:166:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:184:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:189:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:194:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:19:16: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:208:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:21:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:224:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:236:6: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:239:6: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:269:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:271:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:273:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:277:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:284:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:290:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:296:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:298:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:300:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:317:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:319:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:321:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:328:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:351:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:353:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:355:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:386:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:388:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:38:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:392:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:394:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:410:10: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:426:10: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:429:10: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:434:10: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:439:10: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:443:10: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:447:10: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:467:6: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:470:6: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:48:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:497:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:499:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:501:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:509:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:511:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:513:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:517:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:521:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:524:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:529:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:52:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:531:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:540:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:544:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:560:16: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:563:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:565:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:576:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:578:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:592:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:594:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:5:64: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:604:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:606:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:617:16: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:620:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:622:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:62:16: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:633:8: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:635:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:641:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:649:16: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:64:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:651:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:673:17: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:678:16: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:67:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:680:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:696:16: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:69:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:716:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:718:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:746:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:748:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:7:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/prod_settings_template.py:802:2: RUF010 [*] Blank comments are useless and should be removed
+ zproject/settings.py:17:72: RUF010 [*] Blank comments are useless and should be removed
+ zproject/settings.py:2:72: RUF010 [*] Blank comments are useless and should be removed BenchmarkLinux
Windows
|
Thanks for this! Looking through the codebases, I think most of the errors flagged in the ecosystem check are false positives. Could we try implementing this by looking at the token stream, rather than using a regex on the physical lines? (A regex will also be more expensive in practice.) E.g., in the |
It should be possible to use |
As an aside, it looks like this can be implemented as |
settings: &Settings, | ||
autofix: flags::Autofix, | ||
) { | ||
if let Some(captures) = BLACK_COMMENT_REGEX.captures(line.as_str()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruff has the Indexer
data structure that exposes the range of all comments (Indexer::comment_ranges
). You can use this with Locator.slice(range)
to retrieve all comments and call the rule at the top level (module) once. This should be faster than running a regex on every line.
I think we should also be able to replace the regex all together by manually skipping the #
and then testing if text.trim().is_empty()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I guess we could do something like this
// Retrieve the comment using Locator.slice
let comment = Locator.slice(range);
// Skip the # at the start of the comment and trim white spaces
let trimmed_comment = comment.strip_prefix("#").unwrap_or("").trim();
// If the trimmed comment is empty, it's a blank comment
if trimmed_comment.is_empty() {
let mut diagnostic = Diagnostic::new(BlankComment, range);
if autofix.into() && settings.rules.should_fix(Rule::BlankComment) {
diagnostic.set_fix(Edit::deletion(range.start(), range.end()));
}
diagnostics.push(diagnostic);
}
}
6 | # is valid | ||
7 | | ||
8 | print("Hello, world!") # | ||
| ^^^ RUF010 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can we change the range to only highlight the comment
Below are a few examples that make it somewhat tricky:
For that we need to keep track two types of context for each comment token:
|
We could use a commentContext for something like this
Not sure how will we store the context for each comment token |
@andreyfedoseev I think the todo rule does something very similar. It checks whether two comments are in a row and if it contains the necessary metadata |
Gonna close this out for now since it's been inactive for a bit -- aways happy to re-open if we decide to pick the work back up :) |
Feature proposal: #4238