-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Preserve type annotations when fixing E731
#3983
Preserve type annotations when fixing E731
#3983
Conversation
/// The `Callable` import can be from either `collections.abc` or `typing`. | ||
/// If an ellipsis is used for the argument types, an empty list is returned. | ||
/// The returned values are cloned, so they can be used as-is. | ||
fn extract_types(ctx: &Context, annotation: &Expr) -> Option<(Vec<Expr>, Expr)> { |
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.
Is there any way to write unit tests for this function? This is mainly regarding the Context
. If there are any examples on how to create a mock Context
, I could do that. If not, should we provide some functionality to do that to facilitate writing unit tests? (Context
is being used in a lot of helper functions)
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.
Sadly no, but I would definitely be interested in mechanisms for creating Context
in tests.
Mocking would be one approach. Another would be to provide some primer Python code that we could parse and traverse, then use the Context
that results from traversing that code, and pass it to (e.g.) this function. That might be hard to do though, since Context
is really driven by Checker
and hard to decouple...
PR Check ResultsEcosystemℹ️ ecosystem check detected changes. (+281, -0, 0 error(s)) airflow (+130, -0)
+ airflow/providers/google/cloud/example_dags/example_compute_ssh.py:38:5: ERA001 [*] Found commented-out code
+ airflow/providers/google/cloud/example_dags/example_compute_ssh.py:50:5: ERA001 [*] Found commented-out code
+ airflow/providers/google/cloud/example_dags/example_compute_ssh.py:52:5: ERA001 [*] Found commented-out code
+ airflow/providers/google/cloud/example_dags/example_compute_ssh.py:63:5: ERA001 [*] Found commented-out code
+ airflow/providers/google/marketing_platform/example_dags/example_display_video.py:207:5: ERA001 [*] Found commented-out code
+ airflow/providers/google/marketing_platform/example_dags/example_display_video.py:208:5: ERA001 [*] Found commented-out code
+ airflow/providers/google/marketing_platform/example_dags/example_display_video.py:210:5: ERA001 [*] Found commented-out code
+ airflow/settings.py:598:1: ERA001 [*] Found commented-out code
+ dev/breeze/src/airflow_breeze/utils/common_options.py:68:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:133:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:135:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:173:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:175:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:203:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:205:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:241:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:243:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:257:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:259:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:272:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:274:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:290:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:292:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:309:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:311:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:328:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:330:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:342:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:344:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:360:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:362:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:373:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:375:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:385:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:387:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:395:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:397:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:405:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:407:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:92:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/hooks/test_datasync.py:94:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:163:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:167:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:169:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:177:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:181:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:183:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:211:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:215:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:217:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:244:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:248:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:250:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:261:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:265:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:267:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:287:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:291:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:293:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:304:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:309:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:311:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:318:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:358:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:362:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:364:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:372:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:376:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:378:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:395:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:399:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:401:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:414:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:418:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:420:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:446:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:450:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:452:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:479:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:483:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:485:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:496:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:501:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:503:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:511:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:543:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:547:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:549:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:553:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:557:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:559:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:577:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:581:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:583:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:594:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:599:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:601:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:609:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:639:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:643:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:645:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:649:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:653:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:655:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:690:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:707:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:710:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:717:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:722:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:724:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:747:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:751:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:753:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:764:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:769:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:771:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:778:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:805:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:809:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:811:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:815:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:819:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:821:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:841:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:845:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:847:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:858:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:863:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:865:9: ERA001 [*] Found commented-out code
+ tests/providers/amazon/aws/operators/test_datasync.py:873:9: ERA001 [*] Found commented-out code bokeh (+24, -0)
+ src/bokeh/client/session.py:40:1: ERA001 [*] Found commented-out code
+ src/bokeh/document/locking.py:36:1: ERA001 [*] Found commented-out code
+ src/bokeh/embed/elements.py:27:1: ERA001 [*] Found commented-out code
+ src/bokeh/embed/server.py:27:1: ERA001 [*] Found commented-out code
+ src/bokeh/io/notebook.py:38:1: ERA001 [*] Found commented-out code
+ src/bokeh/server/connection.py:26:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:103:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:292:5: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:301:5: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:363:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:372:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:386:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:395:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:407:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:416:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:71:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:81:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/tables/test_cell_editors.py:93:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/test_daterange_slider.py:160:1: ERA001 [*] Found commented-out code
+ tests/integration/widgets/test_daterange_slider.py:169:1: ERA001 [*] Found commented-out code
+ tests/unit/bokeh/core/test_properties.py:490:5: ERA001 [*] Found commented-out code
+ tests/unit/bokeh/io/test_export.py:24:1: ERA001 [*] Found commented-out code
+ tests/unit/bokeh/plotting/test__renderer.py:115:1: ERA001 [*] Found commented-out code
+ tests/unit/bokeh/server/_util_server.py:30:1: ERA001 [*] Found commented-out code zulip (+127, -0)
+ zerver/tests/test_openapi.py:207:9: ERA001 [*] Found commented-out code
+ zerver/tests/test_openapi.py:217:9: ERA001 [*] Found commented-out code
+ zerver/tests/test_openapi.py:236:9: ERA001 [*] Found commented-out code
+ zerver/tests/test_openapi.py:246:9: ERA001 [*] Found commented-out code
+ zerver/tests/test_openapi.py:255:9: ERA001 [*] Found commented-out code
+ zerver/tests/test_openapi.py:262:9: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:100:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:101:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:10:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:117:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:118:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:121:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:12:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:138:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:13:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:141:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:167:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:168:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:174:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:180:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:185:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:186:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:190:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:191:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:201:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:203:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:220:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:225:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:226:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:241:5: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:248:5: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:258:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:272:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:274:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:278:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:285:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:288:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:291:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:299:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:301:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:302:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:304:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:305:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:307:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:308:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:312:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:320:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:322:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:323:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:324:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:326:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:329:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:335:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:338:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:342:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:346:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:347:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:352:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:354:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:358:5: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:363:9: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:367:9: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:383:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:391:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:393:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:395:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:404:5: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:405:5: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:407:9: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:40:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:412:9: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:428:9: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:466:5: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:46:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:472:5: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:47:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:490:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:498:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:500:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:502:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:512:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:514:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:515:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:518:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:519:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:522:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:525:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:534:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:535:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:536:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:545:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:56:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:571:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:58:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:610:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:624:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:629:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:63:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:640:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:642:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:652:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:659:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:65:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:674:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:675:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:681:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:682:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:686:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:688:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:705:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:717:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:71:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:72:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:732:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:740:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:745:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:747:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:765:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:800:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:808:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:82:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:92:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:93:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:94:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:95:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:99:1: ERA001 [*] Found commented-out code
+ zproject/prod_settings_template.py:9:1: ERA001 [*] Found commented-out code BenchmarkLinux
Windows
|
[![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://togithub.com/charliermarsh/ruff) | `^0.0.261` -> `^0.0.262` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/compatibility-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/confidence-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.262`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.262) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.261...v0.0.262) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Configuration - Allow users to extend the set of included files via `include` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3914](https://togithub.com/charliermarsh/ruff/pull/3914) - Implement isort custom sections and ordering ([#​2419](https://togithub.com/charliermarsh/ruff/issues/2419)) by [@​hackedd](https://togithub.com/hackedd) in [https://github.com/charliermarsh/ruff/pull/3900](https://togithub.com/charliermarsh/ruff/pull/3900) ##### Rules - \[`flake8-simplify`] Add autofix for `contextlib.suppress` (`SIM105`) by [@​leiserfg](https://togithub.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/3915](https://togithub.com/charliermarsh/ruff/pull/3915) - \[`flake8-bandit`] Ignore assert errors (S101) in `TYPE_CHECKING` blocks by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3960](https://togithub.com/charliermarsh/ruff/pull/3960) - \[`flake8-comprehensions`] Implement `unnecessary-literal-within-dict-call` (`C418`) by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3969](https://togithub.com/charliermarsh/ruff/pull/3969) - \[`ruff`] Add checks for mutable defaults `dataclass`es by [@​mosauter](https://togithub.com/mosauter) in [https://github.com/charliermarsh/ruff/pull/3877](https://togithub.com/charliermarsh/ruff/pull/3877) - \[`flake8-import-conventions`] Add a rule for `BannedImportAlias` by [@​stancld](https://togithub.com/stancld) in [https://github.com/charliermarsh/ruff/pull/3926](https://togithub.com/charliermarsh/ruff/pull/3926) - \[`flake8-pyi`] Implement duplicate types in unions (`PYI016`) by [@​USER-5](https://togithub.com/USER-5) in [https://github.com/charliermarsh/ruff/pull/3922](https://togithub.com/charliermarsh/ruff/pull/3922) - \[`flake8-bandit`] Implement flake8-bandit shell injection rules by [@​robyoung](https://togithub.com/robyoung) in [https://github.com/charliermarsh/ruff/pull/3924](https://togithub.com/charliermarsh/ruff/pull/3924) - \[`flake8-comprehensions`] Redirect `PIE802` to `C419` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3971](https://togithub.com/charliermarsh/ruff/pull/3971) ##### Bug Fixes - Fix unicode handling in PLE2515 by [@​konstin](https://togithub.com/konstin) in [https://github.com/charliermarsh/ruff/pull/3898](https://togithub.com/charliermarsh/ruff/pull/3898) - Avoid adding required imports to stub files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3940](https://togithub.com/charliermarsh/ruff/pull/3940) - Add 'or if cond' to `E712` message by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3962](https://togithub.com/charliermarsh/ruff/pull/3962) - Ignore argument assignments when enforcing `RET504` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4004](https://togithub.com/charliermarsh/ruff/pull/4004) - Fix (doc-)line-too-long start location by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/4006](https://togithub.com/charliermarsh/ruff/pull/4006) - Ignore stub file assignments to value-requiring targets by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4030](https://togithub.com/charliermarsh/ruff/pull/4030) - Allow legacy C and T selectors in JSON schema by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3889](https://togithub.com/charliermarsh/ruff/pull/3889) - Ignore `PLW2901` when using typing cast by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3891](https://togithub.com/charliermarsh/ruff/pull/3891) - Visit comprehension to detect group name usage/overrides by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3887](https://togithub.com/charliermarsh/ruff/pull/3887) - Ensure that tab characters aren't in multi-line strings before throwing a violation by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/charliermarsh/ruff/pull/3837](https://togithub.com/charliermarsh/ruff/pull/3837) - Avoid N802 violations for `@override` methods by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3912](https://togithub.com/charliermarsh/ruff/pull/3912) - Check for arguments in inner/outer call for `C414` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3916](https://togithub.com/charliermarsh/ruff/pull/3916) - Do not skip analysis if `*args` present for `F523` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3923](https://togithub.com/charliermarsh/ruff/pull/3923) - Extend SIM105 to match also 'Ellipsis only' bodies in exception handlers by [@​leiserfg](https://togithub.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/3925](https://togithub.com/charliermarsh/ruff/pull/3925) - Support `pyright: ignore` comments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3941](https://togithub.com/charliermarsh/ruff/pull/3941) - Tidy up some `pygrep-hooks` rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3942](https://togithub.com/charliermarsh/ruff/pull/3942) - Use identifier range for pytest rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3948](https://togithub.com/charliermarsh/ruff/pull/3948) - Allow `typing_extensions.TypeVar` assignments in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3951](https://togithub.com/charliermarsh/ruff/pull/3951) - Raise percent-format upgrade rule (`UP031`) for hanging modulos by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3953](https://togithub.com/charliermarsh/ruff/pull/3953) - Check for parenthesis in implicit str concat in `PT006` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3955](https://togithub.com/charliermarsh/ruff/pull/3955) - Do not consider nested comment as part of code by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3984](https://togithub.com/charliermarsh/ruff/pull/3984) - Preserve type annotations when fixing `E731` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3983](https://togithub.com/charliermarsh/ruff/pull/3983) - Remove autofix behavior for uncapitalized-environment-variables (`SIM112`) by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3988](https://togithub.com/charliermarsh/ruff/pull/3988) - Respect typing-modules when evaluating no-return functions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4001](https://togithub.com/charliermarsh/ruff/pull/4001) - Avoid short-circuiting when detecting RET rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4002](https://togithub.com/charliermarsh/ruff/pull/4002) - Set non-empty range for indentation diagnostics by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/4005](https://togithub.com/charliermarsh/ruff/pull/4005) - Ignore relative imports in `banned-api` rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4024](https://togithub.com/charliermarsh/ruff/pull/4024) - Support relative imports in `banned-api` enforcement by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4025](https://togithub.com/charliermarsh/ruff/pull/4025) - Treat non-future function annotations as required-at-runtime by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4028](https://togithub.com/charliermarsh/ruff/pull/4028) - Ignore certain flake8-pyi errors within function bodies by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4029](https://togithub.com/charliermarsh/ruff/pull/4029) #### New Contributors - [@​tjkuson](https://togithub.com/tjkuson) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3886](https://togithub.com/charliermarsh/ruff/pull/3886) - [@​mosauter](https://togithub.com/mosauter) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3877](https://togithub.com/charliermarsh/ruff/pull/3877) - [@​stancld](https://togithub.com/stancld) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3926](https://togithub.com/charliermarsh/ruff/pull/3926) - [@​USER-5](https://togithub.com/USER-5) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3922](https://togithub.com/charliermarsh/ruff/pull/3922) - [@​robyoung](https://togithub.com/robyoung) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3924](https://togithub.com/charliermarsh/ruff/pull/3924) - [@​hackedd](https://togithub.com/hackedd) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3900](https://togithub.com/charliermarsh/ruff/pull/3900) - [@​justinchuby](https://togithub.com/justinchuby) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3982](https://togithub.com/charliermarsh/ruff/pull/3982) - [@​mirecl](https://togithub.com/mirecl) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4008](https://togithub.com/charliermarsh/ruff/pull/4008) - [@​Xemnas0](https://togithub.com/Xemnas0) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4026](https://togithub.com/charliermarsh/ruff/pull/4026) **Full Changelog**: astral-sh/ruff@v0.0.261...v0.0.262 </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://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS40OS4wIiwidXBkYXRlZEluVmVyIjoiMzUuNDkuMCJ9--> Signed-off-by: Renovate Bot <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![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://togithub.com/charliermarsh/ruff) | `==0.0.261` -> `==0.0.262` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/compatibility-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/confidence-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.262`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.262) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.261...v0.0.262) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Configuration - Allow users to extend the set of included files via `include` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3914](https://togithub.com/charliermarsh/ruff/pull/3914) - Implement isort custom sections and ordering ([#​2419](https://togithub.com/charliermarsh/ruff/issues/2419)) by [@​hackedd](https://togithub.com/hackedd) in [https://github.com/charliermarsh/ruff/pull/3900](https://togithub.com/charliermarsh/ruff/pull/3900) ##### Rules - \[`flake8-simplify`] Add autofix for `contextlib.suppress` (`SIM105`) by [@​leiserfg](https://togithub.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/3915](https://togithub.com/charliermarsh/ruff/pull/3915) - \[`flake8-bandit`] Ignore assert errors (S101) in `TYPE_CHECKING` blocks by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3960](https://togithub.com/charliermarsh/ruff/pull/3960) - \[`flake8-comprehensions`] Implement `unnecessary-literal-within-dict-call` (`C418`) by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3969](https://togithub.com/charliermarsh/ruff/pull/3969) - \[`ruff`] Add checks for mutable defaults `dataclass`es by [@​mosauter](https://togithub.com/mosauter) in [https://github.com/charliermarsh/ruff/pull/3877](https://togithub.com/charliermarsh/ruff/pull/3877) - \[`flake8-import-conventions`] Add a rule for `BannedImportAlias` by [@​stancld](https://togithub.com/stancld) in [https://github.com/charliermarsh/ruff/pull/3926](https://togithub.com/charliermarsh/ruff/pull/3926) - \[`flake8-pyi`] Implement duplicate types in unions (`PYI016`) by [@​USER-5](https://togithub.com/USER-5) in [https://github.com/charliermarsh/ruff/pull/3922](https://togithub.com/charliermarsh/ruff/pull/3922) - \[`flake8-bandit`] Implement flake8-bandit shell injection rules by [@​robyoung](https://togithub.com/robyoung) in [https://github.com/charliermarsh/ruff/pull/3924](https://togithub.com/charliermarsh/ruff/pull/3924) - \[`flake8-comprehensions`] Redirect `PIE802` to `C419` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3971](https://togithub.com/charliermarsh/ruff/pull/3971) ##### Bug Fixes - Fix unicode handling in PLE2515 by [@​konstin](https://togithub.com/konstin) in [https://github.com/charliermarsh/ruff/pull/3898](https://togithub.com/charliermarsh/ruff/pull/3898) - Avoid adding required imports to stub files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3940](https://togithub.com/charliermarsh/ruff/pull/3940) - Add 'or if cond' to `E712` message by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3962](https://togithub.com/charliermarsh/ruff/pull/3962) - Ignore argument assignments when enforcing `RET504` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4004](https://togithub.com/charliermarsh/ruff/pull/4004) - Fix (doc-)line-too-long start location by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/4006](https://togithub.com/charliermarsh/ruff/pull/4006) - Ignore stub file assignments to value-requiring targets by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4030](https://togithub.com/charliermarsh/ruff/pull/4030) - Allow legacy C and T selectors in JSON schema by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3889](https://togithub.com/charliermarsh/ruff/pull/3889) - Ignore `PLW2901` when using typing cast by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3891](https://togithub.com/charliermarsh/ruff/pull/3891) - Visit comprehension to detect group name usage/overrides by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3887](https://togithub.com/charliermarsh/ruff/pull/3887) - Ensure that tab characters aren't in multi-line strings before throwing a violation by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/charliermarsh/ruff/pull/3837](https://togithub.com/charliermarsh/ruff/pull/3837) - Avoid N802 violations for `@override` methods by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3912](https://togithub.com/charliermarsh/ruff/pull/3912) - Check for arguments in inner/outer call for `C414` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3916](https://togithub.com/charliermarsh/ruff/pull/3916) - Do not skip analysis if `*args` present for `F523` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3923](https://togithub.com/charliermarsh/ruff/pull/3923) - Extend SIM105 to match also 'Ellipsis only' bodies in exception handlers by [@​leiserfg](https://togithub.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/3925](https://togithub.com/charliermarsh/ruff/pull/3925) - Support `pyright: ignore` comments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3941](https://togithub.com/charliermarsh/ruff/pull/3941) - Tidy up some `pygrep-hooks` rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3942](https://togithub.com/charliermarsh/ruff/pull/3942) - Use identifier range for pytest rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3948](https://togithub.com/charliermarsh/ruff/pull/3948) - Allow `typing_extensions.TypeVar` assignments in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3951](https://togithub.com/charliermarsh/ruff/pull/3951) - Raise percent-format upgrade rule (`UP031`) for hanging modulos by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3953](https://togithub.com/charliermarsh/ruff/pull/3953) - Check for parenthesis in implicit str concat in `PT006` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3955](https://togithub.com/charliermarsh/ruff/pull/3955) - Do not consider nested comment as part of code by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3984](https://togithub.com/charliermarsh/ruff/pull/3984) - Preserve type annotations when fixing `E731` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3983](https://togithub.com/charliermarsh/ruff/pull/3983) - Remove autofix behavior for uncapitalized-environment-variables (`SIM112`) by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3988](https://togithub.com/charliermarsh/ruff/pull/3988) - Respect typing-modules when evaluating no-return functions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4001](https://togithub.com/charliermarsh/ruff/pull/4001) - Avoid short-circuiting when detecting RET rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4002](https://togithub.com/charliermarsh/ruff/pull/4002) - Set non-empty range for indentation diagnostics by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/4005](https://togithub.com/charliermarsh/ruff/pull/4005) - Ignore relative imports in `banned-api` rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4024](https://togithub.com/charliermarsh/ruff/pull/4024) - Support relative imports in `banned-api` enforcement by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4025](https://togithub.com/charliermarsh/ruff/pull/4025) - Treat non-future function annotations as required-at-runtime by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4028](https://togithub.com/charliermarsh/ruff/pull/4028) - Ignore certain flake8-pyi errors within function bodies by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4029](https://togithub.com/charliermarsh/ruff/pull/4029) #### New Contributors - [@​tjkuson](https://togithub.com/tjkuson) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3886](https://togithub.com/charliermarsh/ruff/pull/3886) - [@​mosauter](https://togithub.com/mosauter) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3877](https://togithub.com/charliermarsh/ruff/pull/3877) - [@​stancld](https://togithub.com/stancld) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3926](https://togithub.com/charliermarsh/ruff/pull/3926) - [@​USER-5](https://togithub.com/USER-5) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3922](https://togithub.com/charliermarsh/ruff/pull/3922) - [@​robyoung](https://togithub.com/robyoung) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3924](https://togithub.com/charliermarsh/ruff/pull/3924) - [@​hackedd](https://togithub.com/hackedd) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3900](https://togithub.com/charliermarsh/ruff/pull/3900) - [@​justinchuby](https://togithub.com/justinchuby) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3982](https://togithub.com/charliermarsh/ruff/pull/3982) - [@​mirecl](https://togithub.com/mirecl) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4008](https://togithub.com/charliermarsh/ruff/pull/4008) - [@​Xemnas0](https://togithub.com/Xemnas0) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4026](https://togithub.com/charliermarsh/ruff/pull/4026) **Full Changelog**: astral-sh/ruff@v0.0.261...v0.0.262 </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://app.renovatebot.com/dashboard#github/allenporter/flux-local). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS41NC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNTQuMCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![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://togithub.com/charliermarsh/ruff) | `==0.0.261` -> `==0.0.262` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/compatibility-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/confidence-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.262`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.262) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.261...v0.0.262) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Configuration - Allow users to extend the set of included files via `include` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3914](https://togithub.com/charliermarsh/ruff/pull/3914) - Implement isort custom sections and ordering ([#​2419](https://togithub.com/charliermarsh/ruff/issues/2419)) by [@​hackedd](https://togithub.com/hackedd) in [https://github.com/charliermarsh/ruff/pull/3900](https://togithub.com/charliermarsh/ruff/pull/3900) ##### Rules - \[`flake8-simplify`] Add autofix for `contextlib.suppress` (`SIM105`) by [@​leiserfg](https://togithub.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/3915](https://togithub.com/charliermarsh/ruff/pull/3915) - \[`flake8-bandit`] Ignore assert errors (S101) in `TYPE_CHECKING` blocks by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3960](https://togithub.com/charliermarsh/ruff/pull/3960) - \[`flake8-comprehensions`] Implement `unnecessary-literal-within-dict-call` (`C418`) by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3969](https://togithub.com/charliermarsh/ruff/pull/3969) - \[`ruff`] Add checks for mutable defaults `dataclass`es by [@​mosauter](https://togithub.com/mosauter) in [https://github.com/charliermarsh/ruff/pull/3877](https://togithub.com/charliermarsh/ruff/pull/3877) - \[`flake8-import-conventions`] Add a rule for `BannedImportAlias` by [@​stancld](https://togithub.com/stancld) in [https://github.com/charliermarsh/ruff/pull/3926](https://togithub.com/charliermarsh/ruff/pull/3926) - \[`flake8-pyi`] Implement duplicate types in unions (`PYI016`) by [@​USER-5](https://togithub.com/USER-5) in [https://github.com/charliermarsh/ruff/pull/3922](https://togithub.com/charliermarsh/ruff/pull/3922) - \[`flake8-bandit`] Implement flake8-bandit shell injection rules by [@​robyoung](https://togithub.com/robyoung) in [https://github.com/charliermarsh/ruff/pull/3924](https://togithub.com/charliermarsh/ruff/pull/3924) - \[`flake8-comprehensions`] Redirect `PIE802` to `C419` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3971](https://togithub.com/charliermarsh/ruff/pull/3971) ##### Bug Fixes - Fix unicode handling in PLE2515 by [@​konstin](https://togithub.com/konstin) in [https://github.com/charliermarsh/ruff/pull/3898](https://togithub.com/charliermarsh/ruff/pull/3898) - Avoid adding required imports to stub files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3940](https://togithub.com/charliermarsh/ruff/pull/3940) - Add 'or if cond' to `E712` message by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3962](https://togithub.com/charliermarsh/ruff/pull/3962) - Ignore argument assignments when enforcing `RET504` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4004](https://togithub.com/charliermarsh/ruff/pull/4004) - Fix (doc-)line-too-long start location by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/4006](https://togithub.com/charliermarsh/ruff/pull/4006) - Ignore stub file assignments to value-requiring targets by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4030](https://togithub.com/charliermarsh/ruff/pull/4030) - Allow legacy C and T selectors in JSON schema by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3889](https://togithub.com/charliermarsh/ruff/pull/3889) - Ignore `PLW2901` when using typing cast by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3891](https://togithub.com/charliermarsh/ruff/pull/3891) - Visit comprehension to detect group name usage/overrides by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3887](https://togithub.com/charliermarsh/ruff/pull/3887) - Ensure that tab characters aren't in multi-line strings before throwing a violation by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/charliermarsh/ruff/pull/3837](https://togithub.com/charliermarsh/ruff/pull/3837) - Avoid N802 violations for `@override` methods by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3912](https://togithub.com/charliermarsh/ruff/pull/3912) - Check for arguments in inner/outer call for `C414` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3916](https://togithub.com/charliermarsh/ruff/pull/3916) - Do not skip analysis if `*args` present for `F523` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3923](https://togithub.com/charliermarsh/ruff/pull/3923) - Extend SIM105 to match also 'Ellipsis only' bodies in exception handlers by [@​leiserfg](https://togithub.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/3925](https://togithub.com/charliermarsh/ruff/pull/3925) - Support `pyright: ignore` comments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3941](https://togithub.com/charliermarsh/ruff/pull/3941) - Tidy up some `pygrep-hooks` rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3942](https://togithub.com/charliermarsh/ruff/pull/3942) - Use identifier range for pytest rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3948](https://togithub.com/charliermarsh/ruff/pull/3948) - Allow `typing_extensions.TypeVar` assignments in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3951](https://togithub.com/charliermarsh/ruff/pull/3951) - Raise percent-format upgrade rule (`UP031`) for hanging modulos by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3953](https://togithub.com/charliermarsh/ruff/pull/3953) - Check for parenthesis in implicit str concat in `PT006` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3955](https://togithub.com/charliermarsh/ruff/pull/3955) - Do not consider nested comment as part of code by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3984](https://togithub.com/charliermarsh/ruff/pull/3984) - Preserve type annotations when fixing `E731` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3983](https://togithub.com/charliermarsh/ruff/pull/3983) - Remove autofix behavior for uncapitalized-environment-variables (`SIM112`) by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3988](https://togithub.com/charliermarsh/ruff/pull/3988) - Respect typing-modules when evaluating no-return functions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4001](https://togithub.com/charliermarsh/ruff/pull/4001) - Avoid short-circuiting when detecting RET rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4002](https://togithub.com/charliermarsh/ruff/pull/4002) - Set non-empty range for indentation diagnostics by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/4005](https://togithub.com/charliermarsh/ruff/pull/4005) - Ignore relative imports in `banned-api` rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4024](https://togithub.com/charliermarsh/ruff/pull/4024) - Support relative imports in `banned-api` enforcement by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4025](https://togithub.com/charliermarsh/ruff/pull/4025) - Treat non-future function annotations as required-at-runtime by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4028](https://togithub.com/charliermarsh/ruff/pull/4028) - Ignore certain flake8-pyi errors within function bodies by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4029](https://togithub.com/charliermarsh/ruff/pull/4029) #### New Contributors - [@​tjkuson](https://togithub.com/tjkuson) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3886](https://togithub.com/charliermarsh/ruff/pull/3886) - [@​mosauter](https://togithub.com/mosauter) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3877](https://togithub.com/charliermarsh/ruff/pull/3877) - [@​stancld](https://togithub.com/stancld) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3926](https://togithub.com/charliermarsh/ruff/pull/3926) - [@​USER-5](https://togithub.com/USER-5) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3922](https://togithub.com/charliermarsh/ruff/pull/3922) - [@​robyoung](https://togithub.com/robyoung) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3924](https://togithub.com/charliermarsh/ruff/pull/3924) - [@​hackedd](https://togithub.com/hackedd) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3900](https://togithub.com/charliermarsh/ruff/pull/3900) - [@​justinchuby](https://togithub.com/justinchuby) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3982](https://togithub.com/charliermarsh/ruff/pull/3982) - [@​mirecl](https://togithub.com/mirecl) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4008](https://togithub.com/charliermarsh/ruff/pull/4008) - [@​Xemnas0](https://togithub.com/Xemnas0) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4026](https://togithub.com/charliermarsh/ruff/pull/4026) **Full Changelog**: astral-sh/ruff@v0.0.261...v0.0.262 </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://app.renovatebot.com/dashboard#github/allenporter/pyrainbird). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS41NC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNTQuMCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Summary
When converting a
lambda
expression to a function definition, if the variable is annotated usingCallable
(which can come from eithercollections.abc
ortyping
), preserve the types in the function definition.The first argument to
Callable
can either be a list of types, parameter specification or an ellipsis. Parameter specification is mainly used to support forwarding parameter types from one callable to another (aka decorators or nested functions). It's a generic type and cannot be used inlambda
expressions, so for now we'll ignore preserving the types (including the return type).fixes: #3973