selection_rank int64 0 10k | uid stringlengths 17 29 | source stringclasses 7
values | split stringclasses 3
values | row_idx int64 0 58.9k | instance_id stringlengths 14 120 | repo stringclasses 246
values | repo_canon stringclasses 232
values | language stringclasses 8
values | base_commit stringlengths 40 40 ⌀ | problem_statement stringlengths 84 23.6k | extra_context stringclasses 626
values | hints stringlengths 0 59.3k | patch stringlengths 252 175k | test_patch stringlengths 0 358k | f2p stringlengths 10 155k ⌀ | p2p stringlengths 2 1.75M ⌀ | env_image stringlengths 41 154 ⌀ | env_available bool 1
class | created_at stringlengths 10 20 ⌀ | n_src_files int64 1 15 | src_lines int64 1 1.48k | n_f2p float64 1 1.87k ⌀ | ps_chars int64 84 23.6k | leak_ratio float64 0 0.6 | s_prior float64 0.6 1 | s_verif float64 0.75 1 | s_ps float64 0.04 1 | s_patch float64 0.07 1 | s_tiebreak float64 0.02 1 | score float64 47.9 98.6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,400 | swe_smith::train::39250 | swe_smith | train | 39,250 | pallets__jinja.ada0a9a6.func_basic__v3xw21xd | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | Template inheritance broken - extends tag returns None instead of node
#### Description
Template inheritance is completely broken. When using `{% extends %}` tags in templates, the parser returns `None` instead of the proper extends node, causing template inheritance to fail.
#### Steps/Code to Reproduce
```python
... | diff --git a/src/jinja2/parser.py b/src/jinja2/parser.py
index 817abec..91b92c5 100644
--- a/src/jinja2/parser.py
+++ b/src/jinja2/parser.py
@@ -326,9 +326,9 @@ class Parser:
return node
def parse_extends(self) -> nodes.Extends:
- node = nodes.Extends(lineno=next(self.stream).lineno)
- nod... | ["tests/test_api.py::TestMeta::test_find_refererenced_templates", "tests/test_async.py::TestAsyncForLoop::test_bare_async", "tests/test_async.py::test_async_extend[asyncio]", "tests/test_async.py::test_async_extend[trio]", "tests/test_ext.py::TestInternationalization::test_trans", "tests/test_ext.py::TestNewstyleIntern... | ["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",... | jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6 | true | null | 1 | 6 | 31 | 1,063 | 0 | 0.6 | 1 | 0.75 | 1 | 0.197167 | 80.8665 | |||
8,401 | swe_smith::train::47564 | swe_smith | train | 47,564 | sqlfluff__sqlfluff.50a1c4b6.combine_module__21hpzi4h | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | Plugin loading fails with UnboundLocalError
#### Description
Plugin loading is broken due to a variable being used before assignment. When attempting to load plugins, the system crashes with an `UnboundLocalError` because the `plugin` variable is referenced before it's defined.
#### Steps/Code to Reproduce
```pytho... | diff --git a/src/sqlfluff/core/helpers/dict.py b/src/sqlfluff/core/helpers/dict.py
index ae76dcd..d06bd4a 100644
--- a/src/sqlfluff/core/helpers/dict.py
+++ b/src/sqlfluff/core/helpers/dict.py
@@ -124,8 +124,6 @@ def dict_diff(
"""
buff: NestedStringDict[T] = {}
for k in left:
- if ignore and k in... | ["test/core/helpers/dict_test.py::test__helpers_dict__dict_diff", "test/core/plugin_test.py::test__plugin_handle_bad_load"] | ["test/core/helpers/dict_test.py::test_helpers_dict_doctests", "test/core/helpers/dict_test.py::test__helpers_dict__nested_combine", "test/core/helpers/dict_test.py::test__helpers_dict__nested_combine_copy_effect", "test/core/helpers/dict_test.py::test__config__iter_records_from_nested_dict", "test/core/plugin_test.py:... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 2 | 13 | 2 | 923 | 0 | 0.6 | 1 | 0.75 | 1 | 0.197167 | 80.8665 | |||
8,402 | swe_smith::train::44971 | swe_smith | train | 44,971 | mahmoud__glom.fb3c4e76.func_pm_op_change__5w4ha8ko | swesmith/mahmoud__glom.fb3c4e76 | mahmoud/glom | python | null | # Syntax error in Check class validation logic
I found a bug in the `Check` class in `glom/matching.py`. When trying to validate arguments, the code is using incorrect operators for string formatting.
## Steps to reproduce
When using the `Check` class with validation parameters, it crashes with a TypeError:
```pyth... | diff --git a/glom/matching.py b/glom/matching.py
index 798ac40..6c409a5 100644
--- a/glom/matching.py
+++ b/glom/matching.py
@@ -910,8 +910,7 @@ class Check:
' not: %r' % (name, val))
for v in val:
if not func(v):
- raise ValueError('exp... | ["glom/test/test_check.py::test_check_signature"] | ["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "... | jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76 | true | null | 1 | 6 | 1 | 1,063 | 0 | 0.6 | 1 | 0.75 | 1 | 0.197167 | 80.8665 | |||
8,403 | swe_bench::test::1111 | swe_bench | test | 1,111 | matplotlib__matplotlib-26184 | matplotlib/matplotlib | matplotlib/matplotlib | python | 9ced0c0347d270886f162746e071b2b8b60d7a67 | [Bug]: AnnotationBbox does not return correct window_extent before first draw
### Bug summary
I’m trying to use a constrained layout in a visualization that contains an artist that is an instance of AnnotationBbox, and matplotlib raises a warning saying constrained layout is not applied. The visual effect is not evide... | Try `ab.set_in_layout(False)` if you don't want an artist accounted for in constrained_layout.
Probably an easy todo here is to be more explicit about `set_in_layout` in the constrained layout tutorial. It is mentioned, but only in the context of a legend.
Edit:
sorry I see that you know about `set_in_layou... | diff --git a/lib/matplotlib/offsetbox.py b/lib/matplotlib/offsetbox.py
--- a/lib/matplotlib/offsetbox.py
+++ b/lib/matplotlib/offsetbox.py
@@ -1389,11 +1389,15 @@ def get_window_extent(self, renderer=None):
# docstring inherited
if renderer is None:
renderer = self.figure._get_renderer()
... | diff --git a/lib/matplotlib/tests/test_offsetbox.py b/lib/matplotlib/tests/test_offsetbox.py
--- a/lib/matplotlib/tests/test_offsetbox.py
+++ b/lib/matplotlib/tests/test_offsetbox.py
@@ -257,7 +257,8 @@ def test_anchoredtext_horizontal_alignment():
ax.add_artist(text2)
-def test_annotationbbox_extents():
+@pyt... | ["lib/matplotlib/tests/test_offsetbox.py::test_annotationbbox_extents[window_extent]", "lib/matplotlib/tests/test_offsetbox.py::test_annotationbbox_extents[tightbbox]"] | ["lib/matplotlib/tests/test_offsetbox.py::test_offsetbox_clipping[png]", "lib/matplotlib/tests/test_offsetbox.py::test_offsetbox_clipping[pdf]", "lib/matplotlib/tests/test_offsetbox.py::test_offsetbox_clip_children", "lib/matplotlib/tests/test_offsetbox.py::test_offsetbox_loc_codes", "lib/matplotlib/tests/test_offsetbo... | null | true | 2023-06-25T11:39:21Z | 1 | 4 | 2 | 1,852 | 0 | 0.8 | 1 | 0.7 | 0.8 | 0.322 | 80.866 | |
8,404 | swe_smith::train::44307 | swe_smith | train | 44,307 | pydata__patsy.a5d16484.func_pm_ctrl_invert_if__xsxblcke | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | Column naming broken for numerical factors
When building design matrices with numerical factors, the column naming logic is incorrectly handling the factor type check, causing assertion errors and incorrect column names.
#### Steps/Code to Reproduce
```python
import numpy as np
from patsy import dmatrix
# Simple nu... | diff --git a/patsy/build.py b/patsy/build.py
index cbe2524..9e4a6f3 100644
--- a/patsy/build.py
+++ b/patsy/build.py
@@ -256,16 +256,16 @@ def _subterm_column_names_iter(factor_infos, subterm):
for factor, column_idx in zip(subterm.factors, column_idxs):
fi = factor_infos[factor]
if f... | ["patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths", "patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_b... | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__examine_factor_types", "patsy/builtins.py::test_I", "patsy/builtins.py::... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 11 | 33 | 962 | 0 | 0.6 | 1 | 0.75 | 1 | 0.197 | 80.866 | |||
8,405 | swe_smith::train::35774 | swe_smith | train | 35,774 | stanfordnlp__dspy.651a4c71.func_pm_remove_cond__lnmmwjzw | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | Tool validation no longer checks for invalid arguments
When using a Tool with **kwargs, it seems that argument validation is broken. The tool no longer raises an error when invalid arguments are passed.
Example:
```python
from dspy.primitives.tool import Tool
def fn(x: int, **kwargs):
return kwargs
tool = Tool... | diff --git a/dspy/primitives/tool.py b/dspy/primitives/tool.py
index 3edea2d..bb330d1 100644
--- a/dspy/primitives/tool.py
+++ b/dspy/primitives/tool.py
@@ -113,10 +113,7 @@ class Tool:
# Validate the args value comply to the json schema.
for k, v in kwargs.items():
if k not in self.args:... | ["tests/primitives/test_tool.py::test_tool_call_kwarg", "tests/primitives/test_tool.py::test_async_tool_with_kwargs", "tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response... | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 6 | 6 | 1,062 | 0 | 0.6 | 1 | 0.75 | 1 | 0.197 | 80.866 | |||
8,406 | swe_smith::train::5186 | swe_smith | train | 5,186 | agronholm__exceptiongroup.0b4f4937.func_pm_remove_cond__ov98s1zs | swesmith/agronholm__exceptiongroup.0b4f4937 | agronholm/exceptiongroup | python | null | catch() function accepts invalid exception types without validation
#### Description
The `catch()` function is not properly validating exception types passed to it, allowing invalid types to be used as handlers without raising appropriate errors.
#### Steps/Code to Reproduce
```python
from exceptiongroup import cat... | diff --git a/src/exceptiongroup/_catch.py b/src/exceptiongroup/_catch.py
index 0246568..cf519c6 100644
--- a/src/exceptiongroup/_catch.py
+++ b/src/exceptiongroup/_catch.py
@@ -104,28 +104,11 @@ def catch(
] = {}
for type_or_iterable, handler in __handlers.items():
iterable: tuple[type[BaseException]... | ["tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_group]", "tests/test_catch.py::test_catch_ungrouped", "tests/t... | ["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_exceptions.py::TestExceptionGroupTypeHierarchy::test_exception_group_is_generic_type", "tests/test_exceptions.py::TestExceptionGroupTypeHierarchy::test_exception_group_types", "tests/test_exceptions.py::BadConstructorArgs::test_b... | jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937 | true | null | 1 | 19 | 15 | 802 | 0 | 0.6 | 1 | 0.75 | 1 | 0.197 | 80.866 | |||
8,407 | swe_smith::train::42706 | swe_smith | train | 42,706 | python-jsonschema__jsonschema.93e0caa5.func_pm_ctrl_shuffle__9wsf7oyg | swesmith/python-jsonschema__jsonschema.93e0caa5 | python-jsonschema/jsonschema | python | null | validate() function crashes when cls parameter is None
#### Description
The `validate()` function in `jsonschema.validators` crashes with an AttributeError when called without specifying the `cls` parameter (which defaults to None).
#### Steps/Code to Reproduce
```python
import jsonschema
# This should work but cr... | diff --git a/jsonschema/validators.py b/jsonschema/validators.py
index b8ca3bd..d287107 100644
--- a/jsonschema/validators.py
+++ b/jsonschema/validators.py
@@ -1263,6 +1263,10 @@ def _search_schema(schema, matcher):
def validate(instance, schema, cls=None, *args, **kwargs): # noqa: D417
+
+ cls.check_schema(s... | ["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_invalid_schema_multiple_errors_pretty_output", "jsonschema/tests/test_cli.py::TestCLI::test_invalid_schema_pretty_output", "jsonschema/tests/test_cli.py::TestCLI::test_invalid_schema... | ["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jsonschema/tests/test_cli.py::TestCLI::test_instance_is_invalid_JSON", "jsonschema/tests/test_c... | jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5 | true | null | 1 | 9 | 14 | 1,001 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196833 | 80.8655 | |||
8,408 | swe_smith::train::33330 | swe_smith | train | 33,330 | pallets__click.fde47b4b.combine_file__ji6qsncl | swesmith/pallets__click.fde47b4b | pallets/click | python | null | LazyFile.open() returns None instead of file object
When using LazyFile, the `open()` method returns `None` instead of the expected file object. This breaks file operations that depend on the return value of `open()`.
#### Steps/Code to Reproduce
```python
import click
# Create a test file
with open('test.txt', 'w'... | diff --git a/src/click/utils.py b/src/click/utils.py
index ab2fe58..95cd07c 100644
--- a/src/click/utils.py
+++ b/src/click/utils.py
@@ -157,14 +157,14 @@ class LazyFile:
return self._f
try:
rv, self.should_close = open_stream(
- self.name, self.mode, self.encoding, sel... | ["tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_file_atomics", "tests/test_basic.py::test_file_option", "tests/test_context.py::test_global_context_object", "tests/test_termui.py::test_file_prompt_default_format[file_kwargs2]", "tests/test_utils.py::test_open_file", "tests/test_utils.py::test... | ["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs... | jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b | true | null | 1 | 16 | 12 | 861 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196833 | 80.8655 | |||
8,409 | swe_smith::train::17992 | swe_smith | train | 17,992 | pyasn1__pyasn1.0f07d724.func_pm_remove_cond__ltjyvxrp | swesmith/pyasn1__pyasn1.0f07d724 | pyasn1/pyasn1 | python | null | RelativeOID string input broken after recent changes
#### Description
RelativeOID no longer accepts string input like '1.3.6'. This breaks existing code that was working before.
#### Steps/Code to Reproduce
```python
from pyasn1.type import univ
# This used to work but now raises an error
oid = univ.RelativeOID('1... | diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index 9aff5e6..e0e7d70 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -1256,20 +1256,6 @@ class RelativeOID(base.SimpleAsn1Type):
return False
def prettyIn(self, value):
- if isinstance(value, RelativeOID):
- return ... | ["tests/type/test_univ.py::RelativeOID::testContains", "tests/type/test_univ.py::RelativeOID::testInput1", "tests/type/test_univ.py::RelativeOID::testInput3", "tests/type/test_univ.py::RelativeOID::testPrefix", "tests/type/test_univ.py::RelativeOID::testRepr", "tests/type/test_univ.py::RelativeOID::testUnicode", "tests... | ["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d... | jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724 | true | null | 1 | 15 | 7 | 881 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196833 | 80.8655 | |||
8,410 | swe_smith::train::31260 | swe_smith | train | 31,260 | scrapy__scrapy.35212ec5.func_pm_ctrl_shuffle__ftad4qxx | swesmith/scrapy__scrapy.35212ec5 | scrapy/scrapy | python | null | JsonItemExporter initialization order causes AttributeError
#### Description
When using JsonItemExporter, an AttributeError is raised during initialization because the code tries to access `self.indent` before the parent class `__init__` method has been called.
#### Steps/Code to Reproduce
```python
from scrapy.exp... | diff --git a/scrapy/exporters.py b/scrapy/exporters.py
index 46c6aa3..fb0ea83 100644
--- a/scrapy/exporters.py
+++ b/scrapy/exporters.py
@@ -123,19 +123,18 @@ class JsonLinesItemExporter(BaseItemExporter):
class JsonItemExporter(BaseItemExporter):
def __init__(self, file: BytesIO, **kwargs: Any):
- super... | ["tests/test_exporters.py::JsonItemExporterTest::test_export_dict_item", "tests/test_exporters.py::JsonItemExporterTest::test_export_item", "tests/test_exporters.py::JsonItemExporterTest::test_extra_keywords", "tests/test_exporters.py::JsonItemExporterTest::test_field_custom_serializer", "tests/test_exporters.py::JsonI... | ["tests/test_exporters.py::BaseItemExporterTest::test_export_dict_item", "tests/test_exporters.py::BaseItemExporterTest::test_export_item", "tests/test_exporters.py::BaseItemExporterTest::test_field_custom_serializer", "tests/test_exporters.py::BaseItemExporterTest::test_fields_to_export", "tests/test_exporters.py::Bas... | jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5 | true | null | 1 | 11 | 30 | 961 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196833 | 80.8655 | |||
8,411 | swe_smith::train::31907 | swe_smith | train | 31,907 | davidhalter__parso.338a5760.func_basic__8riks9yd | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | Diff parser initialization breaks with None values
#### Description
The diff parser fails to initialize properly when certain internal attributes are set to None instead of expected string values. This causes TypeError exceptions when string operations are attempted on None values.
#### Steps/Code to Reproduce
```p... | diff --git a/parso/python/diff.py b/parso/python/diff.py
index ba999fa..9544b62 100644
--- a/parso/python/diff.py
+++ b/parso/python/diff.py
@@ -593,10 +593,10 @@ class _NodesTree:
def __init__(self, module):
self._base_node = _NodesTreeNode(module)
self._working_stack = [self._base_node]
- ... | ["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p... | ["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_... | jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760 | true | null | 1 | 6 | 82 | 1,061 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196833 | 80.8655 | |||
8,412 | swe_smith::train::43733 | swe_smith | train | 43,733 | sloria__environs.73c372df.lm_rewrite__zbgd3uxz | swesmith/sloria__environs.73c372df | sloria/environs | python | null | Django cache URL error message is not preserved
Description
When using the `dj_cache_url` parser with an invalid cache URL, the error message is not preserved correctly. The original error message from django-cache-url is replaced with a generic "Not a valid cache URL" message.
For example:
```python
from environs ... | diff --git a/src/environs/__init__.py b/src/environs/__init__.py
index 00f6072..1388808 100644
--- a/src/environs/__init__.py
+++ b/src/environs/__init__.py
@@ -350,6 +350,7 @@ def _dj_email_url_parser(value: str, **kwargs) -> dict:
def _dj_cache_url_parser(value: str, **kwargs) -> dict:
+ """Parse a cache URL ... | ["tests/test_environs.py::TestDeferredValidation::test_dj_cache_url_with_deferred_validation_invalid"] | ["tests/test_environs.py::TestCasting::test_call", "tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_basic", "tests/test_environs.py::TestCasting::test_empty_str", "tests/test_environs.py::TestCasting::test_int_cast", "tests/test_environs.py::TestCasting::test_inv... | jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df | true | null | 1 | 6 | 1 | 1,061 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196833 | 80.8655 | |||
8,413 | swe_smith::train::20481 | swe_smith | train | 20,481 | tobymao__sqlglot.036601ba.func_pm_ctrl_invert_if__9gafkn4t | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | MySQL SHOW statement parsing fails with UnboundLocalError
#### Description
When parsing MySQL SHOW statements, the parser raises an `UnboundLocalError` for the variable `target_id`. This affects various SHOW commands including SHOW TABLES, SHOW COLUMNS, SHOW INDEX, etc.
#### Steps/Code to Reproduce
```python
import... | diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py
index 927642a..6294dfc 100644
--- a/sqlglot/dialects/mysql.py
+++ b/sqlglot/dialects/mysql.py
@@ -551,18 +551,15 @@ class MySQL(Dialect):
global_: t.Optional[bool] = None,
) -> exp.Show:
if target:
+ tar... | ["tests/dialects/test_mysql.py::TestMySQL::test_show_columns", "tests/dialects/test_mysql.py::TestMySQL::test_show_db_like_or_where_sql", "tests/dialects/test_mysql.py::TestMySQL::test_show_engine", "tests/dialects/test_mysql.py::TestMySQL::test_show_errors", "tests/dialects/test_mysql.py::TestMySQL::test_show_events",... | ["tests/dialects/test_mysql.py::TestMySQL::test_analyze", "tests/dialects/test_mysql.py::TestMySQL::test_at_time_zone", "tests/dialects/test_mysql.py::TestMySQL::test_bits_literal", "tests/dialects/test_mysql.py::TestMySQL::test_canonical_functions", "tests/dialects/test_mysql.py::TestMySQL::test_convert", "tests/diale... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 11 | 12 | 961 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196833 | 80.8655 | |||
8,414 | swe_smith::train::7828 | swe_smith | train | 7,828 | cantools__cantools.0c6a7871.func_basic__y8rdalue | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | PCAN Trace V2.0 parser fails with TypeError on data processing
#### Description
When parsing PCAN trace files in V2.0 format, the logreader encounters a TypeError related to bytes/string handling. The parser appears to have issues processing the CAN data field correctly.
#### Steps/Code to Reproduce
```python
impor... | diff --git a/src/cantools/logreader.py b/src/cantools/logreader.py
index 67943e0..77e6fdb 100644
--- a/src/cantools/logreader.py
+++ b/src/cantools/logreader.py
@@ -258,14 +258,13 @@ class PCANTracePatternV20(BasePattern):
<logreader.DataFrame object at ...>
"""
channel = 'pcanx'
- fra... | ["tests/test_logreader.py::TestLogreaderFormats::test_pcan_traceV20", "tests/test_logreader.py::TestLogreaderStreams::test_pcan_traceV20"] | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 11 | 2 | 961 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196833 | 80.8655 | |||
8,415 | swe_smith::train::39094 | swe_smith | train | 39,094 | pallets__jinja.ada0a9a6.func_basic__kal6ov6o | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | get_spontaneous_environment returns class instead of instance
#### Description
The `get_spontaneous_environment` function is returning the Environment class itself instead of an instance of the environment. This causes `TypeError` when trying to use methods like `from_string()` on the returned value.
#### Steps/Code... | diff --git a/src/jinja2/environment.py b/src/jinja2/environment.py
index 0b303d5..54d67ae 100644
--- a/src/jinja2/environment.py
+++ b/src/jinja2/environment.py
@@ -74,9 +74,9 @@ def get_spontaneous_environment(cls: t.Type[_env_bound], *args: t.Any) -> _env_b
:param cls: Environment class to create.
:param ar... | ["tests/test_api.py::TestExtendedAPI::test_template_passthrough", "tests/test_api.py::TestUndefined::test_stopiteration_is_undefined", "tests/test_api.py::TestUndefined::test_indexing_gives_undefined", "tests/test_async.py::test_basic_async[asyncio]", "tests/test_async.py::test_basic_async[trio]", "tests/test_async.py:... | ["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",... | jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6 | true | null | 1 | 6 | 33 | 1,060 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196667 | 80.865 | |||
8,416 | swe_smith::train::20923 | swe_smith | train | 20,923 | tobymao__sqlglot.036601ba.func_pm_remove_assign__xf56plfv | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | NameError in simplify_datetrunc function after variable removal
#### Description
The `simplify_datetrunc` function in the optimizer is throwing a `NameError` for undefined variables. It appears that some variable assignments were removed but the variables are still being referenced later in the code.
#### Steps/Code... | diff --git a/sqlglot/optimizer/simplify.py b/sqlglot/optimizer/simplify.py
index 3f0f732..c7c5aea 100644
--- a/sqlglot/optimizer/simplify.py
+++ b/sqlglot/optimizer/simplify.py
@@ -1032,7 +1032,6 @@ def simplify_datetrunc(expression: exp.Expression, dialect: Dialect) -> exp.Expr
return expression
... | ["tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_simplify", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch"] | ["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 7 | 4 | 1,040 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196667 | 80.865 | |||
8,417 | swe_smith::train::18717 | swe_smith | train | 18,717 | seperman__deepdiff.ed252022.func_basic__1jd0ifnk | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | LFUCache initialization swaps lock and freq_link_head attributes
#### Description
When creating an LFUCache instance, the `lock` and `freq_link_head` attributes are incorrectly swapped during initialization. This causes the cache to fail when trying to use the lock for thread safety operations.
#### Steps/Code to Re... | diff --git a/deepdiff/lfucache.py b/deepdiff/lfucache.py
index 3aa168a..ab5ea50 100644
--- a/deepdiff/lfucache.py
+++ b/deepdiff/lfucache.py
@@ -114,11 +114,11 @@ class LFUCache:
def __init__(self, capacity):
self.cache = dict_() # {key: cache_node}
- if capacity <= 0:
+ if capacity < 0:
... | ["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_distance.py::TestDeepDistance::test_get_distance_works_event_when_ignore_order_and_differe... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 6 | 16 | 1,060 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196667 | 80.865 | |||
8,418 | swe_smith::train::43900 | swe_smith | train | 43,900 | pydata__patsy.a5d16484.func_basic__47zl6sqy | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | Pickling fails with RuntimeError instead of NotImplementedError
When attempting to pickle patsy objects, a `RuntimeError` is now raised instead of the expected `NotImplementedError`. This breaks existing code that may have been catching the specific `NotImplementedError` exception.
#### Steps/Code to Reproduce
```py... | diff --git a/patsy/util.py b/patsy/util.py
index 2c1c19d..d871255 100644
--- a/patsy/util.py
+++ b/patsy/util.py
@@ -816,10 +816,11 @@ def test_safe_issubdtype():
def no_pickling(*args, **kwargs):
- raise NotImplementedError(
- "Sorry, pickling not yet supported. "
- "See https://github.com/pydata... | ["patsy/categorical.py::test_C", "patsy/constraint.py::test_LinearConstraint", "patsy/contrasts.py::test_ContrastMatrix", "patsy/desc.py::test_Term", "patsy/desc.py::test_ModelDesc", "patsy/design_info.py::test_DesignInfo", "patsy/design_info.py::test_design_matrix", "patsy/eval.py::test_VarLookupDict", "patsy/eval.py:... | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 9 | 12 | 1,000 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196667 | 80.865 | |||
8,419 | r2e_gym::train::4967 | r2e_gym | train | 4,967 | datalad__4686269521264030101bcae50929cfb2af6f520f | datalad | datalad/datalad | python | 4686269521264030101bcae50929cfb2af6f520f | **Title:** TypeError When Encoding is None in LsFormatter
**Description:**
When the system's standard output encoding is not set (i.e., `encoding` is `None`) and the output is a terminal (TTY), the `LsFormatter` attempts to encode Unicode symbols using `None` as the encoding. This results in a `TypeError`.
**Example ... | diff --git a/datalad/interface/ls.py b/datalad/interface/ls.py
--- a/datalad/interface/ls.py
+++ b/datalad/interface/ls.py
@@ -372,29 +372,30 @@
else:
BLUE = RED = GREEN = RESET = DATASET = u""
- # http://stackoverflow.com/questions/9932406/unicodeencodeerror-only-when-running-as-a-cron-job
- # re... | diff --git a/datalad/interface/tests/test_ls.py b/datalad/interface/tests/test_ls.py
--- a/datalad/interface/tests/test_ls.py
+++ b/datalad/interface/tests/test_ls.py
@@ -276,13 +276,11 @@
def test_ls_formatter():
- # we will use those unicode symbols only whenever both are supporting
- # UTF-8
- for syse... | null | null | namanjain12/datalad_final:4686269521264030101bcae50929cfb2af6f520f | true | null | 1 | 31 | null | 1,272 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.315333 | 80.86475 | ||
8,420 | swe_smith::train::26394 | swe_smith | train | 26,394 | pylint-dev__astroid.b114f6b5.func_pm_remove_assign__za3o4v7w | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Dataclass transform breaks with NameError on undefined variables
#### Description
When using dataclasses, the brain transformation is failing with NameError exceptions for undefined variables like `init_str` and other local variables that should be defined within the dataclass_transform function.
#### Steps/Code to ... | diff --git a/astroid/brain/brain_dataclasses.py b/astroid/brain/brain_dataclasses.py
index 92d983e..0e7a5e0 100644
--- a/astroid/brain/brain_dataclasses.py
+++ b/astroid/brain/brain_dataclasses.py
@@ -66,7 +66,6 @@ def dataclass_transform(node: nodes.ClassDef) -> None:
parent=assign_node,
)
... | ["tests/brain/test_builtin.py::TestStringNodes::test_string_format_in_dataclass_pylint8109", "tests/brain/test_dataclasses.py::test_inference_attribute_no_default[dataclasses]", "tests/brain/test_dataclasses.py::test_inference_attribute_no_default[pydantic.dataclasses]", "tests/brain/test_dataclasses.py::test_inference... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 10 | 79 | 979 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1965 | 80.8645 | |||
8,421 | swe_smith::train::51431 | swe_smith | train | 51,431 | spulec__freezegun.5f171db0.lm_rewrite__o43aptyh | swesmith/spulec__freezegun.5f171db0 | spulec/freezegun | python | null | **Description**
I'm encountering a recursion error when using the `timestamp` method in the `FakeDatetime` class. The error message indicates that the maximum recursion depth is exceeded, which seems to be related to the handling of time calculations.
**To Reproduce**
Here's a simple script to reproduce the issue:
... | diff --git a/freezegun/api.py b/freezegun/api.py
index d235292..dfc2e39 100644
--- a/freezegun/api.py
+++ b/freezegun/api.py
@@ -392,11 +392,12 @@ class FakeDatetime(real_datetime, FakeDate, metaclass=FakeDatetimeMeta):
result = real_datetime.fromtimestamp(t, tz)
return datetime_to_fakedatetime(re... | ["tests/test_datetimes.py::test_timestamp_tz_offset", "tests/test_datetimes.py::test_nested_context_manager", "tests/test_datetimes.py::test_nested_context_manager_with_tz_offsets", "tests/test_datetimes.py::test_min_and_max", "tests/test_datetimes.py::test_time_ns", "tests/test_datetimes.py::test_timestamp_with_tzoffs... | ["tests/test_asyncio.py::test_datetime_in_coroutine", "tests/test_asyncio.py::test_freezing_time_in_coroutine", "tests/test_asyncio.py::test_freezing_time_before_running_coroutine", "tests/test_asyncio.py::test_asyncio_sleeping_not_affected_by_freeze_time", "tests/test_asyncio.py::test_asyncio_to_call_later_with_frozen... | jyangballin/swesmith.x86_64.spulec_1776_freezegun.5f171db0 | true | null | 1 | 9 | 14 | 999 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1965 | 80.8645 | |||
8,422 | swe_smith::train::51717 | swe_smith | train | 51,717 | pydicom__pydicom.7d361b3d.func_basic__2irbappc | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | RecordNode initialization fails when record parameter is None
#### Description
When creating a RecordNode with `record=None`, the initialization logic is inverted and causes the node to attempt to set a None record, leading to AttributeError when accessing record properties.
#### Steps/Code to Reproduce
```python
f... | diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py
index 75976eb..d5dfea1 100644
--- a/src/pydicom/fileset.py
+++ b/src/pydicom/fileset.py
@@ -196,20 +196,14 @@ class RecordNode(Iterable["RecordNode"]):
self.children: list[RecordNode] = []
self.instance: FileInstance | None = None
s... | ["tests/test_fileset.py::TestRecordNode::test_root", "tests/test_fileset.py::TestRecordNode::test_leaf", "tests/test_fileset.py::TestRecordNode::test_add", "tests/test_fileset.py::TestRecordNode::test_key", "tests/test_fileset.py::TestRecordNode::test_key_raises", "tests/test_fileset.py::TestRecordNode::test_bad_record... | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 16 | 124 | 858 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196333 | 80.864 | |||
8,423 | swe_smith::train::20552 | swe_smith | train | 20,552 | tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__1ypcdjka | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | Parser returns undefined variable after recent changes
#### Description
The parser is returning an undefined variable `this` in the `_try_parse` method, causing `UnboundLocalError` exceptions across the codebase.
#### Steps/Code to Reproduce
```python
import sqlglot
# Any basic parsing operation fails
sql = "SELEC... | diff --git a/sqlglot/parser.py b/sqlglot/parser.py
index 248a128..d3b3ce1 100644
--- a/sqlglot/parser.py
+++ b/sqlglot/parser.py
@@ -1705,15 +1705,17 @@ class Parser(metaclass=_Parser):
)
def _try_parse(self, parse_method: t.Callable[[], T], retreat: bool = False) -> t.Optional[T]:
+
+ return thi... | ["tests/dialects/test_bigquery.py::TestBigQuery::test_bigquery", "tests/dialects/test_clickhouse.py::TestClickhouse::test_clickhouse", "tests/dialects/test_clickhouse.py::TestClickhouse::test_cte", "tests/dialects/test_clickhouse.py::TestClickhouse::test_grant", "tests/dialects/test_databricks.py::TestDatabricks::test_... | ["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 13 | 88 | 918 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196333 | 80.864 | |||
8,424 | swe_smith::train::14185 | swe_smith | train | 14,185 | python-openxml__python-docx.0cf6d71f.func_pm_ctrl_shuffle__2bkgkrhs | swesmith/python-openxml__python-docx.0cf6d71f | python-openxml/python-docx | python | null | ColorFormat.type property returns incorrect value due to undefined variable
#### Description
The `ColorFormat.type` property is broken and raises a `NameError` because it references an undefined variable `color` before it's defined.
#### Steps/Code to Reproduce
```python
from docx.dml.color import ColorFormat
# Cr... | diff --git a/src/docx/dml/color.py b/src/docx/dml/color.py
index d7ee0a2..d0af16d 100644
--- a/src/docx/dml/color.py
+++ b/src/docx/dml/color.py
@@ -72,6 +72,13 @@ class ColorFormat(ElementProxy):
@property
def type(self) -> MSO_COLOR_TYPE:
+ if color is None:
+ return None
+ if col... | ["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows... | ["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_RGB_value[rgb_get_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_RGB_value[rgb_get_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_RGB_value[rgb_get_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it... | jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f | true | null | 1 | 15 | 6 | 878 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196333 | 80.864 | |||
8,425 | swe_smith::train::9585 | swe_smith | train | 9,585 | marshmallow-code__webargs.dbde72fe.func_basic__296ug6rx | swesmith/marshmallow-code__webargs.dbde72fe | marshmallow-code/webargs | python | null | FlaskParser error handling passes wrong arguments to abort()
#### Description
When validation errors occur in FlaskParser, the error handling method incorrectly swaps the `exc` and `schema` parameters when calling Flask's `abort()` function. This causes the wrong objects to be passed to the abort handler.
#### Steps... | diff --git a/src/webargs/flaskparser.py b/src/webargs/flaskparser.py
index 278c4fa..8f62260 100644
--- a/src/webargs/flaskparser.py
+++ b/src/webargs/flaskparser.py
@@ -121,13 +121,14 @@ class FlaskParser(core.Parser[flask.Request]):
"""Handles errors during parsing. Aborts the current HTTP request and
... | ["tests/test_flaskparser.py::TestFlaskParser::test_parse_json_error_unexpected_int", "tests/test_flaskparser.py::TestFlaskParser::test_parse_json_error_unexpected_list", "tests/test_flaskparser.py::TestFlaskParser::test_parse_json_many_schema_invalid_input", "tests/test_flaskparser.py::TestFlaskParser::test_parse_json_... | ["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T... | jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe | true | null | 1 | 9 | 24 | 998 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196333 | 80.864 | |||
8,426 | swe_smith::train::38991 | swe_smith | train | 38,991 | pallets__jinja.ada0a9a6.func_basic__d8mm5oed | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | LoggingUndefined returns None instead of raising exception
#### Description
When using `make_logging_undefined()`, accessing undefined variables that should raise an `UndefinedError` now returns `None` instead of properly raising the exception.
#### Steps/Code to Reproduce
```python
from jinja2 import Environment
f... | diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py
index 9dcc9d4..f95a8b2 100644
--- a/src/jinja2/runtime.py
+++ b/src/jinja2/runtime.py
@@ -942,9 +942,9 @@ def make_logging_undefined(
) -> "te.NoReturn":
try:
super()._fail_with_undefined_error(*args, **kwargs)
- ... | ["tests/test_api.py::TestUndefined::test_logging_undefined"] | ["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",... | jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6 | true | null | 1 | 6 | 1 | 1,058 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196333 | 80.864 | |||
8,427 | r2e_gym::train::5876 | r2e_gym | train | 5,876 | tornado__6403cb91a06b9b629bd89e71249b2cae30ceb267 | tornado | tornadoweb/tornado | python | 6403cb91a06b9b629bd89e71249b2cae30ceb267 | **Title:** WebSocketHandler Accepts Non-Absolute URLs in Origin Header Instead of Rejecting Them
**Description:**
When initiating a WebSocket connection with a non-absolute URL in the `Origin` header, the server does not reject the request as expected. This behavior can lead to potential security vulnerabilities by al... | diff --git a/tornado/websocket.py b/tornado/websocket.py
--- a/tornado/websocket.py
+++ b/tornado/websocket.py
@@ -158,7 +158,7 @@
# If there was an origin header, check to make sure it matches
# according to check_origin. When the origin is None, we assume it
- # came from a browser and that... | diff --git a/tornado/test/websocket_test.py b/tornado/test/websocket_test.py
--- a/tornado/test/websocket_test.py
+++ b/tornado/test/websocket_test.py
@@ -160,7 +160,7 @@
self.assertEqual(reason, 'goodbye')
@gen_test
- def test_check_origin_valid(self):
+ def test_check_origin_valid_no_path(self):... | null | null | namanjain12/tornado_final:6403cb91a06b9b629bd89e71249b2cae30ceb267 | true | null | 1 | 28 | null | 1,330 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.315 | 80.86375 | ||
8,428 | r2e_gym::train::261 | r2e_gym | train | 261 | orange3__68c7dbe3fb7bc24e0a744a0bef96ec2925d7c9c5 | orange3 | biolab/orange3 | python | 68c7dbe3fb7bc24e0a744a0bef96ec2925d7c9c5 | **Title:** AttributeError When No File Is Selected: Missing `no_file_selected` in Information Messages
**Description:**
When attempting to load data without selecting a file, the system is expected to display a "No file selected" message. However, an error occurs because the `no_file_selected` attribute is missing fro... | diff --git a/Orange/widgets/data/owfile.py b/Orange/widgets/data/owfile.py
--- a/Orange/widgets/data/owfile.py
+++ b/Orange/widgets/data/owfile.py
@@ -121,6 +121,9 @@
domain_editor = SettingProvider(DomainEditor)
+ class Information(widget.OWWidget.Information):
+ no_file_selected = Msg("No file sele... | diff --git a/Orange/widgets/data/tests/test_owfile.py b/Orange/widgets/data/tests/test_owfile.py
--- a/Orange/widgets/data/tests/test_owfile.py
+++ b/Orange/widgets/data/tests/test_owfile.py
@@ -253,12 +253,14 @@
self.create_widget(OWFile, stored_settings={"recent_paths": []})
widget.Outputs.dat... | null | null | namanjain12/orange3_final:68c7dbe3fb7bc24e0a744a0bef96ec2925d7c9c5 | true | null | 1 | 28 | null | 1,330 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.315 | 80.86375 | ||
8,429 | swe_smith::train::28015 | swe_smith | train | 28,015 | jsvine__pdfplumber.02ff4313.func_pm_remove_loop__obetikox | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | PDF pages property returns empty list after initialization
#### Description
When accessing the `pages` property of a PDF object, it returns an empty list instead of the expected pages. This affects all page-related operations and causes IndexError when trying to access individual pages.
#### Steps/Code to Reproduce
... | diff --git a/pdfplumber/pdf.py b/pdfplumber/pdf.py
index 9c42bc2..8fa8f6f 100644
--- a/pdfplumber/pdf.py
+++ b/pdfplumber/pdf.py
@@ -159,16 +159,7 @@ class PDF(Container):
break
except Exception as e:
raise PdfminerException(e)
-
- for i, page in enumera... | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::test_invalid_crops", "tests/test_basics.py::Test::... | ["tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_loading_fileobj", "tests/test_basics.py::Test::test_loading_pathobj", "tests/test_basics.py::Test::test_metadata", "tests/test_convert.py::Test::test_cli_structure", "tests/test_issues.py::Test::test_issue_297", "tests/test_issues.py::Te... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 9 | 116 | 997 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196167 | 80.8635 | |||
8,430 | swe_smith::train::19117 | swe_smith | train | 19,117 | seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__kj6sfotg | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | Deep extract command fails with NameError when content is not defined
#### Description
The `deepdiff extract` command is broken and exits with an error when trying to extract values from files. The command appears to be trying to use an undefined variable.
#### Steps/Code to Reproduce
Create a simple YAML file and ... | diff --git a/deepdiff/commands.py b/deepdiff/commands.py
index e878bf2..2f2272f 100644
--- a/deepdiff/commands.py
+++ b/deepdiff/commands.py
@@ -210,6 +210,14 @@ def grep(item, path, debug, **kwargs):
@click.argument('path', type=click.Path(exists=True, resolve_path=True))
@click.option('--debug', is_flag=True, show_... | ["tests/test_command.py::TestCommands::test_command_extract"] | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 20 | 1 | 777 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196167 | 80.8635 | |||
8,431 | swe_smith::train::48277 | swe_smith | train | 48,277 | sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__ydfhkrnd | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | UnboundLocalError in wrap_field function when processing field labels
#### Description
The `wrap_field` function in `src/sqlfluff/cli/helpers.py` raises an `UnboundLocalError` when trying to access the `max_val_width` variable. The variable is referenced before it's defined, causing the function to fail.
#### Steps/... | diff --git a/src/sqlfluff/cli/helpers.py b/src/sqlfluff/cli/helpers.py
index d4af719..6b560b5 100644
--- a/src/sqlfluff/cli/helpers.py
+++ b/src/sqlfluff/cli/helpers.py
@@ -35,21 +35,19 @@ def wrap_elem(s: str, width: int) -> List[str]:
def wrap_field(
label: str, val: str, width: int, max_label_width: int = 10, ... | ["test/cli/helpers_test.py::test__cli__helpers__wrap_field_a", "test/cli/helpers_test.py::test__cli__helpers__wrap_field_b", "test/cli/helpers_test.py::test__cli__helpers__wrap_field_c"] | ["test/cli/helpers_test.py::test__cli__helpers__wrap_elem[abc-5-res0]", "test/cli/helpers_test.py::test__cli__helpers__pad_line", "test/cli/helpers_test.py::test_cli__helpers__lazy_sequence"] | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 15 | 3 | 877 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196167 | 80.8635 | |||
8,432 | swe_smith::train::58936 | swe_smith | train | 58,936 | bytedance__sonic.de4f017f.func_pm_remove_cond__i7ksdlha | swesmith/bytedance__sonic.de4f017f | bytedance/sonic | go | null | Map key assignment for uint64 causes nil pointer dereference
#### Description
When unmarshaling JSON with uint64 map keys, the decoder crashes with a nil pointer dereference. This appears to happen during map assignment operations where the generated assembly code is missing the actual assignment logic.
#### Steps/C... | diff --git a/internal/decoder/jitdec/assembler_regabi_amd64.go b/internal/decoder/jitdec/assembler_regabi_amd64.go
index 10f62309..63d60661 100644
--- a/internal/decoder/jitdec/assembler_regabi_amd64.go
+++ b/internal/decoder/jitdec/assembler_regabi_amd64.go
@@ -1630,12 +1630,7 @@ func (self *_Assembler) _asm_OP_map_ke... | ["TestUnmarshal", "TestAssembler_OpCode/_OP_map_key_u64"] | ["TestValid", "TestIdent", "TestCompatUnmarshalStd", "TestCompatEncoderStd", "TestCompatDecoderStd", "TestPretouch", "TestGet", "TestUnmarshalWithTrailingChars", "TestMarshal", "TestMarshalNumberZeroVal", "TestMarshalEmbeds", "TestUseNumber", "TestMarshalerError", "TestSortNodeTwitter", "TestNodeAny", "TestTypeCast2", ... | jyangballin/swesmith.x86_64.bytedance_1776_sonic.de4f017f | true | null | 1 | 7 | 2 | 1,037 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196167 | 80.8635 | |||
8,433 | swe_smith::train::4403 | swe_smith | train | 4,403 | pygments__pygments.27649ebb.func_pm_op_swap__zx5lkqqx | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | HTML formatter string interpolation broken
#### Description
The HTML formatter is producing a TypeError when trying to format code with full document output. The string formatting operation is failing because the operands are in the wrong order.
#### Steps/Code to Reproduce
```python
from pygments import highlight
... | diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py
index 3330c1d..0d5e684 100644
--- a/pygments/formatters/html.py
+++ b/pygments/formatters/html.py
@@ -639,19 +639,18 @@ class HtmlFormatter(Formatter):
err.strerror = 'Error writing CSS file: ' + err.strerror
raise
... | ["tests/test_html_formatter.py::test_external_css", "tests/test_html_formatter.py::test_valid_output", "tests/test_html_formatter.py::test_all_options", "tests/test_cmdline.py::test_O_opt", "tests/test_cmdline.py::test_P_opt"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 13 | 5 | 917 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196167 | 80.8635 | |||
8,434 | swe_smith::train::28013 | swe_smith | train | 28,013 | jsvine__pdfplumber.02ff4313.func_pm_remove_loop__lc9n3e28 | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | PDFStructTree.element_bbox() raises IndexError when no objects found
#### Description
When calling `element_bbox()` on a PDFStructTree element that has no associated objects, the method raises an `IndexError: No objects found` instead of handling the case gracefully.
#### Steps/Code to Reproduce
```python
import pd... | diff --git a/pdfplumber/structure.py b/pdfplumber/structure.py
index 88749d7..f301f0e 100644
--- a/pdfplumber/structure.py
+++ b/pdfplumber/structure.py
@@ -492,20 +492,6 @@ class PDFStructTree(Findable):
return bbox # type: ignore
else:
mcid_objs = []
- for page_numbe... | ["tests/test_structure.py::TestClass::test_element_bbox"] | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 16 | 1 | 856 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196 | 80.863 | |||
8,435 | swe_smith::train::19437 | swe_smith | train | 19,437 | seperman__deepdiff.ed252022.func_pm_remove_wrapper__0ddcknju | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | DeepDiff fails with NameError when comparing custom objects
#### Description
When comparing custom objects, DeepDiff raises a `NameError` because variables `t1` and `t2` are not defined in the `_diff_obj` method.
#### Steps/Code to Reproduce
```python
from deepdiff import DeepDiff
class CustomClass:
def __init... | diff --git a/deepdiff/diff.py b/deepdiff/diff.py
index 76f186b..803080a 100755
--- a/deepdiff/diff.py
+++ b/deepdiff/diff.py
@@ -445,24 +445,6 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base):
def _diff_obj(self, level, parents_ids=frozenset(), is_namedtuple=False, local_tree=None, is_pydanti... | ["tests/test_delta.py::TestDelta::test_delta_cases[delta_case12]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case13]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case14]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case14b_threshold_to_diff_deeper]", "tests/test_delta.py::TestDel... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 19 | 38 | 796 | 0 | 0.6 | 1 | 0.75 | 1 | 0.196 | 80.863 | |||
8,436 | swe_smith::train::52256 | swe_smith | train | 52,256 | pydicom__pydicom.7d361b3d.func_basic__w57my0zz | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | PN component validation logic inverted
#### Description
The validation for PN (Person Name) component length appears to be returning incorrect results. Valid PN components are being flagged as invalid, while invalid ones are being accepted.
#### Steps/Code to Reproduce
```python
from pydicom import DataElement
from... | diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py
index c81f96d..fec5793 100644
--- a/src/pydicom/valuerep.py
+++ b/src/pydicom/valuerep.py
@@ -258,12 +258,12 @@ def validate_pn_component_length(vr: str, value: Any) -> tuple[bool, str]:
-------
A tuple of a boolean validation result and the e... | ["tests/test_charset.py::TestCharset::test_bad_encoded_single_encoding_enforce_standard", "tests/test_charset.py::TestCharset::test_bad_decoded_multi_byte_encoding_enforce_standard", "tests/test_charset.py::TestCharset::test_unknown_escape_sequence_enforce_standard", "tests/test_charset.py::TestCharset::test_patched_ch... | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 6 | 8 | 1,055 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195833 | 80.8625 | |||
8,437 | swe_smith::train::3454 | swe_smith | train | 3,454 | pygments__pygments.27649ebb.combine_file__omjikohw | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | NemerleLexer initialization fails with OptionError
#### Description
The NemerleLexer class is throwing an OptionError during initialization, preventing it from being used for syntax highlighting. This affects both direct instantiation and automatic lexer detection.
#### Steps/Code to Reproduce
```python
from pygmen... | diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py
index cf8a5fe..e453aca 100644
--- a/pygments/lexers/dotnet.py
+++ b/pygments/lexers/dotnet.py
@@ -329,15 +329,13 @@ class NemerleLexer(RegexLexer):
}
def __init__(self, **options):
- level = get_choice_opt(options, 'unicodelevel',... | ["tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_options[NemerleLexer]", "tests/test_basic_api.py::test_random_input[NemerleLexer]", "tests/test_basic_api.py::test_lexer_classes[NemerleLexer]", "tests/examplefiles/aspx-vb/example2.aspx::", "tests/examplefiles/nemerle/nemerle_sample.n::"... | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 12 | 6 | 935 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195833 | 80.8625 | |||
8,438 | swe_smith::train::32090 | swe_smith | train | 32,090 | davidhalter__parso.338a5760.func_basic__yprwxqiv | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | Lambda parameter parsing broken after recent changes
#### Description
Lambda expressions with parameters are not being parsed correctly. The parameter extraction logic seems to be off by one, causing AttributeError when trying to access lambda node properties.
#### Steps/Code to Reproduce
```python
import parso
# ... | diff --git a/parso/python/tree.py b/parso/python/tree.py
index 0624e67..0c64e32 100644
--- a/parso/python/tree.py
+++ b/parso/python/tree.py
@@ -658,11 +658,11 @@ class Lambda(Function):
# We don't want to call the Function constructor, call its parent.
super(Function, self).__init__(children)
... | ["parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_dump_tree.py::test_dump_parser_tree_invalid_args", "test/test_dump_tree.py::test_eval_dump_recovers_parent", "test/test_normalizer_issues_files.py::test_normalizer_issue[E22.py]", "test/test_normalizer_issues_files.py::test_normalizer_issue[allowed_syntax.py]", "... | ["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_used_update[False-False]", "test/test_cache.p... | jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760 | true | null | 1 | 6 | 11 | 1,055 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195833 | 80.8625 | |||
8,439 | swe_smith::train::17815 | swe_smith | train | 17,815 | pyasn1__pyasn1.0f07d724.func_basic__xrxyg4uj | swesmith/pyasn1__pyasn1.0f07d724 | pyasn1/pyasn1 | python | null | Choice.getComponentByPosition returns wrong component when current index matches requested index
#### Description
When calling `getComponentByPosition` on a Choice object with an index that matches the current index, the method returns the wrong component or raises an IndexError.
#### Steps/Code to Reproduce
```pyt... | diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index 9aff5e6..3822cc3 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -3079,11 +3079,11 @@ class Choice(Set):
def getComponentByPosition(self, idx, default=noValue, instantiate=True):
__doc__ = Set.__doc__
- if self._currentIdx... | ["tests/codec/ber/test_encoder.py::ChoiceEncoderWithSchemaTestCase::testFilled", "tests/codec/cer/test_encoder.py::NestedOptionalChoiceEncoderTestCase::testOptionalWithDefault", "tests/codec/cer/test_encoder.py::NestedOptionalChoiceEncoderTestCase::testOptionalWithDefaultAndOptional", "tests/codec/cer/test_encoder.py::... | ["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d... | jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724 | true | null | 1 | 6 | 15 | 1,055 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195833 | 80.8625 | |||
8,440 | swe_smith::train::31909 | swe_smith | train | 31,909 | davidhalter__parso.338a5760.func_basic__9g4xknt8 | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | #### Description
Parser error handling broken after recent changes - AttributeError when processing syntax errors
#### Steps/Code to Reproduce
```python
import parso
# Try to parse some invalid Python code that should generate syntax errors
code = "*x = 2"
grammar = parso.load_grammar(version='3')
module = grammar.... | diff --git a/parso/python/errors.py b/parso/python/errors.py
index 09c5047..6758b05 100644
--- a/parso/python/errors.py
+++ b/parso/python/errors.py
@@ -248,15 +248,15 @@ def _any_fstring_error(version, node):
class _Context:
def __init__(self, node, add_syntax_error, parent_context=None):
- self.node = ... | ["parso/__init__.py::parso", "test/test_file_python_errors.py::test_on_itself[3.6]", "test/test_file_python_errors.py::test_on_itself[3.7]", "test/test_file_python_errors.py::test_on_itself[3.8]", "test/test_file_python_errors.py::test_on_itself[3.9]", "test/test_file_python_errors.py::test_on_itself[3.10]", "test/test... | ["parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_used_update[False-False]", "... | jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760 | true | null | 1 | 18 | 122 | 815 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195833 | 80.8625 | |||
8,441 | swe_smith::train::1037 | swe_smith | train | 1,037 | jd__tenacity.0d40e76f.combine_file__4gcf36bk | swesmith/jd__tenacity.0d40e76f | jd/tenacity | python | null | # retry_if_not_exception_type doesn't work as expected
I've found an issue with the `retry_if_not_exception_type` class. It seems to be retrying even when the exception type matches what should be excluded.
## Reproduction
Here's a minimal example to reproduce the issue:
```python
from tenacity import retry, retry_... | diff --git a/tenacity/retry.py b/tenacity/retry.py
index 9211631..9514b48 100644
--- a/tenacity/retry.py
+++ b/tenacity/retry.py
@@ -109,7 +109,7 @@ class retry_if_not_exception_type(retry_if_exception):
] = Exception,
) -> None:
self.exception_types = exception_types
- super().__init__(la... | ["tests/test_tenacity.py::TestDecoratorWrapper::test_retry_except_exception_of_type"] | ["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test... | jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f | true | null | 1 | 8 | 1 | 1,015 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195833 | 80.8625 | |||
8,442 | swe_smith::train::1070 | swe_smith | train | 1,070 | jd__tenacity.0d40e76f.combine_module__nbe3ab8d | swesmith/jd__tenacity.0d40e76f | jd/tenacity | python | null | AsyncRetrying iterator causes infinite recursion
#### Description
When trying to iterate over an AsyncRetrying object, it causes infinite recursion instead of raising a proper TypeError.
#### Steps/Code to Reproduce
```python
import asyncio
from tenacity.asyncio import AsyncRetrying
async def main():
retrying ... | diff --git a/tenacity/asyncio/__init__.py b/tenacity/asyncio/__init__.py
index a926091..2a8e828 100644
--- a/tenacity/asyncio/__init__.py
+++ b/tenacity/asyncio/__init__.py
@@ -75,14 +75,14 @@ class AsyncRetrying(BaseRetrying):
retry: "t.Union[SyncRetryBaseT, RetryBaseT]" = tenacity.retry_if_exception_type(),
... | ["tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_retry", "tests/test_asyncio.py::TestAsyncio::test_retry_using_async_retying", "tests/test_asyncio.py::TestContextManager::test_async_retying_iterator", "tests/test_asyncio.py::Test... | ["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::TestAsyncio::test_repr", "tests/test_asyncio.py::TestAsyncio::test_retry_attributes", "tests/test_asy... | jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f | true | null | 2 | 14 | 15 | 895 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195833 | 80.8625 | |||
8,443 | r2e_gym::train::6632 | r2e_gym | train | 6,632 | pillow__50e0c85380df60cf008fcde54ac92ce3bb1c78d6 | pillow | python-pillow/pillow | python | 50e0c85380df60cf008fcde54ac92ce3bb1c78d6 | **Title:** Saving Images with Small Palettes Causes Buffer Errors in BMP and Truncation in TGA Formats
**Description:**
When attempting to save images with small palettes using the BMP and TGA formats, unexpected errors occur. Specifically, saving a palette-based image with a limited number of colors leads to buffer s... | diff --git a/src/PIL/BmpImagePlugin.py b/src/PIL/BmpImagePlugin.py
--- a/src/PIL/BmpImagePlugin.py
+++ b/src/PIL/BmpImagePlugin.py
@@ -375,6 +375,16 @@
header = 40 # or 64 for OS/2 version 2
image = stride * im.size[1]
+ if im.mode == "1":
+ palette = b"".join(o8(i) * 4 for i in (0, 255))
+ el... | diff --git a/Tests/test_file_bmp.py b/Tests/test_file_bmp.py
--- a/Tests/test_file_bmp.py
+++ b/Tests/test_file_bmp.py
@@ -56,6 +56,18 @@
assert im.mode == reloaded.mode
assert im.size == reloaded.size
assert reloaded.format == "BMP"
+
+
+def test_small_palette(tmp_path):
+ im = Image.new(... | null | null | namanjain12/pillow_final:50e0c85380df60cf008fcde54ac92ce3bb1c78d6 | true | null | 2 | 31 | null | 1,267 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3145 | 80.86225 | ||
8,444 | swe_smith::train::48625 | swe_smith | train | 48,625 | mewwts__addict.75284f95.func_basic__e4m4u8rc | swesmith/mewwts__addict.75284f95 | mewwts/addict | python | null | Dict constructor fails to properly convert nested dictionaries
#### Description
When creating a Dict instance with nested dictionaries, the nested dictionaries are not being converted to Dict instances as expected. Additionally, accessing nested attributes returns None instead of creating new Dict instances.
#### St... | diff --git a/addict/addict.py b/addict/addict.py
index 55e02d1..6a7b12c 100644
--- a/addict/addict.py
+++ b/addict/addict.py
@@ -58,10 +58,10 @@ class Dict(dict):
@classmethod
def _hook(cls, item):
if isinstance(item, dict):
- return cls(item)
+ return item # Changed to return ... | ["test_addict.py::DictTests::test_delattr_nested", "test_addict.py::DictTests::test_delitem_nested", "test_addict.py::DictTests::test_getattr", "test_addict.py::DictTests::test_getitem", "test_addict.py::DictTests::test_hook_in_constructor", "test_addict.py::DictTests::test_init_from_zip", "test_addict.py::DictTests::t... | ["test_addict.py::DictTests::test_add_on_empty_dict", "test_addict.py::DictTests::test_add_on_non_empty_dict", "test_addict.py::DictTests::test_add_on_non_empty_value", "test_addict.py::DictTests::test_add_on_unsupported_type", "test_addict.py::DictTests::test_copy", "test_addict.py::DictTests::test_deepcopy", "test_ad... | jyangballin/swesmith.x86_64.mewwts_1776_addict.75284f95 | true | null | 1 | 6 | 45 | 1,054 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195667 | 80.862 | |||
8,445 | swe_smith::train::42157 | swe_smith | train | 42,157 | scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__l0bvsjl0 | swesmith/scanny__python-pptx.278b47b1 | scanny/python-pptx | python | null | Chart axis maximum scale property returns incorrect value
#### Description
When accessing the `maximum_scale` property on chart axes, the property returns an incorrect value due to a variable reference issue in the getter method.
#### Steps/Code to Reproduce
```python
from pptx import Presentation
from pptx.chart.d... | diff --git a/src/pptx/oxml/chart/axis.py b/src/pptx/oxml/chart/axis.py
index 7129810..f10441e 100644
--- a/src/pptx/oxml/chart/axis.py
+++ b/src/pptx/oxml/chart/axis.py
@@ -197,15 +197,14 @@ class CT_Scaling(BaseOxmlElement):
@property
def maximum(self):
+ if max is None:
+ return None
+ ... | ["tests/chart/test_axis.py::Describe_BaseAxis::it_knows_its_maximum_scale[maximum_scale_get_fixture0]", "tests/chart/test_axis.py::Describe_BaseAxis::it_knows_its_maximum_scale[maximum_scale_get_fixture1]", "tests/chart/test_axis.py::Describe_BaseAxis::it_knows_its_maximum_scale[maximum_scale_get_fixture2]", "tests/cha... | ["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr... | jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1 | true | null | 1 | 7 | 6 | 1,034 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195667 | 80.862 | |||
8,446 | swe_smith::train::46736 | swe_smith | train | 46,736 | python-trio__trio.cfbbe2c1.combine_module__imtwngmi | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | RunVar token reset fails with incorrect error when token is None
#### Description
When calling `RunVar.reset()` with a token that has been created incorrectly (specifically when `RunVarToken._empty()` creates a token with `None` instead of the proper variable reference), the reset operation fails with a confusing err... | diff --git a/src/trio/_core/_local.py b/src/trio/_core/_local.py
index fff1234..c5938f2 100644
--- a/src/trio/_core/_local.py
+++ b/src/trio/_core/_local.py
@@ -24,7 +24,7 @@ class RunVarToken(Generic[T], metaclass=NoPublicConstructor):
@classmethod
def _empty(cls, var: RunVar[T]) -> RunVarToken[T]:
- ... | ["src/trio/_core/_tests/test_local.py::test_runvar_resetting", "src/trio/_core/_tests/test_local.py::test_runvar_sync", "src/trio/_core/_tests/test_local.py::test_accessing_runvar_outside_run_call_fails", "src/trio/_core/_tests/test_run.py::test_cancel_scope_validation", "src/trio/_tests/test_timeouts.py::test_timeout_... | ["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 2 | 12 | 6 | 934 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195667 | 80.862 | |||
8,447 | swe_smith::train::27198 | swe_smith | train | 27,198 | tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__nkf8mczn | swesmith/tkrajina__gpxpy.09fc46b3 | tkrajina/gpxpy | python | null | get_track_points_no() returns undefined variable instead of track point count
#### Description
The `get_track_points_no()` method is returning an undefined variable `result` instead of calculating and returning the actual number of track points in the GPX file.
#### Steps/Code to Reproduce
```python
import gpxpy
#... | diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py
index 73e2024..4ad747e 100644
--- a/gpxpy/gpx.py
+++ b/gpxpy/gpx.py
@@ -2329,15 +2329,14 @@ class GPX:
yield point, track_no, segment_no, point_no
def get_track_points_no(self) -> int:
- """ Number of track points, *without* route and waypo... | ["test.py::GPXTests::test_clone_and_smooth", "test.py::GPXTests::test_horizontal_and_vertical_smooth_remove_extremes", "test.py::GPXTests::test_horizontal_smooth_remove_extremes", "test.py::GPXTests::test_moving_stopped_times", "test.py::GPXTests::test_reduce_by_min_distance", "test.py::GPXTests::test_reduce_gpx_file",... | ["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a... | jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3 | true | null | 1 | 9 | 7 | 993 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1955 | 80.8615 | |||
8,448 | swe_smith::train::36609 | swe_smith | train | 36,609 | lincolnloop__python-qrcode.456b01d4.func_basic__fo2w5rys | swesmith/lincolnloop__python-qrcode.456b01d4 | lincolnloop/python-qrcode | python | null | QRCode.clear() method breaks internal state causing AttributeError
#### Description
After calling the `clear()` method on a QRCode instance, subsequent operations fail with `AttributeError: 'NoneType' object has no attribute 'append'` or similar errors.
#### Steps/Code to Reproduce
```python
import qrcode
# Create... | diff --git a/qrcode/main.py b/qrcode/main.py
index 46116b5..434a6c4 100644
--- a/qrcode/main.py
+++ b/qrcode/main.py
@@ -127,10 +127,10 @@ class QRCode(Generic[GenericImage]):
"""
Reset the internal data.
"""
- self.modules = [[]]
- self.modules_count = 0
- self.data_cach... | ["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_add_qrdata", "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qr... | ["qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_make_image_with_wrong_pattern", "qrcode/tests/test_qrcode.py::test_mask_pattern_setter", "qrcode/tests/test_qrcode.py::test_qrcode_bad_factory", "qrcode/tests/test_qrcode.py::test... | jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4 | true | null | 1 | 8 | 64 | 1,013 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1955 | 80.8615 | |||
8,449 | swe_smith::train::55477 | swe_smith | train | 55,477 | RoaringBitmap__roaring.09c46a0a.func_pm_ctrl_invert_if__tvqiujl5 | swesmith/RoaringBitmap__roaring.09c46a0a | roaringbitmap/roaring | go | null | Bitmap.Flip() panics with slice bounds out of range when flipping empty ranges
#### Description
The `Flip()` method on bitmaps panics with a "slice bounds out of range [-1:]" error when attempting to flip certain ranges on empty or sparse bitmaps.
#### Steps/Code to Reproduce
```go
package main
import (
"githu... | diff --git a/roaring.go b/roaring.go
index 66f797e..2bc3577 100644
--- a/roaring.go
+++ b/roaring.go
@@ -1690,16 +1690,16 @@ func (rb *Bitmap) Flip(rangeStart, rangeEnd uint64) {
i := rb.highlowcontainer.getIndex(uint16(hb))
- if i >= 0 {
+ if i >= 0 { // *think* the range of ones must never be
+ // empty.
+... | ["TestFlip64"] | ["TestParAggregations", "TestParAggregations/par1", "TestParAggregations/par1/simple_case", "TestParAggregations/par1/aggregate_nothing", "TestParAggregations/par1/single_bitmap", "TestParAggregations/par1/empty_and_single_elem_bitmaps", "TestParAggregations/par1/two_single_elem_disjoint_sets", "TestParAggregations/par... | jyangballin/swesmith.x86_64.roaringbitmap_1776_roaring.09c46a0a | true | null | 1 | 8 | 1 | 1,013 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1955 | 80.8615 | |||
8,450 | swe_smith::train::43200 | swe_smith | train | 43,200 | gawel__pyquery.811cd048.func_pm_remove_assign__w2avmhhh | swesmith/gawel__pyquery.811cd048 | gawel/pyquery | python | null | PyQuery fails to parse HTML strings with UnboundLocalError
#### Description
When trying to create PyQuery objects from HTML strings, the library throws an `UnboundLocalError: local variable 'result' referenced before assignment`. This affects basic functionality like parsing HTML content.
#### Steps/Code to Reproduc... | diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py
index 5b05681..bc533c3 100644
--- a/pyquery/pyquery.py
+++ b/pyquery/pyquery.py
@@ -70,7 +70,7 @@ def fromstring(context, parser=None, custom_parser=None):
if hasattr(context, 'read') and hasattr(context.read, '__call__'):
meth = 'parse'
else:
- ... | ["README.rst::README.rst", "docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/manipulating.rst::manipulating.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselec... | ["pyquery/pyquery.py::pyquery.pyquery.PyQuery.__html__", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.__str__", "tests/test_pyquery.py::TestSelector::test_selector_from_doc", "tests/test_pyquery.py::TestOpener::test_open_filename", "tests/test_pyquery.py::TestConstruction::test_typeerror_on_invalid_value"] | jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048 | true | null | 1 | 6 | 145 | 1,053 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1955 | 80.8615 | |||
8,451 | swe_smith::train::20578 | swe_smith | train | 20,578 | tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__6kneqyly | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | TRIM function generates UnboundLocalError when using position parameter
#### Description
When using the TRIM function with a position parameter (LEADING, TRAILING, or BOTH), an UnboundLocalError is raised due to a variable being referenced before assignment.
#### Steps/Code to Reproduce
```python
import sqlglot
fro... | diff --git a/sqlglot/dialects/dialect.py b/sqlglot/dialects/dialect.py
index 019833f..1e47ba1 100644
--- a/sqlglot/dialects/dialect.py
+++ b/sqlglot/dialects/dialect.py
@@ -1408,22 +1408,21 @@ def count_if_to_sum(self: Generator, expression: exp.CountIf) -> str:
def trim_sql(self: Generator, expression: exp.Trim, ... | ["tests/dialects/test_dialect.py::TestDialect::test_trim"] | ["tests/dialects/test_dialect.py::TestDialect::test_alias", "tests/dialects/test_dialect.py::TestDialect::test_array", "tests/dialects/test_dialect.py::TestDialect::test_array_any", "tests/dialects/test_dialect.py::TestDialect::test_cast", "tests/dialects/test_dialect.py::TestDialect::test_cast_to_user_defined_type", "... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 9 | 1 | 993 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1955 | 80.8615 | |||
8,452 | swe_smith::train::29183 | swe_smith | train | 29,183 | tox-dev__pipdeptree.c31b6418.func_pm_ctrl_shuffle__z2bvsjch | swesmith/tox-dev__pipdeptree.c31b6418 | tox-dev/pipdeptree | python | null | UnboundLocalError in editable_project_location when direct_url is None
#### Description
When calling `dist_to_frozen_repr` on a distribution without a direct_url, an `UnboundLocalError` is raised because the `direct_url` variable is referenced before assignment.
#### Steps/Code to Reproduce
```python
from unittest.... | diff --git a/src/pipdeptree/_freeze.py b/src/pipdeptree/_freeze.py
index e6aea91..fbd9837 100644
--- a/src/pipdeptree/_freeze.py
+++ b/src/pipdeptree/_freeze.py
@@ -72,18 +72,17 @@ class PipBaseDistributionAdapter:
@property
def editable_project_location(self) -> str | None:
- direct_url = self.direc... | ["tests/test_freeze.py::test_dist_to_frozen_repr"] | ["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack... | jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418 | true | null | 1 | 9 | 1 | 993 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1955 | 80.8615 | |||
8,453 | swe_smith::train::13295 | swe_smith | train | 13,295 | python-openxml__python-docx.0cf6d71f.func_basic__77a3cnlm | swesmith/python-openxml__python-docx.0cf6d71f | python-openxml/python-docx | python | null | Content type lookup returns string instead of raising KeyError when partname not found
#### Description
When looking up a content type for a partname that doesn't exist in either overrides or defaults, the `_ContentTypeMap` class returns a formatted string instead of raising a `KeyError` as expected.
#### Steps/Code... | diff --git a/src/docx/opc/pkgreader.py b/src/docx/opc/pkgreader.py
index f00e7b5..0cc97e6 100644
--- a/src/docx/opc/pkgreader.py
+++ b/src/docx/opc/pkgreader.py
@@ -102,11 +102,11 @@ class _ContentTypeMap:
tmpl = "_ContentTypeMap key must be <type 'PackURI'>, got %s"
raise KeyError(tmpl % type... | ["tests/opc/test_pkgreader.py::Describe_ContentTypeMap::it_matches_an_override_on_case_insensitive_partname[match_override_fixture0]", "tests/opc/test_pkgreader.py::Describe_ContentTypeMap::it_matches_an_override_on_case_insensitive_partname[match_override_fixture1]", "tests/opc/test_pkgreader.py::Describe_ContentTypeM... | ["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows... | jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f | true | null | 1 | 8 | 9 | 1,012 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,454 | swe_smith::train::39854 | swe_smith | train | 39,854 | tornadoweb__tornado.d5ac65c1.func_pm_remove_assign__lm09mm5x | swesmith/tornadoweb__tornado.d5ac65c1 | tornadoweb/tornado | python | null | Subprocess initialization fails with NameError when using STREAM for stdout/stderr
#### Description
When creating a Subprocess with `stdout=Subprocess.STREAM` or `stderr=Subprocess.STREAM`, the initialization fails with a `NameError` because pipe variables are not properly defined.
#### Steps/Code to Reproduce
```p... | diff --git a/tornado/process.py b/tornado/process.py
index 339ef65..67953cf 100644
--- a/tornado/process.py
+++ b/tornado/process.py
@@ -223,19 +223,14 @@ class Subprocess:
kwargs["stdin"] = in_r
pipe_fds.extend((in_r, in_w))
to_close.append(in_r)
- self.stdin = PipeIOS... | ["test_close_stdin (tornado.test.process_test.SubprocessTest)", "test_sigchild_signal (tornado.test.process_test.SubprocessTest)", "test_stderr (tornado.test.process_test.SubprocessTest)", "test_subprocess (tornado.test.process_test.SubprocessTest)"] | ["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header... | jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1 | true | null | 1 | 7 | 4 | 1,032 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,455 | swe_smith::train::669 | swe_smith | train | 669 | oauthlib__oauthlib.1fd52536.func_basic__y8j5kml4 | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OAuth2Error.twotuples property returns empty list instead of error tuples
#### Description
The `twotuples` property of `OAuth2Error` class is returning an empty list instead of the expected error parameter tuples. This breaks error response formatting in OAuth2 endpoints.
#### Steps/Code to Reproduce
```python
from... | diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py
index 3b41574..bad1ddb 100644
--- a/oauthlib/oauth2/rfc6749/errors.py
+++ b/oauthlib/oauth2/rfc6749/errors.py
@@ -76,14 +76,14 @@ class OAuth2Error(Exception):
@property
def twotuples(self):
- error = [('error', self.e... | ["tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_error_catching", "tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_unavailability", "tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_wrapper", "tests/oauth2/rfc6749/endpoints/test_clie... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 10 | 64 | 972 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,456 | swe_smith::train::47106 | swe_smith | train | 47,106 | python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__5ud1gmiq | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | open_signal_receiver() doesn't raise TypeError when no signals provided
#### Description
When calling `open_signal_receiver()` without any signal arguments, it should raise a `TypeError` with the message "No signals were provided", but it's not working as expected.
#### Steps/Code to Reproduce
```python
import trio... | diff --git a/src/trio/_signals.py b/src/trio/_signals.py
index 729c48a..19179d1 100644
--- a/src/trio/_signals.py
+++ b/src/trio/_signals.py
@@ -130,6 +130,19 @@ def get_pending_signal_count(rec: AsyncIterator[int]) -> int:
def open_signal_receiver(
*signals: signal.Signals | int,
) -> Generator[AsyncIterator[in... | ["src/trio/_tests/test_signals.py::test_open_signal_receiver_empty_fail"] | ["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 1 | 28 | 1 | 612 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,457 | swe_smith::train::33371 | swe_smith | train | 33,371 | pallets__click.fde47b4b.combine_module__fh8h9nx2 | swesmith/pallets__click.fde47b4b | pallets/click | python | null | LazyFile returns None instead of file object after opening
#### Description
When using Click's LazyFile, the file object returns None after being opened instead of the actual file handle. This breaks file operations and causes AttributeError when trying to use file methods.
#### Steps/Code to Reproduce
```python
im... | diff --git a/src/click/shell_completion.py b/src/click/shell_completion.py
index c8655b1..6a96ed3 100644
--- a/src/click/shell_completion.py
+++ b/src/click/shell_completion.py
@@ -344,7 +344,7 @@ class BashComplete(ShellComplete):
return args, incomplete
def format_completion(self, item: CompletionItem... | ["tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_file_atomics", "tests/test_basic.py::test_file_option", "tests/test_context.py::test_global_context_object", "tests/test_shell_completion.py::test_full_complete[bash-env0-plain,a\\nplain,b\\n]", "tests/test_shell_completion.py::test_full_complet... | ["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs... | jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b | true | null | 2 | 10 | 9 | 972 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,458 | swe_smith::train::38052 | swe_smith | train | 38,052 | weaveworks__grafanalib.5c3b17ed.func_basic__6pfwkspm | swesmith/weaveworks__grafanalib.5c3b17ed | weaveworks/grafanalib | python | null | Dashboard generation fails with AttributeError when loading examples
#### Description
When trying to generate dashboards from example files, the dashboard generation process fails with an AttributeError. The issue appears to be related to how the dashboard loader handles file paths and output options.
#### Steps/Cod... | diff --git a/grafanalib/_gen.py b/grafanalib/_gen.py
index 4094edf..a5343ab 100644
--- a/grafanalib/_gen.py
+++ b/grafanalib/_gen.py
@@ -220,16 +220,15 @@ def generate_dashboard(args):
)
opts = parser.parse_args(args)
try:
- dashboard = loader(opts.dashboard)
- if not opts.output:
+ ... | ["grafanalib/tests/test_examples.py::test_examples"] | ["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_... | jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed | true | null | 1 | 13 | 1 | 912 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,459 | swe_smith::train::3583 | swe_smith | train | 3,583 | pygments__pygments.27649ebb.combine_module__2r5u04wx | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | Modula2Lexer fails with NameError on undefined variables
#### Description
The Modula2Lexer is throwing NameError exceptions for undefined variables `reswords_set`, `lexemes_to_reject_set`, and other variables that appear to be missing initialization.
#### Steps/Code to Reproduce
```python
from pygments.lexers impor... | diff --git a/pygments/lexers/fortran.py b/pygments/lexers/fortran.py
index 1a2b7f9..b512ae8 100644
--- a/pygments/lexers/fortran.py
+++ b/pygments/lexers/fortran.py
@@ -184,10 +184,10 @@ class FortranFixedLexer(RegexLexer):
def _lex_fortran(self, match, ctx=None):
"""Lex a line just as free form fortran w... | ["tests/test_basic_api.py::test_lexer_options[Modula2Lexer]", "tests/test_basic_api.py::test_lexer_classes[Modula2Lexer]", "tests/test_basic_api.py::test_random_input[Modula2Lexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_random_input[FortranFixedLexer]", "tests/examplefiles/modula2/... | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 2 | 18 | 10 | 812 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,460 | swe_smith::train::35710 | swe_smith | train | 35,710 | stanfordnlp__dspy.651a4c71.func_pm_remove_assign__llh6re3w | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # Synthesizer.save_data fails with NameError: name 'dataset' is not defined
## Description
I'm trying to save data from a Synthesizer object but getting an error. The `save_data` method doesn't work properly when trying to save to CSV or JSON formats.
## Steps to Reproduce
Here's a minimal example that reproduces t... | diff --git a/dspy/experimental/synthesizer/synthesizer.py b/dspy/experimental/synthesizer/synthesizer.py
index e1184c5..4e8d331 100644
--- a/dspy/experimental/synthesizer/synthesizer.py
+++ b/dspy/experimental/synthesizer/synthesizer.py
@@ -242,10 +242,6 @@ class Synthesizer:
from datasets import Dataset
-... | ["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"] | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 6 | 4 | 1,052 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,461 | swe_smith::train::39515 | swe_smith | train | 39,515 | pallets__jinja.ada0a9a6.func_pm_remove_cond__4daknao1 | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | Dot notation attribute access broken in templates
#### Description
Template parsing fails when using dot notation to access object attributes. The parser throws a "expected subscript expression" error for basic attribute access patterns.
#### Steps/Code to Reproduce
```python
from jinja2 import Environment
env = E... | diff --git a/src/jinja2/parser.py b/src/jinja2/parser.py
index 817abec..2bd46c1 100644
--- a/src/jinja2/parser.py
+++ b/src/jinja2/parser.py
@@ -803,18 +803,6 @@ class Parser:
) -> t.Union[nodes.Getattr, nodes.Getitem]:
token = next(self.stream)
arg: nodes.Expr
-
- if token.type == "dot":
... | ["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestStreaming::test_basic_streaming", "tests/test_api.py::TestStreaming::test_buffered_streaming", "tests/test_api.py::TestUndefined::test_stopiteration_is_undefined", "tests/test_api.py::TestUndefined::test_logging_undefined", "tests/t... | ["tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize", "tests/test_api.py::TestExtendedAPI::test_eval_finalize", "tes... | jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6 | true | null | 1 | 13 | 114 | 912 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,462 | swe_smith::train::27830 | swe_smith | train | 27,830 | jsvine__pdfplumber.02ff4313.func_pm_class_rm_funcs__lunb4h9t | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | Serializer fails to handle tuples and dicts properly
When trying to serialize PDF objects to JSON or CSV format, the serialization process fails because the `do_tuple` and `do_dict` methods have been removed from the Serializer class. This causes various conversion operations to break.
#### Steps/Code to Reproduce
`... | diff --git a/pdfplumber/convert.py b/pdfplumber/convert.py
index 9abfc87..36cb4c3 100644
--- a/pdfplumber/convert.py
+++ b/pdfplumber/convert.py
@@ -100,15 +100,6 @@ class Serializer:
def do_list(self, obj: List[Any]) -> List[Any]:
return list(self.serialize(x) for x in obj)
- def do_tuple(self, obj:... | ["tests/test_convert.py::Test::test_additional_attr_types", "tests/test_convert.py::Test::test_cli_csv", "tests/test_convert.py::Test::test_cli_csv_exclude", "tests/test_convert.py::Test::test_cli_csv_include", "tests/test_convert.py::Test::test_cli_json", "tests/test_convert.py::Test::test_csv", "tests/test_convert.py... | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 11 | 12 | 952 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195333 | 80.861 | |||
8,463 | r2e_gym::train::90 | r2e_gym | train | 90 | orange3__2177d800be69e51ab960fd598def408d33da746b | orange3 | biolab/orange3 | python | 2177d800be69e51ab960fd598def408d33da746b | **Title:** New FileFormat Instances Not Recognized by Save Widget Filters
**Description:**
When adding a new `FileFormat` subclass, such as `MockFormat`, the save widget fails to recognize it in the available filters. This prevents the widget from supporting the new file format, causing relevant tests to fail.
**Exam... | diff --git a/Orange/data/io.py b/Orange/data/io.py
--- a/Orange/data/io.py
+++ b/Orange/data/io.py
@@ -395,6 +395,8 @@
# the sort order in file open/save combo boxes. Lower is better.
PRIORITY = 10000
OPTIONAL_TYPE_ANNOTATIONS = False
+ SUPPORT_COMPRESSED = False
+ SUPPORT_SPARSE_DATA = False
... | diff --git a/Orange/widgets/data/tests/test_owsave.py b/Orange/widgets/data/tests/test_owsave.py
--- a/Orange/widgets/data/tests/test_owsave.py
+++ b/Orange/widgets/data/tests/test_owsave.py
@@ -8,7 +8,7 @@
from AnyQt.QtWidgets import QFileDialog
from Orange.data import Table
-from Orange.data.io import TabReader, ... | null | null | namanjain12/orange3_final:2177d800be69e51ab960fd598def408d33da746b | true | null | 2 | 33 | null | 1,224 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.314 | 80.86075 | ||
8,464 | swe_smith::train::21782 | swe_smith | train | 21,782 | life4__textdistance.c3aca916.combine_file__82j13usd | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | Normalized distance calculation returns incorrect values
#### Description
The normalized distance calculation is producing incorrect results. When comparing identical strings, the normalized distance should be 0, but it's returning 1 instead. Additionally, there are issues with division by zero errors occurring in va... | diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py
index 5ce8cc7..0abbba1 100644
--- a/textdistance/algorithms/base.py
+++ b/textdistance/algorithms/base.py
@@ -45,9 +45,9 @@ class Base:
"""Get distance from 0 to 1
"""
maximum = self.maximum(*sequences)
- if... | ["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati... | ["tests/test_common.py::test_normalization_range[alg21]", "tests/test_common.py::test_normalization_by_one[alg21]", "tests/test_common.py::test_normalization_same[alg21]", "tests/test_common.py::test_normalization_monotonic[alg21]", "tests/test_common.py::test_no_common_chars[alg1]", "tests/test_common.py::test_no_comm... | jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916 | true | null | 1 | 12 | 135 | 931 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195167 | 80.8605 | |||
8,465 | swe_smith::train::49097 | swe_smith | train | 49,097 | mozilla__bleach.73871d76.combine_file__5892ovtg | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | AttributeError when using html5lib etree treebuilder
#### Description
When using bleach with the html5lib etree treebuilder, various operations fail with AttributeError exceptions. The errors seem to be related to accessing properties and attributes on Element objects.
#### Steps/Code to Reproduce
```python
import ... | diff --git a/bleach/_vendor/html5lib/treebuilders/etree.py b/bleach/_vendor/html5lib/treebuilders/etree.py
index 5ccfc4d..15036a1 100644
--- a/bleach/_vendor/html5lib/treebuilders/etree.py
+++ b/bleach/_vendor/html5lib/treebuilders/etree.py
@@ -55,7 +55,7 @@ def getETreeBuilder(ElementTreeImplementation, fullTree=False... | ["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 16 | 183 | 851 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195167 | 80.8605 | |||
8,466 | swe_smith::train::4772 | swe_smith | train | 4,772 | bottlepy__bottle.a8dfef30.func_basic__dzcdqzqa | swesmith/bottlepy__bottle.a8dfef30 | bottlepy/bottle | python | null | FileUpload.save() creates files in wrong directory when destination is a directory
When using `FileUpload.save()` with a directory path as the destination, the file gets created in the wrong location due to incorrect path joining.
#### Steps/Code to Reproduce
```python
import tempfile
import os
from bottle import Fi... | diff --git a/bottle.py b/bottle.py
index 286b5bc..88c13b1 100755
--- a/bottle.py
+++ b/bottle.py
@@ -2777,13 +2777,13 @@ class FileUpload(object):
"""
if isinstance(destination, basestring): # Except file-likes here
if os.path.isdir(destination):
- destination = os.path.jo... | ["test/test_fileupload.py::TestFileUpload::test_save_dir", "test/test_fileupload.py::TestFileUpload::test_save_overwrite_lock"] | ["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"... | jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30 | true | null | 1 | 8 | 2 | 1,011 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195167 | 80.8605 | |||
8,467 | swe_smith::train::21402 | swe_smith | train | 21,402 | rubik__radon.54b88e58.func_basic__dsu0ajt8 | swesmith/rubik__radon.54b88e58 | rubik/radon | python | null | Harvester constructor swaps paths and config parameters
#### Description
The Harvester class constructor incorrectly assigns the `config` parameter to `self.paths` and the `paths` parameter to `self.config`, causing attribute errors when trying to access configuration values or iterate over file paths.
#### Steps/Co... | diff --git a/radon/cli/harvest.py b/radon/cli/harvest.py
index ac14fe5..ee2fcef 100644
--- a/radon/cli/harvest.py
+++ b/radon/cli/harvest.py
@@ -67,9 +67,9 @@ class Harvester(object):
*config* is a :class:`~radon.cli.Config` object holding the
configuration values specific to the Harvester.
'... | ["radon/tests/test_cli.py::test_encoding", "radon/tests/test_cli_harvest.py::test_base_iter_filenames", "radon/tests/test_cli_harvest.py::test_base_run", "radon/tests/test_cli_harvest.py::test_base_results", "radon/tests/test_cli_harvest.py::test_cc_gobble", "radon/tests/test_cli_harvest.py::test_cc_to_dicts", "radon/t... | ["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te... | jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58 | true | null | 1 | 6 | 16 | 1,051 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195167 | 80.8605 | |||
8,468 | swe_smith::train::51662 | swe_smith | train | 51,662 | pydicom__pydicom.7d361b3d.combine_module__yh7z9vr4 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | get_nr_frames returns 0 instead of 1 for NumberOfFrames=0
When a DICOM dataset has NumberOfFrames set to 0, the get_nr_frames function now returns 0 instead of the expected value of 1. This breaks existing behavior where 0 was treated the same as None and converted to 1.
#### Steps/Code to Reproduce
```python
from p... | diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py
index 10a4a93..302e866 100644
--- a/src/pydicom/pixels/common.py
+++ b/src/pydicom/pixels/common.py
@@ -322,10 +322,10 @@ class RunnerBase:
@property
def bits_stored(self) -> int:
"""Return the expected number of bits stored use... | ["tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_utils.py::TestGetNrFrames::test_none", "tests/pixels/test_utils.py::TestGetNrFrames::test_zero"] | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_set_number_of_frames", "tests/pixels/test_common.py::TestRunnerBase::tes... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 2 | 9 | 3 | 991 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195167 | 80.8605 | |||
8,469 | swe_smith::train::42260 | swe_smith | train | 42,260 | scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__y97by7p9 | swesmith/scanny__python-pptx.278b47b1 | scanny/python-pptx | python | null | Chart axis orientation property returns incorrect value when scaling orientation is None
#### Description
When accessing the `orientation` property on a chart axis element, if the scaling orientation is None, the property incorrectly tries to access `orientation.val` before checking if orientation exists, causing an ... | diff --git a/src/pptx/oxml/chart/axis.py b/src/pptx/oxml/chart/axis.py
index 7129810..a8ff938 100644
--- a/src/pptx/oxml/chart/axis.py
+++ b/src/pptx/oxml/chart/axis.py
@@ -30,16 +30,15 @@ class BaseAxisElement(BaseOxmlElement):
@property
def orientation(self):
+ if orientation is None:
+ ... | ["tests/chart/test_axis.py::Describe_BaseAxis::it_knows_whether_it_renders_in_reverse_order[reverse_order_get_fixture0]", "tests/chart/test_axis.py::Describe_BaseAxis::it_knows_whether_it_renders_in_reverse_order[reverse_order_get_fixture1]", "tests/chart/test_axis.py::Describe_BaseAxis::it_knows_whether_it_renders_in_... | ["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr... | jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1 | true | null | 1 | 9 | 4 | 991 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195167 | 80.8605 | |||
8,470 | swe_smith::train::5145 | swe_smith | train | 5,145 | agronholm__exceptiongroup.0b4f4937.func_basic__rpl2ko5w | swesmith/agronholm__exceptiongroup.0b4f4937 | agronholm/exceptiongroup | python | null | Exception formatting produces incorrect indentation and structure
#### Description
When formatting exception groups, the output shows incorrect indentation and structure. The exception group traceback appears to have wrong spacing and formatting that doesn't match the expected output format.
#### Steps/Code to Repro... | diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py
index 4c52d77..8e5e769 100644
--- a/src/exceptiongroup/_formatting.py
+++ b/src/exceptiongroup/_formatting.py
@@ -44,9 +44,9 @@ def _safe_string(value, what, func=str):
class _ExceptionPrintContext:
def __init__(self):
- s... | ["tests/test_formatting.py::test_exceptionhook", "tests/test_formatting.py::test_exceptiongroup_as_cause", "tests/test_formatting.py::test_exceptiongroup_loop", "tests/test_formatting.py::test_exceptionhook_format_exception_only", "tests/test_formatting.py::test_formatting_syntax_error", "tests/test_formatting.py::test... | ["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio... | jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937 | true | null | 1 | 6 | 16 | 1,051 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195167 | 80.8605 | |||
8,471 | swe_smith::train::26376 | swe_smith | train | 26,376 | pylint-dev__astroid.b114f6b5.func_pm_remove_assign__pipeg6zx | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | NameError in slice inference after removing infer_func definition
#### Description
When using `slice()` builtin function, astroid fails to infer the slice object and raises a `NameError: name 'infer_func' is not defined`.
#### Steps/Code to Reproduce
```python
import astroid
# This should work but raises NameError... | diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py
index a56b152..445abcc 100644
--- a/astroid/brain/brain_builtin_inference.py
+++ b/astroid/brain/brain_builtin_inference.py
@@ -696,8 +696,6 @@ def infer_slice(node, context: InferenceContext | None = None):
args = nod... | ["tests/test_inference.py::InferenceTest::test_unary_type_errors_for_non_instance_objects", "tests/test_inference.py::SliceTest::test_slice", "tests/test_inference.py::SliceTest::test_slice_attributes", "tests/test_inference.py::SliceTest::test_slice_inference_error", "tests/test_inference.py::SliceTest::test_slice_typ... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 11 | 6 | 951 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195167 | 80.8605 | |||
8,472 | swe_smith::train::47526 | swe_smith | train | 47,526 | sqlfluff__sqlfluff.50a1c4b6.combine_file__uykpc7sr | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | RawTemplater returns reversed string and incorrect error handling
#### Description
The RawTemplater is returning a reversed string instead of the original input string, and also incorrectly returns an error when it should process successfully.
#### Steps/Code to Reproduce
```python
from sqlfluff.core.templaters.bas... | diff --git a/src/sqlfluff/core/templaters/base.py b/src/sqlfluff/core/templaters/base.py
index fd043b6..9715d1e 100644
--- a/src/sqlfluff/core/templaters/base.py
+++ b/src/sqlfluff/core/templaters/base.py
@@ -266,19 +266,17 @@ class TemplatedFile:
line_number, line_position
"""
- if sourc... | ["test/core/templaters/base_test.py::test__templater_raw", "test/core/templaters/base_test.py::test__templated_file_get_line_pos_of_char_pos[tf_kwargs0-0-1-1]", "test/core/templaters/base_test.py::test__templated_file_get_line_pos_of_char_pos[tf_kwargs1-20-3-1]", "test/core/templaters/base_test.py::test__templated_file... | ["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 12 | 4 | 930 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195 | 80.86 | |||
8,473 | swe_smith::train::2763 | swe_smith | train | 2,763 | cknd__stackprinter.219fcc52.func_pm_remove_cond__2fhfquq2 | swesmith/cknd__stackprinter.219fcc52 | cknd/stackprinter | python | null | Tuple and set formatting broken after recent changes
#### Description
The formatting of tuples and sets is completely broken. When trying to format stack traces that contain tuples or sets, an `UnboundLocalError` is raised for local variable `item_str`.
#### Steps/Code to Reproduce
```python
import stackprinter
de... | diff --git a/stackprinter/prettyprinting.py b/stackprinter/prettyprinting.py
index 6e17f97..07e591e 100644
--- a/stackprinter/prettyprinting.py
+++ b/stackprinter/prettyprinting.py
@@ -126,14 +126,6 @@ def format_iterable(value, truncation, max_depth, depth):
prefix = '[' if type(value) == list else "%s [" % t... | ["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting"] | ["tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"] | jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52 | true | null | 1 | 17 | 2 | 830 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195 | 80.86 | |||
8,474 | swe_smith::train::26221 | swe_smith | train | 26,221 | pylint-dev__astroid.b114f6b5.func_pm_ctrl_invert_if__ayk3q5pz | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | __new__ and __subclasshook__ methods missing from builtin types
When inspecting builtin types, the `__new__` and `__subclasshook__` methods are not being properly attached to the class nodes. This causes inference issues when trying to access these special methods on builtin types.
#### Steps/Code to Reproduce
```py... | diff --git a/astroid/raw_building.py b/astroid/raw_building.py
index c1f7ec1..2df4403 100644
--- a/astroid/raw_building.py
+++ b/astroid/raw_building.py
@@ -532,13 +532,13 @@ class InspectBuilder:
modname = None
if modname is None:
if name in {"__new__", "__subclasshook__"}:
+ ... | ["tests/brain/test_brain.py::TypeBrain::test_builtin_subscriptable", "tests/brain/test_brain.py::TypingBrain::test_namedtuple_base", "tests/brain/test_brain.py::TypingBrain::test_namedtuple_few_args", "tests/brain/test_brain.py::TypingBrain::test_namedtuple_few_fields", "tests/brain/test_brain.py::TypingBrain::test_nam... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 7 | 29 | 1,030 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195 | 80.86 | |||
8,475 | swe_smith::train::28592 | swe_smith | train | 28,592 | encode__starlette.db5063c2.func_basic__gxkotld1 | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | WebSocket constructor fails with assertion error on websocket connections
#### Description
When creating a WebSocket instance with a websocket scope, the constructor raises an AssertionError. This breaks all websocket functionality.
#### Steps/Code to Reproduce
```python
from starlette.websockets import WebSocket
... | diff --git a/starlette/websockets.py b/starlette/websockets.py
index b7acaa3..ef4a6cc 100644
--- a/starlette/websockets.py
+++ b/starlette/websockets.py
@@ -25,9 +25,9 @@ class WebSocketDisconnect(Exception):
class WebSocket(HTTPConnection):
def __init__(self, scope: Scope, receive: Receive, send: Send) -> None:
... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_custom_middleware[trio]", "tests/test_applications.py::test_websocket_route[asyncio]", "tests/test_applications.py::test_websocket_raise_websocket_exception[asyncio]", "tests/test_applications.py::test_websocket_rais... | ["tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTT... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 6 | 119 | 1,050 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195 | 80.86 | |||
8,476 | swe_smith::train::5483 | swe_smith | train | 5,483 | PyCQA__flake8.cf1542ce.func_basic__swv5simh | swesmith/PyCQA__flake8.cf1542ce | pycqa/flake8 | python | null | Flake8 crashes with IndexError when processing certain Python files
#### Description
When running flake8 on certain Python files, it crashes with an IndexError related to token processing. The error seems to occur during the file checking phase when handling tokens and parentheses counting.
#### Steps/Code to Reprod... | diff --git a/src/flake8/checker.py b/src/flake8/checker.py
index 329a2cc..3cf8bb8 100644
--- a/src/flake8/checker.py
+++ b/src/flake8/checker.py
@@ -507,14 +507,14 @@ class FileChecker:
token_type, text = token[0:2]
if token_type == tokenize.OP:
parens = processor.count_parent... | ["tests/integration/test_main.py::test_form_feed_line_split", "tests/integration/test_main.py::test_benchmark_successful", "tests/integration/test_main.py::test_specific_noqa_does_not_clobber_pycodestyle_noqa", "tests/integration/test_main.py::test_physical_line_file_not_ending_in_newline", "tests/integration/test_main... | ["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.... | jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce | true | null | 1 | 10 | 9 | 970 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195 | 80.86 | |||
8,477 | swe_smith::train::48827 | swe_smith | train | 48,827 | facebookresearch__hydra.0f03eb60.func_pm_ctrl_shuffle__s3lq4kes | swesmith/facebookresearch__hydra.0f03eb60 | facebookresearch/hydra | python | null | NameError when calling hydra functions due to undefined variable reference
#### Description
When using hydra functions that internally call `detect_calling_file_or_module_from_stack_frame`, a `NameError` occurs because the code tries to access the `frame` variable before it's defined.
#### Steps/Code to Reproduce
`... | diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py
index 941efc5..85c46e1 100644
--- a/hydra/_internal/utils.py
+++ b/hydra/_internal/utils.py
@@ -64,15 +64,15 @@ def detect_calling_file_or_module_from_task_function(
def detect_calling_file_or_module_from_stack_frame(
stack_depth: int,
) -> Tuple[O... | ["tests/test_compose.py::test_initialize", "tests/test_compose.py::test_initialize_dev_version_base", "tests/test_compose.py::test_initialize_cur_version_base", "tests/test_compose.py::test_initialize_with_config_path", "tests/test_compose.py::TestComposeInits::test_initialize_ctx[None-overrides0-expected0]", "tests/te... | ["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[... | jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60 | true | null | 1 | 7 | 20 | 1,030 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195 | 80.86 | |||
8,478 | swe_smith::train::25770 | swe_smith | train | 25,770 | pylint-dev__astroid.b114f6b5.func_basic__ktma9l3g | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Await expressions return None instead of proper node
#### Description
When parsing async/await code, the `visit_await` method in the tree rebuilder is returning `None` instead of the proper `Await` node. This causes issues when trying to analyze or transform async code.
#### Steps/Code to Reproduce
```python
import... | diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py
index 4c77906..a086c6c 100644
--- a/astroid/rebuilder.py
+++ b/astroid/rebuilder.py
@@ -632,14 +632,14 @@ class TreeRebuilder:
def visit_await(self, node: ast.Await, parent: NodeNG) -> nodes.Await:
newnode = nodes.Await(
- lineno=node.l... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_mul... | ["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 12 | 24 | 930 | 0 | 0.6 | 1 | 0.75 | 1 | 0.195 | 80.86 | |||
8,479 | swe_smith::train::50829 | swe_smith | train | 50,829 | python-hyper__h11.bed0dd4a.func_basic__d23vm77p | swesmith/python-hyper__h11.bed0dd4a | python-hyper/h11 | python | null | validate function returns empty dict instead of raising LocalProtocolError
#### Description
The `validate` function in `h11/_util.py` is not working correctly - it returns an empty dictionary instead of raising a `LocalProtocolError` when validation fails.
#### Steps/Code to Reproduce
```python
import re
from h11._... | diff --git a/h11/_util.py b/h11/_util.py
index 6718445..783a2be 100644
--- a/h11/_util.py
+++ b/h11/_util.py
@@ -84,12 +84,13 @@ class RemoteProtocolError(ProtocolError):
def validate(
regex: Pattern[bytes], data: bytes, msg: str = "malformed data", *format_args: Any
) -> Dict[str, bytes]:
- match = regex.ful... | ["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_conne... | ["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_close_simple", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_connection.py::test_connection_drop", "h11/tests/test_connection.py::test_empty_request", "... | jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a | true | null | 1 | 9 | 34 | 989 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194833 | 80.8595 | |||
8,480 | swe_smith::train::3500 | swe_smith | train | 3,500 | pygments__pygments.27649ebb.combine_file__sqvdwen9 | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | SMLLexer class inheritance broken
#### Description
The SMLLexer class is missing its RegexLexer inheritance, causing it to fail when instantiated or used for syntax highlighting.
#### Steps/Code to Reproduce
```python
from pygments.lexers import SMLLexer
# This will fail
lexer = SMLLexer()
tokens = list(lexer.get_... | diff --git a/pygments/lexers/ml.py b/pygments/lexers/ml.py
index ff50c6f..ab3393a 100644
--- a/pygments/lexers/ml.py
+++ b/pygments/lexers/ml.py
@@ -17,7 +17,7 @@ from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
__all__ = ['SMLLexer', 'OcamlLexer', 'OpaLexer', 'ReasonLexer', 'FStarLexer']
... | ["tests/test_cmdline.py::test_C_opt", "tests/test_cmdline.py::test_stdin", "tests/test_basic_api.py::test_lexer_options[SMLLexer]", "tests/test_basic_api.py::test_random_input[SMLLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_classes[SMLLexer]", "tests/examplefiles/sml/intsyn.... | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 18 | 20 | 809 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194833 | 80.8595 | |||
8,481 | swe_smith::train::22000 | swe_smith | train | 22,000 | life4__textdistance.c3aca916.func_pm_ctrl_shuffle__s5yw553l | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | MLIPNS algorithm returns incorrect results due to variable reference error
#### Description
The MLIPNS similarity algorithm is throwing `UnboundLocalError` when called with any input sequences. This appears to be affecting all basic operations including empty strings, identical strings, and different strings.
#### S... | diff --git a/textdistance/algorithms/edit_based.py b/textdistance/algorithms/edit_based.py
index 0a6e02f..1f89e13 100644
--- a/textdistance/algorithms/edit_based.py
+++ b/textdistance/algorithms/edit_based.py
@@ -812,14 +812,13 @@ class MLIPNS(_BaseSimilarity):
return 1
def __call__(self, *sequences: Se... | ["tests/test_common.py::test_normalization_range[alg6]", "tests/test_common.py::test_normalization_by_one[alg6]", "tests/test_common.py::test_normalization_same[alg6]", "tests/test_common.py::test_normalization_monotonic[alg6]", "tests/test_common.py::test_no_common_chars[alg6]", "tests/test_common.py::test_empty[alg6]... | ["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati... | jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916 | true | null | 1 | 17 | 18 | 829 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194833 | 80.8595 | |||
8,482 | swe_smith::train::126 | swe_smith | train | 126 | oauthlib__oauthlib.1fd52536.combine_file__qwi5zr0u | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | RequestValidator methods return hardcoded values instead of raising NotImplementedError
#### Description
Several methods in the OpenID Connect RequestValidator class are returning hardcoded boolean values instead of raising NotImplementedError as expected. This breaks the contract that subclasses must implement these... | diff --git a/oauthlib/openid/connect/core/request_validator.py b/oauthlib/openid/connect/core/request_validator.py
index e3cea79..3697b89 100644
--- a/oauthlib/openid/connect/core/request_validator.py
+++ b/oauthlib/openid/connect/core/request_validator.py
@@ -183,7 +183,7 @@ class RequestValidator(OAuth2RequestValidat... | ["tests/openid/connect/core/test_request_validator.py::RequestValidatorTest::test_method_contracts"] | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 6 | 1 | 1,048 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194667 | 80.859 | |||
8,483 | swe_smith::train::16981 | swe_smith | train | 16,981 | prettytable__prettytable.ca90b055.combine_module__bc3ah3qb | swesmith/prettytable__prettytable.ca90b055 | prettytable/prettytable | python | null | CSV output broken when using fields parameter
#### Description
When using the `get_csv_string()` method with the `fields` parameter to select specific columns, the method raises a TypeError instead of returning the expected CSV output.
#### Steps/Code to Reproduce
```python
from prettytable import PrettyTable
# Cr... | diff --git a/src/prettytable/colortable.py b/src/prettytable/colortable.py
index 52e1fa2..65daa6c 100644
--- a/src/prettytable/colortable.py
+++ b/src/prettytable/colortable.py
@@ -116,20 +116,20 @@ class ColorTable(PrettyTable):
self._vertical_char = (
theme.vertical_color
- + theme.... | ["tests/test_colortable.py::TestColorTable::test_themeless", "tests/test_colortable.py::TestColorTableRendering::test_color_table_rendering[False-True]", "tests/test_colortable.py::TestColorTableRendering::test_color_table_rendering[True-True0]", "tests/test_colortable.py::TestColorTableRendering::test_color_table_rend... | ["tests/test_colortable.py::TestColorTable::test_theme_setter", "tests/test_colortable.py::TestFormatCode::test_basic", "tests/test_colortable.py::TestFormatCode::test_prefix", "tests/test_colortable.py::TestFormatCode::test_escapes", "tests/test_colortable.py::TestFormatCode::test_empty", "tests/test_colortable.py::Te... | jyangballin/swesmith.x86_64.prettytable_1776_prettytable.ca90b055 | true | null | 2 | 13 | 7 | 908 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194667 | 80.859 | |||
8,484 | swe_smith::train::38494 | swe_smith | train | 38,494 | amueller__word_cloud.ec24191c.func_pm_class_rm_funcs__6rkf81lk | swesmith/amueller__word_cloud.ec24191c | amueller/word_cloud | python | null | WordCloud.generate method missing after recent changes
#### Description
The `generate` method appears to have been removed from the WordCloud class, causing AttributeError when trying to use the basic functionality.
#### Steps/Code to Reproduce
```python
from wordcloud import WordCloud
# Basic usage that should wo... | diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py
index 1622c03..977741e 100644
--- a/wordcloud/wordcloud.py
+++ b/wordcloud/wordcloud.py
@@ -624,23 +624,6 @@ class WordCloud(object):
self.generate_from_frequencies(words)
return self
- def generate(self, text):
- """Generate wor... | ["test/test_wordcloud.py::test_collocations", "test/test_wordcloud.py::test_collocation_stopwords", "test/test_wordcloud.py::test_collocation_stopwords_uppercase", "test/test_wordcloud.py::test_plurals_numbers", "test/test_wordcloud.py::test_multiple_s", "test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.p... | ["test/test_wordcloud.py::test_stopwords_lowercasing", "test/test_wordcloud.py::test_check_errors", "test/test_wordcloud.py::test_single_color_func", "test/test_wordcloud.py::test_single_color_func_grey", "test/test_wordcloud.py::test_process_text", "test/test_wordcloud.py::test_process_text_default_patterns", "test/te... | jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c | true | null | 1 | 19 | 25 | 788 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194667 | 80.859 | |||
8,485 | swe_smith::train::11654 | swe_smith | train | 11,654 | andialbrecht__sqlparse.e57923b3.func_basic__07jpr8n3 | swesmith/andialbrecht__sqlparse.e57923b3 | andialbrecht/sqlparse | python | null | Comment grouping broken for single-line comments
#### Description
Single-line comments (both `--` and `#` style) are not being properly grouped or parsed, causing various operations to fail with `TypeError: unsupported operand type(s)` errors.
#### Steps/Code to Reproduce
```python
import sqlparse
from sqlparse imp... | diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py
index a63f4da..7924c60 100644
--- a/sqlparse/engine/grouping.py
+++ b/sqlparse/engine/grouping.py
@@ -314,12 +314,12 @@ def group_comments(tlist):
tidx, token = tlist.token_next_by(t=T.Comment)
while token:
eidx, end = tlist.token... | ["tests/test_format.py::TestFormat::test_strip_comments_multi", "tests/test_format.py::TestFormat::test_strip_comments_preserves_hint", "tests/test_grouping.py::test_grouping_identifier_list_with_inline_comments", "tests/test_regressions.py::test_issue26[--hello]", "tests/test_regressions.py::test_issue26[--hello\\n]",... | ["tests/test_cli.py::test_cli_main_empty", "tests/test_cli.py::test_parser_empty", "tests/test_cli.py::test_main_help", "tests/test_cli.py::test_valid_args", "tests/test_cli.py::test_invalid_choice", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfi... | jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3 | true | null | 1 | 8 | 10 | 1,008 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194667 | 80.859 | |||
8,486 | swe_smith::train::38124 | swe_smith | train | 38,124 | weaveworks__grafanalib.5c3b17ed.func_pm_ctrl_shuffle__urqgmdbj | swesmith/weaveworks__grafanalib.5c3b17ed | weaveworks/grafanalib | python | null | _balance_panels function breaks when panels have no span attribute
#### Description
The `_balance_panels` function in `core.py` fails with a `NameError` when trying to process panels. The function references variables that are defined after the return statement, making them unreachable.
#### Steps/Code to Reproduce
... | diff --git a/grafanalib/core.py b/grafanalib/core.py
index 79849fe..68e87b2 100644
--- a/grafanalib/core.py
+++ b/grafanalib/core.py
@@ -807,15 +807,14 @@ def to_y_axes(data):
def _balance_panels(panels):
"""Resize panels so they are evenly spaced."""
- allotted_spans = sum(panel.span if panel.span else 0 fo... | ["grafanalib/tests/test_grafanalib.py::test_auto_id", "grafanalib/tests/test_grafanalib.py::test_auto_refids_preserves_provided_ids", "grafanalib/tests/test_grafanalib.py::test_auto_refids"] | ["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_... | jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed | true | null | 1 | 9 | 3 | 988 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194667 | 80.859 | |||
8,487 | r2e_gym::train::5858 | r2e_gym | train | 5,858 | tornado__22a8c6efcf7d8d0fc8016344e99e4762da86b786 | tornado | tornadoweb/tornado | python | 22a8c6efcf7d8d0fc8016344e99e4762da86b786 | **Title:** `rotating_mode` Option Not Recognized When Enabling Timed Rotating Logging
**Description:**
When attempting to enable timed rotating mode for logging by setting the `rotating_mode` option to `'timed'`, the application raises an `AttributeError` indicating that the option is unrecognized.
**Example Code:**
... | diff --git a/tornado/log.py b/tornado/log.py
--- a/tornado/log.py
+++ b/tornado/log.py
@@ -190,10 +190,19 @@
logger = logging.getLogger()
logger.setLevel(getattr(logging, options.logging.upper()))
if options.log_file_prefix:
- channel = logging.handlers.RotatingFileHandler(
- filena... | diff --git a/tornado/test/log_test.py b/tornado/test/log_test.py
--- a/tornado/test/log_test.py
+++ b/tornado/test/log_test.py
@@ -24,6 +24,7 @@
import sys
import tempfile
import warnings
+import time
from tornado.escape import utf8
from tornado.log import LogFormatter, define_logging_options, enable_pretty_logg... | null | null | namanjain12/tornado_final:22a8c6efcf7d8d0fc8016344e99e4762da86b786 | true | null | 1 | 26 | null | 1,360 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.313333 | 80.85875 | ||
8,488 | swe_smith::train::1932 | swe_smith | train | 1,932 | agronholm__typeguard.b6a7e438.func_pm_remove_wrapper__e18ox76g | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | check_argument_types not performing type checking
#### Description
The `check_argument_types` function appears to be returning `True` without actually performing any type checking on function arguments. This means that functions decorated with type checking decorators or using manual type checking are not validating ... | diff --git a/src/typeguard/_functions.py b/src/typeguard/_functions.py
index ca21c14..085b8d7 100644
--- a/src/typeguard/_functions.py
+++ b/src/typeguard/_functions.py
@@ -133,19 +133,8 @@ def check_argument_types(
else:
raise exc
- try:
- check_type_internal(value, an... | ["tests/test_importhook.py::test_blanket_import", "tests/test_instrumentation.py::test_type_checked_func_error[typechecked]", "tests/test_instrumentation.py::test_type_checked_method[typechecked]", "tests/test_instrumentation.py::test_type_checked_classmethod[typechecked]", "tests/test_instrumentation.py::test_type_che... | ["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v... | jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438 | true | null | 1 | 11 | 38 | 947 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1945 | 80.8585 | |||
8,489 | swe_smith::train::10445 | swe_smith | train | 10,445 | paramiko__paramiko.23f92003.func_basic__frze1cef | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | Password authentication sends reversed password string
#### Description
When using password authentication, the password is being sent in reversed order to the server, causing authentication failures.
#### Steps/Code to Reproduce
```python
import paramiko
# Create SSH client
client = paramiko.SSHClient()
client.se... | diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py
index bc7f298..ffd8a14 100644
--- a/paramiko/auth_handler.py
+++ b/paramiko/auth_handler.py
@@ -1050,11 +1050,8 @@ class AuthOnlyHandler(AuthHandler):
def auth_password(self, username, password):
def finish(m):
- # Unnamed field... | ["tests/test_transport.py::ServiceRequestingTransportTest::test_channel_can_be_used_as_context_manager", "tests/test_transport.py::ServiceRequestingTransportTest::test_channel_exception", "tests/test_transport.py::ServiceRequestingTransportTest::test_channel_send_memoryview", "tests/test_transport.py::ServiceRequesting... | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 7 | 24 | 1,027 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1945 | 80.8585 | |||
8,490 | swe_smith::train::30593 | swe_smith | train | 30,593 | gweis__isodate.17cb25eb.func_pm_remove_assign__yw4z954x | swesmith/gweis__isodate.17cb25eb | gweis/isodate | python | null | NameError when parsing ISO dates with missing day component
#### Description
When parsing ISO date strings that don't include a day component, the `parse_date` function raises a `NameError: name 'day' is not defined` instead of properly handling the missing day value.
#### Steps/Code to Reproduce
```python
from iso... | diff --git a/src/isodate/isodates.py b/src/isodate/isodates.py
index aa432c5..e431f98 100644
--- a/src/isodate/isodates.py
+++ b/src/isodate/isodates.py
@@ -144,7 +144,7 @@ def parse_date(
@raise ValueError: if datestring can not be represented by datetime.date
"""
if yeardigits != 4:
- expanded =... | ["tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::test_parse[4-19850412-expected5-%Y%m%d]", "tests/test_date.py::test_parse[6-+001985-04-expected17-%Y-%m]", "tes... | ["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985102-expected6-%Y%j]", "tests/test_date.py::test_parse[4-1985-102-expected7-%Y-%j]", "tests/test_date.py::test_parse[4-1985W155-expected8-%YW%W%w]", "tests/test_date.py::test... | jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb | true | null | 1 | 7 | 16 | 1,027 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1945 | 80.8585 | |||
8,491 | swe_smith::train::49303 | swe_smith | train | 49,303 | mozilla__bleach.73871d76.func_basic__g2t4nhj2 | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | TreeBuilder initialization causes AttributeError in html5lib
#### Description
When using bleach's html5lib treebuilder, operations fail with `AttributeError: 'NoneType' object has no attribute` errors. This appears to be related to incorrect initialization of core TreeBuilder attributes.
#### Steps/Code to Reproduce... | diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py
index 2869da0..f5fac7e 100644
--- a/bleach/_vendor/html5lib/treebuilders/base.py
+++ b/bleach/_vendor/html5lib/treebuilders/base.py
@@ -185,13 +185,13 @@ class TreeBuilder(object):
self.openElements = []
... | ["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 8 | 183 | 1,007 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1945 | 80.8585 | |||
8,492 | swe_smith::train::51944 | swe_smith | train | 51,944 | pydicom__pydicom.7d361b3d.func_basic__eo0dnjby | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | PALETTE directory record creation returns None instead of record
#### Description
When creating a PALETTE directory record, the function returns `None` instead of the expected record dataset. This causes issues when working with Color Palette Storage SOP instances in file-sets.
#### Steps/Code to Reproduce
```pytho... | diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py
index 75976eb..a554aad 100644
--- a/src/pydicom/fileset.py
+++ b/src/pydicom/fileset.py
@@ -2541,13 +2541,13 @@ def _define_encap_doc(ds: Dataset) -> Dataset:
def _define_palette(ds: Dataset) -> Dataset:
"""Return a PALETTE directory record from `ds`.... | ["tests/test_fileset.py::TestRecordNode::test_key_raises", "tests/test_fileset.py::TestFileInstance::test_for_moving", "tests/test_fileset.py::TestFileSet::test_str", "tests/test_fileset.py::test_one_level_record[PALETTE-1.2.840.10008.5.1.4.39.1]"] | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 8 | 4 | 1,007 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1945 | 80.8585 | |||
8,493 | swe_smith::train::38390 | swe_smith | train | 38,390 | dbader__schedule.82a43db1.func_basic__9uwvq94b | swesmith/dbader__schedule.82a43db1 | dbader/schedule | python | null | Job scheduling broken - jobs return None instead of Job instance
#### Description
When scheduling jobs using the `do()` method, the method now returns `None` instead of the expected Job instance. This breaks method chaining and any code that expects to work with the returned job object.
#### Steps/Code to Reproduce
... | diff --git a/schedule/__init__.py b/schedule/__init__.py
index 8e12eeb..53575b0 100644
--- a/schedule/__init__.py
+++ b/schedule/__init__.py
@@ -653,15 +653,16 @@ class Job:
:return: The invoked job instance
"""
self.job_func = functools.partial(job_func, *args, **kwargs)
- functools.u... | ["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT... | ["test_schedule.py::SchedulerTests::test_misconfigured_job_wont_break_scheduler", "test_schedule.py::SchedulerTests::test_move_to_next_weekday_nextweek", "test_schedule.py::SchedulerTests::test_move_to_next_weekday_today", "test_schedule.py::SchedulerTests::test_move_to_next_weekday_tommorrow", "test_schedule.py::Sched... | jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1 | true | null | 1 | 9 | 73 | 987 | 0 | 0.6 | 1 | 0.75 | 1 | 0.1945 | 80.8585 | |||
8,494 | swe_bench::test::1197 | swe_bench | test | 1,197 | psf__requests-3738 | psf/requests | psf/requests | python | ca15d4808734c86801c8f3d80c9152c35a163dc3 | Requests v2.12.2 does not add parameters to URLs with schemes it does not understand.
Follows from #3734.
When we patched to ignore all unrecognised schemes instead of just those that didn't begin `http`, we stopped handling parameters for those URLs. This may break some more benign uses such as `http+unix`, which wan... | I should note that we have had this conversation with the docker-py folks before: see #1879.
Ultimately, there is a problem with how much people want us to understand URLs for non-standard HTTP schemes. People would like us to understand them enough to add query parameters, but not so much that we look for a hostnam... | diff --git a/requests/models.py b/requests/models.py
--- a/requests/models.py
+++ b/requests/models.py
@@ -347,9 +347,9 @@ def prepare_url(self, url, params):
url = url.lstrip()
# Don't do any URL preparation for non-HTTP schemes like `mailto`,
- # `data`, `http+unix` etc to work around excep... | diff --git a/tests/test_requests.py b/tests/test_requests.py
--- a/tests/test_requests.py
+++ b/tests/test_requests.py
@@ -2177,18 +2177,72 @@ def test_preparing_bad_url(self, url):
r.prepare()
@pytest.mark.parametrize(
- 'protocol, url',
+ 'input, expected',
(
- ("... | ["tests/test_requests.py::TestPreparingURLs::test_url_mutation[http+unix://%2Fvar%2Frun%2Fsocket/path-http+unix://%2fvar%2frun%2fsocket/path0]", "tests/test_requests.py::TestPreparingURLs::test_url_mutation[http+unix://%2Fvar%2Frun%2Fsocket/path-http+unix://%2fvar%2frun%2fsocket/path1]", "tests/test_requests.py::TestPr... | ["tests/test_requests.py::TestRequests::test_entry_points", "tests/test_requests.py::TestRequests::test_invalid_url[MissingSchema-hiwpefhipowhefopw]", "tests/test_requests.py::TestRequests::test_invalid_url[InvalidSchema-localhost:3128]", "tests/test_requests.py::TestRequests::test_invalid_url[InvalidSchema-localhost.l... | null | true | 2016-11-30T21:22:10Z | 1 | 6 | 4 | 846 | 0 | 0.8 | 1 | 0.55 | 1 | 0.161 | 80.858 | |
8,495 | swe_smith::train::35293 | swe_smith | train | 35,293 | alecthomas__voluptuous.a7a55f83.func_basic__lbvlyjfh | swesmith/alecthomas__voluptuous.a7a55f83 | alecthomas/voluptuous | python | null | Schema validation fails with TypeError when using sets or frozensets
#### Description
When validating data against schemas that contain sets or frozensets, a `TypeError: 'set' object is not reversible` error is raised instead of proper validation.
#### Steps/Code to Reproduce
```python
from voluptuous import Schema... | diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py
index cdeb514..3d6aa89 100644
--- a/voluptuous/schema_builder.py
+++ b/voluptuous/schema_builder.py
@@ -657,21 +657,22 @@ class Schema(object):
if not isinstance(data, type_):
raise er.Invalid('expected a %s' % type_n... | ["voluptuous/tests/tests.py::test_set_of_integers", "voluptuous/tests/tests.py::test_frozenset_of_integers", "voluptuous/tests/tests.py::test_set_of_integers_and_strings", "voluptuous/tests/tests.py::test_frozenset_of_integers_and_strings"] | ["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests.... | jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83 | true | null | 1 | 11 | 4 | 946 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194333 | 80.858 | |||
8,496 | swe_smith::train::51789 | swe_smith | train | 51,789 | pydicom__pydicom.7d361b3d.func_basic__6iz1mup7 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | Deprecated imports not raising ImportError when config._use_future is enabled
#### Description
When `config._use_future` is enabled, importing deprecated functions from `pydicom.pixel_data_handlers` and `pydicom.pixel_data_handlers.util` should raise `ImportError` but instead returns `None` or succeeds unexpectedly.
... | diff --git a/src/pydicom/pixel_data_handlers/util.py b/src/pydicom/pixel_data_handlers/util.py
index f968437..f995d36 100644
--- a/src/pydicom/pixel_data_handlers/util.py
+++ b/src/pydicom/pixel_data_handlers/util.py
@@ -98,28 +98,28 @@ _DEPRECATED_UTIL = {
def __getattr__(name: str) -> Any:
- if name in _DEPRE... | ["tests/test_handler_util.py::TestFuture::test_imports_raise"] | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 14 | 1 | 886 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194333 | 80.858 | |||
8,497 | swe_smith::train::47134 | swe_smith | train | 47,134 | python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__grsqeoxj | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | CancelScope.__repr__ raises UnboundLocalError when accessing variables
#### Description
The `__repr__` method of `CancelScope` is broken and raises an `UnboundLocalError` when trying to access local variables that are defined after they're used in the return statement.
#### Steps/Code to Reproduce
```python
import ... | diff --git a/src/trio/_core/_run.py b/src/trio/_core/_run.py
index bfb38f4..9345b69 100644
--- a/src/trio/_core/_run.py
+++ b/src/trio/_core/_run.py
@@ -684,12 +684,8 @@ class CancelScope:
del remaining_error_after_cancel_scope, value, _, exc
def __repr__(self) -> str:
- if self._cancel_s... | ["src/trio/_core/_tests/test_run.py::test_cancel_scope_repr", "src/trio/_core/_tests/test_run.py::test_cancel_scope_misnesting"] | ["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 1 | 17 | 2 | 825 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194167 | 80.8575 | |||
8,498 | swe_smith::train::44452 | swe_smith | train | 44,452 | pydata__patsy.a5d16484.func_pm_remove_cond__kqqpex2e | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | Index mismatch validation removed for outcome and predictor matrices
#### Description
When using `dmatrices()` with pandas DataFrames that have different indexes, the function no longer validates that the outcome and predictor matrices have compatible indexes. This allows mismatched data to be silently processed, pot... | diff --git a/patsy/highlevel.py b/patsy/highlevel.py
index 1af6ce8..c1f7d07 100644
--- a/patsy/highlevel.py
+++ b/patsy/highlevel.py
@@ -209,24 +209,11 @@ def _do_highlevel_design(formula_like, data, eval_env, NA_action, return_type):
assert isinstance(getattr(lhs, "design_info", None), DesignInfo)
... | ["patsy/test_highlevel.py::test_formula_likes"] | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 13 | 1 | 905 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194167 | 80.8575 | |||
8,499 | swe_smith::train::729 | swe_smith | train | 729 | oauthlib__oauthlib.1fd52536.func_pm_ctrl_invert_if__gnpjuq6l | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OAuth2 error handling broken when catch_errors is True
#### Description
When `catch_errors` is set to `True` on OAuth2 endpoints, exceptions are not being properly caught and handled. Instead of returning appropriate error responses, the exceptions are being raised directly, causing server errors.
#### Steps/Code to... | diff --git a/oauthlib/oauth2/rfc6749/endpoints/base.py b/oauthlib/oauth2/rfc6749/endpoints/base.py
index 987fac6..40fafce 100644
--- a/oauthlib/oauth2/rfc6749/endpoints/base.py
+++ b/oauthlib/oauth2/rfc6749/endpoints/base.py
@@ -97,6 +97,8 @@ def catch_errors_and_unavailability(f):
return {}, e.json, 503
... | ["tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_error_catching", "tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_wrapper", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_client_id_authentication", "tests/oauth2/r... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 6 | 9 | 1,045 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194167 | 80.8575 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.