selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
7,400
swe_smith::train::46772
swe_smith
train
46,772
python-trio__trio.cfbbe2c1.combine_module__ywd6cb8j
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
WeakKeyIdentityDictionary remove callback raises KeyError instead of silently handling missing keys #### Description The `WeakKeyIdentityDictionary` class in `trio._core._ki` has a regression where the remove callback now raises `KeyError` when trying to remove a key that's already been deleted, instead of silently h...
diff --git a/src/trio/_core/_entry_queue.py b/src/trio/_core/_entry_queue.py index 0691de3..3e90339 100644 --- a/src/trio/_core/_entry_queue.py +++ b/src/trio/_core/_entry_queue.py @@ -126,7 +126,7 @@ class EntryQueue: self.wakeup.close() def size(self) -> int: - return len(self.queue) + len(self...
["src/trio/_core/_tests/test_ki.py::test_weak_key_identity_dict_remove_callback_keyerror", "src/trio/_core/_tests/test_run.py::test_current_statistics"]
["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
2
10
2
1,144
0
0.6
1
0.75
1
0.224
80.947
7,401
swe_smith::train::21750
swe_smith
train
21,750
pexpect__ptyprocess.1067dbda.func_basic__5ty54eeb
swesmith/pexpect__ptyprocess.1067dbda
pexpect/ptyprocess
python
null
PtyProcessUnicode initialization fails with incorrect parameter order ### Description When initializing a PtyProcessUnicode object, it fails because the parameters are passed in the wrong order to the parent class constructor. ### How to Reproduce This issue can be reproduced by trying to create a PtyProcessUnicode...
diff --git a/ptyprocess/ptyprocess.py b/ptyprocess/ptyprocess.py index 0f05803..8437385 100644 --- a/ptyprocess/ptyprocess.py +++ b/ptyprocess/ptyprocess.py @@ -821,10 +821,10 @@ class PtyProcessUnicode(PtyProcess): string_type = unicode # analysis:ignore def __init__(self, pid, fd, encoding='utf-8', ...
["tests/test_spawn.py::PtyTestCase::test_spawn_sh_unicode"]
["tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_forever", "tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_timeout", "tests/test_invalid_binary.py::InvalidBinaryChars::test_invalid_binary", "tests/test_preexec_fn.py::PreexecFns::test_preexec", "tests/test_preexec_fn.py::PreexecFns::test_preexec_error", "tes...
jyangballin/swesmith.x86_64.pexpect_1776_ptyprocess.1067dbda
true
null
1
6
1
1,224
0
0.6
1
0.75
1
0.224
80.947
7,402
swe_smith::train::5191
swe_smith
train
5,191
agronholm__exceptiongroup.0b4f4937.func_pm_remove_loop__5rijazp0
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
No suggestions for AttributeError or NameError **Describe the bug** When encountering an AttributeError or NameError, the error message doesn't include helpful suggestions for similar names that might have been intended. **To Reproduce** ```python >>> my_list = [] >>> my_list.attend Traceback (most recent call last)...
diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py index 4c52d77..e576850 100644 --- a/src/exceptiongroup/_formatting.py +++ b/src/exceptiongroup/_formatting.py @@ -521,25 +521,8 @@ def _compute_suggestion_error(exc_value, tb): return None best_distance = wrong_name_len ...
["tests/test_formatting.py::test_nameerror_suggestions[patched]", "tests/test_formatting.py::test_nameerror_suggestions[unpatched]", "tests/test_formatting.py::test_nameerror_suggestions_in_group[patched]", "tests/test_formatting.py::test_nameerror_suggestions_in_group[unpatched]"]
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
17
4
1,004
0
0.6
1
0.75
1
0.224
80.947
7,403
swe_smith::train::22279
swe_smith
train
22,279
tweepy__tweepy.91a41c6e.func_basic__3atytmgf
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
TypeError in API Decorator Functionality It seems there's a problem with the decorator functionality in the `tweepy/api.py` file. After a recent change, several API methods are throwing a `TypeError` when executed. This issue is affecting a wide range of functionalities, including creating and destroying blocks, updat...
diff --git a/tweepy/api.py b/tweepy/api.py index 37caf07..0021231 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -41,11 +41,11 @@ def payload(payload_type, **payload_kwargs): def decorator(method): @functools.wraps(method) def wrapper(*args, **kwargs): - kwargs['payload_list'] = pay...
["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...
["tests/test_api.py::TweepyAPITests::testparserargumenthastobeaparserinstance", "tests/test_api.py::TweepyAPITests::testupdateprofilebannerimage", "tests/test_api.py::TweepyCacheTests::testfilecache", "tests/test_api.py::TweepyCacheTests::testmemorycache", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_bookma...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
8
61
1,184
0
0.6
1
0.75
1
0.224
80.947
7,404
swe_smith::train::21943
swe_smith
train
21,943
life4__textdistance.c3aca916.func_basic__wh2w23hx
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
normalized_distance returns incorrect values causing ZeroDivisionError #### Description The `normalized_distance` method is returning incorrect values and causing division by zero errors when comparing identical strings or when the maximum distance is zero. #### Steps/Code to Reproduce ```python import textdistance...
diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py index 5ce8cc7..d2b490c 100644 --- a/textdistance/algorithms/base.py +++ b/textdistance/algorithms/base.py @@ -45,9 +45,9 @@ class Base: """Get distance from 0 to 1 """ maximum = self.maximum(*sequences) - if...
["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...
["tests/test_common.py::test_normalization_range[alg21]", "tests/test_common.py::test_normalization_by_one[alg21]", "tests/test_common.py::test_normalization_same[alg21]", "tests/test_common.py::test_normalization_monotonic[alg21]", "tests/test_common.py::test_no_common_chars[alg0]", "tests/test_common.py::test_no_comm...
jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916
true
null
1
6
115
1,224
0
0.6
1
0.75
1
0.224
80.947
7,405
swe_smith::train::25633
swe_smith
train
25,633
pylint-dev__astroid.b114f6b5.func_basic__fcsu5flx
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Compare nodes return None instead of Compare instance #### Description When parsing comparison expressions like `1 <= 2` or `x == y`, the AST rebuilder is returning `None` instead of a proper `Compare` node instance. This breaks inference and causes AttributeError when trying to access methods or attributes on the co...
diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py index 4c77906..158170a 100644 --- a/astroid/rebuilder.py +++ b/astroid/rebuilder.py @@ -832,9 +832,9 @@ class TreeRebuilder: """Visit a Compare node by returning a fresh instance of it.""" newnode = nodes.Compare( lineno=node.lineno...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_mul...
["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
12
167
1,104
0
0.6
1
0.75
1
0.224
80.947
7,406
r2e_gym::train::2
r2e_gym
train
2
orange3__9764be4fa30b1ae85db3b875039f0a2983531a9d
orange3
biolab/orange3
python
9764be4fa30b1ae85db3b875039f0a2983531a9d
**Title**: ImportError: Unable to import `table_to_frame` from `Orange.data.pandas_compat` **Description**: When trying to convert an `Orange.data.Table` instance to a pandas `DataFrame` using the `table_to_frame` function, an `ImportError` is raised. This prevents the conversion process from completing successfully. ...
diff --git a/Orange/data/pandas_compat.py b/Orange/data/pandas_compat.py --- a/Orange/data/pandas_compat.py +++ b/Orange/data/pandas_compat.py @@ -11,7 +11,7 @@ ContinuousVariable, ) -__all__ = ['table_from_frame'] +__all__ = ['table_from_frame', 'table_to_frame'] def table_from_frame(df, *, force_nominal=...
diff --git a/Orange/data/tests/test_pandas.py b/Orange/data/tests/test_pandas.py --- a/Orange/data/tests/test_pandas.py +++ b/Orange/data/tests/test_pandas.py @@ -1,6 +1,6 @@ import unittest import numpy as np -from Orange.data import ContinuousVariable, DiscreteVariable, TimeVariable +from Orange.data import Continu...
null
null
namanjain12/orange3_final:9764be4fa30b1ae85db3b875039f0a2983531a9d
true
null
1
51
null
1,036
0
0.75
1
0.6375
1
0.342667
80.94675
7,407
r2e_gym::train::4413
r2e_gym
train
4,413
numpy__cd761d81b571525ac6c2cca36da6bd270bb8357d
numpy
numpy/numpy
python
cd761d81b571525ac6c2cca36da6bd270bb8357d
**Title:** `recfunctions.join_by` fails when joining arrays with colliding field names of different dtypes **Description:** When using `numpy.lib.recfunctions.join_by` to join two structured arrays on a common key, the function fails if both arrays contain fields with the same name but different data types. Instead of...
diff --git a/numpy/lib/recfunctions.py b/numpy/lib/recfunctions.py --- a/numpy/lib/recfunctions.py +++ b/numpy/lib/recfunctions.py @@ -963,27 +963,28 @@ ndtype = [list(_) for _ in r1k.dtype.descr] # Add the other fields ndtype.extend(list(_) for _ in r1.dtype.descr if _[0] not in key) - # Find the new...
diff --git a/numpy/lib/tests/test_recfunctions.py b/numpy/lib/tests/test_recfunctions.py --- a/numpy/lib/tests/test_recfunctions.py +++ b/numpy/lib/tests/test_recfunctions.py @@ -656,6 +656,19 @@ b = np.ones(3, dtype=[('c', 'u1'), ('b', 'f4'), ('a', 'i4')]) assert_raises(ValueError, join_by, ['a', 'b'...
null
null
namanjain12/numpy_final:cd761d81b571525ac6c2cca36da6bd270bb8357d
true
null
1
25
null
1,556
0
0.75
1
0.6375
1
0.342667
80.94675
7,408
swe_smith::train::43655
swe_smith
train
43,655
cloudpipe__cloudpickle.6220b0ce.func_pm_remove_wrapper__6h2csdo6
swesmith/cloudpipe__cloudpickle.6220b0ce
cloudpipe/cloudpickle
python
null
# File pickling fails with NameError: name 'contents' is not defined **Describe the bug** When trying to pickle a file object using cloudpickle, it fails with a NameError because the variable 'contents' is not defined. This happens when trying to pickle any file object. **To Reproduce** The following code reproduce...
diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 8c50ba1..0527bf4 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -962,24 +962,12 @@ def _file_reduce(obj): name = obj.name retval = io.StringIO() - - try: - # Read the whole file - curloc ...
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_r_mode", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_seek"]
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_w_mode", "tests/cloudpickle_test.py::test_extract_class_dict", "tests/cloudpickle_test.py::Cl...
jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce
true
null
1
12
4
1,103
0
0.6
1
0.75
1
0.223833
80.9465
7,409
swe_smith::train::47149
swe_smith
train
47,149
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__nqjlh9sa
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Traceback concatenation broken after recent changes #### Description The traceback concatenation functionality appears to be broken. When trying to concatenate tracebacks, getting an `UnboundLocalError` for variables that should be defined. #### Steps/Code to Reproduce ```python import trio._core._concat_tb as conc...
diff --git a/src/trio/_core/_concat_tb.py b/src/trio/_core/_concat_tb.py index a146961..c9681f7 100644 --- a/src/trio/_core/_concat_tb.py +++ b/src/trio/_core/_concat_tb.py @@ -46,13 +46,16 @@ except ImportError: ] def copy_tb(base_tb: TracebackType, tb_next: TracebackType | None) -> TracebackType: + ...
["src/trio/_core/_tests/test_exceptiongroup_gc.py::test_concat_tb", "src/trio/_core/_tests/test_run.py::test_nursery_collapse[False]"]
["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
25
2
843
0
0.6
1
0.75
1
0.223833
80.9465
7,410
swe_smith::train::48166
swe_smith
train
48,166
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_invert_if__uzefmkac
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Linting rules returning list of LintResult objects causes TypeError #### Description When a linting rule returns a list of `LintResult` objects, the linter raises a `TypeError` with the message "Got unexpected result [...] back from linting rule". This appears to be a regression where the condition check for handling...
diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py index 1f00fb3..3ca4b09 100644 --- a/src/sqlfluff/core/rules/base.py +++ b/src/sqlfluff/core/rules/base.py @@ -572,7 +572,13 @@ class BaseRule(metaclass=RuleMetaclass): ) elif isinstance(res, list) and all( ...
["test/core/rules/noqa_test.py::test__linter__raises_malformed_noqa", "test/core/rules/noqa_test.py::test_linter_noqa", "test/core/rules/noqa_test.py::test_linter_noqa_tmp", "test/core/rules/noqa_test.py::test_linter_disable_noqa_except", "test/core/rules/rules_test.py::test__rules__filter_unparsable"]
["test/core/rules/docstring_test.py::test_content_count[\\\\*\\\\*Anti-pattern\\\\*\\\\*-1]", "test/core/rules/docstring_test.py::test_keyword_anti_before_best", "test/core/rules/docstring_test.py::test_backtick_replace", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input0-True]", "test/core/rul...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
15
5
1,043
0
0.6
1
0.75
1
0.223833
80.9465
7,411
swe_smith::train::26452
swe_smith
train
26,452
pylint-dev__astroid.b114f6b5.func_pm_remove_cond__u19106kr
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
String formatting with % operator returns UnboundLocalError #### Description When using the % operator for string formatting with tuples, an UnboundLocalError is raised because the `values` variable is referenced before assignment in certain code paths. #### Steps/Code to Reproduce ```python import astroid # This ...
diff --git a/astroid/nodes/_base_nodes.py b/astroid/nodes/_base_nodes.py index 65b703d..c2028e5 100644 --- a/astroid/nodes/_base_nodes.py +++ b/astroid/nodes/_base_nodes.py @@ -357,13 +357,7 @@ class OperatorNode(NodeNG): on the call to '%' to see if the result is actually uninferable. """ if...
["tests/test_inference.py::InferenceTest::test_string_interpolation", "tests/test_inference.py::TestOldStyleStringFormatting::test_old_style_string_formatting[empty-indexes]", "tests/test_inference.py::TestOldStyleStringFormatting::test_old_style_string_formatting[numbered-indexes]", "tests/test_inference.py::TestOldSt...
["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
7
7
1,203
0
0.6
1
0.75
1
0.223833
80.9465
7,412
swe_smith::train::10619
swe_smith
train
10,619
paramiko__paramiko.23f92003.func_basic__uerchzzp
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH authentication fails with incorrect boolean values in auth response #### Description SSH authentication is not working correctly - the authentication response messages contain inverted boolean values, causing authentication failures and unexpected behavior during the auth process. #### Steps/Code to Reproduce `...
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index bc7f298..570a005 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -510,7 +510,6 @@ Error Message: {} ) def _send_auth_result(self, username, method, result): - # okay, send result m = Messag...
["tests/agent.py::AgentKey_::fields::defers_to_inner_key_when_present[ed25519]", "tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/test_client.py::SSHClientTest::test_multi...
["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
9
7
1,163
0
0.6
1
0.75
1
0.223833
80.9465
7,413
swe_smith::train::51217
swe_smith
train
51,217
marshmallow-code__apispec.8b421526.func_basic__vwyhju7c
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
Schema registration returns None instead of self #### Description When registering a schema using `spec.components.schema()`, the method now returns `None` instead of returning `self` as expected. This breaks method chaining and existing code that relies on the return value. #### Steps/Code to Reproduce ```python f...
diff --git a/src/apispec/core.py b/src/apispec/core.py index e9ccb40..c1026bc 100644 --- a/src/apispec/core.py +++ b/src/apispec/core.py @@ -164,16 +164,16 @@ class Components: raise DuplicateComponentNameError( f'Another schema with name "{component_id}" is already registered.' ...
["tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestComponents::test_schema[2.0]", "tests/test_core.py::TestComponents::test_schema[3.0.0]", "tests/test_core.py::TestComponents::test_schema_is_chainable[2.0]", "tests/test_core.py::TestComponents::test_schema_is_chainable...
["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::TestTags::test_tag[2.0]", "tests/test_core.py::TestTags::test_tag[3.0.0]", "tests/test_core.py...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
true
null
1
10
188
1,143
0
0.6
1
0.75
1
0.223833
80.9465
7,414
swe_smith::train::39499
swe_smith
train
39,499
pallets__jinja.ada0a9a6.func_pm_remove_assign__pyaq91xd
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
NameError in template compilation when using import statements When using `{% from %}` or `{% import %}` statements in Jinja2 templates, I'm getting `UnboundLocalError` exceptions during template rendering. This seems to affect various import scenarios including context imports and trailing comma syntax. #### Steps t...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..6e36296 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1134,7 +1134,7 @@ class CodeGenerator(NodeVisitor): if isinstance(name, tuple): name, alias = name else: - al...
["tests/test_async.py::TestAsyncImports::test_context_imports", "tests/test_async.py::TestAsyncImports::test_trailing_comma", "tests/test_async.py::TestAsyncImports::test_from_import_with_globals", "tests/test_core_tags.py::TestMacros::test_include", "tests/test_imports.py::TestImports::test_context_imports", "tests/te...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
7
11
1,203
0
0.6
1
0.75
1
0.223833
80.9465
7,415
swe_smith::train::18191
swe_smith
train
18,191
msiemens__tinydb.10644a0e.combine_file__j9mopkhq
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
# FrozenDict.pop() returns None instead of raising TypeError ## Problem The `FrozenDict.pop()` method is not behaving as expected. It should raise a TypeError when attempting to modify the immutable dictionary, but instead it returns None or the default value. ## Steps to reproduce ```python from tinydb.utils import ...
diff --git a/tinydb/utils.py b/tinydb/utils.py index e1f01fb..1e6d730 100644 --- a/tinydb/utils.py +++ b/tinydb/utils.py @@ -125,7 +125,9 @@ class FrozenDict(dict): return hash(tuple(sorted(self.items()))) def _immutable(self, *args, **kws): - raise TypeError('object is immutable') + if no...
["tests/test_utils.py::test_freeze"]
["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
8
1
1,183
0
0.6
1
0.75
1
0.223833
80.9465
7,416
swe_smith::train::10144
swe_smith
train
10,144
paramiko__paramiko.23f92003.combine_file__kmngvtb1
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Exception constructor arguments swapped in ssh_exception.py #### Description The constructor arguments for `BadAuthenticationType` and `ChannelException` are being passed in the wrong order to their parent classes, causing incorrect attribute assignment and breaking exception handling. #### Steps/Code to Reproduce ...
diff --git a/paramiko/ssh_exception.py b/paramiko/ssh_exception.py index 2b68ebe..b8a3d51 100644 --- a/paramiko/ssh_exception.py +++ b/paramiko/ssh_exception.py @@ -60,11 +60,9 @@ class BadAuthenticationType(AuthenticationException): # TODO 4.0: remove explanation kwarg def __init__(self, explanation, types...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/test_ssh_exception.py::ExceptionStringDisplayTest::test_BadAuthenticationType", "tests/test_ssh_exception.py::ExceptionStringDisplayTest::test_ChannelException", "tests/test_transport.py::TransportTest::test_chann...
["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
12
8
1,103
0
0.6
1
0.75
1
0.223833
80.9465
7,417
swe_smith::train::20967
swe_smith
train
20,967
tobymao__sqlglot.036601ba.func_pm_remove_cond__ebjq9boo
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Set operation parsing broken - DISTINCT/ALL handling removed When parsing set operations (UNION, INTERSECT, EXCEPT), the parser no longer handles DISTINCT/ALL keywords properly. This causes a NameError when trying to access the `distinct` variable that was previously defined but is now missing from the parsing logic. ...
diff --git a/sqlglot/parser.py b/sqlglot/parser.py index 248a128..cc60aa8 100644 --- a/sqlglot/parser.py +++ b/sqlglot/parser.py @@ -4604,15 +4604,6 @@ class Parser(metaclass=_Parser): comments = self._prev.comments - if self._match(TokenType.DISTINCT): - distinct: t.Optional[...
["tests/dialects/test_bigquery.py::TestBigQuery::test_bigquery", "tests/dialects/test_bigquery.py::TestBigQuery::test_errors", "tests/dialects/test_bigquery.py::TestBigQuery::test_pushdown_cte_column_names", "tests/dialects/test_bigquery.py::TestBigQuery::test_remove_precision_parameterized_types", "tests/dialects/test...
["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
10
56
1,143
0
0.6
1
0.75
1
0.223833
80.9465
7,418
swe_smith::train::6942
swe_smith
train
6,942
cantools__cantools.0c6a7871.combine_file__446ox3s6
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
DID constructor parameters assigned to wrong attributes #### Description When creating a DID object, the constructor parameters are being assigned to the wrong internal attributes, causing the object to have incorrect values for identifier, name, length, and datas. #### Steps/Code to Reproduce ```python import cant...
diff --git a/src/cantools/database/diagnostics/did.py b/src/cantools/database/diagnostics/did.py index 5a0712c..fde79f7 100644 --- a/src/cantools/database/diagnostics/did.py +++ b/src/cantools/database/diagnostics/did.py @@ -15,10 +15,10 @@ class Did: name, length, ...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanTo...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
10
7
1,143
0
0.6
1
0.75
1
0.223833
80.9465
7,419
swe_smith::train::4938
swe_smith
train
4,938
bottlepy__bottle.a8dfef30.func_pm_ctrl_shuffle__9i1vfx86
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
BaseResponse.headerlist property returns undefined variable #### Description The `headerlist` property in `BaseResponse` class is broken and returns an undefined variable `out` before it's initialized. #### Steps/Code to Reproduce ```python import bottle # Create a simple response response = bottle.BaseResponse() ...
diff --git a/bottle.py b/bottle.py index 286b5bc..2592e1d 100755 --- a/bottle.py +++ b/bottle.py @@ -1765,22 +1765,21 @@ class BaseResponse(object): @property def headerlist(self): - """ WSGI conform list of (header, value) tuples. """ - out = [] - headers = list(self._headers.items()) ...
["test/test_auth.py::TestBasicAuth::test__header", "test/test_environ.py::TestResponse::test_append_header", "test/test_environ.py::TestResponse::test_clone_cookie", "test/test_environ.py::TestResponse::test_delete_cookie", "test/test_environ.py::TestResponse::test_set_cookie", "test/test_environ.py::TestResponse::test...
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module", "test/test_config.py::TestConfDict::test_meta", ...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
21
94
923
0
0.6
1
0.75
1
0.223833
80.9465
7,420
swe_smith::train::31576
swe_smith
train
31,576
benoitc__gunicorn.bacbf8aa.func_basic__x5et5tu5
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
post_request hook validation broken for 3-argument callbacks #### Description The `post_request` hook validation is incorrectly rejecting valid 3-argument callbacks and has wrong parameter ordering in the wrapper functions. #### Steps/Code to Reproduce ```python from gunicorn.config import validate_post_request # ...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..e4d0164 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -484,17 +484,17 @@ def validate_group(val): def validate_post_request(val): - val = validate_callable(-1)(val) + val = validate_callable(0)(val) largs = util.get_arit...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
["tests/test_config.py::test_callable_validation_for_string", "tests/test_http.py::test_method_pattern", "tests/test_http.py::test_readline_empty_body", "tests/test_http.py::test_readline_zero_size", "tests/test_http.py::test_readline_new_line_before_size", "tests/test_http.py::test_readline_new_line_after_size", "test...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
8
170
1,182
0
0.6
1
0.75
1
0.223667
80.946
7,421
swe_smith::train::46586
swe_smith
train
46,586
python-trio__trio.cfbbe2c1.combine_file__97qlilvi
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
generic_function breaks after initialization #### Description The `generic_function` class in `trio._util` appears to be broken after initialization. When trying to call a function wrapped with `generic_function`, it raises a `TypeError: 'NoneType' object is not callable`. #### Steps/Code to Reproduce ```python fro...
diff --git a/src/trio/_util.py b/src/trio/_util.py index 994a465..b6490fb 100644 --- a/src/trio/_util.py +++ b/src/trio/_util.py @@ -254,8 +254,9 @@ class generic_function(Generic[RetT]): self, fn: Callable[..., RetT], ) -> None: - update_wrapper(self, fn) self._fn = fn + u...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
["src/trio/_core/_tests/test_exceptiongroup_gc.py::test_concat_tb", "src/trio/_core/_tests/test_exceptiongroup_gc.py::test_ExceptionGroup_catch_doesnt_create_cyclic_garbage", "src/trio/_core/_tests/test_guest_mode.py::test_guest_trivial", "src/trio/_core/_tests/test_guest_mode.py::test_guest_can_do_io", "src/trio/_core...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
21
84
922
0
0.6
1
0.75
1
0.223667
80.946
7,422
swe_smith::train::18061
swe_smith
train
18,061
pyasn1__pyasn1.0f07d724.lm_rewrite__yicbnpa5
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
### Issue with `isPrefixOf` Method in `RelativeOID` #### Summary The `isPrefixOf` method in the `RelativeOID` class is not functioning as expected when comparing with non-`ObjectIdentifier` types. This leads to unexpected behavior and assertion errors. #### Reproduction Steps The issue can be reproduced with the foll...
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py index 9aff5e6..b62c0c9 100644 --- a/pyasn1/type/univ.py +++ b/pyasn1/type/univ.py @@ -1249,12 +1249,14 @@ class RelativeOID(base.SimpleAsn1Type): :obj:`True` if this |ASN.1| object is a parent (e.g. prefix) of the other |ASN.1| object or :...
["tests/type/test_univ.py::RelativeOID::testPrefix"]
["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
6
1
1,222
0
0.6
1
0.75
1
0.223667
80.946
7,423
swe_smith::train::25044
swe_smith
train
25,044
pylint-dev__astroid.b114f6b5.combine_file__g51hcpao
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Exception instance attributes not working correctly after recent changes #### Description Exception instances are not returning the correct attributes when accessed. The special attributes like `name`, `path`, `text`, `strerror`, and `object` are not being resolved properly. #### Steps/Code to Reproduce ```python i...
diff --git a/astroid/objects.py b/astroid/objects.py index 9f638d4..2301f50 100644 --- a/astroid/objects.py +++ b/astroid/objects.py @@ -235,7 +235,7 @@ class ExceptionInstance(bases.Instance): @cached_property def special_attributes(self): - qname = self.qname() + qname = self.qname().lower()...
["tests/brain/test_brain.py::TestFunctoolsPartial::test_inferred_partial_function_calls", "tests/brain/test_brain.py::test_oserror_model", "tests/test_object_model.py::ExceptionModelTest::test_import_error", "tests/test_object_model.py::ExceptionModelTest::test_syntax_error", "tests/test_object_model.py::ExceptionModel...
["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
6
5
1,222
0
0.6
1
0.75
1
0.223667
80.946
7,424
swe_smith::train::40258
swe_smith
train
40,258
scanny__python-pptx.278b47b1.combine_file__xykcufbq
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
spTree property returns None instead of actual spTree element #### Description When accessing the `spTree` property on slide elements, it returns `None` instead of the expected `CT_GroupShape` element. This breaks functionality that depends on accessing shapes and placeholders through the spTree. #### Steps/Code to ...
diff --git a/src/pptx/oxml/slide.py b/src/pptx/oxml/slide.py index 37a9780..fcbabba 100644 --- a/src/pptx/oxml/slide.py +++ b/src/pptx/oxml/slide.py @@ -31,7 +31,9 @@ class _BaseSlideElement(BaseOxmlElement): @property def spTree(self) -> CT_GroupShape: """Return required `p:cSld/p:spTree` grandchild...
["tests/oxml/test_slide.py::DescribeCT_NotesMaster::it_can_create_a_default_notesMaster_element", "tests/test_slide.py::Describe_BaseMaster::it_provides_access_to_its_placeholders", "tests/test_slide.py::Describe_BaseMaster::it_provides_access_to_its_shapes", "tests/test_slide.py::DescribeNotesSlide::it_provides_access...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
6
9
1,222
0
0.6
1
0.75
1
0.223667
80.946
7,425
swe_smith::train::47005
swe_smith
train
47,005
python-trio__trio.cfbbe2c1.func_basic__uy4v8wp2
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SocketStream.setsockopt() broken when length parameter is provided #### Description The `setsockopt()` method on `SocketStream` has incorrect logic for handling the `length` parameter, causing it to behave opposite to what's expected. #### Steps/Code to Reproduce ```python import trio import socket async def main(...
diff --git a/src/trio/_highlevel_socket.py b/src/trio/_highlevel_socket.py index c04e66e..ecfaa6e 100644 --- a/src/trio/_highlevel_socket.py +++ b/src/trio/_highlevel_socket.py @@ -164,17 +164,17 @@ class SocketStream(HalfCloseableStream): See :meth:`socket.socket.setsockopt` for details. """ - ...
["src/trio/_tests/test_highlevel_socket.py::test_SocketStream_basics"]
["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
10
1
1,142
0
0.6
1
0.75
1
0.223667
80.946
7,426
swe_smith::train::23897
swe_smith
train
23,897
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__xoicj0kq
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
get_rectangle_coordinates fails when top_right parameter is provided #### Description The `get_rectangle_coordinates` function in `sunpy.coordinates.utils` raises an AttributeError when the `top_right` parameter is provided. The function attempts to call `transform_to` on a `None` object. #### Steps/Code to Reproduc...
diff --git a/sunpy/coordinates/utils.py b/sunpy/coordinates/utils.py index 6f868af..5a5aeff 100644 --- a/sunpy/coordinates/utils.py +++ b/sunpy/coordinates/utils.py @@ -369,9 +369,6 @@ def get_rectangle_coordinates(bottom_left, *, top_right=None, bottom_left = bottom_left[0] elif top_right is not None: ...
["sunpy/coordinates/tests/test_utils.py::test_rectangle_width_height", "sunpy/coordinates/tests/test_utils.py::test_rectangle_mismatching_frames_missing_parameters", "sunpy/coordinates/tests/test_utils.py::test_rectangle_top_right", "sunpy/coordinates/tests/test_utils.py::test_rectangle_bottom_left_different_types"]
["sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start0-end0]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start1-end1]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start2-end2]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start3-end...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
6
4
1,222
0
0.6
1
0.75
1
0.223667
80.946
7,427
swe_smith::train::13317
swe_smith
train
13,317
python-openxml__python-docx.0cf6d71f.func_basic__7ovbberf
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Core properties datetime formatting broken for created/modified dates #### Description When setting datetime values on core properties like `created` and `modified`, the datetime formatting is incorrect and causes XML validation issues. The dates are being formatted with day-month-year instead of the expected year-mo...
diff --git a/src/docx/oxml/coreprops.py b/src/docx/oxml/coreprops.py index 8ba9ff4..63a8382 100644 --- a/src/docx/oxml/coreprops.py +++ b/src/docx/oxml/coreprops.py @@ -259,20 +259,16 @@ class CT_CoreProperties(BaseOxmlElement): def _set_element_datetime(self, prop_name: str, value: dt.datetime): """Set...
["tests/opc/parts/test_coreprops.py::DescribeCorePropertiesPart::it_can_create_a_default_core_properties_part", "tests/opc/test_coreprops.py::DescribeCoreProperties::it_can_change_the_date_property_values[last_printed-cp:lastPrinted-value1-2014-06-04T04:00:00Z-]"]
["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
14
2
1,061
0
0.6
1
0.75
1
0.2235
80.9455
7,428
swe_smith::train::18857
swe_smith
train
18,857
seperman__deepdiff.ed252022.func_basic__kntplw7j
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
literal_eval_extended returns None instead of raising exception for invalid input #### Description The `literal_eval_extended` function in `deepdiff.helper` is returning `None` for strings that don't match expected patterns, instead of raising an exception. This causes issues when processing datetime objects and othe...
diff --git a/deepdiff/helper.py b/deepdiff/helper.py index ff6d668..0b86f64 100644 --- a/deepdiff/helper.py +++ b/deepdiff/helper.py @@ -601,11 +601,11 @@ def literal_eval_extended(item): return literal_eval(item) except (SyntaxError, ValueError): for begin, end, func in LITERAL_EVAL_PRE_PROCESS:...
["tests/test_diff_text.py::TestDeepDiffText::test_datetime_in_key", "tests/test_model.py::TestDictRelationship::test_objkey"]
["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
6
2
1,221
0
0.6
1
0.75
1
0.2235
80.9455
7,429
swe_smith::train::27975
swe_smith
train
27,975
jsvine__pdfplumber.02ff4313.func_pm_remove_cond__188dsrxz
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
Structure tree parsing fails with KeyError when processing PDF objects #### Description When parsing PDF structure trees, the code encounters a KeyError when trying to access object references. This appears to happen when the structure tree contains dictionary objects that need to be processed but the reference handl...
diff --git a/pdfplumber/structure.py b/pdfplumber/structure.py index 88749d7..dd7a222 100644 --- a/pdfplumber/structure.py +++ b/pdfplumber/structure.py @@ -395,14 +395,6 @@ class PDFStructTree(Findable): if isinstance(ref, int): next_elements.append(ref) conti...
["tests/test_convert.py::Test::test_cli_structure_text", "tests/test_structure.py::TestUnparsed::test_unparsed_pages", "tests/test_structure.py::TestMany::test_chelsea_pdta", "tests/test_structure.py::TestMany::test_hello_structure", "tests/test_structure.py::TestMany::test_missing_parenttree", "tests/test_structure.py...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
9
6
1,161
0
0.6
1
0.75
1
0.2235
80.9455
7,430
swe_smith::train::44724
swe_smith
train
44,724
mahmoud__glom.fb3c4e76.func_basic__flahkgmr
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Regex constructor raises ValueError for valid func parameter #### Description When creating a Regex object with a valid func parameter like `re.search` or `re.match`, the constructor incorrectly raises a ValueError claiming the func must be one of the valid functions, even when it actually is. #### Steps/Code to Rep...
diff --git a/glom/matching.py b/glom/matching.py index 798ac40..cb7cb33 100644 --- a/glom/matching.py +++ b/glom/matching.py @@ -215,20 +215,20 @@ class Regex: __slots__ = ('flags', 'func', 'match_func', 'pattern') def __init__(self, pattern, flags=0, func=None): - if func not in _RE_VALID_FUNCS: + ...
["glom/test/test_match.py::test_reprs", "glom/test/test_match.py::test_regex", "glom/test/test_match.py::test_nested_struct"]
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
12
3
1,101
0
0.6
1
0.75
1
0.2235
80.9455
7,431
swe_smith::train::4125
swe_smith
train
4,125
pygments__pygments.27649ebb.func_basic__wjgvq6e6
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
HtmlDjangoLexer incorrectly prioritized over other lexers in guessing #### Description The HtmlDjangoLexer is being incorrectly selected when guessing lexers for code that should be identified as other languages. This affects various lexers including C, EasyTrieve, Ezhil, Forth, CMake, and others. #### Steps/Code to...
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index e5adf34..8e18d2f 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -1311,10 +1311,10 @@ class HtmlDjangoLexer(DelegatingLexer): super().__init__(HtmlLexer, DjangoLexer, **options) def analyse_tex...
["tests/test_cmdline.py::test_C_opt", "tests/test_basic_api.py::test_get_lexers", "tests/test_guess.py::test_guess_lexer_forth", "tests/test_guess.py::test_guess_lexer_gap", "tests/test_guess.py::test_guess_lexer_ezhil", "tests/test_guess.py::test_guess_carbon_lexer", "tests/test_guess.py::test_guess_lexer_brainfuck", ...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
6
15
1,221
0
0.6
1
0.75
1
0.2235
80.9455
7,432
swe_smith::train::27451
swe_smith
train
27,451
tkrajina__gpxpy.09fc46b3.lm_rewrite__jppex0su
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
# Bug: `total_seconds()` function doesn't handle None values ## Bug summary The `total_seconds()` function in `gpxpy/utils.py` doesn't handle `None` values properly. When a `None` value is passed to the function, it tries to access attributes on a `None` object instead of returning `None`. ## Code for reproduction ...
diff --git a/gpxpy/utils.py b/gpxpy/utils.py index 4ee2981..c777806 100644 --- a/gpxpy/utils.py +++ b/gpxpy/utils.py @@ -66,12 +66,11 @@ def to_number(s: str, default: float=0, nan_value: Optional[float]=None) -> floa return default -def total_seconds(timedelta: mod_datetime.timedelta) -> float: +def total_sec...
["test.py::GPXTests::test_total_time_none"]
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
9
1
1,161
0
0.6
1
0.75
1
0.2235
80.9455
7,433
swe_smith::train::4788
swe_smith
train
4,788
bottlepy__bottle.a8dfef30.func_basic__gnywfkgc
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
ResourceManager.lookup() returns None for existing files #### Description The ResourceManager.lookup() method is not finding files that exist in the search paths. When looking up a file that should be found, it returns None instead of the file path. #### Steps/Code to Reproduce ```python import os from bottle impor...
diff --git a/bottle.py b/bottle.py index 286b5bc..a48781f 100755 --- a/bottle.py +++ b/bottle.py @@ -2701,16 +2701,16 @@ class ResourceManager(object): The :attr:`path` list is searched in order. The first match is returned. Symlinks are followed. The result is cached to speed up ...
["test/test_resources.py::TestResourceManager::test_get", "test/test_resources.py::TestResourceManager::test_open"]
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
14
2
1,060
0
0.6
1
0.75
1
0.223333
80.945
7,434
swe_smith::train::24557
swe_smith
train
24,557
sunpy__sunpy.f8edfd5c.combine_module__yxrfqa6f
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# GOES satellite number detection broken in latest version I've discovered a regression in the GOES satellite number detection functionality. When working with GOES data files, the satellite number is no longer being correctly identified. ## Steps to reproduce 1. Load any GOES data file using the XRS TimeSeries sour...
diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py index 08e2a6a..b114bda 100644 --- a/sunpy/timeseries/sources/goes.py +++ b/sunpy/timeseries/sources/goes.py @@ -111,9 +111,7 @@ class XRSTimeSeries(GenericTimeSeries): """ # Various pattern matches for the meta fields. ...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc-GOES-13]", "sunpy/timeseries/sources/tests/test_go...
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/t...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
10
22
1,140
0
0.6
1
0.75
1
0.223333
80.945
7,435
swe_smith::train::49108
swe_smith
train
49,108
mozilla__bleach.73871d76.combine_file__b9vvqrei
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
getFragment returns None instead of fragment #### Description When using bleach to parse HTML fragments, the `getFragment()` method returns `None` instead of the expected fragment object. This breaks HTML parsing functionality. #### Steps/Code to Reproduce ```python import bleach # Simple HTML fragment parsing htm...
diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py index 2869da0..be766d9 100644 --- a/bleach/_vendor/html5lib/treebuilders/base.py +++ b/bleach/_vendor/html5lib/treebuilders/base.py @@ -133,16 +133,6 @@ class ActiveFormattingElements(list): bre...
["tests/test_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
25
183
840
0
0.6
1
0.75
1
0.223333
80.945
7,436
swe_smith::train::51543
swe_smith
train
51,543
pydicom__pydicom.7d361b3d.combine_file__ra4ksl2m
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
RLE handler availability check returns incorrect value #### Description The RLE pixel data handler is incorrectly reporting its availability status. When the handler dependencies are available, it reports as unavailable, and when dependencies are missing, it reports as available. This causes issues with pixel data de...
diff --git a/src/pydicom/pixel_data_handlers/rle_handler.py b/src/pydicom/pixel_data_handlers/rle_handler.py index 56eca7a..52319ca 100644 --- a/src/pydicom/pixel_data_handlers/rle_handler.py +++ b/src/pydicom/pixel_data_handlers/rle_handler.py @@ -62,7 +62,7 @@ SUPPORTED_TRANSFER_SYNTAXES = [pydicom.uid.RLELossless] ...
["tests/test_rle_pixel_data.py::TestNoNumpy_RLEHandler::test_unsupported_pixel_array_raises", "tests/test_rle_pixel_data.py::TestNoNumpy_RLEHandler::test_supported_pixel_array_raises"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
6
2
1,220
0
0.6
1
0.75
1
0.223333
80.945
7,437
swe_smith::train::38215
swe_smith
train
38,215
john-kurkowski__tldextract.3d1bf184.func_basic__mfugjqnv
swesmith/john-kurkowski__tldextract.3d1bf184
john-kurkowski/tldextract
python
null
# GitHub release creation fails with KeyError: 'url' ## Bug description When creating a GitHub release using the release script, it fails with a KeyError for 'url'. The script is trying to access the 'url' key from the GitHub API response JSON, but this key doesn't exist in the response. ## Steps to reproduce 1. Se...
diff --git a/scripts/release.py b/scripts/release.py index 501d585..3cf5083 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -137,30 +137,26 @@ def create_github_release_draft(token: str, version: str) -> None: "https://api.github.com/repos/john-kurkowski/tldextract/releases", headers={ ...
["tests/test_release.py::test_happy_path"]
["tests/cli_test.py::test_cli_no_input", "tests/cli_test.py::test_cli_parses_args", "tests/cli_test.py::test_cli_posargs", "tests/cli_test.py::test_cli_namedargs", "tests/cli_test.py::test_cli_json_output", "tests/custom_suffix_test.py::test_private_extraction", "tests/custom_suffix_test.py::test_suffix_which_is_not_in...
jyangballin/swesmith.x86_64.john-kurkowski_1776_tldextract.3d1bf184
true
null
1
16
1
1,020
0
0.6
1
0.75
1
0.223333
80.945
7,438
swe_smith::train::22358
swe_smith
train
22,358
tweepy__tweepy.91a41c6e.func_basic__kcif9k5g
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
KeyError when accessing tweet data in Tweepy Client I've encountered an issue with the Tweepy Client where attempting to access certain tweet data results in a KeyError. This seems to occur when trying to retrieve retweeters or manage bookmarks for a tweet. Here's a simple way to reproduce the issue: ```python from ...
diff --git a/tweepy/client.py b/tweepy/client.py index d463129..5ad85c9 100644 --- a/tweepy/client.py +++ b/tweepy/client.py @@ -141,15 +141,13 @@ class BaseClient: def _construct_response(self, response, data_type=None): data = response.get("data") - data = self._process_data(data, data_type=dat...
["tests/test_asyncclient.py::TweepyAsyncClientTests::test_bookmarks", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_create_and_delete_tweet", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_create_and_get_compliance_job_and_jobs", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_get_followed...
["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
10
64
1,140
0
0.6
1
0.75
1
0.223333
80.945
7,439
swe_smith::train::19101
swe_smith
train
19,101
seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__h4nh6pim
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Set comparison fails with UnboundLocalError when using DeepDiff #### Description When comparing sets using DeepDiff, an UnboundLocalError is raised because variables are being used before they are defined in the `_diff_set` method. #### Steps/Code to Reproduce ```python from deepdiff import DeepDiff t1 = {1, 2, 8}...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..b46f8ba 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -683,25 +683,15 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): def _diff_set(self, level, local_tree=None): """Difference of sets""" - t1_hashta...
["tests/test_delta.py::TestDelta::test_delta_cases[delta_case0]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case1]", "tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_order_case6]", "tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_...
["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
25
27
840
0
0.6
1
0.75
1
0.223333
80.945
7,440
swe_smith::train::27195
swe_smith
train
27,195
tkrajina__gpxpy.09fc46b3.func_pm_ctrl_shuffle__mramy656
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
get_points_data method returns empty list due to unreachable code #### Description The `get_points_data` method in the GPX class is returning an empty list instead of the expected point data. The method appears to have a logic issue where the `points` list is never populated. #### Steps/Code to Reproduce ```python ...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..79560d9 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -2432,15 +2432,12 @@ class GPX: return MinimumMaximum(min(elevations), max(elevations)) def get_points_data(self, distance_2d: bool=False) -> List[PointData]: + distance_from_start = 0 ...
["test.py::GPXTests::test_named_tuples_values_point_data", "test.py::GPXTests::test_positions_on_track", "test.py::GPXTests::test_positions_on_track_2", "test.py::GPXTests::test_track_points_data"]
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
9
4
1,159
0
0.6
1
0.75
1
0.223167
80.9445
7,441
swe_smith::train::32633
swe_smith
train
32,633
pydantic__pydantic.acb0f10f.func_pm_remove_assign__p62ld7bu
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Constraint validation broken for numeric types #### Description Numeric constraints like `Gt`, `Ge`, `Lt`, `Le` are not being properly applied to integer, float, and decimal fields. The validation appears to be silently ignored, allowing values that should fail validation to pass through. #### Steps/Code to Reproduc...
diff --git a/pydantic/experimental/pipeline.py b/pydantic/experimental/pipeline.py index 9a3dbc4..be160cc 100644 --- a/pydantic/experimental/pipeline.py +++ b/pydantic/experimental/pipeline.py @@ -446,9 +446,7 @@ def _apply_constraint( # noqa: C901 ) -> cs.CoreSchema: """Apply a single constraint to a schema."""...
["tests/test_docs.py::test_docs_examples[docs/concepts/experimental.md:46-79]", "tests/test_pipeline.py::test_ge_le_gt_lt[int-pipeline6-valid_cases6-invalid_cases6]", "tests/test_pipeline.py::test_ge_le_gt_lt[float-pipeline7-valid_cases7-invalid_cases7]", "tests/test_pipeline.py::test_ge_le_gt_lt[Decimal-pipeline8-vali...
["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
21
12
919
0
0.6
1
0.75
1
0.223167
80.9445
7,442
swe_smith::train::28860
swe_smith
train
28,860
encode__starlette.db5063c2.func_pm_remove_assign__7gxahsz7
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Mount url_path_for broken when mount has no name #### Description When using `url_path_for` on a Mount that has no name (i.e., `name=None`), the method fails to properly handle the route name lookup. This breaks URL generation for mounted applications without explicit names. #### Steps/Code to Reproduce ```python f...
diff --git a/starlette/routing.py b/starlette/routing.py index 3b3c529..69ae2d2 100644 --- a/starlette/routing.py +++ b/starlette/routing.py @@ -431,15 +431,12 @@ class Mount(BaseRoute): def url_path_for(self, name: str, /, **path_params: typing.Any) -> URLPath: if self.name is not None and name == self...
["tests/test_routing.py::test_route_converters[asyncio]", "tests/test_routing.py::test_route_converters[trio]", "tests/test_routing.py::test_url_path_for", "tests/test_routing.py::test_url_for", "tests/test_routing.py::test_reverse_mount_urls", "tests/test_routing.py::test_mount_routes_with_middleware_url_path_for"]
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
6
6
1,219
0
0.6
1
0.75
1
0.223167
80.9445
7,443
swe_smith::train::39871
swe_smith
train
39,871
tornadoweb__tornado.d5ac65c1.func_pm_remove_assign__xgokfggp
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
SSL handshake error handling broken - UnboundLocalError on peer variable #### Description When SSL handshake fails during connection, the error handling code tries to reference a `peer` variable that may not be defined, causing an UnboundLocalError instead of properly logging the SSL error. #### Steps/Code to Reprod...
diff --git a/tornado/iostream.py b/tornado/iostream.py index dd2111e..f6e482a 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -1358,12 +1358,9 @@ class SSLIOStream(IOStream): def _do_ssl_handshake(self) -> None: # Based on code from test_ssl.py in the python stdlib try: - ...
["test_no_match (tornado.test.iostream_test.TestIOStreamCheckHostname)", "test_check_hostname (tornado.test.iostream_test.TestIOStreamStartTLS)", "test_handshake_fail (tornado.test.iostream_test.TestIOStreamStartTLS)", "test_error_logging (tornado.test.simple_httpclient_test.SimpleHTTPSClientTestCase)", "test_ssl_conte...
["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
true
null
1
6
6
1,219
0
0.6
1
0.75
1
0.223167
80.9445
7,444
swe_smith::train::35784
swe_smith
train
35,784
stanfordnlp__dspy.651a4c71.func_pm_remove_cond__ugxbhtja
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Invalid index handling in Signature.insert_field method ## Description There is a problem with the `insert_field` method in the `Signature` class. When trying to insert a field at an invalid index (outside the valid range), the code no longer validates the index properly. ## To Reproduce Steps to reproduce the be...
diff --git a/dspy/signatures/signature.py b/dspy/signatures/signature.py index c5f8a79..4745721 100644 --- a/dspy/signatures/signature.py +++ b/dspy/signatures/signature.py @@ -219,16 +219,10 @@ class Signature(BaseModel, metaclass=SignatureMeta): # We support negative insert indices if index < 0: ...
["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
6
4
1,219
0
0.6
1
0.75
1
0.223167
80.9445
7,445
swe_smith::train::16978
swe_smith
train
16,978
prettytable__prettytable.ca90b055.combine_module__22aqcp6s
swesmith/prettytable__prettytable.ca90b055
prettytable/prettytable
python
null
Table sorting broken after recent changes #### Description Table sorting functionality appears to be completely broken. When trying to sort tables by different columns, the sorting either doesn't work at all or produces unexpected results. #### Steps/Code to Reproduce ```python from prettytable import PrettyTable ...
diff --git a/src/prettytable/__init__.py b/src/prettytable/__init__.py index 29ffbe8..1da035b 100644 --- a/src/prettytable/__init__.py +++ b/src/prettytable/__init__.py @@ -59,4 +59,6 @@ __all__ = [ def __getattr__(name: str) -> Any: - return _warn_deprecation(name, module_globals=globals()) + if name.starts...
["tests/test_prettytable.py::TestNoneOption::test_none_char_invalid_option", "tests/test_prettytable.py::TestSorting::test_sort_by_different_per_columns", "tests/test_prettytable.py::TestSorting::test_reverse_sort", "tests/test_prettytable.py::TestSorting::test_sort_key", "tests/test_prettytable.py::TestSorting::test_s...
["tests/test_colortable.py::TestColorTable::test_themeless", "tests/test_colortable.py::TestColorTable::test_theme_setter", "tests/test_colortable.py::TestFormatCode::test_basic", "tests/test_colortable.py::TestFormatCode::test_prefix", "tests/test_colortable.py::TestFormatCode::test_escapes", "tests/test_colortable.py...
jyangballin/swesmith.x86_64.prettytable_1776_prettytable.ca90b055
true
null
2
13
17
1,079
0
0.6
1
0.75
1
0.223167
80.9445
7,446
swe_smith::train::24715
swe_smith
train
24,715
marshmallow-code__marshmallow.9716fc62.func_basic__iv3esmh1
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Method field deserialization broken when deserialize method is None #### Description When using a Method field without specifying a deserialize method, the field fails to deserialize properly and raises a TypeError. #### Steps/Code to Reproduce ```python from marshmallow import Schema, fields class TestSchema(Sche...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..d996fb8 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -1991,9 +1991,9 @@ class Method(Field): return missing_ def _deserialize(self, value, attr, data, **kwargs): - if self._deserialize_m...
["tests/test_deserialization.py::TestFieldDeserialization::test_method_field_deserialization_is_noop_by_default", "tests/test_deserialization.py::TestFieldDeserialization::test_deserialization_method", "tests/test_deserialization.py::TestFieldDeserialization::test_method_field_deserialize_only"]
["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
6
3
1,219
0
0.6
1
0.75
1
0.223167
80.9445
7,447
swe_smith::train::18358
swe_smith
train
18,358
msiemens__tinydb.10644a0e.func_pm_ctrl_shuffle__ntejgr8m
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Table.remove() raises UnboundLocalError when condition matches documents #### Description When calling `Table.remove()` with a condition that matches documents in the table, an `UnboundLocalError` is raised for the variable `_cond`. This appears to be related to the variable being referenced before assignment in the ...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..3805811 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -589,10 +589,6 @@ class Table: # as its first argument. See ``Table._update`` for details on this # operation def updater(table: dict): - # We...
["tests/test_storages.py::test_json_readwrite", "tests/test_tinydb.py::test_remove[memory]", "tests/test_tinydb.py::test_remove[json]", "tests/test_tinydb.py::test_remove_multiple[memory]", "tests/test_tinydb.py::test_remove_multiple[json]", "tests/test_tinydb.py::test_remove_returns_ids[memory]", "tests/test_tinydb.py...
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
9
9
1,159
0
0.6
1
0.75
1
0.223167
80.9445
7,448
swe_smith::train::32661
swe_smith
train
32,661
pydantic__pydantic.acb0f10f.func_pm_remove_cond__6e0qfy2m
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Type annotation with TypeVar causes AttributeError When using `type[T]` where `T` is a TypeVar, pydantic fails to generate a proper schema and raises an AttributeError. #### Steps/Code to Reproduce ```python from typing import TypeVar from pydantic import BaseModel T = TypeVar('T') class Model(BaseModel): a: t...
diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py index 9ec8a61..3a7c063 100644 --- a/pydantic/_internal/_generate_schema.py +++ b/pydantic/_internal/_generate_schema.py @@ -1695,33 +1695,7 @@ class GenerateSchema: elif _typing_extra.is_type_alias_type(type_param): ...
["tests/test_docs.py::test_docs_examples[docs/api/standard_library_types.md:769-800]", "tests/test_docs.py::test_docs_examples[docs/errors/validation_errors.md:1088-1105]", "tests/test_docs.py::test_docs_examples[docs/errors/validation_errors.md:1496-1511]", "tests/test_edge_cases.py::test_pep585_generic_types[Dict-Fro...
["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
28
19
779
0
0.6
1
0.75
1
0.223167
80.9445
7,449
swe_smith::train::42208
swe_smith
train
42,208
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__tasd2axf
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
ValueAxis.minor_unit property returns NameError when minorUnit is None #### Description When accessing the `minor_unit` property on a ValueAxis object, a NameError is raised if the underlying minorUnit element is None. The property should return None in this case instead of throwing an error. #### Steps/Code to Repr...
diff --git a/src/pptx/chart/axis.py b/src/pptx/chart/axis.py index a9b8770..3f33da0 100644 --- a/src/pptx/chart/axis.py +++ b/src/pptx/chart/axis.py @@ -493,17 +493,16 @@ class ValueAxis(_BaseAxis): @property def minor_unit(self): + if minorUnit is None: + return None """ ...
["tests/chart/test_axis.py::DescribeValueAxis::it_knows_its_minor_unit[minor_unit_get_fixture0]", "tests/chart/test_axis.py::DescribeValueAxis::it_knows_its_minor_unit[minor_unit_get_fixture1]"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
7
2
1,198
0
0.6
1
0.75
1
0.223
80.944
7,450
swe_smith::train::33314
swe_smith
train
33,314
pallets__click.fde47b4b.combine_file__5wzhcy9r
swesmith/pallets__click.fde47b4b
pallets/click
python
null
Context stack behavior broken after recent changes #### Description The click context stack is not working correctly. When trying to access the current context, it's returning the wrong context or causing IndexError exceptions. #### Steps/Code to Reproduce ```python import click @click.command() @click.pass_contex...
diff --git a/src/click/globals.py b/src/click/globals.py index a2f9172..57ef5e7 100644 --- a/src/click/globals.py +++ b/src/click/globals.py @@ -33,17 +33,17 @@ def get_current_context(silent: bool = False) -> Context | None: :exc:`RuntimeError`. """ try: - return t.cast("Context", ...
["tests/test_context.py::test_global_context_object", "tests/test_termui.py::test_progressbar_time_per_iteration[avg0-0.0]", "tests/test_termui.py::test_progressbar_time_per_iteration[avg1-2.5]", "tests/test_termui.py::test_progressbar_eta[False-5]", "tests/test_termui.py::test_progressbar_eta[True-0]", "tests/test_ter...
["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
20
26
938
0
0.6
1
0.75
1
0.223
80.944
7,451
swe_smith::train::10454
swe_smith
train
10,454
paramiko__paramiko.23f92003.func_basic__gbu1dugt
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Channel operations fail with "Channel is not open" error on active channels #### Description When attempting to perform operations on active SSH channels, they incorrectly raise `SSHException("Channel is not open")` even when the channel is properly opened and active. #### Steps/Code to Reproduce ```python import p...
diff --git a/paramiko/channel.py b/paramiko/channel.py index 25326ca..7ada2e8 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -61,10 +61,10 @@ def open_only(func): @wraps(func) def _check(self, *args, **kwds): if ( - self.closed - or self.eof_received - ...
["tests/test_client.py::SSHClientTest::test_auth_trickledown", "tests/test_client.py::SSHClientTest::test_certs_allowed_as_key_filename_values", "tests/test_client.py::SSHClientTest::test_certs_implicitly_loaded_alongside_key_filename_keys", "tests/test_client.py::SSHClientTest::test_client", "tests/test_client.py::SSH...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
8
43
1,178
0
0.6
1
0.75
1
0.223
80.944
7,452
swe_smith::train::29991
swe_smith
train
29,991
getnikola__nikola.0f4c230e.func_pm_remove_assign__8irkx5cn
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
WordPress import command fails with NameError #### Description The WordPress import command is broken and throws a `NameError` when trying to import WordPress XML files. The error occurs during the configuration writing phase of the import process. #### Steps/Code to Reproduce ```python from nikola.plugins.command....
diff --git a/nikola/plugins/command/import_wordpress.py b/nikola/plugins/command/import_wordpress.py index 9a8b130..7e2caf6 100644 --- a/nikola/plugins/command/import_wordpress.py +++ b/nikola/plugins/command/import_wordpress.py @@ -371,9 +371,6 @@ to if not self._read_options(options, args): retu...
["tests/test_command_import_wordpress.py::test_create_import[options1-None]", "tests/test_command_import_wordpress.py::test_create_import[None-additional_args2]", "tests/test_command_import_wordpress.py::test_ignoring_drafts_during_import[options0]", "tests/test_command_import_wordpress.py::test_ignoring_drafts_during_...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
10
4
1,138
0
0.6
1
0.75
1
0.223
80.944
7,453
swe_smith::train::733
swe_smith
train
733
oauthlib__oauthlib.1fd52536.func_pm_ctrl_invert_if__t92w6dv6
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
UserInfo endpoint returns 500 error for JWT string responses #### Description When the UserInfo endpoint receives a JWT string response from `get_userinfo_claims`, it incorrectly raises a ServerError with status code 500 instead of returning the JWT with the proper content type. #### Steps/Code to Reproduce ```pyth...
diff --git a/oauthlib/openid/connect/core/endpoints/userinfo.py b/oauthlib/openid/connect/core/endpoints/userinfo.py index 7aa2bbe..50042fa 100644 --- a/oauthlib/openid/connect/core/endpoints/userinfo.py +++ b/oauthlib/openid/connect/core/endpoints/userinfo.py @@ -53,16 +53,15 @@ class UserInfoEndpoint(BaseEndpoint): ...
["tests/openid/connect/core/endpoints/test_userinfo_endpoint.py::UserInfoEndpointTest::test_userinfo_jwt_response"]
["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
1
1,197
0
0.6
1
0.75
1
0.222833
80.9435
7,454
swe_smith::train::20916
swe_smith
train
20,916
tobymao__sqlglot.036601ba.func_pm_remove_assign__tu0pkzxg
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
BigQuery table parsing fails with NameError and UnboundLocalError #### Description When parsing BigQuery table references, the parser encounters `NameError` and `UnboundLocalError` exceptions due to undefined variables in the table parsing logic. #### Steps/Code to Reproduce ```python import sqlglot from sqlglot im...
diff --git a/sqlglot/dialects/bigquery.py b/sqlglot/dialects/bigquery.py index 6d39231..600b1fc 100644 --- a/sqlglot/dialects/bigquery.py +++ b/sqlglot/dialects/bigquery.py @@ -666,7 +666,6 @@ class BigQuery(Dialect): # proj-1.db.tbl -- `1.` is tokenized as a float so we need to unravel it here ...
["tests/dialects/test_bigquery.py::TestBigQuery::test_bigquery", "tests/dialects/test_bigquery.py::TestBigQuery::test_merge", "tests/dialects/test_bigquery.py::TestBigQuery::test_models", "tests/dialects/test_bigquery.py::TestBigQuery::test_rename_table"]
["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
10
4
1,137
0
0.6
1
0.75
1
0.222833
80.9435
7,455
swe_smith::train::49159
swe_smith
train
49,159
mozilla__bleach.73871d76.combine_file__wq2gkl3q
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parsing returns None instead of fragment #### Description When using bleach to clean HTML content, the parser is returning None instead of the expected cleaned HTML fragment. This affects all cleaning operations and causes AttributeError exceptions when trying to process the returned value. #### Steps/Code to R...
diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py index 2869da0..259bd67 100644 --- a/bleach/_vendor/html5lib/treebuilders/base.py +++ b/bleach/_vendor/html5lib/treebuilders/base.py @@ -195,8 +195,6 @@ class TreeBuilder(object): def elementInScope(self, targ...
["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
21
183
917
0
0.6
1
0.75
1
0.222833
80.9435
7,456
swe_smith::train::7689
swe_smith
train
7,689
cantools__cantools.0c6a7871.func_basic__p4q8i18t
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML system signal computation method lookup broken for different AUTOSAR versions #### Description When loading ARXML files, the system signal computation method lookup is using incorrect XML paths for different AUTOSAR versions. This causes signals to lose their scaling information, named values, and other computa...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..863efb8 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -2328,16 +2328,16 @@ class Syste...
["tests/test_database.py::CanToolsDatabaseTest::test_encode_decode_containers", "tests/test_database.py::CanToolsDatabaseTest::test_encode_mixed_signal", "tests/test_database.py::CanToolsDatabaseTest::test_gather_signals", "tests/test_database.py::CanToolsDatabaseTest::test_system_3_arxml", "tests/test_database.py::Can...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
12
10
1,097
0
0.6
1
0.75
1
0.222833
80.9435
7,457
swe_smith::train::33345
swe_smith
train
33,345
pallets__click.fde47b4b.combine_file__predy2t4
swesmith/pallets__click.fde47b4b
pallets/click
python
null
Context stack returns wrong context when multiple contexts exist #### Description When multiple Click contexts are pushed onto the stack, `get_current_context()` returns the first context instead of the most recently pushed one. This breaks nested command execution and context isolation. #### Steps/Code to Reproduce...
diff --git a/src/click/globals.py b/src/click/globals.py index a2f9172..72d180e 100644 --- a/src/click/globals.py +++ b/src/click/globals.py @@ -33,17 +33,17 @@ def get_current_context(silent: bool = False) -> Context | None: :exc:`RuntimeError`. """ try: - return t.cast("Context", ...
["tests/test_arguments.py::test_nargs_err", "tests/test_arguments.py::test_empty_nargs", "tests/test_arguments.py::test_missing_arg", "tests/test_arguments.py::test_missing_argument_string_cast", "tests/test_arguments.py::test_defaults_for_nargs", "tests/test_basic.py::test_file_lazy_mode", "tests/test_basic.py::test_p...
["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
10
93
1,137
0
0.6
1
0.75
1
0.222833
80.9435
7,458
swe_smith::train::47554
swe_smith
train
47,554
sqlfluff__sqlfluff.50a1c4b6.combine_module__00kx9b4m
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Simple API functions broken after recent changes #### Description The simple API functions `lint()` and `fix()` are not working correctly. When trying to use basic linting functionality, getting unexpected errors and empty results. #### Steps/Code to Reproduce ```python import sqlfluff # Basic linting that should ...
diff --git a/src/sqlfluff/api/info.py b/src/sqlfluff/api/info.py index a1e04fa..2d58fcc 100644 --- a/src/sqlfluff/api/info.py +++ b/src/sqlfluff/api/info.py @@ -15,4 +15,4 @@ def list_rules() -> List[RuleTuple]: def list_dialects() -> List[DialectTuple]: """Return a list of available dialect info.""" - retur...
["test/api/info_test.py::test__api__info_dialects", "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", "test/api/simple_test.py::test__api__lint_string_specific_single", "test/api/simple_tes...
["test/api/info_test.py::test__api__info_rules", "test/api/simple_test.py::test__api__parse_string", "test/api/simple_test.py::test__api__parse_fail", "test/api/simple_test.py::test__api__config_path", "test/api/simple_test.py::test__api__invalid_dialect", "test/api/simple_test.py::test__api__parse_exceptions"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
2
20
15
937
0
0.6
1
0.75
1
0.222833
80.9435
7,459
swe_smith::train::8053
swe_smith
train
8,053
cantools__cantools.0c6a7871.func_pm_remove_assign__eluf0qo1
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML SystemLoader fails with UnboundLocalError when processing XML files #### Description When loading ARXML files, the SystemLoader class throws an `UnboundLocalError: local variable 'm' referenced before assignment` error. This appears to affect all ARXML file processing operations. #### Steps/Code to Reproduce ...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..7596876 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -30,33 +30,17 @@ class SystemLoa...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_database.py::CanToolsDataba...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
21
23
917
0
0.6
1
0.75
1
0.222833
80.9435
7,460
swe_smith::train::27871
swe_smith
train
27,871
jsvine__pdfplumber.02ff4313.func_pm_ctrl_shuffle__6f7kopcy
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
TextMap.search() raises UnboundLocalError when using compiled regex patterns #### Description When using a compiled regex pattern with `TextMap.search()`, the method raises an `UnboundLocalError: local variable 'gen' referenced before assignment`. This happens because the code tries to use the `gen` variable before i...
diff --git a/pdfplumber/utils/text.py b/pdfplumber/utils/text.py index 8edafa1..1f09b6a 100644 --- a/pdfplumber/utils/text.py +++ b/pdfplumber/utils/text.py @@ -178,6 +178,11 @@ class TextMap: return_chars: bool = True, main_group: int = 0, ) -> List[Dict[str, Any]]: + # Remove zero-length...
["tests/test_issues.py::Test::test_issue_683", "tests/test_utils.py::Test::test_extract_text_lines", "tests/test_utils.py::Test::test_handle_empty_and_whitespace_search_results", "tests/test_utils.py::Test::test_search_regex_compiled", "tests/test_utils.py::Test::test_search_regex_uncompiled", "tests/test_utils.py::Tes...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
11
6
1,117
0
0.6
1
0.75
1
0.222833
80.9435
7,461
swe_smith::train::31816
swe_smith
train
31,816
davidhalter__parso.338a5760.combine_file__z2h4vooo
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Cache key ordering swapped causing KeyError when accessing cached modules #### Description When using parso's caching functionality, accessing cached modules fails with a KeyError. The cache appears to be storing items with swapped key ordering, making previously cached modules inaccessible. #### Steps/Code to Repro...
diff --git a/parso/cache.py b/parso/cache.py index 5592a9f..c7d4f34 100644 --- a/parso/cache.py +++ b/parso/cache.py @@ -154,19 +154,19 @@ def _load_from_file_system(hashed_grammar, path, p_time, cache_path=None): def _set_cache_item(hashed_grammar, path, module_cache_item): - if sum(len(v) for v in parser_cach...
["test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_used_update[False-False]", "test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_cache.py::test_cache_last_used_update[True-False]", "test/test_cache.py::test_cache_last_used_update[True-True]", "test/test_cache.py::test_i...
["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_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
19
8
956
0
0.6
1
0.75
1
0.222667
80.943
7,462
swe_smith::train::12999
swe_smith
train
12,999
python-openxml__python-docx.0cf6d71f.combine_module__8emovk34
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
Style name lookup broken when using mixed case names #### Description When trying to access styles by name using mixed case (e.g., "Heading 1", "Normal"), the style lookup fails and returns empty strings or None instead of the expected style objects. #### Steps/Code to Reproduce ```python from docx import Document ...
diff --git a/src/docx/styles/__init__.py b/src/docx/styles/__init__.py index 6358baf..4ddab24 100644 --- a/src/docx/styles/__init__.py +++ b/src/docx/styles/__init__.py @@ -31,7 +31,7 @@ class BabelFish: def ui2internal(cls, ui_style_name: str) -> str: """Return the internal style name corresponding to `u...
["tests/styles/test_latent.py::DescribeLatentStyles::it_can_add_a_latent_style", "tests/styles/test_latent.py::DescribeLatentStyles::it_can_get_a_latent_style_by_name[getitem_fixture0]", "tests/styles/test_latent.py::DescribeLatentStyles::it_can_get_a_latent_style_by_name[getitem_fixture1]", "tests/styles/test_latent.p...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
2
6
14
1,216
0
0.6
1
0.75
1
0.222667
80.943
7,463
swe_smith::train::587
swe_smith
train
587
oauthlib__oauthlib.1fd52536.func_basic__pe23b6h2
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2 authorization code response parsing broken #### Description The `parse_authorization_code_response` function is not working correctly. When parsing valid authorization code responses, it raises exceptions instead of returning the parsed parameters, and when there should be exceptions, it behaves unexpectedly. ...
diff --git a/oauthlib/oauth2/rfc6749/parameters.py b/oauthlib/oauth2/rfc6749/parameters.py index 6c55000..648b635 100644 --- a/oauthlib/oauth2/rfc6749/parameters.py +++ b/oauthlib/oauth2/rfc6749/parameters.py @@ -267,22 +267,22 @@ def parse_authorization_code_response(uri, state=None): &state=xyz ...
["tests/oauth2/rfc6749/clients/test_web_application.py::WebApplicationClientTest::test_parse_grant_uri_response", "tests/oauth2/rfc6749/clients/test_web_application.py::WebApplicationClientTest::test_populate_attributes", "tests/oauth2/rfc6749/test_parameters.py::ParameterTests::test_grant_response"]
["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
10
3
1,136
0
0.6
1
0.75
1
0.222667
80.943
7,464
swe_smith::train::46765
swe_smith
train
46,765
python-trio__trio.cfbbe2c1.combine_module__u8vr0cdp
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Traceback concatenation returns None instead of concatenated traceback #### Description The `concat_tb` function is returning `None` instead of the properly concatenated traceback. This breaks exception handling and traceback display functionality. #### Steps/Code to Reproduce ```python import trio._core._concat_tb...
diff --git a/src/trio/_core/_concat_tb.py b/src/trio/_core/_concat_tb.py index a146961..338b030 100644 --- a/src/trio/_core/_concat_tb.py +++ b/src/trio/_core/_concat_tb.py @@ -121,15 +121,12 @@ def concat_tb( head: TracebackType | None, tail: TracebackType | None, ) -> TracebackType | None: - # We have t...
["src/trio/_core/_tests/test_exceptiongroup_gc.py::test_concat_tb", "src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_ki", "src/trio/_core/_tests/test_ki.py::test_ki_protection_works", "src/trio/_tests/test_repl.py::test_KI_interrupts", "src/trio/_tests/test_repl.py::test_system_exits_in_exc_group", "src/trio/...
["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
2
17
8
996
0
0.6
1
0.75
1
0.222667
80.943
7,465
swe_smith::train::3332
swe_smith
train
3,332
pygments__pygments.27649ebb.combine_file__8vfw1e9t
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
YAML lexer crashes with AttributeError when processing text #### Description The YAML lexer is throwing an `AttributeError: 'str' object has no attribute 'indent_stack'` when trying to tokenize YAML content. This appears to affect both the basic YamlLexer and YamlJinjaLexer classes. #### Steps/Code to Reproduce ```...
diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py index 8f384bc..0c5cf0f 100644 --- a/pygments/lexers/data.py +++ b/pygments/lexers/data.py @@ -54,12 +54,12 @@ class YamlLexer(ExtendedRegexLexer): """Reset the indentation levels.""" def callback(lexer, match, context): text =...
["tests/test_basic_api.py::test_random_input[YamlLexer]", "tests/test_basic_api.py::test_random_input[YamlJinjaLexer]", "tests/test_basic_api.py::test_lexer_options[YamlJinjaLexer]", "tests/test_basic_api.py::test_lexer_options[YamlLexer]", "tests/snippets/yaml/test_yaml_colon_in_key_double.txt::", "tests/examplefiles/...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
14
10
1,056
0
0.6
1
0.75
1
0.222667
80.943
7,466
swe_smith::train::2151
swe_smith
train
2,151
pdfminer__pdfminer.six.1a8bd2f7.func_basic__e7wzjen6
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFDocument._get_objects method fails to parse object streams correctly #### Description When processing PDF object streams, the `_get_objects` method in `PDFDocument` is not correctly handling the stream type validation and object count extraction. This causes failures when parsing certain PDF files that contain obj...
diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py index 1c06335..0c76ef7 100644 --- a/pdfminer/pdfdocument.py +++ b/pdfminer/pdfdocument.py @@ -777,20 +777,20 @@ class PDFDocument: return obj def _get_objects(self, stream: PDFStream) -> Tuple[List[object], int]: - if stream.get("Type...
["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cid_range", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_highlevel_extracttext.py::TestExtractText::test_simple5_with_file", "tests/test_highlevel_extracttext.py::TestExtractText::test_simple5_with_s...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
12
5
1,096
0
0.6
1
0.75
1
0.222667
80.943
7,467
swe_smith::train::25535
swe_smith
train
25,535
pylint-dev__astroid.b114f6b5.func_basic__alsl3dfl
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
object_len returns incorrect values for uninferrable nodes and int subclasses #### Description The `object_len` function in astroid is returning incorrect values in certain edge cases. When dealing with uninferrable nodes or int subclasses, the function returns unexpected results instead of proper error handling or c...
diff --git a/astroid/helpers.py b/astroid/helpers.py index ea7523b..68d1c1e 100644 --- a/astroid/helpers.py +++ b/astroid/helpers.py @@ -245,13 +245,10 @@ def object_len(node, context: InferenceContext | None = None): would result in a infinite recursive check for length :rtype int: Integer length of node...
["tests/brain/test_brain.py::TestLenBuiltinInference::test_len_failure_missing_variable", "tests/brain/test_brain.py::TestLenBuiltinInference::test_int_subclass_result"]
["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
14
2
1,055
0
0.6
1
0.75
1
0.2225
80.9425
7,468
swe_smith::train::47124
swe_smith
train
47,124
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__daljeslt
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SocketListener validation order causes AttributeError when socket operations fail #### Description When creating a SocketListener with a socket that causes an OSError during the `getsockopt` call, an AttributeError is raised instead of the expected OSError because the socket validation checks have been moved after th...
diff --git a/src/trio/_highlevel_socket.py b/src/trio/_highlevel_socket.py index c04e66e..dde62e8 100644 --- a/src/trio/_highlevel_socket.py +++ b/src/trio/_highlevel_socket.py @@ -365,10 +365,8 @@ class SocketListener(Listener[SocketStream]): """ def __init__(self, socket: SocketType) -> None: - if ...
["src/trio/_tests/test_highlevel_socket.py::test_SocketListener"]
["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
13
1
1,075
0
0.6
1
0.75
1
0.2225
80.9425
7,469
swe_smith::train::545
swe_smith
train
545
oauthlib__oauthlib.1fd52536.func_basic__ldxwyrfs
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
SSL enforcement not working for HTTP requests #### Description When making OAuth1 requests over HTTP, the library is not properly enforcing SSL/HTTPS requirements. The transport security check appears to be allowing insecure HTTP connections when it should be rejecting them. #### Steps/Code to Reproduce ```python f...
diff --git a/oauthlib/oauth1/rfc5849/endpoints/base.py b/oauthlib/oauth1/rfc5849/endpoints/base.py index 8d3d89c..c034696 100644 --- a/oauthlib/oauth1/rfc5849/endpoints/base.py +++ b/oauthlib/oauth1/rfc5849/endpoints/base.py @@ -105,10 +105,9 @@ class BaseEndpoint: return request def _check_transport_se...
["tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_enforce_ssl", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_ssl_enforcement"]
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
7
2
1,195
0
0.6
1
0.75
1
0.2225
80.9425
7,470
swe_smith::train::4936
swe_smith
train
4,936
bottlepy__bottle.a8dfef30.func_pm_ctrl_shuffle__7dasy5sx
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
http_date function returns early causing datetime objects to be ignored #### Description When passing datetime objects to the `http_date` function, the function returns early without processing the datetime, causing a TypeError when the datetime object is used in contexts expecting a formatted date string. #### Step...
diff --git a/bottle.py b/bottle.py index 286b5bc..e27e35b 100755 --- a/bottle.py +++ b/bottle.py @@ -2943,6 +2943,10 @@ def debug(mode=True): def http_date(value): if isinstance(value, basestring): return value + return email.utils.formatdate(value, usegmt=True) + if not isinstance(value, (int, flo...
["test/test_environ.py::TestResponse::test_expires_header", "test/test_environ.py::TestResponse::test_set_cookie_expires"]
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
9
2
1,155
0
0.6
1
0.75
1
0.2225
80.9425
7,471
swe_smith::train::27341
swe_smith
train
27,341
tkrajina__gpxpy.09fc46b3.func_pm_remove_assign__mqhda3v9
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPXTrackSegment.get_moving_data() returns UnboundLocalError for moving_time and max_speed variables #### Description When calling `get_moving_data()` on a GPX track segment, the method raises `UnboundLocalError` for variables `moving_time` and `max_speed`. These variables are referenced in the return statement but ar...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..e16a758 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -888,9 +888,6 @@ class GPXTrackSegment: speed_extreemes_percentiles=0 ignore_nonstandard_distances=False - moving_time = 0. - stopped_time = 0. - moving_dist...
["test.py::GPXTests::test_ignore_maximums_for_max_speed", "test.py::GPXTests::test_moving_stopped_times", "test.py::GPXTests::test_named_tuples_values_moving_data", "test.py::GPXTests::test_raw_max_speed", "test.py::GPXTests::test_speed_ignore_top_speed_percentiles"]
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
10
5
1,135
0
0.6
1
0.75
1
0.2225
80.9425
7,472
swe_smith::train::17388
swe_smith
train
17,388
pyasn1__pyasn1.0f07d724.combine_module__0r88y2s8
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
Choice encoder returns error object instead of raising exception #### Description When encoding a Choice object with multiple or no components selected, the encoder returns a PyAsn1Error object instead of raising the exception. This causes encoding operations to silently fail and return error objects as encoded data....
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 7e69ca1..d657331 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -1815,7 +1815,7 @@ class SingleItemDecoder(object): of the old recursiveFlag=False option. Users should pass their callback...
["tests/codec/ber/test_decoder.py::NonStreamingCompatibilityTestCase::testPartialDecodeWithDefaultSubstrateFun", "tests/codec/ber/test_encoder.py::ChoiceEncoderTestCase::testDefModeChunked", "tests/codec/ber/test_encoder.py::ChoiceEncoderTestCase::testDefModeOptionTwo", "tests/codec/ber/test_encoder.py::ChoiceEncoderTe...
["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
2
8
15
1,175
0
0.6
1
0.75
1
0.2225
80.9425
7,473
swe_smith::train::35687
swe_smith
train
35,687
stanfordnlp__dspy.651a4c71.func_pm_remove_assign__98qpku6s
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# NameError when using create_predictor_level_history_string with trial logs ## Description I'm trying to use the `create_predictor_level_history_string` function from `dspy.propose.utils` to generate history strings for my predictor, but I'm encountering a NameError. The function seems to be trying to use variables ...
diff --git a/dspy/propose/utils.py b/dspy/propose/utils.py index 7d93e3c..1797b8c 100644 --- a/dspy/propose/utils.py +++ b/dspy/propose/utils.py @@ -74,14 +74,12 @@ def get_program_instruction_set_string(program): return f"[{', '.join(instruction_list)}]" def create_predictor_level_history_string(base_program, ...
["tests/propose/test_grounded_proposer.py::test_propose_instructions_for_program[None]", "tests/propose/test_grounded_proposer.py::test_propose_instructions_for_program[demo_candidates1]", "tests/propose/test_grounded_proposer.py::test_propose_instruction_for_predictor[None]", "tests/propose/test_grounded_proposer.py::...
["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
9
8
1,155
0
0.6
1
0.75
1
0.2225
80.9425
7,474
swe_smith::train::42778
swe_smith
train
42,778
python-jsonschema__jsonschema.93e0caa5.func_pm_remove_cond__ir02r222
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
unevaluatedItems validation not working correctly for array items #### Description The `unevaluatedItems` keyword is not properly validating array items in JSON Schema Draft 2019-09. When using schemas with `unevaluatedItems`, items that should be considered unevaluated are being incorrectly allowed to pass validatio...
diff --git a/jsonschema/_legacy_keywords.py b/jsonschema/_legacy_keywords.py index c691589..5d9ec4b 100644 --- a/jsonschema/_legacy_keywords.py +++ b/jsonschema/_legacy_keywords.py @@ -280,9 +280,6 @@ def find_evaluated_item_indexes_by_schema(validator, instance, schema): if "items" in schema: if "additio...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft201909::test_unevaluatedItems_unevaluatedItems_as_schema_with_valid_unevaluated_items", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft201909::test_unevaluatedItems_unevaluatedItems_true_with_unevaluated_items", "jsonschema/tests/test_jsonschema_test...
["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
10
1,155
0
0.6
1
0.75
1
0.2225
80.9425
7,475
swe_smith::train::48348
swe_smith
train
48,348
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__6raatwb4
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Parser fails with NameError when no match found during file parsing #### Description When parsing SQL files, the parser crashes with a `NameError` for undefined variables when no match is found during the parsing process. This appears to be related to missing variable definitions in the file segment parsing logic. #...
diff --git a/src/sqlfluff/core/parser/segments/file.py b/src/sqlfluff/core/parser/segments/file.py index b8fce88..ea2ffe2 100644 --- a/src/sqlfluff/core/parser/segments/file.py +++ b/src/sqlfluff/core/parser/segments/file.py @@ -79,7 +79,6 @@ class BaseFileSegment(BaseSegment): # Set up the progress bar for pa...
["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
11
1
1,114
0
0.6
1
0.75
1
0.222333
80.942
7,476
swe_smith::train::24826
swe_smith
train
24,826
marshmallow-code__marshmallow.9716fc62.func_pm_class_rm_funcs__p5knfmyy
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Number field serialization broken after removing _serialize method #### Description Number fields are not serializing properly. The `_serialize` method was removed from the Number class but it's still needed for proper serialization behavior, especially for `as_string` functionality and type conversion. #### Steps/C...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..62194cd 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -951,10 +951,6 @@ class Number(Field): self.as_string = as_string super().__init__(**kwargs) - def _format_num(self, value) -> typing...
["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::TestPassOriginal::test_pass_original_single", "tests/test_decorators.py::TestPassOriginal::test_pass_original_many", "tests/test_decorators.py::test_decorated_processor_inheritance", "tests/test_decorators.py::test_pre_dump_is_invoked_before_implicit_field_generation", "tests/test_decorators...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
12
91
1,094
0
0.6
1
0.75
1
0.222333
80.942
7,477
swe_smith::train::1808
swe_smith
train
1,808
agronholm__typeguard.b6a7e438.func_basic__tjlhv3dy
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
suppress_type_checks decorator not working with positional arguments #### Description The `suppress_type_checks` decorator fails to pass positional arguments to the wrapped function, causing functions that expect positional arguments to receive only keyword arguments. #### Steps/Code to Reproduce ```python from typ...
diff --git a/src/typeguard/_suppression.py b/src/typeguard/_suppression.py index bbbfbfb..84f02eb 100644 --- a/src/typeguard/_suppression.py +++ b/src/typeguard/_suppression.py @@ -60,7 +60,7 @@ def suppress_type_checks( assert func is not None try: - return func(*args, **kwargs) + ...
["tests/test_checkers.py::test_suppressed_checking", "tests/test_checkers.py::test_suppressed_checking_exception", "tests/test_checkers.py::test_check_against_tuple_failure", "tests/test_importhook.py::test_blanket_import", "tests/test_instrumentation.py::test_type_checked_func_error[typechecked]", "tests/test_instrume...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
6
71
1,214
0
0.6
1
0.75
1
0.222333
80.942
7,478
swe_smith::train::45114
swe_smith
train
45,114
modin-project__modin.8c7799fd.func_pm_class_rm_funcs__fb82om6g
swesmith/modin-project__modin.8c7799fd
modin-project/modin
python
null
PandasProtocolDataframe missing column_names method breaks dataframe interchange protocol #### Description The `PandasProtocolDataframe` class is missing the required `column_names()` method, causing failures when using the dataframe interchange protocol. This breaks compatibility with pandas interchange functionalit...
diff --git a/modin/core/dataframe/pandas/interchange/dataframe_protocol/dataframe.py b/modin/core/dataframe/pandas/interchange/dataframe_protocol/dataframe.py index 5fb26c5..56f3174 100644 --- a/modin/core/dataframe/pandas/interchange/dataframe_protocol/dataframe.py +++ b/modin/core/dataframe/pandas/interchange/datafra...
["modin/tests/interchange/dataframe_protocol/pandas/test_protocol.py::test_simple_import", "modin/tests/interchange/dataframe_protocol/pandas/test_protocol.py::test_categorical_from_dataframe", "modin/tests/interchange/dataframe_protocol/pandas/test_protocol.py::test_interchange_with_pandas_string", "modin/tests/interc...
["modin/tests/interchange/dataframe_protocol/base/test_sanity.py::test_sanity", "modin/tests/interchange/dataframe_protocol/base/test_sanity.py::test_basic_io", "modin/tests/interchange/dataframe_protocol/base/test_utils.py::test_dtype_to_arrow_c[pandas_dtype0-b]", "modin/tests/interchange/dataframe_protocol/base/test_...
jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd
true
null
1
6
21
1,214
0
0.6
1
0.75
1
0.222333
80.942
7,479
swe_smith::train::21462
swe_smith
train
21,462
rubik__radon.54b88e58.func_pm_class_rm_funcs__59ri2pk0
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
# CCHarvester.gobble() method missing I was trying to analyze some Python code with Radon and ran into an issue where the cyclomatic complexity analysis fails. ## Steps to reproduce 1. Create a Python file to analyze: ```python def complex_function(x): if x > 0: if x < 10: return "small posit...
diff --git a/radon/cli/harvest.py b/radon/cli/harvest.py index ac14fe5..db783e2 100644 --- a/radon/cli/harvest.py +++ b/radon/cli/harvest.py @@ -175,13 +175,6 @@ class Harvester(object): class CCHarvester(Harvester): '''A class that analyzes Python modules' Cyclomatic Complexity.''' - def gobble(self, fobj):...
["radon/tests/test_cli.py::test_encoding", "radon/tests/test_cli_harvest.py::test_cc_gobble", "radon/tests/test_ipynb.py::test_ipynb", "radon/tests/test_ipynb.py::test_ipynb_with_cells"]
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
1
8
4
1,174
0
0.6
1
0.75
1
0.222333
80.942
7,480
swe_smith::train::18694
swe_smith
train
18,694
seperman__deepdiff.ed252022.combine_file__za6ka84z
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
LFU Cache broken after recent changes I'm getting some weird behavior with the LFU cache implementation. It seems like the cache isn't working properly anymore and is returning incorrect results. #### Steps to Reproduce ```python from deepdiff.lfucache import LFUCache # Create a simple LFU cache cache = LFUCache(3)...
diff --git a/deepdiff/lfucache.py b/deepdiff/lfucache.py index 3aa168a..884d8a5 100644 --- a/deepdiff/lfucache.py +++ b/deepdiff/lfucache.py @@ -49,12 +49,12 @@ class FreqNode: self.cache_tail = None # CacheNode tail under this FreqNode def count_caches(self): - if self.cache_head is None and se...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_ignore_order.py::TestIgnoreOrder::test_ignore_order_max_passes[22-expected2]", "tests/test_ignore_order.py::TestIgnoreOrder::test_ignore_order_max_diffs[65-expected1]", ...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
16
12
1,014
0
0.6
1
0.75
1
0.222333
80.942
7,481
swe_smith::train::42177
swe_smith
train
42,177
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__oldbe1mc
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Category.index() method returns incorrect index for sub-categories #### Description The `Category.index()` method is not correctly calculating the index of sub-categories in multi-level category charts. The method appears to be using an uninitialized `index` variable when iterating through sub-categories. #### Steps...
diff --git a/src/pptx/chart/data.py b/src/pptx/chart/data.py index ec6a61f..fb30946 100644 --- a/src/pptx/chart/data.py +++ b/src/pptx/chart/data.py @@ -553,17 +553,16 @@ class Category(object): return self._parent.index(self) def index(self, sub_category): - """ - The offset of *sub_categ...
["tests/chart/test_data.py::DescribeCategory::it_knows_the_index_of_a_sub_category", "tests/chart/test_xmlwriter.py::Describe_BarChartXmlWriter::it_can_generate_xml_for_multi_level_cat_charts"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
11
2
1,114
0
0.6
1
0.75
1
0.222333
80.942
7,482
swe_smith::train::48142
swe_smith
train
48,142
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_invert_if__fno78lhl
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Linter filtering logic broken for SQLLintError instances #### Description The linter's error filtering logic is incorrectly handling SQLLintError instances. When processing linting errors, SQLLintError objects are being added to the result list without proper filtering checks, while non-SQLLintError objects (like SQL...
diff --git a/src/sqlfluff/core/linter/linter.py b/src/sqlfluff/core/linter/linter.py index 5e5474f..1bb6a05 100644 --- a/src/sqlfluff/core/linter/linter.py +++ b/src/sqlfluff/core/linter/linter.py @@ -280,6 +280,10 @@ class Linter: result: List[SQLBaseError] = [] for e in linting_errors: ...
["test/core/linter/linter_test.py::test__linter__mask_templated_violations[test/fixtures/templater/jinja_h_macros/jinja.sql-L006-True-check_tuples0]"]
["test/core/linter/linter_test.py::test__linter__skip_large_bytes[0-False]", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[5-True]", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[2000-False]", "test/core/linter/linter_test.py::test__linter__lint_string_vs_file[test/fixtures/linter/...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
9
1
1,153
0
0.6
1
0.75
1
0.222167
80.9415
7,483
swe_smith::train::32610
swe_smith
train
32,610
pydantic__pydantic.acb0f10f.func_pm_remove_assign__aa98en8k
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
JSON schema generation fails for dict schemas with pattern properties #### Description When generating JSON schemas for dict types with pattern-based key validation, the schema generation process encounters an undefined variable error. This affects models that use dictionary types with string pattern constraints on k...
diff --git a/pydantic/json_schema.py b/pydantic/json_schema.py index ca031ea..62c7862 100644 --- a/pydantic/json_schema.py +++ b/pydantic/json_schema.py @@ -1003,16 +1003,10 @@ class GenerateJsonSchema: keys_schema = self.generate_inner(schema['keys_schema']).copy() if 'keys_schema' in schema else {} ...
["tests/test_config.py::test_config_plain_type_adapter_defer_build[True]", "tests/test_config.py::test_config_plain_type_adapter_defer_build[False]", "tests/test_dataclasses.py::test_schema", "tests/test_deprecated_validate_arguments.py::test_wrap", "tests/test_deprecated_validate_arguments.py::test_config_title", "tes...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
9
59
1,153
0
0.6
1
0.75
1
0.222167
80.9415
7,484
swe_smith::train::5146
swe_smith
train
5,146
agronholm__exceptiongroup.0b4f4937.func_basic__s7fv30ud
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
print_exception outputs to stdout instead of stderr and adds extra newlines #### Description The `print_exception` function is outputting to stdout instead of stderr and adding extra blank lines between traceback lines, making the output format inconsistent with standard Python exception formatting. #### Steps/Code ...
diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py index 4c52d77..aa096a6 100644 --- a/src/exceptiongroup/_formatting.py +++ b/src/exceptiongroup/_formatting.py @@ -444,12 +444,12 @@ def print_exception( chain: bool = True, ) -> None: if file is None: - file = sys.stder...
["tests/test_formatting.py::test_print_exception[patched-newstyle]", "tests/test_formatting.py::test_print_exception[patched-oldstyle]", "tests/test_formatting.py::test_print_exception[unpatched-newstyle]", "tests/test_formatting.py::test_print_exception[unpatched-oldstyle]", "tests/test_formatting.py::test_print_exc[p...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
6
12
1,213
0
0.6
1
0.75
1
0.222167
80.9415
7,485
swe_smith::train::24947
swe_smith
train
24,947
marshmallow-code__marshmallow.9716fc62.pr_2798
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
### Bug: KeyError when using Range Validator #### Description Encountering a `KeyError` when using the `Range` validator in certain scenarios. This seems to occur when attempting to validate values against a specified range. #### How to Reproduce 1. Define a schema with a field that uses the `Range` validator. 2. S...
diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py index e4536d8..3c833ab 100644 --- a/src/marshmallow/validate.py +++ b/src/marshmallow/validate.py @@ -299,9 +299,9 @@ class Range(Validator): Can be interpolated with `{input}`, `{min}` and `{max}`. """ - message_min = "Must be {m...
["tests/test_deserialization.py::TestFieldDeserialization::test_list_field_deserialize_multiple_invalid_items", "tests/test_deserialization.py::TestFieldDeserialization::test_tuple_field_deserialize_multiple_invalid_items", "tests/test_validate.py::test_range_min", "tests/test_validate.py::test_range_max", "tests/test_...
["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
7
1,173
0
0.6
1
0.75
1
0.222167
80.9415
7,486
r2e_gym::train::6047
r2e_gym
train
6,047
pillow__fbc121d6785dfdc566d19d75e250c2b8d9de8542
pillow
python-pillow/pillow
python
fbc121d6785dfdc566d19d75e250c2b8d9de8542
**Title:** GIF ImageInfo Contains Unexpected 'transparency' After Seeking Frames **Description:** When working with multi-frame GIF images, seeking between frames unexpectedly alters the image information. Specifically, after seeking to a different frame and then returning to the original frame, the `info` dictionary ...
diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -166,6 +166,7 @@ from copy import copy self.palette = copy(self.global_palette) + info = {} while True: s = self.fp.read(1) @@ -184,8 +...
diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -134,13 +134,15 @@ # Multiframe image im = Image.open("Tests/images/dispose_bgnd.gif") + info = im.info.copy() + out = self.tempfile('temp.gif') im.save(...
null
null
namanjain12/pillow_final:fbc121d6785dfdc566d19d75e250c2b8d9de8542
true
null
1
17
null
1,705
0
0.75
1
0.6375
1
0.340833
80.94125
7,487
r2e_gym::train::295
r2e_gym
train
295
orange3__7d41eb6f16f564aee4251787ca5c556230776158
orange3
biolab/orange3
python
7d41eb6f16f564aee4251787ca5c556230776158
**Title:** Incorrect Variance and Standard Deviation Calculations for Sparse Matrices with Missing Values **Description:** When calculating variance and standard deviation on sparse matrices that contain missing values (`NaN`), the results are incorrect and do not match the expected values from NumPy's functions. This...
diff --git a/Orange/statistics/util.py b/Orange/statistics/util.py --- a/Orange/statistics/util.py +++ b/Orange/statistics/util.py @@ -434,9 +434,10 @@ def nanvar(x, axis=None): """ Equivalent of np.nanvar that supports sparse or dense matrices. """ def nanvar_sparse(x): - n_values = np.prod(x.shape) ...
diff --git a/Orange/tests/test_statistics.py b/Orange/tests/test_statistics.py --- a/Orange/tests/test_statistics.py +++ b/Orange/tests/test_statistics.py @@ -7,7 +7,7 @@ from Orange.statistics.util import bincount, countnans, contingency, digitize, \ mean, nanmax, nanmean, nanmedian, nanmin, nansum, nanunique,...
null
null
namanjain12/orange3_final:7d41eb6f16f564aee4251787ca5c556230776158
true
null
1
7
null
1,905
0
0.75
1
0.6375
1
0.340833
80.94125
7,488
swe_smith::train::35804
swe_smith
train
35,804
stanfordnlp__dspy.651a4c71.func_pm_remove_loop__6yl8bbnt
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Fields in Signature class missing prefix and desc after removing initialization code ## Description I found an issue where fields in Signature classes are missing their prefix and desc attributes. This happens because the code that sets these attributes has been removed. Here's a simple reproduction: ```python fr...
diff --git a/dspy/signatures/signature.py b/dspy/signatures/signature.py index c5f8a79..e1f89b4 100644 --- a/dspy/signatures/signature.py +++ b/dspy/signatures/signature.py @@ -80,15 +80,7 @@ class SignatureMeta(type(BaseModel)): # Ensure all fields are declared with InputField or OutputField cls._val...
["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call...
["tests/adapters/test_json_adapter.py::test_json_adapter_on_pydantic_model", "tests/adapters/test_json_adapter.py::test_json_adapter_parse_raise_error_on_mismatch_fields", "tests/adapters/test_two_step_adapter.py::test_two_step_adapter_parse_errors", "tests/caching/test_litellm_cache.py::test_lm_calls_are_cached_across...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
8
87
1,172
0
0.6
1
0.75
1
0.222
80.941
7,489
swe_smith::train::1568
swe_smith
train
1,568
Cog-Creators__Red-DiscordBot.33e0eac7.func_pm_class_rm_funcs__bmml4bsj
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
IdentifierData missing primary_key and identifiers properties #### Description After recent changes, accessing `primary_key` and `identifiers` properties on `IdentifierData` objects raises `AttributeError`. The properties appear to have been removed but are still being used internally. #### Steps/Code to Reproduce ...
diff --git a/redbot/core/_drivers/base.py b/redbot/core/_drivers/base.py index 8ca710e..8eaabf3 100644 --- a/redbot/core/_drivers/base.py +++ b/redbot/core/_drivers/base.py @@ -82,14 +82,6 @@ class IdentifierData: def category(self) -> str: return self._category - @property - def primary_key(self)...
["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_alias", "tests/cogs/test_alias.py::test_add_global_alias", "tests/cogs/test_alias.py::test_delete_global_alias", "tests/cogs/downloader/test_downloader.py::test_add_r...
["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_permissions.py::test_schema_update", "tests/cogs/test_trivia.py::test_trivia_lists", "tests/cogs/audio/managed_node/test_ll_version.py::tes...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
1
12
124
1,092
0
0.6
1
0.75
1
0.222
80.941
7,490
swe_smith::train::24612
swe_smith
train
24,612
marshmallow-code__marshmallow.9716fc62.combine_module__z086q78l
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
OneOf validator returns None instead of validated value #### Description The OneOf validator is not working correctly - it's returning None instead of the validated value when validation passes, and it's raising ValidationError when the value IS in the choices list instead of when it's NOT in the choices list. #### ...
diff --git a/src/marshmallow/class_registry.py b/src/marshmallow/class_registry.py index d41b112..bbaeba0 100644 --- a/src/marshmallow/class_registry.py +++ b/src/marshmallow/class_registry.py @@ -83,12 +83,12 @@ def get_class(classname: str, all: bool = False) -> list[SchemaType] | SchemaTyp "to import th...
["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_registry.py::test_two_way_nesting", "tests/test_registry.py::test_nesting_with_c...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
2
14
11
1,052
0
0.6
1
0.75
1
0.222
80.941
7,491
swe_smith::train::30596
swe_smith
train
30,596
gweis__isodate.17cb25eb.func_pm_remove_cond__ge0ifatb
swesmith/gweis__isodate.17cb25eb
gweis/isodate
python
null
# Duration.totimedelta() fails when using start parameter ### Bug description When trying to convert a Duration object to a timedelta using the `totimedelta()` method with the `start` parameter, it fails with a TypeError. The method works correctly when using the `end` parameter, but fails when using `start`. ### Re...
diff --git a/src/isodate/duration.py b/src/isodate/duration.py index 85241e4..b373331 100644 --- a/src/isodate/duration.py +++ b/src/isodate/duration.py @@ -290,9 +290,5 @@ class Duration: raise ValueError("start or end required") if start is not None and end is not None: raise ValueE...
["tests/test_duration.py::test_totimedelta"]
["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::tes...
jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb
true
null
1
6
1
1,212
0
0.6
1
0.75
1
0.222
80.941
7,492
swe_smith::train::26091
swe_smith
train
26,091
pylint-dev__astroid.b114f6b5.func_basic__xch5heza
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Raise node incorrectly identifies bare raise as NotImplementedError #### Description The `raises_not_implemented` method in the Raise node class is incorrectly returning `True` for bare `raise` statements (statements without an exception). This causes issues when checking if a function is abstract, as bare raise stat...
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index fde3239..e5f265d 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -3465,9 +3465,9 @@ class Raise(_base_nodes.Statement): :returns: Whether this node raises a :class:`NotImplementedError`. ...
["tests/test_scoped_nodes.py::FunctionNodeTest::test_is_abstract"]
["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
6
1
1,212
0
0.6
1
0.75
1
0.222
80.941
7,493
swe_smith::train::39230
swe_smith
train
39,230
pallets__jinja.ada0a9a6.func_basic__ts1o9rtm
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
PrefixLoader returns None instead of raising TemplateNotFound #### Description When using PrefixLoader and a template is not found, the loader now returns `None` instead of properly raising a `TemplateNotFound` exception. This breaks template loading behavior and causes AttributeError when trying to use the returned ...
diff --git a/src/jinja2/loaders.py b/src/jinja2/loaders.py index 8ca32cb..4e4af22 100644 --- a/src/jinja2/loaders.py +++ b/src/jinja2/loaders.py @@ -539,11 +539,10 @@ class PrefixLoader(BaseLoader): ) -> "Template": loader, local_name = self.get_loader(name) try: - return loader.load(e...
["tests/test_loader.py::TestLoaders::test_prefix_loader", "tests/test_loader.py::TestModuleLoader::test_deflated_zip_compile", "tests/test_loader.py::TestModuleLoader::test_stored_zip_compile", "tests/test_loader.py::TestModuleLoader::test_filesystem_compile", "tests/test_loader.py::TestModuleLoader::test_prefix_loader...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
9
8
1,151
0
0.6
1
0.75
1
0.221833
80.9405
7,494
swe_smith::train::9672
swe_smith
train
9,672
marshmallow-code__webargs.dbde72fe.func_basic__nhl1q3az
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
PyramidParser error handling returns response instead of raising exception #### Description When validation errors occur in PyramidParser, the error handler is returning a response object instead of raising it as an exception. This breaks the expected behavior where validation errors should raise HTTP exceptions that...
diff --git a/src/webargs/pyramidparser.py b/src/webargs/pyramidparser.py index 56c2736..2a16b19 100644 --- a/src/webargs/pyramidparser.py +++ b/src/webargs/pyramidparser.py @@ -111,12 +111,12 @@ class PyramidParser(core.Parser[Request]): response = exception_response( status_code, det...
["tests/test_pyramidparser.py::TestPyramidParser::test_parse_json_error_unexpected_int", "tests/test_pyramidparser.py::TestPyramidParser::test_parse_json_error_unexpected_list", "tests/test_pyramidparser.py::TestPyramidParser::test_parse_json_many_schema_invalid_input", "tests/test_pyramidparser.py::TestPyramidParser::...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
6
8
1,211
0
0.6
1
0.75
1
0.221833
80.9405
7,495
swe_smith::train::38291
swe_smith
train
38,291
burnash__gspread.a8be3b96.func_pm_ctrl_shuffle__0sq63vrd
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
convert_colors_to_hex_value function returns incorrect hex values #### Description The `convert_colors_to_hex_value` function in `gspread.utils` is not working correctly. When calling the function with RGB color values, it's throwing an `UnboundLocalError` instead of returning the expected hex color code. #### Steps...
diff --git a/gspread/utils.py b/gspread/utils.py index 6daac86..e0718ed 100644 --- a/gspread/utils.py +++ b/gspread/utils.py @@ -884,6 +884,18 @@ def convert_hex_to_colors_dict(hex_color: str) -> Mapping[str, float]: def convert_colors_to_hex_value( red: float = 0.0, green: float = 0.0, blue: float = 0.0 ) -> st...
["tests/utils_test.py::UtilsTest::test_convert_colors_to_hex_value", "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
25
2
831
0
0.6
1
0.75
1
0.221833
80.9405
7,496
swe_smith::train::52425
swe_smith
train
52,425
pydicom__pydicom.7d361b3d.func_pm_ctrl_shuffle__m43mo5rf
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
generate_uid() with prefix=None raises TypeError #### Description When calling `generate_uid(prefix=None)`, the function raises a TypeError instead of generating a valid UID. The function should handle `None` prefix by generating a UUID-based UID starting with "2.25.". #### Steps/Code to Reproduce ```python from py...
diff --git a/src/pydicom/uid.py b/src/pydicom/uid.py index 173a77b..07cdda4 100644 --- a/src/pydicom/uid.py +++ b/src/pydicom/uid.py @@ -512,6 +512,12 @@ def generate_uid( prefix: str | None = PYDICOM_ROOT_UID, entropy_srcs: list[str] | None = None, ) -> UID: + + if entropy_srcs is None: + maximum ...
["tests/test_uid.py::TestGenerateUID::test_generate_uid", "tests/test_uid.py::TestGenerateUID::test_none", "tests/test_uid.py::TestGenerateUID::test_none_iterate"]
["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
27
3
791
0
0.6
1
0.75
1
0.221833
80.9405
7,497
swe_smith::train::48202
swe_smith
train
48,202
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__90arwlci
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Linter crashes with UnboundLocalError when loading files #### Description The linter fails to process files due to a variable being used before assignment. When attempting to lint any SQL file, the linter crashes with an `UnboundLocalError` for the `raw_file` variable. #### Steps/Code to Reproduce ```python from sq...
diff --git a/src/sqlfluff/core/linter/linter.py b/src/sqlfluff/core/linter/linter.py index 5e5474f..8a1bfd0 100644 --- a/src/sqlfluff/core/linter/linter.py +++ b/src/sqlfluff/core/linter/linter.py @@ -131,12 +131,12 @@ class Linter: def load_raw_file_and_config( fname: str, root_config: FluffConfig )...
["test/core/linter/linter_test.py::test__linter__skip_large_bytes[0-False]", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[5-True]", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[2000-False]", "test/core/linter/linter_test.py::test__linter__lint_string_vs_file[test/fixtures/linter/...
["test/core/linter/linter_test.py::test__linter__get_violations_filter_rules[None-6]", "test/core/linter/linter_test.py::test__linter__get_violations_filter_rules[CP01-2]", "test/core/linter/linter_test.py::test__linter__get_violations_filter_rules[rules2-1]", "test/core/linter/linter_test.py::test__linter__linting_res...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
17
25
991
0
0.6
1
0.75
1
0.221833
80.9405
7,498
swe_smith::train::51641
swe_smith
train
51,641
pydicom__pydicom.7d361b3d.combine_module__qyw0wmrz
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# CLI command help and show functionality broken **Describe the bug** The CLI commands for pydicom are not working correctly. The help command shows incorrect information and the show command is completely broken. **To Reproduce** Run the following commands: ``` pydicom help ``` This shows "No subcommands are availab...
diff --git a/src/pydicom/cli/main.py b/src/pydicom/cli/main.py index 2f616ba..aa4ca2f 100644 --- a/src/pydicom/cli/main.py +++ b/src/pydicom/cli/main.py @@ -171,16 +171,17 @@ def filespec_parser(filespec: str) -> list[tuple[Dataset, Any]]: def help_command(args: argparse.Namespace) -> None: - if subparsers is N...
["tests/test_cli.py::TestCLIcall::test_help", "tests/test_cli.py::TestCLIcall::test_show_command", "tests/test_cli.py::TestCLIcall::test_show_options"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
2
17
3
990
0
0.6
1
0.75
1
0.221667
80.94
7,499
swe_smith::train::46723
swe_smith
train
46,723
python-trio__trio.cfbbe2c1.combine_module__a7xjmo38
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
concat_tb function returns None instead of concatenated traceback #### Description The `concat_tb` function in `trio._core._concat_tb` is returning `None` instead of the properly concatenated traceback. This breaks traceback concatenation functionality. #### Steps/Code to Reproduce ```python import trio from trio._...
diff --git a/src/trio/_core/_concat_tb.py b/src/trio/_core/_concat_tb.py index a146961..338b030 100644 --- a/src/trio/_core/_concat_tb.py +++ b/src/trio/_core/_concat_tb.py @@ -121,15 +121,12 @@ def concat_tb( head: TracebackType | None, tail: TracebackType | None, ) -> TracebackType | None: - # We have t...
["src/trio/_core/_tests/test_exceptiongroup_gc.py::test_concat_tb", "src/trio/_core/_tests/test_ki.py::test_identity_weakref_internals"]
["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
2
19
2
950
0
0.6
1
0.75
1
0.221667
80.94