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,600
swe_smith::train::51071
swe_smith
train
51,071
marshmallow-code__apispec.8b421526.combine_file__ukmznjln
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
Schema conversion returns incorrect structure after RegistryError #### Description When converting schemas with the Marshmallow extension, if a RegistryError occurs during schema resolution, the converter now returns an unexpected structure instead of the original schema string reference. #### Steps/Code to Reproduc...
diff --git a/src/apispec/ext/marshmallow/openapi.py b/src/apispec/ext/marshmallow/openapi.py index a114e26..de7fbd2 100644 --- a/src/apispec/ext/marshmallow/openapi.py +++ b/src/apispec/ext/marshmallow/openapi.py @@ -110,10 +110,8 @@ class OpenAPIConverter(FieldConverterMixin): """ try: s...
["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
24
139
1,289
0
0.6
1
0.75
1
0.294833
81.1595
5,601
swe_smith::train::12366
swe_smith
train
12,366
lepture__mistune.bf54ef67.func_basic__e62nbpx2
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
# Table of Contents (TOC) directive accepts non-integer values for level options ## Description I've noticed that the TOC directive in mistune is now accepting non-integer values for level options, which seems to be a change in behavior. This affects both the RST-style TOC directive and the fenced code TOC directive....
diff --git a/src/mistune/directives/toc.py b/src/mistune/directives/toc.py index 45a13d7..4e60b6c 100644 --- a/src/mistune/directives/toc.py +++ b/src/mistune/directives/toc.py @@ -106,10 +106,10 @@ def render_html_toc( def _normalize_level(options: Dict[str, Any], name: str, default: Any) -> Any: - level = opt...
["tests/test_directives.py::TestDirective_rst_toc::test_invalid_option_001", "tests/test_directives.py::TestDirective_fenced_toc::test_invalid_option_001"]
["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx...
jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67
true
null
1
8
2
1,609
0
0.6
1
0.75
1
0.294833
81.1595
5,602
swe_smith::train::19716
swe_smith
train
19,716
kurtmckee__feedparser.cad965a3.combine_module__c52um87s
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
Date parsing functions broken due to code reorganization #### Description The date parsing functions in feedparser are failing to parse dates correctly. When trying to parse dates in various formats, the functions are throwing `UnboundLocalError` or returning incorrect results. #### Steps/Code to Reproduce ```pytho...
diff --git a/feedparser/datetimes/perforce.py b/feedparser/datetimes/perforce.py index a613dec..44108fc 100644 --- a/feedparser/datetimes/perforce.py +++ b/feedparser/datetimes/perforce.py @@ -31,16 +31,17 @@ import time def _parse_date_perforce(date_string): - """parse a date in yyyy/mm/dd hh:mm:ss TTT format"...
["tests/test_well_formed.py::test_loose_parser[info61]", "tests/test_well_formed.py::test_strict_parser[info61]", "tests/test_well_formed.py::test_strict_parser[info69]", "tests/test_well_formed.py::test_loose_parser[info69]", "tests/test_ill_formed.py::test_http_conditions[info0]", "tests/test_date_parsers.py::test_da...
["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
2
29
13
1,189
0
0.6
1
0.75
1
0.294833
81.1595
5,603
swe_smith::train::26184
swe_smith
train
26,184
pylint-dev__astroid.b114f6b5.func_pm_class_rm_funcs__52zh7ra7
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
BinOp missing type_errors and op_precedence methods after refactoring #### Description After some recent changes, the `BinOp` class is missing the `type_errors()` and `op_precedence()` methods that were previously available. This breaks functionality that depends on these methods for binary operation analysis. #### ...
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index fde3239..bf45efe 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -1499,34 +1499,10 @@ class BinOp(_base_nodes.OperatorNode): self.left = left self.right = right - def type_errors( - ...
["tests/test_inference.py::InferenceTest::test_binary_op_type_errors", "tests/test_inference.py::InferenceTest::test_binary_type_errors_partially_uninferable", "tests/test_nodes.py::AsStringTest::test_as_string_for_list_containing_uninferable", "tests/test_nodes.py::AsStringTest::test_f_strings", "tests/test_nodes.py::...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
25
7
1,268
0
0.6
1
0.75
1
0.294667
81.159
5,604
swe_smith::train::24596
swe_smith
train
24,596
marshmallow-code__marshmallow.9716fc62.combine_module__kwry0c6c
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
OneOf validator behavior inverted - validates when value is in choices #### Description The OneOf validator is behaving incorrectly - it's raising ValidationError when the value IS in the choices list, instead of when it's NOT in the choices list. Additionally, it's returning None instead of the validated value. ###...
diff --git a/src/marshmallow/decorators.py b/src/marshmallow/decorators.py index 965edb6..2c15aea 100644 --- a/src/marshmallow/decorators.py +++ b/src/marshmallow/decorators.py @@ -119,9 +119,9 @@ def validates_schema( return set_hook( fn, VALIDATES_SCHEMA, - many=pass_many, - pass_...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
["tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_invalid_data", "tests/test_decorators.py::test_decorator_post_dump_with_nested_original_and_pass_many[data0-expected_data0-expected_original_data0]", "tests/test_decorators.py::test_decorator_post_load_with_nested_original_and_pass_man...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
2
21
48
1,348
0
0.6
1
0.75
1
0.294667
81.159
5,605
swe_smith::train::935
swe_smith
train
935
oauthlib__oauthlib.1fd52536.pr_876
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# Issue with `create_code_verifier` in OAuth2 Client The `create_code_verifier` method in the OAuth2 Client class is not generating valid code verifiers according to the PKCE specification. When trying to use the PKCE flow with the client, the code verifier generation fails validation: ```python from oauthlib.oauth2...
diff --git a/oauthlib/oauth2/rfc6749/clients/base.py b/oauthlib/oauth2/rfc6749/clients/base.py index a8de78b..7722f14 100644 --- a/oauthlib/oauth2/rfc6749/clients/base.py +++ b/oauthlib/oauth2/rfc6749/clients/base.py @@ -12,7 +12,7 @@ import re import time import warnings -from oauthlib.common import UNICODE_ASCII_...
["tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_create_code_challenge_plain", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_create_code_challenge_s256", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_create_code_verifier_length", "tests/oauth2/rfc6749/clients/test_base.py::Cli...
["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
7
5
1,627
0
0.6
1
0.75
1
0.2945
81.1585
5,606
swe_smith::train::10181
swe_smith
train
10,181
paramiko__paramiko.23f92003.combine_file__sfcldnfo
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH connection failures with Curve25519 key exchange #### Description SSH connections using Curve25519 key exchange are failing with various errors including EOFError and authentication issues. The connection attempts seem to be dropping unexpectedly during the key exchange process. #### Steps/Code to Reproduce ```...
diff --git a/paramiko/kex_curve25519.py b/paramiko/kex_curve25519.py index 20c23e4..957e5a5 100644 --- a/paramiko/kex_curve25519.py +++ b/paramiko/kex_curve25519.py @@ -70,33 +70,31 @@ class KexCurve25519: peer_key_bytes = m.get_string() peer_key = X25519PublicKey.from_public_bytes(peer_key_bytes) ...
["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
29
122
1,187
0
0.6
1
0.75
1
0.2945
81.1585
5,607
swe_smith::train::18188
swe_smith
train
18,188
msiemens__tinydb.10644a0e.combine_file__g9j3no9b
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
JSONStorage fails to create parent directories and corrupts existing files #### Description When using JSONStorage with `create_dirs=True`, the storage fails to create parent directories when they don't exist. Additionally, opening an existing database file in write mode truncates the file content, causing data loss....
diff --git a/tinydb/storages.py b/tinydb/storages.py index d5a2db7..63f04c9 100644 --- a/tinydb/storages.py +++ b/tinydb/storages.py @@ -16,20 +16,20 @@ __all__ = ('Storage', 'JSONStorage', 'MemoryStorage') def touch(path: str, create_dirs: bool): """ Create a file if it doesn't exist yet. - + :para...
["tests/test_middlewares.py::test_caching_json_write", "tests/test_storages.py::test_create_dirs", "tests/test_storages.py::test_encoding", "tests/test_tinydb.py::test_unique_ids", "tests/test_tinydb.py::test_lastid_after_open", "tests/test_tinydb.py::test_insert_on_existing_db"]
["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
11
6
1,546
0
0.6
1
0.75
1
0.294333
81.158
5,608
swe_smith::train::31822
swe_smith
train
31,822
davidhalter__parso.338a5760.combine_module__4kwy7gm5
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
NameError in diff parser after recent changes #### Description After some recent changes to the diff parser, I'm getting `NameError: name 'actual' is not defined` when trying to parse Python code. This seems to be affecting the `_assert_valid_graph` function in the diff module. #### Steps/Code to Reproduce ```pytho...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..a52503f 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -81,12 +81,6 @@ def _assert_valid_graph(node): try: children = node.children except AttributeError: - # Ignore INDENT is necessary, because indent/ded...
["test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_one_statement_func", "test/test_diff_parser.py::test_for_on_one_line", "test/test_diff_pa...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
2
41
110
945
0
0.6
1
0.75
1
0.294167
81.1575
5,609
swe_smith::train::46580
swe_smith
train
46,580
python-trio__trio.cfbbe2c1.combine_file__6mw2mwan
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Thread naming functions broken on Linux systems #### Description Thread naming functionality appears to be completely broken, causing widespread failures across the codebase. When trying to use any thread-related operations, getting `TypeError: this function takes at least 2 arguments` errors. #### Steps/Code to Rep...
diff --git a/src/trio/_core/_thread_cache.py b/src/trio/_core/_thread_cache.py index 189d5a5..9090401 100644 --- a/src/trio/_core/_thread_cache.py +++ b/src/trio/_core/_thread_cache.py @@ -18,8 +18,7 @@ RetT = TypeVar("RetT") def _to_os_thread_name(name: str) -> bytes: - # ctypes handles the trailing \00 - r...
["src/trio/_core/_tests/test_guest_mode.py::test_host_can_directly_wake_trio_task", "src/trio/_core/_tests/test_guest_mode.py::test_host_altering_deadlines_wakes_trio_up", "src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_sniffio_integration", "src/trio/_core/_tests/test_guest_mode.py::test_host_wakeup_doesnt_...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
40
122
965
0
0.6
1
0.75
1
0.294167
81.1575
5,610
swe_smith::train::32094
swe_smith
train
32,094
davidhalter__parso.338a5760.func_basic__z2z00tjh
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Error detection broken for syntax errors and indentation issues #### Description The error detection system is producing incorrect results when parsing Python code with syntax errors and indentation problems. Error messages are being inverted or completely wrong, and some errors that should be detected are being miss...
diff --git a/parso/python/errors.py b/parso/python/errors.py index 09c5047..cbd36ca 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -434,25 +434,22 @@ class ErrorFinder(Normalizer): def visit_leaf(self, leaf): if leaf.type == 'error_leaf': if leaf.token_type in ('INDENT', ...
["test/test_file_python_errors.py::test_on_itself[3.6]", "test/test_file_python_errors.py::test_on_itself[3.7]", "test/test_file_python_errors.py::test_on_itself[3.8]", "test/test_file_python_errors.py::test_on_itself[3.9]", "test/test_file_python_errors.py::test_on_itself[3.10]", "test/test_normalizer_issues_files.py:...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
26
56
1,245
0
0.6
1
0.75
1
0.294167
81.1575
5,611
swe_smith::train::52508
swe_smith
train
52,508
pydicom__pydicom.7d361b3d.func_pm_remove_assign__nwc102d9
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
JPEG parameter parsing fails with KeyError for 'components' #### Description When parsing JPEG and JPEG-LS codestreams, the `_get_jpg_parameters` function throws a KeyError for the 'components' key. This affects both regular JPEG files and JPEG-LS files with various interleave modes. #### Steps/Code to Reproduce ``...
diff --git a/src/pydicom/pixels/utils.py b/src/pydicom/pixels/utils.py index f9a31a8..2084956 100644 --- a/src/pydicom/pixels/utils.py +++ b/src/pydicom/pixels/utils.py @@ -952,11 +952,6 @@ def _get_jpg_parameters(src: bytes) -> dict[str, Any]: # or non-conformant (JFIF or SPIFF header) if src[0:2] ...
["tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_no_app", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_app", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_component_ids", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jls_ilv0", "tests/pixels/test_utils.py::TestGetJpgPa...
["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
26
7
1,244
0
0.6
1
0.75
1
0.294
81.157
5,612
swe_smith::train::32413
swe_smith
train
32,413
pydantic__pydantic.acb0f10f.combine_module__9u6a9o6l
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
V1 model validation broken after recent changes #### Description V1 models are failing validation with a `NameError` when trying to validate fields. The error occurs because `get_validators` is not defined in the scope where it's being used. #### Steps/Code to Reproduce ```python from pydantic.v1 import BaseModel ...
diff --git a/pydantic/v1/fields.py b/pydantic/v1/fields.py index 002b60c..564491b 100644 --- a/pydantic/v1/fields.py +++ b/pydantic/v1/fields.py @@ -823,7 +823,6 @@ class ModelField(Representation): class_validators_ = self.class_validators.values() if not self.sub_fields or self.shape == SHAPE_GENE...
["tests/test_docs.py::test_docs_examples[docs/migration.md:191-216]", "tests/test_docs.py::test_docs_examples[docs/migration.md:221-254]", "tests/test_main.py::test_nested_v1_model_warns", "tests/test_v1.py::test_root_validator", "tests/test_v1.py::test_isinstance_does_not_raise_deprecation_warnings"]
["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
48
5
804
0
0.6
1
0.75
1
0.294
81.157
5,613
swe_smith::train::49375
swe_smith
train
49,375
mozilla__bleach.73871d76.func_basic__z06lm9go
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parser reset method breaks linkification functionality #### Description After recent changes, the HTML parser's reset method is causing linkification to fail with IndexError exceptions. The parser appears to be initializing with incorrect default values that break the parsing state machine. #### Steps/Code to R...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..b90d466 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -137,37 +137,35 @@ class HTMLParser(object): def reset(self): self.tree.reset() - ...
["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
34
183
1,083
0
0.6
1
0.75
1
0.293833
81.1565
5,614
swe_smith::train::45176
swe_smith
train
45,176
modin-project__modin.8c7799fd.lm_rewrite__29tgivpc
swesmith/modin-project__modin.8c7799fd
modin-project/modin
python
null
ravel() function in modin.numpy fails with AttributeError The ravel() function in modin.numpy fails when trying to flatten arrays. The function attempts to call a method that doesn't exist. --- Problem: When using modin.numpy.ravel() to flatten arrays, it fails with an AttributeError. Versions: - Python: 3.10.16 - ...
diff --git a/modin/numpy/array_shaping.py b/modin/numpy/array_shaping.py index e96acf5..e6f566e 100644 --- a/modin/numpy/array_shaping.py +++ b/modin/numpy/array_shaping.py @@ -21,17 +21,41 @@ from .arr import array from .utils import try_convert_from_interoperable_type -def ravel(a, order="C"): +def ravel(a, orde...
["modin/tests/numpy/test_array_shaping.py::test_ravel[100]", "modin/tests/numpy/test_array_shaping.py::test_ravel[operand_shape1]", "modin/tests/numpy/test_array_shaping.py::test_ravel[operand_shape2]"]
["modin/tests/numpy/test_array_shaping.py::test_shape[100]", "modin/tests/numpy/test_array_shaping.py::test_shape[operand_shape1]", "modin/tests/numpy/test_array_shaping.py::test_shape[operand_shape2]", "modin/tests/numpy/test_array_shaping.py::test_transpose[100]", "modin/tests/numpy/test_array_shaping.py::test_transp...
jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd
true
null
1
38
3
1,003
0
0.6
1
0.75
1
0.293833
81.1565
5,615
swe_smith::train::29189
swe_smith
train
29,189
tox-dev__pipdeptree.c31b6418.func_pm_op_change__s0ac2pvo
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
# pipdeptree text rendering broken with Unicode characters I'm using pipdeptree to visualize my package dependencies, but I've noticed that the text rendering is broken when using Unicode characters. ## Reproduction I have a simple dependency tree with several packages. When I try to render it with Unicode character...
diff --git a/src/pipdeptree/_render/text.py b/src/pipdeptree/_render/text.py index efa5a02..6a7eed3 100644 --- a/src/pipdeptree/_render/text.py +++ b/src/pipdeptree/_render/text.py @@ -50,8 +50,8 @@ def _render_text_with_unicode( use_bullets = not frozen def aux( # noqa: PLR0913, PLR0917 - node: Dis...
["tests/render/test_text.py::test_render_text[True-False-True-expected_output0]", "tests/render/test_text.py::test_render_text[True-True-True-expected_output1]", "tests/render/test_text.py::test_render_text[False-False-True-expected_output2]", "tests/render/test_text.py::test_render_text[False-True-True-expected_output...
["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack...
jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418
true
null
1
9
7
1,583
0
0.6
1
0.75
1
0.293833
81.1565
5,616
swe_smith::train::27808
swe_smith
train
27,808
arrow-py__arrow.1d70d009.lm_rewrite__fhottuh6
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
[Bug]: get_locale_by_class_name doesn't find locale classes correctly ### Bug summary The `get_locale_by_class_name` function in `arrow/locales.py` doesn't correctly find locale classes by name. It's now searching through `_locale_map.values()` instead of using `globals()` to find the class, which causes issues when ...
diff --git a/arrow/locales.py b/arrow/locales.py index 63b2d48..4dbb3f3 100644 --- a/arrow/locales.py +++ b/arrow/locales.py @@ -60,20 +60,18 @@ def get_locale(name: str) -> "Locale": return locale_cls() -def get_locale_by_class_name(name: str) -> "Locale": +def get_locale_by_class_name(name: str) -> 'Locale':...
["tests/test_locales.py::TestModule::test_get_locale_by_class_name"]
["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
14
1
1,483
0
0.6
1
0.75
1
0.293833
81.1565
5,617
swe_smith::train::48105
swe_smith
train
48,105
sqlfluff__sqlfluff.50a1c4b6.func_pm_class_rm_funcs__fjhrspk9
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Lexer class missing __init__ method causes TypeError #### Description The Lexer class is missing its `__init__` method, causing a TypeError when trying to instantiate it. #### Steps/Code to Reproduce ```python from sqlfluff.core.parser.lexer import Lexer from sqlfluff.core import FluffConfig # Try to create a Lexe...
diff --git a/src/sqlfluff/core/parser/lexer.py b/src/sqlfluff/core/parser/lexer.py index 1fbf312..a73083b 100644 --- a/src/sqlfluff/core/parser/lexer.py +++ b/src/sqlfluff/core/parser/lexer.py @@ -725,27 +725,6 @@ def _iter_segments( class Lexer: """The Lexer class actually does the lexing step.""" - def __i...
["test/core/parser/lexer_test.py::test__parser__lexer_obj[b.c-res1]", "test/core/parser/lexer_test.py::test__parser__lexer_obj[*-+bd/-res8]", "test/core/parser/lexer_test.py::test__parser__lexer_fail", "test/core/parser/lexer_test.py::test__parser__lexer_fail_via_parse"]
["test/core/parser/lexer_test.py::test__parser__lexer_string[.fsaljk-.]", "test/core/parser/lexer_test.py::test__parser__lexer_string[fsaljk-None]", "test/core/parser/lexer_test.py::test__parser__lexer_regex[fsaljk-f-f0]", "test/core/parser/lexer_test.py::test__parser__lexer_regex[fsaljk-f-f1]", "test/core/parser/lexer...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
47
4
821
0
0.6
1
0.75
1
0.2935
81.1555
5,618
swe_smith::train::18033
swe_smith
train
18,033
pyasn1__pyasn1.0f07d724.lm_rewrite__8zrh0v8o
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
### Issue: Inconsistent Tag Matching in Sequence and SequenceOf Types #### Description It seems that there is an inconsistency in how tags are matched within `Sequence` and `SequenceOf` types when strict constraints are enabled. The issue arises when attempting to set a component with a specific tag, which should not ...
diff --git a/pyasn1/type/base.py b/pyasn1/type/base.py index aa86e52..cabf97f 100644 --- a/pyasn1/type/base.py +++ b/pyasn1/type/base.py @@ -104,10 +104,16 @@ class Asn1Type(Asn1Item): :obj:`True` if *other* is |ASN.1| type, :obj:`False` otherwise. """ - return (self is other o...
["tests/codec/ber/test_decoder.py::NonStreamingCompatibilityTestCase::testPartialDecodeWithCustomSubstrateFun", "tests/codec/ber/test_decoder.py::NonStreamingCompatibilityTestCase::testPartialDecodeWithDefaultSubstrateFun", "tests/type/test_univ.py::SequenceOf::testComponentConstraintsMatching", "tests/type/test_univ.p...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
12
6
1,521
0
0.6
1
0.75
1
0.2935
81.1555
5,619
swe_smith::train::21833
swe_smith
train
21,833
life4__textdistance.c3aca916.combine_module__fubjf8bo
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Token-based distance algorithms returning incorrect results #### Description Several token-based distance algorithms are producing unexpected results. When calculating distances between strings, many algorithms are returning 0 when they should return non-zero values, or returning incorrect similarity scores. #### St...
diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py index 5ce8cc7..3dcdb2f 100644 --- a/textdistance/algorithms/base.py +++ b/textdistance/algorithms/base.py @@ -139,9 +139,9 @@ class Base: return [Counter(s) for s in self._get_sequences(*sequences)] def _intersect_counters(se...
["tests/test_common.py::test_normalization_range[alg11]", "tests/test_common.py::test_normalization_range[alg12]", "tests/test_common.py::test_normalization_range[alg13]", "tests/test_common.py::test_normalization_range[alg14]", "tests/test_common.py::test_normalization_by_one[alg12]", "tests/test_common.py::test_norma...
["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
2
12
28
1,520
0
0.6
1
0.75
1
0.293333
81.155
5,620
swe_smith::train::43310
swe_smith
train
43,310
theskumar__python-dotenv.2b8635b7.combine_file__s4gc8cf4
swesmith/theskumar__python-dotenv.2b8635b7
theskumar/python-dotenv
python
null
get_cli_string() function swaps -f and -q parameters and breaks IPython extension Description I found a bug in the `get_cli_string()` function where it's swapping the `-f` and `-q` parameters, and also in the `load_ipython_extension()` function where it's passing a string instead of the ipython object. Here's a simp...
diff --git a/src/dotenv/__init__.py b/src/dotenv/__init__.py index 7f4c631..2f5a03c 100644 --- a/src/dotenv/__init__.py +++ b/src/dotenv/__init__.py @@ -5,8 +5,8 @@ from .main import (dotenv_values, find_dotenv, get_key, load_dotenv, set_key, def load_ipython_extension(ipython: Any) -> None: - from .ipython imp...
["tests/test_ipython.py::test_ipython_existing_variable_no_override", "tests/test_ipython.py::test_ipython_existing_variable_override", "tests/test_ipython.py::test_ipython_new_variable", "tests/test_utils.py::test_to_cli_string"]
["tests/test_cli.py::test_list[shell-x='a\\nb\\nc'-x='a\\nb\\nc'\\n]", "tests/test_cli.py::test_list_non_existent_file", "tests/test_cli.py::test_list_not_a_file", "tests/test_cli.py::test_list_no_file", "tests/test_cli.py::test_get_existing_value", "tests/test_cli.py::test_get_non_existent_value", "tests/test_cli.py::...
jyangballin/swesmith.x86_64.theskumar_1776_python-dotenv.2b8635b7
true
null
1
24
4
1,280
0
0.6
1
0.75
1
0.293333
81.155
5,621
swe_smith::train::24846
swe_smith
train
24,846
marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_shuffle__2sbnaaoz
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Accessing deprecated version attributes raises AttributeError instead of showing deprecation warning #### Description When trying to access deprecated version attributes like `__version__`, `__parsed_version__`, or `__version_info__` from the marshmallow module, an `AttributeError` is raised immediately instead of sh...
diff --git a/src/marshmallow/__init__.py b/src/marshmallow/__init__.py index be32c09..fa01ccf 100644 --- a/src/marshmallow/__init__.py +++ b/src/marshmallow/__init__.py @@ -21,17 +21,24 @@ from . import fields def __getattr__(name: str) -> typing.Any: - import warnings - if name == "__version__": + rais...
["tests/test_version_attributes.py::test_version_attributes_deprecated"]
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
35
1
1,059
0
0.6
1
0.75
1
0.293167
81.1545
5,622
swe_smith::train::29257
swe_smith
train
29,257
tox-dev__pipdeptree.c31b6418.pr_215
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
### Bug Report: Indentation Error in `get_parser` Function **Describe the bug** There seems to be an indentation error in the `get_parser` function within the `pipdeptree` module. This error is causing an `IndentationError` when attempting to execute the code, which prevents the module from functioning as expected. ...
diff --git a/src/pipdeptree/__init__.py b/src/pipdeptree/__init__.py index e69de29..0581b1d 100644 --- a/src/pipdeptree/__init__.py +++ b/src/pipdeptree/__init__.py @@ -0,0 +1,34 @@ +import argparse +import inspect +import json +import os + +def filter(self, include, exclude): + m = {} + seen = set() + ...
["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
34
125
1,078
0
0.6
1
0.75
1
0.293
81.154
5,623
swe_smith::train::33580
swe_smith
train
33,580
pallets__click.fde47b4b.func_basic__af35b4da
swesmith/pallets__click.fde47b4b
pallets/click
python
null
echo_via_pager fails with FileNotFoundError when PAGER contains shell command #### Description When using `click.echo_via_pager()` with a PAGER environment variable that contains a shell command (like `cat > /tmp/output.txt`), the function raises a `FileNotFoundError` instead of executing the command properly. #### ...
diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py index a6c7e6b..26f6f26 100644 --- a/src/click/_termui_impl.py +++ b/src/click/_termui_impl.py @@ -400,65 +400,44 @@ def pager(generator: cabc.Iterable[str], color: bool | None = None) -> None: def _pipepager(generator: cabc.Iterable[str], cmd: str,...
["tests/test_utils.py::test_echo_via_pager[test0]", "tests/test_utils.py::test_echo_via_pager[test1]", "tests/test_utils.py::test_echo_via_pager[test2]", "tests/test_utils.py::test_echo_via_pager[test3]", "tests/test_utils.py::test_echo_via_pager[test4]", "tests/test_utils.py::test_echo_via_pager[test5]", "tests/test_u...
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
1
33
10
1,098
0
0.6
1
0.75
1
0.293
81.154
5,624
swe_smith::train::9781
swe_smith
train
9,781
marshmallow-code__webargs.dbde72fe.pr_974
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
# BottleParser doesn't handle invalid JSON properly I noticed that when sending invalid JSON to a Bottle application using webargs, the application crashes instead of handling the error gracefully. ## Description The BottleParser class in `bottleparser.py` seems to be missing error handling for invalid JSON. When a ...
diff --git a/src/webargs/bottleparser.py b/src/webargs/bottleparser.py index a2bf7af..a92332e 100644 --- a/src/webargs/bottleparser.py +++ b/src/webargs/bottleparser.py @@ -37,11 +37,6 @@ class BottleParser(core.Parser[bottle.Request]): data = req.json except AttributeError: return co...
["tests/test_bottleparser.py::TestBottleParser::test_parse_json_with_nonutf8_chars", "tests/test_bottleparser.py::TestBottleParser::test_invalid_json"]
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
7
2
1,618
0
0.6
1
0.75
1
0.293
81.154
5,625
swe_smith::train::9070
swe_smith
train
9,070
pyupio__safety.7654596b.lm_rewrite__nk6gq7vy
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
[Bug]: TypeError exception not handled in read_vulnerabilities function ### Bug summary I've discovered an issue with the `read_vulnerabilities` function in the safety package. The function no longer handles `TypeError` exceptions that can occur when processing vulnerability data. ### Steps to reproduce ```python i...
diff --git a/safety/safety.py b/safety/safety.py index 7bb6ad7..df82728 100644 --- a/safety/safety.py +++ b/safety/safety.py @@ -1620,14 +1620,10 @@ def read_vulnerabilities(fh: Any) -> Dict[str, Any]: Dict[str, Any]: The vulnerabilities data. """ try: - data = json.load(fh) + return js...
["tests/test_safety.py::TestSafety::test_read_vulnerabilities_type_error"]
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
10
1
1,558
0
0.6
1
0.75
1
0.293
81.154
5,626
swe_smith::train::47413
swe_smith
train
47,413
sqlfluff__sqlfluff.50a1c4b6.combine_file__er67ywyx
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Simple API fix function broken after recent changes #### Description The `sqlfluff.fix()` function is throwing `UnboundLocalError` when trying to fix SQL strings. It seems like there's an issue with variable scoping in the fix function. #### Steps/Code to Reproduce ```python import sqlfluff # Basic fix operation f...
diff --git a/src/sqlfluff/api/simple.py b/src/sqlfluff/api/simple.py index 1d91187..289f99b 100644 --- a/src/sqlfluff/api/simple.py +++ b/src/sqlfluff/api/simple.py @@ -32,7 +32,7 @@ def get_simple_config( overrides["dialect"] = dialect if rules is not None: - overrides["rules"] = ",".join(rules)...
["test/api/simple_test.py::test__api__lint_string_specific", "test/api/simple_test.py::test__api__lint_string_specific_single", "test/api/simple_test.py::test__api__fix_string", "test/api/simple_test.py::test__api__fix_string_specific", "test/api/simple_test.py::test__api__fix_string_specific_exclude", "test/api/simple...
["test/api/simple_test.py::test__api__lint_string_without_violations", "test/api/simple_test.py::test__api__lint_string", "test/api/simple_test.py::test__api__lint_string_specific_exclude", "test/api/simple_test.py::test__api__lint_string_specific_exclude_single", "test/api/simple_test.py::test__api__lint_string_specif...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
43
8
898
0
0.6
1
0.75
1
0.293
81.154
5,627
swe_smith::train::35820
swe_smith
train
35,820
stanfordnlp__dspy.651a4c71.func_pm_remove_loop__ngzlt6ib
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# AvatarOptimizer not populating positive and negative examples I found a bug in the `AvatarOptimizer` class where it's not populating the positive and negative examples correctly. ```python >>> from dspy.teleprompt import AvatarOptimizer >>> # Set up a simple optimizer with some bounds >>> optimizer = AvatarOptimize...
diff --git a/dspy/teleprompt/avatar_optimizer.py b/dspy/teleprompt/avatar_optimizer.py index 43fa1d5..f3ef394 100644 --- a/dspy/teleprompt/avatar_optimizer.py +++ b/dspy/teleprompt/avatar_optimizer.py @@ -153,35 +153,16 @@ class AvatarOptimizer(Teleprompter): ) -> Tuple[float, List[EvalResult], List[EvalResult]]: ...
["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
23
4
1,298
0
0.6
1
0.75
1
0.293
81.154
5,628
swe_smith::train::42839
swe_smith
train
42,839
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__n3c2ulj0
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
# Multiple validation errors not showing the most relevant error message I'm using jsonschema to validate some data against a schema with multiple validation options, but I'm getting unexpected error messages when validation fails. ## Description When validating against a schema with `oneOf` that contains multiple v...
diff --git a/jsonschema/validators.py b/jsonschema/validators.py index b8ca3bd..ecf2aa1 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -1262,7 +1262,7 @@ def _search_schema(schema, matcher): values.extendleft(value.values()) -def validate(instance, schema, cls=None, *args, **kwargs...
["jsonschema/tests/test_validators.py::TestValidate::test_it_uses_best_match"]
["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
9
1
1,577
0
0.6
1
0.75
1
0.292833
81.1535
5,629
swe_smith::train::6914
swe_smith
train
6,914
cantools__cantools.0c6a7871.combine_file__07xdw34c
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
## Dump command produces incorrect output formatting The `cantools dump` command is generating malformed output with several formatting issues. When trying to dump CAN database information, the output contains incorrect characters, wrong positioning, and crashes with type errors. #### Steps to Reproduce ```python im...
diff --git a/src/cantools/subparsers/dump/formatting.py b/src/cantools/subparsers/dump/formatting.py index 96e603a..cb47442 100644 --- a/src/cantools/subparsers/dump/formatting.py +++ b/src/cantools/subparsers/dump/formatting.py @@ -137,12 +137,12 @@ def layout_string(message, signal_names=True): signals = [] ...
["tests/test_command_line.py::CanToolsCommandLineTest::test_dump", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_j1939", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_no_sender", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_signal_choices", "tests/test_command_line...
["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
26
25
1,237
0
0.6
1
0.75
1
0.292833
81.1535
5,630
swe_smith::train::216
swe_smith
train
216
oauthlib__oauthlib.1fd52536.combine_module__5c725rro
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
UserInfo endpoint allows access without valid token and rejects requests with openid scope #### Description The UserInfo endpoint is not properly validating bearer tokens and has inverted logic for scope checking. Requests without valid tokens are being allowed through, and requests with the required "openid" scope a...
diff --git a/oauthlib/openid/connect/core/endpoints/userinfo.py b/oauthlib/openid/connect/core/endpoints/userinfo.py index 7aa2bbe..38faf88 100644 --- a/oauthlib/openid/connect/core/endpoints/userinfo.py +++ b/oauthlib/openid/connect/core/endpoints/userinfo.py @@ -101,6 +101,6 @@ class UserInfoEndpoint(BaseEndpoint): ...
["tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py::OpenIDConnectEndpointTest::test_authorization_endpoint_handles_prompt", "tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py::OpenIDConnectEndpointTest::test_oidc_params_preservation", "tests/openid/connect/core/endpoin...
["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
2
8
45
1,597
0
0.6
1
0.75
1
0.292833
81.1535
5,631
swe_smith::train::1040
swe_smith
train
1,040
jd__tenacity.0d40e76f.combine_file__7w229mgr
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
Retry conditions behaving inversely after recent changes #### Description The retry conditions seem to be working backwards now. Functions that should retry are not retrying, and functions that shouldn't retry are retrying instead. #### Steps/Code to Reproduce ```python import tenacity # This should retry when res...
diff --git a/tenacity/retry.py b/tenacity/retry.py index 9211631..8e8d4cb 100644 --- a/tenacity/retry.py +++ b/tenacity/retry.py @@ -173,7 +173,8 @@ class retry_if_result(retry_base): """Retries if the result verifies a predicate.""" def __init__(self, predicate: typing.Callable[[typing.Any], bool]) -> None...
["tests/test_asyncio.py::TestContextManager::test_retry_with_async_result_and", "tests/test_asyncio.py::TestContextManager::test_retry_with_async_result_rand", "tests/test_asyncio.py::TestContextManager::test_retry_with_async_result_ror", "tests/test_asyncio.py::TestContextManager::test_retry_with_result", "tests/test_...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
7
19
1,616
0
0.6
1
0.75
1
0.292667
81.153
5,632
swe_smith::train::18463
swe_smith
train
18,463
HIPS__autograd.ac044f0d.func_pm_op_change__aueep023
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
SVD gradient computation produces incorrect results and type errors #### Description The SVD gradient computation in `autograd.numpy.linalg.svd` is producing incorrect numerical results and type errors when computing gradients. The issue affects both real and complex matrices across different shapes and dimensionalit...
diff --git a/autograd/numpy/linalg.py b/autograd/numpy/linalg.py index b400a55..2f28618 100644 --- a/autograd/numpy/linalg.py +++ b/autograd/numpy/linalg.py @@ -294,9 +294,9 @@ def grad_svd(usv_, a, full_matrices=True, compute_uv=True): k = anp.min((m, n)) # broadcastable identity array with...
["tests/test_linalg.py::test_svd_wide_2d", "tests/test_linalg.py::test_svd_wide_2d_complex", "tests/test_linalg.py::test_svd_wide_3d", "tests/test_linalg.py::test_svd_wide_3d_complex", "tests/test_linalg.py::test_svd_square_2d", "tests/test_linalg.py::test_svd_square_2d_complex", "tests/test_linalg.py::test_svd_square_...
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
17
16
1,415
0
0.6
1
0.75
1
0.2925
81.1525
5,633
swe_smith::train::43812
swe_smith
train
43,812
pydata__patsy.a5d16484.combine_file__o79uolfw
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
# PatsyError not showing origin information correctly I've found an issue with the `PatsyError` class in patsy. When an error occurs, it's not showing the origin information correctly. ## Reproduction When using patsy to create design matrices, errors should show where in the formula the problem occurred. However, t...
diff --git a/patsy/__init__.py b/patsy/__init__.py index 50431ec..f7c3af6 100644 --- a/patsy/__init__.py +++ b/patsy/__init__.py @@ -51,10 +51,10 @@ class PatsyError(Exception): self.set_origin(origin) def __str__(self): - if self.origin is None: + if self.origin is not None: ...
["patsy/test_highlevel.py::test_evalfactor_reraise", "patsy/test_regressions.py::test_issue_11"]
["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
2
1,595
0
0.6
1
0.75
1
0.2925
81.1525
5,634
swe_smith::train::10182
swe_smith
train
10,182
paramiko__paramiko.23f92003.combine_file__sg1e6tpl
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH key exchange fails with AttributeError in client mode #### Description When attempting to establish an SSH connection in client mode, the key exchange process fails with an AttributeError. The error occurs during the Diffie-Hellman key exchange when trying to compute the client's public key value. #### Steps/Cod...
diff --git a/paramiko/kex_group1.py b/paramiko/kex_group1.py index f074256..6b64c06 100644 --- a/paramiko/kex_group1.py +++ b/paramiko/kex_group1.py @@ -54,13 +54,13 @@ class KexGroup1: def start_kex(self): self._generate_x() - if self.transport.server_mode: + if not self.transport.server_...
["tests/test_kex.py::KexTest::test_group1_client", "tests/test_kex.py::KexTest::test_group1_server", "tests/test_kex.py::KexTest::test_kex_group14_sha256_client", "tests/test_kex.py::KexTest::test_kex_group14_sha256_server", "tests/test_kex.py::KexTest::test_kex_group16_sha512_client", "tests/test_kex.py::KexTest::test...
["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
6
1,095
0
0.6
1
0.75
1
0.2925
81.1525
5,635
swe_smith::train::39255
swe_smith
train
39,255
pallets__jinja.ada0a9a6.func_basic__vilfme82
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Filter and test arguments swapped causing unexpected behavior #### Description When using filters or tests with arguments in Jinja2 templates, the arguments and keyword arguments are being processed incorrectly, causing filters and tests to receive swapped or malformed parameters. #### Steps/Code to Reproduce ```py...
diff --git a/src/jinja2/nodes.py b/src/jinja2/nodes.py index 2f93b90..54e4077 100644 --- a/src/jinja2/nodes.py +++ b/src/jinja2/nodes.py @@ -718,22 +718,22 @@ class CondExpr(Expr): def args_as_const( node: t.Union["_FilterTestCommon", "Call"], eval_ctx: t.Optional[EvalContext] ) -> t.Tuple[t.List[t.Any], t.Dict[...
["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
16
168
1,434
0
0.6
1
0.75
1
0.292333
81.152
5,636
swe_smith::train::1059
swe_smith
train
1,059
jd__tenacity.0d40e76f.combine_file__u92q5owo
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
# TornadoRetrying breaks function calls and adds unexpected delay ## Describe the bug I've discovered a bug in the `TornadoRetrying` class that causes two major issues: 1. It adds an extra parameter to function calls that breaks existing code 2. It adds an extra second to every sleep duration, causing unexpected dela...
diff --git a/tenacity/tornadoweb.py b/tenacity/tornadoweb.py index 44323e4..998234d 100644 --- a/tenacity/tornadoweb.py +++ b/tenacity/tornadoweb.py @@ -35,7 +35,7 @@ class TornadoRetrying(BaseRetrying): **kwargs: typing.Any, ) -> None: super().__init__(**kwargs) - self.sleep = sleep + ...
["tests/test_tornado.py::TestTornado::test_retry", "tests/test_tornado.py::TestTornado::test_stop_after_attempt"]
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
9
2
1,574
0
0.6
1
0.75
1
0.292333
81.152
5,637
swe_smith::train::9867
swe_smith
train
9,867
keleshev__schema.24a30457.lm_rewrite__wnyz9ipa
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
# Incorrect handling of objects with non-callable validate attribute While working on a project using Schema, I discovered an issue with how objects that have a `validate` attribute (but where the attribute is not callable) are handled. ## Description The `_priority` function in schema/__init__.py incorrectly identi...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..2547714 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -322,23 +322,19 @@ class Use: COMPARABLE, CALLABLE, VALIDATOR, TYPE, DICT, ITERABLE = range(6) -def _priority(s: Any) -> int: +def _priority(s: Any) ->int: """Return priority...
["test_schema.py::test_exception_handling_with_bad_validators"]
["test_schema.py::test_schema", "test_schema.py::test_validate_file", "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....
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
12
1
1,514
0
0.6
1
0.75
1
0.292333
81.152
5,638
swe_smith::train::17252
swe_smith
train
17,252
aio-libs__async-timeout.d0baa9f1.func_basic__aqzl677s
swesmith/aio-libs__async-timeout.d0baa9f1
aio-libs/async-timeout
python
null
# Reject method in timeout context manager causes invalid state errors ## Description The `reject()` method in the async_timeout context manager is causing issues when called in certain states. When trying to reject a timeout after it has already been triggered or when the context manager has finished, the code fail...
diff --git a/async_timeout/__init__.py b/async_timeout/__init__.py index fe4aa58..a3ade3c 100644 --- a/async_timeout/__init__.py +++ b/async_timeout/__init__.py @@ -190,11 +190,11 @@ else: def reject(self) -> None: """Reject scheduled timeout if any.""" - # cancel is maybe better name...
["tests/test_timeout.py::test_expired_after_rejecting", "tests/test_timeout.py::test_reject_finished"]
["tests/test_timeout.py::test_timeout", "tests/test_timeout.py::test_timeout_finish_in_time", "tests/test_timeout.py::test_timeout_disable", "tests/test_timeout.py::test_timeout_is_none_no_schedule", "tests/test_timeout.py::test_timeout_no_loop", "tests/test_timeout.py::test_timeout_zero", "tests/test_timeout.py::test_...
jyangballin/swesmith.x86_64.aio-libs_1776_async-timeout.d0baa9f1
true
null
1
6
2
1,634
0
0.6
1
0.75
1
0.292333
81.152
5,639
swe_smith::train::98
swe_smith
train
98
oauthlib__oauthlib.1fd52536.combine_file__kacru9dp
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# OpenID Connect GrantTypeBase __getattr__ method returns incorrect attribute When using the OpenID Connect grant types, attribute access is broken due to an issue in the `__getattr__` method of the `GrantTypeBase` class. ## Description I'm trying to use the OpenID Connect functionality and noticed that when accessi...
diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py index 29d583e..7849fdd 100644 --- a/oauthlib/openid/connect/core/grant_types/base.py +++ b/oauthlib/openid/connect/core/grant_types/base.py @@ -17,11 +17,14 @@ class GrantTypeBase: # proxy_target grant ...
["tests/oauth2/rfc6749/endpoints/test_metadata.py::MetadataEndpointTest::test_openid_oauth2_preconfigured", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_claims_stored_on_code_creation", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_inval...
["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
172
1,414
0
0.6
1
0.75
1
0.292333
81.152
5,640
swe_smith::train::24705
swe_smith
train
24,705
marshmallow-code__marshmallow.9716fc62.func_basic__grftne5m
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Schema validation decorators not working properly #### Description When using `@validates` decorators on schema fields, the validation is not being triggered and errors are not being raised as expected. The decorators seem to be completely ignored during the validation process. #### Steps/Code to Reproduce ```pytho...
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index e21768e..1b06304 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -1106,7 +1106,7 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta): try: field_obj = self.fields[field_name] e...
["tests/test_decorators.py::TestValidatesDecorator::test_validates", "tests/test_decorators.py::TestValidatesDecorator::test_validates_with_attribute", "tests/test_decorators.py::TestValidatesDecorator::test_validates_decorator", "tests/test_decorators.py::TestValidatesDecorator::test_field_not_present", "tests/test_de...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
8
8
1,593
0
0.6
1
0.75
1
0.292167
81.1515
5,641
swe_smith::train::51686
swe_smith
train
51,686
pydicom__pydicom.7d361b3d.func_basic__178yw0hj
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileSet.add() creates infinite recursion in record tree structure #### Description When adding datasets to a FileSet, the record tree structure gets corrupted causing infinite recursion errors. The parent-child relationships in the RecordNode tree are incorrectly set up, leading to nodes that reference themselves as ...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..c31d005 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -1032,43 +1032,33 @@ class FileSet: key = ds.SOPInstanceUID have_instance = [ii for ii in self if ii.SOPInstanceUID == key] - # If staged for...
["tests/test_fileset.py::TestRecordNode::test_add", "tests/test_fileset.py::TestRecordNode::test_key", "tests/test_fileset.py::TestRecordNode::test_key_raises", "tests/test_fileset.py::TestRecordNode::test_file_id_singleton", "tests/test_fileset.py::TestRecordNode::test_file_id_missing", "tests/test_fileset.py::TestFil...
["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
32
46
1,113
0
0.6
1
0.75
1
0.292167
81.1515
5,642
swe_smith::train::6893
swe_smith
train
6,893
joke2k__faker.8b401a7d.lm_rewrite__vrxu8xus
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
### Issue: `date_time_between` Method Fails with Close Start and End Dates I've encountered an issue with the `date_time_between` method in the `date_time` provider. When attempting to generate a datetime within a very short range, specifically when the start and end dates are extremely close, the method throws an err...
diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py index f05538e..1bcfec4 100644 --- a/faker/providers/date_time/__init__.py +++ b/faker/providers/date_time/__init__.py @@ -2083,12 +2083,8 @@ class Provider(BaseProvider): return today + timedelta(value) rais...
["tests/providers/test_date_time.py::TestDateTime::test_past_datetime_within_second"]
["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
1
1,213
0
0.6
1
0.75
1
0.292167
81.1515
5,643
swe_smith::train::50930
swe_smith
train
50,930
python-hyper__h11.bed0dd4a.func_pm_remove_cond__yumc5xpc
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
# Chunked encoding broken in HTTP client/server **Describe the bug** When using chunked encoding for HTTP requests or responses, the client/server fails to properly process chunks. This appears to be related to a bug in the chunked data handling code. **To Reproduce** The issue can be reproduced with a simple script ...
diff --git a/h11/_readers.py b/h11/_readers.py index 08a9574..4502ecb 100644 --- a/h11/_readers.py +++ b/h11/_readers.py @@ -162,8 +162,6 @@ class ChunkedReader: return EndOfMessage(headers=list(_decode_header_lines(lines))) if self._bytes_to_discard > 0: data = buf.maybe_extract_at_m...
["h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_special_exceptions_for_lost_connection_in_message_body", "h11/tests/test_io.py::test_ChunkedReader"]
["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_Connection_basics_and_content_length", "h11/tests/test_conn...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
8
4
1,593
0
0.6
1
0.75
1
0.292167
81.1515
5,644
swe_smith::train::45426
swe_smith
train
45,426
dask__dask.5f61e423.lm_rewrite__kex0qbbb
swesmith/dask__dask.5f61e423
dask/dask
python
null
Inline functions with non-hashable callables cause TypeError Description I encountered an issue when trying to inline functions that involve non-hashable callables. The problem arises when a callable object that raises a `TypeError` on hashing is used within a task. Here's a minimal example to reproduce the issue: `...
diff --git a/dask/optimization.py b/dask/optimization.py index 4e65fe7..9964667 100644 --- a/dask/optimization.py +++ b/dask/optimization.py @@ -343,21 +343,31 @@ def inline_functions( dependents = reverse_dict(dependencies) def inlinable(key, task): - if ( - not isinstance(task, GraphNode...
["dask/tests/test_optimization.py::test_inline_functions_non_hashable"]
["dask/tests/test_optimization.py::test_cull", "dask/tests/test_optimization.py::test_fuse", "dask/tests/test_optimization.py::test_fuse_keys", "dask/tests/test_optimization.py::test_donot_substitute_same_key_multiple_times", "dask/tests/test_optimization.py::test_inline", "dask/tests/test_optimization.py::test_inline_...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
40
1
953
0
0.6
1
0.75
1
0.292167
81.1515
5,645
swe_smith::train::39578
swe_smith
train
39,578
pallets__jinja.ada0a9a6.lm_rewrite__7k51icw9
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### AttributeError in Template Loop Handling #### Description Encountered an `AttributeError` when using loops in Jinja2 templates with the latest changes. The issue arises when attempting to access loop variables in certain conditions. #### Steps/Code to Reproduce Here's a minimal example to reproduce the issue: ...
diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py index 9dcc9d4..b5ce30f 100644 --- a/src/jinja2/runtime.py +++ b/src/jinja2/runtime.py @@ -238,12 +238,19 @@ class Context: """ if key in self.vars: return self.vars[key] - + if key in self.parent: return ...
["tests/test_async.py::TestAsyncForLoop::test_loop_errors[asyncio]", "tests/test_async.py::TestAsyncForLoop::test_loop_errors[trio]", "tests/test_core_tags.py::TestForLoop::test_loop_errors"]
["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
13
3
1,493
0
0.6
1
0.75
1
0.292167
81.1515
5,646
swe_smith::train::43063
swe_smith
train
43,063
gawel__pyquery.811cd048.func_basic__filpyzhr
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
PyQuery methods returning None instead of PyQuery objects after traversal operations #### Description Several PyQuery methods are returning `None` instead of PyQuery objects, causing `AttributeError` when trying to chain method calls. This affects traversal methods like `children()`, `parents()`, `siblings()`, `filte...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..4db8090 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -416,15 +416,16 @@ class PyQuery(list): results = [] for tag in elements: results.extend(tag.xpath(xpath, namespaces=self.namespaces)) - ...
["docs/traversing.rst::traversing.rst", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.children", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.closest", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.filter", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.has_class", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.is_", "pyquer...
["README.rst::README.rst", "docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/manipulating.rst::manipulating.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTranslator.xpath_button_ps...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
11
38
1,533
0
0.6
1
0.75
1
0.292167
81.1515
5,647
swe_smith::train::48482
swe_smith
train
48,482
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_cond__q1v17816
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
FileSegment parsing fails with unmatched segments #### Description When parsing SQL files that contain unmatched segments, the FileSegment parser crashes with an UnboundLocalError. This happens when the parser encounters segments that don't match the expected grammar but still need to be processed. #### Steps/Code t...
diff --git a/src/sqlfluff/core/parser/segments/file.py b/src/sqlfluff/core/parser/segments/file.py index b8fce88..a16630a 100644 --- a/src/sqlfluff/core/parser/segments/file.py +++ b/src/sqlfluff/core/parser/segments/file.py @@ -98,24 +98,8 @@ class BaseFileSegment(BaseSegment): segments[_start_idx...
["test/core/rules/functional/segments_test.py::test_segments_recursive_crawl"]
["test/core/parser/segments/segments_base_test.py::test__parser__base_segments_type", "test/core/parser/segments/segments_base_test.py::test__parser__base_segments_class_types", "test/core/parser/segments/segments_base_test.py::test__parser__base_segments_descendant_type_set", "test/core/parser/segments/segments_base_t...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
18
1
1,393
0
0.6
1
0.75
1
0.292167
81.1515
5,648
swe_smith::train::23808
swe_smith
train
23,808
rustedpy__result.0b855e1e.pr_132
swesmith/rustedpy__result.0b855e1e
rustedpy/result
python
null
# Exception context lost when unwrapping Err values containing exceptions ## Bug description When an `Err` value contains an exception and `unwrap()` is called on it, the original exception is not preserved as the cause of the `UnwrapError`. This breaks the exception chaining mechanism in Python. ## Reproduction ``...
diff --git a/src/result/result.py b/src/result/result.py index 8551239..9fdd4c8 100644 --- a/src/result/result.py +++ b/src/result/result.py @@ -307,13 +307,7 @@ class Err(Generic[E]): """ Raises an `UnwrapError`. """ - exc = UnwrapError( - self, - f"{message}: {s...
["tests/test_result.py::test_err_value_is_exception"]
["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,392
0
0.6
1
0.75
1
0.292
81.151
5,649
swe_smith::train::18198
swe_smith
train
18,198
msiemens__tinydb.10644a0e.combine_file__q1c95i36
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
# Middleware initialization broken in TinyDB ### What happened? I'm experiencing issues with middleware initialization in TinyDB. When trying to use middleware, especially the CachingMiddleware, I get TypeError exceptions. ### Expected behavior The middleware should initialize correctly and work as expected, allowi...
diff --git a/tinydb/middlewares.py b/tinydb/middlewares.py index 7973012..f86248c 100644 --- a/tinydb/middlewares.py +++ b/tinydb/middlewares.py @@ -60,9 +60,9 @@ class Middleware: so on. """ - self.storage = self._storage_cls(*args, **kwargs) + self.storage = self._storage_cls(*kwargs...
["tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_nested", "tests/test_middlewares.py::test_caching_json_write", "tests/test_tinydb.py::test_empty_write", "tests/test_tinydb.py::test_access_storage"]
["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::test_add_int[json]", "tests/test_operations.py::test_add_str[memory]", "tests/test_operations.py::test_add_str[json]", "tests/test_operations.py::...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
11
5
1,532
0
0.6
1
0.75
1
0.292
81.151
5,650
swe_smith::train::49635
swe_smith
train
49,635
cool-RR__PySnooper.57472b46.lm_rewrite__auwmcjys
swesmith/cool-RR__PySnooper.57472b46
cool-rr/pysnooper
python
null
TypeError when using get_write_function with file-like objects When attempting to use the `get_write_function` with a file-like object, a `TypeError` is raised. The function is expected to handle file-like objects with a `write` method, but it seems to fail in this scenario. Here's a minimal example to reproduce the ...
diff --git a/pysnooper/tracer.py b/pysnooper/tracer.py index 1b35154..2d140f3 100644 --- a/pysnooper/tracer.py +++ b/pysnooper/tracer.py @@ -132,29 +132,30 @@ def get_path_and_source_from_frame(frame): def get_write_function(output, overwrite): - is_path = isinstance(output, (pycompat.PathLike, str)) - if ov...
["tests/test_chinese.py::test_chinese", "tests/test_multiple_files/test_multiple_files.py::test_multiple_files", "tests/test_pysnooper.py::test_relative_time", "tests/test_pysnooper.py::test_thread_info", "tests/test_pysnooper.py::test_multi_thread_info", "tests/test_pysnooper.py::test_watch[True]", "tests/test_pysnoop...
["tests/test_mini_toolbox.py::test_output_capturer_doesnt_swallow_exceptions", "tests/test_not_implemented.py::test_rejecting_coroutine_functions", "tests/test_not_implemented.py::test_rejecting_async_generator_functions", "tests/test_pysnooper.py::test_string_io", "tests/test_pysnooper.py::test_callable[True]", "tests...
jyangballin/swesmith.x86_64.cool-rr_1776_pysnooper.57472b46
true
null
1
39
33
972
0
0.6
1
0.75
1
0.292
81.151
5,651
swe_smith::train::35769
swe_smith
train
35,769
stanfordnlp__dspy.651a4c71.func_pm_remove_cond__kax5fvqm
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# ChatAdapter fails to parse field headers in completion responses I've discovered an issue with the `ChatAdapter` class where it's not correctly parsing field headers in completion responses. This causes a cascade of failures across various modules that depend on this functionality. ## Description When a completion...
diff --git a/dspy/adapters/chat_adapter.py b/dspy/adapters/chat_adapter.py index b11e5c1..0c9daba 100644 --- a/dspy/adapters/chat_adapter.py +++ b/dspy/adapters/chat_adapter.py @@ -152,13 +152,6 @@ class ChatAdapter(Adapter): for line in completion.splitlines(): match = field_header_pattern.matc...
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call", "tests/adapters/test_json_adapter.py::test_json_adapter_async_call", "tests/adapters/test_two_step_adapter.py::tes...
["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_on_pydantic_model", "tests/adapters/test_json_adapter.py::test_json_adapter_parse_raise_error_on_mismatch_fields", "tests/adapters/test_two_step_a...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
8
74
1,592
0
0.6
1
0.75
1
0.292
81.151
5,652
swe_smith::train::27713
swe_smith
train
27,713
arrow-py__arrow.1d70d009.func_pm_ctrl_shuffle__g62wunbe
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Arrow.shift() method broken - UnboundLocalError on variable access #### Description The `shift()` method in Arrow is throwing `UnboundLocalError` when trying to access local variables that are referenced before assignment. This affects basic time shifting operations. #### Steps/Code to Reproduce ```python import ar...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..09d3003 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -983,6 +983,26 @@ class Arrow: return self.fromdatetime(current) def shift(self, check_imaginary: bool = True, **kwargs: Any) -> "Arrow": + + for key, value in kwargs.items(): +...
["tests/test_arrow.py::TestArrowComparison::test_gt", "tests/test_arrow.py::TestArrowComparison::test_lt", "tests/test_arrow.py::TestArrowShift::test_not_attr", "tests/test_arrow.py::TestArrowShift::test_shift", "tests/test_arrow.py::TestArrowShift::test_shift_negative", "tests/test_arrow.py::TestArrowShift::test_shift...
["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
41
109
931
0
0.6
1
0.75
1
0.291833
81.1505
5,653
swe_smith::train::38395
swe_smith
train
38,395
dbader__schedule.82a43db1.func_basic__cksbqu1p
swesmith/dbader__schedule.82a43db1
dbader/schedule
python
null
Job scheduling broken for daily tasks with specific times #### Description When scheduling daily jobs with specific times using `.at()`, the jobs are not being scheduled correctly. The next run time is being calculated incorrectly, causing jobs to either run immediately or skip expected execution times. #### Steps/C...
diff --git a/schedule/__init__.py b/schedule/__init__.py index 8e12eeb..3fe3273 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -707,19 +707,18 @@ class Job: "`days`, and `weeks`)" ) if self.latest is not None: - if not (self.latest >= self.interval): + ...
["test_schedule.py::SchedulerTests::test_at_time_hour", "test_schedule.py::SchedulerTests::test_at_time_minute", "test_schedule.py::SchedulerTests::test_next_run_time", "test_schedule.py::SchedulerTests::test_next_run_time_day_end", "test_schedule.py::SchedulerTests::test_next_run_time_hour_end", "test_schedule.py::Sch...
["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT...
jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1
true
null
1
18
38
1,390
0
0.6
1
0.75
1
0.291667
81.15
5,654
swe_smith::train::1948
swe_smith
train
1,948
agronholm__typeguard.b6a7e438.lm_rewrite__6hb5khg9
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Literal type doesn't validate illegal values properly I found an issue with the `Literal` type checker in typeguard. When using `Literal` with non-allowed types, the type checker doesn't raise the expected error. ## Reproduction Create a simple script with a floating point value in a `Literal`: ```python from typ...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..9c55a5f 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -565,19 +565,28 @@ def check_literal( memo: TypeCheckMemo, ) -> None: def get_literal_args(literal_args: tuple[Any, ...]) -> tuple[Any, ...]:...
["tests/test_checkers.py::TestLiteral::test_literal_illegal_value"]
["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
31
1
1,129
0
0.6
1
0.75
1
0.2915
81.1495
5,655
swe_smith::train::36151
swe_smith
train
36,151
gruns__icecream.f76fef56.lm_rewrite__erunlraa
swesmith/gruns__icecream.f76fef56
gruns/icecream
python
null
### Issue: IceCreamDebugger Configuration Error #### Description The `IceCreamDebugger` class's `configureOutput` method seems to have an issue when called without any parameters. Previously, it would raise a `TypeError` if no arguments were provided, ensuring that at least one configuration parameter is set. However,...
diff --git a/icecream/icecream.py b/icecream/icecream.py index 5350d8e..1eb37c9 100644 --- a/icecream/icecream.py +++ b/icecream/icecream.py @@ -337,27 +337,33 @@ class IceCreamDebugger: self.enabled = False def configureOutput(self, prefix=_absent, outputFunction=_absent, - argTo...
["tests/test_icecream.py::TestIceCream::testConfigureOutputWithNoParameters"]
["tests/test_icecream.py::TestIceCream::testArgToStringFunction", "tests/test_icecream.py::TestIceCream::testAsArgument", "tests/test_icecream.py::TestIceCream::testCallSurroundedByExpressions", "tests/test_icecream.py::TestIceCream::testColoring", "tests/test_icecream.py::TestIceCream::testComments", "tests/test_icecr...
jyangballin/swesmith.x86_64.gruns_1776_icecream.f76fef56
true
null
1
30
1
1,149
0
0.6
1
0.75
1
0.2915
81.1495
5,656
swe_smith::train::18650
swe_smith
train
18,650
seperman__deepdiff.ed252022.combine_file__bo2l4sb9
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Delta application fails with UnboundLocalError when deleting elements from tuples #### Description When applying a Delta that involves deleting elements from tuples, an `UnboundLocalError` is raised because the `obj_is_new` variable is referenced before assignment in the `_del_elem` method. #### Steps/Code to Reprod...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..265f116 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -211,10 +211,10 @@ class Delta: return result def _raise_or_log(self, msg, level='error'): - if self.log_errors: - getattr(logger, level)(msg) if...
["tests/test_delta.py::TestBasicsOfDelta::test_list_difference_add_delta", "tests/test_delta.py::TestBasicsOfDelta::test_multiple_delta", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference_add_delta_when_index_not_valid", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference3_delta", "tests/test_delt...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
26
33
1,228
0
0.6
1
0.75
1
0.291333
81.149
5,657
swe_smith::train::2932
swe_smith
train
2,932
madzak__python-json-logger.5f85723f.func_basic__aerukaes
swesmith/madzak__python-json-logger.5f85723f
madzak/python-json-logger
python
null
JsonFormatter produces invalid JSON output when using rename_fields #### Description The JsonFormatter is generating malformed JSON output that cannot be parsed. When trying to log messages with the formatter, the output appears to be corrupted or improperly formatted, causing JSON parsing errors. #### Steps/Code to...
diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py index 519a64d..78d71d5 100644 --- a/src/pythonjsonlogger/jsonlogger.py +++ b/src/pythonjsonlogger/jsonlogger.py @@ -210,22 +210,22 @@ class JsonFormatter(logging.Formatter): Override this method to implement custom logic for a...
["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg...
["tests/test_jsonlogger.py::TestJsonLogger::test_merge_record_extra", "tests/test_jsonlogger.py::TestJsonLogger::test_unknown_format_key"]
jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f
true
null
1
12
18
1,508
0
0.6
1
0.75
1
0.291333
81.149
5,658
swe_smith::train::38300
swe_smith
train
38,300
burnash__gspread.a8be3b96.func_pm_ctrl_shuffle__esse61hm
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
convert_hex_to_colors_dict function breaks with hex colors containing '#' prefix #### Description The `convert_hex_to_colors_dict` function in `gspread/utils.py` fails to process hex color codes that include the '#' prefix. The function now validates the length before stripping the '#' character, causing it to reject...
diff --git a/gspread/utils.py b/gspread/utils.py index 6daac86..e8a4b97 100644 --- a/gspread/utils.py +++ b/gspread/utils.py @@ -836,6 +836,25 @@ def combined_merge_values( def convert_hex_to_colors_dict(hex_color: str) -> Mapping[str, float]: + + if len(hex_color) != 6: + raise ValueError("Hex color cod...
["tests/utils_test.py::UtilsTest::test_convert_hex_to_color", "tests/worksheet_test.py::WorksheetTest::test_clear_tab_color", "tests/worksheet_test.py::WorksheetTest::test_update_tab_color"]
["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_merge_cells", "tests/cell_test.py::CellTest::test_numeric_value", "tests/ce...
jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96
true
null
1
39
3
968
0
0.6
1
0.75
1
0.291333
81.149
5,659
swe_smith::train::24046
swe_smith
train
24,046
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__mz6fgpoj
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
UnboundLocalError in _parse_fits_unit method when processing map units #### Description When working with SunPy maps that have units, operations like arithmetic or unit parsing are failing with `UnboundLocalError: cannot access local variable 'unit' where it is not associated with a value`. This affects basic map fun...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..e7fe14f 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -789,11 +789,6 @@ class GenericMap(NDData): @staticmethod def _parse_fits_unit(unit_str): - replacements = {'gauss': 'G', - 'counts / ...
["sunpy/map/tests/test_mapbase.py::test_unit", "sunpy/map/tests/test_mapbase.py::test_save_asdf", "sunpy/map/tests/test_mapbase.py::test_repr_html", "sunpy/map/tests/test_mapbase.py::test_quicklook", "sunpy/map/tests/test_mapbase.py::test_find_contours_units", "sunpy/map/tests/test_mapbase.py::test_find_contours_inputs...
["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
11
26
1,527
0
0.6
1
0.75
1
0.291167
81.1485
5,660
swe_smith::train::31709
swe_smith
train
31,709
benoitc__gunicorn.bacbf8aa.lm_rewrite__xh1atmus
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
**Bug Report: WSGI Application Configuration Issue** **Describe the bug** There seems to be an issue with the WSGI application configuration when no application module is specified. The application does not raise the expected error when the app_uri is not provided, leading to unexpected behavior. **To Reproduce** Ste...
diff --git a/gunicorn/app/wsgiapp.py b/gunicorn/app/wsgiapp.py index 1b0ba96..eda34e3 100644 --- a/gunicorn/app/wsgiapp.py +++ b/gunicorn/app/wsgiapp.py @@ -35,14 +35,30 @@ class WSGIApplication(Application): self.app_uri = args[0] def load_config(self): - super().load_config() - + """...
["tests/test_config.py::test_wsgi_app_config[options3-app1:app1]", "tests/test_config.py::test_non_wsgi_app[options0]", "tests/test_config.py::test_non_wsgi_app[options1]"]
["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
30
3
1,147
0
0.6
1
0.75
1
0.291167
81.1485
5,661
swe_smith::train::8255
swe_smith
train
8,255
cantools__cantools.0c6a7871.lm_rewrite__d3szvbzy
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Invalid Signal Type Handling in SYM Format Hey team, I've encountered an issue with the SYM format handling in the latest update. It seems that certain signal types are not being recognized correctly, leading to errors during parsing. Here's a quick rundown of what I'm seeing: - When attempting to load a SYM file wi...
diff --git a/src/cantools/database/can/formats/sym.py b/src/cantools/database/can/formats/sym.py index 4bdc121..e57c138 100644 --- a/src/cantools/database/can/formats/sym.py +++ b/src/cantools/database/can/formats/sym.py @@ -305,19 +305,29 @@ def _load_enums(tokens): def _load_signal_type_and_length(type_, tokens,...
["tests/test_database.py::CanToolsDatabaseTest::test_issue_138", "tests/test_database.py::CanToolsDatabaseTest::test_jopp_6_0_sym", "tests/test_database.py::CanToolsDatabaseTest::test_jopp_6_0_sym_re_read", "tests/test_database.py::CanToolsDatabaseTest::test_load_file_with_database_format", "tests/test_database.py::Can...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
38
8
987
0
0.6
1
0.75
1
0.291167
81.1485
5,662
swe_smith::train::31359
swe_smith
train
31,359
benoitc__gunicorn.bacbf8aa.combine_file__5k2xl2p3
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
HTTP body parsing fails with TypeError when reading chunked requests #### Description When processing HTTP requests with chunked transfer encoding, the body parser throws TypeError exceptions due to incorrect initialization of internal buffers and validation logic. #### Steps/Code to Reproduce ```python import io f...
diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py index d7ee29e..a82027f 100644 --- a/gunicorn/http/body.py +++ b/gunicorn/http/body.py @@ -11,9 +11,9 @@ from gunicorn.http.errors import (NoMoreData, ChunkMissingTerminator, class ChunkedReader: def __init__(self, req, unreader): - self.req = req...
["tests/test_http.py::test_readline_empty_body", "tests/test_http.py::test_readline_zero_size", "tests/test_http.py::test_readline_new_line_before_size", "tests/test_http.py::test_readline_new_line_after_size", "tests/test_http.py::test_readline_no_new_line", "tests/test_http.py::test_readline_buffer_loaded", "tests/te...
["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
26
55
1,226
0
0.6
1
0.75
1
0.291
81.148
5,663
swe_smith::train::48535
swe_smith
train
48,535
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_loop__p5eqs5mh
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Violation formatting returns empty string #### Description When formatting violations using the OutputStreamFormatter, the method returns an empty string instead of the expected formatted violation message. #### Steps/Code to Reproduce ```python from sqlfluff.core.parser.segments.raw import RawSegment from sqlfluff...
diff --git a/src/sqlfluff/cli/formatters.py b/src/sqlfluff/cli/formatters.py index 4aa668f..dcc61ad 100644 --- a/src/sqlfluff/cli/formatters.py +++ b/src/sqlfluff/cli/formatters.py @@ -458,28 +458,7 @@ class OutputStreamFormatter(FormatterInterface): section_color = Color.light else: ...
["test/cli/formatters_test.py::test__cli__formatters__violation"]
["test/cli/formatters_test.py::test__cli__formatters__filename_nocol", "test/cli/formatters_test.py::test__cli__helpers__colorize", "test/cli/formatters_test.py::test__cli__helpers__cli_table"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
21
1
1,326
0
0.6
1
0.75
1
0.291
81.148
5,664
swe_smith::train::22151
swe_smith
train
22,151
jawah__charset_normalizer.1fdd6463.func_pm_class_rm_funcs__qon85hbw
swesmith/jawah__charset_normalizer.1fdd6463
jawah/charset_normalizer
python
null
CharsetMatch missing essential properties after recent changes #### Description After recent changes to the CharsetMatch class, several essential properties and methods are no longer accessible, causing failures when trying to access basic information about charset detection results. #### Steps/Code to Reproduce ``...
diff --git a/charset_normalizer/models.py b/charset_normalizer/models.py index 09492a9..daf706f 100644 --- a/charset_normalizer/models.py +++ b/charset_normalizer/models.py @@ -72,12 +72,6 @@ class CharsetMatch: def multi_byte_usage(self) -> float: return 1.0 - (len(str(self)) / len(self.raw)) - def ...
["tests/test_base_detection.py::test_empty", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xfe\\xff-utf_16]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\x841\\x953-gb18030]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xef\\xbb\\xbf-utf_8]", "tests/test_base_de...
["tests/test_base_detection.py::test_bool_matches", "tests/test_cli.py::TestCommandLineInterface::test_force_replace_without_replace", "tests/test_cli.py::TestCommandLineInterface::test_non_existent_file", "tests/test_cli.py::TestCommandLineInterface::test_replace_without_normalize", "tests/test_cli.py::TestCommandLine...
jyangballin/swesmith.x86_64.jawah_1776_charset_normalizer.1fdd6463
true
null
1
19
58
1,366
0
0.6
1
0.75
1
0.291
81.148
5,665
swe_smith::train::6533
swe_smith
train
6,533
mahmoud__boltons.3bfcfdd0.lm_rewrite__pd5xrmkh
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
# Bits.from_hex fails when given bytes input ### Describe the bug The `Bits.from_hex` method fails when given a bytes object as input. This used to work in previous versions but now throws a TypeError. ### How to Reproduce ```python from boltons.mathutils import Bits # This works fine hex_str = "AA" bits = Bits.fr...
diff --git a/boltons/mathutils.py b/boltons/mathutils.py index 1367a54..b701723 100644 --- a/boltons/mathutils.py +++ b/boltons/mathutils.py @@ -230,12 +230,17 @@ class Bits: @classmethod def from_hex(cls, hex): - if isinstance(hex, bytes): - hex = hex.decode('ascii') + """Create a ...
["tests/test_mathutils.py::test_bits"]
["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac...
jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0
true
null
1
11
1
1,525
0
0.6
1
0.75
1
0.290833
81.1475
5,666
swe_smith::train::28907
swe_smith
train
28,907
encode__starlette.db5063c2.lm_rewrite__d8b7gq41
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
# url_for method fails when used outside of a Starlette application context ## Description I discovered an issue with the `url_for` method in Starlette's `HTTPConnection` class. The method now directly accesses `self.scope["router"]` without checking if it exists, which causes a KeyError when used outside of a Starle...
diff --git a/starlette/requests.py b/starlette/requests.py index a29164d..f39656b 100644 --- a/starlette/requests.py +++ b/starlette/requests.py @@ -180,13 +180,16 @@ class HTTPConnection(typing.Mapping[str, typing.Any]): return self._state def url_for(self, name: str, /, **path_params: typing.Any) -> U...
["tests/test_requests.py::test_request_url_outside_starlette_context[asyncio]", "tests/test_requests.py::test_request_url_starlette_context[asyncio]", "tests/test_requests.py::test_request_url_outside_starlette_context[trio]", "tests/test_requests.py::test_request_url_starlette_context[trio]"]
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
13
4
1,485
0
0.6
1
0.75
1
0.290833
81.1475
5,667
swe_smith::train::24266
swe_smith
train
24,266
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__rwq2xqz2
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeSeries concatenate method fails when passing single TimeSeries object #### Description The `concatenate` method in `GenericTimeSeries` raises a `TypeError` when a single `TimeSeries` object is passed instead of a list. The method should handle both single objects and lists of objects. #### Steps/Code to Reproduc...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 80e5d20..ec1bfb0 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -651,11 +651,10 @@ class GenericTimeSeries: # If an iterable is not provided, it must be a TimeSeries object,...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_concat_list", "sunpy/timeseries/tests/test_timeseriesbase.py::test_generic_construction_concatenation"]
["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
7
2
1,605
0
0.6
1
0.75
1
0.290833
81.1475
5,668
swe_smith::train::24080
swe_smith
train
24,080
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__t3iq6yjk
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
RotatedSunFrame instantiation fails with TypeError #### Description When trying to create a `RotatedSunFrame` instance, it fails with a `TypeError: object.__new__() takes exactly one argument (the type to instantiate)`. This appears to be related to the `__new__` method implementation. #### Steps/Code to Reproduce ...
diff --git a/sunpy/coordinates/metaframes.py b/sunpy/coordinates/metaframes.py index ea46ab9..7cd9d4f 100644 --- a/sunpy/coordinates/metaframes.py +++ b/sunpy/coordinates/metaframes.py @@ -153,6 +153,14 @@ class RotatedSunFrame(SunPyBaseCoordinateFrame): rotation_model = Attribute(default='howard') def __ne...
["sunpy/coordinates/tests/test_metaframes.py::test_no_base", "sunpy/coordinates/tests/test_metaframes.py::test_no_obstime", "sunpy/coordinates/tests/test_metaframes.py::test_default_duration", "sunpy/coordinates/tests/test_metaframes.py::test_rotated_time_to_duration", "sunpy/coordinates/tests/test_metaframes.py::test_...
["sunpy/coordinates/tests/test_metaframes.py::test_no_obstime_frame_attribute"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
17
16
1,404
0
0.6
1
0.75
1
0.290667
81.147
5,669
swe_smith::train::32487
swe_smith
train
32,487
pydantic__pydantic.acb0f10f.func_pm_class_shuffle_funcs__ug7xmtvp
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
ByteSize validation fails when using methods defined after __get_pydantic_core_schema__ #### Description When using ByteSize type validation, methods that are defined after the `__get_pydantic_core_schema__` method are not accessible during validation, causing AttributeError when trying to use ByteSize functionality....
diff --git a/pydantic/types.py b/pydantic/types.py index 02e61dd..d2e3b99 100644 --- a/pydantic/types.py +++ b/pydantic/types.py @@ -2096,23 +2096,6 @@ class ByteSize(int): byte_string_pattern = r'^\s*(\d*\.?\d+)\s*(\w+)?' byte_string_re = re.compile(byte_string_pattern, re.IGNORECASE) - @classmethod - ...
["tests/test_docs.py::test_docstrings_examples[pydantic/types.py:2481-2527]", "tests/test_docs.py::test_docstrings_examples[pydantic/types.py:2580-2626]", "tests/test_docs.py::test_docstrings_examples[pydantic/types.py:2691-2720]", "tests/test_docs.py::test_docstrings_examples[pydantic/types.py:2722-2749]", "tests/test...
["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
33
12
1,084
0
0.6
1
0.75
1
0.290667
81.147
5,670
swe_smith::train::22512
swe_smith
train
22,512
tweepy__tweepy.91a41c6e.func_pm_remove_cond__b264mpe0
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Bug in User Model Parsing #### Describe the Bug After updating the `User` model in the `tweepy` library, certain attributes are not being set correctly when parsing user data from JSON. This issue seems to affect attributes like `status` and `following`, which are not being assigned as expected. As a result, oper...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..374c0e5 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -374,18 +374,7 @@ class User(Model, HashableID): for k, v in json.items(): if k == 'created_at': setattr(user, k, parsedate_to_datetime(v)) - ...
["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::testgetuser", "tests/test_api.py::TweepyAPITests::testsendanddeletedire...
["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
11
9
1,524
0
0.6
1
0.75
1
0.290667
81.147
5,671
swe_smith::train::14264
swe_smith
train
14,264
python-openxml__python-docx.0cf6d71f.func_pm_ctrl_shuffle__g0nt0es4
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Table cell merging fails with AttributeError when next cell is None #### Description When attempting to merge table cells, the operation fails with an AttributeError because the code tries to access attributes on a None object. This happens when the cell swallowing logic doesn't properly validate the existence of the...
diff --git a/src/docx/oxml/table.py b/src/docx/oxml/table.py index e38d585..a75490f 100644 --- a/src/docx/oxml/table.py +++ b/src/docx/oxml/table.py @@ -706,15 +706,6 @@ class CT_Tc(BaseOxmlElement): self.vMerge = vMerge def _swallow_next_tc(self, grid_width: int, top_tc: CT_Tc): - """Extend the ...
["tests/oxml/test_table.py::DescribeCT_Tc::it_can_swallow_the_next_tc_help_merge[w:tr/(w:tc/w:p,w:tc/w:p)-0-2-w:tr/(w:tc/(w:tcPr/w:gridSpan{w:val=2},w:p))]", "tests/oxml/test_table.py::DescribeCT_Tc::it_can_swallow_the_next_tc_help_merge[w:tr/(w:tc/w:p,w:tc/w:p,w:tc/w:p)-1-2-w:tr/(w:tc/w:p,w:tc/(w:tcPr/w:gridSpan{w:val...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
23
10
1,283
0
0.6
1
0.75
1
0.2905
81.1465
5,672
swe_smith::train::1046
swe_smith
train
1,046
jd__tenacity.0d40e76f.combine_file__hmo3b7hp
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
After callback logging produces incorrect output and causes recursion errors #### Description The `after_log` callback is producing incorrect log messages with swapped values and causing recursion errors when attempting to log retry attempts. #### Steps/Code to Reproduce ```python import logging from tenacity impor...
diff --git a/tenacity/after.py b/tenacity/after.py index aa3cc9d..cfc1963 100644 --- a/tenacity/after.py +++ b/tenacity/after.py @@ -26,6 +26,9 @@ if typing.TYPE_CHECKING: def after_nothing(retry_state: "RetryCallState") -> None: """After call strategy that does nothing.""" + + if retry_state.attempt_num...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_stop_after_attempt", "tests/test_asyncio.py::TestContextManager::test_do_max_attempts", "tests/test_tenacity.py::TestWaitConditions::test_wait_chai...
["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
12
26
1,503
0
0.6
1
0.75
1
0.2905
81.1465
5,673
swe_smith::train::6896
swe_smith
train
6,896
joke2k__faker.8b401a7d.lm_rewrite__wljd2s57
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# randomize_nb_elements produces empty range error with min/max parameters ## Bug description When using the `randomize_nb_elements` method with certain combinations of parameters, it can produce a `ValueError: empty range for randrange()` error. This happens when the calculated lower bound is greater than the upper ...
diff --git a/faker/providers/__init__.py b/faker/providers/__init__.py index 2dca6eb..fd4bf65 100644 --- a/faker/providers/__init__.py +++ b/faker/providers/__init__.py @@ -566,14 +566,8 @@ class BaseProvider: """ return self.random_elements(elements, length, unique=True) - def randomize_nb_eleme...
["tests/providers/__init__.py::TestBaseProvider::test_randomize_nb_elements", "tests/providers/test_python.py::TestPyDict::test_pydict_with_default_nb_elements", "tests/providers/test_python.py::TestPyDict::test_pydict_with_valid_number_of_nb_elements"]
["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
30
3
1,143
0
0.6
1
0.75
1
0.2905
81.1465
5,674
swe_smith::train::32670
swe_smith
train
32,670
pydantic__pydantic.acb0f10f.func_pm_remove_cond__8s7xua1q
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Setting attributes on BaseModel instances bypasses validation and extra field restrictions #### Description When setting attributes on BaseModel instances, the validation and extra field handling logic is being bypassed. This allows setting arbitrary attributes even when `extra='ignore'` or when the field doesn't exi...
diff --git a/pydantic/main.py b/pydantic/main.py index 03cb511..d00bfb1 100644 --- a/pydantic/main.py +++ b/pydantic/main.py @@ -1000,20 +1000,6 @@ class BaseModel(metaclass=_model_construction.ModelMetaclass): Returns `None` when memoization is not safe, then the attribute is set directly. ...
["tests/benchmarks/test_attribute_access.py::test_getattr", "tests/test_annotated.py::test_annotated_private_field_with_default", "tests/test_computed_fields.py::test_properties_and_computed_fields", "tests/test_config.py::TestsBaseConfig::test_base_config_private_attribute_intersection_with_extra_field", "tests/test_c...
["tests/benchmarks/test_attribute_access.py::test_setattr", "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_generics.py::test_fastapi_startup_perf", "tests/benchmarks/...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
26
44
1,223
0
0.6
1
0.75
1
0.2905
81.1465
5,675
swe_smith::train::35220
swe_smith
train
35,220
alecthomas__voluptuous.a7a55f83.combine_file__ulhqx67d
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
Invalid error handling broken after recent changes #### Description The Invalid exception class seems to have some issues with error handling and property access. When creating Invalid exceptions, several properties are not working as expected and causing IndexError and other exceptions. #### Steps/Code to Reproduce...
diff --git a/voluptuous/error.py b/voluptuous/error.py index 9dab943..2cec852 100644 --- a/voluptuous/error.py +++ b/voluptuous/error.py @@ -29,14 +29,14 @@ class Invalid(Error): error_message: typing.Optional[str] = None, error_type: typing.Optional[str] = None, ) -> None: - Error.__init_...
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_in", "voluptuous/tests/tests.py::test_in_unsortable_container", "voluptuous/tests/tests.py::test_not_in", "voluptuous/tests/tests.py::test_not_in_unsortable_container", "voluptuous/tests/tests.py::test_c...
["voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests.py::test_extra_empty_errors", "voluptuous/tests/tests.py::test_email_validation", "...
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
14
60
1,463
0
0.6
1
0.75
1
0.2905
81.1465
5,676
swe_smith::train::19660
swe_smith
train
19,660
kurtmckee__feedparser.cad965a3.combine_file__svwxim99
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
GeoRSS geometry parsing returns None instead of FeedParserDict #### Description When parsing GeoRSS feeds with geometry elements, the parser is returning `None` for the `where` context instead of the expected `FeedParserDict` object. This causes `TypeError: 'NoneType' object is not subscriptable` when trying to acces...
diff --git a/feedparser/namespaces/georss.py b/feedparser/namespaces/georss.py index 5e9e958..eff0ebc 100644 --- a/feedparser/namespaces/georss.py +++ b/feedparser/namespaces/georss.py @@ -41,9 +41,9 @@ class Namespace: super().__init__() def _start_georssgeom(self, attrs_d): - self.push("geometr...
["tests/test_well_formed.py::test_strict_parser[info1168]", "tests/test_well_formed.py::test_strict_parser[info1161]", "tests/test_well_formed.py::test_strict_parser[info1163]", "tests/test_well_formed.py::test_loose_parser[info1161]", "tests/test_well_formed.py::test_loose_parser[info1168]", "tests/test_well_formed.py...
["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
18
10
1,383
0
0.6
1
0.75
1
0.2905
81.1465
5,677
swe_smith::train::6819
swe_smith
train
6,819
joke2k__faker.8b401a7d.func_pm_remove_cond__u4uan9sy
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
SSN generation returns None for certain taxpayer identification number types #### Description When calling the `ssn()` method with specific taxpayer identification number types like 'SSN' or 'INVALID_SSN', the method returns `None` instead of generating the expected SSN string. #### Steps/Code to Reproduce ```pytho...
diff --git a/faker/providers/ssn/en_US/__init__.py b/faker/providers/ssn/en_US/__init__.py index 66f2a32..c1831d9 100644 --- a/faker/providers/ssn/en_US/__init__.py +++ b/faker/providers/ssn/en_US/__init__.py @@ -211,25 +211,4 @@ class Provider(BaseProvider): if taxpayer_identification_number_type == self.ITIN...
["tests/providers/test_ssn.py::TestEnUS::test_bad_tin_type", "tests/providers/test_ssn.py::TestEnUS::test_invalid_ssn", "tests/providers/test_ssn.py::TestEnUS::test_prohibited_ssn_value", "tests/providers/test_ssn.py::TestEnUS::test_ssn", "tests/providers/test_ssn.py::TestEnUS::test_wrong_tin_type_case"]
["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
23
5
1,283
0
0.6
1
0.75
1
0.2905
81.1465
5,678
swe_smith::train::5744
swe_smith
train
5,744
hjson__hjson-go.f3219653.lm_rewrite__nsh793fz
swesmith/hjson__hjson-go.f3219653
hjson/hjson-go
go
null
Array parsing passes wrong destination value to readValue #### Description When parsing arrays, the `readArray` function is incorrectly passing the array destination value instead of an empty `reflect.Value{}` to `readValue` for each element. This causes a panic when the destination is a slice of types that implement...
diff --git a/decode.go b/decode.go index 06b0a16..705a89e 100644 --- a/decode.go +++ b/decode.go @@ -553,43 +553,41 @@ func getElemTyperType(rv reflect.Value, t reflect.Type) reflect.Type { } func (p *hjsonParser) readArray(dest reflect.Value, t reflect.Type) (value interface{}, err error) { + // Parse an array val...
["TestUnmarshalSliceMapElemType"]
["TestEncodeEmptyStruct", "TestEncodeStruct", "TestAnonymousStruct1", "TestAnonymousStruct2", "TestAnonymousStruct3", "TestAnonymousStruct4", "TestEmptyMapsAndSlices", "TestStructPointers", "TestEncodeMarshalJSON", "TestEncodeMarshalText", "TestEncodeMarshalTextMapKey", "TestEncodeMarshalInt", "TestEncodeSliceOfPtrOfPt...
jyangballin/swesmith.x86_64.hjson_1776_hjson-go.f3219653
true
null
1
29
1
1,162
0
0.6
1
0.75
1
0.290333
81.146
5,679
swe_smith::train::10018
swe_smith
train
10,018
google__textfsm.c31b6007.func_pm_ctrl_shuffle__t6zpq220
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
# Indentation error in GetValuesByAttrib method causes AttributeError ## Description I've discovered an issue with the `GetValuesByAttrib` method in the TextFSM parser. The method is incorrectly indented, causing it to be defined outside of the `TextFSM` class scope. This makes the method inaccessible as an instance ...
diff --git a/textfsm/parser.py b/textfsm/parser.py index c00c976..f2e6dff 100755 --- a/textfsm/parser.py +++ b/textfsm/parser.py @@ -1060,20 +1060,19 @@ class TextFSM(object): """Remove all record entries.""" _ = [value.ClearAllVar() for value in self.values] - def GetValuesByAttrib(self, attribute): +def ...
["tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testKeyValue", "tests/clitable_test.py::UnitTestCliTable::testParseCmd", "tests/clitable_test.py::UnitTestCliTable::testParseCmdFromIndex", "tests/clitable_test.py::UnitTestCliTable::testParseCmdItem", "tests/clitable_te...
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.py::UnitTestCliTable::testCompletion", "tests/clitable_te...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
7
10
1,601
0
0.6
1
0.75
1
0.290167
81.1455
5,680
swe_smith::train::34903
swe_smith
train
34,903
pyutils__line_profiler.a646bf0f.combine_module__34acx8zp
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
Module path resolution returns incorrect paths with "_error" suffix #### Description When using the autoprofile functionality, module path resolution is returning incorrect paths with an "_error" suffix appended. This causes issues when trying to profile specific modules or when using import profiling features. ####...
diff --git a/line_profiler/autoprofile/ast_profle_transformer.py b/line_profiler/autoprofile/ast_profle_transformer.py index 06772ab..904f3f7 100644 --- a/line_profiler/autoprofile/ast_profle_transformer.py +++ b/line_profiler/autoprofile/ast_profle_transformer.py @@ -106,20 +106,19 @@ class AstProfileTransformer(ast.N...
["tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_autoprofile.py::test_autoprofile_module", "tests/test_autoprofile.py::test_autoprofile_module_list", "tests/test_autoprofile.py::test_autoprofile_module_with_prof_imports", "tests/test_autoprofile.py::test_autoprofile_script_with_prof_import...
["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_cli.py::test_cli", "tests/test_cli.py::test_version_agreement", "tests/test_complex_case.py::test_complex_example_py...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
2
30
5
1,141
0
0.6
1
0.75
1
0.290167
81.1455
5,681
swe_smith::train::4466
swe_smith
train
4,466
pygments__pygments.27649ebb.func_pm_remove_cond__6dub29r5
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Perl6 lexer fails with UnboundLocalError on quoted strings #### Description The Perl6 lexer is throwing an `UnboundLocalError: local variable 'end_pos' referenced before assignment` when processing certain Perl6 code files. This appears to happen when the lexer encounters quoted strings or other delimiter-based const...
diff --git a/pygments/lexers/perl.py b/pygments/lexers/perl.py index 3ec1944..4c920bd 100644 --- a/pygments/lexers/perl.py +++ b/pygments/lexers/perl.py @@ -511,33 +511,6 @@ class Perl6Lexer(ExtendedRegexLexer): closer = Perl6Lexer.PERL6_BRACKETS.get(opening_chars[0]) text = context.text - ...
["tests/examplefiles/perl6/RoleQ.pm6::", "tests/examplefiles/perl6/grammar-test.p6::", "tests/examplefiles/perl6/test.p6::"]
["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
28
3
1,180
0
0.6
1
0.75
1
0.29
81.145
5,682
swe_smith::train::49107
swe_smith
train
49,107
mozilla__bleach.73871d76.combine_file__alqrw6d7
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parsing produces incorrect output with malformed nested elements #### Description When parsing HTML with certain nested element structures, the parser produces unexpected output that doesn't match the expected DOM structure. This affects both cleaning and linkifying operations. #### Steps/Code to Reproduce ```...
diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py index 2869da0..4472944 100644 --- a/bleach/_vendor/html5lib/treebuilders/base.py +++ b/bleach/_vendor/html5lib/treebuilders/base.py @@ -271,12 +271,12 @@ class TreeBuilder(object): formatting elements and t...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_unclosed_tag", "tests/test_clean.py::test_stripping_tags[<ul><li><script></li></ul>-kwargs4-<ul><li></li></ul>]", "tests/test_clean.py::test_escaping_tags[<ul><li><script></li></ul>-<ul><l...
["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
31
31
1,120
0
0.6
1
0.75
1
0.29
81.145
5,683
swe_smith::train::974
swe_smith
train
974
pytest-dev__iniconfig.16793ead.combine_file__7sy6l55s
swesmith/pytest-dev__iniconfig.16793ead
pytest-dev/iniconfig
python
null
INI parser incorrectly handles sections and continuation lines #### Description The INI configuration parser is producing unexpected behavior when parsing sections and continuation lines. Basic INI files that should parse correctly are causing IndexError exceptions and incorrect parsing results. #### Steps/Code to R...
diff --git a/src/iniconfig/_parse.py b/src/iniconfig/_parse.py index 2d03437..7ebfc02 100644 --- a/src/iniconfig/_parse.py +++ b/src/iniconfig/_parse.py @@ -16,28 +16,22 @@ class _ParsedLine(NamedTuple): def parse_lines(path: str, line_iter: list[str]) -> list[_ParsedLine]: result: list[_ParsedLine] = [] - s...
["testing/test_iniconfig.py::test_tokenize[comment]", "testing/test_iniconfig.py::test_tokenize[comment2]", "testing/test_iniconfig.py::test_tokenize[section]", "testing/test_iniconfig.py::test_tokenize[value]", "testing/test_iniconfig.py::test_continuation_needs_perceeding_token", "testing/test_iniconfig.py::test_cont...
["testing/test_iniconfig.py::test_parse_empty", "testing/test_iniconfig.py::test_ParseError", "testing/test_iniconfig.py::test_api_import"]
jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead
true
null
1
34
25
1,060
0
0.6
1
0.75
1
0.29
81.145
5,684
r2e_gym::train::4787
r2e_gym
train
4,787
numpy__9106adfba085e93bf066d47e2da47b47839c8e08
numpy
numpy/numpy
python
9106adfba085e93bf066d47e2da47b47839c8e08
**Analysis:** - **Key Parts:** - **Commit Message:** BUG: Copy meshgrid after broadcasting. - **Tests Affected:** - `test_writeback` failed in the old commit because modifying one output array affected another when `copy=True`. - `test_broadcast_shape` failed because `_broadcast_shape()` raised a `ValueErr...
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -4505,23 +4505,20 @@ "Valid values for `indexing` are 'xy' and 'ij'.") s0 = (1,) * ndim - output = [np.asanyarray(x).reshape(s0[:i] + (-1,) + s0[i + 1::]) + ...
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -2265,6 +2265,16 @@ assert_(X.dtype == x.dtype) assert_(Y.dtype == y.dtype) + + def test_writeback(self): + ...
null
null
namanjain12/numpy_final:9106adfba085e93bf066d47e2da47b47839c8e08
true
null
2
19
null
2,072
0
0.75
1
0.6375
1
0.408667
81.14475
5,685
swe_smith::train::22479
swe_smith
train
22,479
tweepy__tweepy.91a41c6e.func_pm_ctrl_shuffle__evo72uf6
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
# IdIterator.next() method has incorrect code flow causing UnboundLocalError I found a bug in the `IdIterator.next()` method in the cursor.py file. The method has incorrect code flow that causes variables to be referenced before they're defined. ## Steps to reproduce Here's a simple script that reproduces the issue:...
diff --git a/tweepy/cursor.py b/tweepy/cursor.py index 1db73e1..7d6cc65 100644 --- a/tweepy/cursor.py +++ b/tweepy/cursor.py @@ -159,9 +159,17 @@ class IdIterator(BaseIterator): self.index = 0 def next(self): - """Fetch a set of items with IDs less than current set.""" if self.num_tweets...
["tests/test_cursors.py::TweepyCursorTests::testcursornext", "tests/test_cursors.py::TweepyCursorTests::testidcursoritems", "tests/test_cursors.py::TweepyCursorTests::testidcursorpages"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
19
3
1,359
0
0.6
1
0.75
1
0.289833
81.1445
5,686
swe_smith::train::28401
swe_smith
train
28,401
encode__starlette.db5063c2.combine_module__437jqexa
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
ExceptionMiddleware debug flag inverted and handlers swapped When initializing ExceptionMiddleware with `debug=True`, the debug mode is actually disabled, and when `debug=False` is passed, debug mode gets enabled. Additionally, HTTPException and WebSocketException handlers appear to be swapped. #### Steps/Code to Rep...
diff --git a/starlette/middleware/errors.py b/starlette/middleware/errors.py index 76ad776..528daa1 100644 --- a/starlette/middleware/errors.py +++ b/starlette/middleware/errors.py @@ -235,15 +235,14 @@ class ServerErrorMiddleware: is_collapsed = True if sys.version_info >= (3, 13): # pragm...
["tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[trio]", "tests/middleware/test_errors.py::test_debug_html[asyncio]", "tests/middleware/test_errors.py::test_debug_html[trio]", "tests/test_applications.py::test_400[asyncio]", "tests/t...
["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_contextvars[asyncio-CustomMiddlewareWithoutBaseHTTPMiddle...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
2
17
60
1,399
0
0.6
1
0.75
1
0.289833
81.1445
5,687
swe_smith::train::1990
swe_smith
train
1,990
pdfminer__pdfminer.six.1a8bd2f7.combine_file__4rq2q24o
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PSStackParser.pop() returns wrong number of elements When using PSStackParser.pop(n), the method returns n+1 elements instead of n elements from the stack. This causes "too many values to unpack" errors when the returned list is unpacked. #### Steps/Code to Reproduce ```python from pdfminer.psparser import PSStackPa...
diff --git a/pdfminer/psparser.py b/pdfminer/psparser.py index b486956..31a4269 100755 --- a/pdfminer/psparser.py +++ b/pdfminer/psparser.py @@ -349,16 +349,36 @@ class PSBaseParser: self._parse1 = self._parse_main return j - def _parse_literal_hex(self, s: bytes, i: int) -> int: - c = s[i...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
44
77
859
0
0.6
1
0.75
1
0.289833
81.1445
5,688
swe_smith::train::48438
swe_smith
train
48,438
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_cond__5o7kfbcm
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
JinjaTemplater fails to initialize environment with undefined loader variable #### Description The JinjaTemplater is failing to create a Jinja environment because the `loader` variable is not defined when creating the SandboxedEnvironment. This appears to be related to recent changes in the templater initialization l...
diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py index 934ded3..b6b438f 100644 --- a/src/sqlfluff/core/templaters/jinja.py +++ b/src/sqlfluff/core/templaters/jinja.py @@ -366,32 +366,7 @@ class JinjaTemplater(PythonTemplater): final_search_path = (loader_search_path or...
["test/core/templaters/jinja_test.py::test__templater_jinja[simple]", "test/core/templaters/jinja_test.py::test__templater_jinja[unboundlocal_bugfix]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[basic_block]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[strip_left_block]", "...
["test/core/templaters/jinja_test.py::test_dummy_undefined_fail_with_undefined_error", "test/core/templaters/jinja_test.py::test_undefined_magic_methods"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
26
73
1,219
0
0.6
1
0.75
1
0.289833
81.1445
5,689
swe_smith::train::31363
swe_smith
train
31,363
benoitc__gunicorn.bacbf8aa.combine_file__7l82ztnr
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Request objects missing should_close method after refactoring #### Description After some recent changes, HTTP request parsing is failing because the `should_close` method has been removed from the `Message` class. This method was used to determine whether a connection should be closed based on HTTP headers and versi...
diff --git a/gunicorn/http/message.py b/gunicorn/http/message.py index 59ce0bf..aafd95e 100644 --- a/gunicorn/http/message.py +++ b/gunicorn/http/message.py @@ -226,20 +226,6 @@ class Message: else: self.body = Body(EOFReader(self.unreader)) - def should_close(self): - if self.must_clo...
["tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_10.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_09.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_12.http]", "tests/test_inva...
["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
34
50
1,058
0
0.6
1
0.75
1
0.289667
81.144
5,690
swe_smith::train::5216
swe_smith
train
5,216
PyCQA__flake8.cf1542ce.combine_file__2fd9ywo2
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
# Flake8 exception formatting is incorrect ## Description I've found an issue with the exception formatting in Flake8. When a plugin fails during execution, the error message is incorrectly formatted, showing the wrong information. ## How to Reproduce Here's a simple script that demonstrates the issue: ```python f...
diff --git a/src/flake8/exceptions.py b/src/flake8/exceptions.py index 18646e7..ebe0b8e 100644 --- a/src/flake8/exceptions.py +++ b/src/flake8/exceptions.py @@ -40,9 +40,9 @@ class PluginRequestedUnknownParameters(Flake8Exception): def __init__(self, plugin_name: str, exception: Exception) -> None: """P...
["tests/unit/test_exceptions.py::test_pickleable[err1]", "tests/unit/test_file_checker.py::test_raises_exception_on_failed_plugin"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker....
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
18
2
1,378
0
0.6
1
0.75
1
0.289667
81.144
5,691
swe_smith::train::55563
swe_smith
train
55,563
RoaringBitmap__roaring.09c46a0a.func_pm_flip_operators__y125doyz
swesmith/RoaringBitmap__roaring.09c46a0a
roaringbitmap/roaring
go
null
setBitmapRange function causes index out of bounds panic #### Description The `setBitmapRange` function in `util.go` is causing runtime panics with "index out of range" errors when processing bitmap ranges. This appears to happen during bitmap operations involving run containers. #### Steps/Code to Reproduce The is...
diff --git a/util.go b/util.go index f58a86b..ed3dd37 100644 --- a/util.go +++ b/util.go @@ -162,17 +162,17 @@ func setBitmapRange(bitmap []uint64, start int, end int) { if start >= end { return } - firstword := start / 64 - endword := (end - 1) / 64 - if firstword == endword { - bitmap[firstword] |= (^uint64(0...
["TestParAggregations", "TestParAggregations/par1", "TestParAggregations/par1/advanced_case_with_runs", "TestParAggregations/par0", "TestParAggregations/par0/advanced_case_with_runs"]
["TestParAggregations/par1/simple_case", "TestParAggregations/par1/aggregate_nothing", "TestParAggregations/par1/single_bitmap", "TestParAggregations/par1/empty_and_single_elem_bitmaps", "TestParAggregations/par1/two_single_elem_disjoint_sets", "TestParAggregations/par1/3_bitmaps_with_CoW_set_(not_in_order_of_definitio...
jyangballin/swesmith.x86_64.roaringbitmap_1776_roaring.09c46a0a
true
null
1
12
5
1,498
0
0.6
1
0.75
1
0.289667
81.144
5,692
swe_smith::train::10084
swe_smith
train
10,084
paramiko__paramiko.23f92003.combine_file__a1eebs6o
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH connection failures with Curve25519 key exchange #### Description SSH connections using Curve25519 key exchange are failing with various errors including EOFError and authentication issues. The connection attempts seem to be dropping unexpectedly during the key exchange process. #### Steps/Code to Reproduce ```...
diff --git a/paramiko/kex_curve25519.py b/paramiko/kex_curve25519.py index 20c23e4..910f179 100644 --- a/paramiko/kex_curve25519.py +++ b/paramiko/kex_curve25519.py @@ -36,10 +36,8 @@ class KexCurve25519: def _perform_exchange(self, peer_key): secret = self.key.exchange(peer_key) if constant_time...
["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
23
122
1,277
0
0.6
1
0.75
1
0.2895
81.1435
5,693
swe_smith::train::24699
swe_smith
train
24,699
marshmallow-code__marshmallow.9716fc62.func_basic__gdkyto5t
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
OneOf validator inverts validation logic and returns None instead of the value Description I've discovered an issue with the `OneOf` validator in marshmallow. The validator is behaving in the opposite way than expected - it's rejecting values that are in the choices list and accepting values that are not in the choic...
diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py index e4536d8..905cc1a 100644 --- a/src/marshmallow/validate.py +++ b/src/marshmallow/validate.py @@ -597,12 +597,12 @@ class OneOf(Validator): def __call__(self, value: typing.Any) -> typing.Any: try: - if value not in se...
["tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors", "tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors_with_multiple_validators", "tests/test_validate.py::test_oneof", "tests/test_validate.py::test_oneof_custom_message"]
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
8
4
1,577
0
0.6
1
0.75
1
0.2895
81.1435
5,694
swe_smith::train::1296
swe_smith
train
1,296
Cog-Creators__Red-DiscordBot.33e0eac7.combine_module__5u3yb4dc
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
# Timedelta converter fails to handle time inputs ### Description I've discovered an issue with the `parse_timedelta` function in the commands converter. When trying to parse time inputs, the function fails to properly create a timedelta object. ### Expected behavior The `parse_timedelta` function should correctly ...
diff --git a/redbot/core/commands/converter.py b/redbot/core/commands/converter.py index 015a4c0..b86b414 100644 --- a/redbot/core/commands/converter.py +++ b/redbot/core/commands/converter.py @@ -141,12 +141,6 @@ def parse_timedelta( maximum = timedelta.max params = _parse_and_match(argument, allowed_uni...
["tests/core/test_commands.py::test_converter_timedelta", "tests/core/test_dev_commands.py::test_successful_run_debug", "tests/core/test_dev_commands.py::test_successful_run_eval", "tests/core/test_dev_commands.py::test_successful_run_repl_eval", "tests/core/test_dev_commands.py::test_successful_run_repl_exec", "tests/...
["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
2
36
6
1,016
0
0.6
1
0.75
1
0.289333
81.143
5,695
swe_smith::train::863
swe_smith
train
863
oauthlib__oauthlib.1fd52536.lm_rewrite__8sjlu5mp
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# Token type hint not working correctly in revocation and introspection endpoints I'm having an issue with the token revocation and introspection endpoints in oauthlib. When I try to use these endpoints with a token_type_hint, they're not working as expected. ## Problem When I try to revoke or introspect a token wit...
diff --git a/oauthlib/oauth2/rfc6749/endpoints/base.py b/oauthlib/oauth2/rfc6749/endpoints/base.py index 987fac6..52d330e 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/base.py +++ b/oauthlib/oauth2/rfc6749/endpoints/base.py @@ -67,11 +67,9 @@ class BaseEndpoint: def _raise_on_unsupported_token(self, request): ...
["tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_introspect", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_revoke", "tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py::IntrospectEndpointTest::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
6
13
1,614
0
0.6
1
0.75
1
0.289
81.142
5,696
swe_smith::train::22519
swe_smith
train
22,519
tweepy__tweepy.91a41c6e.func_pm_remove_loop__pkt4cqli
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Issue: AttributeError when accessing User attributes #### Description After applying the recent changes, it seems that accessing certain attributes of the `User` object results in an `AttributeError`. This issue is affecting several functionalities that rely on user data. #### Steps to Reproduce 1. Attempt to r...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..d3416ed 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -371,21 +371,7 @@ class User(Model, HashableID): def parse(cls, api, json): user = cls(api) setattr(user, '_json', json) - for k, v in json.items(): - ...
["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::testgetuser", "tests/test_api.py::TweepyAPITests::testsendanddeletedire...
["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
14
9
1,454
0
0.6
1
0.75
1
0.289
81.142
5,697
swe_smith::train::52638
swe_smith
train
52,638
pydicom__pydicom.7d361b3d.func_pm_remove_wrapper__tqia7v33
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
pixel_array function broken after recent changes #### Description The `pixel_array` function is not working properly. When trying to access pixel data from a DICOM dataset, it's failing with a `NameError` because the `decoder` variable is not defined. #### Steps/Code to Reproduce ```python import pydicom from pydic...
diff --git a/src/pydicom/pixels/utils.py b/src/pydicom/pixels/utils.py index f9a31a8..43f6b5a 100644 --- a/src/pydicom/pixels/utils.py +++ b/src/pydicom/pixels/utils.py @@ -1488,14 +1488,6 @@ def pixel_array( "has no (0002,0010) 'Transfer Syntax UID' element" ) - try: - ...
["tests/test_dataset.py::TestDataset::test_pixel_array_id_changed", "tests/test_dataset.py::TestDataset::test_pixel_array_unknown_syntax"]
["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
36
2
1,014
0
0.6
1
0.75
1
0.289
81.142
5,698
swe_smith::train::11875
swe_smith
train
11,875
andialbrecht__sqlparse.e57923b3.func_pm_ctrl_shuffle__mjr9au9l
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
# Bug in SQL comment stripping functionality ### Bug description The `strip_comments` functionality in sqlparse is not working correctly. When trying to strip comments from SQL statements, the function fails with an `UnboundLocalError` and doesn't properly handle comments. ### Reproduction The issue occurs when try...
diff --git a/sqlparse/filters/others.py b/sqlparse/filters/others.py index 6c1680e..e4da1fe 100644 --- a/sqlparse/filters/others.py +++ b/sqlparse/filters/others.py @@ -20,17 +20,16 @@ class StripCommentsFilter: return tlist.token_next_by(i=sql.Comment, t=T.Comment, idx=idx) def _get_insert_toke...
["tests/test_format.py::TestFormat::test_strip_comments_single", "tests/test_format.py::TestFormat::test_strip_comments_preserves_linebreak", "tests/test_format.py::TestFormat::test_strip_comments_preserves_hint", "tests/test_format.py::TestFormatReindent::test_duplicate_linebreaks", "tests/test_regressions.py::test_is...
["tests/test_cli.py::test_cli_main_empty", "tests/test_cli.py::test_parser_empty", "tests/test_cli.py::test_main_help", "tests/test_cli.py::test_valid_args", "tests/test_cli.py::test_invalid_choice", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfi...
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
true
null
1
9
5
1,554
0
0.6
1
0.75
1
0.289
81.142
5,699
swe_smith::train::25005
swe_smith
train
25,005
pylint-dev__astroid.b114f6b5.combine_file__8rzzz3jn
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Method call inference broken after recent changes #### Description Method calls on instances are not being inferred correctly. When calling methods on class instances, the inference system is raising AttributeError instead of properly inferring the method results. #### Steps/Code to Reproduce ```python import astro...
diff --git a/astroid/bases.py b/astroid/bases.py index d91a4c9..082d394 100644 --- a/astroid/bases.py +++ b/astroid/bases.py @@ -319,22 +319,21 @@ class BaseInstance(Proxy): # If the call is an attribute on the instance, we infer the attribute itself if isinstance(caller, nodes.Call) and isinstance(ca...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTest::test_datetime_astype_return", "tests/brain/numpy/test_core_umath.py::NumpyBrainCoreUmathTest::test_numpy_core_umath_functions_return_type", "tests/br...
["tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
30
120
1,134
0
0.6
1
0.75
1
0.289
81.142