Skip to content
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

[perflint] Implement try-except-in-loop (PERF203) #5166

Merged
merged 9 commits into from
Jun 26, 2023

Conversation

evanrittenhouse
Copy link
Contributor

@evanrittenhouse evanrittenhouse commented Jun 17, 2023

Summary

Implements PERF203 from #4789, which throws if a try/except block is inside of a loop. Not sure if we want to extend the diagnostic to the except as well, but I thought that that may get a little messy. We may also want to just throw on the word try - open to suggestions though.

Test Plan

cargo t

@github-actions
Copy link
Contributor

github-actions bot commented Jun 17, 2023

PR Check Results

Ecosystem

ℹ️ ecosystem check detected changes. (+277, -0, 0 error(s))

airflow (+198, -0)

+ airflow/api/__init__.py:44:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/api_connexion/endpoints/user_endpoint.py:161:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/cli/commands/connection_command.py:324:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/cli/commands/standalone_command.py:110:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/cli/commands/task_command.py:522:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/cli/commands/variable_command.py:116:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/cli/commands/variable_command.py:96:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/configuration.py:1154:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/configuration.py:1210:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/configuration.py:1267:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/configuration.py:964:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/dag_processing/manager.py:203:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/dag_processing/manager.py:269:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/dag_processing/manager.py:668:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/dag_processing/manager.py:712:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/dag_processing/processor.py:369:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/dag_processing/processor.py:535:21: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/dag_processing/processor.py:560:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/dag_processing/processor.py:709:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/datasets/manager.py:100:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/example_dags/example_kubernetes_executor.py:137:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/kubernetes_executor.py:1024:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/kubernetes_executor.py:117:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/kubernetes_executor.py:452:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/kubernetes_executor.py:477:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/kubernetes_executor.py:714:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/kubernetes_executor.py:759:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/kubernetes_executor.py:980:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/kubernetes_executor.py:996:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/local_executor.py:187:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/local_executor.py:339:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/executors/sequential_executor.py:79:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/jobs/backfill_job_runner.py:649:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/jobs/scheduler_job_runner.py:401:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/jobs/triggerer_job_runner.py:679:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/jobs/triggerer_job_runner.py:686:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/abstractoperator.py:692:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/abstractoperator.py:701:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/abstractoperator.py:721:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/baseoperator.py:1339:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/baseoperator.py:1368:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/baseoperator.py:986:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/connection.py:456:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dag.py:1070:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dag.py:1378:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dag.py:2722:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dag.py:733:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dagbag.py:413:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dagbag.py:445:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dagbag.py:566:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dagrun.py:1027:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dagrun.py:1040:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dagrun.py:1149:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/dagrun.py:736:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/mappedoperator.py:90:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/taskinstance.py:1671:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/taskinstance.py:1778:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/models/variable.py:266:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/operators/subdag.py:214:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/plugins_manager.py:236:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/plugins_manager.py:265:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/airbyte/hooks/airbyte.py:71:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/hooks/base_aws.py:885:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/hooks/batch_client.py:387:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/hooks/elasticache_replication_group.py:214:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/hooks/sagemaker.py:1141:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/hooks/sagemaker.py:262:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/hooks/sagemaker.py:270:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/hooks/sagemaker.py:716:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/log/s3_task_handler.py:221:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/operators/redshift_cluster.py:498:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/operators/redshift_cluster.py:586:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/operators/redshift_cluster.py:680:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/secrets/secrets_manager.py:222:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/batch.py:173:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/batch.py:90:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/ecs.py:153:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/ecs.py:181:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/eks.py:154:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/eks.py:84:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/emr.py:158:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/emr.py:232:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/emr.py:308:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/emr.py:87:21: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/glue_crawler.py:69:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/redshift_cluster.py:136:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/redshift_cluster.py:207:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/redshift_cluster.py:283:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/triggers/redshift_cluster.py:354:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/utils/waiter_with_logging.py:119:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/amazon/aws/utils/waiter_with_logging.py:70:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/apache/flink/sensors/flink_kubernetes.py:104:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/apache/hdfs/hooks/webhdfs.py:94:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/apache/hive/hooks/hive.py:323:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/apache/kafka/hooks/client.py:59:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/apache/livy/hooks/livy.py:558:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/cncf/kubernetes/triggers/pod.py:177:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/cncf/kubernetes/utils/delete_from.py:51:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/docker/operators/docker_swarm.py:188:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/hooks/compute_ssh.py:270:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/hooks/dataform.py:95:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/hooks/datafusion.py:123:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/hooks/dataproc.py:1038:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/hooks/dataproc.py:717:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/hooks/gcs.py:347:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/hooks/gcs.py:495:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/hooks/mlengine.py:245:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/hooks/mlengine.py:69:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/operators/dataproc.py:591:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/operators/gcs.py:777:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/operators/gcs.py:827:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/bigquery.py:100:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/bigquery.py:165:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/bigquery.py:224:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/bigquery.py:369:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/bigquery.py:452:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/bigquery.py:515:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/bigquery_dts.py:133:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/cloud_build.py:119:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/dataflow.py:132:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/datafusion.py:112:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/dataproc.py:280:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/dataproc.py:340:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/kubernetes_engine.py:193:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/cloud/triggers/mlengine.py:113:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/google/suite/transfers/local_to_drive.py:134:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/http/hooks/http.py:379:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/jenkins/operators/jenkins_job_trigger.py:164:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/jenkins/operators/jenkins_job_trigger.py:221:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/microsoft/azure/log/wasb_task_handler.py:162:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/microsoft/azure/operators/container_instances.py:337:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/microsoft/winrm/operators/winrm.py:133:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/salesforce/hooks/salesforce.py:256:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/sftp/sensors/sftp.py:84:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/smtp/hooks/smtp.py:212:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/smtp/hooks/smtp.py:86:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/snowflake/hooks/snowflake_sql_api.py:223:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/snowflake/operators/snowflake.py:510:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/providers/ssh/hooks/ssh.py:459:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/sensors/base.py:213:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/serialization/serialized_objects.py:1083:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/serialization/serialized_objects.py:650:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/serialization/serialized_objects.py:799:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/utils/cli_action_loggers.py:69:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/utils/cli_action_loggers.py:87:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/utils/db.py:1024:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/utils/db.py:993:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/utils/email.py:271:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/utils/entry_points.py:41:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/utils/file.py:324:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/utils/process_utils.py:128:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/www/extensions/init_security.py:63:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/www/views.py:4708:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/www/views.py:5142:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/www/views.py:5167:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ airflow/www/views.py:522:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/assign_cherry_picked_prs_with_milestone.py:304:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:1066:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/breeze/src/airflow_breeze/utils/confirm.py:90:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/breeze/src/airflow_breeze/utils/kubernetes_utils.py:426:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/breeze/src/airflow_breeze/utils/kubernetes_utils.py:486:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/breeze/src/airflow_breeze/utils/kubernetes_utils.py:99:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/breeze/src/airflow_breeze/utils/parallel.py:454:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/breeze/src/airflow_breeze/utils/path_utils.py:346:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/breeze/src/airflow_breeze/utils/path_utils.py:351:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/breeze/src/airflow_breeze/utils/selective_checks.py:211:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/mypy/plugin/decorators.py:72:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/prepare_release_issue.py:284:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/prepare_release_issue.py:315:21: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/provider_packages/prepare_provider_packages.py:1190:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/provider_packages/prepare_provider_packages.py:1231:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/stats/get_important_pr_candidates.py:156:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ dev/stats/get_important_pr_candidates.py:175:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ docs/exts/docs_build/dev_index_generator.py:60:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ docs/exts/provider_yaml_utils.py:70:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ kubernetes_tests/test_base.py:138:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ kubernetes_tests/test_base.py:177:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/ci/pre_commit/pre_commit_update_example_dags_paths.py:58:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/in_container/run_provider_yaml_files_check.py:100:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/in_container/run_provider_yaml_files_check.py:249:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/in_container/run_provider_yaml_files_check.py:290:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/in_container/verify_providers.py:296:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/tools/list-integrations.py:56:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ setup.py:121:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/cli/commands/_common_cli_classes.py:116:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/cli/commands/_common_cli_classes.py:138:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/cli/commands/_common_cli_classes.py:99:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/cluster_policies/__init__.py:56:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/core/test_logging_config.py:118:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/dag_processing/test_job_runner.py:848:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/operators/test_datetime.py:91:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/operators/test_python.py:94:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/operators/test_weekday.py:87:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/providers/http/hooks/test_http.py:88:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/providers/openlineage/plugins/test_utils.py:56:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/serialization/test_serde.py:291:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/system/providers/amazon/aws/utils/__init__.py:327:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/task/task_runner/test_standard_task_runner.py:419:13: PERF203 `try`-`except` within a loop incurs performance overhead

bokeh (+20, -0)

+ examples/server/app/spectrogram/audio.py:37:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ examples/topics/geo/choropleth.py:38:5: PERF203 `try`-`except` within a loop incurs performance overhead
+ release/build.py:165:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ release/git.py:56:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ release/git.py:60:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/application/handlers/document_lifecycle.py:65:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/client/connection.py:344:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/client/connection.py:357:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/command/subcommands/__init__.py:69:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/core/has_props.py:650:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/core/property/either.py:89:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/settings.py:797:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/sphinxext/bokeh_plot.py:298:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/sphinxext/bokeh_releases.py:82:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/util/compiler.py:395:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ src/bokeh/util/tornado.py:219:21: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/support/plugins/file_server.py:91:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/unit/bokeh/command/subcommands/test_serve.py:525:21: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/unit/bokeh/model/test_model.py:222:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ tests/unit/bokeh/models/test_defaults.py:41:9: PERF203 `try`-`except` within a loop incurs performance overhead

zulip (+59, -0)

+ analytics/management/commands/check_analytics_state.py:51:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ analytics/views/installation_activity.py:205:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ analytics/views/support.py:310:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/lib/supervisor.py:17:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/lib/zulip_tools.py:224:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/lib/zulip_tools.py:320:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ scripts/lib/zulip_tools.py:54:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ tools/lib/html_branches.py:86:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ tools/lib/provision_inner.py:331:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ tools/lib/template_parser.py:238:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/actions/default_streams.py:44:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/actions/typing.py:54:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/data_import/slack.py:899:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/addressee.py:21:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/addressee.py:32:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/cache.py:313:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/events.py:1570:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/import_realm.py:380:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/import_realm.py:698:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/management.py:31:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/markdown/__init__.py:2323:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/markdown/api_arguments_table_generator.py:80:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/markdown/tabbed_sections.py:152:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/push_notifications.py:236:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/rate_limiter.py:462:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/subscription_info.py:322:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/test_runner.py:153:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/users.py:389:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/users.py:394:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/lib/validator.py:348:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/management/commands/bulk_change_user_name.py:33:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/management/commands/change_password.py:57:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/management/commands/compilemessages.py:122:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/management/commands/enqueue_file.py:20:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/management/commands/export_usermessage_batch.py:32:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/management/commands/export_usermessage_batch.py:38:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/management/commands/makemessages.py:276:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/management/commands/sync_ldap_user_data.py:33:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/migrations/0037_disallow_null_string_id.py:23:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/migrations/0260_missed_message_addresses_from_redis_to_db.py:70:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/migrations/0359_re2_linkifiers.py:16:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/migrations/0373_fix_deleteduser_dummies.py:64:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/migrations/0401_migrate_old_realm_reactivation_links.py:50:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/models.py:4685:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/openapi/test_curl_examples.py:103:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/tests/test_markdown.py:479:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/tests/test_openapi.py:568:21: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/tornado/event_queue.py:1434:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/views/invite.py:206:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/views/invite.py:80:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/views/registration.py:1036:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/views/registration.py:976:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/views/streams.py:1058:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/worker/queue_processors.py:745:17: PERF203 `try`-`except` within a loop incurs performance overhead
+ zerver/worker/queue_processors.py:985:13: PERF203 `try`-`except` within a loop incurs performance overhead
+ zilencer/views.py:391:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zproject/backends.py:1424:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zproject/backends.py:1430:9: PERF203 `try`-`except` within a loop incurs performance overhead
+ zproject/backends.py:901:13: PERF203 `try`-`except` within a loop incurs performance overhead

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.07      7.9±0.02ms     5.2 MB/sec    1.00      7.4±0.02ms     5.5 MB/sec
formatter/numpy/ctypeslib.py               1.05   1679.0±1.99µs     9.9 MB/sec    1.00   1604.4±2.86µs    10.4 MB/sec
formatter/numpy/globals.py                 1.03    190.8±0.35µs    15.5 MB/sec    1.00    186.1±0.85µs    15.9 MB/sec
formatter/pydantic/types.py                1.05      3.9±0.00ms     6.6 MB/sec    1.00      3.7±0.01ms     6.9 MB/sec
linter/all-rules/large/dataset.py          1.00     13.7±0.06ms     3.0 MB/sec    1.00     13.7±0.07ms     3.0 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      3.4±0.02ms     4.8 MB/sec    1.01      3.5±0.01ms     4.8 MB/sec
linter/all-rules/numpy/globals.py          1.00    360.3±1.52µs     8.2 MB/sec    1.00    361.7±1.73µs     8.2 MB/sec
linter/all-rules/pydantic/types.py         1.00      6.1±0.02ms     4.2 MB/sec    1.01      6.1±0.04ms     4.2 MB/sec
linter/default-rules/large/dataset.py      1.00      7.0±0.02ms     5.8 MB/sec    1.00      7.0±0.03ms     5.8 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1464.3±2.29µs    11.4 MB/sec    1.00   1462.7±4.01µs    11.4 MB/sec
linter/default-rules/numpy/globals.py      1.01    153.7±0.19µs    19.2 MB/sec    1.00    152.7±0.18µs    19.3 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.2±0.01ms     8.1 MB/sec    1.00      3.2±0.01ms     8.1 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.00     10.1±0.28ms     4.0 MB/sec    1.00     10.1±0.29ms     4.0 MB/sec
formatter/numpy/ctypeslib.py               1.00      2.3±0.07ms     7.3 MB/sec    1.03      2.3±0.08ms     7.1 MB/sec
formatter/numpy/globals.py                 1.00   278.2±12.84µs    10.6 MB/sec    1.00   278.2±15.48µs    10.6 MB/sec
formatter/pydantic/types.py                1.00      5.1±0.21ms     5.0 MB/sec    1.05      5.3±0.20ms     4.8 MB/sec
linter/all-rules/large/dataset.py          1.01     19.4±0.49ms     2.1 MB/sec    1.00     19.3±0.48ms     2.1 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      5.2±0.17ms     3.2 MB/sec    1.03      5.4±0.18ms     3.1 MB/sec
linter/all-rules/numpy/globals.py          1.00   643.5±34.96µs     4.6 MB/sec    1.01   649.3±32.97µs     4.5 MB/sec
linter/all-rules/pydantic/types.py         1.00      8.7±0.28ms     2.9 MB/sec    1.03      9.0±0.30ms     2.8 MB/sec
linter/default-rules/large/dataset.py      1.00     10.3±0.24ms     3.9 MB/sec    1.01     10.4±0.27ms     3.9 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00      2.2±0.08ms     7.6 MB/sec    1.00      2.2±0.09ms     7.6 MB/sec
linter/default-rules/numpy/globals.py      1.01   264.9±11.70µs    11.1 MB/sec    1.00   262.9±14.85µs    11.2 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.6±0.16ms     5.6 MB/sec    1.02      4.7±0.13ms     5.5 MB/sec

@evanrittenhouse
Copy link
Contributor Author

Seems like the try/except blocks only have overhead until Python 3.10. For some reason, gating to be < 3.10 doesn't throw any diagnostics, even though from what I can tell CI uses Python 3.7. I removed the gating for now, since I can't figure out a way around it. I'm happy to add it back if we need but I'd need some guidance.

@evanrittenhouse evanrittenhouse marked this pull request as ready for review June 17, 2023 22:06
@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Jun 26, 2023
@charliermarsh charliermarsh changed the title Implement PERF203 [perflint] Implement try-except-in-loop (PERF203) Jun 26, 2023
@charliermarsh
Copy link
Member

@evanrittenhouse - Can you please enable edits on this PR?

@evanrittenhouse
Copy link
Contributor Author

Done @charliermarsh

@charliermarsh charliermarsh enabled auto-merge (squash) June 26, 2023 17:28
@charliermarsh
Copy link
Member

I ended up gating to Python 3.11 based on my own micro-benchmarks (and I think that's the version in which zero-cost exception handling was introduced).

@charliermarsh charliermarsh merged commit 190bed1 into astral-sh:main Jun 26, 2023
15 checks passed
@evanrittenhouse evanrittenhouse deleted the 4789_perflint branch June 27, 2023 12:17
renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request Jul 3, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `^0.0.275`
-> `^0.0.276` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.276/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.276/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.276/compatibility-slim/0.0.275)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.276/confidence-slim/0.0.275)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.276`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.276)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.275...v0.0.276)

<!-- Release notes generated using configuration in .github/release.yml
at v0.0.276 -->

See the [release blog post](https://astral.sh/blog/ruff-v0.0.276) for
more, including detailed descriptions of any newly added rules.

#### What's Changed

Highlights include: experimental support for linting Jupyter Notebooks.

To opt-in to linting Jupyter Notebook files, add the `*.ipynb` pattern
to your [`include`](settings.md#include)
setting, like so:

```toml
[tool.ruff]

### Allow Ruff to discover `*.ipynb` files.
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
```

This will prompt Ruff to discover Jupyter Notebook files in any
specified directories, and lint them
accordingly.

Jupyter Notebook support is currently opt-in and experimental. We'd love
your help testing it out.
Have feedback? Run into issues? [Let us
know!](https://togithub.com/astral-sh/ruff/issues/new)

##### New Rules

- \[`flake8-pyi`] Implement `PYI002`, `PYI003`, `PYI004`, `PYI005` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#5457
- \[`numpy`] Implement `numpy-deprecated-function` (`NPY003`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5468
- \[`perflint`] Implement `unnecessary-list-cast` (`PERF101`) by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5121
- \[`perflint`] Implement `try-except-in-loop` (`PERF203`) by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#5166
- \[`perflint`] Implement `manual-list-comprehension` (`PERF401`) and
`manual-list-copy` (`PERF402`) rules by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5298
- \[`pylint`] Implement Pylint `single-string-used-for-slots` (`C0205`)
as `single-string-slots` (`PLC0205`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#5399

##### Jupyter

- Experimental release for Jupyter notebook integration by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5363
- Enable --watch for Jupyter notebooks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5394
- Consider Jupyter index for code frames (`--show-source`) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5402
- fixup! Consider Jupyter index for code frames (`--show-source`)
([#&#8203;5402](https://togithub.com/astral-sh/ruff/issues/5402)) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5414

##### Settings

- \[`pyupgrade`] Restore the `keep-runtime-typing` setting by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5470
- Add `PythonVersion::Py312` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5316

##### Bug Fixes

- Support `pydantic.BaseSettings` in `mutable-class-default` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5312
- Allow `__slots__` assignments in `mutable-class-default` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5314
- Avoid syntax errors when removing f-string prefixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5319
- Ignore unpacking in `iteration-over-set` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5392
- Replace same length equal line with dash line in D407 by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5383
- Exclude docstrings from PYI053 by
[@&#8203;intgr](https://togithub.com/intgr) in
[astral-sh/ruff#5405
- Use "manual" fixability for E731 in shadowed context by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5430
- Detect consecutive, non-newline-delimited NumPy sections by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5467
- Fix `unnecessary-encode-utf8` to fix `encode` on parenthesized strings
correctly by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#5478
- Allow `Final` assignments in stubs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5490
- Respect `abc` decorators when classifying function types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5315
- Allow `@Author` format for "Missing Author" rule in `flake8-todos` by
[@&#8203;mayrholu](https://togithub.com/mayrholu) in
[astral-sh/ruff#4903
- Ignore type aliases for RUF013 by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5344
- Change W605 autofix to use raw strings if possible by
[@&#8203;hauntsaninja](https://togithub.com/hauntsaninja) in
[astral-sh/ruff#5352
- Add space when migrating to raw string by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5358
- Update the `invalid-escape-sequence` rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5359
- Include BaseException in B017 rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5466
- \[`flake8-django`] Skip duplicate violations in `DJ012` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5469

#### New Contributors

- [@&#8203;mayrholu](https://togithub.com/mayrholu) made their first
contribution in
[astral-sh/ruff#4903
- [@&#8203;hauntsaninja](https://togithub.com/hauntsaninja) made their
first contribution in
[astral-sh/ruff#5352
- [@&#8203;ethunk](https://togithub.com/ethunk) made their first
contribution in
[astral-sh/ruff#5397
- [@&#8203;LouisDISPA](https://togithub.com/LouisDISPA) made their first
contribution in
[astral-sh/ruff#5475

**Full Changelog**:
astral-sh/ruff@v0.0.275...v0.0.276

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ixm-one/pytest-cmake-presets).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDQuMiIsInVwZGF0ZWRJblZlciI6IjM1LjE0NC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jankatins added a commit to jankatins/pr-workflow-example that referenced this pull request Jul 3, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `0.0.275`
-> `0.0.276` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.276/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.276/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.276/compatibility-slim/0.0.275)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.276/confidence-slim/0.0.275)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.276`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.276)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.275...v0.0.276)

<!-- Release notes generated using configuration in .github/release.yml
at v0.0.276 -->

See the [release blog post](https://astral.sh/blog/ruff-v0.0.276) for
more, including detailed descriptions of any newly added rules.

#### What's Changed

Highlights include: experimental support for linting Jupyter Notebooks.

To opt-in to linting Jupyter Notebook files, add the `*.ipynb` pattern
to your [`include`](settings.md#include)
setting, like so:

```toml
[tool.ruff]

### Allow Ruff to discover `*.ipynb` files.
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
```

This will prompt Ruff to discover Jupyter Notebook files in any
specified directories, and lint them
accordingly.

Jupyter Notebook support is currently opt-in and experimental. We'd love
your help testing it out.
Have feedback? Run into issues? [Let us
know!](https://togithub.com/astral-sh/ruff/issues/new)

##### New Rules

- \[`flake8-pyi`] Implement `PYI002`, `PYI003`, `PYI004`, `PYI005` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#5457
- \[`numpy`] Implement `numpy-deprecated-function` (`NPY003`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5468
- \[`perflint`] Implement `unnecessary-list-cast` (`PERF101`) by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5121
- \[`perflint`] Implement `try-except-in-loop` (`PERF203`) by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#5166
- \[`perflint`] Implement `manual-list-comprehension` (`PERF401`) and
`manual-list-copy` (`PERF402`) rules by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5298
- \[`pylint`] Implement Pylint `single-string-used-for-slots` (`C0205`)
as `single-string-slots` (`PLC0205`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#5399

##### Jupyter

- Experimental release for Jupyter notebook integration by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5363
- Enable --watch for Jupyter notebooks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5394
- Consider Jupyter index for code frames (`--show-source`) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5402
- fixup! Consider Jupyter index for code frames (`--show-source`)
([#&#8203;5402](https://togithub.com/astral-sh/ruff/issues/5402)) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5414

##### Settings

- \[`pyupgrade`] Restore the `keep-runtime-typing` setting by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5470
- Add `PythonVersion::Py312` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5316

##### Bug Fixes

- Support `pydantic.BaseSettings` in `mutable-class-default` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5312
- Allow `__slots__` assignments in `mutable-class-default` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5314
- Avoid syntax errors when removing f-string prefixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5319
- Ignore unpacking in `iteration-over-set` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5392
- Replace same length equal line with dash line in D407 by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5383
- Exclude docstrings from PYI053 by
[@&#8203;intgr](https://togithub.com/intgr) in
[astral-sh/ruff#5405
- Use "manual" fixability for E731 in shadowed context by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5430
- Detect consecutive, non-newline-delimited NumPy sections by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5467
- Fix `unnecessary-encode-utf8` to fix `encode` on parenthesized strings
correctly by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#5478
- Allow `Final` assignments in stubs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5490
- Respect `abc` decorators when classifying function types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5315
- Allow `@Author` format for "Missing Author" rule in `flake8-todos` by
[@&#8203;mayrholu](https://togithub.com/mayrholu) in
[astral-sh/ruff#4903
- Ignore type aliases for RUF013 by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5344
- Change W605 autofix to use raw strings if possible by
[@&#8203;hauntsaninja](https://togithub.com/hauntsaninja) in
[astral-sh/ruff#5352
- Add space when migrating to raw string by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5358
- Update the `invalid-escape-sequence` rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5359
- Include BaseException in B017 rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5466
- \[`flake8-django`] Skip duplicate violations in `DJ012` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5469

#### New Contributors

- [@&#8203;mayrholu](https://togithub.com/mayrholu) made their first
contribution in
[astral-sh/ruff#4903
- [@&#8203;hauntsaninja](https://togithub.com/hauntsaninja) made their
first contribution in
[astral-sh/ruff#5352
- [@&#8203;ethunk](https://togithub.com/ethunk) made their first
contribution in
[astral-sh/ruff#5397
- [@&#8203;LouisDISPA](https://togithub.com/LouisDISPA) made their first
contribution in
[astral-sh/ruff#5475

**Full Changelog**:
astral-sh/ruff@v0.0.275...v0.0.276

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/jankatins/pr-workflow-example).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDQuMiIsInVwZGF0ZWRJblZlciI6IjM1LjE0NC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
renovate bot added a commit to allenporter/pyrainbird that referenced this pull request Jul 5, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.275`
-> `==0.0.277` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.277/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.277/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.277/compatibility-slim/0.0.275)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.277/confidence-slim/0.0.275)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.277`](https://togithub.com/astral-sh/ruff/compare/v0.0.276...v0.0.277)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.276...v0.0.277)

###
[`v0.0.276`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.276)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.275...v0.0.276)

<!-- Release notes generated using configuration in .github/release.yml
at v0.0.276 -->

See the [release blog post](https://astral.sh/blog/ruff-v0.0.276) for
more, including detailed descriptions of any newly added rules.

#### What's Changed

Highlights include: experimental support for linting Jupyter Notebooks.

To opt-in to linting Jupyter Notebook files, add the `*.ipynb` pattern
to your [`include`](settings.md#include)
setting, like so:

```toml
[tool.ruff]

### Allow Ruff to discover `*.ipynb` files.
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
```

This will prompt Ruff to discover Jupyter Notebook files in any
specified directories, and lint them
accordingly.

Jupyter Notebook support is currently opt-in and experimental. We'd love
your help testing it out.
Have feedback? Run into issues? [Let us
know!](https://togithub.com/astral-sh/ruff/issues/new)

##### New Rules

- \[`flake8-pyi`] Implement `PYI002`, `PYI003`, `PYI004`, `PYI005` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#5457
- \[`numpy`] Implement `numpy-deprecated-function` (`NPY003`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5468
- \[`perflint`] Implement `unnecessary-list-cast` (`PERF101`) by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5121
- \[`perflint`] Implement `try-except-in-loop` (`PERF203`) by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#5166
- \[`perflint`] Implement `manual-list-comprehension` (`PERF401`) and
`manual-list-copy` (`PERF402`) rules by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5298
- \[`pylint`] Implement Pylint `single-string-used-for-slots` (`C0205`)
as `single-string-slots` (`PLC0205`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#5399

##### Jupyter

- Experimental release for Jupyter notebook integration by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5363
- Enable --watch for Jupyter notebooks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5394
- Consider Jupyter index for code frames (`--show-source`) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5402
- fixup! Consider Jupyter index for code frames (`--show-source`)
([#&#8203;5402](https://togithub.com/astral-sh/ruff/issues/5402)) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5414

##### Settings

- \[`pyupgrade`] Restore the `keep-runtime-typing` setting by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5470
- Add `PythonVersion::Py312` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5316

##### Bug Fixes

- Support `pydantic.BaseSettings` in `mutable-class-default` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5312
- Allow `__slots__` assignments in `mutable-class-default` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5314
- Avoid syntax errors when removing f-string prefixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5319
- Ignore unpacking in `iteration-over-set` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5392
- Replace same length equal line with dash line in D407 by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5383
- Exclude docstrings from PYI053 by
[@&#8203;intgr](https://togithub.com/intgr) in
[astral-sh/ruff#5405
- Use "manual" fixability for E731 in shadowed context by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5430
- Detect consecutive, non-newline-delimited NumPy sections by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5467
- Fix `unnecessary-encode-utf8` to fix `encode` on parenthesized strings
correctly by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#5478
- Allow `Final` assignments in stubs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5490
- Respect `abc` decorators when classifying function types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5315
- Allow `@Author` format for "Missing Author" rule in `flake8-todos` by
[@&#8203;mayrholu](https://togithub.com/mayrholu) in
[astral-sh/ruff#4903
- Ignore type aliases for RUF013 by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5344
- Change W605 autofix to use raw strings if possible by
[@&#8203;hauntsaninja](https://togithub.com/hauntsaninja) in
[astral-sh/ruff#5352
- Add space when migrating to raw string by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5358
- Update the `invalid-escape-sequence` rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5359
- Include BaseException in B017 rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5466
- \[`flake8-django`] Skip duplicate violations in `DJ012` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5469

#### New Contributors

- [@&#8203;mayrholu](https://togithub.com/mayrholu) made their first
contribution in
[astral-sh/ruff#4903
- [@&#8203;hauntsaninja](https://togithub.com/hauntsaninja) made their
first contribution in
[astral-sh/ruff#5352
- [@&#8203;ethunk](https://togithub.com/ethunk) made their first
contribution in
[astral-sh/ruff#5397
- [@&#8203;LouisDISPA](https://togithub.com/LouisDISPA) made their first
contribution in
[astral-sh/ruff#5475

**Full Changelog**:
astral-sh/ruff@v0.0.275...v0.0.276

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/allenporter/pyrainbird).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDQuMiIsInVwZGF0ZWRJblZlciI6IjM1LjE0NC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/flux-local that referenced this pull request Jul 15, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.275`
-> `==0.0.278` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.278/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.278/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.278/compatibility-slim/0.0.275)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.278/confidence-slim/0.0.275)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.278`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.278)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.277...v0.0.278)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

See the [release blog post](https://astral.sh/blog/ruff-v0.0.278) for
more, including detailed descriptions of any newly added rules.

#### What's Changed

##### Rules

- \[`pylint`] Implement `typevar-bivariance` (`PLC0131`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#5517
- \[`flake8-pyi`] Implement `unnecessary-literal-union` (`PYI030`) by
[@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#5570
- \[`pylint`] Implement `type-name-incorrect-variance` (`PLC0105`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#5651
- \[`ruff`] Implement `unnecessary-list-allocation-for-first-element`
(`RUF015`) by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#5549
- \[`flake8-bugbear`] Implement `re-sub-positional-args` (`B034`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5669
- \[`ruff`] Implement `invalid-index-type` (`RUF016`) by
[@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#5602

##### Settings

- \[`isort`] Add `--case-sensitive` flag by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5539
- \[`isort`] Support globbing in `isort` options by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#5473

##### Bug Fixes

- Support autofix for some multiline `str.format` calls by
[@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#5638
- Avoid triggering `unnecessary-map` (`C417`) for late-bound lambdas by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5520
- Avoid triggering DTZ001-006 when using `.astimezone()` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5524
- Enable attribute lookups via semantic model by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5536
- Avoid syntax errors when rewriting str(dict) in f-strings by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5538
- Differentiate between runtime and typing-time annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5575
- Only run pyproject.toml lint rules when enabled by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5578
- Refactor isort directive skips to use iterators by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5623
- Allow descriptor instantiations in dataclass fields by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5537
- Refactor `noqa` directive parsing away from regex-based implementation
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5554
- Emit warnings for invalid `# noqa` directives by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5571
- Support individual codes on `# flake8: noqa` directives by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5618
- Add `tkinter` import convention by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#5626
- Avoid `PERF401` if conditional depends on list var by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5603
- Fix typo in complex-if-statement-in-stub message by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5635
- Make TRY301 trigger only if a `raise` throws a caught exception by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#5455
- Skip flake8-future-annotations checks in stub files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5652
- Always allow PEP 585 and PEP 604 rewrites in stub files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5653
- Add support for `Union` declarations without `|` to PYI016 by
[@&#8203;zanieb](https://togithub.com/zanieb) in
[astral-sh/ruff#5598
- Ignore `_name_` and `_value_` accesses in `flake8-self` rules by
[@&#8203;monosans](https://togithub.com/monosans) in
[astral-sh/ruff#5663
- Refactor `repeated_keys()` to use `ComparableExpr` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5696

#### New Contributors

- [@&#8203;karosis88](https://togithub.com/karosis88) made their first
contribution in
[astral-sh/ruff#5560
- [@&#8203;petermattia](https://togithub.com/petermattia) made their
first contribution in
[astral-sh/ruff#5579
-
[@&#8203;DimitriPapadopoulos](https://togithub.com/DimitriPapadopoulos)
made their first contribution in
[astral-sh/ruff#5607

**Full Changelog**:
astral-sh/ruff@v0.0.277...v0.0.278

###
[`v0.0.277`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.277)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.276...v0.0.277)

<!-- Release notes generated using configuration in .github/release.yml
at v0.0.277 -->

#### What's Changed

##### Breaking Changes

- Add .ipynb_checkpoints, .pyenv, .pytest_cache, and .vscode to default
excludes by [@&#8203;charliermarsh](https://togithub.com/charliermarsh)
in
[astral-sh/ruff#5513

##### Rules

- \[`pylint`] Implement Pylint `typevar-name-mismatch` (`C0132`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#5501

##### Settings

- Add `ruff rule --all` subcommand (with JSON output) by
[@&#8203;akx](https://togithub.com/akx) in
[astral-sh/ruff#5059

##### Bug Fixes

- Fix eval detection for suspicious-eval-usage by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5506
- Avoid PERF rules for iteration-dependent assignments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5508
- Avoid returning first-match for rule prefixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5511

**Full Changelog**:
astral-sh/ruff@v0.0.276...v0.0.277

###
[`v0.0.276`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.276)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.275...v0.0.276)

<!-- Release notes generated using configuration in .github/release.yml
at v0.0.276 -->

See the [release blog post](https://astral.sh/blog/ruff-v0.0.276) for
more, including detailed descriptions of any newly added rules.

#### What's Changed

Highlights include: experimental support for linting Jupyter Notebooks.

To opt-in to linting Jupyter Notebook files, add the `*.ipynb` pattern
to your [`include`](settings.md#include)
setting, like so:

```toml
[tool.ruff]

### Allow Ruff to discover `*.ipynb` files.
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
```

This will prompt Ruff to discover Jupyter Notebook files in any
specified directories, and lint them
accordingly.

Jupyter Notebook support is currently opt-in and experimental. We'd love
your help testing it out.
Have feedback? Run into issues? [Let us
know!](https://togithub.com/astral-sh/ruff/issues/new)

##### New Rules

- \[`flake8-pyi`] Implement `PYI002`, `PYI003`, `PYI004`, `PYI005` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#5457
- \[`numpy`] Implement `numpy-deprecated-function` (`NPY003`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5468
- \[`perflint`] Implement `unnecessary-list-cast` (`PERF101`) by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5121
- \[`perflint`] Implement `try-except-in-loop` (`PERF203`) by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#5166
- \[`perflint`] Implement `manual-list-comprehension` (`PERF401`) and
`manual-list-copy` (`PERF402`) rules by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#5298
- \[`pylint`] Implement Pylint `single-string-used-for-slots` (`C0205`)
as `single-string-slots` (`PLC0205`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[astral-sh/ruff#5399

##### Jupyter

- Experimental release for Jupyter notebook integration by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5363
- Enable --watch for Jupyter notebooks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5394
- Consider Jupyter index for code frames (`--show-source`) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5402
- fixup! Consider Jupyter index for code frames (`--show-source`)
([#&#8203;5402](https://togithub.com/astral-sh/ruff/issues/5402)) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5414

##### Settings

- \[`pyupgrade`] Restore the `keep-runtime-typing` setting by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5470
- Add `PythonVersion::Py312` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5316

##### Bug Fixes

- Support `pydantic.BaseSettings` in `mutable-class-default` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5312
- Allow `__slots__` assignments in `mutable-class-default` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5314
- Avoid syntax errors when removing f-string prefixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5319
- Ignore unpacking in `iteration-over-set` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5392
- Replace same length equal line with dash line in D407 by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5383
- Exclude docstrings from PYI053 by
[@&#8203;intgr](https://togithub.com/intgr) in
[astral-sh/ruff#5405
- Use "manual" fixability for E731 in shadowed context by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5430
- Detect consecutive, non-newline-delimited NumPy sections by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5467
- Fix `unnecessary-encode-utf8` to fix `encode` on parenthesized strings
correctly by [@&#8203;harupy](https://togithub.com/harupy) in
[astral-sh/ruff#5478
- Allow `Final` assignments in stubs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5490
- Respect `abc` decorators when classifying function types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5315
- Allow `@Author` format for "Missing Author" rule in `flake8-todos` by
[@&#8203;mayrholu](https://togithub.com/mayrholu) in
[astral-sh/ruff#4903
- Ignore type aliases for RUF013 by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#5344
- Change W605 autofix to use raw strings if possible by
[@&#8203;hauntsaninja](https://togithub.com/hauntsaninja) in
[astral-sh/ruff#5352
- Add space when migrating to raw string by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5358
- Update the `invalid-escape-sequence` rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5359
- Include BaseException in B017 rule by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5466
- \[`flake8-django`] Skip duplicate violations in `DJ012` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#5469

#### New Contributors

- [@&#8203;mayrholu](https://togithub.com/mayrholu) made their first
contribution in
[astral-sh/ruff#4903
- [@&#8203;hauntsaninja](https://togithub.com/hauntsaninja) made their
first contribution in
[astral-sh/ruff#5352
- [@&#8203;ethunk](https://togithub.com/ethunk) made their first
contribution in
[astral-sh/ruff#5397
- [@&#8203;LouisDISPA](https://togithub.com/LouisDISPA) made their first
contribution in
[astral-sh/ruff#5475

**Full Changelog**:
astral-sh/ruff@v0.0.275...v0.0.276

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/allenporter/flux-local).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNTkuNyIsInVwZGF0ZWRJblZlciI6IjM2LjUuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants