selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
8,200
swe_smith::train::22467
swe_smith
train
22,467
tweepy__tweepy.91a41c6e.func_pm_ctrl_invert_if__z8i2x2b3
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
create_direct_message fails when using participant_id parameter Description When trying to create a direct message using the `participant_id` parameter, the function raises a TypeError instead of creating the message. This happens because the code is checking for the participant_id parameter but then raising an error...
diff --git a/tweepy/client.py b/tweepy/client.py index d463129..a404838 100644 --- a/tweepy/client.py +++ b/tweepy/client.py @@ -2805,7 +2805,7 @@ class Client(BaseClient): adds the Direct Message to it. .. note:: - + There is an alias for this method named ``create_dm``. ...
["tests/test_client.py::TweepyClientTests::test_manage_and_lookup_direct_messages"]
["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::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
7
1
1,076
0
0.6
1
0.75
1
0.202667
80.883
8,201
swe_smith::train::50182
swe_smith
train
50,182
bytedance__sonic.de4f017f.lm_rewrite__qftpxgqa
swesmith/bytedance__sonic.de4f017f
bytedance/sonic
go
null
String decoding causes segmentation fault with nil pointer dereference #### Description When decoding JSON strings, the decoder crashes with a segmentation fault due to a nil pointer dereference. This appears to happen during string unquoting operations in the JIT decoder. #### Steps/Code to Reproduce ```go package...
diff --git a/internal/decoder/jitdec/assembler_regabi_amd64.go b/internal/decoder/jitdec/assembler_regabi_amd64.go index 10f62309..a1051026 100644 --- a/internal/decoder/jitdec/assembler_regabi_amd64.go +++ b/internal/decoder/jitdec/assembler_regabi_amd64.go @@ -1288,8 +1288,13 @@ func (self *_Assembler) _asm_OP_unsupp...
["TestUnmarshal", "TestAssembler_DecodeStruct"]
["TestValid", "TestIdent", "TestCompatUnmarshalStd", "TestCompatEncoderStd", "TestCompatDecoderStd", "TestPretouch", "TestGet", "TestUnmarshalWithTrailingChars", "TestMarshal", "TestMarshalNumberZeroVal", "TestMarshalEmbeds", "TestUseNumber", "TestMarshalerError", "TestSortNodeTwitter", "TestNodeAny", "TestTypeCast2", ...
jyangballin/swesmith.x86_64.bytedance_1776_sonic.de4f017f
true
null
1
9
2
1,036
0
0.6
1
0.75
1
0.202667
80.883
8,202
swe_smith::train::31268
swe_smith
train
31,268
scrapy__scrapy.35212ec5.func_pm_ctrl_shuffle__latwbou8
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
runspider command hangs when importing non-Python files #### Description The `scrapy runspider` command hangs indefinitely when trying to run a spider from a file that doesn't have a `.py` or `.pyw` extension. Instead of immediately raising a `ValueError` as expected, the command gets stuck during the import process....
diff --git a/scrapy/commands/runspider.py b/scrapy/commands/runspider.py index 357ca8b..20cd3f0 100644 --- a/scrapy/commands/runspider.py +++ b/scrapy/commands/runspider.py @@ -17,16 +17,15 @@ if TYPE_CHECKING: def _import_file(filepath: str | PathLike[str]) -> ModuleType: abspath = Path(filepath).resolve() - ...
["tests/test_commands.py::RunSpiderCommandTest::test_absolute_path_linux", "tests/test_commands.py::RunSpiderCommandTest::test_args_change_settings", "tests/test_commands.py::RunSpiderCommandTest::test_asyncio_enabled_default", "tests/test_commands.py::RunSpiderCommandTest::test_asyncio_enabled_false", "tests/test_comm...
["tests/test_commands.py::CommandSettings::test_help_formatter", "tests/test_commands.py::CommandSettings::test_settings_json_string", "tests/test_commands.py::StartprojectTest::test_existing_project_dir", "tests/test_commands.py::StartprojectTest::test_startproject", "tests/test_commands.py::StartprojectTest::test_sta...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
1
9
15
1,036
0
0.6
1
0.75
1
0.202667
80.883
8,203
swe_smith::train::18275
swe_smith
train
18,275
msiemens__tinydb.10644a0e.func_basic__kl56b457
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Query attribute access returns None instead of query object #### Description When accessing attributes on Query objects, the method returns None instead of the expected query object, breaking query chaining and making queries unusable. #### Steps/Code to Reproduce ```python from tinydb import TinyDB, Query # Creat...
diff --git a/tinydb/queries.py b/tinydb/queries.py index 0ef6a69..355e052 100644 --- a/tinydb/queries.py +++ b/tinydb/queries.py @@ -180,18 +180,15 @@ class Query(QueryInstance): return super().__hash__() def __getattr__(self, item: str): - # Generate a new query object with the new query path - ...
["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::test_add_int[json]", "tests/test_operations.py::test_add_str[memory]", "tests/test_operations.py::test_add_str[json]", "tests/test_operations.py::...
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
13
109
956
0
0.6
1
0.75
1
0.202667
80.883
8,204
swe_smith::train::30001
swe_smith
train
30,001
getnikola__nikola.0f4c230e.func_pm_remove_assign__ck83avvw
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
Sitemap generation broken - NameError on undefined variables #### Description The sitemap generation is failing with NameError exceptions for several undefined variables. When building a site, the sitemap task crashes because variables like `base_url`, `sitemapindex`, `urlset`, `syspath`, `real_path`, `known_elm_root...
diff --git a/nikola/plugins/task/sitemap.py b/nikola/plugins/task/sitemap.py index 3777e6e..18aab8d 100644 --- a/nikola/plugins/task/sitemap.py +++ b/nikola/plugins/task/sitemap.py @@ -123,15 +123,12 @@ class Sitemap(LateTask): } output = kw['output_folder'] - base_url = kw['base_url'] ...
["tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_per_day.py::test_index_in_sitemap", "tests/integration/test_archive_per_month.py::test_index_in_sitemap", "tests/integration/test_building_in_subdir.py::test_index_in_sitemap", "tests/integration/test_category_destpath.py:...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_full_archive[overall]", "tests/integration/test_archive_full.py::test_full_arch...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
12
21
976
0
0.6
1
0.75
1
0.202667
80.883
8,205
swe_smith::train::35203
swe_smith
train
35,203
alecthomas__voluptuous.a7a55f83.combine_file__4wqvyjg4
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
Schema equality comparison broken When comparing Schema objects for equality, the comparison is not working correctly. Two identical schemas are not being recognized as equal. #### Steps/Code to Reproduce ```python from voluptuous import Schema # Create two identical schemas schema1 = Schema('foo') schema2 = Schema...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..988b8e4 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -181,9 +181,9 @@ class Schema(object): return cls(value_to_schema_type(data), **kwargs) def __eq__(self, other): - if not...
["voluptuous/tests/tests.py::test_schema_extend_handles_schema_subclass", "voluptuous/tests/tests.py::test_equality", "voluptuous/tests/tests.py::test_equality_negative", "voluptuous/tests/tests.py::test_inequality", "voluptuous/tests/tests.py::test_inequality_negative", "voluptuous/tests/tests.py::test_marker_hashable...
["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
6
10
1,096
0
0.6
1
0.75
1
0.202667
80.883
8,206
r2e_gym::train::5355
r2e_gym
train
5,355
aiohttp__0e6bbbce2d19ba2b155b4c801e95365902cae6ef
aiohttp
aio-libs/aiohttp
python
0e6bbbce2d19ba2b155b4c801e95365902cae6ef
**Title:** WebSocket client throws TimeoutError when heartbeat times out during concurrent receive **Description:** When a WebSocket client is set up with a heartbeat interval and does not receive a Pong response from the server while a receive operation is ongoing, it unexpectedly raises a `TimeoutError` and closes ...
diff --git a/CHANGES/8540.bugfix.rst b/CHANGES/8540.bugfix.rst --- a/CHANGES/8540.bugfix.rst +++ b/CHANGES/8540.bugfix.rst @@ -0,0 +1,7 @@ +Fixed WebSocket server heartbeat timeout logic to terminate `receive` and return :py:class:`~aiohttp.ServerTimeoutError` -- by :user:`arcivanov`. + +When a WebSocket pong message w...
diff --git a/tests/test_client_ws_functional.py b/tests/test_client_ws_functional.py --- a/tests/test_client_ws_functional.py +++ b/tests/test_client_ws_functional.py @@ -5,7 +5,7 @@ import pytest import aiohttp -from aiohttp import hdrs, web +from aiohttp import ServerTimeoutError, WSMsgType, hdrs, web from aioht...
null
null
namanjain12/aiohttp_final:0e6bbbce2d19ba2b155b4c801e95365902cae6ef
true
null
2
15
null
1,628
0
0.75
1
0.6375
1
0.321333
80.88275
8,207
swe_smith::train::4412
swe_smith
train
4,412
pygments__pygments.27649ebb.func_pm_remove_assign__6bv77qic
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
RTF formatter broken after recent changes #### Description The RTF formatter is completely broken and throws `NameError: name 'style' is not defined` when trying to format any code. This affects all RTF formatting functionality. #### Steps/Code to Reproduce ```python from pygments import highlight from pygments.lex...
diff --git a/pygments/formatters/rtf.py b/pygments/formatters/rtf.py index 7f8b7e4..379bd1c 100644 --- a/pygments/formatters/rtf.py +++ b/pygments/formatters/rtf.py @@ -290,11 +290,6 @@ class RtfFormatter(Formatter): if value.endswith("\n"): line_count += 1 - # width o...
["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_linenos_newline_characters", "tests/test_rtf_formatter.py::test_linenos_left_padding", "tests/test_rtf_formatter.py::t...
["tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_lineno_color_from_cli_option", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_inherit", "tests/test_html_formatter.py::test_lineanchors_with_startnum", "tests/test_html_formatter.py::test_get_style_def...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
9
25
1,035
0
0.6
1
0.75
1
0.2025
80.8825
8,208
swe_smith::train::25731
swe_smith
train
25,731
pylint-dev__astroid.b114f6b5.func_basic__j7cuhbo7
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
JoinedStr nodes return None instead of proper node object #### Description When parsing f-strings (formatted string literals), the AST rebuilder is returning `None` instead of the proper `JoinedStr` node object. This causes various inference and analysis operations to fail with `AttributeError: 'NoneType' has no attr...
diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py index 4c77906..0a0f84b 100644 --- a/astroid/rebuilder.py +++ b/astroid/rebuilder.py @@ -1248,14 +1248,14 @@ class TreeRebuilder: def visit_joinedstr(self, node: ast.JoinedStr, parent: NodeNG) -> nodes.JoinedStr: newnode = nodes.JoinedStr( - ...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-True]", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-False]", "tests/brain/n...
["tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
12
65
975
0
0.6
1
0.75
1
0.2025
80.8825
8,209
swe_smith::train::18645
swe_smith
train
18,645
seperman__deepdiff.ed252022.combine_file__8x47gdrl
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepSearch fails with AttributeError when searching in data structures #### Description When using DeepSearch to search for items in various data structures, the search functionality breaks with AttributeError exceptions. The search appears to be calling methods incorrectly on different object types. #### Steps/Code...
diff --git a/deepdiff/search.py b/deepdiff/search.py index ae86ce0..9092a39 100644 --- a/deepdiff/search.py +++ b/deepdiff/search.py @@ -135,7 +135,7 @@ class DeepSearch(dict): del self[k] def __set_or_dict(self): - return dict_() if self.verbose_level >= 2 else SetOrdered() + return S...
["tests/test_command.py::TestCommands::test_command_grep", "tests/test_search.py::TestDeepSearch::test_number_in_list", "tests/test_search.py::TestDeepSearch::test_number_in_list2", "tests/test_search.py::TestDeepSearch::test_number_in_list3", "tests/test_search.py::TestDeepSearch::test_number_in_list_strict_false", "t...
["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
12
35
975
0
0.6
1
0.75
1
0.2025
80.8825
8,210
swe_smith::train::29822
swe_smith
train
29,822
getnikola__nikola.0f4c230e.func_pm_ctrl_invert_if__bmyu9eie
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
Shortcode parsing fails with escaped characters at end of string #### Description When parsing shortcodes with escaped characters, the parser incorrectly raises an error when the escape sequence appears at the end of the input data. This affects shortcodes that use backslash escaping for special characters. #### Ste...
diff --git a/nikola/shortcodes.py b/nikola/shortcodes.py index aa3fd16..bdb597d 100644 --- a/nikola/shortcodes.py +++ b/nikola/shortcodes.py @@ -121,22 +121,21 @@ def _parse_unquoted_string(data, start, stop_at_equals): char = data[pos] if char == '\\': if pos + 1 < len(data): + ...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[overall]", "tests/integration/test_archive_full.py::test_full...
["tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_per_day.py::test_check_files", "tests/integration/test_archive_per_month.py::test_check_files", "tests/integration/test_building_in_subdir.py::test_check_files", "tests/integration/test_category_destpath.py::test_archive_exists...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
9
54
1,035
0
0.6
1
0.75
1
0.2025
80.8825
8,211
r2e_gym::train::6135
r2e_gym
train
6,135
pillow__c0f619384cbccef86185b1cc1b4da9755b1e344b
pillow
python-pillow/pillow
python
c0f619384cbccef86185b1cc1b4da9755b1e344b
**Title:** EXIF Data Not Preserved Correctly When Saving TIFF Images **Description:** When saving a TIFF image that contains EXIF metadata using the `save` method, the EXIF information is not retained as expected. This results in missing or incorrect EXIF tags in the saved image, which can lead to issues in applicatio...
diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -898,6 +898,11 @@ require a matching type in :py:attr:`~PIL.TiffImagePlugin.ImageFileDirectory_v2.tagtype` tagtype. +**exif** + ...
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 @@ -403,10 +403,8 @@ with Image.open("Tests/images/ifd_tag_type.tiff") as im: assert 0x8825 in im.tag_v2 - def test_exif(self): - with Image.open("Tests/images/ifd...
null
null
namanjain12/pillow_final:c0f619384cbccef86185b1cc1b4da9755b1e344b
true
null
2
23
null
1,467
0
0.75
1
0.6375
1
0.321167
80.88225
8,212
swe_smith::train::14244
swe_smith
train
14,244
python-openxml__python-docx.0cf6d71f.func_pm_ctrl_shuffle__ckes53tj
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Setting core properties raises UnboundLocalError when value is not a string #### Description When setting core properties with non-string values, an UnboundLocalError is raised because the `element` variable is referenced before assignment. #### Steps/Code to Reproduce ```python from docx import Document # Create ...
diff --git a/src/docx/oxml/coreprops.py b/src/docx/oxml/coreprops.py index 8ba9ff4..8dc9787 100644 --- a/src/docx/oxml/coreprops.py +++ b/src/docx/oxml/coreprops.py @@ -275,16 +275,15 @@ class CT_CoreProperties(BaseOxmlElement): del self.attrib[qn("xsi:foo")] def _set_element_text(self, prop_name: s...
["tests/opc/parts/test_coreprops.py::DescribeCorePropertiesPart::it_can_create_a_default_core_properties_part", "tests/opc/test_coreprops.py::DescribeCoreProperties::it_can_change_the_string_property_values[author-dc:creator-scanny]", "tests/opc/test_coreprops.py::DescribeCoreProperties::it_can_change_the_string_proper...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
9
7
1,034
0
0.6
1
0.75
1
0.202333
80.882
8,213
swe_smith::train::24509
swe_smith
train
24,509
sunpy__sunpy.f8edfd5c.combine_module__ic441cvf
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Incorrect order of code in parse_latitude function causes UnboundLocalError When parsing solar coordinates in SRS files, the `parse_latitude` function fails with an `UnboundLocalError` because the `latsign` dictionary is defined after it's used. ```python from sunpy.io.special import srs # This fails with: UnboundLo...
diff --git a/sunpy/io/_fits.py b/sunpy/io/_fits.py index 5513abe..eaf4ffb 100644 --- a/sunpy/io/_fits.py +++ b/sunpy/io/_fits.py @@ -235,10 +235,10 @@ def header_to_fits(header): header_items = [] for k, v in header.items(): if k.upper() in ('COMMENT', 'HV_COMMENT', 'HISTORY'): + header_it...
["sunpy/io/tests/test_fits.py::test_simple_write", "sunpy/io/tests/test_fits.py::test_extra_comment_write", "sunpy/io/tests/test_fits.py::test_simple_write_compressed", "sunpy/io/tests/test_fits.py::test_simple_write_compressed_difftypeinst", "sunpy/io/tests/test_fits.py::test_simple_write_compressed_instance[kwargs0-F...
["sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-None-4]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-1-1]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
10
29
1,014
0
0.6
1
0.75
1
0.202333
80.882
8,214
swe_smith::train::44336
swe_smith
train
44,336
pydata__patsy.a5d16484.func_pm_ctrl_shuffle__je3pt1rb
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Power operator (**) raises UnboundLocalError when used in formulas #### Description When using the power operator `**` in patsy formulas, an `UnboundLocalError` is raised due to a variable being referenced before assignment. #### Steps/Code to Reproduce ```python import patsy # This should work but raises UnboundL...
diff --git a/patsy/desc.py b/patsy/desc.py index 210350d..e017e9b 100644 --- a/patsy/desc.py +++ b/patsy/desc.py @@ -350,25 +350,24 @@ def _eval_binary_interact(evaluator, tree): def _eval_binary_power(evaluator, tree): left_expr = evaluator.eval(tree.args[0]) + # Small optimization: (a + b)**100 is just the...
["patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting"]
["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
2
794
0
0.6
1
0.75
1
0.202333
80.882
8,215
swe_smith::train::4414
swe_smith
train
4,414
pygments__pygments.27649ebb.func_pm_remove_assign__92m8rtl3
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
YAML lexer crashes with NameError when processing indented content #### Description The YAML lexer is throwing a `NameError: name 'text' is not defined` when processing YAML content with indentation. This affects both the YamlLexer and YamlJinjaLexer classes. #### Steps/Code to Reproduce ```python from pygments.lex...
diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py index 8f384bc..18fc55e 100644 --- a/pygments/lexers/data.py +++ b/pygments/lexers/data.py @@ -65,16 +65,13 @@ class YamlLexer(ExtendedRegexLexer): def save_indent(token_class, start=False): """Save a possible indentation level.""" def...
["tests/test_basic_api.py::test_random_input[YamlLexer]", "tests/test_basic_api.py::test_random_input[YamlJinjaLexer]", "tests/test_basic_api.py::test_lexer_options[YamlJinjaLexer]", "tests/test_basic_api.py::test_lexer_options[YamlLexer]", "tests/snippets/yaml/test_yaml_colon_in_key_double.txt::", "tests/examplefiles/...
["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
8
10
1,054
0
0.6
1
0.75
1
0.202333
80.882
8,216
swe_smith::train::20678
swe_smith
train
20,678
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__n4dtwi40
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Array filter function generates invalid SQL due to variable reference before definition #### Description When transpiling `ARRAY_ANY` expressions to dialects that use `UNNEST` (like BigQuery and Postgres), the generated SQL contains references to variables before they are defined, causing `UnboundLocalError`. #### S...
diff --git a/sqlglot/dialects/dialect.py b/sqlglot/dialects/dialect.py index 019833f..49873e6 100644 --- a/sqlglot/dialects/dialect.py +++ b/sqlglot/dialects/dialect.py @@ -1709,7 +1709,10 @@ def json_path_key_only_name(self: Generator, expression: exp.JSONPathKey) -> str def filter_array_using_unnest(self: Genera...
["tests/dialects/test_dialect.py::TestDialect::test_array_any"]
["tests/dialects/test_dialect.py::TestDialect::test_alias", "tests/dialects/test_dialect.py::TestDialect::test_array", "tests/dialects/test_dialect.py::TestDialect::test_cast", "tests/dialects/test_dialect.py::TestDialect::test_cast_to_user_defined_type", "tests/dialects/test_dialect.py::TestDialect::test_coalesce", "t...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
7
1
1,074
0
0.6
1
0.75
1
0.202333
80.882
8,217
r2e_gym::train::6312
r2e_gym
train
6,312
pillow__79552080ab63a66a00cda35d586835883e1a1743
pillow
python-pillow/pillow
python
79552080ab63a66a00cda35d586835883e1a1743
**Title:** Unable to Set `compression`, `orientation`, and `id_section` When Saving TGA Images **Description:** When attempting to save TGA images with the `compression`, `orientation`, or `id_section` keyword arguments, the save functionality fails to recognize these parameters. This results in errors and incorrect m...
diff --git a/src/PIL/TgaImagePlugin.py b/src/PIL/TgaImagePlugin.py --- a/src/PIL/TgaImagePlugin.py +++ b/src/PIL/TgaImagePlugin.py @@ -19,6 +19,8 @@ from . import Image, ImageFile, ImagePalette from ._binary import i8, i16le as i16, o8, o16le as o16 + +import warnings __version__ = "0.3" @@ -53,7 +55,7 @@ ...
diff --git a/Tests/test_file_tga.py b/Tests/test_file_tga.py --- a/Tests/test_file_tga.py +++ b/Tests/test_file_tga.py @@ -53,10 +53,10 @@ # Generate a new test name every time so the # test will not fail with permission error # on Windows. - ...
null
null
namanjain12/pillow_final:79552080ab63a66a00cda35d586835883e1a1743
true
null
1
32
null
1,286
0
0.75
1
0.6375
1
0.321
80.88175
8,218
swe_smith::train::52613
swe_smith
train
52,613
pydicom__pydicom.7d361b3d.func_pm_remove_cond__wbfeq52x
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
`code_dataelem` function returns undefined variable `line` #### Description The `code_dataelem` function in `pydicom.util.codify` is returning an undefined variable `line` causing a NameError when trying to generate code for DICOM data elements. #### Steps/Code to Reproduce ```python from pydicom.util.codify import...
diff --git a/src/pydicom/util/codify.py b/src/pydicom/util/codify.py index 5cc9f4b..0f57dec 100644 --- a/src/pydicom/util/codify.py +++ b/src/pydicom/util/codify.py @@ -108,11 +108,6 @@ def code_dataelem( If the data element is a sequence, calls code_sequence """ - if dataelem.VR == VR.SQ: - r...
["tests/test_cli.py::TestCLIcall::test_codify_command", "tests/test_cli.py::TestCLIcall::test_codify_UTF8", "tests/test_util.py::TestCodify::test_code_dataelem_standard", "tests/test_util.py::TestCodify::test_code_dataelem_exclude_size", "tests/test_util.py::TestCodify::test_code_dataelem_private", "tests/test_util.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
21
12
793
0
0.6
1
0.75
1
0.202167
80.8815
8,219
swe_smith::train::6931
swe_smith
train
6,931
cantools__cantools.0c6a7871.combine_file__2m5cdp48
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Database.add_dbc_file() fails with AttributeError when loading DBC files #### Description When trying to load DBC files using `Database.add_dbc_file()`, the method fails with an `AttributeError: 'NoneType' object has no attribute 'read'`. This affects all DBC file loading operations. #### Steps/Code to Reproduce ``...
diff --git a/src/cantools/database/can/database.py b/src/cantools/database/can/database.py index 6637d58..01bc9bb 100644 --- a/src/cantools/database/can/database.py +++ b/src/cantools/database/can/database.py @@ -280,7 +280,7 @@ class Database: def add_dbc_file(self, filename: StringPathLik...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_database.py::CanToolsDatabaseTest::test_add_two_dbc_files", "tests/test_database.py::CanToolsDatabaseTest::test_big_endian_no_decode_choices", "tests/test_database.py::CanToolsDatabaseTest::test_empty_ns_dbc", "tests/test_database.py::Can...
["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
49
973
0
0.6
1
0.75
1
0.202167
80.8815
8,220
swe_smith::train::33363
swe_smith
train
33,363
pallets__click.fde47b4b.combine_module__4khdz3by
swesmith/pallets__click.fde47b4b
pallets/click
python
null
Shell completion broken due to swapped constructor arguments #### Description Shell completion functionality is completely broken. When trying to use shell completion, it fails with `TypeError: 'str' object does not support item assignment` errors. #### Steps/Code to Reproduce ```python import click from click.shel...
diff --git a/src/click/shell_completion.py b/src/click/shell_completion.py index c8655b1..4daf203 100644 --- a/src/click/shell_completion.py +++ b/src/click/shell_completion.py @@ -223,9 +223,9 @@ class ShellComplete: complete_var: str, ) -> None: self.cli = cli - self.ctx_args = ctx_args ...
["tests/test_shell_completion.py::test_command", "tests/test_shell_completion.py::test_group", "tests/test_shell_completion.py::test_group_command_same_option", "tests/test_shell_completion.py::test_chained", "tests/test_shell_completion.py::test_help_option", "tests/test_shell_completion.py::test_argument_order", "tes...
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
2
10
38
1,013
0
0.6
1
0.75
1
0.202167
80.8815
8,221
swe_smith::train::31471
swe_smith
train
31,471
benoitc__gunicorn.bacbf8aa.func_basic__2md1k5bn
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
nworkers_changed callback causes TypeError when server object lacks expected methods #### Description The `nworkers_changed` callback in the configuration is causing TypeErrors when the server object passed to it doesn't have the expected `update_workers` and `set_worker_flag` methods. This breaks existing functional...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..61ab774 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -1985,7 +1985,15 @@ class NumWorkersChanged(Setting): type = callable def nworkers_changed(server, new_value, old_value): - pass + if new_value >= old_value: ...
["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_worker_class", "tests/test_config.py::test_defaults", "tests/test_config.py::test_property_access", "tests/test_config.py::test_bool_validation", "tests/test_config.py::test_pos_int_validation", "tests/test_config.py::test_str_validation", "tests/test_config.py::test_str_to_addr_list_valida...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
10
12
1,013
0
0.6
1
0.75
1
0.202167
80.8815
8,222
swe_smith::train::33495
swe_smith
train
33,495
pallets__click.fde47b4b.func_basic__693f0338
swesmith/pallets__click.fde47b4b
pallets/click
python
null
Shell completion broken due to parameter assignment mix-up #### Description Shell completion is completely broken - all completion functionality fails with `TypeError: 'str' object does not support item assignment` errors. #### Steps/Code to Reproduce ```python import click from click.shell_completion import get_co...
diff --git a/src/click/shell_completion.py b/src/click/shell_completion.py index c8655b1..4daf203 100644 --- a/src/click/shell_completion.py +++ b/src/click/shell_completion.py @@ -223,9 +223,9 @@ class ShellComplete: complete_var: str, ) -> None: self.cli = cli - self.ctx_args = ctx_args ...
["tests/test_shell_completion.py::test_command", "tests/test_shell_completion.py::test_group", "tests/test_shell_completion.py::test_group_command_same_option", "tests/test_shell_completion.py::test_chained", "tests/test_shell_completion.py::test_help_option", "tests/test_shell_completion.py::test_argument_order", "tes...
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
1
6
37
1,093
0
0.6
1
0.75
1
0.202167
80.8815
8,223
swe_smith::train::39732
swe_smith
train
39,732
tornadoweb__tornado.d5ac65c1.func_pm_ctrl_invert_if__8ro0xn0y
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
websocket_connect fails when url is HTTPRequest instance with connect_timeout #### Description When calling `websocket_connect` with an `HTTPRequest` instance and a `connect_timeout` parameter, the function raises an `AttributeError: 'str' object has no attribute 'headers'`. #### Steps/Code to Reproduce ```python f...
diff --git a/tornado/websocket.py b/tornado/websocket.py index 1e0161e..6a2b43d 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -1638,13 +1638,13 @@ def websocket_connect( Added the ``resolver`` argument. """ if isinstance(url, httpclient.HTTPRequest): + request = httpclient.HTT...
["test_message_sizes (tornado.test.websocket_test.ClientOnlyCompressionTest)", "test_size_limit (tornado.test.websocket_test.ClientOnlyCompressionTest)", "test_client_ping (tornado.test.websocket_test.ClientPeriodicPingTest)", "test_message_sizes (tornado.test.websocket_test.DefaultCompressionTest)", "test_size_limit (...
["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
true
null
1
6
44
1,093
0
0.6
1
0.75
1
0.202167
80.8815
8,224
swe_smith::train::22145
swe_smith
train
22,145
jawah__charset_normalizer.1fdd6463.func_pm_class_rm_funcs__4eixiedv
swesmith/jawah__charset_normalizer.1fdd6463
jawah/charset_normalizer
python
null
ArchaicUpperLowerPlugin missing __init__ method causes AttributeError #### Description The `ArchaicUpperLowerPlugin` class is missing its `__init__` method, which causes an `AttributeError` when trying to access instance attributes that should be initialized during object creation. #### Steps/Code to Reproduce ```p...
diff --git a/charset_normalizer/md.py b/charset_normalizer/md.py index d177db0..c541a9b 100644 --- a/charset_normalizer/md.py +++ b/charset_normalizer/md.py @@ -397,18 +397,6 @@ class CjkInvalidStopPlugin(MessDetectorPlugin): class ArchaicUpperLowerPlugin(MessDetectorPlugin): - def __init__(self) -> None: - ...
["tests/test_base_detection.py::test_content_with_bom_or_sig[\\x841\\x953\\xce\\xd2\\xc3\\xbb\\xd3\\xd0\\xc2\\xf1\\xd4\\xb9\\xa3\\xac\\xb4\\xe8\\xed\\xc8\\xb5\\xc4\\xd6\\xbb\\xca\\xc7\\xd2\\xbb\\xd0\\xa9\\xca\\xb1\\xbc\\xe4\\xa1\\xa3-gb18030]", "tests/test_base_detection.py::test_content_with_bom_or_sig[\\xff\\xfe\\x00...
["tests/test_base_detection.py::test_empty", "tests/test_base_detection.py::test_bool_matches", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xfe\\xff-utf_16]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\x841\\x953-gb18030]", "tests/test_base_detection.py::test_empty_but_with_bom_...
jyangballin/swesmith.x86_64.jawah_1776_charset_normalizer.1fdd6463
true
null
1
13
57
953
0
0.6
1
0.75
1
0.202167
80.8815
8,225
swe_smith::train::51660
swe_smith
train
51,660
pydicom__pydicom.7d361b3d.combine_module__xupig0lo
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Photometric interpretation property returns default value when option is None #### Description The `photometric_interpretation` property in `RunnerBase` is returning a default value when the option is explicitly set to `None`, instead of raising an `AttributeError` as expected. #### Steps/Code to Reproduce ```pytho...
diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py index 10a4a93..0f279bb 100644 --- a/src/pydicom/pixels/common.py +++ b/src/pydicom/pixels/common.py @@ -450,8 +450,8 @@ class RunnerBase: @property def photometric_interpretation(self) -> str: """Return the expected photometric ...
["tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_set_photometric_interpretation", "tests/pixels/test_common.py::TestRunnerBase::test_validate_options", "tests/pixels/test_common.py::TestRunnerBase::test_set_options_ds", "tests/pixels/test_common....
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_set_number_of_frames", "tests/pixels/test_common.py::TestRunnerBase::tes...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
2
13
44
953
0
0.6
1
0.75
1
0.202167
80.8815
8,226
swe_smith::train::10533
swe_smith
train
10,533
paramiko__paramiko.23f92003.func_basic__mgubgq9n
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
OrPipe initialization broken - pipe and partner swapped Description The OrPipe class initialization appears to have incorrect default values. When creating an OrPipe instance, the pipe and partner attributes are being set to unexpected values, causing issues with pipe operations. Steps/Code to Reproduce ```python i...
diff --git a/paramiko/pipe.py b/paramiko/pipe.py index 65944fa..fcb3ea6 100644 --- a/paramiko/pipe.py +++ b/paramiko/pipe.py @@ -120,9 +120,9 @@ class WindowsPipe: class OrPipe: def __init__(self, pipe): - self._set = False - self._partner = None - self._pipe = pipe + self._set = Tru...
["tests/test_buffered_pipe.py::BufferedPipeTest::test_or_pipe", "tests/test_transport.py::TransportTest::test_select", "tests/test_transport.py::TransportTest::test_select_after_close", "tests/test_transport.py::TransportTest::test_stderr_select", "tests/test_transport.py::ServiceRequestingTransportTest::test_select", ...
["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
6
7
1,093
0
0.6
1
0.75
1
0.202167
80.8815
8,227
swe_smith::train::4267
swe_smith
train
4,267
pygments__pygments.27649ebb.func_pm_class_rm_funcs__ki2xmb82
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
CFamilyLexer options not initialized when instantiated #### Description When creating instances of C/C++ lexers (CLexer, CppLexer, etc.), the lexer options like `stdlibhighlighting`, `c99highlighting`, `c11highlighting`, and `platformhighlighting` are not being initialized, causing AttributeError when the lexer tries...
diff --git a/pygments/lexers/c_cpp.py b/pygments/lexers/c_cpp.py index 0f83b71..056190a 100644 --- a/pygments/lexers/c_cpp.py +++ b/pygments/lexers/c_cpp.py @@ -245,13 +245,6 @@ class CFamilyLexer(RegexLexer): 'atomic_uint_fast64_t', 'atomic_intptr_t', 'atomic_uintptr_t', 'atomic_size_t', 'atomic_ptrd...
["tests/test_rtf_formatter.py::test_all_options", "tests/test_basic_api.py::test_random_input[ObjectiveCLexer]", "tests/test_basic_api.py::test_random_input[PikeLexer]", "tests/test_basic_api.py::test_lexer_options[ObjectiveCLexer]", "tests/test_basic_api.py::test_lexer_options[CudaLexer]", "tests/test_basic_api.py::te...
["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
8
93
1,052
0
0.6
1
0.75
1
0.202
80.881
8,228
swe_smith::train::11280
swe_smith
train
11,280
rsalmei__alive-progress.35853799.func_pm_remove_cond__xqxnbio3
swesmith/rsalmei__alive-progress.35853799
rsalmei/alive-progress
python
null
NameError in scrolling_spinner_factory when using hide parameter #### Description When using the `scrolling_spinner_factory` with certain parameter combinations, a `NameError` is raised because variables `gap` and `initial` are referenced but not defined in all code paths. #### Steps/Code to Reproduce ```python fro...
diff --git a/alive_progress/animations/spinners.py b/alive_progress/animations/spinners.py index 6f52880..d6fb2e5 100644 --- a/alive_progress/animations/spinners.py +++ b/alive_progress/animations/spinners.py @@ -89,12 +89,6 @@ def scrolling_spinner_factory(chars, length=None, block=None, background=None, * ra...
["tests/animations/test_spinners.py::test_scrolling_spinner[2-None-~-True-True-expected4]", "tests/animations/test_spinners.py::test_scrolling_spinner[2-None-~-True-False-expected5]", "tests/animations/test_spinners.py::test_scrolling_spinner[2-None-~-False-True-expected6]", "tests/animations/test_spinners.py::test_scr...
["tests/animations/test_bars.py::test_bar_tip_background[--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[_-=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[-0.0-Fa...
jyangballin/swesmith.x86_64.rsalmei_1776_alive-progress.35853799
true
null
1
7
42
1,072
0
0.6
1
0.75
1
0.202
80.881
8,229
swe_smith::train::24341
swe_smith
train
24,341
sunpy__sunpy.f8edfd5c.func_pm_remove_cond__x8g960g6
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
CDF file reading broken in TimeSeries factory #### Description When trying to read CDF files using `sunpy.timeseries.TimeSeries()`, the factory fails to detect and process CDF files properly. The CDF file detection and reading functionality appears to be completely disabled. #### Steps/Code to Reproduce ```python i...
diff --git a/sunpy/timeseries/timeseries_factory.py b/sunpy/timeseries/timeseries_factory.py index e5f59d1..0b41eb7 100644 --- a/sunpy/timeseries/timeseries_factory.py +++ b/sunpy/timeseries/timeseries_factory.py @@ -141,12 +141,7 @@ class TimeSeriesFactory(BasicRegistrationFactory): """ if "source" n...
["sunpy/timeseries/tests/test_timeseries_factory.py::test_read_cdf", "sunpy/timeseries/tests/test_timeseries_factory.py::test_read_empty_cdf"]
["sunpy/timeseries/metadata.py::sunpy.timeseries.metadata.TimeSeriesMetaData", "sunpy/timeseries/sources/eve.py::sunpy.timeseries.sources.eve.EVESpWxTimeSeries", "sunpy/timeseries/sources/fermi_gbm.py::sunpy.timeseries.sources.fermi_gbm.GBMSummaryTimeSeries", "sunpy/timeseries/sources/goes.py::sunpy.timeseries.sources....
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
8
2
1,052
0
0.6
1
0.75
1
0.202
80.881
8,230
swe_smith::train::19332
swe_smith
train
19,332
seperman__deepdiff.ed252022.func_pm_remove_cond__cvjzm7w2
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
LFUCache move_forward method breaks when target_freq_node is undefined #### Description The LFUCache implementation has a bug in the `move_forward` method where `target_freq_node` is referenced without being defined, causing a NameError when the cache needs to move items between frequency nodes. #### Steps/Code to R...
diff --git a/deepdiff/lfucache.py b/deepdiff/lfucache.py index 3aa168a..c352a80 100644 --- a/deepdiff/lfucache.py +++ b/deepdiff/lfucache.py @@ -151,12 +151,6 @@ class LFUCache: return key in self.cache def move_forward(self, cache_node, freq_node): - if freq_node.nxt is None or freq_node.nxt.fre...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_ignore_order.py::TestIgnoreOrder::test_ignore_order_max_passes[22-expected2]", "tests/test_ignore_order.py::TestIgnoreOrder::test_ignore_order_max_diffs[65-expected1]", ...
["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
9
12
1,031
0
0.6
1
0.75
1
0.201833
80.8805
8,231
swe_smith::train::6814
swe_smith
train
6,814
joke2k__faker.8b401a7d.func_pm_remove_cond__jrinzval
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
Polish PESEL generation fails for dates after 1999 #### Description The Polish PESEL number generation is broken for birth dates from year 2000 onwards. When trying to generate a PESEL for any date after 1999, the code throws an `UnboundLocalError: local variable 'month' referenced before assignment`. #### Steps/Cod...
diff --git a/faker/providers/person/pl_PL/__init__.py b/faker/providers/person/pl_PL/__init__.py index faca7f3..834d32b 100644 --- a/faker/providers/person/pl_PL/__init__.py +++ b/faker/providers/person/pl_PL/__init__.py @@ -4144,14 +4144,6 @@ class Provider(PersonProvider): month = date_of_birth.month + 8...
["tests/providers/test_person.py::TestPlPL::test_pesel_birth_date", "tests/providers/test_person.py::TestPlPL::test_pesel_sex_female", "tests/providers/test_person.py::TestPlPL::test_pesel_value_error"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
9
3
1,031
0
0.6
1
0.75
1
0.201833
80.8805
8,232
swe_smith::train::29175
swe_smith
train
29,175
tox-dev__pipdeptree.c31b6418.func_pm_ctrl_shuffle__p63chnlv
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
CLI argument parsing broken - UnboundLocalError when using command line options #### Description When using various command line options with pipdeptree, the application crashes with `UnboundLocalError: local variable 'parsed_args' referenced before assignment`. This affects multiple CLI options including `--json`, `...
diff --git a/src/pipdeptree/_cli.py b/src/pipdeptree/_cli.py index 46a984a..a0ce528 100644 --- a/src/pipdeptree/_cli.py +++ b/src/pipdeptree/_cli.py @@ -156,18 +156,17 @@ def build_parser() -> ArgumentParser: def get_options(args: Sequence[str] | None) -> Options: - parser = build_parser() - parsed_args = pa...
["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_get_options_exclude_combi...
["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack...
jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418
true
null
1
9
25
1,031
0
0.6
1
0.75
1
0.201833
80.8805
8,233
swe_smith::train::23852
swe_smith
train
23,852
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__e1fbioiz
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Map contour methods fail when map has no unit #### Description When trying to use contour methods (`draw_contours`, `find_contours`, `contour`) on a map that has no unit defined, a `TypeError` is raised incorrectly claiming that the levels argument needs to be an Astropy Quantity object, even when passing plain numer...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..5ef1382 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -2527,11 +2527,11 @@ class GenericMap(NDData): levels = np.atleast_1d(levels) if not hasattr(levels, 'unit'): if self.unit is None: - ...
["sunpy/map/tests/test_mapbase.py::test_contour_deprecation_warning", "sunpy/map/tests/test_mapbase.py::test_find_contours_contourpy", "sunpy/map/tests/test_mapbase.py::test_find_contours_skimage", "sunpy/map/tests/test_mapbase.py::test_find_contours_invalid_library", "sunpy/map/tests/test_mapbase.py::test_find_contour...
["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
7
5
1,071
0
0.6
1
0.75
1
0.201833
80.8805
8,234
swe_smith::train::32295
swe_smith
train
32,295
davidhalter__parso.338a5760.func_pm_remove_loop__7q8tvusd
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Function.iter_return_stmts() returns None instead of generator #### Description The `iter_return_stmts()` method on Function objects is not working properly and returns `None` instead of a generator that yields return statements. #### Steps/Code to Reproduce ```python import parso code = """ def example_function()...
diff --git a/parso/python/tree.py b/parso/python/tree.py index 0624e67..8d23b4b 100644 --- a/parso/python/tree.py +++ b/parso/python/tree.py @@ -597,13 +597,7 @@ class Function(ClassOrFunc): Returns a generator of `return_stmt`. """ def scan(children): - for element in children: - ...
["test/test_parser_tree.py::test_returns"]
["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
8
1
1,051
0
0.6
1
0.75
1
0.201833
80.8805
8,235
swe_smith::train::39836
swe_smith
train
39,836
tornadoweb__tornado.d5ac65c1.func_pm_remove_assign__130i4qp7
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
linkify function breaks when shortening URLs with protocol #### Description The `linkify` function in `tornado.escape` raises a `NameError` when trying to shorten URLs that contain a protocol. The variable `proto_len` is referenced but not defined in certain code paths. #### Steps/Code to Reproduce ```python import...
diff --git a/tornado/escape.py b/tornado/escape.py index 8515bf5..ac9762a 100644 --- a/tornado/escape.py +++ b/tornado/escape.py @@ -333,7 +333,7 @@ def linkify( ``javascript``. """ if extra_params and not callable(extra_params): - extra_params = " " + extra_params.strip() + pass d...
["test_linkify (tornado.test.escape_test.EscapeTestCase)"]
["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
true
null
1
10
1
1,011
0
0.6
1
0.75
1
0.201833
80.8805
8,236
swe_smith::train::38619
swe_smith
train
38,619
erikrose__parsimonious.0d3f5f93.func_basic__7w2xfe4x
swesmith/erikrose__parsimonious.0d3f5f93
erikrose/parsimonious
python
null
VisitationError.original_class attribute contains wrong value #### Description When a VisitationError is raised, the `original_class` attribute is being set to the exception instance instead of the exception class. This breaks code that checks the type of the original exception. #### Steps/Code to Reproduce ```pyth...
diff --git a/parsimonious/exceptions.py b/parsimonious/exceptions.py index b9e05bc..20aaedb 100644 --- a/parsimonious/exceptions.py +++ b/parsimonious/exceptions.py @@ -95,14 +95,14 @@ class VisitationError(ParsimoniousError): :arg node: The node at which the error occurred """ - self.origina...
["parsimonious/tests/test_grammar.py::test_inconsistent_string_types_in_grammar"]
["parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_call_vs_inline", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_lists_vs_dicts", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_startswith_vs_regex", "parsimonious/tests/test_expressions.py::LengthTests::test_not", "parsimonious/t...
jyangballin/swesmith.x86_64.erikrose_1776_parsimonious.0d3f5f93
true
null
1
6
1
1,091
0
0.6
1
0.75
1
0.201833
80.8805
8,237
swe_smith::train::42337
swe_smith
train
42,337
r1chardj0n3s__parse.30da9e4f.combine_file__gag0ta2m
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
Parser.findall() returns None instead of iterator when endpos is None #### Description When calling `findall()` without specifying an `endpos` parameter, the method returns `None` instead of a `ResultIterator`. This breaks code that expects to iterate over the results. #### Steps/Code to Reproduce ```python import ...
diff --git a/parse.py b/parse.py index 80242e1..10edca8 100644 --- a/parse.py +++ b/parse.py @@ -136,10 +136,9 @@ class FixedTzOffset(tzinfo): return self.ZERO def __eq__(self, other): + return self._name == other._name and self._offset == other._offset if not isinstance(other, FixedTzOf...
["README.rst::README.rst", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_bugs.py::test_user_type_with_group_count_issue60", "tests/test_findall.py::test_findall", "tests/test_findall.py::test_no_evaluate...
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_bugs.py::test_unmatched_brace_doesnt_match", "tests/test_bugs.py::test_pickling_bug_110", "tests/test_bugs.py::test_unused_centered_alignment_bug", "tests/test_bugs.py::test_unuse...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
12
36
971
0
0.6
1
0.75
1
0.201833
80.8805
8,238
swe_smith::train::52510
swe_smith
train
52,510
pydicom__pydicom.7d361b3d.func_pm_remove_assign__p3iutb6c
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
JIS X 0201 encoding fails with NameError for undefined 'encoder' variable #### Description When encoding strings to JIS X 0201 character set, the function `_encode_to_jis_x_0201` fails with a `NameError` because the `encoder` variable is referenced but not defined in certain code paths. #### Steps/Code to Reproduce ...
diff --git a/src/pydicom/charset.py b/src/pydicom/charset.py index 28a777e..dbafc6a 100644 --- a/src/pydicom/charset.py +++ b/src/pydicom/charset.py @@ -129,14 +129,10 @@ def _encode_to_jis_x_0201(value: str, errors: str = "strict") -> bytes: JIS X 0201. """ - encoder_class = codecs.getincrementalenc...
["tests/test_charset.py::TestCharset::test_nested_character_sets", "tests/test_charset.py::TestCharset::test_inherited_character_set_in_sequence", "tests/test_charset.py::TestCharset::test_charset_patient_names[chrH32-\\uff94\\uff8f\\uff80\\uff9e^\\uff80\\uff9b\\uff73=\\u5c71\\u7530^\\u592a\\u90ce=\\u3084\\u307e\\u3060...
["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
9
6
1,031
0
0.6
1
0.75
1
0.201833
80.8805
8,239
swe_smith::train::44283
swe_smith
train
44,283
pydata__patsy.a5d16484.func_pm_ctrl_invert_if__gjviars0
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Categorical factor detection logic inverted When processing factors in formulas, the logic for determining whether a factor should be treated as categorical or numeric appears to be inverted. This causes numeric factors to be processed as categorical and categorical factors to be processed as numeric. #### Steps/Code...
diff --git a/patsy/build.py b/patsy/build.py index cbe2524..8feb953 100644 --- a/patsy/build.py +++ b/patsy/build.py @@ -490,18 +490,18 @@ def _examine_factor_types(factors, factor_states, data_iter_maker, NA_action): for factor in list(examine_needed): value = factor.eval(factor_states[factor], d...
["patsy/build.py::test__examine_factor_types", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths", "patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy...
["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
13
30
951
0
0.6
1
0.75
1
0.201833
80.8805
8,240
swe_smith::train::12991
swe_smith
train
12,991
python-openxml__python-docx.0cf6d71f.combine_module__5c3u69pv
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Document numbering part access returns None instead of numbering part #### Description When accessing the numbering part of a document, the method returns `None` instead of the expected numbering part object. This breaks functionality that depends on numbering definitions in Word documents. #### Steps/Code to Reprod...
diff --git a/src/docx/parts/document.py b/src/docx/parts/document.py index 416bb1a..447973d 100644 --- a/src/docx/parts/document.py +++ b/src/docx/parts/document.py @@ -96,11 +96,11 @@ class DocumentPart(StoryPart): Creates an empty numbering part if one is not present. """ try: - ...
["tests/parts/test_document.py::DescribeDocumentPart::it_provides_access_to_the_numbering_part", "tests/parts/test_document.py::DescribeDocumentPart::and_it_creates_a_numbering_part_if_not_present", "tests/parts/test_numbering.py::Describe_NumberingDefinitions::it_knows_how_many_numbering_definitions_it_contains[0]", "...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
2
12
6
971
0
0.6
1
0.75
1
0.201833
80.8805
8,241
swe_smith::train::26352
swe_smith
train
26,352
pylint-dev__astroid.b114f6b5.func_pm_remove_assign__c6a5bjw0
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
NameError when building modules from loaders without source #### Description When using AstroidBuilder to build modules from loaders that don't provide source code, a NameError is raised because the `source` variable is referenced before being defined. #### Steps/Code to Reproduce ```python import astroid from astr...
diff --git a/astroid/builder.py b/astroid/builder.py index b80090b..2245ecd 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -88,7 +88,6 @@ class AstroidBuilder(raw_building.InspectBuilder): # filesystem to read the source file from ourselves. if loader: modname = modname or mo...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-True]", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-False]", "tests/brain/n...
["tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
6
131
1,090
0
0.6
1
0.75
1
0.201667
80.88
8,242
swe_smith::train::49402
swe_smith
train
49,402
mozilla__bleach.73871d76.func_pm_class_rm_funcs__kvkjksy6
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
ActiveFormattingElements missing nodesEqual method causes AttributeError #### Description When processing HTML with links inside other elements, bleach raises an AttributeError because the `nodesEqual` method is missing from the `ActiveFormattingElements` class. #### Steps/Code to Reproduce ```python import bleach ...
diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py index 2869da0..ab3a84d 100644 --- a/bleach/_vendor/html5lib/treebuilders/base.py +++ b/bleach/_vendor/html5lib/treebuilders/base.py @@ -133,16 +133,6 @@ class ActiveFormattingElements(list): bre...
["tests/test_linkify.py::test_link_in_html", "tests/test_linkify.py::test_elements_inside_links"]
["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
2
1,010
0
0.6
1
0.75
1
0.201667
80.88
8,243
swe_smith::train::21012
swe_smith
train
21,012
tobymao__sqlglot.036601ba.func_pm_remove_cond__vfr475fw
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
qualify_outputs function breaks when scope variable is undefined #### Description The `qualify_outputs` function in `sqlglot/optimizer/qualify_columns.py` fails with a `NameError` when called with an `Expression` parameter. The function attempts to reference a `scope` variable that is no longer defined after recent c...
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..9292d22 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -757,12 +757,6 @@ def _add_replace_columns( def qualify_outputs(scope_or_expression: Scope | exp.Expression) ...
["tests/test_optimizer.py::TestOptimizer::test_canonicalize", "tests/test_optimizer.py::TestOptimizer::test_expand_alias_refs", "tests/test_optimizer.py::TestOptimizer::test_file_schema", "tests/test_optimizer.py::TestOptimizer::test_lateral_annotation", "tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", ...
["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
18
1,070
0
0.6
1
0.75
1
0.201667
80.88
8,244
swe_smith::train::27027
swe_smith
train
27,027
tkrajina__gpxpy.09fc46b3.func_basic__siguc8mo
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPXTrackPoint.course_between() raises ValueError with certain coordinates #### Description When calculating the course between two GPX track points with specific coordinate combinations, the `course_between()` method raises a `ValueError: math domain error`. This appears to happen when the underlying mathematical cal...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..b72c3b0 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -676,12 +676,12 @@ class GPXTrackPoint(mod_geo.Location): """ if not track_point: - return None + return 0.0 - course = mod_geo.get_course(self.latitude, sel...
["test.py::GPXTests::test_course_between"]
["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
8
1
1,050
0
0.6
1
0.75
1
0.201667
80.88
8,245
swe_smith::train::4394
swe_smith
train
4,394
pygments__pygments.27649ebb.func_pm_op_swap__567fje69
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
RTF formatter produces incorrect output for unicode characters #### Description The RTF formatter is generating malformed RTF output when processing unicode characters. The formatter appears to be using incorrect mathematical expressions in the unicode handling logic, causing string formatting errors. #### Steps/Cod...
diff --git a/pygments/formatters/rtf.py b/pygments/formatters/rtf.py index 7f8b7e4..9d8d0fc 100644 --- a/pygments/formatters/rtf.py +++ b/pygments/formatters/rtf.py @@ -168,19 +168,18 @@ class RtfFormatter(Formatter): buf = [] for c in text: cn = ord(c) - if cn < (2**7): + ...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_formatter.py::test_linenos_left_padding", "tests/test_rtf_formatter.py::test_linenostart", "tests/test_rtf_formatter.py::test_escape_characters", "tests/test_rtf_formatt...
["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_all_options", "tests/test_rtf_formatter.py::test_lineno_color_from_cli_option", "tests/test_rtf_formatter.py::test_linen...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
9
20
1,030
0
0.6
1
0.75
1
0.201667
80.88
8,246
swe_smith::train::51743
swe_smith
train
51,743
pydicom__pydicom.7d361b3d.func_basic__42qyfv3h
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Dataset.__dir__ returns empty list after recent changes #### Description The `Dataset.__dir__()` method is now returning an empty list instead of the expected attributes. This affects auto-completion and introspection functionality. #### Steps/Code to Reproduce ```python import pydicom from pydicom import Dataset ...
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..f8f71ae 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -736,10 +736,10 @@ class Dataset: List of attributes is used, for example, in auto-completion in editors or command-line environments. """ - ...
["tests/test_dataset.py::TestDataset::test_dir_attr", "tests/test_dataset.py::TestDataset::test_dir_subclass", "tests/test_dataset.py::TestDataset::test_trait_names", "tests/test_dataset.py::TestFileDataset::test_dataset_overrides_all_dict_attributes", "tests/test_filereader.py::TestReader::test_dir"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
6
5
1,090
0
0.6
1
0.75
1
0.201667
80.88
8,247
swe_smith::train::24116
swe_smith
train
24,116
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__yx43yyht
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Map unit parsing fails with UnboundLocalError #### Description When creating or performing operations on maps, unit parsing fails with `UnboundLocalError: cannot access local variable 'replacements' where it is not associated with a value`. This affects map creation and arithmetic operations. #### Steps/Code to Repr...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..edd9a6e 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -789,11 +789,12 @@ class GenericMap(NDData): @staticmethod def _parse_fits_unit(unit_str): - replacements = {'gauss': 'G', - 'counts /...
["sunpy/map/tests/test_mapbase.py::test_unit", "sunpy/map/tests/test_mapbase.py::test_save_asdf", "sunpy/map/tests/test_mapbase.py::test_repr_html", "sunpy/map/tests/test_mapbase.py::test_quicklook", "sunpy/map/tests/test_mapbase.py::test_find_contours_units", "sunpy/map/tests/test_mapbase.py::test_find_contours_inputs...
["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
7
26
1,070
0
0.6
1
0.75
1
0.201667
80.88
8,248
swe_smith::train::24586
swe_smith
train
24,586
marshmallow-code__marshmallow.9716fc62.combine_module__1wlcf7hj
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
URL validation fails with UnboundLocalError #### Description URL validation is broken and raises `UnboundLocalError: local variable 'key' referenced before assignment` when trying to validate any URL. #### Steps/Code to Reproduce ```python from marshmallow import validate # This should work but raises UnboundLocal...
diff --git a/src/marshmallow/class_registry.py b/src/marshmallow/class_registry.py index d41b112..1ff1b0d 100644 --- a/src/marshmallow/class_registry.py +++ b/src/marshmallow/class_registry.py @@ -77,18 +77,17 @@ def get_class(classname: str, all: bool = False) -> list[SchemaType] | SchemaTyp """ try: ...
["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
2
12
109
970
0
0.6
1
0.75
1
0.201667
80.88
8,249
swe_smith::train::19078
swe_smith
train
19,078
seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__9trajq2x
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Delta operations fail with UnboundLocalError when ignore_order is used #### Description When applying delta operations with `ignore_order=True`, the code raises an `UnboundLocalError` because the `max_len` variable is referenced before assignment in the `_do_ignore_order_get_old` method. #### Steps/Code to Reproduce...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..7efacfa 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -703,11 +703,7 @@ class Delta: self._simple_set_elem_value(parent, path_for_err_reporting=path, elem=elem, value=new_value, action=action) def _do_ignore_order_get_old(...
["tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_order_case1]", "tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_order_case2]", "tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_order_case_reverse2]", "test...
["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
9
14
1,030
0
0.6
1
0.75
1
0.201667
80.88
8,250
swe_smith::train::21812
swe_smith
train
21,812
life4__textdistance.c3aca916.combine_file__st733ebe
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Union operation returns empty Counter for token-based algorithms #### Description Token-based distance algorithms like Jaccard, Cosine, Overlap, and Sorensen are returning incorrect results, often causing division by zero errors. The union operation for counters appears to be returning empty results instead of the ex...
diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py index 5ce8cc7..ff14a2a 100644 --- a/textdistance/algorithms/base.py +++ b/textdistance/algorithms/base.py @@ -145,9 +145,9 @@ class Base: return intersection def _union_counters(self, *sequences: Counter[T]) -> Counter[T]: - ...
["tests/test_common.py::test_normalization_range[alg10]", "tests/test_common.py::test_normalization_by_one[alg10]", "tests/test_common.py::test_normalization_monotonic[alg10]", "tests/test_common.py::test_no_common_chars[alg10]", "tests/test_token/test_cosine.py::test_distance[test-text-0.75]", "tests/test_token/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
10
15
1,010
0
0.6
1
0.75
1
0.201667
80.88
8,251
swe_smith::train::55700
swe_smith
train
55,700
RoaringBitmap__roaring.09c46a0a.func_pm_op_swap__tu7cyr9q
swesmith/RoaringBitmap__roaring.09c46a0a
roaringbitmap/roaring
go
null
Binary search in roaringArray64 causes index out of bounds panic #### Description When adding elements to a 64-bit roaring bitmap, the binary search implementation in `roaringArray64.binarySearch` can cause an index out of bounds panic. This appears to happen during normal bitmap operations when the search algorithm ...
diff --git a/roaring64/roaringarray64.go b/roaring64/roaringarray64.go index 09c366f..e741835 100644 --- a/roaring64/roaringarray64.go +++ b/roaring64/roaringarray64.go @@ -279,18 +279,18 @@ func (ra *roaringArray64) binarySearch(begin, end int64, ikey uint32) int { low := begin high := end - 1 for low+16 <= high...
["TestParAggregations", "TestParAggregations/par0", "TestParAggregations/par0/advanced_case"]
["TestParAggregations/par1", "TestParAggregations/par1/simple_case", "TestParAggregations/par1/aggregate_nothing", "TestParAggregations/par1/single_bitmap", "TestParAggregations/par1/empty_and_single_elem_bitmaps", "TestParAggregations/par1/two_single_elem_disjoint_sets", "TestParAggregations/par1/3_bitmaps_with_CoW_se...
jyangballin/swesmith.x86_64.roaringbitmap_1776_roaring.09c46a0a
true
null
1
6
3
1,089
0
0.6
1
0.75
1
0.2015
80.8795
8,252
swe_smith::train::5523
swe_smith
train
5,523
PyCQA__flake8.cf1542ce.func_pm_class_rm_funcs__vhwpncdw
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
StyleGuide.should_report_error method missing after refactor #### Description The `should_report_error` method has been removed from the `StyleGuide` class, but code that depends on this method is now broken. This method was used to determine if an error code should be reported based on select and ignore rules. ####...
diff --git a/src/flake8/style_guide.py b/src/flake8/style_guide.py index a409484..bb0f50d 100644 --- a/src/flake8/style_guide.py +++ b/src/flake8/style_guide.py @@ -364,20 +364,6 @@ class StyleGuide: logger=LOG, ) - def should_report_error(self, code: str) -> Decision: - """Determine i...
["tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_main.py::test_form_feed_line_split", "tests/integration/test_main.py::test_statistics_option", "tests/integration/test_main.py::test_show_source_option", "tests/integration/test_main.py::test_errors_sorted", "tests/integration/test_main.p...
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_gen]", "tests/in...
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
16
29
889
0
0.6
1
0.75
1
0.2015
80.8795
8,253
swe_smith::train::45012
swe_smith
train
45,012
mahmoud__glom.fb3c4e76.func_pm_remove_cond__2s6gpxxp
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Coalesce constructor validation removed causing unexpected behavior #### Description The `Coalesce` class constructor no longer validates its arguments properly. Previously it would raise a `ValueError` when both `default` and `default_factory` were provided, and it would properly handle the `skip` parameter. Now the...
diff --git a/glom/core.py b/glom/core.py index cee71a3..812c999 100644 --- a/glom/core.py +++ b/glom/core.py @@ -901,21 +901,12 @@ class Coalesce: self._orig_kwargs = dict(kwargs) self.default = kwargs.pop('default', _MISSING) self.default_factory = kwargs.pop('default_factory', _MISSING) - ...
["glom/test/test_basic.py::test_coalesce"]
["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_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "glom/test/test_basic.py::test_abstract_ite...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
9
1
1,028
0
0.6
1
0.75
1
0.201333
80.879
8,254
swe_smith::train::45153
swe_smith
train
45,153
modin-project__modin.8c7799fd.func_pm_remove_assign__aauresks
swesmith/modin-project__modin.8c7799fd
modin-project/modin
python
null
Array.prod() method raises NameError for undefined variables #### Description The `prod()` method on modin numpy arrays is broken and raises a `NameError` due to undefined variables being referenced in the implementation. #### Steps/Code to Reproduce ```python import modin.numpy as np import numpy # Simple case th...
diff --git a/modin/numpy/arr.py b/modin/numpy/arr.py index ab40eca..84ec1d2 100644 --- a/modin/numpy/arr.py +++ b/modin/numpy/arr.py @@ -1680,12 +1680,6 @@ class array(object): def prod( self, axis=None, dtype=None, out=None, keepdims=None, initial=None, where=True ): - out_dtype = ( - ...
["modin/tests/numpy/test_array_axis_functions.py::test_prod"]
["modin/tests/numpy/test_array.py::test_shape[100]", "modin/tests/numpy/test_array.py::test_shape[size1]", "modin/tests/numpy/test_array.py::test_shape[size2]", "modin/tests/numpy/test_array.py::test_shape[size3]", "modin/tests/numpy/test_array.py::test_shape[size4]", "modin/tests/numpy/test_array.py::test_dtype", "mod...
jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd
true
null
1
11
1
988
0
0.6
1
0.75
1
0.201333
80.879
8,255
swe_smith::train::23484
swe_smith
train
23,484
pyparsing__pyparsing.533adf47.func_basic__86mlpof1
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
streamline() method returns None instead of self #### Description The `streamline()` method in `ParserElement` is returning `None` instead of returning `self`, breaking method chaining and causing issues with parser element operations. #### Steps/Code to Reproduce ```python import pyparsing as pp # Create a simple...
diff --git a/pyparsing/core.py b/pyparsing/core.py index 777165c..7bc5159 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -1952,9 +1952,9 @@ class ParserElement(ABC): return str(self) def streamline(self) -> ParserElement: - self.streamlined = True - self._defaultName = None - ...
["tests/test_unit.py::Test02_WithoutPackrat::testSetName", "tests/test_unit.py::Test04_WithPackrat::testSetName", "tests/test_unit.py::Test06_WithBoundedPackrat::testSetName", "tests/test_unit.py::Test08_WithUnboundedPackrat::testSetName", "tests/test_unit.py::Test09_WithLeftRecursionParsing::testSetName", "tests/test_...
["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse...
jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47
true
null
1
6
6
1,088
0
0.6
1
0.75
1
0.201333
80.879
8,256
swe_smith::train::4443
swe_smith
train
4,443
pygments__pygments.27649ebb.func_pm_remove_assign__poeitos6
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
BBCodeFormatter produces broken output due to undefined variables #### Description The BBCodeFormatter is producing broken output and raising NameError exceptions when formatting code. The formatter appears to have undefined variables `start` and `end` that are being referenced but not properly set. #### Steps/Code ...
diff --git a/pygments/formatters/bbcode.py b/pygments/formatters/bbcode.py index 9554081..3441309 100644 --- a/pygments/formatters/bbcode.py +++ b/pygments/formatters/bbcode.py @@ -86,12 +86,11 @@ class BBCodeFormatter(Formatter): for ttype, value in tokensource: while ttype not in self.styles: ...
["tests/test_basic_api.py::test_formatter_unicode_handling[BBCodeFormatter]", "tests/test_basic_api.py::test_formatter_public_api[BBCodeFormatter]"]
["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
7
2
1,068
0
0.6
1
0.75
1
0.201333
80.879
8,257
swe_smith::train::21691
swe_smith
train
21,691
buriy__python-readability.40256f40.func_pm_remove_assign__vry4nph0
swesmith/buriy__python-readability.40256f40
buriy/python-readability
python
null
NameError in score_paragraphs method when processing HTML documents #### Description When trying to extract article content from HTML documents, the readability library throws a `NameError` for undefined variables in the `score_paragraphs` method. #### Steps/Code to Reproduce ```python from readability import Docum...
diff --git a/readability/readability.py b/readability/readability.py index c86e7d1..0e4c592 100755 --- a/readability/readability.py +++ b/readability/readability.py @@ -347,11 +347,8 @@ class Document: return float(link_length) / max(total_length, 1) def score_paragraphs(self): - MIN_LEN = self.m...
["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::TestArticleOnly::test_many_repeated_spaces", "tests/test_article_only.py::TestArticleOnly::test_not_self_closing", "tests/test_article_onl...
["tests/test_article_only.py::TestArticleOnly::test_author_absent", "tests/test_article_only.py::TestArticleOnly::test_author_present"]
jyangballin/swesmith.x86_64.buriy_1776_python-readability.40256f40
true
null
1
10
9
1,008
0
0.6
1
0.75
1
0.201333
80.879
8,258
swe_smith::train::20725
swe_smith
train
20,725
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__vhbobgk2
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in Teradata date arithmetic operations #### Description When using date arithmetic operations with intervals in Teradata dialect, an `UnboundLocalError` occurs due to a variable being referenced before assignment. #### Steps/Code to Reproduce ```python import sqlglot # This should work but raises...
diff --git a/sqlglot/dialects/teradata.py b/sqlglot/dialects/teradata.py index 76f3ca5..5d7fe57 100644 --- a/sqlglot/dialects/teradata.py +++ b/sqlglot/dialects/teradata.py @@ -20,11 +20,13 @@ def _date_add_sql( ) -> t.Callable[[Teradata.Generator, exp.DateAdd | exp.DateSub], str]: def func(self: Teradata.Generat...
["tests/dialects/test_teradata.py::TestTeradata::test_time"]
["tests/dialects/test_teradata.py::TestTeradata::test_abbrev", "tests/dialects/test_teradata.py::TestTeradata::test_cast", "tests/dialects/test_teradata.py::TestTeradata::test_create", "tests/dialects/test_teradata.py::TestTeradata::test_datatype", "tests/dialects/test_teradata.py::TestTeradata::test_insert", "tests/di...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
9
1
1,028
0
0.6
1
0.75
1
0.201333
80.879
8,259
swe_smith::train::1619
swe_smith
train
1,619
Cog-Creators__Red-DiscordBot.33e0eac7.func_pm_remove_assign__dcjv89vr
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
Dev command traceback formatting broken after recent changes #### Description The dev command's exception formatting is not working correctly. When running code that produces exceptions, the traceback output is missing critical information like line numbers and source code context. #### Steps/Code to Reproduce Try ...
diff --git a/redbot/core/dev_commands.py b/redbot/core/dev_commands.py index b0deb5c..9b279ac 100644 --- a/redbot/core/dev_commands.py +++ b/redbot/core/dev_commands.py @@ -313,14 +313,11 @@ class DevOutput: the code that was provided by the user. This is needed for cases where we wrap user's code...
["tests/core/test_dev_commands.py::test_regression_format_exception_from_previous_snippet"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
1
14
1
928
0
0.6
1
0.75
1
0.201333
80.879
8,260
r2e_gym::train::5739
r2e_gym
train
5,739
scrapy__7c148fce5acc100f5f01719db374578bfca2512a
scrapy
scrapy/scrapy
python
7c148fce5acc100f5f01719db374578bfca2512a
**Title:** `deepcopy()` Method Missing from `Item` Class Causes AttributeError **Description:** When attempting to create a deep copy of an `Item` instance, the `deepcopy()` method is not available. This results in an `AttributeError`, preventing developers from duplicating items without referencing the original. **E...
diff --git a/docs/topics/items.rst b/docs/topics/items.rst --- a/docs/topics/items.rst +++ b/docs/topics/items.rst @@ -40,6 +40,7 @@ name = scrapy.Field() price = scrapy.Field() stock = scrapy.Field() + tags = scrapy.Field() last_updated = scrapy.Field(serializer=str) .. no...
diff --git a/tests/test_item.py b/tests/test_item.py --- a/tests/test_item.py +++ b/tests/test_item.py @@ -248,6 +248,14 @@ self.assertNotEqual(id(item), id(copied_item)) copied_item['name'] = copied_item['name'].upper() self.assertNotEqual(item['name'], copied_item['name']) + + def test_d...
null
null
namanjain12/scrapy_final:7c148fce5acc100f5f01719db374578bfca2512a
true
null
2
52
null
880
0
0.75
1
0.6375
1
0.32
80.87875
8,261
swe_smith::train::26072
swe_smith
train
26,072
pylint-dev__astroid.b114f6b5.func_basic__wpaop2an
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Exception instances not properly inferred for exception subclasses #### Description When inferring instances of exception subclasses, astroid incorrectly returns regular Instance objects instead of ExceptionInstance objects. This affects the behavior of exception-specific attributes and methods. #### Steps/Code to R...
diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 99ed796..debba85 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -2309,12 +2309,12 @@ class ClassDef( from astroid import objects # pylint: dis...
["tests/test_object_model.py::TestExceptionInstanceModel::test_str_argument_not_required"]
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
8
1
1,047
0
0.6
1
0.75
1
0.201167
80.8785
8,262
swe_smith::train::34995
swe_smith
train
34,995
pyutils__line_profiler.a646bf0f.func_basic__v1ra36hb
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
@profile decorator returns None instead of wrapped function #### Description When using the `@profile` decorator from line_profiler, the decorator is returning `None` instead of the properly wrapped function. This breaks basic functionality where decorated functions should still be callable. #### Steps/Code to Repro...
diff --git a/line_profiler/line_profiler.py b/line_profiler/line_profiler.py index 2a71d03..b44be2d 100755 --- a/line_profiler/line_profiler.py +++ b/line_profiler/line_profiler.py @@ -74,14 +74,14 @@ class LineProfiler(CLineProfiler): """ self.add_function(func) if is_classmethod(func): - ...
["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_script_with_prof_...
["tests/test_autoprofile.py::test_autoprofile_module", "tests/test_autoprofile.py::test_autoprofile_module_list", "tests/test_autoprofile.py::test_autoprofile_module_with_prof_imports", "tests/test_cli.py::test_version_agreement", "tests/test_complex_case.py::test_complex_example_python_none", "tests/test_duplicate_fun...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
1
10
16
1,007
0
0.6
1
0.75
1
0.201167
80.8785
8,263
r2e_gym::train::5517
r2e_gym
train
5,517
aiohttp__86b97776aa454984daf2a9c42b686eb05b65bdf7
aiohttp
aio-libs/aiohttp
python
86b97776aa454984daf2a9c42b686eb05b65bdf7
**Title:** Handlers Returning Invalid Types Cause Server Disconnection Instead of 500 Error **Description:** When a request handler returns an invalid type, such as a string or `None`, the server unexpectedly disconnects instead of responding with a proper error message. This behavior leads to clients encountering a `...
diff --git a/CHANGES/8845.bugfix.rst b/CHANGES/8845.bugfix.rst --- a/CHANGES/8845.bugfix.rst +++ b/CHANGES/8845.bugfix.rst @@ -0,0 +1 @@ +Changed behaviour when returning an invalid response to send a 500 response -- by :user:`Dreamsorcerer`. diff --git a/aiohttp/web_protocol.py b/aiohttp/web_protocol.py --- a/aiohttp/...
diff --git a/tests/test_web_functional.py b/tests/test_web_functional.py --- a/tests/test_web_functional.py +++ b/tests/test_web_functional.py @@ -101,12 +101,8 @@ server = await aiohttp_server(app, logger=logger) client = await aiohttp_client(server) - with pytest.raises(aiohttp.ServerDisconnectedError)...
null
null
namanjain12/aiohttp_final:86b97776aa454984daf2a9c42b686eb05b65bdf7
true
null
2
37
null
1,179
0
0.75
1
0.6375
1
0.319833
80.87825
8,264
swe_smith::train::27140
swe_smith
train
27,140
tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__5mr3ewqj
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX walk method fails with UnboundLocalError when accessing variables #### Description When using the `gpx.walk()` method to iterate through GPX points, accessing the loop variables after iteration raises an `UnboundLocalError`. The variables `track_no`, `segment_no`, and `point_no` are not accessible outside the loo...
diff --git a/test.py b/test.py index 7dd6f44..a0389fa 100644 --- a/test.py +++ b/test.py @@ -1201,18 +1201,17 @@ class GPXTests(mod_unittest.TestCase): self.assertEqual(point_no, len(gpx.routes[0].points) - 1) def test_walk_gpx_points(self) -> None: - gpx = self.parse('korita-zbevnica.gpx') - - ...
["test.py::GPXTests::test_walk_gpx_points"]
["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
11
1
986
0
0.6
1
0.75
1
0.201
80.878
8,265
swe_smith::train::19444
swe_smith
train
19,444
seperman__deepdiff.ed252022.func_pm_remove_wrapper__cg6npc5m
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepHash not storing hashes breaks ignore_order functionality #### Description When using `ignore_order=True` in DeepDiff, the comparison fails because DeepHash is no longer storing computed hashes in its internal hash dictionary. This causes KeyError exceptions when the ignore_order algorithm tries to retrieve previ...
diff --git a/deepdiff/deephash.py b/deepdiff/deephash.py index 1f293bd..e32816b 100644 --- a/deepdiff/deephash.py +++ b/deepdiff/deephash.py @@ -584,18 +584,8 @@ class DeepHash(Base): ignore_string_case=self.ignore_string_case) result = self.hasher(result_cleaned) - # It is im...
["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_cache_deeply_nested_b", "tests/test_cache.py::TestCache::te...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_command.py::TestCommands::test_diff_command[t1.toml-t2.toml-10.0.0.2-0]", "tests/test_command.py::TestCommands::test_cli_cant_find_file", "tests/test_command.py::TestCommands::...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
10
196
1,006
0
0.6
1
0.75
1
0.201
80.878
8,266
swe_smith::train::51398
swe_smith
train
51,398
spulec__freezegun.5f171db0.func_pm_class_rm_funcs__n83sv680
swesmith/spulec__freezegun.5f171db0
spulec/freezegun
python
null
Coroutine freezing not working in freezegun I'm using freezegun 1.2.2 with Python 3.10 and I'm having an issue with freezing time in coroutines. When I try to use freezegun with async functions, I get an AttributeError. Here's a simple reproduction script: ```python import asyncio import datetime from freezegun impo...
diff --git a/freezegun/api.py b/freezegun/api.py index d235292..3ea2000 100644 --- a/freezegun/api.py +++ b/freezegun/api.py @@ -611,10 +611,6 @@ class _freeze_time: def __call__(self, func: "Callable[P, Awaitable[Any]]") -> "Callable[P, Awaitable[Any]]": ... - @overload - def __call__(self, func:...
["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_time", "tests/test_class_import.py::test_import_date...
jyangballin/swesmith.x86_64.spulec_1776_freezegun.5f171db0
true
null
1
8
1
1,046
0
0.6
1
0.75
1
0.201
80.878
8,267
swe_smith::train::41842
swe_smith
train
41,842
scanny__python-pptx.278b47b1.func_basic__xpfbm7xo
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
#### Description When calling `part_with_reltype()` on a relationships collection, the method incorrectly raises a `ValueError` for single relationships and returns the wrong part when multiple relationships exist. #### Steps/Code to Reproduce ```python from pptx.opc.package import _Relationships # Create a relatio...
diff --git a/src/pptx/opc/package.py b/src/pptx/opc/package.py index 713759c..3430427 100644 --- a/src/pptx/opc/package.py +++ b/src/pptx/opc/package.py @@ -574,15 +574,15 @@ class _Relationships(Mapping[str, "_Relationship"]): Raises |KeyError| if not found and |ValueError| if more than one matching relations...
["tests/opc/test_package.py::Describe_Relationships::it_can_find_a_part_with_reltype", "tests/opc/test_package.py::Describe_Relationships::and_it_raises_ValueError_when_there_is_more_than_one_part_with_reltype", "tests/test_package.py::DescribePackage::it_provides_access_to_its_core_properties_part"]
["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
10
3
1,006
0
0.6
1
0.75
1
0.201
80.878
8,268
swe_smith::train::1127
swe_smith
train
1,127
jd__tenacity.0d40e76f.func_basic__q99obeha
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
Statistics property returns unexpected data after recent changes #### Description The statistics property on retry decorators is returning unexpected data that includes an "initial" key with value True, instead of the expected empty dictionary or proper statistics data. #### Steps/Code to Reproduce ```python import...
diff --git a/tenacity/__init__.py b/tenacity/__init__.py index 72eba04..5e31461 100644 --- a/tenacity/__init__.py +++ b/tenacity/__init__.py @@ -306,9 +306,9 @@ class BaseRetrying(ABC): statistics from each thread). """ try: - return self._local.statistics # type: ignore...
["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
6
70
1,086
0
0.6
1
0.75
1
0.201
80.878
8,269
r2e_gym::train::5141
r2e_gym
train
5,141
pyramid__579a5f47523ada48497994f0c70152f617d6af2a
pyramid
pylons/pyramid
python
579a5f47523ada48497994f0c70152f617d6af2a
**Title:** Exception Information Cleared Prematurely in Exception Handling **Description:** When an exception is raised during request processing, the details of the exception (`request.exception` and `request.exc_info`) are being cleared immediately after handling. This prevents callbacks from accessing and inspectin...
diff --git a/CHANGES.txt b/CHANGES.txt --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,14 @@ +Next release +============ + +Features +-------- + +- We no longer eagerly clear ``request.exception`` and ``request.exc_info`` in + the exception view tween. This makes it possible to inspect exception + information within ...
diff --git a/pyramid/tests/test_router.py b/pyramid/tests/test_router.py --- a/pyramid/tests/test_router.py +++ b/pyramid/tests/test_router.py @@ -830,7 +830,8 @@ self._registerTraverserFactory(context, subpath=['']) response = DummyResponse() response.app_iter = ['OK'] - view = DummyV...
null
null
namanjain12/pyramid_final:579a5f47523ada48497994f0c70152f617d6af2a
true
null
2
27
null
1,378
0
0.75
1
0.6375
1
0.319667
80.87775
8,270
swe_smith::train::26480
swe_smith
train
26,480
pylint-dev__astroid.b114f6b5.func_pm_remove_loop__juf9p8ez
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Dict getitem method broken for key lookup #### Description Dictionary key lookup using `getitem()` method is not working properly. When trying to access dictionary values by key, the method raises `AstroidIndexError` even for valid keys that exist in the dictionary. #### Steps/Code to Reproduce ```python import ast...
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index fde3239..0e7a58f 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -2424,15 +2424,7 @@ class Dict(NodeNG, Instance): except (AstroidTypeError, AstroidIndexError): contin...
["tests/test_inference.py::InferenceTest::test_simple_subscript", "tests/test_inference.py::InferenceTest::test_stop_iteration_leak", "tests/test_inference.py::ArgumentsTest::test_kwargs_access_by_name", "tests/test_object_model.py::InstanceModelTest::test_instance_special_model", "tests/test_object_model.py::FunctionM...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
8
9
1,045
0
0.6
1
0.75
1
0.200833
80.8775
8,271
swe_smith::train::4137
swe_smith
train
4,137
pygments__pygments.27649ebb.func_basic__x73cdzvg
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Lexer callback function returns incorrect token tuple format #### Description When using lexers with embedded language support (via the `using()` function), the token tuples are returned in the wrong order. The callback function yields tokens as `(position, value, token_type)` instead of the expected `(token_type, va...
diff --git a/pygments/lexer.py b/pygments/lexer.py index 3061964..3dff5b5 100644 --- a/pygments/lexer.py +++ b/pygments/lexer.py @@ -455,15 +455,14 @@ def using(_other, **kwargs): ctx.pos = match.end() else: def callback(lexer, match, ctx=None): - # XXX: cache that somehow ...
["tests/test_basic_api.py::test_random_input[TypoScriptLexer]", "tests/test_basic_api.py::test_lexer_options[VbNetAspxLexer]", "tests/test_basic_api.py::test_random_input[CheetahXmlLexer]", "tests/test_basic_api.py::test_lexer_options[DuelLexer]", "tests/test_basic_api.py::test_lexer_options[CSharpAspxLexer]", "tests/t...
["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
9
78
1,025
0
0.6
1
0.75
1
0.200833
80.8775
8,272
swe_smith::train::21773
swe_smith
train
21,773
life4__textdistance.c3aca916.combine_file__0sfget5n
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
get_algorithms() returns library objects instead of algorithm names #### Description The `get_algorithms()` method in LibrariesManager is returning library objects instead of algorithm names, causing TypeError when trying to use the returned values as dictionary keys or in other contexts expecting strings. #### Step...
diff --git a/textdistance/libraries.py b/textdistance/libraries.py index fa24ea6..971c6eb 100644 --- a/textdistance/libraries.py +++ b/textdistance/libraries.py @@ -42,7 +42,7 @@ class LibrariesManager: def get_algorithms(self) -> list[str]: """Get list of available algorithms. """ - retur...
["tests/test_external.py::test_compare[DamerauLevenshtein]", "tests/test_external.py::test_compare[Hamming]", "tests/test_external.py::test_compare[Jaro]", "tests/test_external.py::test_compare[JaroWinkler]", "tests/test_external.py::test_compare[Levenshtein]", "tests/test_external.py::test_qval[None-DamerauLevenshtein...
["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
10
30
1,005
0
0.6
1
0.75
1
0.200833
80.8775
8,273
swe_smith::train::24237
swe_smith
train
24,237
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__iinpcuxc
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
GOES XRS TimeSeries fails to load NetCDF files with NameError #### Description When trying to load GOES XRS data from NetCDF files, the code fails with a `NameError: name 'xrsb_quality' is not defined`. This affects all NetCDF-based GOES data files but not FITS files. #### Steps/Code to Reproduce ```python import s...
diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py index 08e2a6a..cee3878 100644 --- a/sunpy/timeseries/sources/goes.py +++ b/sunpy/timeseries/sources/goes.py @@ -232,21 +232,17 @@ class XRSTimeSeries(GenericTimeSeries): flux_flag_a = h5nc.variables.get("a_flags") or h5nc.vari...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g15_d20131028_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.p...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno_missin...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
10
22
1,005
0
0.6
1
0.75
1
0.200833
80.8775
8,274
swe_smith::train::37897
swe_smith
train
37,897
kayak__pypika.1c9646f0.func_pm_class_rm_funcs__rka3oq65
swesmith/kayak__pypika.1c9646f0
kayak/pypika
python
null
PostgreSQL INSERT ON CONFLICT DO UPDATE method missing #### Description The `do_update` method is missing from the PostgreSQL query builder, causing AttributeError when trying to use PostgreSQL's ON CONFLICT DO UPDATE functionality. #### Steps/Code to Reproduce ```python from pypika import PostgreSQLQuery, Table t...
diff --git a/pypika/dialects.py b/pypika/dialects.py index 57955d8..7215ab1 100644 --- a/pypika/dialects.py +++ b/pypika/dialects.py @@ -469,25 +469,6 @@ class PostgreSQLQueryBuilder(QueryBuilder): raise QueryException("Can not have two conflict handlers") self._on_conflict_do_nothing = True - ...
["pypika/tests/test_inserts.py::PostgresInsertIntoOnConflictTests::test_empty_on_conflict_do_update_where", "pypika/tests/test_inserts.py::PostgresInsertIntoOnConflictTests::test_insert_on_conflict_do_update_field", "pypika/tests/test_inserts.py::PostgresInsertIntoOnConflictTests::test_insert_on_conflict_do_update_fiel...
["pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_0__ridley_scott_jimi_hendrix_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_1__1_2_3_4_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_2__toInt64_1_toInt64_2_toInt64_3_toInt64_4_", "pypika/tests/clickhouse/test_array...
jyangballin/swesmith.x86_64.kayak_1776_pypika.1c9646f0
true
null
1
20
15
805
0
0.6
1
0.75
1
0.200833
80.8775
8,275
swe_smith::train::43921
swe_smith
train
43,921
pydata__patsy.a5d16484.func_basic__5pm45mvs
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Function call capture broken with swapped token parameters #### Description When using function call capture functionality, the token parameters are being processed in the wrong order, causing `TypeError: sequence item 0: expected str instance, int found` errors. #### Steps/Code to Reproduce ```python from patsy.ev...
diff --git a/patsy/eval.py b/patsy/eval.py index 9d1fba0..d3481ac 100644 --- a/patsy/eval.py +++ b/patsy/eval.py @@ -797,10 +797,10 @@ def test_replace_bare_funcalls(): class _FuncallCapturer(object): # captures the next funcall def __init__(self, start_token_type, start_token): - self.func = [start_t...
["patsy/eval.py::test_EvalFactor_memorize_passes_needed", "patsy/eval.py::test_EvalFactor_end_to_end", "patsy/eval.py::test_capture_obj_method_calls", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths", "pats...
["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
8
8
1,045
0
0.6
1
0.75
1
0.200833
80.8775
8,276
swe_smith::train::45118
swe_smith
train
45,118
modin-project__modin.8c7799fd.func_pm_ctrl_shuffle__abffhtsv
swesmith/modin-project__modin.8c7799fd
modin-project/modin
python
null
Array less-than-or-equal operator crashes with NameError #### Description The `<=` operator on modin numpy arrays is broken and raises a `NameError` due to undefined variables being referenced. #### Steps/Code to Reproduce ```python import modin.numpy as np import numpy # Create simple arrays arr1 = np.array([1, 2...
diff --git a/modin/numpy/arr.py b/modin/numpy/arr.py index ab40eca..b0e93c8 100644 --- a/modin/numpy/arr.py +++ b/modin/numpy/arr.py @@ -964,12 +964,6 @@ class array(object): dtype=None, subok=True, ): - check_kwargs(where=where, casting=casting, order=order, subok=subok) - if is_sc...
["modin/tests/numpy/test_array.py::test_array_where", "modin/tests/numpy/test_array_arithmetic.py::test_basic_arithmetic_with_broadcast[__le__-100-100]", "modin/tests/numpy/test_array_arithmetic.py::test_basic_arithmetic_with_broadcast[__le__-100-operand1_shape2]", "modin/tests/numpy/test_array_arithmetic.py::test_basi...
["modin/tests/numpy/test_array.py::test_shape[100]", "modin/tests/numpy/test_array.py::test_shape[size1]", "modin/tests/numpy/test_array.py::test_shape[size2]", "modin/tests/numpy/test_array.py::test_shape[size3]", "modin/tests/numpy/test_array.py::test_shape[size4]", "modin/tests/numpy/test_array.py::test_dtype", "mod...
jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd
true
null
1
13
9
945
0
0.6
1
0.75
1
0.200833
80.8775
8,277
swe_smith::train::32072
swe_smith
train
32,072
davidhalter__parso.338a5760.func_basic__vxf38xox
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
DiffParser constructor arguments swapped causing AttributeError #### Description The DiffParser class constructor has its arguments incorrectly assigned, causing AttributeError when trying to use the diff parser functionality. #### Steps/Code to Reproduce ```python import parso from parso.python.diff import DiffPar...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..97ba35a 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -253,9 +253,9 @@ class DiffParser: side effects. It changes the given module. """ def __init__(self, pgen_grammar, tokenizer, module): - self._pgen_gramma...
["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
6
82
1,085
0
0.6
1
0.75
1
0.200833
80.8775
8,278
swe_smith::train::32229
swe_smith
train
32,229
davidhalter__parso.338a5760.func_pm_op_swap__e7fhksgk
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
String formatting broken in diff parser logging #### Description The diff parser is throwing `TypeError: unsupported operand type(s) for %` errors when trying to format log messages. The string formatting syntax appears to be incorrect in several places. #### Steps/Code to Reproduce ```python import parso # Any co...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..f08870f 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -290,18 +290,18 @@ class DiffParser: line_length = len(new_lines) sm = difflib.SequenceMatcher(None, old_lines, self._parser_lines_new) opcodes = sm....
["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
11
82
985
0
0.6
1
0.75
1
0.200833
80.8775
8,279
swe_smith::train::11976
swe_smith
train
11,976
andialbrecht__sqlparse.e57923b3.lm_rewrite__p0blmeky
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
**Unexpected RecursionError in Grouping Functions** **Describe the bug** Hello, I've encountered a RecursionError when attempting to group certain SQL statements. It seems that the recursion limit is being exceeded during the parsing process, which wasn't an issue before. This is causing some of the grouping functions...
diff --git a/sqlparse/utils.py b/sqlparse/utils.py index 58c0245..9043601 100644 --- a/sqlparse/utils.py +++ b/sqlparse/utils.py @@ -68,11 +68,13 @@ def recurse(*cls): """ def wrap(f): def wrapped_f(tlist): - for sgroup in tlist.get_sublists(): - if not isinstance(sgroup, cl...
["tests/test_format.py::TestFormat::test_strip_comments_preserves_whitespace", "tests/test_format.py::TestFormatReindentAligned::test_basic", "tests/test_format.py::TestFormatReindent::test_keywordfunctions", "tests/test_grouping.py::test_grouping_parenthesis", "tests/test_grouping.py::test_grouping_identifier_function...
["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
10
14
1,004
0
0.6
1
0.75
1
0.200667
80.877
8,280
swe_bench::test::1337
swe_bench
test
1,337
pylint-dev__pylint-5613
pylint-dev/pylint
pylint-dev/pylint
python
019794b808271d45f86a7014e9c91cb04458a47a
Please provide a better entry point to pyreverse ### Current problem Currently, I have to do: ```python import pylint # Set name. # Collect filenames in files... sys.argv = 'pyreverse -o png -p'.split() + [name] + files try: pylint.run_pyreverse() except SystemExit: pass # pylint always does this. ``` ### ...
This is reasonable and should not take too long either.
diff --git a/pylint/__init__.py b/pylint/__init__.py --- a/pylint/__init__.py +++ b/pylint/__init__.py @@ -11,17 +11,22 @@ import os import sys +from typing import List, Optional from pylint.__pkginfo__ import __version__ # pylint: disable=import-outside-toplevel -def run_pylint(): +def run_pylint(*, argu...
diff --git a/tests/test_pylint_runners.py b/tests/test_pylint_runners.py --- a/tests/test_pylint_runners.py +++ b/tests/test_pylint_runners.py @@ -21,3 +21,14 @@ def test_runner(runner: Callable, tmpdir: LocalPath) -> None: with pytest.raises(SystemExit) as err: runner() asser...
["tests/test_pylint_runners.py::test_runner_with_arguments[run_pylint]", "tests/test_pylint_runners.py::test_runner_with_arguments[run_pyreverse]", "tests/test_pylint_runners.py::test_runner_with_arguments[run_symilar]"]
["tests/test_pylint_runners.py::test_runner[run_epylint]", "tests/test_pylint_runners.py::test_runner[run_pylint]", "tests/test_pylint_runners.py::test_runner[run_pyreverse]", "tests/test_pylint_runners.py::test_runner[run_symilar]"]
null
true
2021-12-30T16:46:38Z
1
27
3
464
0
0.8
1
0.55
1
0.167333
80.877
8,281
swe_smith::train::24380
swe_smith
train
24,380
sunpy__sunpy.f8edfd5c.func_pm_remove_wrapper__9ikzg0rq
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
NameError in node_to_dict function when processing XML nodes Description When using the `node_to_dict` function from `sunpy.util.xml`, a `NameError: name 'text' is not defined` occurs when processing XML nodes that contain text content. Steps/Code to Reproduce ```python from xml.dom.minidom import Document from sun...
diff --git a/sunpy/util/xml.py b/sunpy/util/xml.py index 1d7f962..9d4aaf6 100644 --- a/sunpy/util/xml.py +++ b/sunpy/util/xml.py @@ -90,19 +90,11 @@ def node_to_dict(node): dic.update({n.nodeName: alist}) continue - try: - text = get_node_text(n) - except NotText...
["sunpy/util/tests/test_xml.py::test_xml_to_dict1", "sunpy/util/tests/test_xml.py::test_xml_to_dict2", "sunpy/util/tests/test_xml.py::test_xml_to_dict3", "sunpy/util/tests/test_xml.py::test_xml_to_dict4", "sunpy/util/tests/test_xml.py::test_xml_to_dict5", "sunpy/util/tests/test_xml.py::test_xml_to_dict6", "sunpy/util/t...
["sunpy/util/tests/test_xml.py::test_xml_to_dict7", "sunpy/util/tests/test_xml.py::test_xml_to_dict8", "sunpy/util/tests/test_xml.py::test_xml_to_dict9", "sunpy/util/tests/test_xml.py::test_xml_to_dict10", "sunpy/util/tests/test_xml.py::test_get_node_text1", "sunpy/util/tests/test_xml.py::test_get_node_text2", "sunpy/u...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
8
9
1,044
0
0.6
1
0.75
1
0.200667
80.877
8,282
swe_smith::train::11283
swe_smith
train
11,283
rsalmei__alive-progress.35853799.func_pm_remove_wrapper__8fkg2ws9
swesmith/rsalmei__alive-progress.35853799
rsalmei/alive-progress
python
null
Config validation not working after recent changes #### Description The configuration system seems to have stopped validating input parameters. When I try to set invalid config values, they're being accepted without any validation errors. #### Steps/Code to Reproduce ```python from alive_progress import alive_bar f...
diff --git a/alive_progress/core/configuration.py b/alive_progress/core/configuration.py index b36d671..058fab5 100644 --- a/alive_progress/core/configuration.py +++ b/alive_progress/core/configuration.py @@ -199,16 +199,6 @@ def create_config(): except KeyError: raise ValueError(f'Invalid...
["tests/core/test_configuration.py::test_config_global[config_params0]", "tests/core/test_configuration.py::test_config_global[config_params1]", "tests/core/test_configuration.py::test_config_global[config_params2]", "tests/core/test_configuration.py::test_config_global[config_params3]", "tests/core/test_configuration....
["tests/animations/test_bars.py::test_bar_tip_background[--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[_-=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[-0.0-Fa...
jyangballin/swesmith.x86_64.rsalmei_1776_alive-progress.35853799
true
null
1
11
74
984
0
0.6
1
0.75
1
0.200667
80.877
8,283
swe_smith::train::3232
swe_smith
train
3,232
Suor__funcy.207a7810.func_pm_remove_wrapper__x77znsei
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Unable to autocurry built-in functions I found a bug when trying to use `autocurry` with built-in functions. The code that previously worked now fails with an AttributeError. ## Reproduction ```python from funcy import autocurry # This used to work but now fails curried_map = autocurry(map) # Trying to use it re...
diff --git a/funcy/_inspect.py b/funcy/_inspect.py index cc2eae5..fb10eba 100644 --- a/funcy/_inspect.py +++ b/funcy/_inspect.py @@ -128,17 +128,7 @@ def get_spec(func, _cache={}): elif not IS_PYPY and hasattr(func, '__code__'): return _code_to_spec(func) else: - # We use signature last to be ...
["tests/test_funcs.py::test_autocurry_builtin"]
["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
12
1
964
0
0.6
1
0.75
1
0.200667
80.877
8,284
swe_smith::train::18489
swe_smith
train
18,489
HIPS__autograd.ac044f0d.func_pm_remove_assign__a4fcnvfa
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
#### Description Convolution gradient computation fails with `TypeError: 'NoneType' object is not subscriptable` when using `scipy.signal.convolve` with autograd. #### Steps/Code to Reproduce ```python import autograd.numpy as np from autograd.scipy.signal import convolve from autograd import grad # Simple convolut...
diff --git a/autograd/scipy/signal.py b/autograd/scipy/signal.py index 49b7619..db68c38 100644 --- a/autograd/scipy/signal.py +++ b/autograd/scipy/signal.py @@ -125,23 +125,21 @@ def flipped_idxs(ndim, axes): def grad_convolve(argnum, ans, A, B, axes=None, dot_axes=[(), ()], mode="full"): assert mode in ["valid...
["tests/test_scipy.py::test_convolve", "tests/test_scipy.py::test_convolve_2d", "tests/test_scipy.py::test_convolve_ignore", "tests/test_scipy.py::test_convolve_ignore_dot"]
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
7
4
1,064
0
0.6
1
0.75
1
0.200667
80.877
8,285
swe_smith::train::21948
swe_smith
train
21,948
life4__textdistance.c3aca916.func_basic__yb1ifrdn
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Levenshtein distance calculation returns incorrect results #### Description The Levenshtein distance algorithm is producing incorrect distance values for string comparisons. When comparing strings like "test" and "text", it should return 1 (one character substitution), but it's returning unexpected values. #### Step...
diff --git a/textdistance/algorithms/edit_based.py b/textdistance/algorithms/edit_based.py index 0a6e02f..3f97c27 100644 --- a/textdistance/algorithms/edit_based.py +++ b/textdistance/algorithms/edit_based.py @@ -109,8 +109,8 @@ class Levenshtein(_Base): source: https://github.com/jamesturk/jellyfish/...
["tests/test_edit/test_levenshtein.py::test_distance[test-text-1]", "tests/test_edit/test_levenshtein.py::test_distance[test-tset-2]", "tests/test_edit/test_levenshtein.py::test_distance[test-qwe-4]", "tests/test_edit/test_levenshtein.py::test_distance[test-testit-2]", "tests/test_edit/test_levenshtein.py::test_distanc...
["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
14
12
924
0
0.6
1
0.75
1
0.200667
80.877
8,286
r2e_gym::train::5300
r2e_gym
train
5,300
aiohttp__cdc6fbf6af51a9c1b73058f0f84b6437047828fe
aiohttp
aio-libs/aiohttp
python
cdc6fbf6af51a9c1b73058f0f84b6437047828fe
**Title:** TCPConnector Raises TypeError When Initializing with `ssl_context` **Description:** When attempting to create a `TCPConnector` with both `verify_ssl=False` and a custom `ssl_context`, an unexpected `TypeError` is raised. This prevents the configuration of custom SSL settings when SSL verification is disable...
diff --git a/aiohttp/connector.py b/aiohttp/connector.py --- a/aiohttp/connector.py +++ b/aiohttp/connector.py @@ -223,10 +223,17 @@ """ def __init__(self, *args, verify_ssl=True, - resolve=False, family=socket.AF_INET, **kwargs): + resolve=False, family=socket.AF_INET, ssl_c...
diff --git a/tests/test_connector.py b/tests/test_connector.py --- a/tests/test_connector.py +++ b/tests/test_connector.py @@ -6,6 +6,7 @@ import time import socket import unittest +import ssl from unittest import mock import aiohttp @@ -312,6 +313,22 @@ conn.clear_resolved_hosts() self.assertE...
null
null
namanjain12/aiohttp_final:cdc6fbf6af51a9c1b73058f0f84b6437047828fe
true
null
1
42
null
1,076
0
0.75
1
0.6375
1
0.319333
80.87675
8,287
swe_smith::train::9662
swe_smith
train
9,662
marshmallow-code__webargs.dbde72fe.func_basic__kkatkkmn
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
FalconParser incorrectly extracts request object from method arguments #### Description The FalconParser is failing to properly extract the request object from Falcon resource method arguments. When using decorators like `@use_args` or `@use_kwargs`, the parser throws a ValueError claiming the argument is not a falco...
diff --git a/src/webargs/falconparser.py b/src/webargs/falconparser.py index dd96a30..e874de0 100644 --- a/src/webargs/falconparser.py +++ b/src/webargs/falconparser.py @@ -157,9 +157,9 @@ class FalconParser(core.Parser[falcon.Request]): """Get request from a resource method's arguments. Assumes that ...
["tests/test_falconparser.py::TestFalconParser::test_use_args_decorator", "tests/test_falconparser.py::TestFalconParser::test_use_args_with_path_param", "tests/test_falconparser.py::TestFalconParser::test_use_args_with_validation", "tests/test_falconparser.py::TestFalconParser::test_use_kwargs_decorator", "tests/test_f...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
6
6
1,083
0
0.6
1
0.75
1
0.2005
80.8765
8,288
swe_smith::train::13518
swe_smith
train
13,518
python-openxml__python-docx.0cf6d71f.func_basic__e5lwabcr
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Column indexing returns wrong type and raises KeyError instead of IndexError #### Description When accessing table columns by index, the method returns a `_Row` object instead of a `_Column` object, and raises `KeyError` instead of `IndexError` for out-of-range access. #### Steps/Code to Reproduce ```python from do...
diff --git a/src/docx/table.py b/src/docx/table.py index 545c468..3ad1995 100644 --- a/src/docx/table.py +++ b/src/docx/table.py @@ -358,11 +358,11 @@ class _Columns(Parented): def __getitem__(self, idx: int): """Provide indexed access, e.g. 'columns[0]'.""" try: - gridCol = self._grid...
["tests/test_table.py::Describe_Columns::it_has_sequence_behaviors", "tests/test_table.py::Describe_Columns::it_raises_on_indexed_access_out_of_range"]
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
10
2
1,003
0
0.6
1
0.75
1
0.2005
80.8765
8,289
swe_smith::train::31391
swe_smith
train
31,391
benoitc__gunicorn.bacbf8aa.combine_file__n8m4h61a
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
HTTP body readers broken after recent changes Description The HTTP body readers (LengthReader and EOFReader) are not working correctly. When trying to read request bodies, getting unexpected errors and behavior. Steps/Code to Reproduce ```python from gunicorn.http.body import LengthReader, EOFReader from gunicorn.h...
diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py index d7ee29e..c7d9f91 100644 --- a/gunicorn/http/body.py +++ b/gunicorn/http/body.py @@ -114,8 +114,8 @@ class ChunkedReader: class LengthReader: def __init__(self, unreader, length): - self.unreader = unreader - self.length = length + ...
["tests/test_http.py::test_length_reader_read", "tests/test_http.py::test_length_reader_read_invalid_size", "tests/test_http.py::test_eof_reader_read", "tests/test_valid_requests.py::test_http_parser[/testbed/tests/requests/valid/031compat.http]", "tests/test_valid_requests.py::test_http_parser[/testbed/tests/requests/...
["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
1
8
37
1,043
0
0.6
1
0.75
1
0.2005
80.8765
8,290
swe_smith::train::44619
swe_smith
train
44,619
mahmoud__glom.fb3c4e76.func_basic__0xzrqz4z
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
M() accepts invalid specs without proper validation When using `M()` to wrap subspecs for comparison operations, invalid specs are silently accepted instead of raising a `TypeError`. This causes unexpected behavior where the matching logic fails to work correctly. #### Steps/Code to Reproduce ```python from glom imp...
diff --git a/glom/matching.py b/glom/matching.py index 798ac40..18f1729 100644 --- a/glom/matching.py +++ b/glom/matching.py @@ -521,10 +521,8 @@ class _MType: def __call__(self, spec): """wrap a sub-spec in order to apply comparison operators to the result""" if not isinstance(spec, type(T)): - ...
["glom/test/test_match.py::test_m_call_match", "glom/test/test_match.py::test_check_ported_tests", "glom/test/test_scope_vars.py::test_max_skip"]
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
6
3
1,083
0
0.6
1
0.75
1
0.2005
80.8765
8,291
swe_smith::train::48621
swe_smith
train
48,621
mewwts__addict.75284f95.func_basic__46pugudf
swesmith/mewwts__addict.75284f95
mewwts/addict
python
null
Dict initialization broken with swapped parent/key parameters #### Description When creating a Dict instance, the `__parent` and `__key` parameters are being swapped during initialization, causing KeyError exceptions when trying to access any keys. #### Steps/Code to Reproduce ```python from addict import Dict # B...
diff --git a/addict/addict.py b/addict/addict.py index 55e02d1..ea6bfa9 100644 --- a/addict/addict.py +++ b/addict/addict.py @@ -4,20 +4,20 @@ import copy class Dict(dict): def __init__(__self, *args, **kwargs): - object.__setattr__(__self, '__parent', kwargs.pop('__parent', None)) - object.__seta...
["test_addict.py::DictTests::test_add_on_empty_dict", "test_addict.py::DictTests::test_add_on_non_empty_dict", "test_addict.py::DictTests::test_add_on_non_empty_value", "test_addict.py::DictTests::test_add_on_unsupported_type", "test_addict.py::DictTests::test_copy", "test_addict.py::DictTests::test_deepcopy", "test_ad...
["test_addict.py::DictTests::test_init_raises", "test_addict.py::DictTests::test_init_with_empty_stuff", "test_addict.py::DictTests::test_isinstance", "test_addict.py::DictTests::test_or_operator_type_error", "test_addict.py::DictTests::test_ror_operator_type_error", "test_addict.py::DictTests::test_set_prop_invalid", ...
jyangballin/swesmith.x86_64.mewwts_1776_addict.75284f95
true
null
1
12
114
963
0
0.6
1
0.75
1
0.2005
80.8765
8,292
swe_smith::train::1807
swe_smith
train
1,807
agronholm__typeguard.b6a7e438.func_basic__s1g3a8nv
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking fails for non-class values when using Type annotations #### Description When using `Type` or `type` annotations, the type checker incorrectly accepts non-class values instead of raising a `TypeCheckError`. This breaks the expected behavior where only actual classes should pass type checking for `Type[T]...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..9ba67f7 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -461,7 +461,7 @@ def check_class( memo: TypeCheckMemo, ) -> None: if not isclass(value) and not isinstance(value, generic_alias_types): - ...
["tests/test_checkers.py::TestType::test_unparametrized_fail[Type]", "tests/test_checkers.py::TestType::test_unparametrized_fail[type]", "tests/test_checkers.py::TestType::test_parametrized[exact]", "tests/test_checkers.py::TestType::test_parametrized[subclass]", "tests/test_checkers.py::TestType::test_union[str]", "te...
["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
12
17
963
0
0.6
1
0.75
1
0.2005
80.8765
8,293
swe_smith::train::52532
swe_smith
train
52,532
pydicom__pydicom.7d361b3d.func_pm_remove_assign__xiomd8mi
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
DT value representation fails with NameError when parsing datetime strings #### Description When creating DT (DateTime) objects from string values, the code raises a `NameError: name 'match' is not defined` error. This affects various datetime parsing operations in pydicom. #### Steps/Code to Reproduce ```python im...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..9cb7a8f 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -743,8 +743,6 @@ class DT(_DateTimeBase, datetime.datetime): if isinstance(val, str): if val.strip() == "": return None - - ...
["tests/test_filewriter.py::TestScratchWriteDateTime::test_multivalue_DA", "tests/test_filewriter.py::TestWriteDT::test_format_dt", "tests/test_valuerep.py::TestDT::test_pickling", "tests/test_valuerep.py::TestDT::test_pickling_with_timezone", "tests/test_valuerep.py::TestDT::test_new_obj_conversion", "tests/test_value...
["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
7
9
1,063
0
0.6
1
0.75
1
0.2005
80.8765
8,294
r2e_gym::train::5135
r2e_gym
train
5,135
pyramid__3803d92fc0da5282656d4229e063a1908ec5522a
pyramid
pylons/pyramid
python
3803d92fc0da5282656d4229e063a1908ec5522a
**Title:** `render()` Function Alters Original `request.response`, Causing AttributeError **Description:** When a response object is set on the request and the `render()` function is invoked, the original `request.response` object gets modified unexpectedly. This alteration leads to an `AttributeError` because the ren...
diff --git a/CHANGES.txt b/CHANGES.txt --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,15 @@ +Next Release +============ + +Backwards Incompatibilities +--------------------------- + +- Almost all renderers affect properties on the ``request.response`` response + object. For example, setting the content-type in the JSO...
diff --git a/pyramid/tests/test_renderers.py b/pyramid/tests/test_renderers.py --- a/pyramid/tests/test_renderers.py +++ b/pyramid/tests/test_renderers.py @@ -897,6 +897,14 @@ renderer.assert_(a=1) renderer.assert_(request=request) + def test_it_preserves_response(self): + request = testin...
null
null
namanjain12/pyramid_final:3803d92fc0da5282656d4229e063a1908ec5522a
true
null
2
30
null
1,315
0
0.75
1
0.6375
1
0.319167
80.87625
8,295
swe_smith::train::42213
swe_smith
train
42,213
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__tkkywkm2
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Package loading fails with "Package not found" error for valid zip files and file-like objects #### Description When trying to open PowerPoint files, the package loading mechanism incorrectly raises a `PackageNotFoundError` even for valid zip files and file-like objects that should be processed successfully. #### St...
diff --git a/src/pptx/opc/serialized.py b/src/pptx/opc/serialized.py index 9236670..587cd9b 100644 --- a/src/pptx/opc/serialized.py +++ b/src/pptx/opc/serialized.py @@ -129,20 +129,19 @@ class _PhysPkgReader(Container[PackURI]): @classmethod def factory(cls, pkg_file: str | IO[bytes]) -> _PhysPkgReader: ...
["tests/opc/test_serialized.py::Describe_PhysPkgReader::it_constructs_ZipPkgReader_when_pkg_is_file_like", "tests/opc/test_serialized.py::Describe_PhysPkgReader::and_it_constructs_ZipPkgReader_when_pkg_is_a_zip_file_path", "tests/test_package.py::DescribePackage::it_provides_access_to_its_core_properties_part"]
["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
13
3
942
0
0.6
1
0.75
1
0.200333
80.876
8,296
swe_smith::train::49400
swe_smith
train
49,400
mozilla__bleach.73871d76.func_pm_class_rm_funcs__hv3tr3ju
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parser crashes with TypeError when processing content #### Description The HTML parser is throwing a `TypeError: InitialPhase() takes no arguments` error when trying to process HTML content. This appears to be affecting basic functionality like cleaning and linkifying HTML. #### Steps/Code to Reproduce ```pyth...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..6e3c82d 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -428,12 +428,6 @@ def getPhases(debug): """ __slots__ = ("parser", "tree", "__startTag...
["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
13
185
942
0
0.6
1
0.75
1
0.200333
80.876
8,297
swe_smith::train::7973
swe_smith
train
7,973
cantools__cantools.0c6a7871.func_pm_ctrl_shuffle__jjms19tk
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
CandumpTimestampedPattern unpack method fails with UnboundLocalError #### Description When parsing candump log entries with timestamps, the `CandumpTimestampedPattern.unpack` method raises an `UnboundLocalError: local variable 'data' referenced before assignment`. This affects parsing of both relative and absolute ti...
diff --git a/src/cantools/logreader.py b/src/cantools/logreader.py index 67943e0..ef0fb7a 100644 --- a/src/cantools/logreader.py +++ b/src/cantools/logreader.py @@ -80,20 +80,19 @@ class CandumpTimestampedPattern(BasePattern): def unpack(match_object): channel = match_object.group('channel') fram...
["tests/test_command_line.py::CanToolsCommandLineTest::test_decode_timestamp_zero", "tests/test_logreader.py::TestLogreaderFormats::test_candump_log_ascii_timestamped", "tests/test_logreader.py::TestLogreaderFormats::test_timestamped_candump", "tests/test_logreader.py::TestLogreaderStreams::test_candump_time_since_star...
["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
7
4
1,062
0
0.6
1
0.75
1
0.200333
80.876
8,298
swe_smith::train::47101
swe_smith
train
47,101
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__3kws8euc
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
EpollIOManager statistics method returns incorrect values #### Description The `statistics()` method in `EpollIOManager` returns incorrect values for `tasks_waiting_write` due to a variable being used before it's defined. #### Steps/Code to Reproduce ```python import trio import trio._core._io_epoll async def main...
diff --git a/src/trio/_core/_io_epoll.py b/src/trio/_core/_io_epoll.py index 5e05f08..9dc9042 100644 --- a/src/trio/_core/_io_epoll.py +++ b/src/trio/_core/_io_epoll.py @@ -216,17 +216,16 @@ class EpollIOManager: def statistics(self) -> _EpollStatistics: tasks_waiting_read = 0 + return _EpollStat...
["src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_autojump_clock_threshold_changing", "src/trio/_core/_tests/test_io.py::test_io_manager_statistics", "src/trio/_core/_tests/test_mock_clock.py::test_mock_clock_autojump", "src/trio/_core/_tests/test_mock_clock.py::test_mock_clock_autojump_interference", "src/tr...
["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
9
50
1,022
0
0.6
1
0.75
1
0.200333
80.876
8,299
swe_smith::train::26281
swe_smith
train
26,281
pylint-dev__astroid.b114f6b5.func_pm_ctrl_shuffle__ah0szfrx
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
ClassDef.instance_attrs_lookup raises AttributeInferenceError immediately #### Description When trying to look up instance attributes on a class, the method `instance_attrs_lookup` now raises `AttributeInferenceError` immediately instead of properly searching for the attribute in the class and its ancestors. #### St...
diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 99ed796..cac293c 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -2290,17 +2290,16 @@ class ClassDef( :raises AttributeInferenceError: If no att...
["tests/brain/numpy/test_ndarray.py::NumpyBrainNdarrayTest::test_numpy_ndarray_attribute_inferred_as_ndarray", "tests/brain/test_brain.py::TestLenBuiltinInference::test_len_builtin_inference_recursion_error_self_referential_attribute", "tests/brain/test_ctypes.py::test_ctypes_redefined_types_members[c_bool-bool-?]", "t...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
9
79
1,021
0
0.6
1
0.75
1
0.200167
80.8755