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
5,300
swe_smith::train::9746
swe_smith
train
9,746
marshmallow-code__webargs.dbde72fe.func_pm_ctrl_shuffle__q5e67cg3
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
# Invalid location argument check fails when using custom location loaders Hi! I'm working with webargs and I've found an issue with the custom location loaders functionality. ## Description When I try to use a custom location loader with the `location_loader` decorator, I'm getting an `UnboundLocalError` exception....
diff --git a/src/webargs/core.py b/src/webargs/core.py index 44294e9..5231e50 100644 --- a/src/webargs/core.py +++ b/src/webargs/core.py @@ -207,21 +207,20 @@ class Parser(typing.Generic[Request]): return cls(multidict, schema, known_multi_fields=tuple(self.KNOWN_MULTI_FIELDS)) def _get_loader(self, loc...
["tests/test_core.py::test_value_error_raised_if_parse_called_with_invalid_location", "tests/test_core.py::test_custom_location_loader", "tests/test_core.py::test_custom_location_loader_with_data_key", "tests/test_core.py::test_use_args_with_custom_location_in_parser"]
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
15
4
1,566
0
0.6
1
0.75
1
0.311
81.208
5,301
swe_smith::train::35883
swe_smith
train
35,883
stanfordnlp__dspy.651a4c71.lm_rewrite__7diftzv2
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Cache key generation breaks for Pydantic models I'm encountering an issue with the cache key generation in DSPy when working with Pydantic models. ## Description When using the Cache class with Pydantic models, the cache key generation fails. This happens because the code is trying to call `.dict()` on Pydantic mo...
diff --git a/dspy/clients/cache.py b/dspy/clients/cache.py index d3bad50..69fb502 100644 --- a/dspy/clients/cache.py +++ b/dspy/clients/cache.py @@ -72,26 +72,32 @@ class Cache: ignored_args_for_cache_key = ignored_args_for_cache_key or [] def transform_value(value): - if isinstance(value...
["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"]
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
38
4
1,105
0
0.6
1
0.75
1
0.310833
81.2075
5,302
swe_smith::train::7526
swe_smith
train
7,526
cantools__cantools.0c6a7871.func_basic__fnvf3wq5
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# SYM file format signals not being properly dumped ## Description I've discovered an issue with the SYM file format handling in the latest version. When dumping signals to a SYM file, the signals are being reversed and some signals are being skipped entirely. The problem appears to be in the `_dump_signals` functio...
diff --git a/src/cantools/database/can/formats/sym.py b/src/cantools/database/can/formats/sym.py index 4bdc121..4994b23 100644 --- a/src/cantools/database/can/formats/sym.py +++ b/src/cantools/database/can/formats/sym.py @@ -860,13 +860,14 @@ def _dump_signals(database: InternalDatabase, sort_signals: TypingOptional[Ca...
["tests/test_database.py::CanToolsDatabaseTest::test_jopp_6_0_sym_re_read", "tests/test_database.py::CanToolsDatabaseTest::test_multiline_enum_sym_parsing", "tests/test_database.py::CanToolsDatabaseTest::test_multiplex_sym_dump", "tests/test_database.py::CanToolsDatabaseTest::test_vehicle"]
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
7
4
1,725
0
0.6
1
0.75
1
0.310833
81.2075
5,303
swe_smith::train::716
swe_smith
train
716
oauthlib__oauthlib.1fd52536.func_pm_class_rm_funcs__s5ul0i6z
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Client._render method removed breaks OAuth1 signing functionality #### Description The `_render` method has been removed from the OAuth1 Client class, causing all OAuth1 signing operations to fail. This method was responsible for rendering signed requests according to the signature type (header, body, or query parame...
diff --git a/oauthlib/oauth1/rfc5849/__init__.py b/oauthlib/oauth1/rfc5849/__init__.py index 85e0b90..4ce4eb1 100644 --- a/oauthlib/oauth1/rfc5849/__init__.py +++ b/oauthlib/oauth1/rfc5849/__init__.py @@ -224,43 +224,6 @@ class Client: return params - def _render(self, request, formencode=False, realm=N...
["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...
["tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointTest::test_create_authorization_response", "tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointTest::test_create_authorization_response_oob", "tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointT...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
39
58
1,085
0
0.6
1
0.75
1
0.310833
81.2075
5,304
swe_smith::train::4353
swe_smith
train
4,353
pygments__pygments.27649ebb.func_pm_ctrl_shuffle__ggurnd0s
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
WikitextLexer handle_score method throws UnboundLocalError #### Description The WikitextLexer's handle_score method is throwing an UnboundLocalError when processing certain wikitext content. The error occurs because variables are being used before they are defined in the method. #### Steps/Code to Reproduce ```pyth...
diff --git a/pygments/lexers/markup.py b/pygments/lexers/markup.py index 5d5ff2c..b55d18e 100644 --- a/pygments/lexers/markup.py +++ b/pygments/lexers/markup.py @@ -969,35 +969,34 @@ class WikitextLexer(RegexLexer): yield from lexer.get_tokens_unprocessed(content) def handle_score(self, match, ctx):...
["tests/snippets/wikitext/parser-tag.txt::"]
["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
41
1
1,045
0
0.6
1
0.75
1
0.310833
81.2075
5,305
swe_smith::train::28071
swe_smith
train
28,071
jsvine__pdfplumber.02ff4313.lm_rewrite__u0ei1uqd
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
### Bug: Invalid Bounding Box Handling #### Bug Summary It seems there's an issue with handling bounding boxes that are not fully contained within their parent bounding boxes. The function `test_proposed_bbox` is expected to raise an error when a bounding box is invalid, but it does not behave as expected in some cas...
diff --git a/pdfplumber/page.py b/pdfplumber/page.py index 71330d8..8800ca4 100644 --- a/pdfplumber/page.py +++ b/pdfplumber/page.py @@ -682,25 +682,24 @@ class DerivedPage(Page): def test_proposed_bbox(bbox: T_bbox, parent_bbox: T_bbox) -> None: - bbox_area = utils.calculate_area(bbox) - if bbox_area == 0: ...
["tests/test_basics.py::Test::test_invalid_crops"]
["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
31
1
1,245
0
0.6
1
0.75
1
0.310833
81.2075
5,306
swe_smith::train::6841
swe_smith
train
6,841
joke2k__faker.8b401a7d.lm_rewrite__8bb0pic6
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# Current country method fails with certain locales and country codes I'm experiencing issues with the `current_country()` method in the address provider. The method doesn't work correctly in certain scenarios. ## Description When using the `current_country()` method with certain locales, it fails to return the expe...
diff --git a/faker/providers/address/__init__.py b/faker/providers/address/__init__.py index 270d09c..7311965 100644 --- a/faker/providers/address/__init__.py +++ b/faker/providers/address/__init__.py @@ -89,14 +89,19 @@ class Provider(BaseProvider): except IndexError: raise AttributeError("Countr...
["tests/providers/test_address.py::TestBaseProvider::test_country_code_all_locales", "tests/providers/test_address.py::TestBaseProvider::test_current_country_errors"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
27
2
1,324
0
0.6
1
0.75
1
0.310667
81.207
5,307
swe_smith::train::24479
swe_smith
train
24,479
sunpy__sunpy.f8edfd5c.combine_module__7krsn3dr
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Time attribute behavior changed when providing only start time Description Currently, when creating a Time attribute with only a start time (without an end time), it raises a ValueError: ```python from sunpy.net import attrs as a a.Time('2012/1/1') ``` This raises: ``` ValueError: Specify start and end or start has...
diff --git a/sunpy/net/_attrs.py b/sunpy/net/_attrs.py index 9b509c9..d9a33f2 100644 --- a/sunpy/net/_attrs.py +++ b/sunpy/net/_attrs.py @@ -38,19 +38,28 @@ class Time(Range): type_name = "time" def __init__(self, start, end=None, near=None): - if end is None and not isinstance(start, TimeRange): - ...
["sunpy/net/vso/tests/test_attrs.py::test_input_error", "sunpy/net/vso/tests/test_vso.py::test_iter_sort_response"]
["sunpy/net/vso/tests/test_attrs.py::test_simpleattr_apply", "sunpy/net/vso/tests/test_attrs.py::test_Time_timerange", "sunpy/net/vso/tests/test_attrs.py::test_simpleattr_and_duplicate", "sunpy/net/vso/tests/test_attrs.py::test_simpleattr_or_eq", "sunpy/net/vso/tests/test_attrs.py::test_complexattr_apply", "sunpy/net/v...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
34
2
1,184
0
0.6
1
0.75
1
0.310667
81.207
5,308
swe_smith::train::8286
swe_smith
train
8,286
cantools__cantools.0c6a7871.lm_rewrite__lef88l7y
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
AttributeError: 'DbcSpecifics' object has no attribute 'bus_comment' It seems there's an issue with the recent changes in the DBC file handling. Specifically, when trying to access the `bus_comment` attribute of a `DbcSpecifics` object, an `AttributeError` is raised. This is causing several functionalities to break, p...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..dfb7be2 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -551,40 +551,40 @@ def _dump_senders(database): def _dump_comments(database, sort_signals):...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals2", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_sort_signals_b...
["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
40
39
1,063
0
0.6
1
0.75
1
0.3105
81.2065
5,309
swe_smith::train::51521
swe_smith
train
51,521
pydicom__pydicom.7d361b3d.combine_file__kuqlrqag
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
CLI show command broken after recent changes #### Description The `pydicom show` command is no longer working and throws a TypeError when trying to execute. This affects both basic usage and when using command line options. #### Steps/Code to Reproduce ```python from pydicom.cli.main import main # This should work...
diff --git a/src/pydicom/cli/show.py b/src/pydicom/cli/show.py index 7ed71b3..75d79fb 100644 --- a/src/pydicom/cli/show.py +++ b/src/pydicom/cli/show.py @@ -16,20 +16,20 @@ def add_subparser(subparsers: argparse._SubParsersAction) -> None: subparser.add_argument( "-x", "--exclude-private", - ...
["tests/test_cli.py::TestCLIcall::test_show_command", "tests/test_cli.py::TestCLIcall::test_show_options"]
["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
54
2
783
0
0.6
1
0.75
1
0.3105
81.2065
5,310
swe_smith::train::22247
swe_smith
train
22,247
tweepy__tweepy.91a41c6e.combine_file__hjm7nuvm
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
AttributeError when calling `get_user` and `get_direct_messages` Description After applying the recent changes, I've encountered an issue with the `get_user` and `get_direct_messages` methods in the Tweepy API. When attempting to retrieve user information or direct messages, an `AttributeError` is raised, indicating ...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..6728546 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -119,21 +119,21 @@ class DirectMessage(Model): dm = cls(api) if "event" in json: json = json["event"] - setattr(dm, '_json', json) - for k, v in js...
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcreatedestroyfriendship", "tests/test_api.py::TweepyAPITests::testgetdirectmessages", "tests/test_api.py::TweepyAPITests::testgetlist...
["tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedresult", "tests/test_api.py::TweepyAPITests::testcreatedestroyblock", "tests/test_api.py::TweepyAPITests::testcreatedestroyfavorite", "tests/test_ap...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
22
15
1,423
0
0.6
1
0.75
1
0.3105
81.2065
5,311
swe_smith::train::4090
swe_smith
train
4,090
pygments__pygments.27649ebb.func_basic__ttpl3i08
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
PostgreSQL lexer crashes with AttributeError when processing dollar-quoted strings #### Description The PostgreSQL lexer is throwing an `AttributeError: 'NoneType' object has no attribute 'get_tokens_unprocessed'` when processing certain dollar-quoted string constructs. This appears to be related to the language dete...
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py index 9016538..a14a71b 100644 --- a/pygments/lexers/sql.py +++ b/pygments/lexers/sql.py @@ -90,28 +90,27 @@ def language_callback(lexer, match): lx = lexer._get_lexer(m.group(1)) else: m = list(language_re.finditer( - lexer.t...
["tests/examplefiles/postgresql/postgresql_test.txt::", "tests/examplefiles/psql/psql_session.txt::"]
["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
27
2
1,323
0
0.6
1
0.75
1
0.3105
81.2065
5,312
swe_smith::train::42792
swe_smith
train
42,792
python-jsonschema__jsonschema.93e0caa5.func_pm_remove_loop__fdioi6m6
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
unevaluatedProperties validation broken for basic property evaluation #### Description The `unevaluatedProperties` keyword is not working correctly for basic property validation scenarios. Properties that should be considered "evaluated" by `properties`, `additionalProperties`, and `unevaluatedProperties` keywords ar...
diff --git a/jsonschema/_legacy_keywords.py b/jsonschema/_legacy_keywords.py index c691589..d1e9be8 100644 --- a/jsonschema/_legacy_keywords.py +++ b/jsonschema/_legacy_keywords.py @@ -364,19 +364,6 @@ def find_evaluated_property_keys_by_schema(validator, instance, schema): ), ) - for keyword...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft201909::test_not_collect_annotations_inside_a_not_even_if_collection_is_disabled_annotations_are_still_collected_inside_a_not_", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft201909::test_unevaluatedProperties_cousin_unevaluatedProperties_true_and_f...
["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
14
45
1,583
0
0.6
1
0.75
1
0.3105
81.2065
5,313
r2e_gym::train::5341
r2e_gym
train
5,341
aiohttp__482e6cdf6516607360666a48c5828d3dbe959fbd
aiohttp
aio-libs/aiohttp
python
482e6cdf6516607360666a48c5828d3dbe959fbd
**Analysis:** - **Key Parts:** - **Commit Message:** "Fix set_content_disposition() after append() (#8332)" - **Failing Tests:** - `test_set_content_disposition_after_append` failed with an `AssertionError` because `CONTENT_DISPOSITION` was not in `payload.headers`. - `test_write_preserves_content_disposit...
diff --git a/CHANGES/8332.bugfix.rst b/CHANGES/8332.bugfix.rst --- a/CHANGES/8332.bugfix.rst +++ b/CHANGES/8332.bugfix.rst @@ -0,0 +1 @@ +Fixed regression with adding Content-Disposition to form-data part after appending to writer -- by :user:`Dreamsorcerer`/:user:`Olegt0rr`. diff --git a/aiohttp/multipart.py b/aiohttp...
diff --git a/tests/test_multipart.py b/tests/test_multipart.py --- a/tests/test_multipart.py +++ b/tests/test_multipart.py @@ -1164,6 +1164,13 @@ assert 1 == len(writer) part = writer._parts[0][0] assert part.headers[CONTENT_TYPE] == "test/passed" + + async def test_set_content_disposition...
null
null
namanjain12/aiohttp_final:482e6cdf6516607360666a48c5828d3dbe959fbd
true
null
2
8
null
2,415
0
0.75
1
0.6375
1
0.429167
81.20625
5,314
swe_smith::train::44119
swe_smith
train
44,119
pydata__patsy.a5d16484.func_basic__o863456k
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
# LinearConstraint.combine fails when combining constraints ## Description I'm trying to combine multiple linear constraints using the `LinearConstraint.combine` method, but it's failing with a strange error. When I try to run code like this: ```python from patsy.constraint import LinearConstraint constraint1 = Li...
diff --git a/patsy/constraint.py b/patsy/constraint.py index 6c04414..f384d99 100644 --- a/patsy/constraint.py +++ b/patsy/constraint.py @@ -86,14 +86,14 @@ class LinearConstraint(object): :returns: A new LinearConstraint object. """ if not constraints: - raise ValueError("no const...
["patsy/constraint.py::test_LinearConstraint_combine", "patsy/constraint.py::test_linear_constraint", "patsy/constraint.py::test_eval_errors", "patsy/design_info.py::test_DesignInfo_linear_constraint"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
8
4
1,702
0
0.6
1
0.75
1
0.310333
81.206
5,315
swe_smith::train::8017
swe_smith
train
8,017
cantools__cantools.0c6a7871.func_pm_op_change_const__z11rhtzd
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# Container message decoding fails with malformed data ## Description I've discovered an issue with container message decoding in the `Message` class. When trying to decode a container message, it fails with an `AttributeError: 'int' object has no attribute 'name'`. The problem appears to be in the `decode_container...
diff --git a/src/cantools/database/can/message.py b/src/cantools/database/can/message.py index 942b2cc..ad5c940 100644 --- a/src/cantools/database/can/message.py +++ b/src/cantools/database/can/message.py @@ -1025,27 +1025,27 @@ class Message: LOGGER.info(f'Malformed container message ' ...
["tests/test_database.py::CanToolsDatabaseTest::test_encode_decode_containers"]
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
11
1
1,642
0
0.6
1
0.75
1
0.310333
81.206
5,316
swe_smith::train::11080
swe_smith
train
11,080
rsalmei__alive-progress.35853799.combine_module__jzws3rtm
swesmith/rsalmei__alive-progress.35853799
rsalmei/alive-progress
python
null
Terminal output corrupted with negative column width and swapped methods #### Description The progress bars and terminal output are completely broken. When running any progress bar, I get `TypeError: bad operand type for unary -: 'function'` errors and the output is garbled with unexpected newlines and incorrect curs...
diff --git a/alive_progress/utils/terminal/__init__.py b/alive_progress/utils/terminal/__init__.py index e5bf51a..1eca43c 100644 --- a/alive_progress/utils/terminal/__init__.py +++ b/alive_progress/utils/terminal/__init__.py @@ -13,19 +13,18 @@ if sys.platform == 'win32': def _create(mod, interactive): terminal...
["tests/core/test_hook_manager.py::test_hook_manager_captures_stdout[print_data0]", "tests/core/test_hook_manager.py::test_hook_manager_captures_stdout[print_data1]", "tests/core/test_hook_manager.py::test_hook_manager_captures_stdout[print_data2]", "tests/core/test_hook_manager.py::test_hook_manager_captures_stdout[pr...
["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
27
44
1,321
0
0.6
1
0.75
1
0.310167
81.2055
5,317
swe_smith::train::46440
swe_smith
train
46,440
conan-io__conan.86f29e13.pr_16870
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
Loop Detection Fails in Dependency Graph Description: It seems there's an issue with detecting loops in the dependency graph when using certain build requirements. Specifically, when a package requires itself as a tool, the graph doesn't correctly identify the loop, leading to unexpected behavior. Here's a minimal e...
diff --git a/conans/client/graph/graph.py b/conans/client/graph/graph.py index b5037c2..b272896 100644 --- a/conans/client/graph/graph.py +++ b/conans/client/graph/graph.py @@ -159,7 +159,7 @@ class Node(object): if require.build and (self.context == CONTEXT_HOST or # switch context ...
["test/integration/build_requires/test_install_test_build_require.py::test_bootstrap_cc", "test/integration/graph/core/test_build_requires.py::TestLoops::test_direct_loop_error", "test/integration/graph/core/test_build_requires.py::TestLoops::test_indirect_loop_error"]
["test/integration/build_requires/test_install_test_build_require.py::test_build_require_test_package[]", "test/integration/build_requires/test_install_test_build_require.py::test_build_require_test_package[-pr:b=default]", "test/integration/build_requires/test_install_test_build_require.py::test_both_types", "test/int...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
12
3
1,621
0
0.6
1
0.75
1
0.310167
81.2055
5,318
r2e_gym::train::286
r2e_gym
train
286
orange3__cd67c66c5c073fda9df32080794791606154321b
orange3
biolab/orange3
python
cd67c66c5c073fda9df32080794791606154321b
**Analysis:** - **Key Parts:** - **Commit Message:** Fix a type error in report when using `NoopDelegate`. - **Commit Patch:** Changed `NoopItemDelegate` from `QAbstractItemDelegate` to `QStyledItemDelegate`, added `displayText` method. - **Test Results:** Previously, `TestOWPredictions.test_no_class_on_test` fa...
diff --git a/Orange/widgets/evaluate/owpredictions.py b/Orange/widgets/evaluate/owpredictions.py --- a/Orange/widgets/evaluate/owpredictions.py +++ b/Orange/widgets/evaluate/owpredictions.py @@ -9,7 +9,7 @@ import numpy from AnyQt.QtWidgets import ( QTableView, QSplitter, QToolTip, QStyle, QApplication, QSizePol...
diff --git a/Orange/widgets/evaluate/tests/test_owpredictions.py b/Orange/widgets/evaluate/tests/test_owpredictions.py --- a/Orange/widgets/evaluate/tests/test_owpredictions.py +++ b/Orange/widgets/evaluate/tests/test_owpredictions.py @@ -152,6 +152,14 @@ predmodel.data(predmodel.index(0, 0), Qt.UserRole))...
null
null
namanjain12/orange3_final:cd67c66c5c073fda9df32080794791606154321b
true
null
1
10
null
2,373
0
0.75
1
0.6375
1
0.428833
81.20525
5,319
swe_smith::train::7896
swe_smith
train
7,896
cantools__cantools.0c6a7871.func_pm_ctrl_invert_if__dra6hesw
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML loader fails with "Cannot retrieve a child element of a non-existing node!" for AUTOSAR 4.x files #### Description When loading AUTOSAR 4.x ARXML files, the system loader throws an `UnsupportedDatabaseFormatError` with the message "Cannot retrieve a child element of a non-existing node!". This appears to affect...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..c9adf76 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -1597,23 +1597,6 @@ class System...
["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
32
10
1,220
0
0.6
1
0.75
1
0.31
81.205
5,320
swe_smith::train::14494
swe_smith
train
14,494
hukkin__tomli.443a0c1b.combine_file__jtga1vqq
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
# TOML datetime parsing swaps month and day, breaks timezone handling ## Description I've found an issue with the TOML datetime parsing in tomli. When parsing datetime strings, the month and day values are swapped, causing invalid dates to be created. Additionally, there are several timezone handling issues: 1. For ...
diff --git a/src/tomli/_re.py b/src/tomli/_re.py index 9eacefc..15e7c95 100644 --- a/src/tomli/_re.py +++ b/src/tomli/_re.py @@ -68,19 +68,19 @@ def match_to_datetime(match: re.Match) -> datetime | date: offset_hour_str, offset_minute_str, ) = match.groups() - year, month, day = int(year_str),...
["tests/test_data.py::TestData::test_valid", "tests/test_misc.py::TestMiscellaneous::test_deepcopy"]
["tests/test_data.py::TestData::test_invalid", "tests/test_error.py::TestError::test_deprecated_tomldecodeerror", "tests/test_error.py::TestError::test_invalid_char_quotes", "tests/test_error.py::TestError::test_invalid_parse_float", "tests/test_error.py::TestError::test_line_and_col", "tests/test_error.py::TestError::...
jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b
true
null
1
14
2
1,580
0
0.6
1
0.75
1
0.31
81.205
5,321
swe_smith::train::45536
swe_smith
train
45,536
alanjds__drf-nested-routers.6144169d.combine_file__h6jsmlcl
swesmith/alanjds__drf-nested-routers.6144169d
alanjds/drf-nested-routers
python
null
NestedHyperlinkedRelatedField breaks with AttributeError when accessing nested lookups #### Description When using NestedHyperlinkedRelatedField with nested parent lookups, the field now returns None instead of generating proper URLs, causing serialization to fail silently. This affects nested resource relationships ...
diff --git a/rest_framework_nested/relations.py b/rest_framework_nested/relations.py index 8919b05..31db85f 100644 --- a/rest_framework_nested/relations.py +++ b/rest_framework_nested/relations.py @@ -36,33 +36,25 @@ class NestedHyperlinkedRelatedField(HyperlinkedRelatedField, Generic[T_Model]): May raise a `N...
["tests/serializers/test_serializers.py::TestSerializers::test_custom", "tests/serializers/test_serializers.py::TestSerializers::test_default", "tests/serializers/test_serializers.py::TestSerializers::test_multi_level", "tests/serializers/test_serializers.py::TestSerializers::test_multi_level_parent_ref", "tests/serial...
["tests/serializers/test_serializers.py::TestSerializers::test_no_children", "tests/test_dynamic_routers.py::TestNestedSimpleRouter::test_dynamic_routes", "tests/test_dynamic_routers.py::TestNestedSimpleRouter::test_nested_child", "tests/test_dynamic_routers.py::TestNestedSimpleRouter::test_nested_parent", "tests/test_...
jyangballin/swesmith.x86_64.alanjds_1776_drf-nested-routers.6144169d
true
null
1
28
6
1,300
0
0.6
1
0.75
1
0.31
81.205
5,322
swe_smith::train::41970
swe_smith
train
41,970
scanny__python-pptx.278b47b1.func_pm_class_rm_funcs__56byoy8j
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Package missing next_media_partname method and _media_parts property #### Description After recent changes, the Package class is missing the `next_media_partname` method and `_media_parts` property, causing AttributeError when trying to work with media parts. #### Steps/Code to Reproduce ```python from pptx import ...
diff --git a/src/pptx/package.py b/src/pptx/package.py index 79703cd..b43d479 100644 --- a/src/pptx/package.py +++ b/src/pptx/package.py @@ -72,31 +72,6 @@ class Package(OpcPackage): idx = first_available_image_idx() return PackURI("/ppt/media/image%d.%s" % (idx, ext)) - def next_media_partname(s...
["tests/parts/test_media.py::DescribeMediaPart::it_can_construct_from_a_media_object", "tests/test_package.py::DescribePackage::it_knows_the_next_available_media_partname[nmp_fixture0]", "tests/test_package.py::DescribePackage::it_knows_the_next_available_media_partname[nmp_fixture1]", "tests/test_package.py::DescribeP...
["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
35
5
1,160
0
0.6
1
0.75
1
0.31
81.205
5,323
swe_smith::train::8262
swe_smith
train
8,262
cantools__cantools.0c6a7871.lm_rewrite__dtza2992
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
### Bug Report: SYM File Parsing Error #### Description When attempting to load certain SYM files, an error is encountered that prevents successful parsing. The issue seems to arise when the SYM file contains specific enumeration structures. This results in an unexpected error message indicating a type mismatch. ###...
diff --git a/src/cantools/database/can/formats/sym.py b/src/cantools/database/can/formats/sym.py index 4bdc121..8e222ed 100644 --- a/src/cantools/database/can/formats/sym.py +++ b/src/cantools/database/can/formats/sym.py @@ -286,23 +286,26 @@ def _get_enum(enums, name): def _load_enums(tokens): + """Load enumer...
["tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_databases", "tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_files", "tests/test_database.py::CanToolsDatabaseTest::test_comments_hex_and_motorola_sym", "tests/test_database.py::CanToolsDatabaseTest::test_issue_138", "te...
["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
27
11
1,319
0
0.6
1
0.75
1
0.309833
81.2045
5,324
swe_smith::train::709
swe_smith
train
709
oauthlib__oauthlib.1fd52536.func_pm_class_rm_funcs__cpn24hjx
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Missing client authentication methods cause AttributeError in OAuth2 endpoints #### Description After recent changes, OAuth2 endpoints are failing with `AttributeError` when trying to call client authentication methods that appear to have been removed from the `BaseEndpoint` class. #### Steps/Code to Reproduce ```p...
diff --git a/oauthlib/oauth2/rfc6749/endpoints/base.py b/oauthlib/oauth2/rfc6749/endpoints/base.py index 987fac6..048c137 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/base.py +++ b/oauthlib/oauth2/rfc6749/endpoints/base.py @@ -55,15 +55,6 @@ class BaseEndpoint: if not request.token: raise Invali...
["tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_backend", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_introspect", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest:...
["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
17
70
1,519
0
0.6
1
0.75
1
0.309833
81.2045
5,325
swe_smith::train::867
swe_smith
train
867
oauthlib__oauthlib.1fd52536.lm_rewrite__b61bpmd5
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Client authentication fails when client_id is present but client is not authenticated Description I'm using oauthlib 3.2.0 and I've encountered an issue with client authentication in OAuth2 endpoints. The problem occurs when a client_id is provided but the client is not properly authenticated. Reproduction steps: 1...
diff --git a/oauthlib/oauth2/rfc6749/endpoints/base.py b/oauthlib/oauth2/rfc6749/endpoints/base.py index 987fac6..1bb113a 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/base.py +++ b/oauthlib/oauth2/rfc6749/endpoints/base.py @@ -57,14 +57,8 @@ class BaseEndpoint: description='Miss...
["tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py::IntrospectEndpointTest::test_introspect_token_client_authentication_failed", "tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py::IntrospectEndpointTest::test_introspect_token_public_client_authentication_failed", "tests/oauth2/rfc6749/endpoints/test...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
8
10
1,699
0
0.6
1
0.75
1
0.309833
81.2045
5,326
swe_smith::train::29223
swe_smith
train
29,223
tox-dev__pipdeptree.c31b6418.lm_rewrite__436jwp21
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
# KeyError when displaying duplicate package metadata I'm getting a KeyError when pipdeptree tries to display information about duplicate package metadata in my environment. ## Steps to reproduce 1. Create an environment with duplicate package metadata (e.g., same package installed in multiple locations) 2. Run pipd...
diff --git a/src/pipdeptree/_discovery.py b/src/pipdeptree/_discovery.py index ba23498..d2992f0 100644 --- a/src/pipdeptree/_discovery.py +++ b/src/pipdeptree/_discovery.py @@ -106,27 +106,27 @@ def render_invalid_metadata_text(site_dirs_with_invalid_metadata: set[str]) -> N FirstSeenWithDistsPair = Tuple[Distribution...
["tests/test_discovery.py::test_duplicate_metadata"]
["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
42
1
1,019
0
0.6
1
0.75
1
0.309833
81.2045
5,327
swe_smith::train::50895
swe_smith
train
50,895
python-hyper__h11.bed0dd4a.func_pm_ctrl_shuffle__moy0stkz
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
Connection initialization fails with AttributeError on our_role access #### Description When creating a Connection object, accessing `our_role` attribute before the object is fully initialized raises an AttributeError. This happens because the initialization order was changed and `our_role` is now set after other att...
diff --git a/h11/_connection.py b/h11/_connection.py index e37d82a..d5a1f93 100644 --- a/h11/_connection.py +++ b/h11/_connection.py @@ -170,39 +170,38 @@ class Connection: max_incomplete_event_size: int = DEFAULT_MAX_INCOMPLETE_EVENT_SIZE, ) -> None: self._max_incomplete_event_size = max_incompl...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_conne...
["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_events.py::test_events", "h11/tests/test_events.py::test_intenum_status_code", "h11/tests/test_events.py::test_header_casing", "h11/tests/test_headers.py::test_normalize_and_validate", "h11/tests/test_...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
39
30
1,079
0
0.6
1
0.75
1
0.309833
81.2045
5,328
swe_smith::train::590
swe_smith
train
590
oauthlib__oauthlib.1fd52536.func_basic__pzkao4cs
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth1 duplicate parameter detection broken for tuples with same key-value pairs #### Description The duplicate OAuth1 parameter detection is not working correctly when the same key-value pair appears multiple times. The current implementation fails to detect duplicates in cases where identical parameter tuples are p...
diff --git a/oauthlib/oauth1/rfc5849/endpoints/base.py b/oauthlib/oauth1/rfc5849/endpoints/base.py index 8d3d89c..9d689e7 100644 --- a/oauthlib/oauth1/rfc5849/endpoints/base.py +++ b/oauthlib/oauth1/rfc5849/endpoints/base.py @@ -67,18 +67,16 @@ class BaseEndpoint: return signature_type, params, oauth_params ...
["tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_duplicate_params"]
["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
15
1
1,558
0
0.6
1
0.75
1
0.309667
81.204
5,329
swe_smith::train::23813
swe_smith
train
23,813
rustedpy__result.0b855e1e.pr_165
swesmith/rustedpy__result.0b855e1e
rustedpy/result
python
null
# Missing map_async method in Result class ## Description I noticed that the `map_async` method has been removed from both the `Ok` and `Err` classes. This method is essential for handling asynchronous operations with Result types. For example, when working with a code like this: ```python async def process_data(va...
diff --git a/src/result/result.py b/src/result/result.py index 8551239..f3e8df2 100644 --- a/src/result/result.py +++ b/src/result/result.py @@ -153,15 +153,6 @@ class Ok(Generic[T]): """ return Ok(op(self._value)) - async def map_async( - self, op: Callable[[T], Awaitable[U]] - ) -> Ok...
["tests/test_result.py::test_map_async"]
["tests/test_result.py::test_ok_factories", "tests/test_result.py::test_err_factories", "tests/test_result.py::test_eq", "tests/test_result.py::test_hash", "tests/test_result.py::test_repr", "tests/test_result.py::test_ok_value", "tests/test_result.py::test_err_value", "tests/test_result.py::test_ok", "tests/test_resul...
jyangballin/swesmith.x86_64.rustedpy_1776_result.0b855e1e
true
null
1
18
1
1,498
0
0.6
1
0.75
1
0.309667
81.204
5,330
swe_smith::train::27622
swe_smith
train
27,622
arrow-py__arrow.1d70d009.func_basic__tahagu97
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
dehumanize method fails with "locale not supported" error for standard locales #### Description The `dehumanize` method is throwing a ValueError claiming that standard locales like "en" are not supported, even though they should be. This affects basic functionality when trying to parse humanized time strings back to ...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..395529e 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -1337,11 +1337,8 @@ class Arrow: """ - # Create a locale object based off given local locale_obj = locales.get_locale(locale) - - # Check to see if locale is suppor...
["tests/test_arrow.py::TestArrowDehumanize::test_now", "tests/test_arrow.py::TestArrowDehumanize::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_minute", "tests/test_arrow.py::TestArrowDehumanize::test_minutes", "tests/test_arrow.py::TestArrowDehumanize::test_hour", "tests/test_arrow.py::TestArrowDehuma...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
38
18
1,098
0
0.6
1
0.75
1
0.309667
81.204
5,331
swe_smith::train::48200
swe_smith
train
48,200
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__8g1rqpuf
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
File path discovery broken for exact file paths #### Description When specifying an exact file path to sqlfluff, the file discovery logic is broken and produces unexpected behavior. The function appears to have logic errors where variables are used before being defined and the file extension check happens in the wron...
diff --git a/src/sqlfluff/core/linter/discovery.py b/src/sqlfluff/core/linter/discovery.py index eb68e44..7e36e9c 100644 --- a/src/sqlfluff/core/linter/discovery.py +++ b/src/sqlfluff/core/linter/discovery.py @@ -144,38 +144,37 @@ def _process_exact_path( lower_file_exts: Tuple[str, ...], outer_ignore_specs: ...
["test/core/linter/discovery_test.py::test__linter__path_from_paths__file", "test/core/linter/discovery_test.py::test__linter__path_from_paths__explicit_ignore", "test/core/linter/discovery_test.py::test__linter__path_from_paths__specific_bad_ext", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[0-Fals...
["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__not_exist", "test/core/l...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
31
26
1,236
0
0.6
1
0.75
1
0.309333
81.203
5,332
swe_smith::train::35717
swe_smith
train
35,717
stanfordnlp__dspy.651a4c71.func_pm_remove_assign__nxzu1zy6
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Undefined variable 'fields' in json_adapter.py ## Description I encountered an issue when using the JSON adapter with structured outputs. The code fails with a NameError because the variable `fields` is used before it's defined. When trying to use a model with structured outputs, I get an error like: ``` NameErro...
diff --git a/dspy/adapters/json_adapter.py b/dspy/adapters/json_adapter.py index 14c5230..7c77a8f 100644 --- a/dspy/adapters/json_adapter.py +++ b/dspy/adapters/json_adapter.py @@ -184,23 +184,11 @@ def _get_structured_outputs_response_format(signature: SignatureMeta) -> type[py raise ValueError( ...
["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"]
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
14
4
1,576
0
0.6
1
0.75
1
0.309333
81.203
5,333
swe_smith::train::50796
swe_smith
train
50,796
python-hyper__h11.bed0dd4a.combine_file__r4wknoj7
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
ChunkedReader and Http10Reader return incorrect values on EOF #### Description When processing HTTP messages, the ChunkedReader and Http10Reader classes are returning incorrect values in certain edge cases. The ChunkedReader is not properly handling chunk boundaries and the Http10Reader is returning None instead of E...
diff --git a/h11/_readers.py b/h11/_readers.py index 08a9574..2454ef0 100644 --- a/h11/_readers.py +++ b/h11/_readers.py @@ -160,17 +160,15 @@ class ChunkedReader: if lines is None: return None return EndOfMessage(headers=list(_decode_header_lines(lines))) - if self._by...
["h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_client_talking_to_http10_server", "h11/tests/test_connection.py::test_server_talking_to_http10_client", "h1...
["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__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_100_continue", "h11/tests/test_connection.py::test_idle_rec...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
25
19
1,355
0
0.6
1
0.75
1
0.309167
81.2025
5,334
swe_smith::train::1173
swe_smith
train
1,173
jd__tenacity.0d40e76f.lm_rewrite__h8rtl9ii
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
# after_log function in tenacity logs unexpected output ## Description The `after_log` function in tenacity is not working correctly when logging the finished attempt. When using this function, it adds unexpected information to the log output that wasn't there before. ## How to reproduce: Create a simple script tha...
diff --git a/tenacity/after.py b/tenacity/after.py index aa3cc9d..630865a 100644 --- a/tenacity/after.py +++ b/tenacity/after.py @@ -35,17 +35,23 @@ def after_log( ) -> typing.Callable[["RetryCallState"], None]: """After call strategy that logs to some logger the finished attempt.""" - def log_it(retry_state...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format"]
["tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::TestAsyncio::test_repr", "tests/test_asyncio.py::TestAsyncio::test_retry", "tests/test_asyncio.py::TestAsyncio::test_retry_attributes"...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
24
2
1,372
0
0.6
1
0.75
1
0.308667
81.201
5,335
swe_smith::train::34823
swe_smith
train
34,823
mozillazg__python-pinyin.e42dede5.func_pm_ctrl_shuffle__yij14wf9
swesmith/mozillazg__python-pinyin.e42dede5
mozillazg/python-pinyin
python
null
NeutralToneWith5Mixin produces incorrect output for certain tone styles #### Description When using the `NeutralToneWith5Mixin` with certain tone styles, the pinyin conversion produces unexpected results. For some styles like `TONE3` and `FINALS_TONE3`, existing tone numbers are being appended with "5" instead of bei...
diff --git a/pypinyin/contrib/neutral_tone.py b/pypinyin/contrib/neutral_tone.py index 3f0864a..2336343 100644 --- a/pypinyin/contrib/neutral_tone.py +++ b/pypinyin/contrib/neutral_tone.py @@ -48,26 +48,26 @@ class NeutralToneWith5Mixin(object): def post_convert_style(self, han, orig_pinyin, converted_pinyin, ...
["pypinyin/core.py::pypinyin.core.lazy_pinyin", "pypinyin/core.py::pypinyin.core.pinyin", "tests/contrib/test_neutral_tone.py::test_neutral_tone_with_5", "tests/contrib/test_neutral_tone.py::test_neutral_tone_with_5_many_cases[\\u4f60\\u597d-Style.TONE3-expected_old2-expected_new2]", "tests/contrib/test_neutral_tone.py...
["pypinyin/core.py::pypinyin.core.slug", "pypinyin/style/_tone_convert.py::pypinyin.style._tone_convert.to_finals", "pypinyin/style/_tone_convert.py::pypinyin.style._tone_convert.to_finals_tone", "pypinyin/style/_tone_convert.py::pypinyin.style._tone_convert.to_finals_tone2", "pypinyin/style/_tone_convert.py::pypinyin....
jyangballin/swesmith.x86_64.mozillazg_1776_python-pinyin.e42dede5
true
null
1
24
22
1,372
0
0.6
1
0.75
1
0.308667
81.201
5,336
swe_smith::train::49113
swe_smith
train
49,113
mozilla__bleach.73871d76.combine_file__eax9m4uu
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
URL parsing broken after recent changes #### Description URL parsing is completely broken and returning incorrect results. The `urlparse` function is not properly extracting URL components and is causing failures across the codebase. #### Steps/Code to Reproduce ```python from bleach._vendor.parse import urlparse ...
diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py index ac6e7a9..1db7c19 100644 --- a/bleach/_vendor/parse.py +++ b/bleach/_vendor/parse.py @@ -369,13 +369,13 @@ def urlparse(url, scheme='', allow_fragments=True): (e.g. netloc is a single string) and we don't expand % escapes.""" url, scheme, _co...
["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::test_attributes_wildcard", "tests/test_clean.p...
["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
46
25
931
0
0.6
1
0.75
1
0.3085
81.2005
5,337
swe_smith::train::18356
swe_smith
train
18,356
msiemens__tinydb.10644a0e.func_pm_ctrl_shuffle__mb1ppp7q
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Table operations fail with UnboundLocalError after recent changes #### Description After some recent changes to the table update logic, basic table operations are failing with `UnboundLocalError: local variable 'tables' referenced before assignment`. This affects all database operations including insert, update, remo...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..d5b7a4c 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -734,17 +734,23 @@ class Table: document class, as the table data will *not* be returned to the user. """ - tables = self._storage.read() - if tables is None: ...
["tests/test_middlewares.py::test_caching_json_write", "tests/test_storages.py::test_json_kwargs", "tests/test_storages.py::test_json_readwrite", "tests/test_storages.py::test_json_read", "tests/test_storages.py::test_in_memory_close", "tests/test_storages.py::test_read_once", "tests/test_storages.py::test_yaml", "test...
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
40
21
1,051
0
0.6
1
0.75
1
0.3085
81.2005
5,338
swe_bench::test::1865
swe_bench
test
1,865
sphinx-doc__sphinx-9171
sphinx-doc/sphinx
sphinx-doc/sphinx
python
1513d5077439b6f1e69108233d1a08059f420970
Omitting constructor signature from class header using `autoclass` I'm a bit surprised to see that (in the Python domain) ``` .. autoclass:: Foo ... ``` will create a heading like `class Foo(*args)` which seems quite unintuitive to me, as it mixes two concepts: the declaration of "class Foo", with a constructor call...
Unfortunately, there are no way to do that. The `autoclass` directive always shows its signature automatically. +1: I agree that it is valuable if we can show explanations both of the class and `__init__()` method independently. Can this issue be renamed to smth. like "Omitting constructor signature from class heade...
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -70,6 +70,9 @@ class _All: def __contains__(self, item: Any) -> bool: return True + def append(self, item: Any) -> None: + pass # nothing +...
diff --git a/tests/test_ext_autodoc_configs.py b/tests/test_ext_autodoc_configs.py --- a/tests/test_ext_autodoc_configs.py +++ b/tests/test_ext_autodoc_configs.py @@ -140,6 +140,57 @@ def test_autoclass_content_init(app): ] +@pytest.mark.sphinx('html', testroot='ext-autodoc') +def test_autodoc_class_signature_...
["tests/test_ext_autodoc_configs.py::test_autodoc_class_signature_separated_init", "tests/test_ext_autodoc_configs.py::test_autodoc_class_signature_separated_new"]
["tests/test_ext_autodoc_configs.py::test_autoclass_content_class", "tests/test_ext_autodoc_configs.py::test_autoclass_content_init", "tests/test_ext_autodoc_configs.py::test_autodoc_class_signature_mixed", "tests/test_ext_autodoc_configs.py::test_autoclass_content_both", "tests/test_ext_autodoc_configs.py::test_autodo...
null
true
2021-05-05T10:25:44Z
2
49
2
670
0
0.8
1
0.55
1
0.275
81.2
5,339
swe_smith::train::10903
swe_smith
train
10,903
paramiko__paramiko.23f92003.lm_rewrite__b230n90o
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
# Certificate type validation fails when loading certificates for different key types ## Description When loading a certificate for a key using `load_certificate()`, the validation logic is too strict and fails when it shouldn't. The function is raising an exception when trying to load a certificate of a different ty...
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index f0b2d6d..d65d39a 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -846,18 +846,33 @@ class PKey: that is for the server to decide if it is good enough to authenticate successfully. """ + # Handle different input types ...
["tests/pkey.py::PKey_::load_certificate::loading_cert_of_different_type_from_key_raises_ValueError"]
["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
33
1
1,190
0
0.6
1
0.75
1
0.308333
81.2
5,340
swe_smith::train::49134
swe_smith
train
49,134
mozilla__bleach.73871d76.combine_file__kr1nqan6
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTMLUnicodeInputStream position tracking broken after reset #### Description The HTMLUnicodeInputStream class has broken position tracking functionality. When parsing HTML content, the position method returns incorrect line and column information, and various internal state variables are not properly initialized. ##...
diff --git a/bleach/_vendor/html5lib/_inputstream.py b/bleach/_vendor/html5lib/_inputstream.py index 0976251..9313aa6 100644 --- a/bleach/_vendor/html5lib/_inputstream.py +++ b/bleach/_vendor/html5lib/_inputstream.py @@ -190,16 +190,16 @@ class HTMLUnicodeInputStream(object): def reset(self): self.chunk =...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
26
183
1,329
0
0.6
1
0.75
1
0.308167
81.1995
5,341
swe_smith::train::35759
swe_smith
train
35,759
stanfordnlp__dspy.651a4c71.func_pm_remove_cond__egoacvtd
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# [Bug]: LM initialization missing kwargs assignment ## Bug summary When initializing an LM object, the kwargs are not being properly assigned, causing all DSPy modules that use the LM to fail. This happens because the `self.kwargs` dictionary is not being set in the `LM` class constructor. ## Code for reproduction ...
diff --git a/dspy/clients/lm.py b/dspy/clients/lm.py index 0025031..e73c312 100644 --- a/dspy/clients/lm.py +++ b/dspy/clients/lm.py @@ -81,16 +81,6 @@ class LM(BaseLM): # Match pattern: o[1,3,4] at the start, optionally followed by -mini and anything else model_pattern = re.match(r"^o([134])(?:-min...
["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...
["tests/adapters/test_json_adapter.py::test_json_adapter_parse_raise_error_on_mismatch_fields", "tests/adapters/test_two_step_adapter.py::test_two_step_adapter_call", "tests/adapters/test_two_step_adapter.py::test_two_step_adapter_async_call", "tests/adapters/test_two_step_adapter.py::test_two_step_adapter_parse", "tes...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
10
107
1,649
0
0.6
1
0.75
1
0.308167
81.1995
5,342
swe_smith::train::29668
swe_smith
train
29,668
cookiecutter__cookiecutter.b4451231.lm_rewrite__382yl0pe
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
### Issue: Missing Extensions Cause Errors **Description** After a recent update, it seems that some of the default extensions are not being loaded correctly, leading to unexpected errors during template generation. Specifically, the `random_ascii_string` and `slugify` filters are not recognized, and attempts to use ...
diff --git a/cookiecutter/environment.py b/cookiecutter/environment.py index 5872d50..1906668 100644 --- a/cookiecutter/environment.py +++ b/cookiecutter/environment.py @@ -16,7 +16,8 @@ class ExtensionLoaderMixin: the next parent class in line of the child. """ - def __init__(self, *, context: dict[str,...
["tests/test_cli.py::test_echo_unknown_extension_error", "tests/test_cli.py::test_local_extension_not_available", "tests/test_default_extensions.py::test_jinja2_time_extension", "tests/test_default_extensions.py::test_jinja2_slugify_extension", "tests/test_default_extensions.py::test_jinja2_uuid_extension", "tests/test...
["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl...
jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231
true
null
1
30
12
1,249
0
0.6
1
0.75
1
0.308167
81.1995
5,343
swe_smith::train::23482
swe_smith
train
23,482
pyparsing__pyparsing.533adf47.func_basic__7sqbanzd
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
ParseExpression streamline method broken after recent changes #### Description The streamline optimization in ParseExpression appears to be completely broken. When trying to parse even simple expressions, the parser fails with various errors including AttributeError and AssertionError exceptions. #### Steps/Code to ...
diff --git a/pyparsing/core.py b/pyparsing/core.py index 777165c..2293211 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -3917,7 +3917,7 @@ class ParseExpression(ParserElement): return f"{type(self).__name__}:({self.exprs})" def streamline(self) -> ParserElement: - if self.streamlined:...
["tests/test_diagram.py::TestRailroadDiagrams::test_example_rr_diags", "tests/test_examples.py::TestExamples::test_rosettacode", "tests/test_unit.py::Test02_WithoutPackrat::testDelimitedListName", "tests/test_unit.py::Test02_WithoutPackrat::testEachWithParseFatalException", "tests/test_unit.py::Test02_WithoutPackrat::t...
["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse...
jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47
true
null
1
33
74
1,189
0
0.6
1
0.75
1
0.308167
81.1995
5,344
swe_smith::train::39356
swe_smith
train
39,356
pallets__jinja.ada0a9a6.func_pm_class_rm_funcs__pg0780rj
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
String formatting methods not working in sandboxed environment #### Description When using string formatting methods like `.format()` and `.format_map()` in a sandboxed Jinja2 environment, the methods are not being handled properly and result in AttributeError. #### Steps/Code to Reproduce ```python from jinja2 imp...
diff --git a/src/jinja2/sandbox.py b/src/jinja2/sandbox.py index ce27615..a309b07 100644 --- a/src/jinja2/sandbox.py +++ b/src/jinja2/sandbox.py @@ -346,35 +346,6 @@ class SandboxedEnvironment(Environment): exc=SecurityError, ) - def format_string( - self, - s: str, - arg...
["tests/test_security.py::TestStringFormat::test_basic_format_safety", "tests/test_security.py::TestStringFormat::test_basic_format_all_okay", "tests/test_security.py::TestStringFormat::test_safe_format_safety", "tests/test_security.py::TestStringFormat::test_safe_format_all_okay", "tests/test_security.py::TestStringFo...
["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
30
8
1,249
0
0.6
1
0.75
1
0.308167
81.1995
5,345
swe_smith::train::21808
swe_smith
train
21,808
life4__textdistance.c3aca916.combine_file__r87diko8
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
# Bugs in sequence-based text distance algorithms #### Description I found several issues with the sequence-based text distance algorithms in the library. The `LCSSeq`, `LCSStr`, and `RatcliffObershelp` algorithms are returning incorrect values, causing normalization issues and failing on edge cases. #### Steps/Code ...
diff --git a/textdistance/algorithms/sequence_based.py b/textdistance/algorithms/sequence_based.py index b1fd7af..6d2339d 100644 --- a/textdistance/algorithms/sequence_based.py +++ b/textdistance/algorithms/sequence_based.py @@ -99,7 +99,7 @@ class LCSSeq(_BaseSimilarity): return self._recursive(*sequences...
["tests/test_common.py::test_normalization_range[alg7]", "tests/test_common.py::test_normalization_range[alg8]", "tests/test_common.py::test_normalization_same[alg7]", "tests/test_common.py::test_normalization_same[alg8]", "tests/test_common.py::test_normalization_monotonic[alg9]", "tests/test_common.py::test_no_common...
["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
6
9
1,729
0
0.6
1
0.75
1
0.308167
81.1995
5,346
swe_smith::train::20280
swe_smith
train
20,280
gruns__furl.da386f68.func_basic__od0ggehf
swesmith/gruns__furl.da386f68
gruns/furl
python
null
furl.set() method returns None instead of self after recent changes #### Description The `furl.set()` method is supposed to return the furl instance to allow method chaining, but it's now returning `None` which breaks existing code that relies on chaining. #### Steps/Code to Reproduce ```python from furl import fur...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..4a6e629 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -1690,67 +1690,63 @@ class furl(URLPathCompositionInterface, QueryCompositionInterface, 'furl.set() documentation for more details.') warnings.warn(s, UserWarning) prov...
["tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestFragment::test_unicode", "tests/test_furl.py::TestFurl::test_asdict", "tests/test_furl.py::TestFurl::test_basics", "tests/test_furl.py::TestFurl::test_constructor_and_set", "tests/test_furl.py::Test...
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_itruediv", "tests/test_furl.py::TestPath::test_leading_slash", "tests/test_furl.py::TestPath::test...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
46
18
929
0
0.6
1
0.75
1
0.308167
81.1995
5,347
swe_smith::train::6885
swe_smith
train
6,885
joke2k__faker.8b401a7d.lm_rewrite__st05b3ms
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
### Issue: AttributeError in Faker Proxy #### Problem After updating the `Faker` class, an `AttributeError` is raised when attempting to access the `factories` attribute on a `Generator` object. This issue occurs when using certain methods that rely on the `factories` attribute, which seems to be missing or incorrect...
diff --git a/faker/proxy.py b/faker/proxy.py index ac39e45..eab0a43 100644 --- a/faker/proxy.py +++ b/faker/proxy.py @@ -98,12 +98,18 @@ class Faker: return sorted(attributes) def __getitem__(self, locale: str) -> Faker: - if locale.replace("-", "_") in self.locales and len(self.locales) == 1: - ...
["tests/providers/test_misc.py::TestMiscProvider::test_dsv_data_columns", "tests/providers/test_python.py::TestPystrFormat::test_formatter_invocation"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
18
2
1,488
0
0.6
1
0.75
1
0.308
81.199
5,348
swe_smith::train::29671
swe_smith
train
29,671
cookiecutter__cookiecutter.b4451231.lm_rewrite__5fpknkuc
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
# `--list-installed` command broken in latest version I'm trying to use the `--list-installed` command to see my installed templates, but it's failing with an error. ## Steps to reproduce 1. Install cookiecutter 2. Run `cookiecutter --list-installed` ## Expected behavior The command should list all installed templ...
diff --git a/cookiecutter/cli.py b/cookiecutter/cli.py index a6fcf2b..015addc 100644 --- a/cookiecutter/cli.py +++ b/cookiecutter/cli.py @@ -59,30 +59,33 @@ def validate_extra_context( return OrderedDict(s.split('=', 1) for s in value) or None -def list_installed_templates( - default_config: bool | dict[str...
["tests/test_cli.py::test_debug_list_installed_templates", "tests/test_cli.py::test_debug_list_installed_templates_failure"]
["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl...
jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231
true
null
1
47
2
908
0
0.6
1
0.75
1
0.308
81.199
5,349
swe_smith::train::26815
swe_smith
train
26,815
tkrajina__gpxpy.09fc46b3.combine_file__o8p9a4dw
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX parsing fails with encoding errors when using standard library XML parser When parsing GPX files using the standard library XML parser (not lxml), the parser incorrectly uses UTF-16 encoding instead of UTF-8, causing XML syntax errors. #### Steps/Code to Reproduce ```python import gpxpy # Simple GPX content gpx...
diff --git a/gpxpy/parser.py b/gpxpy/parser.py index ea3b31a..92c2788 100644 --- a/gpxpy/parser.py +++ b/gpxpy/parser.py @@ -38,7 +38,7 @@ def library() -> str: Provided for convenient unittests. """ - if "lxml" in str(mod_etree): + if "lxml" not in str(mod_etree): return "LXML" return "...
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_missing_elevations_without_ele", "test.py::GPXTests::test_add_missing_times_2", "test.py::GPXTests::test_clone_and_smooth", "test.py::GPXTests::test_course_between", "test.py::GPXTests::test_creator_field", "test.py::GPXTests::test_dilutions",...
["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_add_missing_elevations", "test.py::GPXTests::tes...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
34
91
1,167
0
0.6
1
0.75
1
0.307833
81.1985
5,350
swe_smith::train::20388
swe_smith
train
20,388
gruns__furl.da386f68.lm_rewrite__qzcx1x1n
swesmith/gruns__furl.da386f68
gruns/furl
python
null
### Description It seems there's an issue with the `quote` function in the `create_quote_fn` method. When attempting to quote strings, a `TypeError` is raised indicating that the `quote` function doesn't support the provided arguments. This is causing several functionalities to fail, particularly those related to quer...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..11873f5 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -145,22 +145,26 @@ def static_vars(**kwargs): def create_quote_fn(safe_charset, quote_plus): def quote_fn(s, dont_quote): + """ + Quote string s using urllib.parse.quote with the safe ch...
["tests/test_furl.py::TestQuery::test_add", "tests/test_furl.py::TestQuery::test_asdict", "tests/test_furl.py::TestQuery::test_encode", "tests/test_furl.py::TestQuery::test_equality", "tests/test_furl.py::TestQuery::test_load", "tests/test_furl.py::TestQuery::test_none", "tests/test_furl.py::TestQuery::test_params", "t...
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_it...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
34
34
1,167
0
0.6
1
0.75
1
0.307833
81.1985
5,351
swe_smith::train::52677
swe_smith
train
52,677
pydicom__pydicom.7d361b3d.lm_rewrite__cgfnldja
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# Deprecated imports from pydicom.encoders not working when config._use_future is True ## Description I've discovered an issue with the deprecated imports from the `pydicom.encoders` module. When trying to use these deprecated imports with `config._use_future` set to `True`, the imports fail completely instead of sho...
diff --git a/src/pydicom/encoders/__init__.py b/src/pydicom/encoders/__init__.py index 92eb27a..d045668 100644 --- a/src/pydicom/encoders/__init__.py +++ b/src/pydicom/encoders/__init__.py @@ -13,13 +13,14 @@ _DEPRECATED = { } -def __getattr__(name: str) -> Any: - if name in _DEPRECATED and not config._use_futu...
["tests/pixels/test_encoder_base.py::TestFuture::test_imports_raise", "tests/pixels/test_encoder_base.py::test_deprecation_warning"]
["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
17
2
1,507
0
0.6
1
0.75
1
0.307833
81.1985
5,352
swe_smith::train::42214
swe_smith
train
42,214
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__tm4sqyfg
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Chart.category_axis property returns wrong axis type or raises NameError #### Description The `category_axis` property on Chart objects is not working correctly. It seems to be checking for undefined variables and returning the wrong axis types in some cases. #### Steps/Code to Reproduce ```python from pptx import ...
diff --git a/src/pptx/chart/chart.py b/src/pptx/chart/chart.py index d73aa93..bb30224 100644 --- a/src/pptx/chart/chart.py +++ b/src/pptx/chart/chart.py @@ -24,25 +24,24 @@ class Chart(PartElementProxy): @property def category_axis(self): + if dateAx_lst: + return DateAxis(dateAx_lst[0]) +...
["tests/chart/test_chart.py::DescribeChart::it_provides_access_to_the_category_axis[c:catAx]", "tests/chart/test_chart.py::DescribeChart::it_provides_access_to_the_category_axis[c:dateAx]", "tests/chart/test_chart.py::DescribeChart::it_provides_access_to_the_category_axis[c:valAx]", "tests/chart/test_chart.py::Describe...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
19
4
1,466
0
0.6
1
0.75
1
0.307667
81.198
5,353
swe_smith::train::43784
swe_smith
train
43,784
pydata__patsy.a5d16484.combine_file__f8j76nn6
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
# Center and Standardize transformations broken in latest version When using the `center()` and `standardize()` transformations in formulas, I'm getting errors that make the library unusable. ## Reproduction Using the following simple code: ```python import patsy import numpy as np data = {'x': [1, 2, 3], 'y': [4,...
diff --git a/patsy/state.py b/patsy/state.py index 8d674ba..801e604 100644 --- a/patsy/state.py +++ b/patsy/state.py @@ -118,17 +118,14 @@ class Center(object): def transform(self, x): x = asarray_or_pandas(x) - # This doesn't copy data unless our input is a DataFrame that has - # heteroge...
["patsy/test_highlevel.py::test_builtins", "patsy/test_highlevel.py::test_incremental", "patsy/test_state.py::test_Center", "patsy/test_state.py::test_stateful_transform_wrapper", "patsy/test_state.py::test_Standardize"]
["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
25
5
1,346
0
0.6
1
0.75
1
0.307667
81.198
5,354
swe_smith::train::51228
swe_smith
train
51,228
marshmallow-code__apispec.8b421526.func_pm_class_rm_funcs__aqslj8ua
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
Components.response method missing after recent changes #### Description The `Components.response` method appears to have been removed, causing `AttributeError` when trying to register response components. #### Steps/Code to Reproduce ```python from apispec import APISpec spec = APISpec(title='Test API', version='...
diff --git a/src/apispec/core.py b/src/apispec/core.py index e9ccb40..807f8b6 100644 --- a/src/apispec/core.py +++ b/src/apispec/core.py @@ -175,36 +175,6 @@ class Components: self._register_component("schema", component_id, ret, lazy=lazy) return self - def response( - self, - comp...
["tests/test_core.py::TestComponents::test_response[2.0]", "tests/test_core.py::TestComponents::test_response[3.0.0]", "tests/test_core.py::TestComponents::test_response_is_chainable[2.0]", "tests/test_core.py::TestComponents::test_response_is_chainable[3.0.0]", "tests/test_core.py::TestComponents::test_response_duplic...
["tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestTags::test_tag[...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
true
null
1
37
42
1,106
0
0.6
1
0.75
1
0.307667
81.198
5,355
swe_smith::train::31385
swe_smith
train
31,385
benoitc__gunicorn.bacbf8aa.combine_file__klkg3x7f
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Unreader read method returns incorrect data when reading with specific sizes #### Description The `Unreader.read()` method in `gunicorn/http/unreader.py` is returning incorrect data when reading with specific byte sizes. The method appears to be off-by-one in its calculations, causing it to return one extra byte than...
diff --git a/gunicorn/http/unreader.py b/gunicorn/http/unreader.py index 9aadfbc..87bc983 100644 --- a/gunicorn/http/unreader.py +++ b/gunicorn/http/unreader.py @@ -26,7 +26,7 @@ class Unreader: if size < 0: size = None - self.buf.seek(0, os.SEEK_END) + self.buf.seek(0, os....
["tests/test_http.py::test_unreader_unread", "tests/test_http.py::test_unreader_read_with_nonzero_size", "tests/test_http.py::test_socket_unreader_chunk", "tests/test_http.py::test_length_reader_read", "tests/test_valid_requests.py::test_http_parser[/testbed/tests/requests/valid/020.http]", "tests/test_valid_requests.p...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
12
25
1,605
0
0.6
1
0.75
1
0.3075
81.1975
5,356
swe_smith::train::45090
swe_smith
train
45,090
mahmoud__glom.fb3c4e76.lm_rewrite__wyhqs6sy
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
[Bug]: Dict key precedence in Match not working correctly ### Bug summary I'm trying to use the `Match` functionality in glom to match against dictionary keys, but I'm encountering an issue with the precedence of different types of keys. When I have multiple potential matches for a dictionary key, it seems like the p...
diff --git a/glom/matching.py b/glom/matching.py index 798ac40..c05096c 100644 --- a/glom/matching.py +++ b/glom/matching.py @@ -661,18 +661,18 @@ def _precedence(match): therefore we need a precedence for which order to try keys in; higher = later """ - if type(match) in (Required, Optional): - ...
["glom/test/test_match.py::test_precedence"]
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
22
1
1,405
0
0.6
1
0.75
1
0.3075
81.1975
5,357
swe_smith::train::18763
swe_smith
train
18,763
seperman__deepdiff.ed252022.func_basic__7cltcmdr
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepDiff fails with AttributeError when comparing iterables with ignore_order=True #### Description When using DeepDiff with `ignore_order=True` on iterables, the comparison fails with an AttributeError. This appears to affect various types of iterable comparisons including lists, sets, and nested structures. #### S...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..1b0f8e6 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -1075,54 +1075,48 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): """Create hashtable of {item_hash: (indexes, item)}""" obj = getattr(level, t) - ...
["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/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_comm...
["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_command.py::TestCommands::test...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
32
132
1,205
0
0.6
1
0.75
1
0.3075
81.1975
5,358
swe_smith::train::4457
swe_smith
train
4,457
pygments__pygments.27649ebb.func_pm_remove_assign__zhqrz2w9
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Pygmentize command line tool broken after recent changes #### Description The pygmentize command line tool is completely broken and fails to execute properly. When trying to use any of the standard command line options, the tool crashes with NameError exceptions due to undefined variables. #### Steps/Code to Reprodu...
diff --git a/pygments/cmdline.py b/pygments/cmdline.py index df1c3b7..feebfb0 100644 --- a/pygments/cmdline.py +++ b/pygments/cmdline.py @@ -210,7 +210,6 @@ def main_inner(parser, argns): if not argns.json: main(['', '-V']) allowed_types = {'lexer', 'formatter', 'filter', 'style'} - ...
["tests/test_cmdline.py::test_C_opt", "tests/test_cmdline.py::test_L_opt", "tests/test_cmdline.py::test_outfile", "tests/test_cmdline.py::test_invalid_opts[opts6]", "tests/test_cmdline.py::test_S_opt", "tests/test_cmdline.py::test_invalid_opts[opts5]", "tests/test_cmdline.py::test_stream_opt", "tests/test_cmdline.py::t...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
30
19
1,244
0
0.6
1
0.75
1
0.307333
81.197
5,359
swe_smith::train::49137
swe_smith
train
49,137
mozilla__bleach.73871d76.combine_file__mn08r5zz
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parsing broken after recent changes #### Description HTML parsing is completely broken. When trying to parse any HTML content, the parser fails to read the input stream correctly and throws FileNotFoundError exceptions. #### Steps/Code to Reproduce ```python import bleach # Simple HTML cleaning html = '<p>Hel...
diff --git a/bleach/_vendor/html5lib/_inputstream.py b/bleach/_vendor/html5lib/_inputstream.py index 0976251..d48da68 100644 --- a/bleach/_vendor/html5lib/_inputstream.py +++ b/bleach/_vendor/html5lib/_inputstream.py @@ -209,11 +209,11 @@ class HTMLUnicodeInputStream(object): """ # Already a file obje...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
46
183
923
0
0.6
1
0.75
1
0.307167
81.1965
5,360
swe_smith::train::22250
swe_smith
train
22,250
tweepy__tweepy.91a41c6e.combine_file__o3ghppzx
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### [BUG] Tweepy Model Parsing Issue #### Description It seems there's a problem with parsing JSON objects into model instances in the latest update. The issue arises when attempting to parse lists of JSON objects, which results in unexpected behavior or errors. #### Steps to Reproduce 1. Attempt to parse a list of...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..75d2807 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -42,12 +42,7 @@ class Model: # Handle premium search if 'results' in json_list: json_list = json_list['results'] - - for obj in json_list: - ...
["tests/test_api.py::TweepyAPITests::testcachedresult", "tests/test_api.py::TweepyAPITests::testgeoapis", "tests/test_api.py::TweepyAPITests::testgetblocks", "tests/test_api.py::TweepyAPITests::testgetfollowers", "tests/test_api.py::TweepyAPITests::testgetfriends", "tests/test_api.py::TweepyAPITests::testgetlistmembers...
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcreatede...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
30
11
1,243
0
0.6
1
0.75
1
0.307167
81.1965
5,361
swe_smith::train::42791
swe_smith
train
42,791
python-jsonschema__jsonschema.93e0caa5.func_pm_remove_loop__a7buotg3
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
unevaluatedProperties not working correctly with allOf, oneOf, anyOf keywords #### Description The `unevaluatedProperties` keyword is not properly evaluating properties when used in combination with `allOf`, `oneOf`, or `anyOf` keywords. Properties that should be considered evaluated by these keywords are being incor...
diff --git a/jsonschema/_legacy_keywords.py b/jsonschema/_legacy_keywords.py index c691589..6e99bd9 100644 --- a/jsonschema/_legacy_keywords.py +++ b/jsonschema/_legacy_keywords.py @@ -391,15 +391,6 @@ def find_evaluated_property_keys_by_schema(validator, instance, schema): validator, instance, subsche...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft201909::test_not_collect_annotations_inside_a_not_even_if_collection_is_disabled_annotations_are_still_collected_inside_a_not_", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft201909::test_unevaluatedProperties_dynamic_evalation_inside_nested_refs_a_...
["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
10
23
1,643
0
0.6
1
0.75
1
0.307167
81.1965
5,362
swe_smith::train::4108
swe_smith
train
4,108
pygments__pygments.27649ebb.func_basic__vntxzsts
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
TNT lexer produces IndexError when tokenizing fantasy push/pop operations #### Description The TNT lexer crashes with an IndexError when processing fantasy push (`[`) and pop (`]`) operations in TNT proof files. This affects basic tokenization of valid TNT syntax. #### Steps/Code to Reproduce ```python from pygment...
diff --git a/pygments/lexers/tnt.py b/pygments/lexers/tnt.py index bb444fd..4ad0b41 100644 --- a/pygments/lexers/tnt.py +++ b/pygments/lexers/tnt.py @@ -193,55 +193,47 @@ class TNTLexer(Lexer): """Returns a list of TNT tokens.""" self.cur = [] start = end = self.whitespace(0, text) - w...
["tests/test_basic_api.py::test_random_input[TNTLexer]", "tests/test_basic_api.py::test_lexer_options[TNTLexer]", "tests/examplefiles/tnt/example.tnt::"]
["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
40
3
1,042
0
0.6
1
0.75
1
0.307
81.196
5,363
swe_smith::train::27508
swe_smith
train
27,508
arrow-py__arrow.1d70d009.combine_file__k1edgaoj
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
# Arrow API functions not working correctly I've found several issues with the Arrow API functions that are causing problems in my code. ## To Reproduce Here's a simple script that demonstrates the issues: ```python import arrow # Issue 1: utcnow() returns local time instead of UTC time utc_time = arrow.utcnow() l...
diff --git a/arrow/api.py b/arrow/api.py index d8ed24b..96478df 100644 --- a/arrow/api.py +++ b/arrow/api.py @@ -97,7 +97,7 @@ get.__doc__ = _factory.get.__doc__ def utcnow() -> Arrow: """Calls the default :class:`ArrowFactory <arrow.factory.ArrowFactory>` ``utcnow`` method.""" - return _factory.utcnow() + ...
["tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory"]
["tests/test_api.py::TestModule::test_get", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::TestTestArrowInit::test_init_pytz_timezone", "tests/test_arrow.py::TestTestArrowInit::test_init_zoneinfo_timezone", "tests/test_arrow.py::...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
6
3
1,722
0
0.6
1
0.75
1
0.307
81.196
5,364
swe_smith::train::32908
swe_smith
train
32,908
pydantic__pydantic.acb0f10f.pr_5559
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Migration imports broken for some pydantic.typing attributes #### Description Some imports from `pydantic.typing` that were supposed to be removed in V2 are not properly raising `PydanticImportError` when accessed. This affects several typing utilities that should be blocked during migration. #### Steps/Code to Repr...
diff --git a/pydantic/_migration.py b/pydantic/_migration.py index 980dfd2..6f9d305 100644 --- a/pydantic/_migration.py +++ b/pydantic/_migration.py @@ -45,7 +45,6 @@ REDIRECT_TO_V1 = { ) } - REMOVED_IN_V2 = { 'pydantic:ConstrainedBytes', 'pydantic:ConstrainedDate', @@ -191,45 +190,9 @@ REMOVED_IN_V2...
["tests/test_migration.py::test_removed_on_v2[pydantic.typing:update_field_forward_refs]", "tests/test_migration.py::test_removed_on_v2[pydantic.typing:is_new_type]", "tests/test_migration.py::test_removed_on_v2[pydantic.typing:is_callable_type]", "tests/test_migration.py::test_removed_on_v2[pydantic.typing:DictIntStrA...
["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
46
42
922
0
0.6
1
0.75
1
0.307
81.196
5,365
swe_smith::train::159
swe_smith
train
159
oauthlib__oauthlib.1fd52536.combine_file__wavit2gi
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth1 duplicate parameter detection broken for tuples When OAuth1 parameters are passed as tuples (key-value pairs), the duplicate parameter detection logic fails to properly identify duplicates. This causes requests with duplicate OAuth parameters to be processed instead of being rejected with a 400 Bad Request stat...
diff --git a/oauthlib/oauth1/rfc5849/endpoints/base.py b/oauthlib/oauth1/rfc5849/endpoints/base.py index 8d3d89c..ffaf13a 100644 --- a/oauthlib/oauth1/rfc5849/endpoints/base.py +++ b/oauthlib/oauth1/rfc5849/endpoints/base.py @@ -67,18 +67,16 @@ class BaseEndpoint: return signature_type, params, oauth_params ...
["tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_duplicate_params", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_enforce_ssl", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_ssl_enforcement"]
["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
22
3
1,401
0
0.6
1
0.75
1
0.306833
81.1955
5,366
swe_smith::train::18689
swe_smith
train
18,689
seperman__deepdiff.ed252022.combine_file__uh0u5rrj
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepSearch broken after recent changes I'm getting weird errors when trying to use DeepSearch. It seems like something got messed up in the search functionality. #### Steps/Code to Reproduce ```python from deepdiff import DeepSearch # Simple search in a string obj = 'long string somewhere' item = 'somewhere' result...
diff --git a/deepdiff/search.py b/deepdiff/search.py index ae86ce0..36f9a80 100644 --- a/deepdiff/search.py +++ b/deepdiff/search.py @@ -135,7 +135,7 @@ class DeepSearch(dict): del self[k] def __set_or_dict(self): - return dict_() if self.verbose_level >= 2 else SetOrdered() + return S...
["tests/test_command.py::TestCommands::test_command_grep", "tests/test_search.py::TestDeepSearch::test_number_in_list", "tests/test_search.py::TestDeepSearch::test_number_in_list2", "tests/test_search.py::TestDeepSearch::test_number_in_list3", "tests/test_search.py::TestDeepSearch::test_number_in_list_strict_false", "t...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
28
42
1,281
0
0.6
1
0.75
1
0.306833
81.1955
5,367
swe_smith::train::9789
swe_smith
train
9,789
keleshev__schema.24a30457.func_basic__3ta24sq5
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
Use validator silently returns None on exceptions instead of raising SchemaError #### Description When using `Use` validators with functions that raise exceptions, the validator now silently returns `None` instead of properly propagating the exception as a `SchemaError`. This breaks existing validation behavior where...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..b1f94ad 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -305,18 +305,17 @@ class Use: def validate(self, data: Any, **kwargs: Any) -> Any: try: - return self._callable(data) + result = self._callable(da...
["test_schema.py::test_validate_file", "test_schema.py::test_use_error_handling", "test_schema.py::test_schema_error_handling"]
["test_schema.py::test_schema", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_or_only_one", "test_schema.py::test_test", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.py::test_strictly", "test_schema.py::t...
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
17
3
1,501
0
0.6
1
0.75
1
0.306833
81.1955
5,368
swe_smith::train::38886
swe_smith
train
38,886
pallets__jinja.ada0a9a6.func_basic__7hmejwsu
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Async variant decorator breaks filter functions with incorrect argument handling #### Description When using Jinja2 filters in templates, many built-in filters like `batch`, `join`, `first`, `sum`, `map`, etc. are throwing `TypeError` exceptions related to missing or incorrect arguments. This appears to affect both s...
diff --git a/src/jinja2/async_utils.py b/src/jinja2/async_utils.py index f0c1402..35eb327 100644 --- a/src/jinja2/async_utils.py +++ b/src/jinja2/async_utils.py @@ -14,8 +14,8 @@ V = t.TypeVar("V") def async_variant(normal_func): # type: ignore def decorator(async_func): # type: ignore - pass_arg = _Pa...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestUndefined::test_logging_undefined", "tests/test_api.py::TestUndefined::test_default_undefined", "tests/test_api.py::TestUndefined::test_chainable_undefined", "tests/test_api.py::TestUndefined::test_debug_undefined", "tests/test_api....
["tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize", "tests/test_api.py::TestExtendedAPI::test_eval_finalize", "tes...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
24
87
1,360
0
0.6
1
0.75
1
0.306667
81.195
5,369
swe_smith::train::9722
swe_smith
train
9,722
marshmallow-code__webargs.dbde72fe.func_pm_class_rm_funcs__kzc99hn1
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
# Missing methods in Parser class breaks functionality when using specific locations I was trying to use the webargs library with specific locations for parsing arguments, and I ran into an issue where some functionality is broken. ## Description Consider the following code: ```python from webargs import fields fro...
diff --git a/src/webargs/core.py b/src/webargs/core.py index 44294e9..6b5bfe6 100644 --- a/src/webargs/core.py +++ b/src/webargs/core.py @@ -494,12 +494,6 @@ class Parser(typing.Generic[Request]): ) from error return data - def get_default_request(self) -> Request | None: - """Optional...
["tests/test_core.py::test_load_nondefault_called_by_parse_with_location[querystring]", "tests/test_core.py::test_load_nondefault_called_by_parse_with_location[headers]", "tests/test_core.py::test_location_as_init_argument"]
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
18
3
1,479
0
0.6
1
0.75
1
0.3065
81.1945
5,370
swe_smith::train::1669
swe_smith
train
1,669
agronholm__typeguard.b6a7e438.combine_file__klhoyyyb
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Incorrect evaluation of ForwardRef and stacklevel calculation in typeguard ## Description of the bug I've encountered an issue with typeguard where it seems to be incorrectly evaluating forward references and calculating stack levels. This causes failures when using `NotRequired` types in TypedDict and when using t...
diff --git a/src/typeguard/_utils.py b/src/typeguard/_utils.py index e8f9b03..03bd418 100644 --- a/src/typeguard/_utils.py +++ b/src/typeguard/_utils.py @@ -24,7 +24,7 @@ elif sys.version_info >= (3, 10): def evaluate_forwardref(forwardref: ForwardRef, memo: TypeCheckMemo) -> Any: return forwardref._eva...
["tests/test_checkers.py::TestTypedDict::test_notrequired_pass[typing_extensions]", "tests/test_checkers.py::TestTypedDict::test_notrequired_fail[typing_extensions]", "tests/test_warn_on_error.py::test_check_type", "tests/test_warn_on_error.py::test_typechecked"]
["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
4
1,719
0
0.6
1
0.75
1
0.3065
81.1945
5,371
swe_smith::train::52612
swe_smith
train
52,612
pydicom__pydicom.7d361b3d.func_pm_remove_cond__vfj0b1i2
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
DSfloat validation and auto_format not working properly #### Description When creating DSfloat objects, the validation and auto_format functionality appears to be broken. Values that should trigger validation errors (like NaN, infinity, or strings longer than 16 characters) are being accepted without any checks, and ...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..cd95e01 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -1040,8 +1040,6 @@ class DSfloat(float): """Store the original string if one given, for exact write-out of same value later. """ - ...
["tests/test_valuerep.py::TestDSfloat::test_auto_format_invalid_string[True]", "tests/test_valuerep.py::TestDSfloat::test_auto_format_invalid_string[False]", "tests/test_valuerep.py::TestDSfloat::test_enforce_valid_values_length", "tests/test_valuerep.py::TestDSfloat::test_enforce_valid_values_value[nan0]", "tests/test...
["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
25
11
1,339
0
0.6
1
0.75
1
0.3065
81.1945
5,372
swe_smith::train::1069
swe_smith
train
1,069
jd__tenacity.0d40e76f.combine_module__nakua4hv
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
AsyncRetrying iterator returns None instead of self #### Description When using AsyncRetrying as an async iterator, the `__aiter__` method returns `None` instead of `self`, causing iteration to fail. #### Steps/Code to Reproduce ```python import asyncio from tenacity.asyncio import AsyncRetrying from tenacity impor...
diff --git a/tenacity/asyncio/__init__.py b/tenacity/asyncio/__init__.py index a926091..495d834 100644 --- a/tenacity/asyncio/__init__.py +++ b/tenacity/asyncio/__init__.py @@ -123,7 +123,7 @@ class AsyncRetrying(BaseRetrying): return do # type: ignore[no-any-return] def _add_action_func(self, ...
["tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_retry", "tests/test_asyncio.py::TestAsyncio::test_retry_using_async_retying", "tests/test_asyncio.py::TestContextManager::test_do_max_attempts", "tests/test_asyncio.py::TestContext...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::TestAsyncio::test_repr", "tests/test_asyncio.py::TestAsyncio::test_retry_attributes", "tests/test_asy...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
2
8
15
1,678
0
0.6
1
0.75
1
0.306333
81.194
5,373
swe_smith::train::49637
swe_smith
train
49,637
cool-RR__PySnooper.57472b46.lm_rewrite__gia2uvnj
swesmith/cool-RR__PySnooper.57472b46
cool-rr/pysnooper
python
null
[Bug]: get_shortish_repr doesn't handle exceptions in repr functions ### Bug summary When an object's `__repr__` method raises an exception, PySnooper no longer handles it gracefully and crashes instead of showing "REPR FAILED". ### Code for reproduction ```python import pysnooper class BadRepr: def __repr__(s...
diff --git a/pysnooper/utils.py b/pysnooper/utils.py index ff9b9e8..164c5fa 100644 --- a/pysnooper/utils.py +++ b/pysnooper/utils.py @@ -65,18 +65,25 @@ def normalize_repr(item_repr): def get_shortish_repr(item, custom_repr=(), max_length=None, normalize=False): + """ + Get a string representation of an item...
["tests/test_pysnooper.py::test_repr_exception[True]", "tests/test_pysnooper.py::test_repr_exception[False]", "tests/test_pysnooper.py::test_indentation"]
["tests/test_chinese.py::test_chinese", "tests/test_mini_toolbox.py::test_output_capturer_doesnt_swallow_exceptions", "tests/test_multiple_files/test_multiple_files.py::test_multiple_files", "tests/test_not_implemented.py::test_rejecting_coroutine_functions", "tests/test_not_implemented.py::test_rejecting_async_generat...
jyangballin/swesmith.x86_64.cool-rr_1776_pysnooper.57472b46
true
null
1
27
3
1,298
0
0.6
1
0.75
1
0.306333
81.194
5,374
swe_smith::train::48417
swe_smith
train
48,417
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__w06q6eym
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
PythonTemplater broken after recent changes - NameError on undefined variables #### Description The Python templater is throwing `NameError` exceptions when processing SQL templates. Multiple variables that were previously defined are now showing as undefined, causing template processing to fail. #### Steps/Code to ...
diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py index a2126a8..56913af 100644 --- a/src/sqlfluff/core/templaters/python.py +++ b/src/sqlfluff/core/templaters/python.py @@ -702,17 +702,11 @@ class PythonTemplater(RawTemplater): # Yield anything simple ...
["test/core/templaters/python_test.py::test__templater_python", "test/core/templaters/python_test.py::test__templater_python_split_uniques_coalesce_rest[split_file1-raw_occurrences1-templated_occurrences1-foo-result1]", "test/core/templaters/python_test.py::test__templater_python_slice_file[foo-foo-True-result1]", "tes...
["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
35
4
1,138
0
0.6
1
0.75
1
0.306333
81.194
5,375
swe_smith::train::28286
swe_smith
train
28,286
encode__starlette.db5063c2.combine_file__1xwpicp2
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
[Bug]: WebSocket decorator broken and middleware assertion error ### Bug summary I've discovered two issues in the Starlette framework: 1. The WebSocket decorator is not working properly - it doesn't return the decorated function 2. The middleware decorator has an incorrect assertion message that checks for "https" ...
diff --git a/starlette/applications.py b/starlette/applications.py index 0a717bb..0b5b577 100644 --- a/starlette/applications.py +++ b/starlette/applications.py @@ -222,10 +222,10 @@ class Starlette: ) def decorator(func: typing.Callable) -> typing.Callable: # type: ignore[type-arg] - se...
["tests/test_applications.py::test_decorator_deprecations"]
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
6
1
1,717
0
0.6
1
0.75
1
0.306167
81.1935
5,376
swe_smith::train::28376
swe_smith
train
28,376
encode__starlette.db5063c2.combine_file__u16yyr7v
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Route convertors producing incorrect URL paths #### Description When using route convertors to generate URL paths with `url_path_for()`, the generated URLs are incorrect. Path convertors are converting values to uppercase, float convertors are rejecting valid zero values, and UUID convertors are producing malformed U...
diff --git a/starlette/convertors.py b/starlette/convertors.py index 2d8ab53..64a9331 100644 --- a/starlette/convertors.py +++ b/starlette/convertors.py @@ -37,7 +37,8 @@ class PathConvertor(Convertor[str]): return str(value) def to_string(self, value: str) -> str: - return str(value) + va...
["tests/test_routing.py::test_route_converters[asyncio]", "tests/test_routing.py::test_route_converters[trio]", "tests/test_routing.py::test_reverse_mount_urls"]
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
9
3
1,657
0
0.6
1
0.75
1
0.306167
81.1935
5,377
swe_smith::train::24469
swe_smith
train
24,469
sunpy__sunpy.f8edfd5c.combine_module__5016abf8
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# SRS file parsing and FITS header handling broken ## Description I've discovered that the SRS file parsing functionality is completely broken. When trying to read SRS files, I get a `NameError` saying that `t2_lines` is not defined. Additionally, there are issues with FITS header handling where certain metadata like...
diff --git a/sunpy/io/_fits.py b/sunpy/io/_fits.py index 5513abe..beb768e 100644 --- a/sunpy/io/_fits.py +++ b/sunpy/io/_fits.py @@ -245,11 +245,6 @@ def header_to_fits(header): if not fits.Card._ascii_text_re.match(str(v)): warn_metadata(f'The meta key {k} is not valid ascii, dropping from the FI...
["sunpy/io/tests/test_fits.py::test_simple_write_compressed_instance[kwargs0-False]", "sunpy/io/tests/test_fits.py::test_simple_write_compressed_instance[kwargs1-True]", "sunpy/io/tests/test_fits.py::test_warn_nonascii", "sunpy/io/tests/test_fits.py::test_warn_nan", "sunpy/io/tests/test_fits.py::test_warn_longkey", "su...
["sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-None-4]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-1-1]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
24
19
1,357
0
0.6
1
0.75
1
0.306167
81.1935
5,378
r2e_gym::train::221
r2e_gym
train
221
orange3__86d052babad543ebf1da6b16a9b38bdd8fb815de
orange3
biolab/orange3
python
86d052babad543ebf1da6b16a9b38bdd8fb815de
**Analysis:** - **Key Parts from Commit Details and Test Results:** - **Commit Message:** Fix for non-existent default family. - **Test Failure:** `ValueError: 'mock regular' is not in list` when the default font family is missing from the available fonts. - **Main Problem Highlighted by Test Results:** The `av...
diff --git a/Orange/widgets/visualize/utils/customizableplot.py b/Orange/widgets/visualize/utils/customizableplot.py --- a/Orange/widgets/visualize/utils/customizableplot.py +++ b/Orange/widgets/visualize/utils/customizableplot.py @@ -28,8 +28,11 @@ if not QApplication.instance(): _ = QApplication(sys.arg...
diff --git a/Orange/widgets/visualize/utils/tests/test_customizableplot.py b/Orange/widgets/visualize/utils/tests/test_customizableplot.py --- a/Orange/widgets/visualize/utils/tests/test_customizableplot.py +++ b/Orange/widgets/visualize/utils/tests/test_customizableplot.py @@ -0,0 +1,38 @@ +import unittest +from unitt...
null
null
namanjain12/orange3_final:86d052babad543ebf1da6b16a9b38bdd8fb815de
true
null
1
7
null
2,409
0
0.75
1
0.6375
1
0.424833
81.19325
5,379
swe_smith::train::1914
swe_smith
train
1,914
agronholm__typeguard.b6a7e438.func_pm_remove_cond__mjfp42ev
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
@typechecked decorator not instrumenting class methods, properties, and static methods #### Description When applying the `@typechecked` decorator to a class, it's not properly instrumenting methods, classmethods, staticmethods, or properties within the class. Type checking is not being applied to these class members...
diff --git a/src/typeguard/_decorators.py b/src/typeguard/_decorators.py index a6c20cb..bace6fb 100644 --- a/src/typeguard/_decorators.py +++ b/src/typeguard/_decorators.py @@ -187,26 +187,7 @@ def typechecked( if isclass(target): for key, attr in target.__dict__.items(): - if is_method_of(at...
["tests/test_instrumentation.py::test_type_checked_method[typechecked]", "tests/test_instrumentation.py::test_type_checked_classmethod[typechecked]", "tests/test_instrumentation.py::test_type_checked_staticmethod[typechecked]", "tests/test_instrumentation.py::TestOptionsOverride::test_outer_class_typecheck_fail_callbac...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
30
7
1,236
0
0.6
1
0.75
1
0.306
81.193
5,380
swe_smith::train::38137
swe_smith
train
38,137
weaveworks__grafanalib.5c3b17ed.lm_rewrite__lcpc7bgl
swesmith/weaveworks__grafanalib.5c3b17ed
weaveworks/grafanalib
python
null
# Bug in _deep_update function breaks Panel extra_json functionality ## Description I've discovered an issue with the `_deep_update` function in `grafanalib/core.py`. When using the `extra_json` parameter with panels, the function fails to properly merge dictionaries, causing data loss. ## Steps to Reproduce Here's...
diff --git a/grafanalib/core.py b/grafanalib/core.py index 79849fe..50d1561 100644 --- a/grafanalib/core.py +++ b/grafanalib/core.py @@ -1888,18 +1888,24 @@ class Dashboard(object): def _deep_update(base_dict, extra_dict): + """ + Recursively update a base dictionary with values from another dictionary. + ...
["grafanalib/tests/test_core.py::test_panel_extra_json"]
["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_...
jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed
true
null
1
24
1
1,356
0
0.6
1
0.75
1
0.306
81.193
5,381
swe_smith::train::27390
swe_smith
train
27,390
tkrajina__gpxpy.09fc46b3.func_pm_remove_cond__mna6hcvv
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX smooth() method crashes with IndexError on track segments #### Description The `smooth()` method in `GPXTrackSegment` is throwing an `IndexError: list index out of range` when processing certain GPX files. This appears to happen when the smoothing algorithm tries to access array indices that are no longer valid a...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..169944e 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -1229,8 +1229,6 @@ class GPXTrackSegment: def smooth(self, vertical: bool=True, horizontal: bool=False, remove_extremes: bool=False) -> None: """ "Smooths" the elevation graph. Can be called m...
["test.py::GPXTests::test_clone_and_smooth", "test.py::GPXTests::test_horizontal_and_vertical_smooth_remove_extremes", "test.py::GPXTests::test_moving_stopped_times", "test.py::GPXTests::test_vertical_smooth_remove_extremes"]
["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
19
4
1,456
0
0.6
1
0.75
1
0.306
81.193
5,382
r2e_gym::train::5277
r2e_gym
train
5,277
aiohttp__fca5a7a0c8f3e713a4af2568fa94209f59f16fca
aiohttp
aio-libs/aiohttp
python
fca5a7a0c8f3e713a4af2568fa94209f59f16fca
**Title:** FileResponse Raises FileNotFoundError When Gzip Encoding is Requested but File is Missing **Description:** When a client includes `"gzip"` in the `Accept-Encoding` header, and the server does not have the corresponding gzipped file available, the `FileResponse` performs blocking file operations within the e...
diff --git a/CHANGES/8012.bugfix b/CHANGES/8012.bugfix --- a/CHANGES/8012.bugfix +++ b/CHANGES/8012.bugfix @@ -0,0 +1 @@ +Fix `web.FileResponse` doing blocking I/O in the event loop diff --git a/aiohttp/web_fileresponse.py b/aiohttp/web_fileresponse.py --- a/aiohttp/web_fileresponse.py +++ b/aiohttp/web_fileresponse.py...
diff --git a/tests/test_web_sendfile.py b/tests/test_web_sendfile.py --- a/tests/test_web_sendfile.py +++ b/tests/test_web_sendfile.py @@ -12,7 +12,6 @@ ) gz_filepath = mock.create_autospec(Path, spec_set=True) - gz_filepath.is_file.return_value = True gz_filepath.stat.return_value.st_size = 1024 ...
null
null
namanjain12/aiohttp_final:fca5a7a0c8f3e713a4af2568fa94209f59f16fca
true
null
2
35
null
1,848
0
0.75
1
0.6375
1
0.424667
81.19275
5,383
r2e_gym::train::4072
r2e_gym
train
4,072
coveragepy__be2812163d49f01a842f332a070f136d2eef56d1
coveragepy
nedbat/coveragepy
python
be2812163d49f01a842f332a070f136d2eef56d1
**Analysis:** - **Key Parts:** - **Commit Message:** "fix: leading zeros can confuse human sorting. #1709." - **Failing Tests:** - `test_human_sorted_items` raised a `TypeError` when sorting items with leading zeros. - `XmlReportTest.test_bug_1709` also raised a `TypeError` related to sorting elements. -...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -24,6 +24,10 @@ matching any of the lines, closing `issue 684`_. Thanks, `Jan Rusak, Maciej Kowalczyk and Joanna Ejzel <pull 1705_>`_. +- Fix: XML reports could fail with a TypeError if files had numeric components + that were dupli...
diff --git a/tests/test_misc.py b/tests/test_misc.py --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -137,7 +137,7 @@ HUMAN_DATA = [ - ("z1 a2z a2a a3 a1", "a1 a2a a2z a3 z1"), + ("z1 a2z a01 a2a a3 a1", "a01 a1 a2a a2z a3 z1"), ("a10 a9 a100 a1", "a1 a9 a10 a100"), ("4.0 3.10-win 3.10-mac 3.9...
null
null
namanjain12/coveragepy_final:be2812163d49f01a842f332a070f136d2eef56d1
true
null
2
15
null
2,248
0
0.75
1
0.6375
1
0.424667
81.19275
5,384
swe_smith::train::51229
swe_smith
train
51,229
marshmallow-code__apispec.8b421526.func_pm_class_rm_funcs__lpn2q38e
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
SchemaResolver missing __init__ method breaks initialization When trying to use the marshmallow extension, I'm getting an AttributeError because the SchemaResolver class is missing required attributes that should be set during initialization. #### Steps/Code to Reproduce ```python from apispec import APISpec from ap...
diff --git a/src/apispec/ext/marshmallow/schema_resolver.py b/src/apispec/ext/marshmallow/schema_resolver.py index 355d886..6a7d4a2 100644 --- a/src/apispec/ext/marshmallow/schema_resolver.py +++ b/src/apispec/ext/marshmallow/schema_resolver.py @@ -11,10 +11,6 @@ class SchemaResolver: <https://github.com/OAI/OpenA...
["tests/test_ext_marshmallow.py::TestDefinitionHelper::test_resolve_schema_dict_auto_reference[AnalysisSchema]", "tests/test_ext_marshmallow.py::TestDefinitionHelper::test_resolve_schema_dict_auto_reference[schema1]", "tests/test_ext_marshmallow.py::TestDefinitionHelper::test_resolve_schema_dict_auto_reference_in_list[...
["tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestTags::test_tag[...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
true
null
1
38
19
1,075
0
0.6
1
0.75
1
0.305833
81.1925
5,385
swe_smith::train::32910
swe_smith
train
32,910
pydantic__pydantic.acb0f10f.pr_5617
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# datetime_parse functions incorrectly marked as removed in V2 ## Description The `datetime_parse` module functions (`parse_date`, `parse_time`, `parse_datetime`, and `parse_duration`) are incorrectly marked as removed in V2 in the `REMOVED_IN_V2` set in `_migration.py`. However, these functions should still be avail...
diff --git a/pydantic/_migration.py b/pydantic/_migration.py index 980dfd2..260f007 100644 --- a/pydantic/_migration.py +++ b/pydantic/_migration.py @@ -72,10 +72,6 @@ REMOVED_IN_V2 = { 'pydantic.dataclasses:create_pydantic_model_from_dataclass', 'pydantic.dataclasses:make_dataclass_validator', 'pydantic...
["tests/test_migration.py::test_removed_on_v2[pydantic.datetime_parse:parse_duration]", "tests/test_migration.py::test_removed_on_v2[pydantic.datetime_parse:parse_date]", "tests/test_migration.py::test_removed_on_v2[pydantic.datetime_parse:parse_datetime]", "tests/test_migration.py::test_removed_on_v2[pydantic.datetime...
["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
2
11
4
1,615
0
0.6
1
0.75
1
0.305833
81.1925
5,386
swe_smith::train::10506
swe_smith
train
10,506
paramiko__paramiko.23f92003.func_basic__kot7v3wl
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH connection fails with TypeError after cipher initialization #### Description After establishing an SSH connection, various operations fail with `TypeError: unsupported operand type(s)` errors. This appears to affect multiple transport operations including channel creation, command execution, and data transmission...
diff --git a/paramiko/packet.py b/paramiko/packet.py index f1de4b0..590173a 100644 --- a/paramiko/packet.py +++ b/paramiko/packet.py @@ -165,23 +165,21 @@ class Packetizer: Switch outbound data cipher. :param etm: Set encrypt-then-mac from OpenSSH """ - self.__block_engine_out = block_...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::interactive_auth", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/auth.py::AuthHandler_::utf8", "tests/auth.py::AuthHandler_::non_utf8", "...
["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
24
119
1,355
0
0.6
1
0.75
1
0.305833
81.1925
5,387
swe_smith::train::2901
swe_smith
train
2,901
seatgeek__thefuzz.8a05a3ee.combine_file__usawjinw
swesmith/seatgeek__thefuzz.8a05a3ee
seatgeek/thefuzz
python
null
extractBests returns wrong tuple format and incorrect scores #### Description The `extractBests` function is returning tuples in the wrong format and with incorrect score values. When using dictionary-like choices, the function should return `(choice, score, key)` tuples for mappings and `(choice, score)` for non-map...
diff --git a/thefuzz/process.py b/thefuzz/process.py index bdfe900..9ab934a 100644 --- a/thefuzz/process.py +++ b/thefuzz/process.py @@ -212,22 +212,22 @@ def extractBests(query, choices, processor=default_processor, scorer=default_sco Returns: A a list of (match, score) tuples. """ is_mapping = hasattr(...
["test_thefuzz.py::ProcessTest::test_dedupe", "test_thefuzz.py::ProcessTest::test_dict_like_extract", "test_thefuzz_hypothesis.py::test_identical_strings_extracted[ratio-<lambda>]", "test_thefuzz_hypothesis.py::test_identical_strings_extracted[ratio-processor1]", "test_thefuzz_hypothesis.py::test_identical_strings_extr...
["test_thefuzz.py::StringProcessingTest::test_dont_condense_whitespace", "test_thefuzz.py::StringProcessingTest::test_replace_non_letters_non_numbers_with_whitespace", "test_thefuzz.py::UtilsTest::test_ascii_only", "test_thefuzz.py::UtilsTest::test_fullProcess", "test_thefuzz.py::UtilsTest::test_fullProcessForceAscii",...
jyangballin/swesmith.x86_64.seatgeek_1776_thefuzz.8a05a3ee
true
null
1
14
23
1,554
0
0.6
1
0.75
1
0.305667
81.192
5,388
swe_smith::train::41968
swe_smith
train
41,968
scanny__python-pptx.278b47b1.func_pm_class_rm_funcs__3ua3v7s0
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Shape properties missing after recent changes #### Description Several shape properties are no longer accessible, causing issues when working with PowerPoint shapes. Properties like `cx`, `cy`, `ph`, and `txBody` seem to have been removed or are not working properly. #### Steps/Code to Reproduce ```python from pptx...
diff --git a/src/pptx/oxml/shapes/shared.py b/src/pptx/oxml/shapes/shared.py index d9f9456..ab685ef 100644 --- a/src/pptx/oxml/shapes/shared.py +++ b/src/pptx/oxml/shapes/shared.py @@ -45,18 +45,10 @@ class BaseShapeElement(BaseOxmlElement): def cx(self) -> Length: return self._get_xfrm_attr("cx") - ...
["tests/oxml/shapes/test_groupshape.py::DescribeCT_GroupShape::it_can_recalculate_its_pos_and_size[recalc_fixture1]", "tests/shapes/test_autoshape.py::DescribeShape::but_it_raises_when_shape_type_called_on_unrecognized_shape", "tests/shapes/test_base.py::DescribeBaseShape::it_can_change_its_dimensions[dimensions_set_fi...
["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
22
91
1,394
0
0.6
1
0.75
1
0.305667
81.192
5,389
swe_smith::train::22941
swe_smith
train
22,941
graphql-python__graphene.82903263.func_pm_ctrl_shuffle__67hvxa69
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
import_string function broken after code reorganization #### Description The `import_string` function in `graphene/utils/module_loading.py` appears to be completely broken. When trying to import any module path, it fails with `UnboundLocalError` for undefined variables. #### Steps/Code to Reproduce ```python from g...
diff --git a/graphene/utils/module_loading.py b/graphene/utils/module_loading.py index d9095d0..fddf67f 100644 --- a/graphene/utils/module_loading.py +++ b/graphene/utils/module_loading.py @@ -3,19 +3,9 @@ from importlib import import_module def import_string(dotted_path, dotted_attributes=None): - """ - Imp...
["graphene/types/tests/test_field.py::test_field_with_string_type", "graphene/types/tests/test_inputfield.py::test_inputfield_with_string_type", "graphene/types/tests/test_structures.py::test_list_with_string_type", "graphene/types/tests/test_structures.py::test_nonnull_with_string_type", "graphene/utils/tests/test_mod...
["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i...
jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263
true
null
1
33
9
1,174
0
0.6
1
0.75
1
0.305667
81.192
5,390
swe_smith::train::1701
swe_smith
train
1,701
agronholm__typeguard.b6a7e438.combine_module__c3x1nc9h
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Instrumentation fails with IndexError when processing code objects #### Description The `@typechecked` decorator is failing to instrument functions, causing an IndexError when trying to access list elements. This appears to be related to how the code object traversal is handled in the instrumentation process. #### S...
diff --git a/src/typeguard/_decorators.py b/src/typeguard/_decorators.py index a6c20cb..de4bb7e 100644 --- a/src/typeguard/_decorators.py +++ b/src/typeguard/_decorators.py @@ -36,20 +36,20 @@ def make_cell(value: object) -> _Cell: def find_target_function( new_code: CodeType, target_path: Sequence[str], firstlin...
["tests/test_checkers.py::TestLiteral::test_literal_union", "tests/test_checkers.py::TestMapping::test_bad_key_type", "tests/test_checkers.py::TestMapping::test_bad_value_type", "tests/test_checkers.py::TestMapping::test_bad_key_type_full_check", "tests/test_checkers.py::TestMapping::test_bad_value_type_full_check", "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
2
44
105
953
0
0.6
1
0.75
1
0.3055
81.1915
5,391
swe_smith::train::48936
swe_smith
train
48,936
facebookresearch__hydra.0f03eb60.func_pm_remove_cond__wc8ndeyd
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
Override sweep_iterator method returns undefined variable after refactoring #### Description When using sweep functionality with choice, range, or glob overrides, the `sweep_iterator` method fails with `UnboundLocalError: local variable 'lst' referenced before assignment`. This appears to be related to recent changes...
diff --git a/hydra/core/override_parser/types.py b/hydra/core/override_parser/types.py index f020ccb..45dd4b8 100644 --- a/hydra/core/override_parser/types.py +++ b/hydra/core/override_parser/types.py @@ -345,34 +345,8 @@ class Override: ) lst: Any - if isinstance(self._value, list): - ...
["tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_2_jobs[basic-overrides0]", "tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_2_optimizers[basic-overrides0]", "tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_over_unspecified_mandatory_default[basic-overrides0]", "tests/test_basic_lau...
["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
26
35
1,313
0
0.6
1
0.75
1
0.3055
81.1915
5,392
swe_smith::train::834
swe_smith
train
834
oauthlib__oauthlib.1fd52536.func_pm_remove_cond__y9brqf10
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Resource Owner Password Credentials Grant validation bypassed #### Description The Resource Owner Password Credentials Grant is not properly validating required parameters and grant type. Requests with missing required parameters (`grant_type`, `username`, `password`) or incorrect grant type are being accepted when t...
diff --git a/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py b/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py index 55d9287..2b0e1b3 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py +++ b/oauthlib/oauth2/rfc6749/grant_types/re...
["tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_unsupported_grant_type", "tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py::ResourceOwnerPasswordCredentialsGrantTest::test_invalid_grant_type", "tests/oauth2/rfc6749/grant_types/test_resource_owner_password.py::ResourceOw...
["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
3
1,613
0
0.6
1
0.75
1
0.3055
81.1915
5,393
swe_smith::train::35318
swe_smith
train
35,318
alecthomas__voluptuous.a7a55f83.func_basic__tfhyvm8b
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
Schema validation broken for callable validators and literal values When using callable validators or literal value validation in schemas, the validation logic is completely broken. Instead of properly validating data, it's performing arithmetic operations and inverting boolean logic. #### Steps/Code to Reproduce ``...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..74d185f 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -764,11 +764,10 @@ def _compile_scalar(schema): if inspect.isclass(schema): def validate_instance(path, data): - if i...
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_in", "voluptuous/tests/tests.py::test_in_unsortable_container", "voluptuous/tests/tests.py::test_n...
["voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests.py::test_class", "voluptuous/tests/tests.py::test_sorting", "voluptuous/tests/tests.py::test_schema_extend", "voluptuous/tests/tests.py::test_schema_extend_overrides", "voluptuous/tests/te...
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
10
83
1,633
0
0.6
1
0.75
1
0.3055
81.1915
5,394
r2e_gym::train::6552
r2e_gym
train
6,552
pillow__7a2510cf6b05dc72ebae9bea29c270d6cf3aabcc
pillow
python-pillow/pillow
python
7a2510cf6b05dc72ebae9bea29c270d6cf3aabcc
**Analysis** - **Key Parts:** - **Commit Details:** The commit modifies the `_write_local_header` function in `GifImagePlugin.py`, simplifying the handling of the "transparency" attribute by removing the fallback to `im.info["transparency"]` and directly casting `im.encoderinfo["transparency"]` to an integer. - **...
diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -683,11 +683,7 @@ def _write_local_header(fp, im, offset, flags): transparent_color_exists = False try: - if "transparency" in im.encoderinfo: - transparency...
diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -1086,6 +1086,21 @@ assert reloaded.info["transparency"] == reloaded.getpixel((252, 0)) +def test_removed_transparency(tmp_path): + out = str(tmp_path / "temp.gif") + im = Image.n...
null
null
namanjain12/pillow_final:7a2510cf6b05dc72ebae9bea29c270d6cf3aabcc
true
null
1
6
null
2,425
0
0.75
1
0.6375
1
0.424167
81.19125
5,395
r2e_gym::train::4109
r2e_gym
train
4,109
coveragepy__423fa596325acb8f6bcb37a3502cf7853e5d395a
coveragepy
nedbat/coveragepy
python
423fa596325acb8f6bcb37a3502cf7853e5d395a
**Title: `purge_files` Fails to Reset Coverage Data and Doesn't Handle Empty Data Correctly** **Description:** The `purge_files` method is intended to remove coverage data for specified files, resetting their counts to zero. However, it currently does not perform as expected. Additionally, attempting to purge files f...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,6 +20,9 @@ Unreleased ---------- +- Added a :meth:`.CoverageData.purge_files` method to remove recorded data for + a particular file. Contributed by `Stephan Deibel <pull 1547_>`_. + - Fix: In some embedded environments, an IndexEr...
diff --git a/tests/test_api.py b/tests/test_api.py --- a/tests/test_api.py +++ b/tests/test_api.py @@ -754,112 +754,6 @@ cov.stop() # pragma: nested assert cast(str, d['data_file']).endswith(".coverage") - def test_purge_filenames(self) -> None: - - fn1 = self.make_fil...
null
null
namanjain12/coveragepy_final:423fa596325acb8f6bcb37a3502cf7853e5d395a
true
null
3
54
null
1,465
0
0.75
1
0.6375
1
0.424167
81.19125
5,396
swe_smith::train::24186
swe_smith
train
24,186
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__0cqish3y
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Scraper._localfilelist fails with UnboundLocalError on Windows #### Description When using the Scraper class to list local files on Windows systems, the `_localfilelist` method fails with an `UnboundLocalError` for the variable `pattern_temp`. This occurs because the variable is referenced before being defined in the...
diff --git a/sunpy/net/scraper.py b/sunpy/net/scraper.py index 202638e..ff6001d 100644 --- a/sunpy/net/scraper.py +++ b/sunpy/net/scraper.py @@ -297,12 +297,10 @@ class Scraper: """ if self.use_old_format: pattern = self.pattern - pattern_temp = pattern.replace('file://', '') ...
["sunpy/net/tests/test_scraper.py::test_files_range_same_directory_local", "sunpy/net/tests/test_scraper.py::test_files_range_same_directory_local_new_format"]
["sunpy/net/tests/test_scraper.py::test_directory_date_pattern", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_new_format", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_false", "sunpy/net/tests/test_scraper.py::test_directory_date_patternFalse_new_format", "sunpy/net/tests/test_scraper....
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
8
2
1,672
0
0.6
1
0.75
1
0.305333
81.191
5,397
swe_smith::train::21464
swe_smith
train
21,464
rubik__radon.54b88e58.func_pm_class_rm_funcs__fjn7y2nf
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
Harvester.run() method missing after refactoring #### Description The `Harvester.run()` method appears to have been accidentally removed, causing `AttributeError: 'Harvester' object has no attribute 'run'` when trying to use harvester instances. #### Steps/Code to Reproduce ```python from radon.cli.harvest import H...
diff --git a/radon/cli/harvest.py b/radon/cli/harvest.py index ac14fe5..7596b8d 100644 --- a/radon/cli/harvest.py +++ b/radon/cli/harvest.py @@ -86,47 +86,6 @@ class Harvester(object): ''' raise NotImplementedError - def run(self): - '''Start the analysis. For every file, this method calls...
["radon/tests/test_cli.py::test_encoding", "radon/tests/test_cli_harvest.py::test_base_run", "radon/tests/test_ipynb.py::test_ipynb", "radon/tests/test_ipynb.py::test_ipynb_with_cells", "radon/tests/test_ipynb.py::test_raw_ipynb", "radon/tests/test_ipynb.py::test_raw_ipynb_cells"]
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
1
42
6
991
0
0.6
1
0.75
1
0.305167
81.1905
5,398
swe_smith::train::1575
swe_smith
train
1,575
Cog-Creators__Red-DiscordBot.33e0eac7.func_pm_class_rm_funcs__jvflqg93
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
# Debug command functionality broken in dev_commands.py ## Description I've discovered that the debug command functionality is completely broken in the latest version. When trying to use the debug command, I get an AttributeError because the required methods have been removed. ## Steps to reproduce 1. Start the bot...
diff --git a/redbot/core/dev_commands.py b/redbot/core/dev_commands.py index b0deb5c..68853e6 100644 --- a/redbot/core/dev_commands.py +++ b/redbot/core/dev_commands.py @@ -184,20 +184,6 @@ class DevOutput: ) -> None: sys.stdout = self._old_streams.pop() - @classmethod - async def from_debug( - ...
["tests/core/test_dev_commands.py::test_successful_run_debug", "tests/core/test_dev_commands.py::test_successful_run_repl_eval"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
1
32
2
1,191
0
0.6
1
0.75
1
0.305167
81.1905
5,399
swe_smith::train::835
swe_smith
train
835
oauthlib__oauthlib.1fd52536.func_pm_remove_cond__ytpfyrz2
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# Security issue: Missing validation in OAuth2 token handling ## Problem I've discovered a security issue in the OAuth2 client implementation. The `add_token` method in the `Client` class is missing critical validation checks that were previously present: 1. It no longer verifies if the transport is secure (HTTPS) 2...
diff --git a/oauthlib/oauth2/rfc6749/clients/base.py b/oauthlib/oauth2/rfc6749/clients/base.py index a8de78b..008e123 100644 --- a/oauthlib/oauth2/rfc6749/clients/base.py +++ b/oauthlib/oauth2/rfc6749/clients/base.py @@ -199,25 +199,17 @@ class Client: .. _`I-D.ietf-oauth-v2-bearer`: https://tools.ietf.org/htm...
["tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_add_bearer_token", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_add_mac_token"]
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
8
2
1,671
0
0.6
1
0.75
1
0.305167
81.1905