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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,300 | swe_smith::train::19203 | swe_smith | train | 19,203 | seperman__deepdiff.ed252022.func_pm_remove_assign__5vx50vt9 | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | NameError when comparing iterables after recent changes
#### Description
Getting `NameError: name 'change_level' is not defined` when comparing certain iterables. This seems to affect various comparison scenarios including lists, generators, and other iterable types.
#### Steps/Code to Reproduce
```python
from deep... | diff --git a/deepdiff/diff.py b/deepdiff/diff.py
index 76f186b..e4126b3 100755
--- a/deepdiff/diff.py
+++ b/deepdiff/diff.py
@@ -892,17 +892,8 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base):
):
if self._count_diff() is StopIteration:
return # pragma: no co... | ["tests/test_command.py::TestCommands::test_diff_command[t1.toml-t2.toml-10.0.0.2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_... | ["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 | 13 | 117 | 1,103 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227167 | 80.9565 | |||
7,301 | swe_smith::train::20333 | swe_smith | train | 20,333 | gruns__furl.da386f68.func_pm_ctrl_shuffle__3opgaxjl | swesmith/gruns__furl.da386f68 | gruns/furl | python | null | Query.remove() raises UnboundLocalError when removing single key
#### Description
When calling `Query.remove()` with a single key parameter, an `UnboundLocalError` is raised because the `items` variable is referenced before assignment.
#### Steps/Code to Reproduce
```python
from furl import furl
# Create a query w... | diff --git a/furl/furl.py b/furl/furl.py
index cd6d710..abb2fc8 100644
--- a/furl/furl.py
+++ b/furl/furl.py
@@ -938,12 +938,17 @@ class Query(object):
return self
def remove(self, query):
+
+ for item in items:
+ if non_string_iterable(item) and len(item) == 2:
+ key, v... | ["tests/test_furl.py::TestQuery::test_remove", "tests/test_furl.py::TestFragment::test_remove", "tests/test_furl.py::TestFurl::test_remove"] | ["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_it... | jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68 | true | null | 1 | 21 | 3 | 943 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227167 | 80.9565 | |||
7,302 | swe_smith::train::52597 | swe_smith | train | 52,597 | pydicom__pydicom.7d361b3d.func_pm_remove_cond__obu1wg4l | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | CLI filespec parser no longer validates element syntax
#### Description
The CLI filespec parser is not properly validating element syntax anymore. Invalid element specifications that should raise `ArgumentTypeError` are now being processed without validation.
#### Steps/Code to Reproduce
```python
from pydicom.cli.... | diff --git a/src/pydicom/cli/main.py b/src/pydicom/cli/main.py
index 2f616ba..49d0fd6 100644
--- a/src/pydicom/cli/main.py
+++ b/src/pydicom/cli/main.py
@@ -142,13 +142,6 @@ def filespec_parser(filespec: str) -> list[tuple[Dataset, Any]]:
if prefix == "pydicom":
filename = pydicom_filename
- # Check ... | ["tests/test_cli.py::TestFilespec::test_syntax[extra:colon]", "tests/test_cli.py::TestFilespec::test_syntax[no_callable()]", "tests/test_cli.py::TestFilespec::test_syntax[BeamSequence[0]extra]", "tests/test_cli.py::TestFilespec::test_syntax[BeamSequence[x]]"] | ["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,203 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227167 | 80.9565 | |||
7,303 | r2e_gym::train::6655 | r2e_gym | train | 6,655 | pillow__ffcc0670381f91d6c70d74a059d8d2e296aac678 | pillow | python-pillow/pillow | python | ffcc0670381f91d6c70d74a059d8d2e296aac678 | **Title:** ICC Profile Metadata Handling Causes TypeError When Saving PNG Images
**Description:**
After recent updates to handle ICC profiles in TIFF metadata, saving images with ICC profiles as PNGs results in errors. Specifically, the ICC profile data is being treated as a tuple instead of bytes, leading to unexpect... | diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py
--- a/PIL/TiffImagePlugin.py
+++ b/PIL/TiffImagePlugin.py
@@ -544,8 +544,7 @@
self.tagtype[tag] = 2
if self.tagtype[tag] == 7 and bytes is not str:
- values = [value.encode("ascii", 'replace') if isinstance(v... | diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py
--- a/Tests/test_file_tiff.py
+++ b/Tests/test_file_tiff.py
@@ -287,7 +287,7 @@
ifd = TiffImagePlugin.ImageFileDirectory_v2()
data = b"abc"
ret = ifd.load_byte(data, legacy_api)
- self.assertEqual(ret, b"abc... | null | null | namanjain12/pillow_final:ffcc0670381f91d6c70d74a059d8d2e296aac678 | true | null | 3 | 59 | null | 895 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.345833 | 80.95625 | ||
7,304 | swe_smith::train::43705 | swe_smith | train | 43,705 | sloria__environs.73c372df.func_basic__sc451isu | swesmith/sloria__environs.73c372df | sloria/environs | python | null | Custom parser registration broken - allows overriding built-in parsers and stores parsers with wrong case
#### Description
When trying to register custom parsers using `add_parser()`, the method incorrectly allows overriding built-in parsers and stores parser names in lowercase, breaking the expected behavior.
#### ... | diff --git a/src/environs/__init__.py b/src/environs/__init__.py
index 00f6072..b10a629 100644
--- a/src/environs/__init__.py
+++ b/src/environs/__init__.py
@@ -576,12 +576,12 @@ class Env:
"""Register a new parser method with the name ``name``. ``func`` must
receive the input value for an environment... | ["tests/test_environs.py::TestCustomTypes::test_add_parser", "tests/test_environs.py::TestCustomTypes::test_cannot_override_built_in_parser", "tests/test_environs.py::TestCustomTypes::test_parser_for", "tests/test_environs.py::TestCustomTypes::test_parser_function_can_take_extra_arguments", "tests/test_environs.py::Tes... | ["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 | 8 | 9 | 1,202 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227 | 80.956 | |||
7,305 | swe_smith::train::44744 | swe_smith | train | 44,744 | mahmoud__glom.fb3c4e76.func_basic__h6cv91ae | swesmith/mahmoud__glom.fb3c4e76 | mahmoud/glom | python | null | Iter returns list instead of iterator
#### Description
The `Iter` class in glom's streaming module is returning a list instead of an iterator when used with `glomit()`. This breaks the expected streaming behavior and causes issues with iterator consumption.
#### Steps/Code to Reproduce
```python
from glom import gl... | diff --git a/glom/streaming.py b/glom/streaming.py
index 4da5fb5..4e89b6b 100644
--- a/glom/streaming.py
+++ b/glom/streaming.py
@@ -83,12 +83,12 @@ class Iter:
return ''.join(chunks)
def glomit(self, target, scope):
- iterator = self._iterate(target, scope)
+ iterator = self._iterate(scop... | ["glom/test/test_basic.py::test_ref", "glom/test/test_streaming.py::test_iter", "glom/test/test_streaming.py::test_filter", "glom/test/test_streaming.py::test_map", "glom/test/test_streaming.py::test_split_flatten", "glom/test/test_streaming.py::test_chunked", "glom/test/test_streaming.py::test_windowed", "glom/test/te... | ["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 | 8 | 13 | 1,202 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227 | 80.956 | |||
7,306 | swe_smith::train::35219 | swe_smith | train | 35,219 | alecthomas__voluptuous.a7a55f83.combine_file__smzgvtca | swesmith/alecthomas__voluptuous.a7a55f83 | alecthomas/voluptuous | python | null | # humanize_error function reverses error message content
## Description
The `humanize_error` function is displaying reversed content in error messages, making them difficult to read and understand.
## Code to reproduce:
```python
from voluptuous import Schema, MultipleInvalid
from voluptuous.humanize import humaniz... | diff --git a/voluptuous/humanize.py b/voluptuous/humanize.py
index eabfd02..d9b5a34 100644
--- a/voluptuous/humanize.py
+++ b/voluptuous/humanize.py
@@ -14,12 +14,12 @@ def _nested_getitem(
data: typing.Any, path: typing.List[typing.Hashable]
) -> typing.Optional[typing.Any]:
for item_index in path:
+ ... | ["voluptuous/tests/tests.py::test_humanize_error"] | ["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 | 14 | 1 | 1,082 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227 | 80.956 | |||
7,307 | swe_smith::train::11775 | swe_smith | train | 11,775 | andialbrecht__sqlparse.e57923b3.func_basic__ophiun70 | swesmith/andialbrecht__sqlparse.e57923b3 | andialbrecht/sqlparse | python | null | SQL formatting broken for INSERT VALUES statements
#### Description
When using `sqlparse.format()` with `reindent=True` on INSERT VALUES statements, the formatting produces incorrect output and raises TypeError exceptions.
#### Steps/Code to Reproduce
```python
import sqlparse
# Simple INSERT VALUES statement
sql ... | diff --git a/sqlparse/filters/reindent.py b/sqlparse/filters/reindent.py
index 7dc2b82..ef3f748 100644
--- a/sqlparse/filters/reindent.py
+++ b/sqlparse/filters/reindent.py
@@ -213,21 +213,21 @@ class ReindentFilter:
tlist.insert_before(end_idx, self.nl())
def _process_values(self, tlist):
- ... | ["tests/test_format.py::TestFormatReindent::test_insert_values", "tests/test_regressions.py::test_format_accepts_encoding"] | ["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 | 14 | 2 | 1,082 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227 | 80.956 | |||
7,308 | swe_smith::train::21670 | swe_smith | train | 21,670 | buriy__python-readability.40256f40.combine_file__yirqhpk6 | swesmith/buriy__python-readability.40256f40 | buriy/python-readability | python | null | HTML parsing fails with AttributeError when processing string input
#### Description
When processing HTML content as strings, the readability library throws an AttributeError during document parsing. This appears to affect the core functionality of extracting readable content from HTML.
#### Steps/Code to Reproduce
... | diff --git a/readability/htmls.py b/readability/htmls.py
index 87299f5..2458cdf 100644
--- a/readability/htmls.py
+++ b/readability/htmls.py
@@ -9,16 +9,15 @@ utf8_parser = lxml.html.HTMLParser(encoding="utf-8")
def build_doc(page):
- if isinstance(page, str):
+ if isinstance(page, bytes):
encoding ... | ["tests/test_article_only.py::TestArticleOnly::test_author_absent", "tests/test_article_only.py::TestArticleOnly::test_author_present", "tests/test_article_only.py::TestArticleOnly::test_best_elem_is_root_and_passing", "tests/test_article_only.py::TestArticleOnly::test_correct_cleanup", "tests/test_article_only.py::Tes... | ["tests/test_article_only.py::TestArticleOnly::test_many_repeated_spaces", "tests/test_article_only.py::TestArticleOnly::test_not_self_closing"] | jyangballin/swesmith.x86_64.buriy_1776_python-readability.40256f40 | true | null | 1 | 13 | 9 | 1,102 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227 | 80.956 | |||
7,309 | swe_smith::train::5071 | swe_smith | train | 5,071 | agronholm__exceptiongroup.0b4f4937.combine_file__5f69j6zc | swesmith/agronholm__exceptiongroup.0b4f4937 | agronholm/exceptiongroup | python | null | ExceptionGroup split method not handling matching subgroups correctly
#### Description
When using the `split` method on nested ExceptionGroups, matching subgroups are not being included in the result. The split operation appears to be dropping matched nested exception groups instead of preserving them in the matching... | diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py
index a4a7ace..d6bb9f3 100644
--- a/src/exceptiongroup/_exceptions.py
+++ b/src/exceptiongroup/_exceptions.py
@@ -65,10 +65,6 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]):
raise TypeError(f"argumen... | ["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tests/test_catch.py::test_catch_handler_raises", "tests/test_catch.py::test_bare_raise_in_handler", "tests/test_catch.py::test_catch_subclas... | ["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 | 15 | 41 | 1,062 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227 | 80.956 | |||
7,310 | swe_smith::train::43644 | swe_smith | train | 43,644 | cloudpipe__cloudpickle.6220b0ce.func_pm_ctrl_shuffle__zxt2olao | swesmith/cloudpipe__cloudpickle.6220b0ce | cloudpipe/cloudpickle | python | null | UnboundLocalError when pickling classes with property descriptors
#### Description
When attempting to pickle classes that contain property descriptors, cloudpickle raises an `UnboundLocalError` due to a variable being referenced before assignment in the `_class_getnewargs` function.
#### Steps/Code to Reproduce
```... | diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py
index 8c50ba1..765d96a 100644
--- a/cloudpickle/cloudpickle.py
+++ b/cloudpickle/cloudpickle.py
@@ -655,14 +655,12 @@ def _make_dict_items(obj, is_ordered=False):
def _class_getnewargs(obj):
+ if isinstance(__dict__, property):
+ type_k... | ["tests/cloudpickle_test.py::CloudPickleTest::test_NamedTuple", "tests/cloudpickle_test.py::CloudPickleTest::test_abc", "tests/cloudpickle_test.py::CloudPickleTest::test_abc_cache_not_pickled", "tests/cloudpickle_test.py::CloudPickleTest::test_abstracts", "tests/cloudpickle_test.py::CloudPickleTest::test_always_use_up_... | ["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/c... | jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce | true | null | 1 | 7 | 69 | 1,222 | 0 | 0.6 | 1 | 0.75 | 1 | 0.227 | 80.956 | |||
7,311 | swe_smith::train::1856 | swe_smith | train | 1,856 | agronholm__typeguard.b6a7e438.func_pm_ctrl_shuffle__2h0zx6a3 | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | AnnotationTransformer visit method causes UnboundLocalError
#### Description
The `AnnotationTransformer.visit()` method in `_transformer.py` has a logic error that causes `UnboundLocalError: local variable 'new_node' referenced before assignment` when processing certain AST nodes.
#### Steps/Code to Reproduce
```py... | diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py
index 25696a5..be47c03 100644
--- a/src/typeguard/_transformer.py
+++ b/src/typeguard/_transformer.py
@@ -347,16 +347,11 @@ class AnnotationTransformer(NodeTransformer):
self._level = 0
def visit(self, node: AST) -> Any:
- ... | ["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_suppression.py::test_contextmanager_typechecked", "tests/test_suppression.py::test_decorator_typechecked", "tests/test_transformer.py::test_arguments_only", "tests/test_transformer.py::test_return_only"... | ["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 | 15 | 123 | 1,061 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226833 | 80.9555 | |||
7,312 | swe_smith::train::23831 | swe_smith | train | 23,831 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__6dxr1cek | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | NorthOffsetFrame produces invalid latitude values for negative latitudes
#### Description
When using `NorthOffsetFrame` with coordinates that have negative latitude values, the transformation produces latitude values outside the valid range of -90 to 90 degrees, causing `ValueError` exceptions.
#### Steps/Code to Re... | diff --git a/sunpy/coordinates/offset_frame.py b/sunpy/coordinates/offset_frame.py
index 5497152..b651b7b 100644
--- a/sunpy/coordinates/offset_frame.py
+++ b/sunpy/coordinates/offset_frame.py
@@ -49,12 +49,12 @@ class NorthOffsetFrame:
lon = rep.lon
lat = rep.lat
if lat > 0*u.deg:
- ... | ["sunpy/coordinates/tests/test_offset_frame.py::test_null", "sunpy/coordinates/tests/test_offset_frame.py::test_transform", "sunpy/coordinates/tests/test_offset_frame.py::test_south_pole", "sunpy/coordinates/tests/test_offset_frame.py::test_cartesian"] | ["sunpy/coordinates/tests/test_offset_frame.py::test_error"] | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 8 | 4 | 1,201 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226833 | 80.9555 | |||
7,313 | swe_smith::train::22996 | swe_smith | train | 22,996 | graphql-python__graphene.82903263.lm_rewrite__wuaeexhu | swesmith/graphql-python__graphene.82903263 | graphql-python/graphene | python | null | # Required arguments cannot be deprecated
I noticed an issue with the error message when trying to create a required argument that is also deprecated. The error message is inconsistent with the assertion check.
When creating a required argument with a deprecation reason, the error message doesn't match the assertion ... | diff --git a/graphene/types/argument.py b/graphene/types/argument.py
index d9283c4..0dab8d7 100644
--- a/graphene/types/argument.py
+++ b/graphene/types/argument.py
@@ -42,30 +42,20 @@ class Argument(MountedType):
set if the argument is required (see spec).
"""
- def __init__(
- self,
- ... | ["graphene/types/tests/test_argument.py::test_to_arguments_required_deprecated"] | ["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i... | jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263 | true | null | 1 | 22 | 1 | 921 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226833 | 80.9555 | |||
7,314 | swe_smith::train::2086 | swe_smith | train | 2,086 | pdfminer__pdfminer.six.1a8bd2f7.func_basic__81uxm16o | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | PDFCIDFont initialization fails with KeyError when ToUnicode is missing
When processing PDF files with CID fonts that don't have a ToUnicode entry in their specification, the PDFCIDFont class throws a KeyError during initialization.
#### Steps/Code to Reproduce
```python
from pdfminer.pdffont import PDFCIDFont
from ... | diff --git a/pdfminer/pdffont.py b/pdfminer/pdffont.py
index e1df40c..e54313a 100644
--- a/pdfminer/pdffont.py
+++ b/pdfminer/pdffont.py
@@ -1050,23 +1050,23 @@ class PDFCIDFont(PDFFont):
strict: bool = settings.STRICT,
) -> None:
try:
- self.basefont = literal_name(spec["BaseFont"])
+... | ["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cid_range", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_highlevel_extracttext.py::TestExtractText::test_iss... | ["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 26 | 30 | 841 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226833 | 80.9555 | |||
7,315 | r2e_gym::train::5328 | r2e_gym | train | 5,328 | aiohttp__87342c791dfd4c916877ba3dffafb9345bb0491f | aiohttp | aio-libs/aiohttp | python | 87342c791dfd4c916877ba3dffafb9345bb0491f | **Title:** CancelledError in Cleanup Context Prevents Completion of Other Cleanup Contexts
**Description:**
When using multiple cleanup contexts in an application, raising an `asyncio.CancelledError` within one cleanup context prevents the remaining cleanup contexts from completing. This leads to incomplete cleanup an... | diff --git a/CHANGES/8908.bugfix.rst b/CHANGES/8908.bugfix.rst
--- a/CHANGES/8908.bugfix.rst
+++ b/CHANGES/8908.bugfix.rst
@@ -0,0 +1 @@
+Fixed ``CancelledError`` from one cleanup context stopping other contexts from completing -- by :user:`Dreamsorcerer`.
diff --git a/aiohttp/web_app.py b/aiohttp/web_app.py
--- a/aioh... | diff --git a/tests/test_web_app.py b/tests/test_web_app.py
--- a/tests/test_web_app.py
+++ b/tests/test_web_app.py
@@ -1,6 +1,6 @@
import asyncio
import gc
-from typing import AsyncIterator, Callable, Iterator, NoReturn
+from typing import AsyncIterator, Callable, Iterator, NoReturn, Type
from unittest import mock
... | null | null | namanjain12/aiohttp_final:87342c791dfd4c916877ba3dffafb9345bb0491f | true | null | 3 | 17 | null | 1,733 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3455 | 80.95525 | ||
7,316 | swe_bench::test::1367 | swe_bench | test | 1,367 | pylint-dev__pylint-8683 | pylint-dev/pylint | pylint-dev/pylint | python | aed3c080388a8dc1d44c1a14a5ed243233f77c1c | fail/warn on using parallel execution with custom plugins
According to documentation:
http://pylint.pycqa.org/en/latest/user_guide/run.html#parallel-execution
> There are some limitations in running checks in parallel in the current implementation. It is not possible to use custom plugins (i.e. --load-plugins option).... | Thanks for opening an issue @stanislavlevin I agree, we should communicate this better. I think we should check that it's still the case, and if so, we should add some runtime warnings to make it more obvious (or maybe raising an error when we detect custom plugins and the parallel mode).
Original ticket:
https://pagu... | diff --git a/pylint/lint/parallel.py b/pylint/lint/parallel.py
--- a/pylint/lint/parallel.py
+++ b/pylint/lint/parallel.py
@@ -52,6 +52,11 @@ def _worker_initialize(
_worker_linter.set_reporter(reporters.CollectingReporter())
_worker_linter.open()
+ # Re-register dynamic plugins, since the pool does not ... | diff --git a/tests/test_check_parallel.py b/tests/test_check_parallel.py
--- a/tests/test_check_parallel.py
+++ b/tests/test_check_parallel.py
@@ -14,10 +14,11 @@
from concurrent.futures import ProcessPoolExecutor
from concurrent.futures.process import BrokenProcessPool
from pickle import PickleError
+from typing im... | ["tests/test_check_parallel.py::TestCheckParallelFramework::test_worker_initialize_reregisters_custom_plugins"] | ["tests/test_check_parallel.py::TestCheckParallelFramework::test_worker_initialize", "tests/test_check_parallel.py::TestCheckParallelFramework::test_worker_initialize_with_package_paths", "tests/test_check_parallel.py::TestCheckParallelFramework::test_worker_initialize_pickling", "tests/test_check_parallel.py::TestChec... | null | true | 2023-05-13T21:02:16Z | 2 | 14 | 1 | 880 | 0 | 0.8 | 1 | 0.55 | 1 | 0.193333 | 80.955 | |
7,317 | swe_smith::train::2437 | swe_smith | train | 2,437 | pdfminer__pdfminer.six.1a8bd2f7.func_pm_ctrl_invert_if__y8h92tb1 | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | XMLConverter image export logic inverted when imagewriter is None
When using XMLConverter with no imagewriter configured, the image export logic is inverted. Images that should not have src attributes are getting them, and images that should have src attributes are missing them.
#### Steps/Code to Reproduce
```pytho... | diff --git a/pdfminer/converter.py b/pdfminer/converter.py
index 7563c7a..e551556 100644
--- a/pdfminer/converter.py
+++ b/pdfminer/converter.py
@@ -837,21 +837,20 @@ class XMLConverter(PDFConverter[AnyIO]):
self.write("<text>%s</text>\n" % item.get_text())
elif isinstance(item, LTImage):
... | ["tests/test_tools_pdf2txt.py::TestPdf2Txt::test_contrib_2b"] | ["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 11 | 1 | 1,140 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226667 | 80.955 | |||
7,318 | swe_smith::train::44393 | swe_smith | train | 44,393 | pydata__patsy.a5d16484.func_pm_op_swap__t7lotj7d | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | DesignMatrix repr() fails with TypeError on string formatting
#### Description
When calling `repr()` on a DesignMatrix object, a TypeError is raised due to incorrect string formatting in the pretty printing code.
#### Steps/Code to Reproduce
```python
import numpy as np
from patsy.design_info import DesignInfo, Des... | diff --git a/patsy/design_info.py b/patsy/design_info.py
index d94b97a..99862f5 100644
--- a/patsy/design_info.py
+++ b/patsy/design_info.py
@@ -1193,7 +1193,7 @@ class DesignMatrix(np.ndarray):
names = self.design_info.column_names
column_name_widths = [len(name) for name in names]
min_total... | ["patsy/design_info.py::test_design_matrix"] | ["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 | 21 | 1 | 940 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226667 | 80.955 | |||
7,319 | swe_smith::train::44308 | swe_smith | train | 44,308 | pydata__patsy.a5d16484.func_pm_ctrl_invert_if__yaevxc43 | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | CategoricalSniffer fails with AttributeError when processing _CategoricalBox with levels
#### Description
When using categorical data with predefined levels, the CategoricalSniffer encounters an AttributeError because it tries to access the `levels` attribute on `None`.
#### Steps/Code to Reproduce
```python
import... | diff --git a/patsy/categorical.py b/patsy/categorical.py
index c88ecd5..d53bd1d 100644
--- a/patsy/categorical.py
+++ b/patsy/categorical.py
@@ -192,11 +192,11 @@ class CategoricalSniffer(object):
# returns a bool: are we confident that we found all the levels?
if isinstance(data, _CategoricalBox):
... | ["patsy/build.py::test__examine_factor_types", "patsy/categorical.py::test_CategoricalSniffer", "patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_data_types", "patsy/test_build.py::test_NA_action", "patsy/test_build.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/builtins.py::test_... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 11 | 20 | 1,140 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226667 | 80.955 | |||
7,320 | swe_smith::train::35050 | swe_smith | train | 35,050 | pyutils__line_profiler.a646bf0f.func_pm_remove_assign__3gf2dfbv | swesmith/pyutils__line_profiler.a646bf0f | pyutils/line_profiler | python | null | kernprof crashes with NameError when using command line arguments
#### Description
When running kernprof with command line arguments, it fails with a NameError for undefined variables. The script crashes before it can properly execute the target Python file.
#### Steps/Code to Reproduce
Create a simple Python scrip... | diff --git a/kernprof.py b/kernprof.py
index 6b4aa2b..d17acfa 100755
--- a/kernprof.py
+++ b/kernprof.py
@@ -320,19 +320,13 @@ def main(args=None):
parser.add_argument('script', help='The python script file to run')
parser.add_argument('args', nargs='...', help='Optional script arguments')
- options = pa... | ["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_autoprofile.py::test_autoprofile_module", "tests/t... | ["tests/test_complex_case.py::test_complex_example_python_none", "tests/test_duplicate_functions.py::test_duplicate_function", "tests/test_explicit_profile.py::test_simple_explicit_nonglobal_usage", "tests/test_explicit_profile.py::test_explicit_profile_with_nothing", "tests/test_explicit_profile.py::test_explicit_prof... | jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f | true | null | 1 | 10 | 12 | 1,159 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2265 | 80.9545 | |||
7,321 | swe_smith::train::28691 | swe_smith | train | 28,691 | encode__starlette.db5063c2.func_basic__tsi7g6qj | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | WebSocket test client fails with AttributeError after initialization
#### Description
When using the WebSocket test client, all WebSocket operations fail with an AttributeError. The client appears to have swapped internal attributes during initialization, causing methods to be called on incorrect objects.
#### Steps... | diff --git a/starlette/testclient.py b/starlette/testclient.py
index 645ca10..3c004a6 100644
--- a/starlette/testclient.py
+++ b/starlette/testclient.py
@@ -93,13 +93,13 @@ class WebSocketTestSession:
scope: Scope,
portal_factory: _PortalFactoryType,
) -> None:
- self.app = app
- se... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_custom_middleware[trio]", "tests/middleware/test_errors.py::test_debug_not_http[asyncio]", "tests/middleware/test_errors.py::test_debug_not_http[trio]", "tests/test_applications.py::test_websocket_route[asyncio]", "t... | ["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 | 122 | 1,239 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2265 | 80.9545 | |||
7,322 | swe_smith::train::35092 | swe_smith | train | 35,092 | django__daphne.32ac73e1.combine_file__87mlss51 | swesmith/django__daphne.32ac73e1 | django/daphne | python | null | CLI argument parsing broken after recent changes
#### Description
The command line interface is failing to parse arguments correctly. When trying to run daphne with basic options like port specification, it's throwing ValueError about TCP binding.
#### Steps/Code to Reproduce
```python
from daphne.cli import Comman... | diff --git a/daphne/cli.py b/daphne/cli.py
index a036821..cf4ef6c 100755
--- a/daphne/cli.py
+++ b/daphne/cli.py
@@ -28,7 +28,7 @@ class CommandLineInterface:
def __init__(self):
self.parser = argparse.ArgumentParser(description=self.description)
self.parser.add_argument(
- "-p", "--po... | ["tests/test_cli.py::TestCLIInterface::testCLIBasics", "tests/test_cli.py::TestCLIInterface::testUnixSockets", "tests/test_cli.py::TestCLIInterface::test_custom_proxyhost", "tests/test_cli.py::TestCLIInterface::test_custom_proxyport", "tests/test_cli.py::TestCLIInterface::test_custom_servername", "tests/test_cli.py::Te... | ["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding... | jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1 | true | null | 1 | 20 | 7 | 959 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2265 | 80.9545 | |||
7,323 | swe_smith::train::24006 | swe_smith | train | 24,006 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__fo5rbp76 | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | Geomagnetic frame fails to load local IGRF files
#### Description
When using the Geomagnetic coordinate frame, the code attempts to download IGRF coefficient files from the internet even when local files are available in the package data directory. This causes failures when internet access is disabled or unavailable.... | diff --git a/sunpy/coordinates/frames.py b/sunpy/coordinates/frames.py
index 8e1efd5..4cb3759 100644
--- a/sunpy/coordinates/frames.py
+++ b/sunpy/coordinates/frames.py
@@ -905,19 +905,18 @@ class BaseMagnetic(SunPyBaseCoordinateFrame):
@property
def _igrf_file(self):
- if not self.magnetic_model.sta... | ["sunpy/coordinates/tests/test_frames.py::test_magnetic_model_default"] | ["sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args0-None]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args1-kwargs1]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args2-None]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args3-kwargs3]", "sunpy/coordinate... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 15 | 1 | 1,059 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2265 | 80.9545 | |||
7,324 | swe_smith::train::40036 | swe_smith | train | 40,036 | scanny__python-pptx.278b47b1.combine_file__9rs71lqx | swesmith/scanny__python-pptx.278b47b1 | scanny/python-pptx | python | null | Package loading fails with incorrect file type detection
#### Description
When trying to open PowerPoint files, the package reader incorrectly identifies file types and fails to load valid .pptx files. The issue appears to affect both zip files and directory-based packages.
#### Steps/Code to Reproduce
```python
fr... | diff --git a/src/pptx/opc/serialized.py b/src/pptx/opc/serialized.py
index 9236670..9ff02dd 100644
--- a/src/pptx/opc/serialized.py
+++ b/src/pptx/opc/serialized.py
@@ -44,7 +44,7 @@ class PackageReader(Container[bytes]):
instance.
"""
blob_reader, uri = self._blob_reader, partname.rels_uri
-... | ["tests/opc/test_serialized.py::DescribePackageReader::but_it_returns_None_when_the_part_has_no_rels", "tests/opc/test_serialized.py::DescribePackageWriter::it_can_write_a_content_types_stream", "tests/opc/test_serialized.py::DescribePackageWriter::it_can_write_a_pkg_rels_item", "tests/opc/test_serialized.py::Describe_... | ["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 | 20 | 8 | 959 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2265 | 80.9545 | |||
7,325 | swe_smith::train::20828 | swe_smith | train | 20,828 | tobymao__sqlglot.036601ba.func_pm_op_swap__ugimzzd9 | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | AttributeError in optimizer when processing lateral views and certain subqueries
#### Description
The optimizer is throwing an AttributeError when processing queries with lateral views and certain subquery patterns. The error occurs during the optimization process when trying to access attributes on None objects.
##... | diff --git a/sqlglot/optimizer/unnest_subqueries.py b/sqlglot/optimizer/unnest_subqueries.py
index dcb2f59..adc8b96 100644
--- a/sqlglot/optimizer/unnest_subqueries.py
+++ b/sqlglot/optimizer/unnest_subqueries.py
@@ -120,7 +120,7 @@ def unnest(select, parent_select, next_alias_name):
def decorrelate(select, parent_sel... | ["tests/test_optimizer.py::TestOptimizer::test_lateral_annotation", "tests/test_optimizer.py::TestOptimizer::test_optimize"] | ["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 | 2 | 1,218 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226333 | 80.954 | |||
7,326 | swe_smith::train::8278 | swe_smith | train | 8,278 | cantools__cantools.0c6a7871.lm_rewrite__il92f8hm | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | ### Bug Report: TypeError Not Raised in BaseConversion.factory
#### Description
It seems there's an issue with the `BaseConversion.factory` method where it does not raise a `TypeError` when expected. The method should raise a `TypeError` if non-numeric types are passed for `scale` and `offset`, but this is not happen... | diff --git a/src/cantools/database/conversion.py b/src/cantools/database/conversion.py
index 50fef4d..082be23 100644
--- a/src/cantools/database/conversion.py
+++ b/src/cantools/database/conversion.py
@@ -292,11 +292,8 @@ class NamedSignalConversion(BaseConversion):
)
-def _is_integer(value: Union[int, flo... | ["tests/test_conversion.py::TestConversions::test_base_conversion_factory"] | ["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 | 1 | 1,138 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226333 | 80.954 | |||
7,327 | swe_smith::train::40024 | swe_smith | train | 40,024 | scanny__python-pptx.278b47b1.combine_file__8ldxr2g1 | swesmith/scanny__python-pptx.278b47b1 | scanny/python-pptx | python | null | Category label returns None instead of empty string when label is None
#### Description
When a Category object has a None label, the `label` property now returns `None` instead of an empty string. This breaks existing code that expects string values.
#### Steps/Code to Reproduce
```python
from pptx.chart.data impor... | diff --git a/src/pptx/chart/data.py b/src/pptx/chart/data.py
index ec6a61f..0229711 100644
--- a/src/pptx/chart/data.py
+++ b/src/pptx/chart/data.py
@@ -581,7 +581,7 @@ class Category(object):
be a string, a number, or a datetime.date or datetime.datetime
object.
"""
- return self._lab... | ["tests/chart/test_data.py::DescribeCategories::it_knows_when_its_categories_are_numeric[are_numeric_fixture2]", "tests/chart/test_data.py::DescribeCategories::it_knows_when_its_categories_are_numeric[are_numeric_fixture3]", "tests/chart/test_data.py::DescribeCategories::it_knows_when_its_categories_are_numeric[are_num... | ["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 | 18 | 47 | 998 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226333 | 80.954 | |||
7,328 | swe_smith::train::46556 | swe_smith | train | 46,556 | python-trio__trio.cfbbe2c1.combine_file__3c4joxmg | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | UnboundedQueue methods return incorrect values after recent changes
#### Description
The UnboundedQueue class is behaving unexpectedly with several methods returning wrong values. The `qsize()` method reports incorrect queue sizes, `empty()` returns inverted boolean values, and async iteration fails completely.
####... | diff --git a/src/trio/_core/_unbounded_queue.py b/src/trio/_core/_unbounded_queue.py
index b9e7974..c3a1ffa 100644
--- a/src/trio/_core/_unbounded_queue.py
+++ b/src/trio/_core/_unbounded_queue.py
@@ -79,7 +79,7 @@ class UnboundedQueue(Generic[T]):
def qsize(self) -> int:
"""Returns the number of items ... | ["src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_basic", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_blocking", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_fairness", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_trivial_yields"] | ["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 | 8 | 4 | 1,197 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226167 | 80.9535 | |||
7,329 | r2e_gym::train::4597 | r2e_gym | train | 4,597 | numpy__c9d61533f0a5a40ec0a38c69e19615d375af166e | numpy | numpy/numpy | python | c9d61533f0a5a40ec0a38c69e19615d375af166e | **Title:** `np.linalg.norm` Raises TypeError When Using `keepdims` Argument
**Description:**
When attempting to use the `keepdims` parameter with `np.linalg.norm`, a `TypeError` is raised. The `keepdims` argument is intended to retain the reduced dimensions with size one, allowing the result to broadcast correctly aga... | diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py
--- a/numpy/linalg/linalg.py
+++ b/numpy/linalg/linalg.py
@@ -1921,7 +1921,7 @@
return result
-def norm(x, ord=None, axis=None):
+def norm(x, ord=None, axis=None, keepdims=False):
"""
Matrix or vector norm.
@@ -1942,6 +1942,11 @@
... | diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
--- a/numpy/linalg/tests/test_linalg.py
+++ b/numpy/linalg/tests/test_linalg.py
@@ -885,6 +885,48 @@
expected = [norm(B[:,:, k], ord=order) for k in range(B.shape[2])]
assert_almost_equal(n, expected)
+ def... | null | null | namanjain12/numpy_final:c9d61533f0a5a40ec0a38c69e19615d375af166e | true | null | 1 | 45 | null | 1,169 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.344833 | 80.95325 | ||
7,330 | swe_smith::train::29180 | swe_smith | train | 29,180 | tox-dev__pipdeptree.c31b6418.func_pm_ctrl_shuffle__vfnq7sgz | swesmith/tox-dev__pipdeptree.c31b6418 | tox-dev/pipdeptree | python | null | EnumAction initialization order causes NameError when default is not a string
#### Description
When using the EnumAction class with a non-string default value, a NameError occurs because the `choices` variable is referenced before it's defined.
#### Steps/Code to Reproduce
```python
from pipdeptree._cli import Enum... | diff --git a/src/pipdeptree/_cli.py b/src/pipdeptree/_cli.py
index 46a984a..07571ed 100644
--- a/src/pipdeptree/_cli.py
+++ b/src/pipdeptree/_cli.py
@@ -195,14 +195,11 @@ class EnumAction(Action):
help: str | None = None, # noqa: A002
metavar: str | None = None,
) -> None:
+
+ self._enum ... | ["tests/render/test_render.py::test_json_routing", "tests/render/test_render.py::test_json_tree_routing", "tests/render/test_render.py::test_mermaid_routing", "tests/render/test_render.py::test_grahpviz_routing", "tests/render/test_render.py::test_text_routing", "tests/test_cli.py::test_parser_default", "tests/test_cli... | ["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 | 13 | 41 | 1,096 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226 | 80.953 | |||
7,331 | swe_smith::train::32131 | swe_smith | train | 32,131 | davidhalter__parso.338a5760.func_pm_class_rm_funcs__iduicli0 | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | Module.get_used_names() method missing after recent changes
#### Description
The `get_used_names()` method on Module objects is no longer available, causing AttributeError when trying to access used names in parsed modules.
#### Steps/Code to Reproduce
```python
from parso import parse
source = '''
class Foo:
... | diff --git a/parso/python/tree.py b/parso/python/tree.py
index 0624e67..ac75aa0 100644
--- a/parso/python/tree.py
+++ b/parso/python/tree.py
@@ -385,10 +385,6 @@ class Module(Scope):
__slots__ = ('_used_names',)
type = 'file_input'
- def __init__(self, children):
- super().__init__(children)
- ... | ["test/test_old_fast_parser.py::test_carriage_return_splitting"] | ["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 | 29 | 1 | 776 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226 | 80.953 | |||
7,332 | swe_smith::train::3566 | swe_smith | train | 3,566 | pygments__pygments.27649ebb.combine_file__yw5ugh87 | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | get_choice_opt function raises OptionError for valid options
#### Description
The `get_choice_opt` function in `pygments.util` is incorrectly raising `OptionError` exceptions for valid option values that should be accepted.
#### Steps/Code to Reproduce
```python
from pygments.util import get_choice_opt
# This shou... | diff --git a/pygments/util.py b/pygments/util.py
index 83cf104..a6e81dc 100644
--- a/pygments/util.py
+++ b/pygments/util.py
@@ -43,11 +43,11 @@ def get_choice_opt(options, optname, allowed, default=None, normcase=False):
`allowed`, raise an error, otherwise return it.
"""
string = options.get(optname, d... | ["tests/test_util.py::test_guess_decode_from_terminal", "tests/test_util.py::test_getoptions", "tests/test_basic_api.py::test_lexer_options[TypstLexer]", "tests/test_basic_api.py::test_formatter_public_api[RawTokenFormatter]", "tests/test_basic_api.py::test_formatter_unicode_handling[RawTokenFormatter]", "tests/test_ba... | ["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 | 14 | 30 | 1,076 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226 | 80.953 | |||
7,333 | swe_smith::train::3541 | swe_smith | train | 3,541 | pygments__pygments.27649ebb.combine_file__wl6qr4oo | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | Lexer guessing broken for several languages
#### Description
The lexer guessing functionality is not working correctly for multiple languages. When trying to guess the lexer for various code samples, the wrong lexer is being returned.
#### Steps/Code to Reproduce
```python
from pygments.lexers import guess_lexer
#... | diff --git a/pygments/lexers/parsers.py b/pygments/lexers/parsers.py
index 2e0ae0c..7e9647d 100644
--- a/pygments/lexers/parsers.py
+++ b/pygments/lexers/parsers.py
@@ -206,7 +206,7 @@ class RagelEmbeddedLexer(RegexLexer):
}
def analyse_text(text):
- return '@LANG: indep' in text
+ return '@LA... | ["tests/test_cmdline.py::test_C_opt", "tests/examplefiles/treetop/metagrammar.treetop::", "tests/test_guess.py::test_guess_lexer_forth", "tests/test_guess.py::test_guess_lexer_gap", "tests/test_guess.py::test_guess_lexer_ezhil", "tests/test_guess.py::test_guess_carbon_lexer", "tests/test_guess.py::test_guess_lexer_brai... | ["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 | 6 | 14 | 1,236 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226 | 80.953 | |||
7,334 | swe_smith::train::8315 | swe_smith | train | 8,315 | cantools__cantools.0c6a7871.lm_rewrite__t6ovnoib | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | AttributeError: 'Message' object has no attribute 'sender'
Description
When generating C source code for a specific node using the `cantools` command, an AttributeError is raised indicating that the 'Message' object lacks a 'sender' attribute. This occurs when attempting to generate C source files for databases with ... | diff --git a/src/cantools/database/can/c_source.py b/src/cantools/database/can/c_source.py
index cf3c40e..c85c932 100644
--- a/src/cantools/database/can/c_source.py
+++ b/src/cantools/database/can/c_source.py
@@ -1406,9 +1406,15 @@ def _generate_structs(database_name: str,
return '\n'.join(structs)
-def _is_se... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_sender_node", "tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_sender_node_no_signal_encode_decode"] | ["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 | 12 | 2 | 1,116 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226 | 80.953 | |||
7,335 | swe_smith::train::28009 | swe_smith | train | 28,009 | jsvine__pdfplumber.02ff4313.func_pm_remove_loop__76toufka | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | Table extraction returns empty results after edge joining changes
#### Description
Table extraction is failing to return proper results, with many operations returning `None` or empty lists where they should return table data. This affects various table extraction methods including `extract_table()`, `find_table()`, ... | diff --git a/pdfplumber/table.py b/pdfplumber/table.py
index 0ba4445..3859b2e 100644
--- a/pdfplumber/table.py
+++ b/pdfplumber/table.py
@@ -52,19 +52,9 @@ def join_edge_group(
sorted_edges = list(sorted(edges, key=itemgetter(min_prop)))
joined = [sorted_edges[0]]
- for e in sorted_edges[1:]:
- la... | ["tests/test_basics.py::Test::test_outside_bbox", "tests/test_ca_warn_report.py::Test::test_edge_merging", "tests/test_ca_warn_report.py::Test::test_vertices", "tests/test_dedupe_chars.py::Test::test_extract_table", "tests/test_issues.py::Test::test_issue_140", "tests/test_nics_report.py::Test::test_plain", "tests/test... | ["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 | 10 | 11 | 1,156 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226 | 80.953 | |||
7,336 | swe_smith::train::20924 | swe_smith | train | 20,924 | tobymao__sqlglot.036601ba.func_pm_remove_assign__xhm6rwhf | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | NameError in planner when processing SQL queries with undefined variables
#### Description
When processing SQL queries, the planner is throwing `NameError` exceptions for undefined variables like `with_`, `from_`, `step`, `projections`, `operands`, `aggregations`, and `aggregate`. This appears to be affecting various... | diff --git a/sqlglot/planner.py b/sqlglot/planner.py
index 687bffb..cd55a80 100644
--- a/sqlglot/planner.py
+++ b/sqlglot/planner.py
@@ -94,7 +94,6 @@ class Step:
"""
ctes = ctes or {}
expression = expression.unnest()
- with_ = expression.args.get("with")
# CTEs break the mo... | ["tests/test_executor.py::TestExecutor::test_agg_order", "tests/test_executor.py::TestExecutor::test_aggregate_without_group_by", "tests/test_executor.py::TestExecutor::test_case_sensitivity", "tests/test_executor.py::TestExecutor::test_correlated_count", "tests/test_executor.py::TestExecutor::test_execute_callable", "... | ["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 | 18 | 16 | 996 | 0 | 0.6 | 1 | 0.75 | 1 | 0.226 | 80.953 | |||
7,337 | swe_smith::train::35704 | swe_smith | train | 35,704 | stanfordnlp__dspy.651a4c71.func_pm_remove_assign__ikw31wol | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # request_cache decorator fails with UnboundLocalError
## Description
I'm encountering an issue with the `request_cache` decorator in DSPy. When using this decorator, it fails with an `UnboundLocalError` because some variables are not properly defined.
## Steps to Reproduce
Here's a simple example that reproduces t... | diff --git a/dspy/clients/cache.py b/dspy/clients/cache.py
index d3bad50..977625b 100644
--- a/dspy/clients/cache.py
+++ b/dspy/clients/cache.py
@@ -207,19 +207,14 @@ def request_cache(
# caching.
modified_request = copy.deepcopy(kwargs[cache_arg_name])
else:
- ... | ["tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/caching/test_litellm_cache.py::test_lm_calls_are_cached_across_lm_instances", "tests/caching/test_litellm_cache.py::test_lm_calls_are_cached_in_memory_when_expected", "tests/caching/test_litellm_... | ["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_sync_call", "tests/adapters/test_json_adapter.py::test_json_adapter_async_call", "tests/adapters/test_json_adapter.py::test_js... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 12 | 26 | 1,115 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225833 | 80.9525 | |||
7,338 | swe_smith::train::3095 | swe_smith | train | 3,095 | Suor__funcy.207a7810.func_basic__dwzm0qqo | swesmith/Suor__funcy.207a7810 | suor/funcy | python | null | zip_dicts behavior changed with single dictionary argument
Description
The `zip_dicts` function now requires at least two arguments instead of one, and when called with dictionaries that don't have identical keys, it includes keys that are missing from some dictionaries with `None` values.
Steps/Code to Reproduce
`... | diff --git a/funcy/colls.py b/funcy/colls.py
index 6acfd53..d6bd37b 100644
--- a/funcy/colls.py
+++ b/funcy/colls.py
@@ -250,11 +250,11 @@ def zip_values(*dicts):
def zip_dicts(*dicts):
"""Yields tuples like (key, (val1, val2, ...))
for each common key in all given dicts."""
- if len(dicts) < 1:
- ... | ["tests/test_colls.py::test_zip_dicts"] | ["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_cal... | jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810 | true | null | 1 | 8 | 1 | 1,195 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225833 | 80.9525 | |||
7,339 | swe_smith::train::52320 | swe_smith | train | 52,320 | pydicom__pydicom.7d361b3d.func_basic__zbuxa88x | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | PersonName.from_named_components fails with TypeError when using bytes input
#### Description
When creating a PersonName using `from_named_components` with bytes input, the method raises a TypeError instead of properly handling the byte encoding.
#### Steps/Code to Reproduce
```python
from pydicom.valuerep import P... | diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py
index c81f96d..fe8c3cd 100644
--- a/src/pydicom/valuerep.py
+++ b/src/pydicom/valuerep.py
@@ -1829,23 +1829,19 @@ class PersonName:
disallowed_chars = ["\\", "=", "^"]
def standardize_encoding(val: str | bytes) -> bytes:
- # R... | ["tests/test_valuerep.py::TestPersonName::test_length", "tests/test_valuerep.py::TestPersonName::test_from_named_components", "tests/test_valuerep.py::TestPersonName::test_from_named_components_kr_from_bytes", "tests/test_valuerep.py::TestPersonName::test_from_named_components_kr_from_unicode", "tests/test_valuerep.py:... | ["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 | 18 | 9 | 995 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225833 | 80.9525 | |||
7,340 | swe_smith::train::23287 | swe_smith | train | 23,287 | adrienverge__yamllint.8513d9b9.func_pm_remove_cond__x5ay0twm | swesmith/adrienverge__yamllint.8513d9b9 | adrienverge/yamllint | python | null | Config validation removed causing AttributeError on invalid ignore patterns
#### Description
When providing invalid ignore patterns in yamllint config, the tool now crashes with AttributeError instead of showing a proper error message.
#### Steps/Code to Reproduce
Create a config file with invalid ignore pattern:
... | diff --git a/yamllint/config.py b/yamllint/config.py
index 9ce6254..86b4515 100644
--- a/yamllint/config.py
+++ b/yamllint/config.py
@@ -78,9 +78,6 @@ class YamlLintConfig:
except Exception as e:
raise YamlLintConfigError(f'invalid config: {e}') from e
- if not isinstance(conf, dict):
- ... | ["tests/test_cli.py::CommandLineTestCase::test_run_list_files", "tests/test_cli.py::CommandLineTestCase::test_run_with_empty_config", "tests/test_config.py::SimpleConfigTestCase::test_invalid_ignore", "tests/test_config.py::SimpleConfigTestCase::test_invalid_yaml_files", "tests/test_config.py::ExtendedConfigTestCase::t... | ["tests/rules/test_anchors.py::AnchorsTestCase::test_disabled", "tests/rules/test_anchors.py::AnchorsTestCase::test_forbid_duplicated_anchors", "tests/rules/test_anchors.py::AnchorsTestCase::test_forbid_undeclared_aliases", "tests/rules/test_anchors.py::AnchorsTestCase::test_forbid_unused_anchors", "tests/rules/test_br... | jyangballin/swesmith.x86_64.adrienverge_1776_yamllint.8513d9b9 | true | null | 1 | 18 | 8 | 995 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225833 | 80.9525 | |||
7,341 | swe_smith::train::27029 | swe_smith | train | 27,029 | tkrajina__gpxpy.09fc46b3.func_basic__snfgteug | swesmith/tkrajina__gpxpy.09fc46b3 | tkrajina/gpxpy | python | null | IndexError when accessing waypoint extensions after parsing GPX file
#### Description
When parsing a GPX file with extensions and trying to access waypoint extensions using index 1, an IndexError is raised indicating the list index is out of range.
#### Steps/Code to Reproduce
```python
import gpxpy
# Load a GPX f... | diff --git a/test.py b/test.py
index 7dd6f44..dfd400d 100644
--- a/test.py
+++ b/test.py
@@ -3150,32 +3150,32 @@ class GPXTests(mod_unittest.TestCase):
root1.attrib[namespace+'jjj'] = 'kkk'
root2 = mod_etree.Element(namespace + 'ccc')
- root2.text = ''
- root2.tail = ''
+ root2.... | ["test.py::GPXTests::test_read_extensions"] | ["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 | 22 | 1 | 915 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225833 | 80.9525 | |||
7,342 | r2e_gym::train::4691 | r2e_gym | train | 4,691 | numpy__e7de401f5c9634a2a63eb8f44f2193be1a946191 | numpy | numpy/numpy | python | e7de401f5c9634a2a63eb8f44f2193be1a946191 | **Title:** `numpy.flip` Function Missing, Causes AttributeError When Flipping Arrays
**Description:**
Attempting to use the `numpy.flip` function to reverse the order of elements in an array along a specified axis results in an `AttributeError`. This prevents developers from easily flipping arrays beyond the existing... | diff --git a/doc/release/1.12.0-notes.rst b/doc/release/1.12.0-notes.rst
--- a/doc/release/1.12.0-notes.rst
+++ b/doc/release/1.12.0-notes.rst
@@ -99,6 +99,12 @@
to the returned array is expected to avoid accidental
unpredictable writes.
+Generalized ``flip``
+~~~~~~~~~~~~~~~~~~~~
+``flipud`` and ``fliplr`` reverse... | diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -21,6 +21,89 @@
)
from numpy.compat import long
+
+
+def get_mat(n):
+ data = np.arange(n)
+ data = np.add.outer(data, data)
+ ... | null | null | namanjain12/numpy_final:e7de401f5c9634a2a63eb8f44f2193be1a946191 | true | null | 4 | 89 | null | 999 | 0 | 0.75 | 1 | 0.75 | 0.85 | 0.463167 | 80.952 | ||
7,343 | swe_smith::train::51417 | swe_smith | train | 51,417 | spulec__freezegun.5f171db0.func_pm_remove_cond__htgpz8dw | swesmith/spulec__freezegun.5f171db0 | spulec/freezegun | python | null | Freezegun breaks with RecursionError after recent changes
#### Description
After some recent changes, freezegun is causing infinite recursion when trying to use fake time functions. The issue appears to be related to the fake time functions calling themselves recursively instead of the real time functions.
#### Step... | diff --git a/freezegun/api.py b/freezegun/api.py
index d235292..a33715a 100644
--- a/freezegun/api.py
+++ b/freezegun/api.py
@@ -698,10 +698,6 @@ class _freeze_time:
if self.auto_tick_seconds:
freeze_factory: Union[StepTickTimeFactory, TickingDateTimeFactory, FrozenDateTimeFactory] = StepTickTim... | ["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... | ["tests/test_configure.py::test_default_ignore_list_is_overridden[ignorelist0]", "tests/test_configure.py::test_default_ignore_list_is_overridden[ignorelist1]", "tests/test_configure.py::test_extend_default_ignore_list[ignorelist0]", "tests/test_configure.py::test_extend_default_ignore_list[ignorelist1]", "tests/test_c... | jyangballin/swesmith.x86_64.spulec_1776_freezegun.5f171db0 | true | null | 1 | 16 | 114 | 1,034 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225667 | 80.952 | |||
7,344 | swe_smith::train::38463 | swe_smith | train | 38,463 | amueller__word_cloud.ec24191c.combine_file__u7m659qd | swesmith/amueller__word_cloud.ec24191c | amueller/word_cloud | python | null | WordCloud.process_text returns list instead of dictionary
#### Description
The `process_text` method is returning a list instead of the expected dictionary, causing failures when trying to access word frequencies.
#### Steps/Code to Reproduce
```python
from wordcloud import WordCloud
text = "hello world hello"
wc ... | diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py
index 1622c03..7709627 100644
--- a/wordcloud/wordcloud.py
+++ b/wordcloud/wordcloud.py
@@ -577,31 +577,27 @@ class WordCloud(object):
include all those things.
"""
- flags = (re.UNICODE if sys.version < '3' and type(text) is unicod... | ["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_regexp_parameter", "test/test_wordcloud.py::test_unicode_stopwords", "te... | jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c | true | null | 1 | 26 | 29 | 834 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225667 | 80.952 | |||
7,345 | swe_smith::train::24088 | swe_smith | train | 24,088 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__uc99nnrl | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | get_body_heliographic_stonyhurst raises UnboundLocalError when called
#### Description
When calling `get_body_heliographic_stonyhurst()`, the function raises an `UnboundLocalError` for the variable `body_icrs`. This appears to be due to the variable being referenced before it's defined in the function.
#### Steps/Co... | diff --git a/sunpy/coordinates/ephemeris.py b/sunpy/coordinates/ephemeris.py
index b5a70da..53d66bb 100644
--- a/sunpy/coordinates/ephemeris.py
+++ b/sunpy/coordinates/ephemeris.py
@@ -39,6 +39,17 @@ __all__ = ['get_body_heliographic_stonyhurst', 'get_earth',
@add_common_docstring(**_variables_for_parse_time_docstring... | ["sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst", "sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst_light_travel_time", "sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst_light_travel_time_array", "sunpy/coordinates/tests/... | ["sunpy/coordinates/tests/test_ephemeris.py::test_get_horizons_coord_array_time_too_large", "sunpy/coordinates/tests/test_ephemeris.py::test_get_horizons_coord_bad_id_type"] | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 23 | 4 | 893 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2255 | 80.9515 | |||
7,346 | swe_smith::train::20462 | swe_smith | train | 20,462 | tobymao__sqlglot.036601ba.func_pm_ctrl_invert_if__2jq6jsa6 | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | format_time function fails with TypeError when processing certain input patterns
#### Description
The `format_time` function in `sqlglot/time.py` is throwing a `TypeError: object of type 'NoneType' is not subscriptable` when processing certain string patterns with mappings.
#### Steps/Code to Reproduce
```python
fr... | diff --git a/sqlglot/time.py b/sqlglot/time.py
index 66daf16..bb3c5b1 100644
--- a/sqlglot/time.py
+++ b/sqlglot/time.py
@@ -40,12 +40,12 @@ def format_time(
if result == TrieResult.FAILED:
if sym:
+ chars = chars[0]
+ end = start + 1
+ else:
... | ["tests/test_time.py::TestTime::test_format_time"] | ["tests/test_time.py::TestTime::test_subsecond_precision"] | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 7 | 1 | 1,213 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2255 | 80.9515 | |||
7,347 | swe_smith::train::38951 | swe_smith | train | 38,951 | pallets__jinja.ada0a9a6.func_basic__b7sihzh0 | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | PackageLoader get_source returns wrong up_to_date function for zip files
#### Description
When using PackageLoader with zip files, the `get_source` method returns an incorrect `up_to_date` function that always returns `False` instead of `None`. This breaks template caching behavior for packaged templates.
#### Steps... | diff --git a/src/jinja2/loaders.py b/src/jinja2/loaders.py
index 8ca32cb..0ec83d5 100644
--- a/src/jinja2/loaders.py
+++ b/src/jinja2/loaders.py
@@ -357,16 +357,12 @@ class PackageLoader(BaseLoader):
def get_source(
self, environment: "Environment", template: str
) -> t.Tuple[str, str, t.Optional[t.C... | ["tests/test_loader.py::test_package_dir_source[foo/test.html-FOO]", "tests/test_loader.py::test_package_dir_source[test.html-BAR]", "tests/test_loader.py::test_package_file_source[foo/test.html-FOO]", "tests/test_loader.py::test_package_file_source[test.html-BAR]", "tests/test_loader.py::test_package_zip_source[foo/te... | ["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 | 14 | 9 | 1,073 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2255 | 80.9515 | |||
7,348 | swe_smith::train::38878 | swe_smith | train | 38,878 | pallets__jinja.ada0a9a6.func_basic__6km5dndh | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | Unary operators not working correctly in sandboxed environments
Description
When using unary operators like `-` in sandboxed Jinja2 environments, the operators are not being intercepted properly and the logic for determining when to use `environment.call_unop` appears to be inverted.
Steps/Code to Reproduce
```pyth... | diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py
index 91720c5..92e2d9a 100644
--- a/src/jinja2/compiler.py
+++ b/src/jinja2/compiler.py
@@ -85,15 +85,15 @@ def _make_unop(
@optimizeconst
def visitor(self: "CodeGenerator", node: nodes.UnaryExpr, frame: Frame) -> None:
if (
- se... | ["tests/test_api.py::TestUndefined::test_logging_undefined", "tests/test_api.py::TestUndefined::test_default_undefined", "tests/test_api.py::TestUndefined::test_chainable_undefined", "tests/test_api.py::TestUndefined::test_debug_undefined", "tests/test_api.py::TestUndefined::test_strict_undefined", "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 | 14 | 1,233 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2255 | 80.9515 | |||
7,349 | swe_smith::train::45016 | swe_smith | train | 45,016 | mahmoud__glom.fb3c4e76.func_pm_remove_cond__a01gqbvu | swesmith/mahmoud__glom.fb3c4e76 | mahmoud/glom | python | null | Check validation silently passes when vals constraint fails
#### Description
When using `Check` with a `vals` constraint (like `one_of` or `equal_to`), validation silently passes even when the target value doesn't match any of the specified values. This breaks the expected validation behavior.
#### Steps/Code to Rep... | diff --git a/glom/matching.py b/glom/matching.py
index 798ac40..6c12fcd 100644
--- a/glom/matching.py
+++ b/glom/matching.py
@@ -969,12 +969,7 @@ class Check:
type(target).__name__))
if self.vals and target not in self.vals:
- if self.default is not RAISE:
- ... | ["glom/test/test_check.py::test_check_basic", "glom/test/test_error.py::test_all_public_errors", "glom/test/test_streaming.py::test_filter"] | ["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 | 8 | 3 | 1,193 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2255 | 80.9515 | |||
7,350 | swe_smith::train::5575 | swe_smith | train | 5,575 | PyCQA__flake8.cf1542ce.func_pm_remove_assign__ran3bmuo | swesmith/PyCQA__flake8.cf1542ce | pycqa/flake8 | python | null | SyntaxError column position reporting broken after recent changes
#### Description
After some recent changes to the syntax error handling code, flake8 is not correctly reporting column positions for SyntaxErrors. The column offset calculation seems to have been removed or broken, causing incorrect column numbers to b... | diff --git a/src/flake8/checker.py b/src/flake8/checker.py
index 329a2cc..5fa01a6 100644
--- a/src/flake8/checker.py
+++ b/src/flake8/checker.py
@@ -360,17 +360,14 @@ class FileChecker:
and exception.args[1]
and len(exception.args[1]) > 2
):
- token = exception.args[1]
... | ["tests/integration/test_checker.py::test_handling_syntaxerrors_across_pythons", "tests/integration/test_main.py::test_tokenization_error_but_not_syntax_error", "tests/integration/test_main.py::test_tokenization_error_is_a_syntax_error"] | ["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 | 3 | 1,153 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2255 | 80.9515 | |||
7,351 | swe_smith::train::9310 | swe_smith | train | 9,310 | jaraco__inflect.c079a96a.func_basic__9lsc3k23 | swesmith/jaraco__inflect.c079a96a | jaraco/inflect | python | null | Compound word handling broken for phrases with exactly 3 parts
#### Description
When handling compound words/phrases that contain exactly 3 parts separated by spaces or hyphens, the inflection engine incorrectly raises a ValueError claiming there are "fewer than two separators" when there are actually exactly two sep... | diff --git a/inflect/__init__.py b/inflect/__init__.py
index 3eef486..0370db4 100644
--- a/inflect/__init__.py
+++ b/inflect/__init__.py
@@ -2992,15 +2992,15 @@ class engine:
'MAN of war'
"""
parts = phrase.split(sep)
- if len(parts) < 3:
+ if len(parts) <= 3:
raise... | ["inflect/__init__.py::inflect.engine._handle_prepositional_phrase", "tests/test_compounds.py::test_compound_1", "tests/test_compounds.py::test_compound_2", "tests/test_compounds.py::test_compound_3", "tests/test_compounds.py::test_compound_4", "tests/test_compounds.py::test_unit_handling_fractional", "tests/test_infle... | ["inflect/__init__.py::inflect.bysize", "inflect/__init__.py::inflect.engine._handle_long_compounds", "inflect/__init__.py::inflect.engine.compare", "inflect/__init__.py::inflect.engine.ordinal", "inflect/__init__.py::inflect.engine.singular_noun", "inflect/__init__.py::inflect.joinstem", "tests/test_an.py::test_an", "... | jyangballin/swesmith.x86_64.jaraco_1776_inflect.c079a96a | true | null | 1 | 10 | 8 | 1,153 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2255 | 80.9515 | |||
7,352 | swe_smith::train::35062 | swe_smith | train | 35,062 | pyutils__line_profiler.a646bf0f.func_pm_remove_cond__jwkdzx0i | swesmith/pyutils__line_profiler.a646bf0f | pyutils/line_profiler | python | null | show_func crashes with AttributeError when stream is None
#### Description
The `show_func` function in line_profiler crashes with an `AttributeError` when the `stream` parameter is `None`. The function tries to call `stream.write()` without first checking if `stream` is `None` and setting it to `sys.stdout` as a defa... | diff --git a/line_profiler/line_profiler.py b/line_profiler/line_profiler.py
index 2a71d03..f421205 100755
--- a/line_profiler/line_profiler.py
+++ b/line_profiler/line_profiler.py
@@ -285,8 +285,6 @@ def show_func(filename, start_lineno, func_name, timings, unit,
>>> show_func(filename, start_lineno, func_nam... | ["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_autoprofile.py::test_autoprofile_module", "tests/t... | ["tests/test_cli.py::test_version_agreement", "tests/test_complex_case.py::test_complex_example_python_none", "tests/test_duplicate_functions.py::test_duplicate_function", "tests/test_explicit_profile.py::test_explicit_profile_with_nothing", "tests/test_explicit_profile.py::test_explicit_profile_with_environ_off", "tes... | jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f | true | null | 1 | 20 | 17 | 952 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225333 | 80.951 | |||
7,353 | swe_smith::train::46636 | swe_smith | train | 46,636 | python-trio__trio.cfbbe2c1.combine_file__kwvnyyqb | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | generic_function breaks after initialization
#### Description
The `generic_function` class in `trio._util` appears to be broken after initialization. When trying to call a `generic_function` instance, it raises a `TypeError` because the internal function reference becomes `None`.
#### Steps/Code to Reproduce
```pyt... | diff --git a/src/trio/_util.py b/src/trio/_util.py
index 994a465..65cd794 100644
--- a/src/trio/_util.py
+++ b/src/trio/_util.py
@@ -254,14 +254,17 @@ class generic_function(Generic[RetT]):
self,
fn: Callable[..., RetT],
) -> None:
- update_wrapper(self, fn)
self._fn = fn
+ ... | ["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... | ["src/trio/_core/_tests/test_exceptiongroup_gc.py::test_concat_tb", "src/trio/_core/_tests/test_exceptiongroup_gc.py::test_ExceptionGroup_catch_doesnt_create_cyclic_garbage", "src/trio/_core/_tests/test_guest_mode.py::test_guest_trivial", "src/trio/_core/_tests/test_guest_mode.py::test_guest_can_do_io", "src/trio/_core... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 1 | 20 | 84 | 952 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225333 | 80.951 | |||
7,354 | swe_smith::train::43689 | swe_smith | train | 43,689 | sloria__environs.73c372df.func_basic__69kkuv6c | swesmith/sloria__environs.73c372df | sloria/environs | python | null | Environment variable parsing broken after recent changes
#### Description
Environment variable parsing is completely broken. When trying to parse any environment variable, the library throws `EnvSealedError` even on fresh `Env()` instances that haven't been sealed.
#### Steps/Code to Reproduce
```python
import os
f... | diff --git a/src/environs/__init__.py b/src/environs/__init__.py
index 00f6072..03e030f 100644
--- a/src/environs/__init__.py
+++ b/src/environs/__init__.py
@@ -109,7 +109,6 @@ def _field2method(
default: typing.Any = ma.missing,
subcast: Subcast[_T] | None = None,
*,
- # Subset of rel... | ["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... | ["tests/test_environs.py::TestCasting::test_enum_cast", "tests/test_environs.py::TestCasting::test_enum_cast_ignore_case", "tests/test_environs.py::TestCasting::test_invalid_enum", "tests/test_environs.py::TestCasting::test_invalid_enum_ignore_case", "tests/test_environs.py::TestCasting::test_enum_default", "tests/test... | jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df | true | null | 1 | 19 | 76 | 972 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225333 | 80.951 | |||
7,355 | swe_smith::train::21997 | swe_smith | train | 21,997 | life4__textdistance.c3aca916.func_pm_ctrl_shuffle__mgfl0ql3 | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | ArithNCD algorithm broken due to variable reference error
#### Description
The ArithNCD compression algorithm is currently broken and throws `UnboundLocalError` when trying to calculate text distances. The algorithm fails when attempting to use variables that are referenced before assignment.
#### Steps/Code to Repr... | diff --git a/textdistance/algorithms/compression_based.py b/textdistance/algorithms/compression_based.py
index 28fd151..6fd9885 100644
--- a/textdistance/algorithms/compression_based.py
+++ b/textdistance/algorithms/compression_based.py
@@ -97,26 +97,25 @@ class ArithNCD(_NCDBase):
self.qval = qval
def ... | ["tests/test_compression/test_arith_ncd.py::test_similarity[test-test-1]", "tests/test_compression/test_arith_ncd.py::test_similarity[test-nani-2.1666666666666665]", "tests/test_compression/test_arith_ncd.py::test_make_probs", "tests/test_compression/test_arith_ncd.py::test_arith_output", "tests/test_compression/test_c... | ["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 | 19 | 8 | 972 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225333 | 80.951 | |||
7,356 | swe_smith::train::31446 | swe_smith | train | 31,446 | benoitc__gunicorn.bacbf8aa.combine_module__ox91sj3m | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | HTTP request parsing fails with TypeError on string/bytes operations
#### Description
When processing HTTP requests, the parser encounters TypeError exceptions related to string and bytes operations. This appears to affect both chunked transfer encoding and regular request parsing.
#### Steps/Code to Reproduce
```p... | diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py
index d7ee29e..e1fec3b 100644
--- a/gunicorn/http/body.py
+++ b/gunicorn/http/body.py
@@ -55,7 +55,7 @@ class ChunkedReader:
def parse_chunked(self, unreader):
(size, rest) = self.parse_chunk_size(unreader)
- while size > 0:
+ whil... | ["tests/test_http.py::test_unreader_unread", "tests/test_http.py::test_unreader_read_with_nonzero_size", "tests/test_http.py::test_length_reader_read", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_10.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/re... | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 2 | 12 | 65 | 1,112 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225333 | 80.951 | |||
7,357 | swe_smith::train::1675 | swe_smith | train | 1,675 | agronholm__typeguard.b6a7e438.combine_file__qxclmho4 | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | #### Description
The `@typechecked` decorator is raising `IndexError` when applied to functions, causing instrumentation to fail completely.
#### Steps/Code to Reproduce
```python
from typeguard import typechecked
@typechecked
def simple_function(x: int) -> str:
return str(x)
simple_function(42)
```
This rais... | diff --git a/src/typeguard/_decorators.py b/src/typeguard/_decorators.py
index a6c20cb..8378838 100644
--- a/src/typeguard/_decorators.py
+++ b/src/typeguard/_decorators.py
@@ -30,26 +30,26 @@ else:
def make_cell(value: object) -> _Cell:
- return (lambda: value).__closure__[0] # type: ignore[index]
+ return... | ["tests/test_suppression.py::test_contextmanager_typechecked", "tests/test_suppression.py::test_decorator_typechecked", "tests/test_typechecked.py::TestCoroutineFunction::test_success", "tests/test_typechecked.py::TestCoroutineFunction::test_bad_arg", "tests/test_typechecked.py::TestCoroutineFunction::test_bad_return",... | ["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 | 30 | 54 | 752 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225333 | 80.951 | |||
7,358 | swe_smith::train::28299 | swe_smith | train | 28,299 | encode__starlette.db5063c2.combine_file__6m23l9l8 | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | WebSocketException code and reason parameters are swapped
When creating a WebSocketException with a code and reason, the values are incorrectly swapped in the object's attributes. This causes unexpected behavior when using WebSocketException in a WebSocket application.
To reproduce the issue:
```python
from starlett... | diff --git a/starlette/exceptions.py b/starlette/exceptions.py
index c48f083..1a2903a 100644
--- a/starlette/exceptions.py
+++ b/starlette/exceptions.py
@@ -30,15 +30,15 @@ class HTTPException(Exception):
class WebSocketException(Exception):
def __init__(self, code: int, reason: str | None = None) -> None:
- ... | ["tests/test_applications.py::test_websocket_raise_websocket_exception[asyncio]", "tests/test_applications.py::test_websocket_raise_websocket_exception[trio]", "tests/test_exceptions.py::test_websocket_str", "tests/test_exceptions.py::test_websocket_repr"] | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "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/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 6 | 4 | 1,231 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225167 | 80.9505 | |||
7,359 | swe_smith::train::20615 | swe_smith | train | 20,615 | tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__cec6uywd | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | DATEDIFF function fails with UnboundLocalError when using 3-argument form
#### Description
When using the DATEDIFF function with 3 arguments (unit, start_date, end_date) in Spark dialect, the function fails with an UnboundLocalError. The variables `this`, `expression`, and `unit` are referenced before being assigned.... | diff --git a/sqlglot/dialects/spark.py b/sqlglot/dialects/spark.py
index f86f0eb..0756841 100644
--- a/sqlglot/dialects/spark.py
+++ b/sqlglot/dialects/spark.py
@@ -16,6 +16,13 @@ from sqlglot.transforms import (
def _build_datediff(args: t.List) -> exp.Expression:
+
+ return exp.DateDiff(
+ this=exp.TsO... | ["tests/dialects/test_spark.py::TestSpark::test_spark"] | ["tests/dialects/test_spark.py::TestSpark::test_analyze", "tests/dialects/test_spark.py::TestSpark::test_bool_or", "tests/dialects/test_spark.py::TestSpark::test_current_user", "tests/dialects/test_spark.py::TestSpark::test_ddl", "tests/dialects/test_spark.py::TestSpark::test_explode_projection_to_unnest", "tests/diale... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 15 | 1 | 1,051 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225167 | 80.9505 | |||
7,360 | swe_smith::train::44441 | swe_smith | train | 44,441 | pydata__patsy.a5d16484.func_pm_remove_cond__6v2dbjan | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | DesignMatrix constructor fails with integer arrays after recent changes
#### Description
Creating a DesignMatrix with integer input arrays now raises a ValueError about the design matrix needing to be real-valued floating point, even though the constructor should automatically convert integer arrays to float.
#### S... | diff --git a/patsy/design_info.py b/patsy/design_info.py
index d94b97a..1955e18 100644
--- a/patsy/design_info.py
+++ b/patsy/design_info.py
@@ -1142,19 +1142,7 @@ class DesignMatrix(np.ndarray):
Depending on the input array, it is possible this will pass through
its input unchanged, or create a view.... | ["patsy/design_info.py::test_DesignInfo_from_array", "patsy/design_info.py::test_design_matrix", "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 | 3 | 1,091 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225167 | 80.9505 | |||
7,361 | swe_smith::train::49296 | swe_smith | train | 49,296 | mozilla__bleach.73871d76.func_basic__et9hc3ec | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | Bleach clean function fails with TypeError when using default parameters
#### Description
When calling `bleach.clean()` with HTML content, the function raises a `TypeError: unsupported operand type(s)` error. This appears to affect basic sanitization functionality.
#### Steps/Code to Reproduce
```python
import blea... | diff --git a/bleach/sanitizer.py b/bleach/sanitizer.py
index 8662a87..55f9925 100644
--- a/bleach/sanitizer.py
+++ b/bleach/sanitizer.py
@@ -299,24 +299,19 @@ class BleachSanitizerFilter(html5lib_shim.SanitizerFilter):
sanitizing style attribute values and style text; defaults to None
"""
- ... | ["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 | 19 | 107 | 971 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225167 | 80.9505 | |||
7,362 | swe_smith::train::1162 | swe_smith | train | 1,162 | jd__tenacity.0d40e76f.func_pm_ctrl_shuffle__ied06l4m | swesmith/jd__tenacity.0d40e76f | jd/tenacity | python | null | UnboundLocalError when using retry decorators
#### Description
When using tenacity retry decorators, an `UnboundLocalError` is raised for the variable `fut` in the `_begin_iter` method. This appears to happen when the retry logic attempts to access the `fut` variable before it's properly defined.
#### Steps/Code to ... | diff --git a/tenacity/__init__.py b/tenacity/__init__.py
index 72eba04..90f6028 100644
--- a/tenacity/__init__.py
+++ b/tenacity/__init__.py
@@ -377,22 +377,21 @@ class BaseRetrying(ABC):
return result
def _begin_iter(self, retry_state: "RetryCallState") -> None: # noqa
- self.iter_state.reset()... | ["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::TestAsyncio::test_stop_after_attempt", "tests/test_asyncio.py::TestContextMana... | ["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 | 1 | 17 | 70 | 1,011 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225167 | 80.9505 | |||
7,363 | swe_smith::train::44320 | swe_smith | train | 44,320 | pydata__patsy.a5d16484.func_pm_ctrl_shuffle__6oj0ki4y | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | incr_dbuilders returns undefined variable before validation
#### Description
When calling `incr_dbuilders`, the function returns `design_infos` before it's defined, causing an `UnboundLocalError`. The function has been restructured so that the return statement appears before the variable assignment and validation log... | diff --git a/patsy/highlevel.py b/patsy/highlevel.py
index 1af6ce8..bf95785 100644
--- a/patsy/highlevel.py
+++ b/patsy/highlevel.py
@@ -113,22 +113,21 @@ def incr_dbuilder(formula_like, data_iter_maker, eval_env=0, NA_action="drop"):
def incr_dbuilders(formula_like, data_iter_maker, eval_env=0, NA_action="drop"):... | ["patsy/test_highlevel.py::test_formula_likes", "patsy/test_highlevel.py::test_incremental"] | ["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 | 2 | 1,091 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225167 | 80.9505 | |||
7,364 | swe_smith::train::27995 | swe_smith | train | 27,995 | jsvine__pdfplumber.02ff4313.func_pm_remove_cond__wqo6gvt2 | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | PDFStructTree fails to handle PDFs without StructTreeRoot
When trying to access the structure tree of a PDF that doesn't have a StructTreeRoot in its catalog, the code crashes with a KeyError instead of gracefully handling the missing structure.
#### Steps/Code to Reproduce
```python
import pdfplumber
# Open a PDF ... | diff --git a/pdfplumber/structure.py b/pdfplumber/structure.py
index 88749d7..dcb0861 100644
--- a/pdfplumber/structure.py
+++ b/pdfplumber/structure.py
@@ -170,8 +170,6 @@ class PDFStructTree(Findable):
def __init__(self, doc: "PDF", page: Optional["Page"] = None):
self.doc = doc.doc
- if "Struc... | ["tests/test_convert.py::Test::test_cli_structure", "tests/test_structure.py::Test::test_structure_tree", "tests/test_structure.py::TestClass::test_all_mcids", "tests/test_structure.py::TestClass::test_element_bbox", "tests/test_structure.py::TestClass::test_find_all_tree", "tests/test_structure.py::TestClass::test_str... | ["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 | 20 | 14 | 950 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225 | 80.95 | |||
7,365 | swe_smith::train::19219 | swe_smith | train | 19,219 | seperman__deepdiff.ed252022.func_pm_remove_assign__ahdmqm5j | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | Delta initialization fails with AttributeError when using bidirectional parameter
#### Description
When creating a Delta object with the `bidirectional` parameter, the initialization fails with an AttributeError. The Delta object cannot be properly instantiated, preventing the application of deltas to objects.
#### ... | diff --git a/deepdiff/delta.py b/deepdiff/delta.py
index 8bafc9a..8e55546 100644
--- a/deepdiff/delta.py
+++ b/deepdiff/delta.py
@@ -94,7 +94,6 @@ class Delta:
def _deserializer(obj, safe_to_import=None):
result = deserializer(obj)
if result.get('_iterable_opcodes'):
- ... | ["tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t2_json.csv-t1.json-args3-0]", "tests/test_command.py::TestCommands::test_deep... | ["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 | 14 | 113 | 1,070 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225 | 80.95 | |||
7,366 | swe_smith::train::24332 | swe_smith | train | 24,332 | sunpy__sunpy.f8edfd5c.func_pm_remove_cond__r362dhpl | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | RotatedSunFrame validation checks removed causing silent failures
#### Description
The `RotatedSunFrame` class no longer validates its input parameters, allowing invalid configurations to be created without raising errors. This can lead to unexpected behavior when working with coordinate transformations.
#### Steps/... | diff --git a/sunpy/coordinates/metaframes.py b/sunpy/coordinates/metaframes.py
index ea46ab9..1ff1fb0 100644
--- a/sunpy/coordinates/metaframes.py
+++ b/sunpy/coordinates/metaframes.py
@@ -179,15 +179,10 @@ class RotatedSunFrame(SunPyBaseCoordinateFrame):
def __init__(self, *args, **kwargs):
# Validate in... | ["sunpy/coordinates/tests/test_metaframes.py::test_no_obstime", "sunpy/coordinates/tests/test_metaframes.py::test_both_duration_and_rotated_time_provided"] | ["sunpy/coordinates/tests/test_metaframes.py::test_class_creation[rot_hgs]", "sunpy/coordinates/tests/test_metaframes.py::test_class_creation[rot_hgc]", "sunpy/coordinates/tests/test_metaframes.py::test_class_creation[rot_hci]", "sunpy/coordinates/tests/test_metaframes.py::test_class_creation[rot_hcc]", "sunpy/coordina... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 6 | 2 | 1,230 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225 | 80.95 | |||
7,367 | swe_smith::train::42731 | swe_smith | train | 42,731 | python-jsonschema__jsonschema.93e0caa5.func_pm_ctrl_shuffle__sswramcf | swesmith/python-jsonschema__jsonschema.93e0caa5 | python-jsonschema/jsonschema | python | null | RefResolver.resolve_from_url broken due to code reordering
#### Description
The `resolve_from_url` method in `_RefResolver` class appears to have broken functionality. When trying to resolve URLs, the method fails with a `NameError` because variables are being used before they are defined.
#### Steps/Code to Reprodu... | diff --git a/jsonschema/validators.py b/jsonschema/validators.py
index b8ca3bd..63b4867 100644
--- a/jsonschema/validators.py
+++ b/jsonschema/validators.py
@@ -1108,10 +1108,8 @@ class _RefResolver:
return url, self._remote_cache(url)
def resolve_from_url(self, url):
- """
- Resolve the g... | ["jsonschema/tests/test_cli.py::TestCLI::test_invalid_explicit_base_uri", "jsonschema/tests/test_cli.py::TestCLI::test_nonexistent_file_with_explicit_base_uri", "jsonschema/tests/test_cli.py::TestCLI::test_successful_validation_via_explicit_base_uri", "jsonschema/tests/test_cli.py::TestCLI::test_unsuccessful_validation... | ["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso... | jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5 | true | null | 1 | 13 | 28 | 1,090 | 0 | 0.6 | 1 | 0.75 | 1 | 0.225 | 80.95 | |||
7,368 | swe_smith::train::33141 | swe_smith | train | 33,141 | django-money__django-money.835c1ab8.combine_module__x3zl3a8t | swesmith/django-money__django-money.835c1ab8 | django-money/django-money | python | null | MoneyField validation broken for nullable currency fields
#### Description
When working with MoneyField instances that have nullable currency fields, the validation logic appears to be inverted. Fields that should accept null currency values are now raising "Missing currency value" errors, and the validation is behav... | diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py
index dc5f6ad..90785d0 100644
--- a/djmoney/models/fields.py
+++ b/djmoney/models/fields.py
@@ -110,14 +110,13 @@ class MoneyFieldProxy:
value is not None
and self.field._currency_field.null
and not isinstance(value,... | ["tests/test_form.py::TestValidation::test_valid[value0]", "tests/test_form.py::TestValidation::test_valid[value1]", "tests/test_form.py::TestValidation::test_valid[value2]", "tests/test_form.py::TestValidation::test_valid[value3]", "tests/test_models.py::TestVanillaMoneyField::test_raises_type_error_setting_currency_t... | ["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/... | jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8 | true | null | 2 | 16 | 33 | 1,029 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224833 | 80.9495 | |||
7,369 | swe_smith::train::43866 | swe_smith | train | 43,866 | pydata__patsy.a5d16484.func_basic__1iywzjoa | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | EvalEnvironment.subset() includes variables not in subset list
#### Description
When using `EvalEnvironment.subset()`, variables that are not explicitly included in the subset list are still accessible during evaluation, which breaks the expected isolation behavior.
#### Steps/Code to Reproduce
```python
from patsy... | diff --git a/patsy/eval.py b/patsy/eval.py
index 9d1fba0..b4f1d09 100644
--- a/patsy/eval.py
+++ b/patsy/eval.py
@@ -409,18 +409,20 @@ def test_EvalEnvironment_eval_flags():
def test_EvalEnvironment_subset():
- env = EvalEnvironment([{"a": 1}, {"b": 2}, {"c": 3}])
+ env = EvalEnvironment([{"a": 1}, {"b": 2},... | ["patsy/eval.py::test_EvalEnvironment_subset"] | ["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 | 14 | 1 | 1,069 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224833 | 80.9495 | |||
7,370 | swe_smith::train::744 | swe_smith | train | 744 | oauthlib__oauthlib.1fd52536.func_pm_ctrl_shuffle__5etby86x | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OpenID Connect implicit flow validation bypassed when nonce is missing
#### Description
When using the OpenID Connect implicit flow, the mandatory nonce parameter validation is being bypassed. The method returns early without performing the required nonce validation, allowing requests that should be rejected to proce... | diff --git a/oauthlib/openid/connect/core/grant_types/implicit.py b/oauthlib/openid/connect/core/grant_types/implicit.py
index a4fe604..2cbb278 100644
--- a/oauthlib/openid/connect/core/grant_types/implicit.py
+++ b/oauthlib/openid/connect/core/grant_types/implicit.py
@@ -31,11 +31,12 @@ class ImplicitGrant(GrantTypeBa... | ["tests/openid/connect/core/grant_types/test_implicit.py::OpenIDImplicitTest::test_required_nonce", "tests/openid/connect/core/grant_types/test_implicit.py::OpenIDImplicitNoAccessTokenTest::test_required_nonce"] | ["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 | 8 | 2 | 1,189 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224833 | 80.9495 | |||
7,371 | swe_smith::train::28311 | swe_smith | train | 28,311 | encode__starlette.db5063c2.combine_file__b8eiks8w | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | ServerErrorMiddleware returns wrong status code and message for unhandled errors
#### Description
When using ServerErrorMiddleware with debug=False, unhandled exceptions are returning a 404 "Not Found" response instead of the expected 500 "Internal Server Error" response.
#### Steps/Code to Reproduce
```python
from... | diff --git a/starlette/middleware/errors.py b/starlette/middleware/errors.py
index 76ad776..d86a757 100644
--- a/starlette/middleware/errors.py
+++ b/starlette/middleware/errors.py
@@ -226,21 +226,21 @@ class ServerErrorMiddleware:
traceback_obj = traceback.TracebackException.from_exception(exc, capture_locals... | ["tests/middleware/test_errors.py::test_debug_html[asyncio]", "tests/middleware/test_errors.py::test_debug_html[trio]", "tests/test_staticfiles.py::test_staticfiles_unhandled_os_error_returns_500[asyncio]", "tests/test_staticfiles.py::test_staticfiles_unhandled_os_error_returns_500[trio]"] | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "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/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 16 | 4 | 1,028 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224667 | 80.949 | |||
7,372 | swe_smith::train::42642 | swe_smith | train | 42,642 | python-jsonschema__jsonschema.93e0caa5.func_basic__ra2f0qlz | swesmith/python-jsonschema__jsonschema.93e0caa5 | python-jsonschema/jsonschema | python | null | ValidationError.absolute_schema_path returns list instead of deque
#### Description
The `absolute_schema_path` property on ValidationError instances is returning a list instead of a deque, which breaks compatibility with existing code that expects a deque object.
#### Steps/Code to Reproduce
```python
import jsonsc... | diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py
index 3dcd296..c962629 100644
--- a/jsonschema/exceptions.py
+++ b/jsonschema/exceptions.py
@@ -142,9 +142,9 @@ class _Error(Exception):
if parent is None:
return self.relative_schema_path
- path = deque(self.relative_schema... | ["jsonschema/tests/test_validators.py::TestValidationErrorDetails::test_anyOf", "jsonschema/tests/test_validators.py::TestValidationErrorDetails::test_recursive", "jsonschema/tests/test_validators.py::TestValidationErrorDetails::test_type"] | ["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso... | jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5 | true | null | 1 | 6 | 3 | 1,228 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224667 | 80.949 | |||
7,373 | swe_smith::train::39121 | swe_smith | train | 39,121 | pallets__jinja.ada0a9a6.func_basic__m8m6or5r | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | Template syntax error messages are incorrect after recent parser changes
#### Description
Template syntax error messages are showing wrong information when encountering unknown tags or unexpected end of templates. The error messages appear to have inverted logic and are pointing to incorrect line numbers and block in... | diff --git a/src/jinja2/parser.py b/src/jinja2/parser.py
index 817abec..17b7d19 100644
--- a/src/jinja2/parser.py
+++ b/src/jinja2/parser.py
@@ -96,7 +96,7 @@ class Parser:
expected: t.Set[str] = set()
for exprs in end_token_stack:
expected.update(map(describe_token_expr, exprs))
- ... | ["tests/test_debug.py::TestDebug::test_syntax_error", "tests/test_lexnparse.py::TestParser::test_error_messages", "tests/test_lexnparse.py::TestTrimBlocks::test_raw_no_trim_lstrip"] | ["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 | 12 | 3 | 1,108 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224667 | 80.949 | |||
7,374 | swe_smith::train::31406 | swe_smith | train | 31,406 | benoitc__gunicorn.bacbf8aa.combine_file__wfkbcqsa | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | Config initialization fails with UnboundLocalError
#### Description
When initializing gunicorn configuration, an `UnboundLocalError` is raised because the `settings` variable is referenced before assignment in the `make_settings` function.
#### Steps/Code to Reproduce
```python
from gunicorn.config import make_sett... | diff --git a/gunicorn/config.py b/gunicorn/config.py
index 402a26b..7a292f1 100644
--- a/gunicorn/config.py
+++ b/gunicorn/config.py
@@ -26,16 +26,15 @@ PLATFORM = sys.platform
def make_settings(ignore=None):
- settings = {}
ignore = ignore or ()
for s in KNOWN_SETTINGS:
setting = s()
... | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | ["tests/test_config.py::test_callable_validation_for_string", "tests/test_http.py::test_method_pattern", "tests/test_http.py::test_readline_empty_body", "tests/test_http.py::test_readline_zero_size", "tests/test_http.py::test_readline_new_line_before_size", "tests/test_http.py::test_readline_new_line_after_size", "test... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 1 | 14 | 170 | 1,068 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224667 | 80.949 | |||
7,375 | swe_smith::train::38932 | swe_smith | train | 38,932 | pallets__jinja.ada0a9a6.func_basic__a6z0gjw2 | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | Context.derived() returns None instead of derived context
#### Description
The `Context.derived()` method is returning `None` instead of the expected derived context object. This breaks template functionality that relies on creating derived contexts, particularly in scoped blocks and extensions.
#### Steps/Code to R... | diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py
index 9dcc9d4..e88180d 100644
--- a/src/jinja2/runtime.py
+++ b/src/jinja2/runtime.py
@@ -308,16 +308,16 @@ class Context:
)
def derived(self, locals: t.Optional[t.Dict[str, t.Any]] = None) -> "Context":
- """Internal helper function ... | ["tests/test_ext.py::TestExtensions::test_contextreference_node_can_pass_locals", "tests/test_ext.py::TestAutoEscape::test_overlay_scopes", "tests/test_inheritance.py::TestInheritance::test_scoped_block", "tests/test_inheritance.py::TestInheritance::test_super_in_scoped_block", "tests/test_inheritance.py::TestInheritan... | ["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 | 8 | 12 | 1,188 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224667 | 80.949 | |||
7,376 | swe_smith::train::22009 | swe_smith | train | 22,009 | life4__textdistance.c3aca916.func_pm_op_change__32myu2ms | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | StrCmp95 algorithm produces TypeError on string comparison
#### Description
The StrCmp95 string similarity algorithm is throwing a TypeError when trying to compute similarity between strings. This appears to be affecting the normalized distance and similarity calculations.
#### Steps/Code to Reproduce
```python
imp... | diff --git a/textdistance/algorithms/edit_based.py b/textdistance/algorithms/edit_based.py
index 0a6e02f..80e1933 100644
--- a/textdistance/algorithms/edit_based.py
+++ b/textdistance/algorithms/edit_based.py
@@ -695,7 +695,7 @@ class StrCmp95(_BaseSimilarity):
# Blank out the flags
s1_flag = [0] * ... | ["tests/test_common.py::test_normalization_range[alg15]", "tests/test_common.py::test_normalization_by_one[alg15]", "tests/test_common.py::test_normalization_monotonic[alg15]", "tests/test_common.py::test_no_common_chars[alg15]", "tests/test_edit/test_strcmp95.py::test_distance[MARTHA-MARHTA-0.9611111111111111]", "test... | ["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 | 9 | 8 | 1,168 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224667 | 80.949 | |||
7,377 | swe_smith::train::36333 | swe_smith | train | 36,333 | facelessuser__soupsieve.a8080d97.func_pm_ctrl_shuffle__6ub0l8rb | swesmith/facelessuser__soupsieve.a8080d97 | facelessuser/soupsieve | python | null | Version parsing function broken due to variable reference before assignment
#### Description
The `parse_version` function in `soupsieve/__meta__.py` is throwing `UnboundLocalError` when trying to parse version strings. The function appears to be referencing variables before they are defined.
#### Steps/Code to Repro... | diff --git a/soupsieve/__meta__.py b/soupsieve/__meta__.py
index 0fbf71b..77af31d 100644
--- a/soupsieve/__meta__.py
+++ b/soupsieve/__meta__.py
@@ -159,17 +159,11 @@ class Version(namedtuple("Version", ["major", "minor", "micro", "release", "pre"
def parse_version(ver: str) -> Version:
- """Parse version into ... | ["tests/test_versions.py::TestVersion::test_asserts", "tests/test_versions.py::TestVersion::test_version_parsing"] | ["tests/test_api.py::TestSoupSieve::test_cache", "tests/test_api.py::TestSoupSieve::test_closest_match_complex_parent", "tests/test_api.py::TestSoupSieve::test_closest_match_parent", "tests/test_api.py::TestSoupSieve::test_closest_match_self", "tests/test_api.py::TestSoupSieve::test_closest_must_be_parent", "tests/test... | jyangballin/swesmith.x86_64.facelessuser_1776_soupsieve.a8080d97 | true | null | 1 | 15 | 2 | 1,048 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224667 | 80.949 | |||
7,378 | swe_smith::train::39483 | swe_smith | train | 39,483 | pallets__jinja.ada0a9a6.func_pm_remove_assign__8f04j69g | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | Internationalization extension broken for plural forms
#### Description
The i18n extension is not working correctly for plural forms. When using `{% trans %}` blocks with pluralization or `ngettext` functions, the templates fail to render properly and throw TypeError exceptions.
#### Steps/Code to Reproduce
```pyth... | diff --git a/src/jinja2/ext.py b/src/jinja2/ext.py
index 9fad0aa..6479e3d 100644
--- a/src/jinja2/ext.py
+++ b/src/jinja2/ext.py
@@ -525,9 +525,8 @@ class InternationalizationExtension(Extension):
# no variables referenced? no need to escape for old style
# gettext invocations only if there are vars.... | ["tests/test_ext.py::TestInternationalization::test_trans_plural", "tests/test_ext.py::TestInternationalization::test_trans_plural_with_functions", "tests/test_ext.py::TestInternationalization::test_complex_plural", "tests/test_ext.py::TestInternationalization::test_extract", "tests/test_ext.py::TestInternationalizatio... | ["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 | 8 | 11 | 1,187 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2245 | 80.9485 | |||
7,379 | swe_smith::train::19763 | swe_smith | train | 19,763 | kurtmckee__feedparser.cad965a3.combine_module__wxmiht28 | swesmith/kurtmckee__feedparser.cad965a3 | kurtmckee/feedparser | python | null | DC language tag not properly processed in RSS feeds
Description
I've found an issue with the DC language tag processing in feedparser. When parsing RSS feeds that contain Dublin Core language tags, the language information is not properly stored in the feed data.
Here's a minimal example to reproduce the issue:
```... | diff --git a/feedparser/namespaces/dc.py b/feedparser/namespaces/dc.py
index 37c1619..e4c325d 100644
--- a/feedparser/namespaces/dc.py
+++ b/feedparser/namespaces/dc.py
@@ -49,7 +49,8 @@ class Namespace:
self._end_description()
def _end_dc_language(self):
- self._end_language()
+ # Call a ... | ["tests/test_well_formed.py::test_loose_parser[info144]", "tests/test_well_formed.py::test_strict_parser[info144]", "tests/test_well_formed.py::test_strict_parser[info1147]", "tests/test_well_formed.py::test_strict_parser[info145]", "tests/test_well_formed.py::test_loose_parser[info145]", "tests/test_well_formed.py::te... | ["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te... | jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3 | true | null | 2 | 6 | 6 | 1,227 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2245 | 80.9485 | |||
7,380 | swe_smith::train::7593 | swe_smith | train | 7,593 | cantools__cantools.0c6a7871.func_basic__j9469vqm | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | DBC comment export generates invalid syntax
#### Description
When exporting a DBC database with comments, the generated DBC file contains invalid syntax that cannot be parsed back. The comment format is incorrect for bus, node, message, and signal comments.
#### Steps/Code to Reproduce
```python
import cantools
# ... | diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py
index a5b6092..d6feec5 100644
--- a/src/cantools/database/can/formats/dbc.py
+++ b/src/cantools/database/can/formats/dbc.py
@@ -554,31 +554,31 @@ def _dump_comments(database, sort_signals):
cm = []
for bus in da... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_sort_signals_by_name", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_load_and_dump", "tes... | ["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 | 10 | 21 | 1,147 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2245 | 80.9485 | |||
7,381 | swe_smith::train::54020 | swe_smith | train | 54,020 | blevesearch__bleve.f2876b5e.func_pm_flip_operators__lb596cwl | swesmith/blevesearch__bleve.f2876b5e | blevesearch/bleve | go | null | Document retrieval returns nil pointer dereference
#### Description
When trying to retrieve documents from the index, the `Document()` method is causing a nil pointer dereference panic. This appears to be related to error handling logic in the document retrieval path.
#### Steps/Code to Reproduce
```go
package main... | diff --git a/index/scorch/snapshot_index.go b/index/scorch/snapshot_index.go
index 4f67a3c..392b6b0 100644
--- a/index/scorch/snapshot_index.go
+++ b/index/scorch/snapshot_index.go
@@ -472,17 +472,17 @@ func (is *IndexSnapshot) DocCount() (uint64, error) {
func (is *IndexSnapshot) Document(id string) (rv index.Documen... | ["TestCrud", "TestIndexRollback", "TestIntegration"] | ["TestBuilder", "TestIndexAliasSingle", "TestIndexAliasClosed", "TestIndexAliasEmpty", "TestIndexAliasMulti", "TestMultiSearchNoError", "TestMultiSearchSomeError", "TestMultiSearchAllError", "TestMultiSearchSecondPage", "TestMultiSearchTimeout", "TestMultiSearchTimeoutPartial", "TestIndexAliasMultipleLayer", "TestMulti... | jyangballin/swesmith.x86_64.blevesearch_1776_bleve.f2876b5e | true | null | 1 | 8 | 3 | 1,187 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2245 | 80.9485 | |||
7,382 | swe_smith::train::10368 | swe_smith | train | 10,368 | paramiko__paramiko.23f92003.func_basic__90uf1nuo | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | SFTPAttributes initialization breaks file operations with incorrect default values
When creating a new SFTPAttributes object, the default values for certain attributes cause file operations to fail. Operations like `mkdir`, `chdir`, `setstat`, and file size checks return unexpected results.
#### Steps/Code to Reprodu... | diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py
index 18ffbf8..0bae6b3 100644
--- a/paramiko/sftp_attr.py
+++ b/paramiko/sftp_attr.py
@@ -51,13 +51,13 @@ class SFTPAttributes:
Create a new (empty) SFTPAttributes object. All fields will be empty.
"""
self._flags = 0
- self.s... | ["tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_folder", "tests/test_sftp.py::TestSFTP::test_setstat", "tests/test_sftp.py::TestSFTP::test_fsetstat", "tests/test_sftp.py::TestSFTP::test_mkdir", "tests/test_sftp.py::TestSFTP::test_chdir", "tests/test_sftp.py::TestSFTP::test_utf8_chdir",... | ["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 | 8 | 10 | 1,187 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2245 | 80.9485 | |||
7,383 | swe_smith::train::8908 | swe_smith | train | 8,908 | pyupio__safety.7654596b.func_pm_remove_assign__4xjlz7pd | swesmith/pyupio__safety.7654596b | pyupio/safety | python | null | NameError in compute_fixes_per_requirements function
When using the `--apply-security-updates` flag with safety check, the function fails with a NameError because several variables are referenced before being defined.
#### Steps/Code to Reproduce
```python
from safety.safety import compute_fixes_per_requirements
# ... | diff --git a/safety/safety.py b/safety/safety.py
index 7bb6ad7..79fd026 100644
--- a/safety/safety.py
+++ b/safety/safety.py
@@ -1067,19 +1067,12 @@ def compute_fixes_per_requirements(
Returns:
Dict[str, Any]: The computed requirements with fixes.
"""
- requirements_files = get_requirements_conten... | ["tests/test_cli.py::TestSafetyCLI::test_check_with_fix"] | ["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t... | jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b | true | null | 1 | 19 | 1 | 967 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2245 | 80.9485 | |||
7,384 | swe_smith::train::4921 | swe_smith | train | 4,921 | bottlepy__bottle.a8dfef30.func_pm_ctrl_invert_if__i09o2z6z | swesmith/bottlepy__bottle.a8dfef30 | bottlepy/bottle | python | null | FileUpload.save() method broken when destination is a string path
#### Description
The `FileUpload.save()` method fails when trying to save to a string path destination. The method incorrectly calls `_copy_file()` with the string path instead of opening the file first.
#### Steps/Code to Reproduce
```python
import ... | diff --git a/bottle.py b/bottle.py
index 286b5bc..f54eb95 100755
--- a/bottle.py
+++ b/bottle.py
@@ -2775,16 +2775,15 @@ class FileUpload(object):
:param overwrite: If True, replace existing files. (default: False)
:param chunk_size: Bytes to read at a time. (default: 64kb)
"""
- ... | ["test/test_fileupload.py::TestFileUpload::test_save_buffer", "test/test_fileupload.py::TestFileUpload::test_save_dir", "test/test_fileupload.py::TestFileUpload::test_save_file", "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 | 7 | 4 | 1,206 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224333 | 80.948 | |||
7,385 | swe_smith::train::22481 | swe_smith | train | 22,481 | tweepy__tweepy.91a41c6e.func_pm_ctrl_shuffle__glwmv0fi | swesmith/tweepy__tweepy.91a41c6e | tweepy/tweepy | python | null | UnboundLocalError in Place.parse_list Method
I've encountered an issue with the `Place.parse_list` method in the `tweepy` library. It seems that the method is throwing an `UnboundLocalError` when attempting to parse a list of places. This error occurs because the `results` variable is being referenced before it is ass... | diff --git a/tweepy/models.py b/tweepy/models.py
index f29361e..b1b6ed7 100644
--- a/tweepy/models.py
+++ b/tweepy/models.py
@@ -246,17 +246,16 @@ class Place(Model):
@classmethod
def parse_list(cls, api, json_list):
+ for obj in item_list:
+ results.append(cls.parse(api, obj))
+
+ ... | ["tests/test_api.py::TweepyAPITests::testcachedresult", "tests/test_api.py::TweepyAPITests::testgeoapis", "tests/test_api.py::TweepyAPITests::testgetlistsubscribers", "tests/test_api.py::TweepyAPITests::testsearchtweets", "tests/test_api.py::TweepyAPITests::testusertimeline"] | ["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcreatede... | jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e | true | null | 1 | 9 | 5 | 1,166 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224333 | 80.948 | |||
7,386 | swe_smith::train::50840 | swe_smith | train | 50,840 | python-hyper__h11.bed0dd4a.func_basic__jbl571tr | swesmith/python-hyper__h11.bed0dd4a | python-hyper/h11 | python | null | HTTP request parsing fails with empty request lines
#### Description
When processing HTTP requests, the parser incorrectly handles cases where empty lines are received before the actual request line. This causes the connection to fail with protocol errors when it should be waiting for more data.
#### Steps/Code to R... | diff --git a/h11/_readers.py b/h11/_readers.py
index 08a9574..a41b54a 100644
--- a/h11/_readers.py
+++ b/h11/_readers.py
@@ -75,16 +75,16 @@ request_line_re = re.compile(request_line.encode("ascii"))
def maybe_read_from_IDLE_client(buf: ReceiveBuffer) -> Optional[Request]:
lines = buf.maybe_extract_lines()
i... | ["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_connection.py::test_server_talking_to_http10_client", "h11/tests/t... | ["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_client_talking_to_http10_server", "h11/tests/test_connection.py::test_408_request_timeout", "h11/tests/test_connection.p... | jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a | true | null | 1 | 8 | 27 | 1,186 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224333 | 80.948 | |||
7,387 | swe_smith::train::46557 | swe_smith | train | 46,557 | python-trio__trio.cfbbe2c1.combine_file__3kx8237i | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | Timeout functions behave incorrectly with zero and negative values
#### Description
The timeout functions `move_on_after` and `fail_after` are not working as expected when passed zero or negative timeout values. The functions should accept zero as a valid timeout (meaning immediate timeout) but currently reject it.
... | diff --git a/src/trio/_timeouts.py b/src/trio/_timeouts.py
index 7ce123c..6e083f8 100644
--- a/src/trio/_timeouts.py
+++ b/src/trio/_timeouts.py
@@ -48,13 +48,13 @@ def move_on_after(
"""
# duplicate validation logic to have the correct parameter name
- if seconds < 0:
+ if seconds <= 0:
rais... | ["src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_asyncgens", "src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_asyncgens_garbage_collection", "src/trio/_core/_tests/test_run.py::test_cancel_unbound", "src/trio/_tests/test_channel.py::test_553", "src/trio/_tests/test_dtls.py::test_smoke[ipv4]", "src/... | ["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 | 12 | 58 | 1,106 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224333 | 80.948 | |||
7,388 | swe_smith::train::21980 | swe_smith | train | 21,980 | life4__textdistance.c3aca916.func_pm_ctrl_shuffle__1izv2n0h | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | NeedlemanWunsch algorithm fails with UnboundLocalError when numpy is available
#### Description
The NeedlemanWunsch algorithm implementation has a bug where it tries to use `dist_mat` before it's defined, causing an UnboundLocalError when numpy is available.
#### Steps/Code to Reproduce
```python
import textdistanc... | diff --git a/textdistance/algorithms/edit_based.py b/textdistance/algorithms/edit_based.py
index 0a6e02f..e214e25 100644
--- a/textdistance/algorithms/edit_based.py
+++ b/textdistance/algorithms/edit_based.py
@@ -476,8 +476,13 @@ class NeedlemanWunsch(_BaseSimilarity):
return (self.similarity(*sequences) - min... | ["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[alg21]", "tests/test_edit/test_needleman_wu... | ["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 | 19 | 10 | 966 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224333 | 80.948 | |||
7,389 | swe_smith::train::32200 | swe_smith | train | 32,200 | davidhalter__parso.338a5760.func_pm_ctrl_shuffle__qytl1exa | swesmith/davidhalter__parso.338a5760 | davidhalter/parso | python | null | get_start_pos_of_prefix returns wrong position when previous_leaf is None
#### Description
When calling `get_start_pos_of_prefix()` on a PythonLeaf where the previous leaf is None (i.e., it's the first leaf), the method returns an incorrect position due to accessing an undefined variable.
#### Steps/Code to Reproduc... | diff --git a/parso/python/tree.py b/parso/python/tree.py
index 0624e67..561233b 100644
--- a/parso/python/tree.py
+++ b/parso/python/tree.py
@@ -125,22 +125,21 @@ class PythonLeaf(PythonMixin, Leaf):
return split_prefix(self, self.get_start_pos_of_prefix())
def get_start_pos_of_prefix(self):
- ""... | ["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 | 15 | 123 | 1,046 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224333 | 80.948 | |||
7,390 | r2e_gym::train::4265 | r2e_gym | train | 4,265 | numpy__35d752cbd34754667b55678f552dbdcfc5274d27 | numpy | numpy/numpy | python | 35d752cbd34754667b55678f552dbdcfc5274d27 | **Title:** Creating `np.matrix` from string with booleans raises unexpected errors
**Description:**
When attempting to create a NumPy matrix using string syntax that includes boolean values, unexpected errors are raised instead of successfully creating the matrix.
**Example Code:**
```python
from numpy import matri... | diff --git a/doc/release/1.13.0-notes.rst b/doc/release/1.13.0-notes.rst
--- a/doc/release/1.13.0-notes.rst
+++ b/doc/release/1.13.0-notes.rst
@@ -189,6 +189,11 @@
identical to what one gets by comparing an unstructured masked array and then
doing ``.all()`` over some axis.
+np.matrix with booleans elements can now... | diff --git a/numpy/matrixlib/tests/test_defmatrix.py b/numpy/matrixlib/tests/test_defmatrix.py
--- a/numpy/matrixlib/tests/test_defmatrix.py
+++ b/numpy/matrixlib/tests/test_defmatrix.py
@@ -35,8 +35,8 @@
assert_(mvec.shape == (1, 5))
def test_exceptions(self):
- # Check for TypeError when called... | null | null | namanjain12/numpy_final:35d752cbd34754667b55678f552dbdcfc5274d27 | true | null | 2 | 49 | null | 1,078 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.343 | 80.94775 | ||
7,391 | swe_smith::train::46843 | swe_smith | train | 46,843 | python-trio__trio.cfbbe2c1.func_basic__9fiio76g | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | CapacityLimiter total_tokens validation broken
#### Description
Setting `total_tokens` on a `CapacityLimiter` instance raises incorrect exceptions and behaves unexpectedly.
#### Steps/Code to Reproduce
```python
import trio
# This should work but raises ValueError instead of TypeError
limiter = trio.CapacityLimite... | diff --git a/src/trio/_sync.py b/src/trio/_sync.py
index ca37392..a68f33c 100644
--- a/src/trio/_sync.py
+++ b/src/trio/_sync.py
@@ -250,10 +250,10 @@ class CapacityLimiter(AsyncContextManagerMixin):
@total_tokens.setter
def total_tokens(self, new_total_tokens: int | float) -> None: # noqa: PYI041
i... | ["src/trio/_core/_tests/test_run.py::test_cancel_scope_repr", "src/trio/_tests/test_file_io.py::test_async_methods_wrap", "src/trio/_tests/test_file_io.py::test_open", "src/trio/_tests/test_file_io.py::test_open_context_manager", "src/trio/_tests/test_file_io.py::test_async_iter", "src/trio/_tests/test_file_io.py::test... | ["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 | 8 | 110 | 1,185 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224167 | 80.9475 | |||
7,392 | swe_smith::train::1745 | swe_smith | train | 1,745 | agronholm__typeguard.b6a7e438.func_basic__31c804qr | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | Type checking logic inverted - valid types now raise errors
#### Description
After a recent change, the type checking behavior has been completely inverted. Values that should pass type checks are now raising `TypeCheckError`, while values that should fail are passing silently.
#### Steps/Code to Reproduce
```pytho... | diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py
index 5e34036..c04bd82 100644
--- a/src/typeguard/_checkers.py
+++ b/src/typeguard/_checkers.py
@@ -902,9 +902,9 @@ def check_type_internal(
try:
annotation = evaluate_forwardref(annotation, memo)
except NameError:
- ... | ["tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_fail", "tests/test_checkers.py::TestFloat::test_bad_type", "tests/test_checkers.py::TestComplexNumber::test_bad_type", "tests/test_checkers.py::TestCallable::test_bad_type", "tests/test_checkers.py::TestCallable::test_too... | ["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::TestBytesLike::test_valid[bytes]", "tests/test_checkers.py::TestBytesLike:... | jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438 | true | null | 1 | 20 | 185 | 945 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224167 | 80.9475 | |||
7,393 | swe_smith::train::23947 | swe_smith | train | 23,947 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__71kx51mm | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | `_new_instance` method fails with UnboundLocalError when plot_settings is not None
#### Description
The `_new_instance` class method in `GenericMap` is raising an `UnboundLocalError` when `plot_settings` is provided. The variable `new_map` is being referenced before it's defined, causing map operations like `submap`,... | diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py
index bdcac77..696a43b 100644
--- a/sunpy/map/mapbase.py
+++ b/sunpy/map/mapbase.py
@@ -530,19 +530,18 @@ class GenericMap(NDData):
@classmethod
def _new_instance(cls, data, meta, plot_settings=None, **kwargs):
- """
- Instantiate a new ... | ["sunpy/map/tests/test_mapbase.py::test_shift_applied", "sunpy/map/tests/test_mapbase.py::test_set_shift", "sunpy/map/tests/test_mapbase.py::test_shift_history", "sunpy/map/tests/test_mapbase.py::test_submap_pixel[rect0-submap_out0]", "sunpy/map/tests/test_mapbase.py::test_submap_pixel[rect1-submap_out1]", "sunpy/map/t... | ["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 11 | 74 | 1,125 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224167 | 80.9475 | |||
7,394 | swe_smith::train::24565 | swe_smith | train | 24,565 | marshmallow-code__marshmallow.9716fc62.combine_file__2pef8zto | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | URL validator fails with UnboundLocalError when validating URLs
#### Description
The URL validator is throwing an `UnboundLocalError: local variable 'key' referenced before assignment` when trying to validate any URL. This affects both absolute and relative URL validation.
#### Steps/Code to Reproduce
```python
fro... | diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py
index e4536d8..fa78105 100644
--- a/src/marshmallow/validate.py
+++ b/src/marshmallow/validate.py
@@ -163,14 +163,13 @@ class URL(Validator):
def __call__(
self, relative: bool, absolute: bool, require_tld: bool
) -> t... | ["tests/test_deserialization.py::TestFieldDeserialization::test_url_field_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_url_field_non_list_validators", "tests/test_deserialization.py::TestFieldDeserialization::test_relative_url_field_deserialization", "tests/test_deserialization.py::T... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 17 | 115 | 1,005 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224167 | 80.9475 | |||
7,395 | swe_smith::train::49110 | swe_smith | train | 49,110 | mozilla__bleach.73871d76.combine_file__dlkzd5qa | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | MethodDispatcher and memoize function broken after recent changes
Description
The MethodDispatcher class and memoize decorator are not working correctly. When trying to use methods that rely on MethodDispatcher, getting KeyError exceptions instead of proper method dispatch. Also the memoize function seems to be cachi... | diff --git a/bleach/_vendor/html5lib/_utils.py b/bleach/_vendor/html5lib/_utils.py
index 635bb02..987d3eb 100644
--- a/bleach/_vendor/html5lib/_utils.py
+++ b/bleach/_vendor/html5lib/_utils.py
@@ -67,7 +67,7 @@ class MethodDispatcher(dict):
self.default = None
def __getitem__(self, key):
- return... | ["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_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm... | ["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 | 10 | 185 | 1,145 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224167 | 80.9475 | |||
7,396 | swe_smith::train::27718 | swe_smith | train | 27,718 | arrow-py__arrow.1d70d009.func_pm_ctrl_shuffle__ju0q8oac | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | Parser returns None instead of datetime when parsing with multiple formats
#### Description
When using the parser with multiple formats, the `_parse_multiformat` method returns `None` instead of a valid datetime object, causing `UnboundLocalError` in various parsing scenarios.
#### Steps/Code to Reproduce
```python... | diff --git a/arrow/parser.py b/arrow/parser.py
index 3929788..f45dcde 100644
--- a/arrow/parser.py
+++ b/arrow/parser.py
@@ -830,6 +830,13 @@ class DateTimeParser:
)
def _parse_multiformat(self, string: str, formats: Iterable[str]) -> datetime:
+
+ if _datetime is None:
+ supported_for... | ["tests/test_factory.py::TestGet::test_one_arg_timestamp", "tests/test_factory.py::TestGet::test_kwarg_normalize_whitespace", "tests/test_factory.py::TestGet::test_one_arg_iso_str", "tests/test_factory.py::TestGet::test_two_args_str_tzinfo", "tests/test_factory.py::TestGet::test_two_args_str_list", "tests/test_parser.p... | ["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te... | jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009 | true | null | 1 | 19 | 40 | 965 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224167 | 80.9475 | |||
7,397 | swe_smith::train::24103 | swe_smith | train | 24,103 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__ws5klpg5 | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | Map plotting methods fail when axes parameter is None
#### Description
When calling map plotting methods like `draw_contours()` or `plot()` without explicitly passing an axes parameter (or passing `axes=None`), the methods now raise a TypeError about needing WCSAxes instead of automatically creating appropriate axes.... | diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py
index bdcac77..e6c9422 100644
--- a/sunpy/map/mapbase.py
+++ b/sunpy/map/mapbase.py
@@ -2999,6 +2999,16 @@ class GenericMap(NDData):
return contours
def _check_axes(self, axes, warn_different_wcs=False):
+
+ if not wcsaxes_compat.is_wcsaxes... | ["sunpy/map/tests/test_mapbase.py::test_find_contours_inputs", "sunpy/map/tests/test_mapbase.py::test_plot_deprecated_positional_args"] | ["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 21 | 2 | 924 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224 | 80.947 | |||
7,398 | swe_smith::train::2165 | swe_smith | train | 2,165 | pdfminer__pdfminer.six.1a8bd2f7.func_basic__ft3ngzss | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | PDFStream constructor breaks with incorrect attribute handling
#### Description
When creating PDFStream objects, the constructor now expects a list for the `attrs` parameter instead of a dictionary, and incorrectly initializes several instance attributes. This causes failures when processing PDF files that contain st... | diff --git a/pdfminer/pdftypes.py b/pdfminer/pdftypes.py
index d333ec4..ce011be 100644
--- a/pdfminer/pdftypes.py
+++ b/pdfminer/pdftypes.py
@@ -249,12 +249,12 @@ class PDFStream(PDFObject):
rawdata: bytes,
decipher: Optional[DecipherCallable] = None,
) -> None:
- assert isinstance(attrs, ... | ["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t... | ["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 10 | 82 | 1,144 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224 | 80.947 | |||
7,399 | swe_smith::train::4838 | swe_smith | train | 4,838 | bottlepy__bottle.a8dfef30.func_basic__ptmw7jwy | swesmith/bottlepy__bottle.a8dfef30 | bottlepy/bottle | python | null | BaseResponse.copy() method returns None instead of copied response
#### Description
The `BaseResponse.copy()` method is returning `None` instead of a proper copy of the response object. This breaks functionality that depends on copying response objects, particularly redirect operations and cookie handling.
#### Step... | diff --git a/bottle.py b/bottle.py
index 286b5bc..8e476aa 100755
--- a/bottle.py
+++ b/bottle.py
@@ -1666,13 +1666,13 @@ class BaseResponse(object):
assert issubclass(cls, BaseResponse)
copy = cls()
copy.status = self.status
- copy._headers = dict((k, v[:]) for (k, v) in self._headers.... | ["test/test_environ.py::TestResponse::test_clone_cookie", "test/test_environ.py::TestRedirect::test_absolute_path", "test/test_environ.py::TestRedirect::test_host_http_1_0", "test/test_environ.py::TestRedirect::test_host_http_1_1", "test/test_environ.py::TestRedirect::test_host_http_proxy", "test/test_environ.py::TestR... | ["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 | 10 | 10 | 1,144 | 0 | 0.6 | 1 | 0.75 | 1 | 0.224 | 80.947 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.