selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
7,600
swe_smith::train::35124
swe_smith
train
35,124
django__daphne.32ac73e1.func_pm_remove_assign__t5l9t2tb
swesmith/django__daphne.32ac73e1
django/daphne
python
null
X-Forwarded-For header parsing broken after recent changes #### Description The `parse_x_forwarded_for` function in `daphne/utils.py` is not working correctly. When trying to parse X-Forwarded-For headers, it raises `UnboundLocalError: local variable 'result_addr' referenced before assignment`. #### Steps/Code to Re...
diff --git a/daphne/utils.py b/daphne/utils.py index 0699314..879d46c 100644 --- a/daphne/utils.py +++ b/daphne/utils.py @@ -53,14 +53,10 @@ def parse_x_forwarded_for( if isinstance(headers, Headers): headers = dict(headers.getAllRawHeaders()) - # Lowercase all header names in the dict - headers =...
["tests/test_http_request.py::TestHTTPRequest::test_x_forwarded_for_no_port", "tests/test_http_request.py::TestHTTPRequest::test_x_forwarded_for_parsed", "tests/test_utils.py::TestXForwardedForHttpParsing::test_address_only", "tests/test_utils.py::TestXForwardedForHttpParsing::test_basic", "tests/test_utils.py::TestXFo...
["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding...
jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1
true
null
1
9
15
1,136
0
0.6
1
0.75
1
0.219333
80.933
7,601
swe_smith::train::2517
swe_smith
train
2,517
pdfminer__pdfminer.six.1a8bd2f7.func_pm_remove_assign__n7583a0a
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
NameError in paint_path method after removing variable assignments #### Description When processing PDF paths, the `paint_path` method in `PDFLayoutAnalyzer` is throwing `NameError` exceptions for variables that are no longer being defined. This affects path rendering functionality across the library. #### Steps/Cod...
diff --git a/pdfminer/converter.py b/pdfminer/converter.py index 7563c7a..4e7716a 100644 --- a/pdfminer/converter.py +++ b/pdfminer/converter.py @@ -133,7 +133,6 @@ class PDFLayoutAnalyzer(PDFTextDevice): elif shape.count("m") > 1: # recurse if there are multiple m's in this shape for...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
["tests/test_converter.py::TestPaintPath::test_paint_path_without_starting_m", "tests/test_converter.py::TestBinaryDetector::test_stringio", "tests/test_converter.py::TestBinaryDetector::test_bytesio", "tests/test_converter.py::TestBinaryDetector::test_tmpfile", "tests/test_converter.py::TestBinaryDetector::test_binary...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
8
14
1,156
0
0.6
1
0.75
1
0.219333
80.933
7,602
swe_smith::train::9025
swe_smith
train
9,025
pyupio__safety.7654596b.func_pm_remove_wrapper__m6zty9n3
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
NameError when fetching database with caching enabled #### Description When using the safety library with caching enabled, a `NameError` occurs because the variable `data` is referenced but not defined in the `fetch_database_url` function. #### Steps/Code to Reproduce ```python from safety.safety import check from ...
diff --git a/safety/safety.py b/safety/safety.py index 7bb6ad7..5e40578 100644 --- a/safety/safety.py +++ b/safety/safety.py @@ -195,18 +195,12 @@ def fetch_database_url( if r.status_code != 200: raise ServerError(reason=r.reason) - try: - data = r.json() - except json.JSONDecodeError as e:...
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_safety.py::TestSafety::test_check_live", "tests/test_safety.py::TestSafety::test_check_live_cached", "tests/test_safety.py::TestSafety::test_get_cached_packages_licenses"]
["tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_unpinned_requirements", "tests/test_cli.py::TestSafet...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
6
4
1,196
0
0.6
1
0.75
1
0.219333
80.933
7,603
swe_smith::train::42834
swe_smith
train
42,834
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__m1abqrwr
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
# RefResolutionError returns incorrect class when imported ## Description When importing `RefResolutionError` from the `jsonschema` module or `jsonschema.exceptions`, it returns the wrong class. This happens when accessing the deprecated `RefResolutionError` attribute. ```python from jsonschema import RefResolutionE...
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 3dcd296..b3bc885 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -34,15 +34,20 @@ def _pretty(thing: Any, prefix: str): def __getattr__(name): + """ + Handle deprecated attributes. + + This function is calle...
["jsonschema/tests/test_deprecations.py::TestDeprecations::test_RefResolutionError"]
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
13
1
1,056
0
0.6
1
0.75
1
0.219333
80.933
7,604
swe_smith::train::11023
swe_smith
train
11,023
rsalmei__alive-progress.35853799.combine_module__5ivmbvt2
swesmith/rsalmei__alive-progress.35853799
rsalmei/alive-progress
python
null
Progress bar rendering broken after recent changes I'm getting weird errors when trying to use alive-progress. The progress bars aren't displaying correctly and I'm seeing some strange behavior with text rendering and ETA calculations. #### Steps to Reproduce ```python from alive_progress import alive_bar import tim...
diff --git a/alive_progress/utils/cells.py b/alive_progress/utils/cells.py index b8df48c..3d7b9cd 100644 --- a/alive_progress/utils/cells.py +++ b/alive_progress/utils/cells.py @@ -124,7 +124,7 @@ def combine_cells(*fragments): """Combine several fragments of cells into one. Remember that the fragments get a ...
["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...
["tests/animations/test_bars.py::test_bar_error[params0]", "tests/animations/test_bars.py::test_bar_error[params1]", "tests/animations/test_spinners.py::test_frame_spinner[a\\nb-expected0]", "tests/animations/test_spinners.py::test_frame_spinner[abc-expected1]", "tests/animations/test_spinners.py::test_frame_spinner[fr...
jyangballin/swesmith.x86_64.rsalmei_1776_alive-progress.35853799
true
null
2
12
191
1,075
0
0.6
1
0.75
1
0.219167
80.9325
7,605
swe_smith::train::11807
swe_smith
train
11,807
andialbrecht__sqlparse.e57923b3.func_basic__utklij48
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
SQL parsing fails with TypeError when processing aliased expressions #### Description When parsing SQL statements containing aliased expressions, the parser throws a `TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'` error. This affects various SQL constructs including typecast expressions, array i...
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index a63f4da..7d57a7f 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -341,15 +341,15 @@ def group_where(tlist): @recurse() def group_aliased(tlist): - I_ALIAS = (sql.Parenthesis, sql.Function, sql.Case, sql.Ide...
["tests/test_format.py::TestFormat::test_strip_comments_single", "tests/test_format.py::TestFormat::test_strip_comments_multi", "tests/test_format.py::TestFormat::test_strip_comments_preserves_linebreak", "tests/test_format.py::TestFormat::test_strip_comments_preserves_whitespace", "tests/test_format.py::TestFormat::te...
["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
177
1,115
0
0.6
1
0.75
1
0.219167
80.9325
7,606
swe_smith::train::41359
swe_smith
train
41,359
scanny__python-pptx.278b47b1.func_basic__mvv0gb0j
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Categories.levels() method produces infinite recursion with multi-level categories #### Description When working with multi-level chart categories, the `levels()` method enters an infinite recursion loop instead of properly iterating through category levels. #### Steps/Code to Reproduce ```python from pptx import P...
diff --git a/src/pptx/chart/data.py b/src/pptx/chart/data.py index ec6a61f..480fd80 100644 --- a/src/pptx/chart/data.py +++ b/src/pptx/chart/data.py @@ -463,13 +463,11 @@ class Categories(Sequence): """ def levels(categories): - # yield all lower levels - sub_categories = [sc f...
["tests/chart/test_data.py::DescribeCategories::it_knows_its_levels[levels_fixture0]", "tests/chart/test_data.py::DescribeCategories::it_knows_its_levels[levels_fixture1]", "tests/chart/test_xmlwriter.py::Describe_BarChartXmlWriter::it_can_generate_xml_for_multi_level_cat_charts"]
["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
8
3
1,155
0
0.6
1
0.75
1
0.219167
80.9325
7,607
swe_smith::train::49272
swe_smith
train
49,272
mozilla__bleach.73871d76.func_basic__9ribkxsw
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parsing breaks with IndexError when processing nested elements #### Description When processing HTML with nested elements, bleach encounters an IndexError during the tree building process. This affects basic HTML cleaning operations and causes failures when handling common HTML structures. #### Steps/Code to Re...
diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py index 2869da0..a74d606 100644 --- a/bleach/_vendor/html5lib/treebuilders/base.py +++ b/bleach/_vendor/html5lib/treebuilders/base.py @@ -388,14 +388,14 @@ class TreeBuilder(object): return fosterParent, inse...
["tests/test_clean.py::test_stripping_tags[<ul><li><script></li></ul>-kwargs4-<ul><li></li></ul>]", "tests/test_clean.py::test_escaping_tags[<ul><li><script></li></ul>-<ul><li>&lt;script&gt;</li></ul>]", "tests/test_clean.py::test_unquoted_attr_values_are_quoted", "tests/test_clean.py::test_poster_attribute", "tests/te...
["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
14
6
1,035
0
0.6
1
0.75
1
0.219167
80.9325
7,608
swe_smith::train::51532
swe_smith
train
51,532
pydicom__pydicom.7d361b3d.combine_file__o2fcfo9e
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
UID validation and creation broken after recent changes #### Description The UID class is not working correctly - it's accepting invalid UIDs as valid and failing to create UIDs from strings properly. #### Steps/Code to Reproduce ```python from pydicom.uid import UID # This should be invalid but returns True uid =...
diff --git a/src/pydicom/uid.py b/src/pydicom/uid.py index 173a77b..8e93d71 100644 --- a/src/pydicom/uid.py +++ b/src/pydicom/uid.py @@ -71,16 +71,16 @@ class UID(str): """ if isinstance(val, str): if validation_mode is None: - validation_mode = config.settings.reading_vali...
["tests/test_fileset.py::TestRecordNode::test_key_raises", "tests/test_fileset.py::TestRecordNode::test_encoding", "tests/test_fileset.py::TestRecordNode::test_file_id_singleton", "tests/test_fileset.py::TestRecordNode::test_file_id_missing", "tests/test_fileset.py::TestFileInstance::test_path", "tests/test_fileset.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
10
70
1,115
0
0.6
1
0.75
1
0.219167
80.9325
7,609
swe_smith::train::2927
swe_smith
train
2,927
madzak__python-json-logger.5f85723f.combine_file__nh0rsii3
swesmith/madzak__python-json-logger.5f85723f
madzak/python-json-logger
python
null
JSON serialization broken after recent changes #### Description The JSON logger is producing malformed JSON output that can't be parsed. When trying to log messages, the output is not valid JSON and causes `json.decoder.JSONDecodeError` when attempting to parse the logged strings. #### Steps/Code to Reproduce ```py...
diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py index 519a64d..ae690fc 100644 --- a/src/pythonjsonlogger/jsonlogger.py +++ b/src/pythonjsonlogger/jsonlogger.py @@ -96,7 +96,7 @@ class JsonEncoder(json.JSONEncoder): return None def format_datetime_obj(self, ob...
["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg...
["tests/test_jsonlogger.py::TestJsonLogger::test_merge_record_extra", "tests/test_jsonlogger.py::TestJsonLogger::test_rename_nonexistent_field", "tests/test_jsonlogger.py::TestJsonLogger::test_unknown_format_key"]
jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f
true
null
1
10
17
1,115
0
0.6
1
0.75
1
0.219167
80.9325
7,610
r2e_gym::train::5643
r2e_gym
train
5,643
scrapy__ae8a0dc77cf7e2336e1395e8cc22a717e0e3d920
scrapy
scrapy/scrapy
python
ae8a0dc77cf7e2336e1395e8cc22a717e0e3d920
**Title:** ContractsManager Fails to Use Custom Request Classes, Causing TypeError **Description:** When using a contract that specifies a custom request class, such as `FormRequest`, the `ContractsManager` does not utilize the provided `request_cls`. Instead, it defaults to using the standard `Request` class. This le...
diff --git a/docs/topics/contracts.rst b/docs/topics/contracts.rst --- a/docs/topics/contracts.rst +++ b/docs/topics/contracts.rst @@ -86,8 +86,11 @@ .. method:: Contract.adjust_request_args(args) This receives a ``dict`` as an argument containing default arguments - for :class:`~scrapy.http.Requ...
diff --git a/tests/test_contracts.py b/tests/test_contracts.py --- a/tests/test_contracts.py +++ b/tests/test_contracts.py @@ -3,11 +3,12 @@ from twisted.python import failure from twisted.trial import unittest +from scrapy import FormRequest from scrapy.spidermiddlewares.httperror import HttpError from scrapy.sp...
null
null
namanjain12/scrapy_final:ae8a0dc77cf7e2336e1395e8cc22a717e0e3d920
true
null
2
20
null
1,627
0
0.75
1
0.6375
1
0.337833
80.93225
7,611
swe_smith::train::19295
swe_smith
train
19,295
seperman__deepdiff.ed252022.func_pm_remove_assign__z99en986
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
String hashing broken after recent changes #### Description After some recent changes, string hashing is completely broken. When trying to hash strings or objects containing strings, the function fails with various errors or produces incorrect results. #### Steps/Code to Reproduce ```python from deepdiff import Dee...
diff --git a/deepdiff/deephash.py b/deepdiff/deephash.py index 1f293bd..75eb81f 100644 --- a/deepdiff/deephash.py +++ b/deepdiff/deephash.py @@ -91,7 +91,6 @@ def prepare_string_for_hashing( """ Clean type conversions """ - original_type = obj.__class__.__name__ # https://docs.python.org/3/librar...
["tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_hash.py::TestDeepHash::test_deephash_repr", "tests/test_hash.py::TestDeepHash::test_deephash_values", "tests/test_hash.py::TestDeepHash::test_deephash_items", "tests/test_hash.py::TestDeepHash:...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "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::test_cache_1D_array_of_numbers_that_do_not_overlap", "tests/t...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
10
18
1,114
0
0.6
1
0.75
1
0.219
80.932
7,612
swe_smith::train::50873
swe_smith
train
50,873
python-hyper__h11.bed0dd4a.func_basic__xxra250e
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
ReceiveBuffer.is_next_line_obviously_invalid_request_line() returns True for empty buffer #### Description When the receive buffer is empty, `is_next_line_obviously_invalid_request_line()` incorrectly returns `True` instead of `False`, causing valid HTTP connections to be rejected as invalid. #### Steps/Code to Repr...
diff --git a/h11/_receivebuffer.py b/h11/_receivebuffer.py index e5c4e08..bd5e9f0 100644 --- a/h11/_receivebuffer.py +++ b/h11/_receivebuffer.py @@ -146,8 +146,6 @@ class ReceiveBuffer: # versions of TLS so far start handshake with a 0x16 message type code. def is_next_line_obviously_invalid_request_line(self...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_100_continue", "h11/tests/test_connection.py::test_pipelining", "h11/tests/test_connec...
["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_client_talking_to_http10_server", "h11/tests/test_connection.py::test_server_tal...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
6
11
1,194
0
0.6
1
0.75
1
0.219
80.932
7,613
swe_smith::train::48161
swe_smith
train
48,161
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_invert_if__pkzxl7i8
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
ignore_non_existent_files parameter behavior inverted in paths_from_path When calling `paths_from_path` with `ignore_non_existent_files=True`, the function raises a `SQLFluffUserError` instead of returning an empty list. Conversely, when `ignore_non_existent_files=False` (or not specified), it returns an empty list in...
diff --git a/src/sqlfluff/core/linter/discovery.py b/src/sqlfluff/core/linter/discovery.py index eb68e44..6cc8668 100644 --- a/src/sqlfluff/core/linter/discovery.py +++ b/src/sqlfluff/core/linter/discovery.py @@ -267,11 +267,11 @@ def paths_from_path( """ if not os.path.exists(path): if ignore_non_ex...
["test/core/linter/discovery_test.py::test__linter__path_from_paths__not_exist", "test/core/linter/discovery_test.py::test__linter__path_from_paths__not_exist_ignore"]
["test/core/linter/discovery_test.py::test__linter__path_from_paths__dir", "test/core/linter/discovery_test.py::test__linter__path_from_paths__default", "test/core/linter/discovery_test.py::test__linter__path_from_paths__exts", "test/core/linter/discovery_test.py::test__linter__path_from_paths__file", "test/core/linter...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
6
2
1,194
0
0.6
1
0.75
1
0.219
80.932
7,614
swe_smith::train::14535
swe_smith
train
14,535
hukkin__tomli.443a0c1b.func_basic__lzkt67n9
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
# Bug in make_safe_parse_float function ## Description There's an issue with the `make_safe_parse_float` function in the parser. The function is supposed to validate that the `parse_float` callable doesn't return dictionaries or lists, but it's not working correctly. When using a custom `parse_float` function, the v...
diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 16c76cd..98a2e29 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -735,12 +735,12 @@ def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat: """ # The default `float` callable never returns illegal types. Optimize it. ...
["tests/test_error.py::TestError::test_invalid_parse_float"]
["tests/test_data.py::TestData::test_invalid", "tests/test_data.py::TestData::test_valid", "tests/test_error.py::TestError::test_deprecated_tomldecodeerror", "tests/test_error.py::TestError::test_invalid_char_quotes", "tests/test_error.py::TestError::test_line_and_col", "tests/test_error.py::TestError::test_missing_val...
jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b
true
null
1
6
1
1,194
0
0.6
1
0.75
1
0.219
80.932
7,615
swe_smith::train::7713
swe_smith
train
7,713
cantools__cantools.0c6a7871.func_basic__r0gt4hsv
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Multiplexer range generation broken for consecutive IDs #### Description When working with DBC files containing multiplexed signals, the multiplexer range generation logic produces incorrect results for consecutive multiplexer IDs. This affects signal tree generation and causes issues when loading certain DBC files w...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..bc3b23e 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -995,17 +995,16 @@ def _create_mux_ranges(multiplexer_ids): """ ordered = sorted(mul...
["tests/test_database.py::CanToolsDatabaseTest::test_bus_comment", "tests/test_database.py::CanToolsDatabaseTest::test_issue_184_cascaded_multiplexors", "tests/test_database.py::CanToolsDatabaseTest::test_issue_184_independent_multiplexors", "tests/test_database.py::CanToolsDatabaseTest::test_issue_184_multiple_mux_val...
["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
7
1,173
0
0.6
1
0.75
1
0.218833
80.9315
7,616
swe_smith::train::27992
swe_smith
train
27,992
jsvine__pdfplumber.02ff4313.func_pm_remove_cond__uf28s6s7
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
Structure tree parsing fails with KeyError when children is dict #### Description When parsing PDF structure trees, the code fails with a KeyError when encountering structure elements that have a single child object represented as a dict instead of a list. This causes structure tree parsing to break on certain PDF fi...
diff --git a/pdfplumber/structure.py b/pdfplumber/structure.py index 88749d7..a4c6b72 100644 --- a/pdfplumber/structure.py +++ b/pdfplumber/structure.py @@ -269,10 +269,6 @@ class PDFStructTree(Findable): assert "Obj" not in obj, "Uncaught OBJR: %s" % obj # Get page number if necessary page_n...
["tests/test_convert.py::Test::test_cli_structure_text", "tests/test_structure.py::Test::test_structure_tree", "tests/test_structure.py::TestClass::test_all_mcids", "tests/test_structure.py::TestClass::test_element_bbox", "tests/test_structure.py::TestUnparsed::test_unparsed_pages", "tests/test_structure.py::TestMany::...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
7
10
1,173
0
0.6
1
0.75
1
0.218833
80.9315
7,617
swe_smith::train::4386
swe_smith
train
4,386
pygments__pygments.27649ebb.func_pm_op_change__rm0oacp2
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
RTF formatter produces malformed output due to operator errors #### Description The RTF formatter is generating malformed RTF output when line numbers are enabled. The formatter appears to be using incorrect operators in critical formatting sections, causing type errors and broken RTF syntax. #### Steps/Code to Repr...
diff --git a/pygments/formatters/rtf.py b/pygments/formatters/rtf.py index 7f8b7e4..27ec9f0 100644 --- a/pygments/formatters/rtf.py +++ b/pygments/formatters/rtf.py @@ -303,19 +303,19 @@ class RtfFormatter(Formatter): outfile.write(self._hl_open_str) if start_new_line and self.linenos: -...
["tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "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_lineno_padding", "tests/test_rtf_formatter.py...
["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_escape_characters", "tests/test_rtf_formatter.py::test_linenos_off_hl_lines", "tests/test_rtf_formatter.py::test_hl_co...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
13
14
1,053
0
0.6
1
0.75
1
0.218833
80.9315
7,618
swe_smith::train::29886
swe_smith
train
29,886
getnikola__nikola.0f4c230e.func_pm_ctrl_shuffle__hck6d49e
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
WordPress import fails with NameError on get_text_tag function #### Description The WordPress import command is broken and throws a NameError when trying to import WordPress XML files. The function `get_text_tag` in the import_wordpress plugin appears to have a variable reference issue. #### Steps/Code to Reproduce ...
diff --git a/nikola/plugins/command/import_wordpress.py b/nikola/plugins/command/import_wordpress.py index 9a8b130..27793e6 100644 --- a/nikola/plugins/command/import_wordpress.py +++ b/nikola/plugins/command/import_wordpress.py @@ -1159,15 +1159,14 @@ to def get_text_tag(tag, name, default): - """Get the text ...
["tests/test_command_import_wordpress.py::test_populate_context[DEFAULT_LANG-de]", "tests/test_command_import_wordpress.py::test_populate_context[SITE_URL-http://some.blog/]", "tests/test_command_import_wordpress.py::test_populate_context[BLOG_EMAIL-mail@some.blog]", "tests/test_command_import_wordpress.py::test_popula...
["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_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
9
9
1,133
0
0.6
1
0.75
1
0.218833
80.9315
7,619
r2e_gym::train::5223
r2e_gym
train
5,223
pyramid__749575a93961e76bcd623a1284a16e49304a4a56
pyramid
pylons/pyramid
python
749575a93961e76bcd623a1284a16e49304a4a56
**Title:** `strings_differ` Raises TypeError When Using `compare_digest` Parameter **Description:** When using the `strings_differ` function with the `compare_digest` argument, a `TypeError` is raised because the function does not accept this keyword argument. **Example Code:** ```python from pyramid.util import stri...
diff --git a/.travis.yml b/.travis.yml --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,20 @@ # Wire up travis language: python -python: - - 2.6 - - 2.7 - - pypy - - 3.2 - - 3.3 - - 3.4 - - pypy3 +env: + - TOX_ENV=py26 + - TOX_ENV=py27 + - TOX_ENV=py32 + - TOX_ENV=py33 + - TOX_ENV=py34 + - TOX_ENV=pypy ...
diff --git a/pyramid/tests/test_util.py b/pyramid/tests/test_util.py --- a/pyramid/tests/test_util.py +++ b/pyramid/tests/test_util.py @@ -216,6 +216,49 @@ self.assertEqual(len(wos), 0) self.assertEqual(list(wos), []) self.assertEqual(wos.last, None) + +class Test_strings_differ(unittest.Test...
null
null
namanjain12/pyramid_final:749575a93961e76bcd623a1284a16e49304a4a56
true
null
3
59
null
845
0
0.75
1
0.6375
1
0.3375
80.93125
7,620
swe_smith::train::46590
swe_smith
train
46,590
python-trio__trio.cfbbe2c1.combine_file__9tjbh30a
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
RunVar.get() returns wrong default value when variable not set #### Description When a RunVar is accessed with `.get(default=...)` and the variable hasn't been set, it returns the RunVar's internal default instead of the provided default parameter. #### Steps/Code to Reproduce ```python import trio async def main(...
diff --git a/src/trio/_core/_local.py b/src/trio/_core/_local.py index fff1234..129ec7c 100644 --- a/src/trio/_core/_local.py +++ b/src/trio/_core/_local.py @@ -24,7 +24,7 @@ class RunVarToken(Generic[T], metaclass=NoPublicConstructor): @classmethod def _empty(cls, var: RunVar[T]) -> RunVarToken[T]: - ...
["src/trio/_core/_tests/test_local.py::test_runvar_smoketest", "src/trio/_core/_tests/test_local.py::test_runvar_resetting", "src/trio/_core/_tests/test_local.py::test_runvar_sync", "src/trio/_core/_tests/test_run.py::test_cancel_scope_repr", "src/trio/_tests/test_dtls.py::test_smoke[ipv4]", "src/trio/_tests/test_dtls....
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
12
152
1,072
0
0.6
1
0.75
1
0.218667
80.931
7,621
swe_smith::train::30511
swe_smith
train
30,511
gweis__isodate.17cb25eb.combine_module__0y5ktdlh
swesmith/gweis__isodate.17cb25eb
gweis/isodate
python
null
Duration.__repr__ method has incorrect parameter order #### Description The `Duration.__repr__` method is producing incorrect output due to parameters being passed in the wrong order. When creating a Duration object and calling `repr()` on it, the representation shows swapped values for days/seconds and years/months ...
diff --git a/src/isodate/duration.py b/src/isodate/duration.py index 85241e4..0efc47e 100644 --- a/src/isodate/duration.py +++ b/src/isodate/duration.py @@ -106,11 +106,11 @@ class Duration: return "{}.{}({}, {}, {}, years={}, months={})".format( self.__class__.__module__, self.__clas...
["tests/test_duration.py::test_format_parse[P18Y9M4DT11H9M8S-expectation0-P%P-None]", "tests/test_duration.py::test_format_parse[P3Y6M4DT12H30M5S-expectation2-P%P-None]", "tests/test_duration.py::test_format_parse[P23DT23H-expectation3-P%P-None]", "tests/test_duration.py::test_format_parse[P4Y-expectation4-P%P-None]", ...
["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::tes...
jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb
true
null
2
6
24
1,191
0
0.6
1
0.75
1
0.2185
80.9305
7,622
swe_smith::train::21877
swe_smith
train
21,877
life4__textdistance.c3aca916.func_basic__ba7rv8ca
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
ArithNCD compression algorithm produces ZeroDivisionError #### Description The ArithNCD algorithm in the compression_based module is throwing ZeroDivisionError when calculating similarity between strings. This affects the normalized distance and similarity calculations. #### Steps/Code to Reproduce ```python import...
diff --git a/textdistance/algorithms/compression_based.py b/textdistance/algorithms/compression_based.py index 28fd151..d0d60b2 100644 --- a/textdistance/algorithms/compression_based.py +++ b/textdistance/algorithms/compression_based.py @@ -138,13 +138,13 @@ class ArithNCD(_NCDBase): def _compress(self, data: str)...
["tests/test_compression/test_arith_ncd.py::test_similarity[test-test-1]", "tests/test_compression/test_arith_ncd.py::test_similarity[test-nani-2.1666666666666665]", "tests/test_compression/test_arith_ncd.py::test_arith_output", "tests/test_compression/test_common.py::test_monotonicity[alg0]", "tests/test_compression/t...
["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
7
1,111
0
0.6
1
0.75
1
0.2185
80.9305
7,623
swe_smith::train::44347
swe_smith
train
44,347
pydata__patsy.a5d16484.func_pm_ctrl_shuffle__qp3mxfcc
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
EvalFactor test fails with UnboundLocalError when assertions are reordered #### Description When running the test suite, there's an issue with variable scoping in the `test_EvalFactor_basics` function. The test fails with `UnboundLocalError: local variable referenced before assignment` when trying to access variables...
diff --git a/patsy/eval.py b/patsy/eval.py index 9d1fba0..3d950e0 100644 --- a/patsy/eval.py +++ b/patsy/eval.py @@ -602,17 +602,16 @@ class EvalFactor(object): def test_EvalFactor_basics(): + assert e.origin is None + assert e == e2 e = EvalFactor("a+b") - assert e.code == "a + b" - assert e.name...
["patsy/eval.py::test_EvalFactor_basics"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
13
1
1,051
0
0.6
1
0.75
1
0.2185
80.9305
7,624
swe_smith::train::10392
swe_smith
train
10,392
paramiko__paramiko.23f92003.func_basic__aw5bp1fo
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP get method fails with "size match" error when downloading files #### Description When using the SFTP client's `get()` method to download files, it raises an `OSError` with the message "size match in get!" instead of successfully downloading the file. This happens for both small and large files. #### Steps/Code ...
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 066cd83..9470926 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -836,7 +836,7 @@ class SFTPClient(BaseSFTP, ClosingContextManager): .. versionchanged:: 3.3 Added ``max_concurrent_prefetch_requests``. ...
["tests/test_sftp.py::TestSFTP::test_get_put", "tests/test_sftp.py::TestSFTP::test_get_without_prefetch"]
["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
2
1,191
0
0.6
1
0.75
1
0.2185
80.9305
7,625
swe_smith::train::20656
swe_smith
train
20,656
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__kkljj8jz
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Snowflake location path parsing returns undefined variable #### Description When parsing Snowflake location paths (like `@stage/path`), the parser encounters an `UnboundLocalError` due to a variable being referenced before assignment. #### Steps/Code to Reproduce ```python import sqlglot from sqlglot import parse_o...
diff --git a/sqlglot/dialects/snowflake.py b/sqlglot/dialects/snowflake.py index efcec16..03cf4c4 100644 --- a/sqlglot/dialects/snowflake.py +++ b/sqlglot/dialects/snowflake.py @@ -864,9 +864,11 @@ class Snowflake(Dialect): ) def _parse_location_path(self) -> exp.Var: - start = self._...
["tests/dialects/test_snowflake.py::TestSnowflake::test_copy", "tests/dialects/test_snowflake.py::TestSnowflake::test_ddl", "tests/dialects/test_snowflake.py::TestSnowflake::test_put_to_stage", "tests/dialects/test_snowflake.py::TestSnowflake::test_staged_files"]
["tests/dialects/test_snowflake.py::TestSnowflake::test_alter_set_unset", "tests/dialects/test_snowflake.py::TestSnowflake::test_describe_table", "tests/dialects/test_snowflake.py::TestSnowflake::test_flatten", "tests/dialects/test_snowflake.py::TestSnowflake::test_from_changes", "tests/dialects/test_snowflake.py::Test...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
7
4
1,171
0
0.6
1
0.75
1
0.2185
80.9305
7,626
swe_smith::train::11031
swe_smith
train
11,031
rsalmei__alive-progress.35853799.combine_module__8fma1tde
swesmith/rsalmei__alive-progress.35853799
rsalmei/alive-progress
python
null
Progress bar configuration broken after recent changes #### Description The progress bar configuration system appears to be broken. When trying to create progress bars with various configurations, the system throws TypeErrors and ValueError exceptions. #### Steps/Code to Reproduce ```python from alive_progress impo...
diff --git a/alive_progress/core/configuration.py b/alive_progress/core/configuration.py index b36d671..ba0c847 100644 --- a/alive_progress/core/configuration.py +++ b/alive_progress/core/configuration.py @@ -20,9 +20,9 @@ def _spinner_input_factory(default): def _bar_input_factory(): - from ..animations import...
["tests/core/test_configuration.py::test_config_creation", "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_confi...
["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
2
10
81
1,111
0
0.6
1
0.75
1
0.2185
80.9305
7,627
r2e_gym::train::5169
r2e_gym
train
5,169
pyramid__46225d3323b761196c045de8e79145baa80192ea
pyramid
pylons/pyramid
python
46225d3323b761196c045de8e79145baa80192ea
**Title:** `strings_differ` Function Raises TypeError When `compare_digest` Argument is Provided **Description:** The `strings_differ` function is intended to compare two strings securely to prevent timing attacks. However, when attempting to pass a custom comparator using the `compare_digest` parameter, the function ...
diff --git a/CHANGES.txt b/CHANGES.txt --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,6 +32,11 @@ - Greatly improve the readability of the ``pcreate`` shell script output. See https://github.com/Pylons/pyramid/pull/1453 + +- Improve robustness to timing attacks in the ``AuthTktCookieHelper`` and + the ``SignedCookie...
diff --git a/pyramid/tests/test_util.py b/pyramid/tests/test_util.py --- a/pyramid/tests/test_util.py +++ b/pyramid/tests/test_util.py @@ -216,6 +216,49 @@ self.assertEqual(len(wos), 0) self.assertEqual(list(wos), []) self.assertEqual(wos.last, None) + +class Test_strings_differ(unittest.Test...
null
null
namanjain12/pyramid_final:46225d3323b761196c045de8e79145baa80192ea
true
null
2
37
null
1,283
0
0.75
1
0.6375
1
0.337167
80.93025
7,628
swe_smith::train::28764
swe_smith
train
28,764
encode__starlette.db5063c2.func_pm_class_rm_funcs__ngm1pl0l
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
StreamingResponse constructor missing after recent changes #### Description After some recent changes, `StreamingResponse` can no longer be instantiated. The constructor appears to have been removed, causing any code that tries to create a `StreamingResponse` instance to fail. #### Steps/Code to Reproduce ```python...
diff --git a/starlette/responses.py b/starlette/responses.py index c711dfa..a79f551 100644 --- a/starlette/responses.py +++ b/starlette/responses.py @@ -211,23 +211,6 @@ ContentStream = typing.Union[AsyncContentStream, SyncContentStream] class StreamingResponse(Response): body_iterator: AsyncContentStream - ...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_custom_middleware[trio]", "tests/middleware/test_gzip.py::test_gzip_streaming_response[asyncio]", "tests/middleware/test_gzip.py::test_gzip_ignored_for_responses_with_encoding_set[asyncio]", "tests/middleware/test_gz...
["tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTT...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
18
24
950
0
0.6
1
0.75
1
0.218333
80.93
7,629
swe_smith::train::20405
swe_smith
train
20,405
tobymao__sqlglot.036601ba.combine_file__mfxgq4ib
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in date_trunc_to_time and build_date_delta functions #### Description When using SQL parsing and generation functionality, encountering UnboundLocalError exceptions due to variables being referenced before assignment in helper functions. #### Steps/Code to Reproduce ```python import sqlglot from s...
diff --git a/sqlglot/dialects/dialect.py b/sqlglot/dialects/dialect.py index 019833f..8d7c49f 100644 --- a/sqlglot/dialects/dialect.py +++ b/sqlglot/dialects/dialect.py @@ -1066,10 +1066,9 @@ def inline_array_sql(self: Generator, expression: exp.Array) -> str: def inline_array_unless_query(self: Generator, expressio...
["tests/dialects/test_dialect.py::TestDialect::test_alias", "tests/dialects/test_dialect.py::TestDialect::test_array", "tests/dialects/test_dialect.py::TestDialect::test_array_any", "tests/dialects/test_dialect.py::TestDialect::test_cast", "tests/dialects/test_dialect.py::TestDialect::test_cast_to_user_defined_type", "...
["tests/dialects/test_dialect.py::TestDialect::test_compare_dialect_versions", "tests/dialects/test_dialect.py::TestDialect::test_compare_dialects", "tests/dialects/test_dialect.py::TestDialect::test_create_sequence", "tests/dialects/test_dialect.py::TestDialect::test_lateral_subquery", "tests/dialects/test_dialect.py:...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
13
46
1,050
0
0.6
1
0.75
1
0.218333
80.93
7,630
swe_smith::train::48604
swe_smith
train
48,604
sqlfluff__sqlfluff.50a1c4b6.pr_5091
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
### ImportError in CLI Commands #### Description After applying the recent changes, I encountered an `ImportError` when running certain CLI commands. This seems to be affecting multiple functionalities, particularly those related to file parsing and linting. #### Steps to Reproduce 1. Attempt to run a CLI command t...
diff --git a/src/sqlfluff/rules/structure/ST09.py b/src/sqlfluff/rules/structure/ST09.py index 8f6a65f..98687ef 100644 --- a/src/sqlfluff/rules/structure/ST09.py +++ b/src/sqlfluff/rules/structure/ST09.py @@ -1,15 +1,10 @@ """Implementation of Rule ST09.""" -from typing import List, Optional, Tuple, cast - -from sql...
["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_lint_stdin[command0]", "test/cli/commands_test.py::test__cli__command_lint_stdin[command1]", "test/cli/commands_test.py::test__cli__command_lint_stdin[command2]", "test/cli/commands_test.py::test__cli__command_lint...
["test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_no_dialect[command0]", "test/cli/commands_test.py::test__cli__command_no_dialect[command1]", "test/cli/commands_test.py::test__cli__command_no_dialect[command2]", "test/cli/commands_test.py::test__cli__command_no_di...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
15
94
1,010
0
0.6
1
0.75
1
0.218333
80.93
7,631
swe_smith::train::1750
swe_smith
train
1,750
agronholm__typeguard.b6a7e438.func_basic__5epnnbo9
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Callable type checking broken - non-callable values pass validation #### Description When checking if a value matches a `Callable` type annotation, non-callable values are incorrectly accepted instead of raising a `TypeCheckError`. #### Steps/Code to Reproduce ```python from typeguard import check_type from typing ...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..34b3c6a 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -150,7 +150,7 @@ def check_callable( memo: TypeCheckMemo, ) -> None: if not callable(value): - raise TypeCheckError("is not callable")...
["tests/test_checkers.py::TestCallable::test_bad_type", "tests/test_checkers.py::TestCallable::test_too_few_arguments", "tests/test_checkers.py::TestCallable::test_too_many_arguments", "tests/test_checkers.py::TestCallable::test_mandatory_kwonlyargs", "tests/test_checkers.py::TestCallable::test_partial_class", "tests/t...
["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
17
7
970
0
0.6
1
0.75
1
0.218333
80.93
7,632
swe_smith::train::7956
swe_smith
train
7,956
cantools__cantools.0c6a7871.func_pm_ctrl_shuffle__bk1vvmq7
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
check_profile5_crc function throws UnboundLocalError when called #### Description The `check_profile5_crc` function in the AUTOSAR end-to-end protection module is throwing an `UnboundLocalError` when trying to access the `crc` variable. This happens because the variable is being referenced before it's assigned. ####...
diff --git a/src/cantools/autosar/end_to_end.py b/src/cantools/autosar/end_to_end.py index 2ce4ae7..bd4a832 100644 --- a/src/cantools/autosar/end_to_end.py +++ b/src/cantools/autosar/end_to_end.py @@ -166,18 +166,18 @@ def apply_profile5_crc(payload: bytes, def check_profile5_crc(payload: bytes, ...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5"]
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommand...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
16
1
990
0
0.6
1
0.75
1
0.218333
80.93
7,633
swe_smith::train::26273
swe_smith
train
26,273
pylint-dev__astroid.b114f6b5.func_pm_ctrl_shuffle__35n46oc2
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
NodeNG.__repr__ method raises UnboundLocalError #### Description The `__repr__` method in `NodeNG` class raises an `UnboundLocalError` when trying to access local variables that are defined after their usage in the return statement. #### Steps/Code to Reproduce ```python import astroid # Create any astroid node no...
diff --git a/astroid/nodes/node_ng.py b/astroid/nodes/node_ng.py index c6a044f..cdf976c 100644 --- a/astroid/nodes/node_ng.py +++ b/astroid/nodes/node_ng.py @@ -214,23 +214,22 @@ class NodeNG: } def __repr__(self) -> str: - rname = self.repr_name() - # The dependencies used to calculate fr...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_mul...
["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_dtype", "tests/brain/numpy/test_core_numeric.py::test_function_parameters[ones-e...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
21
193
890
0
0.6
1
0.75
1
0.218333
80.93
7,634
swe_smith::train::44361
swe_smith
train
44,361
pydata__patsy.a5d16484.func_pm_op_break_chains__ffiyo7jv
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
DesignMatrix repr fails with TypeError when concatenating strings When calling `repr()` on a DesignMatrix object, a TypeError is raised due to incorrect string concatenation in the pretty printing code. #### Steps/Code to Reproduce ```python import numpy as np from patsy.design_info import DesignInfo, DesignMatrix ...
diff --git a/patsy/design_info.py b/patsy/design_info.py index d94b97a..a6a122b 100644 --- a/patsy/design_info.py +++ b/patsy/design_info.py @@ -1216,13 +1216,13 @@ class DesignMatrix(np.ndarray): column_name_widths, column_num_widths ) ] - total_width = IND...
["patsy/design_info.py::test_design_matrix"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
9
1
1,130
0
0.6
1
0.75
1
0.218333
80.93
7,635
swe_smith::train::17999
swe_smith
train
17,999
pyasn1__pyasn1.0f07d724.func_pm_remove_cond__zm0eq9qj
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
AnyPayloadDecoder broken after removing isUntagged logic #### Description The AnyPayloadDecoder is failing to decode ANY types properly. When trying to decode ASN.1 structures containing ANY elements, the decoder raises a NameError because the `isUntagged` variable is referenced but no longer defined. #### Steps/Cod...
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 7e69ca1..c856102 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -1289,14 +1289,6 @@ class AnyPayloadDecoder(AbstractSimplePayloadDecoder): tagSet=None, length=None, state=None, ...
["tests/codec/ber/test_decoder.py::SequenceDecoderWithUntaggedOpenTypesTestCase::testDecodeOpenTypesChoiceOne", "tests/codec/ber/test_decoder.py::SequenceDecoderWithUntaggedOpenTypesTestCase::testDecodeOpenTypesChoiceTwo", "tests/codec/ber/test_decoder.py::SequenceDecoderWithUntaggedOpenTypesTestCase::testDecodeOpenTyp...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
16
67
989
0
0.6
1
0.75
1
0.218167
80.9295
7,636
swe_smith::train::10101
swe_smith
train
10,101
paramiko__paramiko.23f92003.combine_file__dr7e2atl
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
ECDSA key operations broken after recent changes I'm having issues with ECDSA key operations that seem to have started recently. When trying to use ECDSA keys for SSH connections or signing operations, I'm getting various errors. #### Steps/Code to Reproduce ```python import paramiko from paramiko import ECDSAKey #...
diff --git a/paramiko/ecdsakey.py b/paramiko/ecdsakey.py index 6fd95fa..847857e 100644 --- a/paramiko/ecdsakey.py +++ b/paramiko/ecdsakey.py @@ -212,7 +212,7 @@ class ECDSAKey(PKey): return self.ecdsa_curve.key_format_identifier def get_bits(self): - return self.ecdsa_curve.key_length + re...
["tests/test_client.py::SSHClientTest::test_auto_add_policy", "tests/test_client.py::SSHClientTest::test_certs_allowed_as_key_filename_values", "tests/test_client.py::SSHClientTest::test_certs_implicitly_loaded_alongside_key_filename_keys", "tests/test_client.py::SSHClientTest::test_channel_timeout", "tests/test_client...
["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
24
1,189
0
0.6
1
0.75
1
0.218167
80.9295
7,637
swe_smith::train::29174
swe_smith
train
29,174
tox-dev__pipdeptree.c31b6418.func_pm_ctrl_shuffle__oanv63an
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
UnboundLocalError when using --local-only or --user-only flags #### Description When using the `--local-only` or `--user-only` flags, pipdeptree crashes with an `UnboundLocalError: local variable 'in_venv' referenced before assignment`. This happens because the variable `in_venv` is being used before it's defined in ...
diff --git a/src/pipdeptree/_discovery.py b/src/pipdeptree/_discovery.py index ba23498..2c78800 100644 --- a/src/pipdeptree/_discovery.py +++ b/src/pipdeptree/_discovery.py @@ -19,15 +19,12 @@ def get_installed_distributions( local_only: bool = False, # noqa: FBT001, FBT002 user_only: bool = False, # noqa: ...
["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_discovery.py::test_local_only", "tests/test_d...
["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
11
20
1,089
0
0.6
1
0.75
1
0.218167
80.9295
7,638
swe_smith::train::32470
swe_smith
train
32,470
pydantic__pydantic.acb0f10f.func_pm_class_rm_funcs__abxavgzt
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Color.original() method missing after recent changes #### Description The `Color` class is missing the `original()` method which was previously available to get the original value passed to the Color constructor. This breaks existing code that relies on this method. #### Steps/Code to Reproduce ```python from pydan...
diff --git a/pydantic/color.py b/pydantic/color.py index 9a42d58..1014963 100644 --- a/pydantic/color.py +++ b/pydantic/color.py @@ -105,10 +105,6 @@ class Color(_repr.Representation): field_schema.update(type='string', format='color') return field_schema - def original(self) -> ColorType: - ...
["tests/test_color.py::test_color_success[aliceblue-as_tuple0]", "tests/test_color.py::test_color_success[Antiquewhite-as_tuple1]", "tests/test_color.py::test_color_success[#000000-as_tuple2]", "tests/test_color.py::test_color_success[#DAB-as_tuple3]", "tests/test_color.py::test_color_success[#dab-as_tuple4]", "tests/t...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
27
24
769
0
0.6
1
0.75
1
0.218167
80.9295
7,639
swe_smith::train::47812
swe_smith
train
47,812
sqlfluff__sqlfluff.50a1c4b6.func_basic__aig4jfve
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
String padding alignment broken in pad_line function #### Description The `pad_line` function in `src/sqlfluff/cli/helpers.py` is not working correctly for string alignment. When trying to pad strings with left or right alignment, the function produces incorrect output. #### Steps/Code to Reproduce ```python from s...
diff --git a/src/sqlfluff/cli/helpers.py b/src/sqlfluff/cli/helpers.py index d4af719..e5478d6 100644 --- a/src/sqlfluff/cli/helpers.py +++ b/src/sqlfluff/cli/helpers.py @@ -65,15 +65,15 @@ def wrap_field( def pad_line(s: str, width: int, align: str = "left") -> str: """Pad a string with a given alignment to a s...
["test/cli/helpers_test.py::test__cli__helpers__pad_line"]
["test/cli/helpers_test.py::test__cli__helpers__wrap_elem[abc-5-res0]", "test/cli/helpers_test.py::test__cli__helpers__wrap_field_a", "test/cli/helpers_test.py::test__cli__helpers__wrap_field_b", "test/cli/helpers_test.py::test__cli__helpers__wrap_field_c", "test/cli/helpers_test.py::test_cli__helpers__lazy_sequence"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
8
1
1,149
0
0.6
1
0.75
1
0.218167
80.9295
7,640
swe_smith::train::3226
swe_smith
train
3,226
Suor__funcy.207a7810.func_pm_remove_cond__6kcyutv4
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
retry function doesn't work anymore The retry decorator seems to be broken. When I try to use it with a function that raises exceptions, it doesn't retry at all and just silently returns None instead of either retrying or raising the exception. #### Steps/Code to Reproduce ```python from funcy import retry def fail...
diff --git a/funcy/flow.py b/funcy/flow.py index 85c5a8e..9793498 100644 --- a/funcy/flow.py +++ b/funcy/flow.py @@ -98,17 +98,7 @@ def retry(call, tries, errors=Exception, timeout=0, filter_errors=None): try: return call() except errors as e: - if not (filter_errors is None or...
["tests/test_flow.py::test_retry", "tests/test_flow.py::test_retry_timeout", "tests/test_flow.py::test_retry_filter"]
["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
3
1,069
0
0.6
1
0.75
1
0.218167
80.9295
7,641
swe_smith::train::1113
swe_smith
train
1,113
jd__tenacity.0d40e76f.func_basic__khtqs09h
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
IterState.reset() method breaks retry functionality #### Description The `IterState.reset()` method appears to be setting incorrect default values, causing retry operations to fail with AttributeError exceptions. When using tenacity decorators or context managers, the retry state gets corrupted after reset operations...
diff --git a/tenacity/__init__.py b/tenacity/__init__.py index 72eba04..92f9c77 100644 --- a/tenacity/__init__.py +++ b/tenacity/__init__.py @@ -114,11 +114,11 @@ class IterState: is_explicit_retry: bool = False def reset(self) -> None: - self.actions = [] - self.retry_run_result = False - ...
["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
10
70
1,109
0
0.6
1
0.75
1
0.218167
80.9295
7,642
swe_smith::train::50839
swe_smith
train
50,839
python-hyper__h11.bed0dd4a.func_basic__hst70n66
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
Server switch event validation logic inverted #### Description When handling server switch events, the validation logic appears to be inverted. The code is rejecting valid switch events and potentially accepting invalid ones. #### Steps/Code to Reproduce ```python import h11 # Create a server connection conn = h11...
diff --git a/h11/_state.py b/h11/_state.py index 3ad444b..60f6085 100644 --- a/h11/_state.py +++ b/h11/_state.py @@ -281,19 +281,19 @@ class ConnectionState: _event_type: Union[Type[Event], Tuple[Type[Event], Type[Sentinel]]] = event_type if server_switch_event is not None: assert role is...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_client_talking_to_http10_server", "h11/t...
["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_close_simple", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_connection.py::test_connection_drop"...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
16
27
989
0
0.6
1
0.75
1
0.218167
80.9295
7,643
swe_smith::train::32696
swe_smith
train
32,696
pydantic__pydantic.acb0f10f.func_pm_remove_cond__ljq3yo6a
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
ValueItems.merge fails with NameError when merging dictionaries #### Description When calling `ValueItems.merge()` with dictionary arguments, the method raises a `NameError: name 'merge_keys' is not defined`. This appears to happen when the merge logic tries to process dictionary keys but the `merge_keys` variable is...
diff --git a/pydantic/_internal/_utils.py b/pydantic/_internal/_utils.py index abe89c8..3a5ea41 100644 --- a/pydantic/_internal/_utils.py +++ b/pydantic/_internal/_utils.py @@ -257,17 +257,9 @@ class ValueItems(_repr.Representation): base = cls._coerce_value(base) if override is None: ret...
["tests/test_construction.py::test_copy_exclude", "tests/test_construction.py::test_copy_include", "tests/test_construction.py::test_copy_include_exclude", "tests/test_construction.py::test_copy_advanced_exclude", "tests/test_construction.py::test_copy_advanced_include", "tests/test_construction.py::test_copy_advanced_...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
9
29
1,128
0
0.6
1
0.75
1
0.218
80.929
7,644
swe_smith::train::42357
swe_smith
train
42,357
r1chardj0n3s__parse.30da9e4f.func_basic__fzfnw3uy
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
Type conversion logic broken for named fields When using named fields with type conversions, the parser fails to apply type conversions correctly and throws KeyError exceptions. #### Steps/Code to Reproduce ```python import parse # Simple named field parsing fails r = parse.parse('{name}', 'hello') print(r.named) ...
diff --git a/parse.py b/parse.py index 80242e1..bb28173 100644 --- a/parse.py +++ b/parse.py @@ -567,14 +567,12 @@ class Parser(object): def evaluate_result(self, m): """Generate a Result instance for the given regex match object""" - # ok, figure the fixed fields we've pulled out and type conver...
["README.rst::README.rst", "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_parse.py::test_named", "tests/test_parse.py::test_named_repeated", "tests/test_parse.py::test_named_repeated_type"...
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "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_...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
16
35
988
0
0.6
1
0.75
1
0.218
80.929
7,645
swe_smith::train::24260
swe_smith
train
24,260
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__qlykijzu
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
VSOClient.fetch() fails when passed QueryResponseRow #### Description When calling `VSOClient.fetch()` with a `QueryResponseRow` object, the method fails with an `AttributeError: 'bool' object has no attribute 'get_type'`. #### Steps/Code to Reproduce ```python from sunpy.net import vso # Create a VSO client clien...
diff --git a/sunpy/net/vso/vso.py b/sunpy/net/vso/vso.py index 8a0b1ef..aa15ca2 100644 --- a/sunpy/net/vso/vso.py +++ b/sunpy/net/vso/vso.py @@ -392,14 +392,13 @@ class VSOClient(BaseClient): dl_set = True if not downloader: dl_set = False - downloader = Downloader(progress=pro...
["sunpy/net/vso/tests/test_vso.py::test_row_to_table"]
["sunpy/net/vso/tests/test_vso.py::test_str", "sunpy/net/vso/tests/test_vso.py::test_repr", "sunpy/net/vso/tests/test_vso.py::test_show", "sunpy/net/vso/tests/test_vso.py::test_non_str_instrument", "sunpy/net/vso/tests/test_vso.py::test_iter_sort_response", "sunpy/net/vso/tests/test_vso.py::test_from_zeep_response", "s...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
6
1
1,188
0
0.6
1
0.75
1
0.218
80.929
7,646
swe_smith::train::4244
swe_smith
train
4,244
pygments__pygments.27649ebb.func_pm_class_rm_funcs__54j81hap
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
DelphiLexer missing initialization attributes after __init__ removal When trying to use the DelphiLexer, it fails with AttributeError because the lexer is missing required attributes that were previously set in the `__init__` method. #### Steps/Code to Reproduce ```python from pygments.lexers import DelphiLexer lex...
diff --git a/pygments/lexers/pascal.py b/pygments/lexers/pascal.py index bb5e1e7..2f7b882 100644 --- a/pygments/lexers/pascal.py +++ b/pygments/lexers/pascal.py @@ -399,26 +399,6 @@ class DelphiLexer(Lexer): 'inteiro', 'real', 'caractere', 'logico' } - def __init__(self, **options): - Lexer.__...
["tests/test_basic_api.py::test_random_input[DelphiLexer]", "tests/test_basic_api.py::test_lexer_options[PortugolLexer]", "tests/test_basic_api.py::test_random_input[PortugolLexer]", "tests/test_basic_api.py::test_lexer_options[DelphiLexer]", "tests/examplefiles/delphi/example.pas::", "tests/examplefiles/delphi/test.pa...
["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
22
7
868
0
0.6
1
0.75
1
0.218
80.929
7,647
swe_smith::train::28248
swe_smith
train
28,248
Mimino666__langdetect.a1598f1a.func_basic__zstlekfj
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
Language detection fails with TypeError after recent changes #### Description Language detection is broken and throws TypeError when trying to detect languages. The detector seems to have issues with its internal state initialization. #### Steps/Code to Reproduce ```python from langdetect import DetectorFactory fa...
diff --git a/langdetect/detector.py b/langdetect/detector.py index cc831a0..388e909 100644 --- a/langdetect/detector.py +++ b/langdetect/detector.py @@ -54,18 +54,18 @@ class Detector(object): MAIL_RE = re.compile(r'[-_.0-9A-Za-z]{1,64}@[-_0-9A-Za-z]{1,255}[-_.0-9A-Za-z]{1,255}') def __init__(self, factory)...
["langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4"]
["langdetect/tests/test_detector.py::DetectorTest::test_factory_from_json_string", "langdetect/tests/test_detector.py::DetectorTest::test_lang_list", "langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_lang_profile.p...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
1
16
4
988
0
0.6
1
0.75
1
0.218
80.929
7,648
swe_smith::train::2417
swe_smith
train
2,417
pdfminer__pdfminer.six.1a8bd2f7.func_pm_ctrl_invert_if__a9y0t4m2
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDF interpreter incorrectly handles PSKeyword objects in stack operations #### Description When processing PDF content streams, the PDF interpreter is pushing PSKeyword objects onto the stack instead of processing them as operators. This causes PSKeyword objects to be treated as operands, leading to AttributeError ex...
diff --git a/pdfminer/pdfinterp.py b/pdfminer/pdfinterp.py index ae1c46a..2493441 100644 --- a/pdfminer/pdfinterp.py +++ b/pdfminer/pdfinterp.py @@ -1003,6 +1003,8 @@ class PDFPageInterpreter: except PSEOF: break if isinstance(obj, PSKeyword): + self.push(obj) +...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
6
56
1,188
0
0.6
1
0.75
1
0.218
80.929
7,649
r2e_gym::train::13
r2e_gym
train
13
orange3__4651e73c8ea9a502d4fd6ee25f33ece07b693b37
orange3
biolab/orange3
python
4651e73c8ea9a502d4fd6ee25f33ece07b693b37
**Title:** AttributeError Occurs When Concatenating Incompatible Data Types in OWConcatenate Widget **Description:** When attempting to concatenate datasets of different types using the OWConcatenate widget, an AttributeError is raised. This occurs because the widget does not properly handle cases where input data typ...
diff --git a/Orange/widgets/data/owconcatenate.py b/Orange/widgets/data/owconcatenate.py --- a/Orange/widgets/data/owconcatenate.py +++ b/Orange/widgets/data/owconcatenate.py @@ -20,7 +20,7 @@ from Orange.widgets.utils.annotated_data import add_columns from Orange.widgets.utils.sql import check_sql_input from Orange...
diff --git a/Orange/widgets/data/tests/test_owconcatenate.py b/Orange/widgets/data/tests/test_owconcatenate.py --- a/Orange/widgets/data/tests/test_owconcatenate.py +++ b/Orange/widgets/data/tests/test_owconcatenate.py @@ -1,5 +1,6 @@ # Test methods with long descriptive names can omit docstrings # pylint: disable=mi...
null
null
namanjain12/orange3_final:4651e73c8ea9a502d4fd6ee25f33ece07b693b37
true
null
1
30
null
1,420
0
0.75
1
0.6375
1
0.336667
80.92875
7,650
swe_smith::train::20412
swe_smith
train
20,412
tobymao__sqlglot.036601ba.combine_file__tuhqmvwe
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
PRQL parser fails with UnboundLocalError on basic queries #### Description When parsing PRQL queries, the parser throws an `UnboundLocalError` for the variable `from_`. This happens even with simple queries like `from x`. #### Steps/Code to Reproduce ```python import sqlglot # This should work but throws UnboundLo...
diff --git a/sqlglot/dialects/prql.py b/sqlglot/dialects/prql.py index 2fc2594..231cbe3 100644 --- a/sqlglot/dialects/prql.py +++ b/sqlglot/dialects/prql.py @@ -89,18 +89,17 @@ class PRQL(Dialect): return expression def _parse_query(self) -> t.Optional[exp.Query]: - from_ = self._pars...
["tests/dialects/test_prql.py::TestPRQL::test_prql"]
["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
18
1
947
0
0.6
1
0.75
1
0.217833
80.9285
7,651
swe_smith::train::32941
swe_smith
train
32,941
pydantic__pydantic.acb0f10f.pr_6405
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Discriminator fails with single-variant Union types #### Description When using a discriminated union with only one variant, pydantic now raises a `TypeError` instead of handling it gracefully. This breaks existing code that may have single-variant unions, particularly in generic contexts or when union variants are c...
diff --git a/pydantic/_internal/_discriminated_union.py b/pydantic/_internal/_discriminated_union.py index 5dd6fda..1c9b0a1 100644 --- a/pydantic/_internal/_discriminated_union.py +++ b/pydantic/_internal/_discriminated_union.py @@ -186,15 +186,13 @@ class _ApplyInferredDiscriminator: return definitions_wr...
["tests/benchmarks/test_model_schema_generation.py::test_construct_dataclass_schema", "tests/test_discriminated_union.py::test_discriminated_union_type_invalid_single_variant", "tests/test_discriminated_union.py::test_discriminated_single_variant[True]", "tests/test_discriminated_union.py::test_discriminated_single_var...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
14
14
1,027
0
0.6
1
0.75
1
0.217833
80.9285
7,652
swe_smith::train::38821
swe_smith
train
38,821
pallets__jinja.ada0a9a6.func_basic__2lu2b8x6
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Set statement parsing broken - variables not properly scoped #### Description The `{% set %}` statement is not working correctly. Variables defined with `{% set %}` are not being properly scoped and templates that use set statements are failing to render. #### Steps/Code to Reproduce ```python from jinja2 import En...
diff --git a/src/jinja2/parser.py b/src/jinja2/parser.py index 817abec..29947c1 100644 --- a/src/jinja2/parser.py +++ b/src/jinja2/parser.py @@ -225,12 +225,12 @@ class Parser: def parse_set(self) -> t.Union[nodes.Assign, nodes.AssignBlock]: """Parse an assign statement.""" lineno = next(self.str...
["tests/test_api.py::TestMeta::test_find_undeclared_variables", "tests/test_api.py::TestLowLevel::test_custom_code_generator", "tests/test_async.py::TestAsyncImports::test_exports[asyncio]", "tests/test_async.py::TestAsyncImports::test_exports[trio]", "tests/test_async.py::TestAsyncImports::test_import_with_globals_ove...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
6
54
1,186
0
0.6
1
0.75
1
0.217667
80.928
7,653
swe_smith::train::22473
swe_smith
train
22,473
tweepy__tweepy.91a41c6e.func_pm_ctrl_shuffle__8cmn9gpy
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
UnboundLocalError when retrieving list information **Describe the bug** An `UnboundLocalError` occurs when attempting to retrieve list information using certain API methods. **To Reproduce** ```python # Example script api = tweepy.API(auth) # Attempt to retrieve list memberships try: memberships = api.get_list_...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..c868645 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -178,13 +178,12 @@ class List(Model): @classmethod def parse_list(cls, api, json_list, result_set=None): + return results results = ResultSet() - if isinstan...
["tests/test_api.py::TweepyAPITests::testgetlistmemberships", "tests/test_api.py::TweepyAPITests::testgetlistownerships", "tests/test_api.py::TweepyAPITests::testgetlists", "tests/test_api.py::TweepyAPITests::testgetlistsubscriptions"]
["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
4
1,166
0
0.6
1
0.75
1
0.217667
80.928
7,654
swe_smith::train::7119
swe_smith
train
7,119
cantools__cantools.0c6a7871.combine_module__306hhr7x
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
DID identifier returns incorrect value after loading CDD file #### Description When loading a CDD file and accessing DID identifiers, the returned values are off by 1 from what's expected. The identifier property seems to be adding 1 to the actual identifier value. #### Steps/Code to Reproduce ```python import cant...
diff --git a/src/cantools/database/diagnostics/data.py b/src/cantools/database/diagnostics/data.py index 3c97eec..edd7eea 100644 --- a/src/cantools/database/diagnostics/data.py +++ b/src/cantools/database/diagnostics/data.py @@ -114,7 +114,9 @@ class Data: def choices(self) -> Optional[Choices]: """A dict...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_le_example_cdd", "tests/test_diagnostics_database.py::C...
["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
2
6
4
1,186
0
0.6
1
0.75
1
0.217667
80.928
7,655
swe_smith::train::45432
swe_smith
train
45,432
dask__dask.5f61e423.lm_rewrite__mkzy35wr
swesmith/dask__dask.5f61e423
dask/dask
python
null
Rolling operations with time-based windows raise TypeError: 'property' object is not callable Description Repro: Attempt to perform rolling operations with time-based windows on a Dask DataFrame. Example: ```python import pandas as pd import numpy as np import dask.dataframe as dd # Create a DataFrame with a dateti...
diff --git a/dask/dataframe/dask_expr/_rolling.py b/dask/dataframe/dask_expr/_rolling.py index fd72ba4..bd548ad 100644 --- a/dask/dataframe/dask_expr/_rolling.py +++ b/dask/dataframe/dask_expr/_rolling.py @@ -103,14 +103,20 @@ class RollingReduction(Expr): columns = columns[0] return type(...
["dask/dataframe/tests/test_rolling.py::test_rolling_methods[True-1-count-args0-False]", "dask/dataframe/tests/test_rolling.py::test_rolling_methods[True-1-sum-args1-False]", "dask/dataframe/tests/test_rolling.py::test_rolling_methods[True-1-mean-args2-False]", "dask/dataframe/tests/test_rolling.py::test_rolling_method...
["dask/dataframe/tests/test_rolling.py::test_map_overlap[True-1]", "dask/dataframe/tests/test_rolling.py::test_map_overlap[True-4]", "dask/dataframe/tests/test_rolling.py::test_map_overlap[False-1]", "dask/dataframe/tests/test_rolling.py::test_map_overlap[False-4]", "dask/dataframe/tests/test_rolling.py::test_map_overl...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
18
171
946
0
0.6
1
0.75
1
0.217667
80.928
7,656
swe_smith::train::11905
swe_smith
train
11,905
andialbrecht__sqlparse.e57923b3.func_pm_remove_assign__nqp5ppyf
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
NameError in validate_options function when using format options #### Description When calling `sqlparse.format()` with various formatting options, a `NameError` is raised because several variables are referenced before being defined in the `validate_options` function. #### Steps/Code to Reproduce ```python import ...
diff --git a/sqlparse/formatter.py b/sqlparse/formatter.py index 72f2c19..e6c5999 100644 --- a/sqlparse/formatter.py +++ b/sqlparse/formatter.py @@ -13,7 +13,6 @@ from sqlparse.exceptions import SQLParseError def validate_options(options): # noqa: C901 """Validates options.""" - kwcase = options.get('keywor...
["tests/test_cli.py::test_valid_args", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_stdout", "tests/test_cli.py::test_encoding_stdout[encoding_utf8.sql-utf-8]", "tests/test_cli.py::test_encoding_stdout[encoding_gbk.sql-gbk]", "tests/test_cli.py::test_encoding_output_file[encoding_utf8.sql-utf-8]", "...
["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_invalid_choice", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfile", "tests/test_cli.py::test_script", "tests/test_grouping.py::test_grouping_...
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
true
null
1
12
86
1,066
0
0.6
1
0.75
1
0.217667
80.928
7,657
swe_smith::train::24512
swe_smith
train
24,512
sunpy__sunpy.f8edfd5c.combine_module__j22rsb2y
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Map name and representation broken after code refactoring ## Bug description After a recent code change, several map-related functions are broken. When trying to use maps, I'm getting an `UnboundLocalError` about not being able to access local variables. ## Steps to reproduce 1. Create a map object 2. Try to acce...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..38c6975 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -833,13 +833,12 @@ class GenericMap(NDData): def _base_name(self): """Abstract the shared bit between name and latex_name""" + return format_str.format(n...
["sunpy/map/tests/test_mapbase.py::test_name", "sunpy/map/tests/test_mapbase.py::test_plot_with_norm_none", "sunpy/map/tests/test_mapbase.py::test_missing_metadata_warnings", "sunpy/map/tests/test_mapbase.py::test_repr_html", "sunpy/map/tests/test_mapbase.py::test_quicklook", "sunpy/map/tests/test_mapbase.py::test_plot...
["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
2
12
11
1,066
0
0.6
1
0.75
1
0.217667
80.928
7,658
swe_smith::train::43857
swe_smith
train
43,857
pydata__patsy.a5d16484.func_basic__102iag7c
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
B-spline basis evaluation fails with NameError when using pandas DataFrames #### Description When evaluating B-spline basis functions with pandas DataFrames, the code raises a `NameError` because it references an undefined variable `df` instead of the correct variable name. #### Steps/Code to Reproduce ```python im...
diff --git a/patsy/splines.py b/patsy/splines.py index a6735e5..904c6bc 100644 --- a/patsy/splines.py +++ b/patsy/splines.py @@ -270,13 +270,13 @@ class BS(object): lower_bound=None, upper_bound=None, ): - basis = _eval_bspline_basis(x, self._all_knots, self._degree) - if not includ...
["patsy/splines.py::test_bs_compat", "patsy/splines.py::test_bs_0degree"]
["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
10
2
1,106
0
0.6
1
0.75
1
0.217667
80.928
7,659
swe_smith::train::27233
swe_smith
train
27,233
tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__xju8zsn6
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPXTrack.get_duration() raises UnboundLocalError when track has segments #### Description When calling `get_duration()` on a GPXTrack object that contains segments, an `UnboundLocalError` is raised because the `result` variable is referenced before assignment. #### Steps/Code to Reproduce ```python import gpxpy imp...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..346c983 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -1752,18 +1752,6 @@ class GPXTrack: track_segment.move(location_delta) def get_duration(self) -> Optional[float]: - """ - Calculates duration or track - - Returns - ...
["test.py::GPXTests::test_get_duration"]
["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
23
1
846
0
0.6
1
0.75
1
0.217667
80.928
7,660
swe_smith::train::4245
swe_smith
train
4,245
pygments__pygments.27649ebb.func_pm_class_rm_funcs__5wa7f934
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
LatexEmbeddedLexer broken after removing _filter_to method #### Description The LatexEmbeddedLexer class is no longer working properly. When trying to tokenize text with embedded LaTeX expressions, it fails with an AttributeError. #### Steps/Code to Reproduce ```python from pygments.formatters.latex import LatexEmb...
diff --git a/pygments/formatters/latex.py b/pygments/formatters/latex.py index 2f7971e..556aa5a 100644 --- a/pygments/formatters/latex.py +++ b/pygments/formatters/latex.py @@ -482,23 +482,6 @@ class LatexEmbeddedLexer(Lexer): else: yield i, None, v - def _filter_to(self, it, pred): -...
["tests/test_latex_formatter.py::test_embedded_lexer"]
["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
19
1
926
0
0.6
1
0.75
1
0.217667
80.928
7,661
swe_smith::train::997
swe_smith
train
997
pytest-dev__iniconfig.16793ead.combine_module__px2ksi6p
swesmith/pytest-dev__iniconfig.16793ead
pytest-dev/iniconfig
python
null
SectionWrapper constructor arguments swapped causing AttributeError #### Description When accessing sections from an IniConfig object, the SectionWrapper constructor receives arguments in the wrong order, causing various AttributeError exceptions when trying to use section methods. #### Steps/Code to Reproduce ```p...
diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py index 3c40bc9..e72914b 100644 --- a/src/iniconfig/__init__.py +++ b/src/iniconfig/__init__.py @@ -98,8 +98,8 @@ class SectionWrapper: yield from sorted(section, key=lineof) def items(self) -> Iterator[tuple[str, str]]: - for name ...
["testing/test_iniconfig.py::test_ParseError", "testing/test_iniconfig.py::test_continuation_needs_perceeding_token", "testing/test_iniconfig.py::test_continuation_cant_be_after_section", "testing/test_iniconfig.py::test_section_cant_be_empty", "testing/test_iniconfig.py::test_iniconfig_section_first", "testing/test_in...
["testing/test_iniconfig.py::test_tokenize[comment]", "testing/test_iniconfig.py::test_tokenize[comment2]", "testing/test_iniconfig.py::test_tokenize[section]", "testing/test_iniconfig.py::test_tokenize[value]", "testing/test_iniconfig.py::test_parse_empty", "testing/test_iniconfig.py::test_error_on_weird_lines[!!]", "...
jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead
true
null
2
12
12
1,066
0
0.6
1
0.75
1
0.217667
80.928
7,662
swe_smith::train::39612
swe_smith
train
39,612
pallets__jinja.ada0a9a6.lm_rewrite__oly1tnri
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### AttributeError in If-Else Conditions #### Description It seems there's an issue with handling `if-elif-else` conditions in the latest update. When using `if`, `elif`, or `else` blocks, an `AttributeError` is raised unexpectedly. This affects templates that rely on conditional logic, causing them to fail. #### St...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..aac5899 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1313,13 +1313,19 @@ class CodeGenerator(NodeVisitor): self._assign_stack[-1].difference_update(loop_frame.symbols.stores) def visit_If(self, node: ...
["tests/test_core_tags.py::TestIfCondition::test_elif", "tests/test_core_tags.py::TestIfCondition::test_elif_deep", "tests/test_core_tags.py::TestIfCondition::test_else", "tests/test_core_tags.py::TestIfCondition::test_complete", "tests/test_filters.py::TestFilter::test_filter_undefined_in_if", "tests/test_filters.py::...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
11
13
1,086
0
0.6
1
0.75
1
0.217667
80.928
7,663
swe_smith::train::3859
swe_smith
train
3,859
pygments__pygments.27649ebb.func_basic__ch0ur57l
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
C/C++ lexer token output order incorrect #### Description The C/C++ family lexers are returning tokens in the wrong order, causing issues when processing the token stream. The lexer is yielding `(index, value, token)` instead of the expected `(index, token, value)` format. #### Steps/Code to Reproduce ```python fro...
diff --git a/pygments/lexers/c_cpp.py b/pygments/lexers/c_cpp.py index 0f83b71..de9ed65 100644 --- a/pygments/lexers/c_cpp.py +++ b/pygments/lexers/c_cpp.py @@ -256,15 +256,15 @@ class CFamilyLexer(RegexLexer): for index, token, value in \ RegexLexer.get_tokens_unprocessed(self, text, stack): ...
["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
10
114
1,105
0
0.6
1
0.75
1
0.2175
80.9275
7,664
swe_smith::train::17249
swe_smith
train
17,249
aio-libs__async-timeout.d0baa9f1.func_basic__0tq3zk35
swesmith/aio-libs__async-timeout.d0baa9f1
aio-libs/async-timeout
python
null
Timeout Handling Issue with asyncio.TimeoutError Description It seems there's an issue with the recent changes in the timeout handling logic. When using the async_timeout context manager, an unexpected AttributeError is raised, specifically mentioning 'CANCELLED'. This occurs when the timeout is supposed to trigger a...
diff --git a/async_timeout/__init__.py b/async_timeout/__init__.py index fe4aa58..a897bd5 100644 --- a/async_timeout/__init__.py +++ b/async_timeout/__init__.py @@ -258,15 +258,14 @@ else: self._reschedule() def _do_exit(self, exc_type: Optional[Type[BaseException]]) -> None: - if exc...
["tests/test_timeout.py::test_timeout", "tests/test_timeout.py::test_timeout_finish_in_time", "tests/test_timeout.py::test_timeout_disable", "tests/test_timeout.py::test_timeout_is_none_no_schedule", "tests/test_timeout.py::test_timeout_zero", "tests/test_timeout.py::test_timeout_not_relevant_exception", "tests/test_ti...
["tests/test_timeout.py::test_timeout_no_loop", "tests/test_timeout.py::test_cancel_outer_coro"]
jyangballin/swesmith.x86_64.aio-libs_1776_async-timeout.d0baa9f1
true
null
1
9
30
1,125
0
0.6
1
0.75
1
0.2175
80.9275
7,665
swe_smith::train::48811
swe_smith
train
48,811
facebookresearch__hydra.0f03eb60.func_pm_ctrl_shuffle__0alhxcv6
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
# UnboundLocalError in Glob.filter method when filtering strings **Describe the bug** When using the Glob class to filter strings, an UnboundLocalError is raised because the `match` function is used before it's defined. **To Reproduce** ```python from hydra.core.override_parser.types import Glob # Create a Glob obje...
diff --git a/hydra/core/override_parser/types.py b/hydra/core/override_parser/types.py index f020ccb..9530a7f 100644 --- a/hydra/core/override_parser/types.py +++ b/hydra/core/override_parser/types.py @@ -214,6 +214,9 @@ class Glob: exclude: List[str] = field(default_factory=list) def filter(self, names: Li...
["tests/test_overrides_parser.py::test_glob_filter[include=*]", "tests/test_overrides_parser.py::test_glob_filter[=*0]", "tests/test_overrides_parser.py::test_glob_filter[=*1]"]
["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
7
3
1,165
0
0.6
1
0.75
1
0.2175
80.9275
7,666
swe_smith::train::19684
swe_smith
train
19,684
kurtmckee__feedparser.cad965a3.combine_file__zuoidpwj
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
Media RSS parsing broken after recent changes #### Description After some recent updates, feedparser is having issues with Media RSS feeds. The parser seems to be incorrectly handling media elements, causing feeds that previously worked fine to now fail parsing or return unexpected results. #### Steps/Code to Reprod...
diff --git a/feedparser/namespaces/mediarss.py b/feedparser/namespaces/mediarss.py index b057580..6fd264b 100644 --- a/feedparser/namespaces/mediarss.py +++ b/feedparser/namespaces/mediarss.py @@ -38,8 +38,10 @@ class Namespace: } def _start_media_category(self, attrs_d): - attrs_d.setdefault("scheme...
["tests/test_well_formed.py::test_strict_parser[info1147]", "tests/test_well_formed.py::test_loose_parser[info1146]", "tests/test_well_formed.py::test_loose_parser[info1152]", "tests/test_well_formed.py::test_strict_parser[info1146]", "tests/test_well_formed.py::test_loose_parser[info1147]", "tests/test_well_formed.py:...
["tests/test_json.py::test_json[path0]", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_multiple_mapping_target_2", "tests/test_feedparser_dict.py::test_category", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparse...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
8
6
1,145
0
0.6
1
0.75
1
0.2175
80.9275
7,667
r2e_gym::train::1
r2e_gym
train
1
orange3__a95245e37f35446f9870feb68f5ebb97d1c279ce
orange3
biolab/orange3
python
a95245e37f35446f9870feb68f5ebb97d1c279ce
**Title:** Unpickling `DiscreteVariable` Adds Unexpected Values Leading to Inconsistencies **Description:** When attempting to unpickle a `DiscreteVariable` with a predefined set of values, the resulting object unexpectedly includes additional values that were not present in the original. This leads to discrepancies ...
diff --git a/Orange/data/variable.py b/Orange/data/variable.py --- a/Orange/data/variable.py +++ b/Orange/data/variable.py @@ -27,7 +27,19 @@ def make_variable(cls, compute_value, *args): if compute_value is not None: return cls(*args, compute_value=compute_value) - return cls.make(*args) + if issu...
diff --git a/Orange/data/tests/test_variable.py b/Orange/data/tests/test_variable.py --- a/Orange/data/tests/test_variable.py +++ b/Orange/data/tests/test_variable.py @@ -265,6 +265,23 @@ self.assertRaises(TypeError, DiscreteVariable, "foo", values=["a", 42]) a = DiscreteVariable("foo", values=["a", "...
null
null
namanjain12/orange3_final:a95245e37f35446f9870feb68f5ebb97d1c279ce
true
null
1
21
null
1,597
0
0.75
1
0.6375
1
0.336167
80.92725
7,668
swe_smith::train::38862
swe_smith
train
38,862
pallets__jinja.ada0a9a6.func_basic__5bcn8bjz
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Context variable scoping broken with shared=False in new_context #### Description When creating a new context with `shared=False`, the variable scoping logic is inverted, causing templates to fail with `UndefinedError` when accessing variables that should be available in the context. #### Steps/Code to Reproduce ``...
diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py index 9dcc9d4..ea3eb5f 100644 --- a/src/jinja2/runtime.py +++ b/src/jinja2/runtime.py @@ -102,14 +102,13 @@ def new_context( """Internal helper for context creation.""" if vars is None: vars = {} - if shared: + if not shared: p...
["tests/test_api.py::TestExtendedAPI::test_sandbox_max_range", "tests/test_async.py::TestAsyncImports::test_context_imports", "tests/test_async.py::TestAsyncImports::test_import_with_globals", "tests/test_async.py::TestAsyncImports::test_import_with_globals_override", "tests/test_async.py::TestAsyncImports::test_from_i...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
9
57
1,124
0
0.6
1
0.75
1
0.217333
80.927
7,669
swe_smith::train::24071
swe_smith
train
24,071
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__rpmunizv
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Contour levels validation fails when levels is numpy array without units #### Description When calling `find_contours` or `draw_contours` with a numpy array as the levels argument, the code incorrectly tries to access the `.unit` attribute on the processed levels array, causing an AttributeError. #### Steps/Code to ...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..f77bc34 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -2525,13 +2525,6 @@ class GenericMap(NDData): Accept a percentage or dimensionless or map unit input for contours. """ levels = np.atleast_1d(levels)...
["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
15
5
1,004
0
0.6
1
0.75
1
0.217333
80.927
7,670
swe_smith::train::22006
swe_smith
train
22,006
life4__textdistance.c3aca916.func_pm_ctrl_shuffle__ykpoy034
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Levenshtein distance calculation fails with UnboundLocalError #### Description The Levenshtein distance algorithm is throwing an `UnboundLocalError` when trying to calculate distances between strings. This appears to be related to variable scoping issues in the `_cycled` method. #### Steps/Code to Reproduce ```pyth...
diff --git a/textdistance/algorithms/edit_based.py b/textdistance/algorithms/edit_based.py index 0a6e02f..86c52e3 100644 --- a/textdistance/algorithms/edit_based.py +++ b/textdistance/algorithms/edit_based.py @@ -105,18 +105,7 @@ class Levenshtein(_Base): return min(d, s) + 1 def _cycled(self, s1: Seque...
["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
23
12
844
0
0.6
1
0.75
1
0.217333
80.927
7,671
swe_smith::train::17260
swe_smith
train
17,260
aio-libs__async-timeout.d0baa9f1.lm_rewrite__6u2agdmd
swesmith/aio-libs__async-timeout.d0baa9f1
aio-libs/async-timeout
python
null
# Reject method in async_timeout allows invalid state transitions I found a bug in the `reject()` method of the `async_timeout` library. The method no longer validates the state before rejecting a scheduled timeout. ## Steps to reproduce ```python import asyncio from async_timeout import timeout async def main(): ...
diff --git a/async_timeout/__init__.py b/async_timeout/__init__.py index fe4aa58..2b450c8 100644 --- a/async_timeout/__init__.py +++ b/async_timeout/__init__.py @@ -188,14 +188,9 @@ else: def deadline(self) -> Optional[float]: return self._deadline - def reject(self) -> None: + def...
["tests/test_timeout.py::test_reject_finished"]
["tests/test_timeout.py::test_timeout", "tests/test_timeout.py::test_timeout_finish_in_time", "tests/test_timeout.py::test_timeout_disable", "tests/test_timeout.py::test_timeout_is_none_no_schedule", "tests/test_timeout.py::test_timeout_no_loop", "tests/test_timeout.py::test_timeout_zero", "tests/test_timeout.py::test_...
jyangballin/swesmith.x86_64.aio-libs_1776_async-timeout.d0baa9f1
true
null
1
7
1
1,163
0
0.6
1
0.75
1
0.217167
80.9265
7,672
swe_smith::train::27960
swe_smith
train
27,960
jsvine__pdfplumber.02ff4313.func_pm_remove_assign__o1l3qg01
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
NameError when using table extraction with certain strategies #### Description When trying to extract tables from PDFs using various strategies, I'm getting a `NameError: name 'strategy' is not defined` error. This happens with different table extraction methods and strategy combinations. #### Steps/Code to Reproduc...
diff --git a/pdfplumber/table.py b/pdfplumber/table.py index 0ba4445..8ef125b 100644 --- a/pdfplumber/table.py +++ b/pdfplumber/table.py @@ -601,7 +601,6 @@ class TableFinder(object): settings = self.settings for orientation in ["vertical", "horizontal"]: - strategy = getattr(settings, or...
["tests/test_basics.py::Test::test_outside_bbox", "tests/test_ca_warn_report.py::Test::test_parse", "tests/test_dedupe_chars.py::Test::test_extract_table", "tests/test_display.py::Test::test_debug_tablefinder", "tests/test_issues.py::Test::test_issue_1181", "tests/test_issues.py::Test::test_issue_140", "tests/test_issu...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
11
21
1,083
0
0.6
1
0.75
1
0.217167
80.9265
7,673
swe_smith::train::872
swe_smith
train
872
oauthlib__oauthlib.1fd52536.lm_rewrite__c7uizw13
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# scope_to_list function doesn't handle integer values correctly **Describe the bug** When using the `scope_to_list` function with an integer value, it fails with an error instead of converting it to a string like other non-string types. **To Reproduce** Try to use the `scope_to_list` function with an integer value: ...
diff --git a/oauthlib/oauth2/rfc6749/utils.py b/oauthlib/oauth2/rfc6749/utils.py index 7dc27b3..184519a 100644 --- a/oauthlib/oauth2/rfc6749/utils.py +++ b/oauthlib/oauth2/rfc6749/utils.py @@ -23,13 +23,14 @@ def list_to_scope(scope): def scope_to_list(scope): """Convert a space separated string to a list of sc...
["tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_backend", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_legacy", "tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_invalid_sco...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
11
36
1,083
0
0.6
1
0.75
1
0.217167
80.9265
7,674
swe_smith::train::4321
swe_smith
train
4,321
pygments__pygments.27649ebb.func_pm_ctrl_invert_if__qqai1yqb
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
ElixirConsoleLexer incorrectly handles error lines starting with "** " #### Description The ElixirConsoleLexer is not properly tokenizing error lines that start with "** ". Error lines are being processed in the wrong conditional branch, causing incorrect syntax highlighting behavior. #### Steps/Code to Reproduce `...
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py index 1190182..48f74dd 100644 --- a/pygments/lexers/erlang.py +++ b/pygments/lexers/erlang.py @@ -501,11 +501,6 @@ class ElixirConsoleLexer(Lexer): for match in line_re.finditer(text): line = match.group() if line.star...
["tests/examplefiles/iex/iex_example::"]
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
12
1
1,063
0
0.6
1
0.75
1
0.217167
80.9265
7,675
swe_smith::train::38480
swe_smith
train
38,480
amueller__word_cloud.ec24191c.func_basic__nm109oa0
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
WordCloud initialization fails with AttributeError when mask is None #### Description When creating a WordCloud instance without providing a mask parameter (or explicitly setting it to None), the initialization fails with an AttributeError because the code tries to access the `shape` attribute of a None object. ####...
diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py index 1622c03..231947b 100644 --- a/wordcloud/wordcloud.py +++ b/wordcloud/wordcloud.py @@ -324,15 +324,15 @@ class WordCloud(object): else: colormap = "viridis" self.colormap = colormap - self.collocations = coll...
["test/test_wordcloud.py::test_collocations", "test/test_wordcloud.py::test_collocation_stopwords", "test/test_wordcloud.py::test_collocation_stopwords_uppercase", "test/test_wordcloud.py::test_plurals_numbers", "test/test_wordcloud.py::test_multiple_s", "test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.p...
["test/test_wordcloud.py::test_single_color_func", "test/test_wordcloud.py::test_single_color_func_grey", "test/test_wordcloud_cli.py::test_main_passes_arguments_through", "test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option0]", "test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option1]", "t...
jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c
true
null
1
15
34
1,003
0
0.6
1
0.75
1
0.217167
80.9265
7,676
swe_smith::train::40199
swe_smith
train
40,199
scanny__python-pptx.278b47b1.combine_file__sw14b79e
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Presentation constructor arguments swapped causing initialization failure #### Description When creating a Presentation object from PresentationPart, the constructor arguments are being passed in the wrong order, causing the presentation to fail to initialize properly. #### Steps/Code to Reproduce ```python from pp...
diff --git a/src/pptx/parts/presentation.py b/src/pptx/parts/presentation.py index 1413de4..362a936 100644 --- a/src/pptx/parts/presentation.py +++ b/src/pptx/parts/presentation.py @@ -81,11 +81,11 @@ class PresentationPart(XmlPart): A |Presentation| object providing access to the content of this pres...
["tests/parts/test_presentation.py::DescribePresentationPart::it_provides_access_to_its_presentation", "tests/parts/test_presentation.py::DescribePresentationPart::it_provides_access_to_a_related_slide", "tests/parts/test_presentation.py::DescribePresentationPart::it_finds_the_slide_id_of_a_slide_part", "tests/parts/te...
["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
6
4
1,183
0
0.6
1
0.75
1
0.217167
80.9265
7,677
r2e_gym::train::6651
r2e_gym
train
6,651
pillow__9b53e3b5815511dfac4c42c3ba908d6cd9144f37
pillow
python-pillow/pillow
python
9b53e3b5815511dfac4c42c3ba908d6cd9144f37
**Title:** `Image.thumbnail()` Calls `load()` Before `draft()`, Causing AssertionError for JPEG Images **Description:** When generating a thumbnail for a JPEG image, the `Image.thumbnail()` method calls `load()` before `draft()`. This sequence leads to an `AssertionError` because `draft()` returns `None` after `load()...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2471,29 +2471,41 @@ :returns: None """ - self.load() - x, y = map(math.floor, size) - if x >= self.width and y >= self.height: - return - - def round_aspect(numbe...
diff --git a/Tests/test_image_thumbnail.py b/Tests/test_image_thumbnail.py --- a/Tests/test_image_thumbnail.py +++ b/Tests/test_image_thumbnail.py @@ -97,6 +97,28 @@ im.thumbnail((64, 64)) assert im.size == (64, 10) + # Test thumbnail(), without draft(), + # on an image that is large enough on...
null
null
namanjain12/pillow_final:9b53e3b5815511dfac4c42c3ba908d6cd9144f37
true
null
1
46
null
1,095
0
0.75
1
0.6375
1
0.335833
80.92625
7,678
swe_smith::train::6923
swe_smith
train
6,923
cantools__cantools.0c6a7871.combine_file__1q8tw1rk
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML category validation breaks existing files with numeric categories #### Description When loading ARXML files that contain numeric category values in end-to-end properties, the library now throws a ValueError stating "Category must be a string of alphabetic characters". This breaks compatibility with existing ARX...
diff --git a/src/cantools/database/can/formats/arxml/end_to_end_properties.py b/src/cantools/database/can/formats/arxml/end_to_end_properties.py index 7fcc8e5..c56372f 100644 --- a/src/cantools/database/can/formats/arxml/end_to_end_properties.py +++ b/src/cantools/database/can/formats/arxml/end_to_end_properties.py @@ ...
["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_database.py::CanToolsDataba...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
8
12
1,142
0
0.6
1
0.75
1
0.217
80.926
7,679
swe_smith::train::48369
swe_smith
train
48,369
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__fs2quanj
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Linter crashes with UnboundLocalError when processes is None #### Description When running the linter with `processes=None`, it crashes with an `UnboundLocalError` because the `processes` variable is not properly initialized. #### Steps/Code to Reproduce ```python from sqlfluff import Linter linter = Linter() # Th...
diff --git a/src/sqlfluff/core/linter/linter.py b/src/sqlfluff/core/linter/linter.py index 5e5474f..78d03db 100644 --- a/src/sqlfluff/core/linter/linter.py +++ b/src/sqlfluff/core/linter/linter.py @@ -1056,7 +1056,7 @@ class Linter: files_count = len(expanded_paths) if processes is None: - ...
["test/core/linter/linter_test.py::test__linter__skip_large_bytes[0-False]", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[5-True]", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[2000-False]", "test/core/linter/linter_test.py::test__linter__lint_string_vs_file[test/fixtures/linter/...
["test/core/linter/linter_test.py::test__linter__get_violations_filter_rules[None-6]", "test/core/linter/linter_test.py::test__linter__get_violations_filter_rules[CP01-2]", "test/core/linter/linter_test.py::test__linter__get_violations_filter_rules[rules2-1]", "test/core/linter/linter_test.py::test__linter__linting_res...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
9
24
1,122
0
0.6
1
0.75
1
0.217
80.926
7,680
swe_smith::train::25467
swe_smith
train
25,467
pylint-dev__astroid.b114f6b5.func_basic__8cdl1lj3
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Dictionary comprehension parsing returns wrong AST node type #### Description When parsing dictionary comprehensions, the AST rebuilder is returning the original `ast.DictComp` node instead of the expected `nodes.DictComp` astroid node. This causes type errors throughout the codebase when code expects astroid nodes b...
diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py index 4c77906..82057dc 100644 --- a/astroid/rebuilder.py +++ b/astroid/rebuilder.py @@ -948,18 +948,18 @@ class TreeRebuilder: def visit_dictcomp(self, node: ast.DictComp, parent: NodeNG) -> nodes.DictComp: """Visit a DictComp node by returning a fr...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_mul...
["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
10
74
1,102
0
0.6
1
0.75
1
0.217
80.926
7,681
swe_smith::train::1909
swe_smith
train
1,909
agronholm__typeguard.b6a7e438.func_pm_remove_cond__evq5oids
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Generator send type checking not working properly #### Description When using generators with type annotations that specify a send type (the second type parameter in `Generator[yield_type, send_type, return_type]`), the send type checking is not being enforced. Functions that should raise `TypeCheckError` when receiv...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..2256661 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -543,11 +543,6 @@ class TypeguardTransformer(NodeTransformer): items[0] ) - ...
["tests/test_transformer.py::TestGenerator::test_no_return_type_check", "tests/test_transformer.py::TestAsyncGenerator::test_full", "tests/test_transformer.py::TestAsyncGenerator::test_no_yield_type_check", "tests/test_typechecked.py::TestGenerator::test_generator_bad_send", "tests/test_typechecked.py::TestAsyncGenerat...
["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
6
5
1,182
0
0.6
1
0.75
1
0.217
80.926
7,682
swe_smith::train::35809
swe_smith
train
35,809
stanfordnlp__dspy.651a4c71.func_pm_remove_loop__c44shkfi
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# DSPy fails to recognize built-in Python types in signatures ## Description When using typed signatures in DSPy, the code fails to recognize basic Python types like `int`, `str`, `float`, etc. This causes multiple failures in type handling. ## Reproduction Here's a simple example that demonstrates the issue: ```p...
diff --git a/dspy/signatures/signature.py b/dspy/signatures/signature.py index c5f8a79..c6eee75 100644 --- a/dspy/signatures/signature.py +++ b/dspy/signatures/signature.py @@ -415,11 +415,6 @@ def _parse_type_node(node, names=None) -> Any: # Common built-in types builtin_types = [int, str, float, boo...
["tests/clients/test_inspect_global_history.py::test_inspect_history_basic", "tests/clients/test_inspect_global_history.py::test_inspect_history_with_n", "tests/clients/test_inspect_global_history.py::test_inspect_history_n_larger_than_history", "tests/predict/test_react.py::test_tool_calling_without_typehint", "tests/...
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
6
21
1,182
0
0.6
1
0.75
1
0.217
80.926
7,683
swe_smith::train::52627
swe_smith
train
52,627
pydicom__pydicom.7d361b3d.func_pm_remove_wrapper__6b9p8rgw
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
NameError when reading DICOM files with sequences after recent changes #### Description After a recent update, reading DICOM files that contain sequences is failing with `NameError: name 'group' is not defined`. This affects various operations including reading files with sequence items, using utility functions, and ...
diff --git a/src/pydicom/filereader.py b/src/pydicom/filereader.py index f013171..72b1c8e 100644 --- a/src/pydicom/filereader.py +++ b/src/pydicom/filereader.py @@ -553,12 +553,6 @@ def read_sequence_item( seq_item_tell = fp.tell() + offset tag_length_format = "<HHL" if is_little_endian else ">HHL" - try...
["tests/pixels/test_encoder_pydicom.py::TestEncodeSegment::test_cycle", "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_standard_file", "tests/test_charset.py::TestCharset::test_in...
["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
182
1,162
0
0.6
1
0.75
1
0.217
80.926
7,684
swe_smith::train::51486
swe_smith
train
51,486
pydicom__pydicom.7d361b3d.combine_file__b67b91bt
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Code equality and hashing broken in sr.coding module #### Description The `Code` class in `pydicom.sr.coding` has broken equality comparison and hash functionality. When comparing two identical `Code` objects, they are incorrectly reported as not equal, and using `Code` objects as dictionary keys raises a `TypeError`...
diff --git a/src/pydicom/sr/coding.py b/src/pydicom/sr/coding.py index 151ebe4..914eadf 100644 --- a/src/pydicom/sr/coding.py +++ b/src/pydicom/sr/coding.py @@ -19,7 +19,7 @@ class Code(NamedTuple): scheme_version: str | None = None def __hash__(self) -> int: - return hash(self.scheme_designator + se...
["tests/test_codes.py::TestCode::test_use_as_dictionary_key", "tests/test_codes.py::TestCode::test_equal", "tests/test_codes.py::TestCode::test_not_equal", "tests/test_codes.py::TestCode::test_equal_ignore_meaning", "tests/test_codes.py::TestCode::test_equal_not_in_snomed_mapping", "tests/test_codes.py::TestCollection:...
["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
12
10
1,062
0
0.6
1
0.75
1
0.217
80.926
7,685
swe_smith::train::42144
swe_smith
train
42,144
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__j4jdftbf
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Core properties datetime parsing fails due to variable reference before assignment #### Description When accessing datetime properties from PowerPoint core properties, the code fails with `UnboundLocalError` because variables are referenced before being assigned. #### Steps/Code to Reproduce ```python from pptx imp...
diff --git a/src/pptx/oxml/coreprops.py b/src/pptx/oxml/coreprops.py index de6b26b..6aa11f3 100644 --- a/src/pptx/oxml/coreprops.py +++ b/src/pptx/oxml/coreprops.py @@ -190,18 +190,17 @@ class CT_CoreProperties(BaseOxmlElement): self._set_element_text("version", value) def _datetime_of_element(self, pro...
["tests/parts/test_coreprops.py::DescribeCorePropertiesPart::it_knows_the_date_property_values[created-expected_value0]", "tests/parts/test_coreprops.py::DescribeCorePropertiesPart::it_knows_the_date_property_values[last_printed-expected_value1]", "tests/parts/test_coreprops.py::DescribeCorePropertiesPart::it_knows_the...
["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
4
1,041
0
0.6
1
0.75
1
0.216833
80.9255
7,686
swe_smith::train::4793
swe_smith
train
4,793
bottlepy__bottle.a8dfef30.func_basic__hfq2lqjk
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
ConfigDict.load_dict method broken with incorrect variable assignments #### Description The `ConfigDict.load_dict` method is not working correctly when loading nested dictionaries. It appears to have incorrect variable assignments that cause it to fail with a TypeError. #### Steps/Code to Reproduce ```python from b...
diff --git a/bottle.py b/bottle.py index 286b5bc..02817b9 100755 --- a/bottle.py +++ b/bottle.py @@ -2418,14 +2418,14 @@ class ConfigDict(dict): {'some.namespace.key': 'value'} """ for key, value in source.items(): - if isinstance(key, basestring): + if isinstance(va...
["test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module", "test/test_mount.py::TestAppMounting::test_mount_wsgi", "test/test_mount.py::TestAppMounting::test_mount_wsgi_ctype_bug", "test/test_mount.py::TestAppMounting::test_no_slash_prefix", "test/test_plugins.py::TestP...
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_meta", "test/test_config.py::TestConfDict::test_namespaces", "tes...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
8
8
1,141
0
0.6
1
0.75
1
0.216833
80.9255
7,687
swe_smith::train::51852
swe_smith
train
51,852
pydicom__pydicom.7d361b3d.func_basic__9sbad2sn
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileInstance initialization fails with AttributeError on node access #### Description When creating FileInstance objects, accessing the `node` attribute raises an AttributeError because it's being set to None during initialization instead of the expected node parameter. #### Steps/Code to Reproduce ```python from p...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..2c70ea3 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -722,11 +722,11 @@ class FileInstance: add: bool remove: bool - self._uuid = uuid.uuid4() + self._uuid = uuid.uuid1() # Chang...
["tests/test_fileset.py::TestRecordNode::test_root", "tests/test_fileset.py::TestRecordNode::test_leaf", "tests/test_fileset.py::TestRecordNode::test_add", "tests/test_fileset.py::TestRecordNode::test_key", "tests/test_fileset.py::TestRecordNode::test_key_raises", "tests/test_fileset.py::TestRecordNode::test_encoding",...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
8
104
1,141
0
0.6
1
0.75
1
0.216833
80.9255
7,688
swe_smith::train::42236
swe_smith
train
42,236
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__vyytk0ay
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Column reference generation broken for chart data #### Description When generating Excel column references for chart data, the `_column_reference` method returns an undefined variable instead of the proper column reference string. #### Steps/Code to Reproduce ```python from pptx.chart.xlsx import CategoryWorkbookWr...
diff --git a/src/pptx/chart/xlsx.py b/src/pptx/chart/xlsx.py index 30b2127..e9b2dbf 100644 --- a/src/pptx/chart/xlsx.py +++ b/src/pptx/chart/xlsx.py @@ -86,19 +86,8 @@ class CategoryWorkbookWriter(_BaseWorkbookWriter): @staticmethod def _column_reference(column_number): - """Return str Excel column r...
["tests/chart/test_xlsx.py::DescribeCategoryWorkbookWriter::it_knows_the_ref_for_a_series_name[ser_name_ref_fixture0]", "tests/chart/test_xlsx.py::DescribeCategoryWorkbookWriter::it_knows_the_ref_for_a_series_name[ser_name_ref_fixture1]", "tests/chart/test_xlsx.py::DescribeCategoryWorkbookWriter::it_knows_the_ref_for_a...
["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
25
56
801
0
0.6
1
0.75
1
0.216833
80.9255
7,689
swe_smith::train::46834
swe_smith
train
46,834
python-trio__trio.cfbbe2c1.func_basic__8o4s5t0g
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SSL EOF detection broken - legitimate SSLErrors incorrectly treated as EOF #### Description The SSL EOF detection logic is incorrectly identifying regular SSL errors as EOF conditions. This causes SSL streams to behave unexpectedly when encountering legitimate SSL errors that should be propagated rather than treated ...
diff --git a/src/trio/_ssl.py b/src/trio/_ssl.py index 0a0419f..7e581d6 100644 --- a/src/trio/_ssl.py +++ b/src/trio/_ssl.py @@ -205,12 +205,8 @@ STARTING_RECEIVE_SIZE: TFinal = 16384 def _is_eof(exc: BaseException | None) -> bool: - # There appears to be a bug on Python 3.10, where SSLErrors - # aren't prop...
["src/trio/_tests/test_ssl.py::test_SSLStream_generic[tls13-True]", "src/trio/_tests/test_ssl.py::test_ssl_bad_shutdown_but_its_ok[tls13]", "src/trio/_tests/test_ssl.py::test_ssl_https_compatibility_disagreement[tls13]", "src/trio/_tests/test_ssl.py::test_https_mode_eof_before_handshake[tls13]", "src/trio/_tests/test_s...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
8
8
1,141
0
0.6
1
0.75
1
0.216833
80.9255
7,690
swe_smith::train::4842
swe_smith
train
4,842
bottlepy__bottle.a8dfef30.func_basic__qkqtx3y6
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
Router returns wrong HTTP status codes for unmatched routes #### Description The router is returning HTTP 400 (Bad Request) instead of HTTP 404 (Not Found) for routes that don't exist, and there seems to be an issue with dynamic route matching that causes IndexError exceptions. #### Steps/Code to Reproduce ```pytho...
diff --git a/bottle.py b/bottle.py index 286b5bc..d7213e1 100755 --- a/bottle.py +++ b/bottle.py @@ -472,12 +472,11 @@ class Router(object): for combined, rules in self.dyna_regexes[method]: match = combined(path) if match: - target, geta...
["test/test_mount.py::TestAppMounting::test_mount", "test/test_mount.py::TestAppMounting::test_mount_unicode_path_bug602", "test/test_mount.py::TestAppMounting::test_mount_wsgi", "test/test_mount.py::TestAppMounting::test_mount_wsgi_ctype_bug", "test/test_mount.py::TestAppMounting::test_no_slash_prefix", "test/test_mou...
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
8
44
1,141
0
0.6
1
0.75
1
0.216833
80.9255
7,691
swe_smith::train::12217
swe_smith
train
12,217
lepture__mistune.bf54ef67.combine_module__i79g2lzg
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
Task list checkboxes rendering incorrectly and insert formatting broken #### Description The task list plugin is rendering checkboxes in the wrong state and position, and the insert formatting plugin is causing TypeErrors when parsing insert tags. #### Steps/Code to Reproduce ```python import mistune # Task list i...
diff --git a/src/mistune/plugins/formatting.py b/src/mistune/plugins/formatting.py index d0e03f6..4ccda44 100644 --- a/src/mistune/plugins/formatting.py +++ b/src/mistune/plugins/formatting.py @@ -41,7 +41,7 @@ def render_mark(renderer: "BaseRenderer", text: str) -> str: def parse_insert( inline: "InlineParser", ...
["tests/test_plugins.py::TestPlugin1_insert::test_escape_insert_001", "tests/test_plugins.py::TestPlugin1_insert::test_escape_insert_002", "tests/test_plugins.py::TestPlugin1_insert::test_insert_001", "tests/test_plugins.py::TestPlugin1_insert::test_insert_link_001", "tests/test_plugins.py::TestPlugin1_insert::test_ins...
["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx...
jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67
true
null
2
8
34
1,141
0
0.6
1
0.75
1
0.216833
80.9255
7,692
swe_smith::train::7744
swe_smith
train
7,744
cantools__cantools.0c6a7871.func_basic__ta1cqgvd
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
get_attribute_definition returns None when attribute exists #### Description When calling `get_attribute_definition` for an attribute that already exists in the database, the function now returns `None` instead of the existing attribute definition. #### Steps/Code to Reproduce ```python import cantools # Create a ...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..ab48cac 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -1794,10 +1794,10 @@ def get_attribute_definition(database, name, default): if database.dbc...
["tests/test_database.py::CanToolsDatabaseTest::test_issue_167_long_names_from_scratch"]
["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
8
1
1,141
0
0.6
1
0.75
1
0.216833
80.9255
7,693
swe_smith::train::35123
swe_smith
train
35,123
django__daphne.32ac73e1.func_pm_remove_assign__ruw03l2w
swesmith/django__daphne.32ac73e1
django/daphne
python
null
Daphne CLI fails to start server with default port configuration #### Description When running daphne with default configuration or certain command line options, the server fails to start with a `ValueError: TCP binding requires a port` error. This affects basic usage scenarios where users expect the server to start ...
diff --git a/daphne/cli.py b/daphne/cli.py index a036821..ceafb22 100755 --- a/daphne/cli.py +++ b/daphne/cli.py @@ -222,16 +222,15 @@ class CommandLineInterface: access_log_stream = None if args.access_log: if args.access_log == "-": - access_log_stream = sys.stdout + ...
["tests/test_cli.py::TestCLIInterface::testCLIBasics", "tests/test_cli.py::TestCLIInterface::test_custom_proxyhost", "tests/test_cli.py::TestCLIInterface::test_custom_proxyport", "tests/test_cli.py::TestCLIInterface::test_custom_servername", "tests/test_cli.py::TestCLIInterface::test_default_proxyheaders", "tests/test_...
["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding...
jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1
true
null
1
8
6
1,140
0
0.6
1
0.75
1
0.216667
80.925
7,694
swe_smith::train::52561
swe_smith
train
52,561
pydicom__pydicom.7d361b3d.func_pm_remove_cond__aw05ikq4
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
CoderBase._validate_plugins() raises RuntimeError even when plugins are available #### Description When calling `_validate_plugins()` on a CoderBase instance, the method incorrectly raises a RuntimeError about missing dependencies even when there are available plugins. This happens because the method doesn't properly...
diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py index 10a4a93..8fee4bd 100644 --- a/src/pydicom/pixels/common.py +++ b/src/pydicom/pixels/common.py @@ -227,13 +227,6 @@ class CoderBase: if len(deps) > 1: missing = f"{', '.join(deps[:-1])} and {deps[-1]}" ...
["tests/pixels/test_common.py::TestCoderBase::test_validate_plugins", "tests/pixels/test_decoder_base.py::TestDecoder::test_buffer"]
["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
11
2
1,080
0
0.6
1
0.75
1
0.216667
80.925
7,695
swe_smith::train::36681
swe_smith
train
36,681
lincolnloop__python-qrcode.456b01d4.func_pm_ctrl_shuffle__h0s47xbt
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
SVG image generation fails with UnboundLocalError #### Description When generating QR codes using any of the SVG image factories, the code crashes with an `UnboundLocalError` for the variable `units`. This affects all SVG-related functionality. #### Steps/Code to Reproduce ```python import qrcode from qrcode.image ...
diff --git a/qrcode/image/svg.py b/qrcode/image/svg.py index 4ad371b..0ec97a7 100644 --- a/qrcode/image/svg.py +++ b/qrcode/image/svg.py @@ -33,21 +33,20 @@ class SvgFragmentImage(qrcode.image.base.BaseImageWithDrawer): def units(self, pixels: Union[int, Decimal], text: Literal[True] = True) -> str: ... def...
["qrcode/tests/test_qrcode_svg.py::test_render_svg", "qrcode/tests/test_qrcode_svg.py::test_render_svg_path", "qrcode/tests/test_qrcode_svg.py::test_render_svg_fragment", "qrcode/tests/test_qrcode_svg.py::test_svg_string", "qrcode/tests/test_qrcode_svg.py::test_render_svg_with_background", "qrcode/tests/test_qrcode_svg...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
19
8
920
0
0.6
1
0.75
1
0.216667
80.925
7,696
swe_smith::train::19199
swe_smith
train
19,199
seperman__deepdiff.ed252022.func_pm_remove_assign__38pz5cd3
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
NameError when using ignore_order with DeepDiff #### Description When using `ignore_order=True` with DeepDiff, a `NameError` is raised for undefined variables in the comparison logic. This affects various operations including basic list comparisons, distance calculations, and delta operations. #### Steps/Code to Rep...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..97591b4 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -1200,31 +1200,21 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): return defaultdict(SetOrdered) most_in_common_pairs = defaultdict(defaultdict_or...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.csv-t2.csv-args4-0]", "tests/test_delt...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
20
73
900
0
0.6
1
0.75
1
0.216667
80.925
7,697
swe_smith::train::18077
swe_smith
train
18,077
pndurette__gTTS.dbcda4f3.combine_file__i4m6kkkv
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
gTTS API requests failing with 400 Bad Request error When trying to generate speech using gTTS, all requests to the Google TTS API are failing with a 400 Bad Request error. This affects both the command line interface and the Python API. #### Steps/Code to Reproduce ```python from gtts import gTTS # Simple text-to-...
diff --git a/gtts/tts.py b/gtts/tts.py index eae351f..eaf4042 100644 --- a/gtts/tts.py +++ b/gtts/tts.py @@ -229,12 +229,12 @@ class gTTS: return prepared_requests def _package_rpc(self, text): - parameter = [text, self.lang, self.speed, "null"] + parameter = [self.lang, text, self.speed, ...
["gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_cli.py::test_params_set", "gtts/tests/test_cli.py::test_stdin_text", "gtts/tests/test_cli.py::test_stdin_text_unicode", "gtts/tests/test_cli.py::test_stdin_file", "gtts/tests/test_cli.py::test_stdin_file_unicode", "gtts/tests/test_cli.py::test_text", "gtts/...
["gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_lang.py::test_main_langs...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
1
15
75
1,000
0
0.6
1
0.75
1
0.216667
80.925
7,698
r2e_gym::train::6279
r2e_gym
train
6,279
pillow__25428afb7084f9adfaa54178919c1310a90741da
pillow
python-pillow/pillow
python
25428afb7084f9adfaa54178919c1310a90741da
**Title:** Unable to Open GIMP Brush Version 2 `.gbr` Files - Raises OSError **Description:** When attempting to open a GIMP brush file saved in version 2 `.gbr` format, the library fails to recognize the file, resulting in an error. This prevents users from loading and utilizing brushes created with newer versions of...
diff --git a/PIL/GbrImagePlugin.py b/PIL/GbrImagePlugin.py --- a/PIL/GbrImagePlugin.py +++ b/PIL/GbrImagePlugin.py @@ -1,17 +1,28 @@ # # The Python Imaging Library -# $Id$ # # load a GIMP brush file # # History: # 96-03-14 fl Created +# 16-01-08 es Version 2 # # Copyright (c) Secret Labs AB...
diff --git a/Tests/test_file_gbr.py b/Tests/test_file_gbr.py --- a/Tests/test_file_gbr.py +++ b/Tests/test_file_gbr.py @@ -1,6 +1,6 @@ from helper import unittest, PillowTestCase -from PIL import GbrImagePlugin +from PIL import Image, GbrImagePlugin class TestFileGbr(PillowTestCase): @@ -12,6 +12,13 @@ ...
null
null
namanjain12/pillow_final:25428afb7084f9adfaa54178919c1310a90741da
true
null
1
57
null
872
0
0.75
1
0.6375
1
0.335333
80.92475
7,699
swe_smith::train::19215
swe_smith
train
19,215
seperman__deepdiff.ed252022.func_pm_remove_assign__9bydist6
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
NameError: name 'divisor' is not defined in distance calculations #### Description When calculating numeric distances, the code throws a `NameError` because the variable `divisor` is referenced but not defined. This affects various distance calculation functions and breaks functionality that relies on numeric compari...
diff --git a/deepdiff/distance.py b/deepdiff/distance.py index d2dc2fe..4550975 100644 --- a/deepdiff/distance.py +++ b/deepdiff/distance.py @@ -207,18 +207,12 @@ def _get_numbers_distance(num1, num2, max_=1, use_log_scale=False, log_scale_sim num1 = float(num1) if not isinstance(num2, float): nu...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_delta.py::TestBasicsOfDelta::test_raise_error", "tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_order_case2]", "tests/test_delta.p...
["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
8
33
1,139
0
0.6
1
0.75
1
0.2165
80.9245