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
6,000
swe_smith::train::52804
swe_smith
train
52,804
stanfordnlp__string2string.c4a72f59.func_pm_op_break_chains__9bve09wo
swesmith/stanfordnlp__string2string.c4a72f59
stanfordnlp/string2string
python
null
### Bug: Boyer-Moore Search Index Error #### Description I've encountered an issue with the Boyer-Moore search algorithm in the `string2string` library. When attempting to search for a pattern within a text, the algorithm throws an `IndexError`. This seems to occur when the pattern is found towards the end of the tex...
diff --git a/string2string/search/classical.py b/string2string/search/classical.py index af0888b..07545fa 100644 --- a/string2string/search/classical.py +++ b/string2string/search/classical.py @@ -417,7 +417,7 @@ class BoyerMooreSearch: # TODO(msuzgun): Has an error! self.skip_gs = [0] * self.pattern_...
["tests/test_search.py::SearcTestCase::test_lexical_search_algs"]
["tests/test_alignment.py::AlignmentTestCase::test_dtw", "tests/test_alignment.py::AlignmentTestCase::test_hiirschberg", "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsequence", "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsubtring", "tests/test_alignment.py::AlignmentTestCa...
jyangballin/swesmith.x86_64.stanfordnlp_1776_string2string.c4a72f59
true
null
1
6
1
1,522
0
0.6
1
0.75
1
0.273667
81.096
6,001
swe_smith::train::1038
swe_smith
train
1,038
jd__tenacity.0d40e76f.combine_file__4sazn12s
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
stop_all condition behaves incorrectly with multiple stop conditions #### Description When using `stop_all` with multiple stop conditions, the retry logic doesn't work as expected. The function stops retrying too early instead of continuing until all conditions are met. #### Steps/Code to Reproduce ```python import...
diff --git a/tenacity/stop.py b/tenacity/stop.py index 5cda59a..92a2976 100644 --- a/tenacity/stop.py +++ b/tenacity/stop.py @@ -58,7 +58,7 @@ class stop_all(stop_base): self.stops = stops def __call__(self, retry_state: "RetryCallState") -> bool: - return all(x(retry_state) for x in self.stops) ...
["tests/test_asyncio.py::TestContextManager::test_do_max_attempts", "tests/test_asyncio.py::TestContextManager::test_sleeps", "tests/test_asyncio.py::TestDecoratorWrapper::test_retry_function_attributes", "tests/test_tenacity.py::TestStopConditions::test_stop_after_attempt", "tests/test_tenacity.py::TestStopConditions:...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
8
25
1,482
0
0.6
1
0.75
1
0.273667
81.096
6,002
swe_smith::train::39755
swe_smith
train
39,755
tornadoweb__tornado.d5ac65c1.func_pm_ctrl_invert_if__jipwesbx
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
TemplateModule set_resources logic inverted causing ValueError on first call #### Description When using TemplateModule with set_resources, the logic for checking if a path exists in the resource dictionary is inverted. This causes a ValueError to be raised on the first call to render a template, even when the resour...
diff --git a/tornado/web.py b/tornado/web.py index 357c5f1..b847c42 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -3450,16 +3450,15 @@ class TemplateModule(UIModule): def render(self, path: str, **kwargs: Any) -> bytes: def set_resources(**kwargs) -> str: # type: ignore if path not in ...
["test_uimodule_resources (tornado.test.web_test.WSGISafeWebTest)"]
["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
7
1
1,502
0
0.6
1
0.75
1
0.273667
81.096
6,003
swe_smith::train::18558
swe_smith
train
18,558
HIPS__autograd.ac044f0d.lm_rewrite__spxijnmi
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
Hi, I've encountered an issue with the recent changes in the `autograd` library, specifically related to the handling of stacking operations and dimensionality functions. It seems that the functions `np.vstack`, `np.hstack`, and `np.row_stack` are not behaving as expected when dealing with 1D arrays. Additionally, the...
diff --git a/autograd/numpy/numpy_jvps.py b/autograd/numpy/numpy_jvps.py index 4dba485..aaec689 100644 --- a/autograd/numpy/numpy_jvps.py +++ b/autograd/numpy/numpy_jvps.py @@ -267,10 +267,11 @@ defjvp(anp.partition, fwd_grad_partition) def atleast_jvpmaker(fun): def jvp(g, ans, *arys): - if len(arys) > ...
["tests/test_systematic.py::test_kron", "tests/test_systematic.py::test_atleast_2d", "tests/test_systematic.py::test_atleast_3d", "tests/test_systematic.py::test_hstack_1d", "tests/test_systematic.py::test_vstack_1d", "tests/test_systematic.py::test_vstack_2d", "tests/test_systematic.py::test_row_stack_2d", "tests/test...
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
9
8
1,462
0
0.6
1
0.75
1
0.273667
81.096
6,004
swe_smith::train::43690
swe_smith
train
43,690
sloria__environs.73c372df.func_basic__6euk2och
swesmith/sloria__environs.73c372df
sloria/environs
python
null
# Log level parsing is broken in environs I've found an issue with the log level parsing in environs. It seems that the log level values are not being correctly processed. ## Current behavior When using the `log_level` parser, the following issues occur: 1. String log levels are converted to lowercase instead of up...
diff --git a/src/environs/__init__.py b/src/environs/__init__.py index 00f6072..ba36712 100644 --- a/src/environs/__init__.py +++ b/src/environs/__init__.py @@ -401,11 +401,11 @@ class _LogLevelField(ma.fields.Integer): try: return super()._format_num(value) except (TypeError, ValueError)...
["tests/test_environs.py::TestCasting::test_log_level_cast", "tests/test_environs.py::TestCasting::test_invalid_log_level", "tests/test_environs.py::TestDumping::test_dump"]
["tests/test_environs.py::TestCasting::test_call", "tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_basic", "tests/test_environs.py::TestCasting::test_empty_str", "tests/test_environs.py::TestCasting::test_int_cast", "tests/test_environs.py::TestCasting::test_inv...
jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df
true
null
1
6
3
1,522
0
0.6
1
0.75
1
0.273667
81.096
6,005
swe_smith::train::18939
swe_smith
train
18,939
seperman__deepdiff.ed252022.func_basic__w96bnakw
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Delta reverse operation fails with bidirectional=True #### Description When creating a Delta with `bidirectional=True`, the reverse operation (subtracting the delta) produces incorrect results. The delta appears to be corrupted during the reverse diff generation process. #### Steps/Code to Reproduce ```python from ...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..db8b328 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -792,7 +792,7 @@ class Delta: value=new_obj, action=parent_to_obj_action) def _get_reverse_diff(self): - if not self.bidirectional: +...
["tests/test_delta.py::TestBasicsOfDelta::test_from_null_delta_json", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference3_delta", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case1]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case2]", "tests/test_delta.py::TestDelta::test_delta_cases...
["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
22
18
1,202
0
0.6
1
0.75
1
0.273667
81.096
6,006
swe_smith::train::10173
swe_smith
train
10,173
paramiko__paramiko.23f92003.combine_file__r5v8arkd
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
ECDH NIST P-256 key exchange fails with AttributeError #### Description When using ECDH NIST P-256 key exchange, both client and server modes fail with an AttributeError during the key exchange process. #### Steps/Code to Reproduce ```python import paramiko from paramiko.kex_ecdh_nist import KexNistp256 # Create a...
diff --git a/paramiko/kex_ecdh_nist.py b/paramiko/kex_ecdh_nist.py index 41fab46..a539cff 100644 --- a/paramiko/kex_ecdh_nist.py +++ b/paramiko/kex_ecdh_nist.py @@ -23,28 +23,28 @@ class KexNistp256: curve = ec.SECP256R1() def __init__(self, transport): - self.transport = transport + self.tran...
["tests/test_kex.py::KexTest::test_kex_nistp256_client", "tests/test_kex.py::KexTest::test_kex_nistp256_server"]
["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
26
2
1,121
0
0.6
1
0.75
1
0.2735
81.0955
6,007
swe_smith::train::14260
swe_smith
train
14,260
python-openxml__python-docx.0cf6d71f.func_pm_ctrl_shuffle__ffz505nd
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
[Bug]: Error when accessing gutter property in section properties ### Bug summary When trying to access the `gutter` property of a section in a Word document, I'm getting an error. The code is failing when trying to retrieve the gutter margin value from a section that has page margin settings. ### Code for reproduct...
diff --git a/src/docx/oxml/section.py b/src/docx/oxml/section.py index 71072e2..87a1097 100644 --- a/src/docx/oxml/section.py +++ b/src/docx/oxml/section.py @@ -230,14 +230,13 @@ class CT_SectPr(BaseOxmlElement): @property def gutter(self) -> Length | None: + if pgMar is None: + return Non...
["tests/test_section.py::DescribeSection::it_knows_its_page_margins[w:sectPr/w:pgMar{w:gutter=600}-gutter-381000]"]
["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
7
1
1,501
0
0.6
1
0.75
1
0.2735
81.0955
6,008
swe_smith::train::1782
swe_smith
train
1,782
agronholm__typeguard.b6a7e438.func_basic__kakwmmrb
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking fails with AttributeError on Name expressions #### Description When using typeguard's type checking functionality, certain expressions involving Name nodes cause AttributeError crashes during AST transformation. The transformer appears to be incorrectly handling the logic for determining ignored names a...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..3fda430 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -179,26 +179,26 @@ class TransformMemo: def is_ignored_name(self, expression: expr | Expr | None) -> bool: top_expression = ...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_suppression.py::test_contextmanager_typechecked", "tests/test_suppression.py::test_decorator_typechecked", "tests/test_transformer.py::test_arguments_only", "tests/test_transformer.py::test_return_only"...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
12
120
1,400
0
0.6
1
0.75
1
0.273333
81.095
6,009
swe_smith::train::21741
swe_smith
train
21,741
pexpect__ptyprocess.1067dbda.combine_file__3cb6g60c
swesmith/pexpect__ptyprocess.1067dbda
pexpect/ptyprocess
python
null
waitnoecho() method returns incorrect values and causes timeout logic errors #### Description The `waitnoecho()` method has inverted logic that causes it to return incorrect boolean values and breaks timeout handling. When called with a timeout, it returns `True` when it should return `False` and vice versa. #### St...
diff --git a/ptyprocess/ptyprocess.py b/ptyprocess/ptyprocess.py index 0f05803..4bcfda0 100644 --- a/ptyprocess/ptyprocess.py +++ b/ptyprocess/ptyprocess.py @@ -442,15 +442,15 @@ class PtyProcess(object): If ``timeout=None`` then this method to block until ECHO flag is False. ''' - if timeout...
["tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_forever", "tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_timeout", "tests/test_spawn.py::PtyTestCase::test_pass_fds", "tests/test_spawn.py::PtyTestCase::test_spawn_sh", "tests/test_spawn.py::PtyTestCase::test_spawn_sh_unicode", "tests/test_wait.py::TestWaitA...
["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", "tests/test_spawn.py::PtyTestCase::test_quick_spawn"]
jyangballin/swesmith.x86_64.pexpect_1776_ptyprocess.1067dbda
true
null
1
23
8
1,180
0
0.6
1
0.75
1
0.273333
81.095
6,010
swe_smith::train::24042
swe_smith
train
24,042
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__mfo76fpg
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
_print_attrs function returns early causing UnboundLocalError #### Description The `_print_attrs` function in `sunpy/net/attr.py` has a bug where it returns early before defining all necessary variables, causing an `UnboundLocalError` when trying to access undefined local variables. #### Steps/Code to Reproduce ```...
diff --git a/sunpy/net/attr.py b/sunpy/net/attr.py index 3fc4f23..e95d7e6 100644 --- a/sunpy/net/attr.py +++ b/sunpy/net/attr.py @@ -40,6 +40,14 @@ def make_tuple(): def _print_attrs(attr, html=False): + return '\n'.join(lines) + + lines = [*[format_line.format(line) for line in lines], + *table....
["sunpy/net/tests/test_attr.py::test_empty", "sunpy/net/tests/test_attr.py::test_attr_metamagic", "sunpy/net/tests/test_attr.py::test_attr_iterable_length", "sunpy/net/tests/test_attr.py::test_asterisk_attrs_time"]
["sunpy/net/tests/test_attr.py::test_empty_type[int]", "sunpy/net/tests/test_attr.py::test_empty_type[str]", "sunpy/net/tests/test_attr.py::test_empty_type[float]", "sunpy/net/tests/test_attr.py::test_empty_type[list]", "sunpy/net/tests/test_attr.py::test_empty_type[set]", "sunpy/net/tests/test_attr.py::test_empty_type...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
35
4
940
0
0.6
1
0.75
1
0.273333
81.095
6,011
swe_smith::train::44709
swe_smith
train
44,709
mahmoud__glom.fb3c4e76.func_basic__e8787sno
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Iter() streaming operations broken after recent changes #### Description The `Iter()` streaming operations are not working correctly. When using basic iteration operations like `filter()`, `first()`, `chunked()`, etc., the operations are failing with various errors including `TypeError` and incorrect path indexing. ...
diff --git a/glom/streaming.py b/glom/streaming.py index 4da5fb5..1c3705a 100644 --- a/glom/streaming.py +++ b/glom/streaming.py @@ -93,21 +93,18 @@ class Iter: def _iterate(self, target, scope): iterate = scope[TargetRegistry].get_handler('iterate', target, path=scope[Path]) try: - it...
["glom/test/test_streaming.py::test_iter", "glom/test/test_streaming.py::test_filter", "glom/test/test_streaming.py::test_map", "glom/test/test_streaming.py::test_split_flatten", "glom/test/test_streaming.py::test_chunked", "glom/test/test_streaming.py::test_windowed", "glom/test/test_streaming.py::test_unique", "glom/...
["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
17
13
1,300
0
0.6
1
0.75
1
0.273333
81.095
6,012
swe_smith::train::38131
swe_smith
train
38,131
weaveworks__grafanalib.5c3b17ed.func_pm_remove_loop__mk5qowxt
swesmith/weaveworks__grafanalib.5c3b17ed
weaveworks/grafanalib
python
null
_deep_update function missing implementation causes KeyError exceptions #### Description When using various panel types and dashboard components, KeyError exceptions are raised for expected attributes that should be present in the JSON output. #### Steps/Code to Reproduce ```python from grafanalib import core as G ...
diff --git a/grafanalib/core.py b/grafanalib/core.py index 79849fe..ca8f174 100644 --- a/grafanalib/core.py +++ b/grafanalib/core.py @@ -1891,16 +1891,6 @@ def _deep_update(base_dict, extra_dict): if extra_dict is None: return base_dict - for k, v in extra_dict.items(): - if k in base_dict and...
["grafanalib/tests/test_core.py::test_ePict", "grafanalib/tests/test_core.py::test_Text", "grafanalib/tests/test_core.py::test_Discrete", "grafanalib/tests/test_core.py::test_dashboard_list", "grafanalib/tests/test_core.py::test_logs_panel", "grafanalib/tests/test_core.py::test_panel_extra_json", "grafanalib/tests/test...
["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_...
jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed
true
null
1
10
19
1,439
0
0.6
1
0.75
1
0.273167
81.0945
6,013
swe_smith::train::47151
swe_smith
train
47,151
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__oc8ztnq0
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
ParkingLot breaker registration modifies global state before validation #### Description When adding a task as a parking lot breaker, the global state is modified before checking if the task is still valid. This causes the task to be registered in `GLOBAL_PARKING_LOT_BREAKER` even when the task has already exited and...
diff --git a/src/trio/_core/_parking_lot.py b/src/trio/_core/_parking_lot.py index af6ff61..1843031 100644 --- a/src/trio/_core/_parking_lot.py +++ b/src/trio/_core/_parking_lot.py @@ -97,15 +97,14 @@ def add_parking_lot_breaker(task: Task, lot: ParkingLot) -> None: raises: trio.BrokenResourceError: if the ...
["src/trio/_tests/test_sync.py::test_lock_acquire_unowned_lock", "src/trio/_tests/test_sync.py::test_lock_multiple_acquire", "src/trio/_tests/test_sync.py::test_lock_handover"]
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
9
3
1,459
0
0.6
1
0.75
1
0.273167
81.0945
6,014
swe_smith::train::28181
swe_smith
train
28,181
Mimino666__langdetect.a1598f1a.combine_file__wmx1tqly
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
# Language detection not working in langdetect **Describe the bug** After updating to the latest version, the language detection functionality in langdetect seems to be completely broken. I can't get it to detect any languages correctly. ## Reproduction steps Here's a simple example that used to work but now fails:...
diff --git a/langdetect/detector_factory.py b/langdetect/detector_factory.py index e026161..ce148d4 100644 --- a/langdetect/detector_factory.py +++ b/langdetect/detector_factory.py @@ -65,17 +65,16 @@ class DetectorFactory(object): def load_json_profile(self, json_profiles): langsize, index = len(json_p...
["langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4", "langdetect/tests/test_detector.py::DetectorTest::t...
["langdetect/tests/test_detector.py::DetectorTest::test_lang_list", "langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_lang_profile.py::LangProfileText::test_add", "langdetect/tests/utils/test_lang_profile.py::LangP...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
1
17
5
1,299
0
0.6
1
0.75
1
0.273167
81.0945
6,015
swe_smith::train::32957
swe_smith
train
32,957
pydantic__pydantic.acb0f10f.pr_6937
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# RootModel now allows setting model_config['extra'] which should be forbidden ## Description I've discovered that RootModel now allows setting `model_config['extra']` which should be forbidden according to the previous behavior. This is a regression from previous versions. ## Steps to reproduce Here's a simple exa...
diff --git a/pydantic/errors.py b/pydantic/errors.py index df2f364..3df08e9 100644 --- a/pydantic/errors.py +++ b/pydantic/errors.py @@ -61,18 +61,6 @@ PydanticErrorCodes = Literal[ 'multiple-field-serializers', 'invalid-annotated-type', 'type-adapter-config-unused', - 'root-model-extra', - 'uneval...
["tests/test_docs.py::test_error_codes", "tests/test_root_model.py::test_extra_error[ignore]", "tests/test_root_model.py::test_extra_error[allow]", "tests/test_root_model.py::test_extra_error[forbid]"]
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
2
25
4
1,139
0
0.6
1
0.75
1
0.273167
81.0945
6,016
swe_smith::train::48803
swe_smith
train
48,803
facebookresearch__hydra.0f03eb60.func_pm_ctrl_invert_if__uke34gat
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
sort() function returns wrong result for single non-primitive arguments #### Description The `sort()` function in Hydra's grammar functions is not handling single non-primitive arguments correctly. When passing a single argument that is not a primitive type (int, float, bool, str) and not a sweep or list, the functio...
diff --git a/hydra/_internal/grammar/grammar_functions.py b/hydra/_internal/grammar/grammar_functions.py index 879b06b..375141b 100644 --- a/hydra/_internal/grammar/grammar_functions.py +++ b/hydra/_internal/grammar/grammar_functions.py @@ -326,18 +326,6 @@ def sort( return _sort_sweep(sweep, reverse) i...
["tests/test_hydra_cli_errors.py::test_cli_error[empty_sort]", "tests/test_overrides_parser.py::test_value[sort([2,3,1])]", "tests/test_overrides_parser.py::test_value[sort([2,3,1],reverse=true)]", "tests/test_overrides_parser.py::test_value[sort(3,2,1)]", "tests/test_overrides_parser.py::test_value[sort(a,c,b,reverse=...
["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
25
24
1,139
0
0.6
1
0.75
1
0.273167
81.0945
6,017
swe_smith::train::33379
swe_smith
train
33,379
pallets__click.fde47b4b.combine_module__r6drt111
swesmith/pallets__click.fde47b4b
pallets/click
python
null
Shell completion broken after recent changes #### Description Shell completion is completely broken and throws exceptions when trying to complete commands. The completion system fails with various errors like `NoArgsIsCallableError`, `BadParameter`, and `MissingParameter` when attempting to complete any command. ###...
diff --git a/src/click/shell_completion.py b/src/click/shell_completion.py index c8655b1..6f200fe 100644 --- a/src/click/shell_completion.py +++ b/src/click/shell_completion.py @@ -543,8 +543,8 @@ def _resolve_context( :param prog_name: Name of the executable in the shell. :param args: List of complete args b...
["tests/test_shell_completion.py::test_group", "tests/test_shell_completion.py::test_group_command_same_option", "tests/test_shell_completion.py::test_chained", "tests/test_shell_completion.py::test_argument_order", "tests/test_shell_completion.py::test_argument_default", "tests/test_shell_completion.py::test_type_choi...
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
2
16
35
1,318
0
0.6
1
0.75
1
0.273
81.094
6,018
swe_smith::train::19131
swe_smith
train
19,131
seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__r6weehjs
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepSearch initialization order causes AttributeError When creating a DeepSearch instance, the code tries to access attributes that haven't been initialized yet, causing AttributeError exceptions. #### Steps/Code to Reproduce ```python from deepdiff import DeepSearch obj = {'test': 'somewhere', 'num': 42} item = 's...
diff --git a/deepdiff/search.py b/deepdiff/search.py index ae86ce0..43f3dad 100644 --- a/deepdiff/search.py +++ b/deepdiff/search.py @@ -94,27 +94,21 @@ class DeepSearch(dict): use_regexp=False, strict_checking=True, **kwargs): - if kwargs: - raise...
["tests/test_command.py::TestCommands::test_command_grep", "tests/test_search.py::TestDeepSearch::test_number_in_list", "tests/test_search.py::TestDeepSearch::test_number_in_list2", "tests/test_search.py::TestDeepSearch::test_number_in_list3", "tests/test_search.py::TestDeepSearch::test_number_in_list_strict_false", "t...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
39
62
858
0
0.6
1
0.75
1
0.273
81.094
6,019
swe_smith::train::9521
swe_smith
train
9,521
marshmallow-code__webargs.dbde72fe.combine_file__wzyp5usr
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
Nested field initialization broken when using dict schema definition #### Description When creating a Nested field with a dictionary schema definition, the field initialization fails with a TypeError. This affects both direct usage of the Nested field and DelimitedList/DelimitedTuple fields that depend on it. #### S...
diff --git a/src/webargs/fields.py b/src/webargs/fields.py index edd670e..d537c9d 100644 --- a/src/webargs/fields.py +++ b/src/webargs/fields.py @@ -45,9 +45,9 @@ class Nested(ma.fields.Nested): # type: ignore[no-redef] """ def __init__(self, nested, *args, **kwargs): - if isinstance(nested, dict): ...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_nested_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_nested_many_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_nested_many_missing", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_nested_many_with_data_key", "t...
["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
27
40
1,098
0
0.6
1
0.75
1
0.273
81.094
6,020
swe_smith::train::28695
swe_smith
train
28,695
encode__starlette.db5063c2.func_basic__uy5s7359
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Exception handling broken for non-HTTPException errors #### Description When an exception that is not an HTTPException is raised in an application, the exception handler logic is inverted and doesn't work correctly. Instead of handling the exception properly, it tries to look up a status handler for 500 errors when i...
diff --git a/starlette/_exception_handler.py b/starlette/_exception_handler.py index baf6e2f..6e2e0e3 100644 --- a/starlette/_exception_handler.py +++ b/starlette/_exception_handler.py @@ -29,13 +29,13 @@ def wrap_app_handling_exceptions(app: ASGIApp, conn: Request | WebSocket) -> ASG exception_handlers, statu...
["tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[trio]", "tests/test_applications.py::test_400[asyncio]", "tests/test_applications.py::test_405[asyncio]", "tests/test_applications.py::test_websocket_raise_websocket_exception[asyncio]...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTTPMiddle...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
12
62
1,397
0
0.6
1
0.75
1
0.272833
81.0935
6,021
swe_smith::train::32822
swe_smith
train
32,822
pydantic__pydantic.acb0f10f.lm_rewrite__x71xz977
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Frozen models raise TypeError instead of ValidationError when fields are modified #### Description When trying to modify fields on a frozen model, a `TypeError` is raised instead of the expected `ValidationError`. This breaks existing code that expects to catch `ValidationError` when attempting to modify frozen model...
diff --git a/pydantic/main.py b/pydantic/main.py index 03cb511..e926a16 100644 --- a/pydantic/main.py +++ b/pydantic/main.py @@ -82,17 +82,18 @@ _object_setattr = _model_construction.object_setattr def _check_frozen(model_cls: type[BaseModel], name: str, value: Any) -> None: - if model_cls.model_config.get('fro...
["tests/test_computed_fields.py::test_frozen", "tests/test_construction.py::test_immutable_copy_with_frozen[copy]", "tests/test_construction.py::test_immutable_copy_with_frozen[model_copy]", "tests/test_create_model.py::test_custom_config", "tests/test_docs.py::test_docstrings_examples[pydantic/main.py:1169-1173]", "te...
["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
23
11
1,177
0
0.6
1
0.75
1
0.272833
81.0935
6,022
swe_smith::train::51791
swe_smith
train
51,791
pydicom__pydicom.7d361b3d.func_basic__6n74r8q4
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
create_icc_transform returns None instead of raising ImportError when Pillow is missing #### Description The `create_icc_transform` function is supposed to raise an `ImportError` when Pillow is not available, but it now returns `None` instead. This breaks the expected behavior for applications that rely on proper err...
diff --git a/src/pydicom/pixels/processing.py b/src/pydicom/pixels/processing.py index 62f26f8..5f992b3 100644 --- a/src/pydicom/pixels/processing.py +++ b/src/pydicom/pixels/processing.py @@ -1044,45 +1044,31 @@ def create_icc_transform( A color transformation object that can be used with :func:`apply_icc_pro...
["tests/pixels/test_processing.py::test_create_icc_transform_no_pillow_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
32
1
997
0
0.6
1
0.75
1
0.272833
81.0935
6,023
swe_smith::train::17218
swe_smith
train
17,218
prettytable__prettytable.ca90b055.lm_rewrite__1lpuu9vq
swesmith/prettytable__prettytable.ca90b055
prettytable/prettytable
python
null
# none_format validation accepts dictionaries but fails with TypeError in tests ## Description The `none_format` parameter in PrettyTable is supposed to only accept string values, but the validation logic has been changed to also accept dictionaries. This causes inconsistency with the documented behavior and breaks e...
diff --git a/src/prettytable/prettytable.py b/src/prettytable/prettytable.py index 818a520..86b9265 100644 --- a/src/prettytable/prettytable.py +++ b/src/prettytable/prettytable.py @@ -587,13 +587,18 @@ class PrettyTable: raise ValueError(msg) def _validate_none_format(self, val): - try: - ...
["tests/test_prettytable.py::TestNoneOption::test_none_char_invalid_option"]
["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
1
19
1
1,256
0
0.6
1
0.75
1
0.272667
81.093
6,024
swe_smith::train::50133
swe_smith
train
50,133
facebookresearch__fvcore.a491d5b9.lm_rewrite__1df9kxnf
swesmith/facebookresearch__fvcore.a491d5b9
facebookresearch/fvcore
python
null
# ConstantParamScheduler no longer validates 'where' parameter value ## Description In the latest version, the `ConstantParamScheduler` class no longer validates that the `where` parameter is within the valid range [0, 1). This is a regression from previous behavior where an attempt to use a value of 1.0 or greater w...
diff --git a/fvcore/common/param_scheduler.py b/fvcore/common/param_scheduler.py index 9042981..d1d0a3a 100644 --- a/fvcore/common/param_scheduler.py +++ b/fvcore/common/param_scheduler.py @@ -56,13 +56,17 @@ class ConstantParamScheduler(ParamScheduler): def __init__(self, value: float) -> None: self._val...
["tests/param_scheduler/test_scheduler_constant.py::TestConstantScheduler::test_scheduler"]
["io_tests/test_file_io.py::TestNativeIO::test_bad_args", "io_tests/test_file_io.py::TestNativeIO::test_copy", "io_tests/test_file_io.py::TestNativeIO::test_exists", "io_tests/test_file_io.py::TestNativeIO::test_get_local_path", "io_tests/test_file_io.py::TestNativeIO::test_isdir", "io_tests/test_file_io.py::TestNative...
jyangballin/swesmith.x86_64.facebookresearch_1776_fvcore.a491d5b9
true
null
1
16
1
1,316
0
0.6
1
0.75
1
0.272667
81.093
6,025
swe_smith::train::35748
swe_smith
train
35,748
stanfordnlp__dspy.651a4c71.func_pm_remove_cond__8zuzv88c
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# HotPotQA dataset initialization fails due to undefined variable ## Description I'm trying to use the HotPotQA dataset from dspy, but I'm encountering an error during initialization. The dataset fails to load because it's trying to access a variable `keys` that doesn't seem to be defined in the current scope. When ...
diff --git a/dspy/datasets/hotpotqa.py b/dspy/datasets/hotpotqa.py index 9954183..b9d0dad 100644 --- a/dspy/datasets/hotpotqa.py +++ b/dspy/datasets/hotpotqa.py @@ -26,12 +26,6 @@ class HotPotQA(Dataset): official_train = [] for raw_example in hf_official_train: if raw_example["level"] ==...
["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
12
4
1,396
0
0.6
1
0.75
1
0.272667
81.093
6,026
swe_smith::train::10134
swe_smith
train
10,134
paramiko__paramiko.23f92003.combine_file__inodh9im
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
RSA key public_numbers property returns incorrect values for public keys #### Description When working with RSA public keys, the `public_numbers` property incorrectly attempts to access `private_numbers()` method which doesn't exist on public key objects, causing AttributeError exceptions. #### Steps/Code to Reprodu...
diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index b7ad3ce..ec71b67 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -89,10 +89,10 @@ class RSAKey(PKey): @property def public_numbers(self): - if isinstance(self.key, rsa.RSAPrivateKey): + if not isinstance(self.key, rsa.RSAPu...
["tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::AgentKey_::fields::defers_to_inner_key_when_present[rsa]", "tests/agent.py::AgentKey_::asbytes::defers_to_inner_key_when_present[rsa]", "tests/pkey.py::PKey_::from_type_string::loads_from_type_and_bytes[rsa]", "tests/agent.py::Age...
["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_::get_bits::defers_to_inner_key_when_present[rsa]", "tests/pkey.p...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
13
137
1,376
0
0.6
1
0.75
1
0.272667
81.093
6,027
swe_smith::train::52595
swe_smith
train
52,595
pydicom__pydicom.7d361b3d.func_pm_remove_cond__nqkekcle
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
dcmwrite validation checks removed causing invalid DICOM files to be written #### Description After a recent change, `dcmwrite()` no longer validates several important constraints when writing DICOM files, allowing invalid files to be created without any warnings or errors. #### Steps/Code to Reproduce ```python fr...
diff --git a/src/pydicom/filewriter.py b/src/pydicom/filewriter.py index cb3ce64..80306ac 100644 --- a/src/pydicom/filewriter.py +++ b/src/pydicom/filewriter.py @@ -1296,9 +1296,6 @@ def dcmwrite( "and keyword argument" ) - if write_like_original is None: - write_like_original = __writ...
["tests/test_filewriter.py::TestWriteFile::test_write_double_filemeta", "tests/test_filewriter.py::TestScratchWriteDateTime::test_write_double_filemeta", "tests/test_filewriter.py::TestDCMWrite::test_write_like_original_warns", "tests/test_filewriter.py::TestDCMWrite::test_command_set_raises", "tests/test_filewriter.py...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
17
7
1,295
0
0.6
1
0.75
1
0.2725
81.0925
6,028
swe_smith::train::49212
swe_smith
train
49,212
mozilla__bleach.73871d76.combine_module__u70es7f2
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parsing and tree building broken after recent changes #### Description The HTML parsing functionality appears to be completely broken. When trying to use bleach for cleaning or linkifying HTML content, it's throwing AttributeError exceptions about 'NoneType' object having no attribute methods. #### Steps/Code t...
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
2
27
183
1,095
0
0.6
1
0.75
1
0.2725
81.0925
6,029
swe_smith::train::20644
swe_smith
train
20,644
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__hgr8n2rd
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in merge_subqueries optimizer when processing WHERE clauses #### Description The merge_subqueries optimizer is throwing an `UnboundLocalError: local variable 'expression' referenced before assignment` when processing certain SQL queries. This appears to be related to the WHERE clause merging logic. ...
diff --git a/sqlglot/optimizer/merge_subqueries.py b/sqlglot/optimizer/merge_subqueries.py index 14ecde6..d1a7650 100644 --- a/sqlglot/optimizer/merge_subqueries.py +++ b/sqlglot/optimizer/merge_subqueries.py @@ -333,19 +333,6 @@ def _merge_expressions(outer_scope: Scope, inner_scope: Scope, alias: str) -> No def ...
["tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", "tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch"]
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
25
4
1,134
0
0.6
1
0.75
1
0.272333
81.092
6,030
swe_smith::train::20703
swe_smith
train
20,703
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__r2awnza2
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
DuckDB dialect length_sql method raises UnboundLocalError #### Description The DuckDB dialect's `length_sql` method is raising an `UnboundLocalError` when processing LENGTH expressions. The error occurs because variables are being referenced before they are defined due to incorrect code organization. #### Steps/Code...
diff --git a/sqlglot/dialects/duckdb.py b/sqlglot/dialects/duckdb.py index b362cfe..3256ac3 100644 --- a/sqlglot/dialects/duckdb.py +++ b/sqlglot/dialects/duckdb.py @@ -1011,25 +1011,12 @@ class DuckDB(Dialect): return f"{this}{expression_sql})" def length_sql(self, expression: exp.Length) -> st...
["tests/dialects/test_duckdb.py::TestDuckDB::test_duckdb", "tests/dialects/test_duckdb.py::TestDuckDB::test_prefix_aliases"]
["tests/dialects/test_duckdb.py::TestDuckDB::test_analyze", "tests/dialects/test_duckdb.py::TestDuckDB::test_array", "tests/dialects/test_duckdb.py::TestDuckDB::test_array_index", "tests/dialects/test_duckdb.py::TestDuckDB::test_at_sign_to_abs", "tests/dialects/test_duckdb.py::TestDuckDB::test_attach_detach", "tests/di...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
25
2
1,134
0
0.6
1
0.75
1
0.272333
81.092
6,031
swe_smith::train::5190
swe_smith
train
5,190
agronholm__exceptiongroup.0b4f4937.func_pm_remove_loop__0cbqnb6x
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
Exception handlers not being called in catch context manager #### Description When using the `catch` context manager to handle exceptions, the registered handlers are not being invoked. The exceptions pass through unhandled even when they match the specified exception types. #### Steps/Code to Reproduce ```python f...
diff --git a/src/exceptiongroup/_catch.py b/src/exceptiongroup/_catch.py index 0246568..360f2ff 100644 --- a/src/exceptiongroup/_catch.py +++ b/src/exceptiongroup/_catch.py @@ -55,30 +55,6 @@ class _Catcher: excgroup = BaseExceptionGroup("", [exc]) new_exceptions: list[BaseException] = [] - ...
["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tests/test_catch.py::test_catch_full_match", "tests/test_catch.py::test_catch_handler_raises", "tests/test_catch.py::test_bare_raise_in_hand...
["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
25
10
1,134
0
0.6
1
0.75
1
0.272333
81.092
6,032
swe_smith::train::32411
swe_smith
train
32,411
pydantic__pydantic.acb0f10f.combine_module__8zbej3c6
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Import strings with multiple colons no longer raise validation error #### Description Import strings that contain more than one colon character are now accepted when they should be rejected with a validation error. #### Steps/Code to Reproduce ```python from pydantic import TypeAdapter, ValidationError from pydanti...
diff --git a/pydantic/_internal/_discriminated_union.py b/pydantic/_internal/_discriminated_union.py index 5dd6fda..9daca32 100644 --- a/pydantic/_internal/_discriminated_union.py +++ b/pydantic/_internal/_discriminated_union.py @@ -460,20 +460,16 @@ class _ApplyInferredDiscriminator: code='discriminat...
["tests/test_discriminated_union.py::test_distinct_choices", "tests/test_types.py::test_string_import_errors[collections:abc:Mapping-errors2]"]
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
2
29
2
1,054
0
0.6
1
0.75
1
0.272333
81.092
6,033
r2e_gym::train::6569
r2e_gym
train
6,569
pillow__aa929dda98cb0243face04049aa75000efc291d3
pillow
python-pillow/pillow
python
aa929dda98cb0243face04049aa75000efc291d3
**Title:** `Color3DLUT` Class Missing `from_cube_file` Method Causes AttributeError **Description:** When trying to create a `Color3DLUT` instance from a cube file, an `AttributeError` is raised because the `from_cube_file` method does not exist. This prevents the usage of cube files for defining color lookup tables, ...
diff --git a/src/PIL/ImageFilter.py b/src/PIL/ImageFilter.py --- a/src/PIL/ImageFilter.py +++ b/src/PIL/ImageFilter.py @@ -16,6 +16,8 @@ # import functools + +from ._util import isPath class Filter(object): @@ -343,7 +345,8 @@ raise ValueError( "The table should have channels * si...
diff --git a/Tests/test_color_lut.py b/Tests/test_color_lut.py --- a/Tests/test_color_lut.py +++ b/Tests/test_color_lut.py @@ -253,37 +253,37 @@ ImageFilter.Color3DLUT((2, 2, 2), [[1, 1]] * 8) def test_convert_table(self): - flt = ImageFilter.Color3DLUT(2, [0, 1, 2] * 8) - self.assertE...
null
null
namanjain12/pillow_final:aa929dda98cb0243face04049aa75000efc291d3
true
null
1
57
null
1,206
0
0.75
1
0.6375
1
0.391
81.09175
6,034
swe_bench::dev::71
swe_bench
dev
71
pvlib__pvlib-python-980
pvlib/pvlib-python
pvlib/pvlib-python
python
75369dcabacb6c6c38790cc23825f33f155ad1a9
pvlib.soiling.hsu model implementation errors **Describe the bug** I ran an example run using the Matlab version of the HSU soiling function and found that the python version did not give anywhere near the same results. The Matlab results matched the results in the original JPV paper. As a result of this test, I foun...
nice sleuthing Josh! Is a PR forthcoming? 🎉 Hi Mark, Yes, a PR is in the works. I need to improve the testing first. -Josh From: Mark Mikofski <notifications@github.com> Reply-To: pvlib/pvlib-python <reply@reply.github.com> Date: Tuesday, May 19, 2020 at 3:51 PM To: pvlib/pvlib-python <pvli...
diff --git a/pvlib/soiling.py b/pvlib/soiling.py --- a/pvlib/soiling.py +++ b/pvlib/soiling.py @@ -12,8 +12,8 @@ def hsu(rainfall, cleaning_threshold, tilt, pm2_5, pm10, depo_veloc=None, rain_accum_period=pd.Timedelta('1h')): """ - Calculates soiling ratio given particulate and rain data using the mod...
diff --git a/pvlib/tests/test_soiling.py b/pvlib/tests/test_soiling.py --- a/pvlib/tests/test_soiling.py +++ b/pvlib/tests/test_soiling.py @@ -18,24 +18,24 @@ def expected_output(): end=pd.Timestamp(2019, 1, 1, 23, 59, 0), freq='1h') expected_no_cleaning = pd.Series( - data=[0.9723...
["pvlib/tests/test_soiling.py::test_hsu_no_cleaning", "pvlib/tests/test_soiling.py::test_hsu", "pvlib/tests/test_soiling.py::test_hsu_defaults", "pvlib/tests/test_soiling.py::test_hsu_variable_time_intervals"]
["pvlib/tests/test_soiling.py::test_kimber_nowash", "pvlib/tests/test_soiling.py::test_kimber_manwash", "pvlib/tests/test_soiling.py::test_kimber_norain", "pvlib/tests/test_soiling.py::test_kimber_initial_soil"]
null
true
2020-06-12T17:45:46Z
1
17
4
1,093
0
0.8
1
0.55
1
0.238833
81.0915
6,035
swe_smith::train::10272
swe_smith
train
10,272
paramiko__paramiko.23f92003.func_basic__3180jhl8
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH key authentication fails with FileNotFoundError when using certificate files #### Description When attempting SSH authentication with key files that have associated certificate files, the connection fails with a `FileNotFoundError`. This appears to be related to how the client handles the key and certificate file...
diff --git a/paramiko/client.py b/paramiko/client.py index d8be910..c1da1a8 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -635,19 +635,19 @@ class SSHClient(ClosingContextManager): key_path = filename cert_path = filename + cert_suffix # Blindly try the key path; if no p...
["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_dsa", "tests/test_client.py:...
["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
14
13
1,353
0
0.6
1
0.75
1
0.272167
81.0915
6,036
swe_smith::train::36689
swe_smith
train
36,689
lincolnloop__python-qrcode.456b01d4.func_pm_ctrl_shuffle__u48lldlh
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
# QRCode.print_tty() function broken after code reorganization ## Description The `print_tty()` method in the QRCode class is not working properly. When trying to output a QR code to a TTY terminal, it fails with errors. ## Steps to reproduce ```python import qrcode import io # Create a QR code qr = qrcode.QRCode(...
diff --git a/qrcode/main.py b/qrcode/main.py index 46116b5..ea7f3ed 100644 --- a/qrcode/main.py +++ b/qrcode/main.py @@ -257,24 +257,12 @@ class QRCode(Generic[GenericImage]): return pattern def print_tty(self, out=None): - """ - Output the QR Code only using TTY colors. - - If the ...
["qrcode/tests/test_qrcode.py::test_print_tty_stdout", "qrcode/tests/test_qrcode.py::test_print_tty"]
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
27
2
1,093
0
0.6
1
0.75
1
0.272167
81.0915
6,037
swe_smith::train::44548
swe_smith
train
44,548
pydata__patsy.a5d16484.lm_rewrite__zm4hplbp
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
# Constraint parsing broken in patsy when using operators ## Description After a recent change to the `_token_maker` function in `patsy/constraint.py`, constraint parsing is completely broken. This affects any code that uses linear constraints. ## Steps to reproduce Here's a simple example that demonstrates the iss...
diff --git a/patsy/constraint.py b/patsy/constraint.py index 6c04414..02f61d2 100644 --- a/patsy/constraint.py +++ b/patsy/constraint.py @@ -174,12 +174,9 @@ _atomic = ["NUMBER", "VARIABLE"] def _token_maker(type, string): def make_token(scanner, token_string): - if type == "__OP__": - actual_...
["patsy/constraint.py::test__tokenize_constraint", "patsy/constraint.py::test_linear_constraint", "patsy/constraint.py::test_eval_errors", "patsy/design_info.py::test_DesignInfo_linear_constraint"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
9
4
1,453
0
0.6
1
0.75
1
0.272167
81.0915
6,038
r2e_gym::train::5926
r2e_gym
train
5,926
tornado__7056d6fbd1c4778cf56177698d57152188203e0d
tornado
tornadoweb/tornado
python
7056d6fbd1c4778cf56177698d57152188203e0d
**Title:** `url_escape` and `url_unescape` Do Not Support the `plus` Argument, Causing TypeError **Description:** When attempting to use the `plus` argument with the `url_escape` function to control how spaces are encoded, a `TypeError` is raised. This limitation prevents developers from specifying whether spaces sho...
diff --git a/tornado/escape.py b/tornado/escape.py --- a/tornado/escape.py +++ b/tornado/escape.py @@ -88,41 +88,67 @@ return re.sub(r"[\x00-\x20]+", " ", value).strip() -def url_escape(value): - """Returns a URL-encoded version of the given value.""" - return urllib_parse.quote_plus(utf8(value)) +def ur...
diff --git a/tornado/test/escape_test.py b/tornado/test/escape_test.py --- a/tornado/test/escape_test.py +++ b/tornado/test/escape_test.py @@ -151,7 +151,7 @@ self.assertEqual(utf8(xhtml_escape(unescaped)), utf8(escaped)) self.assertEqual(utf8(unescaped), utf8(xhtml_unescape(escaped))) - ...
null
null
namanjain12/tornado_final:7056d6fbd1c4778cf56177698d57152188203e0d
true
null
1
66
null
1,025
0
0.75
1
0.6375
1
0.390833
81.09125
6,039
swe_smith::train::31931
swe_smith
train
31,931
davidhalter__parso.338a5760.func_basic__cqhiazfu
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Future import validation incorrectly flags valid imports as errors #### Description When parsing Python code with `from __future__ import` statements, parso incorrectly reports syntax errors for valid future imports. The parser seems to be flagging legitimate future feature imports as "not defined" when they should b...
diff --git a/parso/python/errors.py b/parso/python/errors.py index 09c5047..f5673ab 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -742,23 +742,23 @@ class _FutureImportRule(SyntaxRule): message = "from __future__ imports must occur at the beginning of the file" def is_issue(self, node)...
["test/test_file_python_errors.py::test_on_itself[3.6]", "test/test_file_python_errors.py::test_on_itself[3.7]", "test/test_file_python_errors.py::test_on_itself[3.8]", "test/test_file_python_errors.py::test_on_itself[3.9]", "test/test_file_python_errors.py::test_on_itself[3.10]", "test/test_normalizer_issues_files.py:...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
32
9
992
0
0.6
1
0.75
1
0.272
81.091
6,040
swe_smith::train::24979
swe_smith
train
24,979
pylint-dev__astroid.b114f6b5.combine_file__4dk7nkzb
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
SSL module brain transform broken after recent changes #### Description The SSL module brain transform is not working correctly. When trying to access SSL constants and enums, inference fails with errors. #### Steps/Code to Reproduce ```python import astroid # This should work but fails module = astroid.parse(''' ...
diff --git a/astroid/brain/brain_ssl.py b/astroid/brain/brain_ssl.py index de932de..30c5cdc 100644 --- a/astroid/brain/brain_ssl.py +++ b/astroid/brain/brain_ssl.py @@ -53,7 +53,6 @@ def _options_enum() -> str: def ssl_transform() -> nodes.Module: return parse( f""" - # Import necessary for conversion...
["tests/brain/test_brain.py::ModuleExtenderTest::test_extension_modules", "tests/brain/test_brain.py::test_http_client_brain", "tests/brain/test_six.py::SixBrainTest::test_attribute_access_with_six_moves_imported", "tests/brain/test_ssl.py::test_ssl_brain"]
["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
20
4
1,232
0
0.6
1
0.75
1
0.272
81.091
6,041
swe_smith::train::24064
swe_smith
train
24,064
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__pwimk7fy
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
UnboundLocalError in observer_coordinate property when accessing map attributes #### Description When accessing various map properties that depend on the observer coordinate, an `UnboundLocalError` is raised for the `warning_message` variable. This affects multiple map operations including coordinate transformations,...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..a796cfa 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -1328,15 +1328,6 @@ class GenericMap(NDData): @property @cached_property_based_on('_meta_hash') def observer_coordinate(self): - """ - The Heliogra...
["sunpy/map/tests/test_mapbase.py::test_dsun", "sunpy/map/tests/test_mapbase.py::test_rsun_obs_without_rsun_ref", "sunpy/map/tests/test_mapbase.py::test_rsun_obs_with_rsun_ref", "sunpy/map/tests/test_mapbase.py::test_carrington_longitude", "sunpy/map/tests/test_mapbase.py::test_heliographic_latitude", "sunpy/map/tests/...
["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
19
22
1,252
0
0.6
1
0.75
1
0.272
81.091
6,042
swe_smith::train::50772
swe_smith
train
50,772
python-hyper__h11.bed0dd4a.combine_file__9wljotoa
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
Connection state machine broken after recent changes #### Description The HTTP connection state machine appears to be completely broken. Basic HTTP client/server interactions are failing with various errors including `AttributeError: 'tuple' object has no attribute 'discard'` and incorrect state transitions. #### St...
diff --git a/h11/_state.py b/h11/_state.py index 3ad444b..a881fce 100644 --- a/h11/_state.py +++ b/h11/_state.py @@ -265,7 +265,7 @@ class ConnectionState: self._fire_state_triggered_transitions() def process_keep_alive_disabled(self) -> None: - self.keep_alive = False + self.keep_alive = ...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_client_talking_to_http10_server", "h11/t...
["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_close_simple", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_connection.py::test_connection_drop"...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
28
28
1,072
0
0.6
1
0.75
1
0.272
81.091
6,043
swe_smith::train::36426
swe_smith
train
36,426
facelessuser__soupsieve.a8080d97.lm_rewrite__swzqhepn
swesmith/facelessuser__soupsieve.a8080d97
facelessuser/soupsieve
python
null
# CSS selector :has() pseudo-class not working correctly with no match I'm trying to use the `:has()` pseudo-class selector to find elements that don't have certain children, but it's not working as expected. ## Reproduction ```python from bs4 import BeautifulSoup import soupsieve as sv html = """ <div id="parent1"...
diff --git a/soupsieve/css_match.py b/soupsieve/css_match.py index e52e42d..f1d0b4e 100644 --- a/soupsieve/css_match.py +++ b/soupsieve/css_match.py @@ -829,19 +829,21 @@ class CSSMatch(_DocumentNav): def match_relations(self, el: bs4.Tag, relation: ct.SelectorList) -> bool: """Match relationship to oth...
["tests/test_level4/test_has.py::TestHas::test_has_no_match"]
["tests/test_api.py::TestSoupSieve::test_cache", "tests/test_api.py::TestSoupSieve::test_closest_match_complex_parent", "tests/test_api.py::TestSoupSieve::test_closest_match_parent", "tests/test_api.py::TestSoupSieve::test_closest_match_self", "tests/test_api.py::TestSoupSieve::test_closest_must_be_parent", "tests/test...
jyangballin/swesmith.x86_64.facelessuser_1776_soupsieve.a8080d97
true
null
1
28
1
1,072
0
0.6
1
0.75
1
0.272
81.091
6,044
r2e_gym::train::5847
r2e_gym
train
5,847
tornado__0d44009cdc165fc3810945c59db5743bc5e809d3
tornado
tornadoweb/tornado
python
0d44009cdc165fc3810945c59db5743bc5e809d3
**Title:** `gen_test` Decorator Rejects `timeout` Keyword Argument, Causing Test Failures **Description:** When using the `@gen_test` decorator with a `timeout` parameter to specify custom timeout durations for asynchronous tests, the tests fail because the decorator does not recognize the `timeout` keyword. This limi...
diff --git a/tornado/testing.py b/tornado/testing.py --- a/tornado/testing.py +++ b/tornado/testing.py @@ -82,6 +82,17 @@ return sock, port +def get_async_test_timeout(): + """Get the global timeout setting for async tests. + + Returns a float, the timeout in seconds. + """ + try: + return f...
diff --git a/tornado/test/testing_test.py b/tornado/test/testing_test.py --- a/tornado/test/testing_test.py +++ b/tornado/test/testing_test.py @@ -2,9 +2,26 @@ from __future__ import absolute_import, division, print_function, with_statement -from tornado import gen +from tornado import gen, ioloop from tornado.te...
null
null
namanjain12/tornado_final:0d44009cdc165fc3810945c59db5743bc5e809d3
true
null
1
62
null
1,104
0
0.75
1
0.6375
1
0.390667
81.09075
6,045
swe_smith::train::23849
swe_smith
train
23,849
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__cloy9qez
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Scraper initialization fails with AttributeError when pattern contains milliseconds #### Description When initializing a Scraper with a pattern that contains milliseconds (`%e`), the code fails with `AttributeError: 'NoneType' object has no attribute 'format'` or `AttributeError: 'NoneType' object has no attribute 's...
diff --git a/sunpy/net/scraper.py b/sunpy/net/scraper.py index 202638e..87dffde 100644 --- a/sunpy/net/scraper.py +++ b/sunpy/net/scraper.py @@ -120,18 +120,6 @@ class Scraper: else: raise ValueError("Either 'pattern' or 'format' must be provided.") if self.use_old_format: - if...
["sunpy/net/tests/test_scraper.py::test_directory_date_pattern", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_new_format", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_false", "sunpy/net/tests/test_scraper.py::test_directory_date_patternFalse_new_format", "sunpy/net/tests/test_scraper....
["sunpy/net/tests/test_scraper.py::test_url_pattern_new_format[fd_{{year:4d}}{{month:2d}}{{day:2d}}_{{hour:2d}}{{minute:2d}}{{second:2d}}_{{millisecond:3d}}.fts-fd_20130410_231211_119.fts-metadict1]"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
25
39
1,131
0
0.6
1
0.75
1
0.271833
81.0905
6,046
swe_smith::train::21762
swe_smith
train
21,762
pexpect__ptyprocess.1067dbda.func_pm_ctrl_shuffle__xib4ybaf
swesmith/pexpect__ptyprocess.1067dbda
pexpect/ptyprocess
python
null
# Bug: setecho() function in ptyprocess fails with UnboundLocalError ## Description When using the `setecho()` function in ptyprocess, it fails with an UnboundLocalError. This happens because the function tries to use a variable before it's defined. ## Steps to reproduce ```python from ptyprocess import PtyProcess ...
diff --git a/ptyprocess/ptyprocess.py b/ptyprocess/ptyprocess.py index 0f05803..aa7c4dd 100644 --- a/ptyprocess/ptyprocess.py +++ b/ptyprocess/ptyprocess.py @@ -92,11 +92,12 @@ def _make_eof_intr(): # to do this from the child before we exec() def _setecho(fd, state): - errmsg = 'setecho() may not be called ...
["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", "tests/test_spawn.py::PtyTestCase::test_pass_fds", "tests/test_spawn...
jyangballin/swesmith.x86_64.pexpect_1776_ptyprocess.1067dbda
true
null
1
15
1
1,331
0
0.6
1
0.75
1
0.271833
81.0905
6,047
swe_smith::train::10132
swe_smith
train
10,132
paramiko__paramiko.23f92003.combine_file__ildjzhr0
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP operations failing with AttributeError and incorrect data handling #### Description SFTP operations are failing with various errors after recent changes. Getting `AttributeError: 'Message' object has no attribute 'get_string'` when trying to perform basic SFTP operations like `chdir` and `getcwd`. Also seeing is...
diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index 18ffbf8..50734a7 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -51,13 +51,13 @@ class SFTPAttributes: Create a new (empty) SFTPAttributes object. All fields will be empty. """ self._flags = 0 - self.s...
["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::testa_posix_rename", "tests/test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
18
44
1,271
0
0.6
1
0.75
1
0.271833
81.0905
6,048
swe_smith::train::10265
swe_smith
train
10,265
paramiko__paramiko.23f92003.func_basic__29a6ub10
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Key loading fails with ValueError instead of SSHException #### Description When loading SSH keys, the code now raises `ValueError` instead of the expected `SSHException` for invalid key types. This breaks existing error handling that expects `SSHException`. #### Steps/Code to Reproduce ```python import paramiko # ...
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index f0b2d6d..3ba8673 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -789,43 +789,24 @@ class PKey: The obtained key type is returned for classes which need to know what it was (e.g. ECDSA.) """ - # Normalization; most classes ...
["tests/test_hostkeys.py::HostKeysTest::test_add", "tests/test_hostkeys.py::HostKeysTest::test_delitem", "tests/test_hostkeys.py::HostKeysTest::test_dict", "tests/test_hostkeys.py::HostKeysTest::test_dict_set", "tests/test_hostkeys.py::HostKeysTest::test_entry_delitem", "tests/test_hostkeys.py::HostKeysTest::test_load"...
["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
31
6
1,011
0
0.6
1
0.75
1
0.271833
81.0905
6,049
swe_smith::train::36448
swe_smith
train
36,448
lincolnloop__python-qrcode.456b01d4.combine_file__5wxrnyqu
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
# QR Code generation broken after recent changes I'm trying to generate QR codes with the library but it's completely broken after updating to the latest version. ## Steps to reproduce: ```python import qrcode qr = qrcode.QRCode(version=1) qr.add_data('Hello World') qr.make() qr.print_tty() ``` ## Error: ``` Index...
diff --git a/qrcode/main.py b/qrcode/main.py index 46116b5..d74f39e 100644 --- a/qrcode/main.py +++ b/qrcode/main.py @@ -155,12 +155,12 @@ class QRCode(Generic[GenericImage]): :param fit: If ``True`` (or if a size has not been provided), find the best fit for the data to avoid data overflow errors...
["qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qrcode/tests/test_qrcode.py::test_mode_alpha", "qrcode/tests/test_qrcode.py::test_mode_8bit", "qrcode/tests/test_qrcode.py::test_optimize",...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_add_qrdata", "qrcode/tests/test_qrcode.py::test_regression_mode_comma", "qrcode/tests/test...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
28
9
1,071
0
0.6
1
0.75
1
0.271833
81.0905
6,050
swe_smith::train::7548
swe_smith
train
7,548
cantools__cantools.0c6a7871.func_basic__gq2qh7na
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
Signal range validation not working properly in message encoding When encoding CAN messages with signals that have minimum/maximum range constraints, the validation is not working as expected. Values that should trigger EncodeError exceptions for being out of range are being silently accepted instead. #### Steps/Code...
diff --git a/src/cantools/database/can/message.py b/src/cantools/database/can/message.py index 942b2cc..1e33044 100644 --- a/src/cantools/database/can/message.py +++ b/src/cantools/database/can/message.py @@ -732,8 +732,8 @@ class Message: raise EncodeError() from None return int(mux) - d...
["tests/test_database.py::CanToolsDatabaseTest::test_encode_signal_strict", "tests/test_database.py::CanToolsDatabaseTest::test_encode_signal_strict_negative_scaling_05", "tests/test_database.py::CanToolsDatabaseTest::test_encode_signal_strict_negative_scaling_09", "tests/test_database.py::CanToolsDatabaseTest::test_en...
["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
19
6
1,250
0
0.6
1
0.75
1
0.271667
81.09
6,051
swe_smith::train::52545
swe_smith
train
52,545
pydicom__pydicom.7d361b3d.func_pm_remove_cond__5dz953t3
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
DT class missing original_string attribute initialization When creating a DT instance, the `original_string` attribute is not being set, causing various operations to fail. #### Steps/Code to Reproduce ```python from pydicom.valuerep import DT from datetime import datetime import pickle # Creating DT from string sh...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..c8f8de2 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -792,30 +792,6 @@ class DT(_DateTimeBase, datetime.datetime): def __init__(self, *args: Any, **kwargs: Any) -> None: """Create a new **DT** element va...
["tests/test_filewriter.py::TestWriteDT::test_format_dt", "tests/test_valuerep.py::TestDT::test_pickling", "tests/test_valuerep.py::TestDT::test_pickling_with_timezone", "tests/test_valuerep.py::TestDT::test_pickling_dt_from_datetime", "tests/test_valuerep.py::TestDT::test_pickling_dt_from_datetime_with_timezone", "tes...
["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
24
9
1,150
0
0.6
1
0.75
1
0.271667
81.09
6,052
swe_smith::train::42498
swe_smith
train
42,498
python-jsonschema__jsonschema.93e0caa5.combine_file__s8f4199p
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
ValidationError type matching logic inverted #### Description The type matching logic in ValidationError appears to be inverted, causing incorrect behavior when determining if validation errors match expected types. This affects error prioritization and best match selection. #### Steps/Code to Reproduce ```python i...
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 3dcd296..7e0c74e 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -177,15 +177,14 @@ class _Error(Exception): def _matches_type(self) -> bool: try: - # We ignore this as we want to simply crash if th...
["jsonschema/tests/test_deprecations.py::TestDeprecations::test_WrappedReferencingError_hashability", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_catching_Unresolvable_directly", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_catching_Unresolvable_via_RefResolutionError", "jsonschema/...
["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
22
7
1,190
0
0.6
1
0.75
1
0.271667
81.09
6,053
swe_smith::train::35038
swe_smith
train
35,038
pyutils__line_profiler.a646bf0f.func_pm_op_change__ed394e7c
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
TypeError when displaying profiler output due to incorrect operator usage #### Description When running line_profiler to display profiling results, a TypeError is raised due to incorrect usage of division operators with string formatting. The profiler fails to display timing information and crashes instead. #### Ste...
diff --git a/line_profiler/line_profiler.py b/line_profiler/line_profiler.py index 2a71d03..f17ac27 100755 --- a/line_profiler/line_profiler.py +++ b/line_profiler/line_profiler.py @@ -455,9 +455,9 @@ def show_text(stats, unit, output_unit=None, stream=None, stripzeros=False, stream = sys.stdout if outp...
["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_autoprofile.py::test_autoprofile_module", "tests/t...
["tests/test_cli.py::test_version_agreement", "tests/test_complex_case.py::test_complex_example_python_none", "tests/test_duplicate_functions.py::test_duplicate_function", "tests/test_explicit_profile.py::test_explicit_profile_with_nothing", "tests/test_explicit_profile.py::test_explicit_profile_with_environ_off", "tes...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
1
7
16
1,490
0
0.6
1
0.75
1
0.271667
81.09
6,054
swe_smith::train::23981
swe_smith
train
23,981
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__bhwvml2v
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
HEE to GSE coordinate transformation fails with UnboundLocalError #### Description When transforming coordinates from Heliocentric Earth Ecliptic (HEE) to Geocentric Solar Ecliptic (GSE), the transformation fails with an `UnboundLocalError` indicating that the local variable `int_coord` cannot be accessed before it's...
diff --git a/sunpy/coordinates/_transformations.py b/sunpy/coordinates/_transformations.py index 5b18d02..86090c6 100644 --- a/sunpy/coordinates/_transformations.py +++ b/sunpy/coordinates/_transformations.py @@ -930,11 +930,16 @@ def hee_to_hee(from_coo, to_frame): HeliocentricEarthEc...
["sunpy/coordinates/tests/test_transformations.py::test_hee_gse_sunspice", "sunpy/coordinates/tests/test_transformations.py::test_no_obstime_on_target_end_hee_subgraph[GeocentricSolarEcliptic-HeliocentricEarthEcliptic]", "sunpy/coordinates/tests/test_transformations.py::test_no_obstime_on_target_end_hee_subgraph[Geocen...
["sunpy/coordinates/tests/test_transformations.py::test_hcc_to_hgs", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_sc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_null", "sunpy/coordinates/tests/test_transformations.py...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
19
5
1,250
0
0.6
1
0.75
1
0.271667
81.09
6,055
swe_smith::train::33099
swe_smith
train
33,099
django-money__django-money.835c1ab8.combine_module__d4knlpqv
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
MinMoneyValidator incorrectly rejects values equal to minimum #### Description When using `MinMoneyValidator`, values that are exactly equal to the minimum value are incorrectly rejected as invalid. The validator should accept values that are greater than OR equal to the minimum, but currently only accepts values tha...
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index dc5f6ad..7a8f5e1 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -115,15 +115,14 @@ class MoneyFieldProxy: # For nullable fields we need either both NULL amount and currency or both NOT NULL raise Va...
["tests/test_form.py::test_save", "tests/test_form.py::test_default_currency", "tests/test_form.py::test_fields_default_amount_becomes_forms_initial", "tests/test_form.py::TestValidation::test_valid[value0]", "tests/test_form.py::TestValidation::test_valid[value1]", "tests/test_form.py::TestValidation::test_valid[value...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
2
7
160
1,490
0
0.6
1
0.75
1
0.271667
81.09
6,056
swe_smith::train::1705
swe_smith
train
1,705
agronholm__typeguard.b6a7e438.combine_module__dm2crhy8
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Import hook fails to resolve module references correctly #### Description When using the import hook, module references are not being resolved properly, causing AttributeError exceptions during type checking. The issue appears to affect various scenarios including decorated methods, static methods, and module imports...
diff --git a/src/typeguard/_importhook.py b/src/typeguard/_importhook.py index 0d1c627..9fd9952 100644 --- a/src/typeguard/_importhook.py +++ b/src/typeguard/_importhook.py @@ -44,11 +44,13 @@ T = TypeVar("T") def _call_with_frames_removed( f: Callable[P, T], *args: P.args, **kwargs: P.kwargs ) -> T: - return...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_pytest_plugin.py::test_config_options", "tests/test_pytest_plugin.py::test_commandline_options", "tests/test_typechecked.py::test_classmethod", "tests/test_typechecked.py::test_staticmethod", "tests/tes...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
2
32
9
990
0
0.6
1
0.75
1
0.271667
81.09
6,057
swe_smith::train::44833
swe_smith
train
44,833
mahmoud__glom.fb3c4e76.func_basic__trz7q1ht
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
glom() function broken - swapped target and spec parameters #### Description The `glom()` function appears to be completely broken. When trying to use basic glom operations, I'm getting `KeyError` exceptions for internal sentinel values like `CHILD_ERRORS`. Even the most basic glom operations are failing. #### Steps...
diff --git a/glom/core.py b/glom/core.py index cee71a3..dd6ec6c 100644 --- a/glom/core.py +++ b/glom/core.py @@ -2331,32 +2331,32 @@ def _glom(target, spec, scope): parent = scope pmap = parent.maps[0] scope = scope.new_child({ - T: target, - Spec: spec, + T: spec, # swapped target ...
["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", "...
["glom/test/test_basic.py::test_abstract_iterable", "glom/test/test_basic.py::test_glom_extra_kwargs", "glom/test/test_basic.py::test_api_repr", "glom/test/test_basic.py::test_bbformat", "glom/test/test_basic.py::test_bbrepr", "glom/test/test_check.py::test_check_signature", "glom/test/test_cli.py::test_cli_blank", "gl...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
32
134
990
0
0.6
1
0.75
1
0.271667
81.09
6,058
swe_smith::train::38967
swe_smith
train
38,967
pallets__jinja.ada0a9a6.func_basic__c34ngroo
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Namespace attribute assignment raises error on valid namespace objects #### Description When trying to assign attributes to namespace objects using the `{% set ns.attr = value %}` syntax, a `TemplateRuntimeError` is raised claiming "cannot assign attribute on non-namespace object" even when the object is actually a v...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..c5513ad 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1632,18 +1632,15 @@ class CodeGenerator(NodeVisitor): self.write(ref) def visit_NSRef(self, node: nodes.NSRef, frame: Frame) -> None: - # NSRefs...
["tests/test_core_tags.py::TestSet::test_set_invalid", "tests/test_core_tags.py::TestSet::test_namespace_redefined", "tests/test_core_tags.py::TestSet::test_namespace", "tests/test_core_tags.py::TestSet::test_namespace_block", "tests/test_core_tags.py::TestSet::test_init_namespace", "tests/test_core_tags.py::TestSet::t...
["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
7
1,489
0
0.6
1
0.75
1
0.2715
81.0895
6,059
swe_smith::train::47417
swe_smith
train
47,417
sqlfluff__sqlfluff.50a1c4b6.combine_file__ewg8yb4h
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Config loading broken after recent changes #### Description The config loading functionality appears to be broken. When trying to load configuration from strings or files, I'm getting various errors including `UnboundLocalError` and `TypeError`. #### Steps/Code to Reproduce ```python from sqlfluff.core.config.loade...
diff --git a/src/sqlfluff/core/config/loader.py b/src/sqlfluff/core/config/loader.py index 4b4fdd4..cd100e7 100644 --- a/src/sqlfluff/core/config/loader.py +++ b/src/sqlfluff/core/config/loader.py @@ -59,16 +59,14 @@ def _get_user_config_dir_path() -> str: appname = "sqlfluff" appauthor = "sqlfluff" - # ...
["test/core/config/loader_test.py::test__config__load_from_string", "test/core/config/loader_test.py::test__config__load_nested", "test/core/config/loader_test.py::test__config__load_parent", "test/core/config/loader_test.py::test__config__load_user_appdir_config"]
["test/core/config/loader_test.py::test__config__load_file_dir", "test/core/config/loader_test.py::test__config__load_file_f", "test/core/config/loader_test.py::test__config__load_toml", "test/core/config/loader_test.py::test__config__load_placeholder_cfg", "test/core/config/loader_test.py::test__config__toml_list_conf...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
26
4
1,109
0
0.6
1
0.75
1
0.2715
81.0895
6,060
swe_smith::train::2236
swe_smith
train
2,236
pdfminer__pdfminer.six.1a8bd2f7.func_basic__nj75gemt
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFPageInterpreter.render_contents arguments swapped causing processing errors #### Description When processing PDF content streams, the `render_contents` method in `PDFPageInterpreter` appears to be passing arguments in the wrong order to initialization methods, causing various PDF parsing and extraction operations ...
diff --git a/pdfminer/pdfinterp.py b/pdfminer/pdfinterp.py index ae1c46a..1a50a4e 100644 --- a/pdfminer/pdfinterp.py +++ b/pdfminer/pdfinterp.py @@ -982,14 +982,14 @@ class PDFPageInterpreter: This method may be called recursively. """ log.debug( - "render_contents: resources=%r, s...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
10
53
1,429
0
0.6
1
0.75
1
0.2715
81.0895
6,061
swe_smith::train::38483
swe_smith
train
38,483
amueller__word_cloud.ec24191c.func_basic__rqwwldmu
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
# ImageColorGenerator incorrectly handles image dimensions and default color ### Describe the bug The `ImageColorGenerator` class in the wordcloud library has issues with image dimension validation and default color handling. When trying to recolor a wordcloud with an image that's too small, it fails with a TypeError...
diff --git a/wordcloud/color_from_image.py b/wordcloud/color_from_image.py index 4bce014..d452e04 100644 --- a/wordcloud/color_from_image.py +++ b/wordcloud/color_from_image.py @@ -22,14 +22,14 @@ class ImageColorGenerator(object): """ # returns the average color of the image in that region def __init__(...
["test/test_wordcloud.py::test_recolor_too_small"]
["test/test_wordcloud.py::test_collocations", "test/test_wordcloud.py::test_collocation_stopwords", "test/test_wordcloud.py::test_collocation_stopwords_uppercase", "test/test_wordcloud.py::test_plurals_numbers", "test/test_wordcloud.py::test_multiple_s", "test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.p...
jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c
true
null
1
8
1
1,469
0
0.6
1
0.75
1
0.2715
81.0895
6,062
swe_smith::train::27670
swe_smith
train
27,670
arrow-py__arrow.1d70d009.func_pm_class_rm_funcs__eixv1c0p
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Slovak locale humanize/dehumanize broken after timeframe formatting removal #### Description When using Slovak locale ('sk') with arrow's humanize/dehumanize functionality, an AttributeError is raised: `'dict' object has no attribute 'format'`. This affects all timeframe operations in Slovak locale. #### Steps/Code ...
diff --git a/arrow/locales.py b/arrow/locales.py index 63b2d48..f8173d6 100644 --- a/arrow/locales.py +++ b/arrow/locales.py @@ -3422,33 +3422,6 @@ class SlovakLocale(Locale): ] day_abbreviations = ["", "po", "ut", "st", "št", "pi", "so", "ne"] - def _format_timeframe(self, timeframe: TimeFrameLiteral, d...
["tests/test_arrow.py::TestArrowDehumanize::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_minute", "tests/test_arrow.py::TestArrowDehumanize::test_minutes", "tests/test_arrow.py::TestArrowDehumanize::test_hour", "tests/test_arrow.py::TestArrowDehumanize::test_hours", "tests/test_arrow.py::TestArrowDehu...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
27
17
1,088
0
0.6
1
0.75
1
0.271333
81.089
6,063
swe_smith::train::723
swe_smith
train
723
oauthlib__oauthlib.1fd52536.func_pm_ctrl_invert_if__4ot75oc8
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2Error attributes not set when request is provided #### Description When creating an OAuth2Error with a request object, the error instance attributes like `redirect_uri`, `client_id`, `scopes`, etc. are being set to `None` instead of being populated from the request object. #### Steps/Code to Reproduce ```pyth...
diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py index 3b41574..a5c84c2 100644 --- a/oauthlib/oauth2/rfc6749/errors.py +++ b/oauthlib/oauth2/rfc6749/errors.py @@ -54,6 +54,13 @@ class OAuth2Error(Exception): self.status_code = status_code if request: + ...
["tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_add_bearer_token", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_add_mac_token", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_prepare_authorization_request", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_prepare_...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
15
24
1,328
0
0.6
1
0.75
1
0.271333
81.089
6,064
swe_smith::train::42626
swe_smith
train
42,626
python-jsonschema__jsonschema.93e0caa5.func_basic__n3cpc51u
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Dependencies validation broken for objects #### Description The `dependencies` keyword validation is not working correctly for JSON objects. When validating objects with dependencies, the validator appears to be checking the wrong conditions and producing incorrect validation results. #### Steps/Code to Reproduce `...
diff --git a/jsonschema/_legacy_keywords.py b/jsonschema/_legacy_keywords.py index c691589..7fb4ccc 100644 --- a/jsonschema/_legacy_keywords.py +++ b/jsonschema/_legacy_keywords.py @@ -56,21 +56,21 @@ def dependencies_draft4_draft6_draft7( In later drafts, the keyword was split into separate ``dependentRequir...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_dependencies_dependencies_ignores_other_non_objects", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_dependencies_dependencies_ignores_strings", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_dependencies_dependenci...
["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
12
52
1,388
0
0.6
1
0.75
1
0.271333
81.089
6,065
swe_smith::train::10701
swe_smith
train
10,701
paramiko__paramiko.23f92003.func_pm_class_rm_funcs__sgig7wez
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
# SFTP operations fail with "OSError: Failure" after removing `__repr__` and `asbytes` methods ## Description I found a bug in Paramiko's SFTP functionality. After making some changes to the `SFTPAttributes` class, all SFTP operations that return file attributes are failing with a generic "OSError: Failure" message. ...
diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index 18ffbf8..3a494e1 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -80,9 +80,6 @@ class SFTPAttributes: attr.filename = filename return attr - def __repr__(self): - return "<SFTPAttributes: {}>".format(sel...
["tests/test_sftp.py::TestSFTP::test_listdir", "tests/test_sftp.py::TestSFTP::test_listdir_iter", "tests/test_sftp.py::TestSFTP::test_listdir_in_locale", "tests/test_sftp.py::TestSFTP::test_chdir", "tests/test_sftp.py::TestSFTP::test_sftp_attributes_locale_time"]
["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
5
1,468
0
0.6
1
0.75
1
0.271333
81.089
6,066
swe_smith::train::24350
swe_smith
train
24,350
sunpy__sunpy.f8edfd5c.func_pm_remove_loop__3cg7vpjf
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Bresenham line algorithm returns empty array #### Description The `pixelate_coord_path` function with `bresenham=True` is returning empty arrays instead of the expected pixel coordinates along a line path. This causes `IndexError: index 0 is out of bounds for axis 1 with size 0` when trying to access the results. ##...
diff --git a/sunpy/map/maputils.py b/sunpy/map/maputils.py index 0f425b7..11449b1 100644 --- a/sunpy/map/maputils.py +++ b/sunpy/map/maputils.py @@ -469,20 +469,8 @@ def _bresenham(*, x1, y1, x2, y2): err = dx - dy res = [] x, y = x1, y1 - while True: - res.append((x, y)) - if (x == x2) ...
["sunpy/map/tests/test_maputils.py::test_pixelate_coord_path_bresenham[x0-y0-sampled_x0-sampled_y0]", "sunpy/map/tests/test_maputils.py::test_pixelate_coord_path_bresenham[x1-y1-sampled_x1-sampled_y1]", "sunpy/map/tests/test_maputils.py::test_pixelate_coord_path_bresenham[x2-y2-sampled_x2-sampled_y2]", "sunpy/map/tests...
["sunpy/map/tests/test_maputils.py::test_all_pixel_indices_from_map", "sunpy/map/tests/test_maputils.py::test_all_coordinates_from_map", "sunpy/map/tests/test_maputils.py::test_all_corner_coordinates_from_map", "sunpy/map/tests/test_maputils.py::test_map_edges", "sunpy/map/tests/test_maputils.py::test_solar_angular_rad...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
12
6
1,388
0
0.6
1
0.75
1
0.271333
81.089
6,067
swe_smith::train::36715
swe_smith
train
36,715
lincolnloop__python-qrcode.456b01d4.lm_rewrite__443c7kwz
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
**ASCII QR code printing is broken** **Describe the bug** The ASCII printing of QR codes is broken. When trying to print a QR code in ASCII format, it fails with an IndexError. **To Reproduce** Steps to reproduce the behavior: ```python import qrcode import io qr = qrcode.QRCode(border=0) f = io.StringIO() qr.print...
diff --git a/qrcode/main.py b/qrcode/main.py index 46116b5..3ec9f27 100644 --- a/qrcode/main.py +++ b/qrcode/main.py @@ -310,12 +310,34 @@ class QRCode(Generic[GenericImage]): codes.reverse() def get_module(x, y) -> int: - if invert and self.border and max(x, y) >= modcount + self.bor...
["qrcode/tests/test_qrcode.py::test_print_ascii"]
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
32
1
988
0
0.6
1
0.75
1
0.271333
81.089
6,068
swe_smith::train::35053
swe_smith
train
35,053
pyutils__line_profiler.a646bf0f.func_pm_remove_assign__c7bw5uam
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
NameError in show_func when displaying profiling results #### Description When trying to display line profiling results, the `show_func` function raises a `NameError` for several undefined variables including `scalar`, `default_column_sizes`, `display`, `max_timelen`, `max_perhitlen`, `linenos`, and `lhs_lines`. ###...
diff --git a/line_profiler/line_profiler.py b/line_profiler/line_profiler.py index 2a71d03..6b10e9e 100755 --- a/line_profiler/line_profiler.py +++ b/line_profiler/line_profiler.py @@ -286,7 +286,7 @@ def show_func(filename, start_lineno, func_name, timings, unit, >>> output_unit, stream, stripzeros,...
["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_autoprofile.py::test_autoprofile_module", "tests/t...
["tests/test_cli.py::test_version_agreement", "tests/test_complex_case.py::test_complex_example_python_none", "tests/test_duplicate_functions.py::test_duplicate_function", "tests/test_explicit_profile.py::test_explicit_profile_with_nothing", "tests/test_explicit_profile.py::test_explicit_profile_with_environ_off", "tes...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
1
30
17
1,028
0
0.6
1
0.75
1
0.271333
81.089
6,069
swe_smith::train::35016
swe_smith
train
35,016
pyutils__line_profiler.a646bf0f.func_pm_ctrl_invert_if__uez8ks28
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
Percentage calculation inverted for empty functions #### Description When profiling functions with zero total execution time, the percentage calculation logic is inverted, causing a division by zero error instead of displaying an empty percentage field. #### Steps/Code to Reproduce ```python from line_profiler impo...
diff --git a/line_profiler/line_profiler.py b/line_profiler/line_profiler.py index 2a71d03..9de500e 100755 --- a/line_profiler/line_profiler.py +++ b/line_profiler/line_profiler.py @@ -345,10 +345,10 @@ def show_func(filename, start_lineno, func_name, timings, unit, # Loop over each line to determine better column...
["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_autoprofile.py::test_autoprofile_module", "tests/t...
["tests/test_cli.py::test_version_agreement", "tests/test_complex_case.py::test_complex_example_python_none", "tests/test_duplicate_functions.py::test_duplicate_function", "tests/test_explicit_profile.py::test_explicit_profile_with_nothing", "tests/test_explicit_profile.py::test_explicit_profile_with_environ_off", "tes...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
1
37
17
888
0
0.6
1
0.75
1
0.271333
81.089
6,070
swe_smith::train::24502
swe_smith
train
24,502
sunpy__sunpy.f8edfd5c.combine_module__gpwktun7
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Variable 'lonsign' used before definition in parse_longitude function ## Description When processing SRS (Solar Region Summary) files, I'm getting an error about accessing a variable before it's defined. This happens when trying to parse longitude values from SRS files. The error occurs when calling `parse_longitu...
diff --git a/sunpy/io/_fits.py b/sunpy/io/_fits.py index 5513abe..1106aec 100644 --- a/sunpy/io/_fits.py +++ b/sunpy/io/_fits.py @@ -201,6 +201,8 @@ def write(fname, data, header, hdu_type=None, **kwargs): hdu_type = fits.PrimaryHDU if isinstance(hdu_type, fits.PrimaryHDU | fits.hdu.base.ExtensionHDU): ...
["sunpy/io/tests/test_fits.py::test_simple_write", "sunpy/io/tests/test_fits.py::test_extra_comment_write", "sunpy/io/tests/test_fits.py::test_simple_write_compressed", "sunpy/io/tests/test_fits.py::test_simple_write_compressed_difftypeinst", "sunpy/io/tests/test_fits.py::test_simple_write_compressed_instance[kwargs0-F...
["sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-None-4]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-1-1]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
12
24
1,388
0
0.6
1
0.75
1
0.271333
81.089
6,071
swe_smith::train::24003
swe_smith
train
24,003
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__eujgg2dx
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Helioprojective.is_visible() raises UnboundLocalError for 3D coordinates #### Description When calling `is_visible()` on 3D Helioprojective coordinates, an `UnboundLocalError` is raised due to variables being referenced before assignment. #### Steps/Code to Reproduce ```python import astropy.units as u from sunpy.c...
diff --git a/sunpy/coordinates/frames.py b/sunpy/coordinates/frames.py index 8e1efd5..472eba8 100644 --- a/sunpy/coordinates/frames.py +++ b/sunpy/coordinates/frames.py @@ -591,6 +591,15 @@ class Helioprojective(SunPyBaseCoordinateFrame): @u.quantity_input def is_visible(self, *, tolerance: u.m = 1*u.m): + ...
["sunpy/coordinates/tests/test_frames.py::test_hpc_is_visible", "sunpy/coordinates/tests/test_frames.py::test_hpc_is_visible_tolerance"]
["sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args0-None]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args1-kwargs1]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args2-None]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args3-kwargs3]", "sunpy/coordinate...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
29
2
1,047
0
0.6
1
0.75
1
0.271167
81.0885
6,072
swe_smith::train::43865
swe_smith
train
43,865
pydata__patsy.a5d16484.func_basic__1gtrop24
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Treatment contrast matrix produces incorrect dimensions when reference is None #### Description When using Treatment contrasts without specifying a reference level, the contrast matrix generation fails with a dimension mismatch error. The `code_without_intercept` method in the Treatment class appears to have issues w...
diff --git a/patsy/contrasts.py b/patsy/contrasts.py index 0ac9ac7..7732413 100644 --- a/patsy/contrasts.py +++ b/patsy/contrasts.py @@ -179,15 +179,15 @@ class Treatment: def code_without_intercept(self, levels): if self.reference is None: - reference = 0 + reference = 1 ...
["patsy/contrasts.py::test_Treatment", "patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_contrast", "patsy/test_highlevel.py::test_term_info", "patsy/test_highlevel.py::test_categorical", "patsy/test_highlevel.py::test_i...
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
8
12
1,467
0
0.6
1
0.75
1
0.271167
81.0885
6,073
swe_smith::train::52567
swe_smith
train
52,567
pydicom__pydicom.7d361b3d.func_pm_remove_cond__cqm2sh78
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileSet.write() fails with UnboundLocalError on variable 'fn' #### Description When calling `write()` on a FileSet instance, the method fails with `UnboundLocalError: cannot access local variable 'fn' where it is not defined`. This appears to happen during the file copying/moving operations within the write process. ...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..d0403de 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -2064,10 +2064,6 @@ class FileSet: if path: self._path = Path(path) - # Don't write unless changed or new - if not self.is_staged:...
["tests/test_fileset.py::TestRecordNode::test_file_id_singleton", "tests/test_fileset.py::TestFileInstance::test_path", "tests/test_fileset.py::TestFileInstance::test_load", "tests/test_fileset.py::TestFileInstance::test_for_moving", "tests/test_fileset.py::TestFileInstance::test_fileid", "tests/test_fileset.py::TestFi...
["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
14
37
1,347
0
0.6
1
0.75
1
0.271167
81.0885
6,074
swe_smith::train::51497
swe_smith
train
51,497
pydicom__pydicom.7d361b3d.combine_file__dnf42nue
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
hex2bytes and bytes2hex functions in hexutil.py produce incorrect results Description When using the hex2bytes and bytes2hex functions in pydicom.util.hexutil, they produce incorrect results. For hex2bytes: - When passing a non-string/non-bytes argument, it returns an empty bytes object instead of raising TypeError ...
diff --git a/src/pydicom/util/hexutil.py b/src/pydicom/util/hexutil.py index 65a0c71..28ed523 100644 --- a/src/pydicom/util/hexutil.py +++ b/src/pydicom/util/hexutil.py @@ -28,18 +28,16 @@ def hex2bytes(hexstring: str | bytes) -> bytes: end the previous line. """ - # This works in both 3.x and 2.x becaus...
["tests/test_config.py::TestDebug::test_debug_on_handler_null", "tests/test_config.py::TestDebug::test_debug_on_handler_stream", "tests/test_filereader.py::TestReader::test_sequence_undefined_length_logged", "tests/test_util.py::TestHexUtil::test_hex_to_bytes", "tests/test_util.py::TestHexUtil::test_bytes_to_hex"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
12
5
1,387
0
0.6
1
0.75
1
0.271167
81.0885
6,075
swe_smith::train::49535
swe_smith
train
49,535
mozilla__bleach.73871d76.lm_rewrite__7cli97ru
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
Meta Tag Handling Causes TypeError Description It seems there's an issue with handling self-closing tags, specifically the `<meta>` tag, which is causing a `TypeError`. This error appears to be related to the recent changes in the input stream handling. The problem arises when processing HTML content that includes se...
diff --git a/bleach/_vendor/html5lib/_inputstream.py b/bleach/_vendor/html5lib/_inputstream.py index 0976251..500dc07 100644 --- a/bleach/_vendor/html5lib/_inputstream.py +++ b/bleach/_vendor/html5lib/_inputstream.py @@ -169,24 +169,26 @@ class HTMLUnicodeInputStream(object): element) """ - - ...
["tests/test_clean.py::test_self_closing_tags_self_close[meta]"]
["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
30
1
1,026
0
0.6
1
0.75
1
0.271
81.088
6,076
swe_smith::train::4552
swe_smith
train
4,552
pygments__pygments.27649ebb.lm_rewrite__7aoc33n8
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
### Issue with FortranFixedLexer: Unexpected Error on Specific Input **Describe the bug** Hello, I've encountered an issue with the `FortranFixedLexer` where it throws an unexpected error when processing certain Fortran files. This seems to be related to recent changes in the lexer logic. **To Reproduce** Here's a mi...
diff --git a/pygments/lexers/fortran.py b/pygments/lexers/fortran.py index 1a2b7f9..9e754b3 100644 --- a/pygments/lexers/fortran.py +++ b/pygments/lexers/fortran.py @@ -183,13 +183,10 @@ class FortranFixedLexer(RegexLexer): def _lex_fortran(self, match, ctx=None): """Lex a line just as free form fortran...
["tests/examplefiles/fortranfixed/ahcon.f::"]
["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
11
1
1,406
0
0.6
1
0.75
1
0.271
81.088
6,077
swe_smith::train::43677
swe_smith
train
43,677
sloria__environs.73c372df.combine_file__hl27l2aa
swesmith/sloria__environs.73c372df
sloria/environs
python
null
# Issues with custom parsers and list handling in environs I've encountered a couple of issues with the latest version of environs: ## Issue 1: Custom parsers not working correctly When trying to use the `parser_for` decorator, I'm getting errors. Here's a simple example: ```python import environs env = environs.E...
diff --git a/src/environs/__init__.py b/src/environs/__init__.py index 00f6072..d45a723 100644 --- a/src/environs/__init__.py +++ b/src/environs/__init__.py @@ -257,8 +257,8 @@ def _preprocess_list( value: str | typing.Iterable, *, delimiter: str = ",", **kwargs ) -> typing.Iterable: if ma.utils.is_iterable_...
["tests/test_environs.py::TestCasting::test_list_with_default_from_list", "tests/test_environs.py::TestCasting::test_list_with_default_none", "tests/test_environs.py::TestCasting::test_list_with_empty_env_and_subcast", "tests/test_environs.py::TestCustomTypes::test_parser_for", "tests/test_environs.py::TestCustomTypes:...
["tests/test_environs.py::TestCasting::test_call", "tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_basic", "tests/test_environs.py::TestCasting::test_empty_str", "tests/test_environs.py::TestCasting::test_int_cast", "tests/test_environs.py::TestCasting::test_inv...
jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df
true
null
1
8
10
1,466
0
0.6
1
0.75
1
0.271
81.088
6,078
swe_smith::train::10550
swe_smith
train
10,550
paramiko__paramiko.23f92003.func_basic__o4bipfej
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Channel fileno() method returns incorrect value #### Description The `fileno()` method on Channel objects is returning an unexpected value instead of the file descriptor number. This breaks compatibility with `select()` operations and other file descriptor-based operations. #### Steps/Code to Reproduce ```python im...
diff --git a/paramiko/channel.py b/paramiko/channel.py index 25326ca..891b024 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -928,18 +928,14 @@ class Channel(ClosingContextManager): .. warning:: This method causes channel reads to be slightly less efficient. """ - se...
["tests/test_transport.py::TransportTest::test_select", "tests/test_transport.py::TransportTest::test_select_after_close", "tests/test_transport.py::TransportTest::test_stderr_select", "tests/test_transport.py::ServiceRequestingTransportTest::test_select", "tests/test_transport.py::ServiceRequestingTransportTest::test_...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
18
6
1,264
0
0.6
1
0.75
1
0.270667
81.087
6,079
swe_smith::train::52701
swe_smith
train
52,701
pydicom__pydicom.7d361b3d.lm_rewrite__k8ah8ezh
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Unexpected Behavior in `register_kwargs` Method #### Describe the Issue It seems that the `register_kwargs` method in the `Hooks` class is not handling unknown hooks as expected. When attempting to register keyword arguments for a hook that is not recognized, the method does not raise an error as anticipated. Thi...
diff --git a/src/pydicom/hooks.py b/src/pydicom/hooks.py index 106b001..1a7e76f 100644 --- a/src/pydicom/hooks.py +++ b/src/pydicom/hooks.py @@ -95,7 +95,7 @@ class Hooks: else: raise ValueError(f"Unknown hook '{hook}'") - def register_kwargs(self, hook: str, kwargs: dict[str, Any]) -> None: ...
["tests/test_hooks.py::TestHooks::test_unknown_hook_kwargs_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
15
1
1,324
0
0.6
1
0.75
1
0.270667
81.087
6,080
swe_smith::train::32681
swe_smith
train
32,681
pydantic__pydantic.acb0f10f.func_pm_remove_cond__dfm4nxbr
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Schema generation broken for types with `__get_validators__` #### Description When using types that implement the deprecated `__get_validators__` method, schema generation fails silently and produces incorrect schemas. The validators are not being properly integrated into the generated core schema. #### Steps/Code t...
diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py index 9ec8a61..cc3d254 100644 --- a/pydantic/_internal/_generate_schema.py +++ b/pydantic/_internal/_generate_schema.py @@ -854,8 +854,7 @@ class GenerateSchema: # as we might end up calling `get_schema_or_ref` (ex...
["tests/test_deprecated.py::test_v1_get_validators", "tests/test_deprecated.py::test_v1_get_validators_invalid_validator", "tests/test_edge_cases.py::test_get_pydantic_core_schema_on_referenceable_type", "tests/test_main.py::test_nested_v1_model_warns"]
["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
17
4
1,284
0
0.6
1
0.75
1
0.270667
81.087
6,081
swe_smith::train::1693
swe_smith
train
1,693
agronholm__typeguard.b6a7e438.combine_module__2kma4uow
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Import hook fails to resolve module references correctly #### Description When using the import hook, module references are not being resolved properly. The `resolve_reference` function appears to be parsing module:varname references incorrectly, causing attribute resolution to fail. #### Steps/Code to Reproduce ``...
diff --git a/src/typeguard/_importhook.py b/src/typeguard/_importhook.py index 0d1c627..6cd773c 100644 --- a/src/typeguard/_importhook.py +++ b/src/typeguard/_importhook.py @@ -44,7 +44,9 @@ T = TypeVar("T") def _call_with_frames_removed( f: Callable[P, T], *args: P.args, **kwargs: P.kwargs ) -> T: - return f...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_pytest_plugin.py::test_config_options", "tests/test_pytest_plugin.py::test_commandline_options", "tests/test_typechecked.py::test_classmethod", "tests/test_typechecked.py::test_staticmethod", "tests/tes...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
2
30
9
1,024
0
0.6
1
0.75
1
0.270667
81.087
6,082
swe_smith::train::36295
swe_smith
train
36,295
facelessuser__soupsieve.a8080d97.func_basic__w2l9rkap
swesmith/facelessuser__soupsieve.a8080d97
facelessuser/soupsieve
python
null
Custom selector registration swaps key and value causing incorrect behavior #### Description When registering custom selectors, the key and value are being swapped in the internal storage, causing custom selectors to not work as expected. Additionally, the exception types for validation errors have been switched. ##...
diff --git a/soupsieve/css_parser.py b/soupsieve/css_parser.py index bedae69..3dd553b 100644 --- a/soupsieve/css_parser.py +++ b/soupsieve/css_parser.py @@ -228,10 +228,10 @@ def process_custom(custom: ct.CustomSelectors | None) -> dict[str, str | ct.Sele for key, value in custom.items(): name = u...
["tests/test_extra/test_custom.py::TestCustomSelectors::test_bad_custom_syntax", "tests/test_extra/test_custom.py::TestCustomSelectors::test_custom_collision", "tests/test_extra/test_custom.py::TestCustomSelectors::test_custom_dependency", "tests/test_extra/test_custom.py::TestCustomSelectors::test_custom_dependency_ou...
["tests/test_api.py::TestSoupSieve::test_cache", "tests/test_api.py::TestSoupSieve::test_closest_match_complex_parent", "tests/test_api.py::TestSoupSieve::test_closest_match_parent", "tests/test_api.py::TestSoupSieve::test_closest_match_self", "tests/test_api.py::TestSoupSieve::test_closest_must_be_parent", "tests/test...
jyangballin/swesmith.x86_64.facelessuser_1776_soupsieve.a8080d97
true
null
1
6
8
1,503
0
0.6
1
0.75
1
0.2705
81.0865
6,083
swe_smith::train::46662
swe_smith
train
46,662
python-trio__trio.cfbbe2c1.combine_file__r96mc6yv
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Thread limiter returns None instead of CapacityLimiter instance #### Description The `current_default_thread_limiter()` function is returning `None` instead of a `CapacityLimiter` instance, causing widespread failures in thread-related functionality. #### Steps/Code to Reproduce ```python import trio async def mai...
diff --git a/src/trio/_threads.py b/src/trio/_threads.py index 7afd7b6..a805aa3 100644 --- a/src/trio/_threads.py +++ b/src/trio/_threads.py @@ -64,11 +64,6 @@ _active_threads_local: RunVar[_ActiveThreadCount] = RunVar("active_threads") @contextlib.contextmanager def _track_active_thread() -> Generator[None, None, ...
["src/trio/_core/_tests/test_run.py::test_cancel_scope_repr", "src/trio/_tests/test_file_io.py::test_async_methods_wrap", "src/trio/_tests/test_file_io.py::test_open", "src/trio/_tests/test_file_io.py::test_open_context_manager", "src/trio/_tests/test_file_io.py::test_async_iter", "src/trio/_tests/test_file_io.py::test...
["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
23
106
1,163
0
0.6
1
0.75
1
0.2705
81.0865
6,084
swe_smith::train::42380
swe_smith
train
42,380
r1chardj0n3s__parse.30da9e4f.func_pm_class_rm_funcs__f386as7a
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
Parser.parse method missing after recent changes #### Description The `parse` method has been removed from the `Parser` class, causing `AttributeError: 'Parser' object has no attribute 'parse'` when trying to use basic parsing functionality. #### Steps/Code to Reproduce ```python import parse # This should work bu...
diff --git a/parse.py b/parse.py index 80242e1..bcab089 100644 --- a/parse.py +++ b/parse.py @@ -486,20 +486,6 @@ class Parser(object): def format(self): return self._format - def parse(self, string, evaluate_result=True): - """Match my format to the string exactly. - - Return a Result ...
["README.rst::README.rst", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_bugs.py::test_user_type_with_group_count_issue60", "tests/test_bugs.py::test_unma...
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_findall.py::test_findall", "tests/test_findall.py::test_no_evaluate_result", "tests/test_findall.py::test_case_sensitivity", "tests/test_parse.py::test_parser_format", "tests/test_pattern.py::test_braces", "tests/test_pattern.py...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
38
79
863
0
0.6
1
0.75
1
0.2705
81.0865
6,085
swe_smith::train::48061
swe_smith
train
48,061
sqlfluff__sqlfluff.50a1c4b6.func_basic__x5pzcao6
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
TemplatedFile._find_slice_indices_of_templated_pos returns swapped indices #### Description The `_find_slice_indices_of_templated_pos` method in `TemplatedFile` is returning indices in the wrong order. The method should return `(first_idx, last_idx)` but it's currently returning `(last_idx, first_idx)`. #### Steps/C...
diff --git a/src/sqlfluff/core/templaters/base.py b/src/sqlfluff/core/templaters/base.py index fd043b6..b399718 100644 --- a/src/sqlfluff/core/templaters/base.py +++ b/src/sqlfluff/core/templaters/base.py @@ -293,25 +293,20 @@ class TemplatedFile: start_idx = start_idx or 0 first_idx: Optional[int] = ...
["test/core/templaters/base_test.py::test__templated_file_find_slice_indices_of_templated_pos[100-True-tf_kwargs0-10-11]", "test/core/templaters/base_test.py::test__templated_file_find_slice_indices_of_templated_pos[13-True-tf_kwargs1-0-3]", "test/core/templaters/base_test.py::test__templated_file_find_slice_indices_of...
["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
15
18
1,323
0
0.6
1
0.75
1
0.2705
81.0865
6,086
r2e_gym::train::324
r2e_gym
train
324
orange3__f7b522fecc65f63a330624ddcaeea8ac64e65781
orange3
biolab/orange3
python
f7b522fecc65f63a330624ddcaeea8ac64e65781
### Title: `table_from_frame` Fails to Replace NaN with `StringVariable.Unknown` for String Variables #### Description When converting a pandas DataFrame to an Orange Table using the `table_from_frame` function, NaN values in string columns are not being replaced with `StringVariable.Unknown`. Instead, these NaN value...
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 @@ -280,7 +280,12 @@ raise ValueError("String variable must be in metas.") _role = Role.Meta var = StringVariable(str(column)) - ...
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 @@ -34,10 +34,9 @@ [0, pd.Timestamp('1724-12-20').timestamp()], [0, pd.Timestamp('1724-12-20'...
null
null
namanjain12/orange3_final:f7b522fecc65f63a330624ddcaeea8ac64e65781
true
null
1
7
null
2,193
0
0.75
1
0.6375
1
0.388833
81.08525
6,087
swe_smith::train::38160
swe_smith
train
38,160
termcolor__termcolor.3a42086f.pr_65
swesmith/termcolor__termcolor.3a42086f
termcolor/termcolor
python
null
# [Bug]: 'strike' attribute missing from termcolor ### Bug summary The 'strike' attribute is no longer working in termcolor. When trying to use it, a KeyError is raised. ### Code for reproduction ```python from termcolor import colored # This fails with KeyError colored('text', attrs=['strike']) ``` ### Actual ou...
diff --git a/src/termcolor/__main__.py b/src/termcolor/__main__.py index d9fe688..b41021f 100644 --- a/src/termcolor/__main__.py +++ b/src/termcolor/__main__.py @@ -50,8 +50,7 @@ if __name__ == "__main__": cprint("Underline green color", "green", attrs=["underline"]) cprint("Blink yellow color", "yellow", att...
["tests/test_termcolor.py::test_attrs[strike-\\x1b[9mtext\\x1b[0m]"]
["tests/test_termcolor.py::test_basic", "tests/test_termcolor.py::test_sanity", "tests/test_termcolor.py::test_color[black-\\x1b[30mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[grey-\\x1b[30mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[red-\\x1b[31mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[gr...
jyangballin/swesmith.x86_64.termcolor_1776_termcolor.3a42086f
true
null
3
11
1
1,400
0
0.6
1
0.75
1
0.27
81.085
6,088
swe_smith::train::18360
swe_smith
train
18,360
msiemens__tinydb.10644a0e.func_pm_ctrl_shuffle__oxrpznit
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
TinyDB table() method returns undefined variable after recent changes #### Description When calling `db.table()` to get a table instance, the method is returning an undefined variable `table` instead of creating and returning a proper table object. This causes `UnboundLocalError: local variable 'table' referenced bef...
diff --git a/tinydb/database.py b/tinydb/database.py index 4a73c46..d4ded3a 100644 --- a/tinydb/database.py +++ b/tinydb/database.py @@ -109,6 +109,14 @@ class TinyDB(TableBase): return '<{} {}>'.format(type(self).__name__, ', '.join(args)) def table(self, name: str, **kwargs) -> Table: + + if na...
["tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_json_write", "tests/test_storages.py::test_json_kwargs", "tests/test_storages.py::test_json_readwrite", "tests/test_storages.py::test_json_read", "tests/test_storages.py::test_in_memory_close", "tests/test_storages.py::test_read_o...
["tests/test_middlewares.py::test_caching", "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_middlewares.py::test_nested", "tests/test_queries.py::...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
17
23
1,280
0
0.6
1
0.75
1
0.27
81.085
6,089
swe_smith::train::35091
swe_smith
train
35,091
django__daphne.32ac73e1.combine_file__807agcgh
swesmith/django__daphne.32ac73e1
django/daphne
python
null
# Command line arguments type errors in Daphne ### Problem I'm experiencing issues with the command line interface in Daphne. When trying to run the server with various command line arguments, I'm getting TypeError exceptions. The main issues appear to be: 1. Port argument (`-p/--port`) doesn't accept numeric values...
diff --git a/daphne/cli.py b/daphne/cli.py index a036821..7d7a054 100755 --- a/daphne/cli.py +++ b/daphne/cli.py @@ -28,7 +28,7 @@ class CommandLineInterface: def __init__(self): self.parser = argparse.ArgumentParser(description=self.description) self.parser.add_argument( - "-p", "--po...
["tests/test_cli.py::TestCLIInterface::testCLIBasics", "tests/test_cli.py::TestCLIInterface::testUnixSockets", "tests/test_cli.py::TestCLIInterface::test_custom_proxyhost", "tests/test_cli.py::TestCLIInterface::test_custom_proxyport", "tests/test_cli.py::TestCLIInterface::test_custom_servername", "tests/test_cli.py::Te...
["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding...
jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1
true
null
1
16
7
1,299
0
0.6
1
0.75
1
0.269833
81.0845
6,090
swe_smith::train::34057
swe_smith
train
34,057
allegro__bigcache.5aa251c4.lm_rewrite__acqbaxy1
swesmith/allegro__bigcache.5aa251c4
allegro/bigcache
go
null
BytesQueue canInsertAfterTail logic inverted causing slice bounds panic #### Description The `canInsertAfterTail` method in BytesQueue has incorrect logic that causes slice bounds out of range panics when the queue wraps around. The condition `if q.tail <= q.head` should be `if q.tail >= q.head` to properly handle th...
diff --git a/queue/bytes_queue.go b/queue/bytes_queue.go index c4fe2c0..4774b3f 100644 --- a/queue/bytes_queue.go +++ b/queue/bytes_queue.go @@ -247,14 +247,13 @@ func (q *BytesQueue) canInsertAfterTail(need int) bool { if q.full { return false } - if q.tail >= q.head { + + if q.tail <= q.head { return q.cap...
["TestRemoveEntriesWhenShardIsFull", "TestPushEntryAfterAllocateAdditionMemoryInFull", "TestUnchangedEntriesIndexesAfterAdditionalMemoryAllocationWhereTailIsBeforeHead", "TestAllocateAdditionalSpaceForInsufficientFreeFragmentedSpaceWhereTailIsBeforeHead128", "TestAllocateAdditionalSpaceForInsufficientFreeFragmentedSpac...
["TestOnRemoveFilterExpired", "TestClosing", "TestCache_SetWithoutCleanWindow", "TestCache_RepeatedSetWithBiggerEntry", "TestRemoveNonExpiredData", "TestEncodeDecode", "TestAllocateBiggerBuffer", "TestFnvHashSum64", "TestEntriesIteratorParallelAdd", "TestNilValueCaching", "TestEntriesIteratorWithConcurrentUpdate", "Tes...
jyangballin/swesmith.x86_64.allegro_1776_bigcache.5aa251c4
true
null
1
11
6
1,399
0
0.6
1
0.75
1
0.269833
81.0845
6,091
swe_smith::train::3329
swe_smith
train
3,329
pygments__pygments.27649ebb.combine_file__854jq1dm
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Elixir lexer broken with uncompilable regex error #### Description The Elixir lexer is throwing `ValueError: uncompilable regex` errors when trying to tokenize Elixir code. This affects both the main ElixirLexer and ElixirConsoleLexer classes. #### Steps/Code to Reproduce ```python from pygments.lexers import Elixi...
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py index 1190182..7358843 100644 --- a/pygments/lexers/erlang.py +++ b/pygments/lexers/erlang.py @@ -191,10 +191,10 @@ def gen_elixir_string_rules(name, symbol, token): states = {} states['string_' + name] = [ (rf'[^#{symbol}\\]+', token...
["tests/test_basic_api.py::test_lexer_options[ElixirLexer]", "tests/test_basic_api.py::test_random_input[ElixirLexer]", "tests/test_basic_api.py::test_lexer_classes[ElixirLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_options[ElixirConsoleLexer]", "tests/test_basic_api.py::tes...
["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
34
8
939
0
0.6
1
0.75
1
0.269833
81.0845
6,092
swe_smith::train::3558
swe_smith
train
3,558
pygments__pygments.27649ebb.combine_file__y2bxhhe4
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
RTF formatter produces incorrect output for ASCII characters and color handling #### Description The RTF formatter is generating incorrect escape sequences for ASCII characters and has broken color parsing logic. ASCII characters are being unnecessarily escaped with unicode sequences, and hex color parsing is failing...
diff --git a/pygments/formatters/rtf.py b/pygments/formatters/rtf.py index 7f8b7e4..9f2e60c 100644 --- a/pygments/formatters/rtf.py +++ b/pygments/formatters/rtf.py @@ -158,38 +158,32 @@ class RtfFormatter(Formatter): .replace('}', '\\}') def _escape_text(self, text): - # empty strings...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_formatter.py::test_linenos_left_padding", "tests/test...
["tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_from_cli_option", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_inherit", "tests/test_html_formatter.py::test_lineanchors_with_startnum", "tests/test_html_formatter.py::test_get_style_defs_contains_pre_style...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
22
23
1,179
0
0.6
1
0.75
1
0.269833
81.0845
6,093
swe_smith::train::673
swe_smith
train
673
oauthlib__oauthlib.1fd52536.func_basic__ylwp0awn
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2 endpoint error handling inverted - exceptions silently ignored when catch_errors=False #### Description When `catch_errors` is set to `False` on OAuth2 endpoints, exceptions are being silently caught and ignored instead of being raised as expected. Additionally, when endpoints are unavailable, they return HTTP...
diff --git a/oauthlib/oauth2/rfc6749/endpoints/base.py b/oauthlib/oauth2/rfc6749/endpoints/base.py index 987fac6..bc6bc08 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/base.py +++ b/oauthlib/oauth2/rfc6749/endpoints/base.py @@ -94,19 +94,19 @@ def catch_errors_and_unavailability(f): if not endpoint.available:...
["tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_error_catching", "tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_unavailability", "tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_wrapper", "tests/oauth2/rfc6749/endpoints/test_clie...
["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
36
1,419
0
0.6
1
0.75
1
0.269833
81.0845
6,094
swe_smith::train::28899
swe_smith
train
28,899
encode__starlette.db5063c2.lm_rewrite__39bgo2lm
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
# Client property returns raw tuple instead of Address object I noticed that the `client` property in `HTTPConnection` is now returning a raw tuple of (host, port) instead of an `Address` object. ## Reproduction Here's a simple example that demonstrates the issue: ```python from starlette.applications import Starle...
diff --git a/starlette/requests.py b/starlette/requests.py index a29164d..2f1b7b7 100644 --- a/starlette/requests.py +++ b/starlette/requests.py @@ -147,13 +147,13 @@ class HTTPConnection(typing.Mapping[str, typing.Any]): return self._cookies @property - def client(self) -> Address | None: - #...
["tests/test_requests.py::test_request_client[scope0-expected_client0]"]
["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
14
1
1,339
0
0.6
1
0.75
1
0.269833
81.0845
6,095
swe_smith::train::1051
swe_smith
train
1,051
jd__tenacity.0d40e76f.combine_file__l80x0v9y
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
Future.failed property returns incorrect value Description I found a bug in the Future.failed property that causes it to return the opposite of what it should. This affects retry logic and causes many operations to fail. Here's a simple reproduction script: ```python from tenacity import Future # Create a future w...
diff --git a/tenacity/__init__.py b/tenacity/__init__.py index 72eba04..f98a66f 100644 --- a/tenacity/__init__.py +++ b/tenacity/__init__.py @@ -352,7 +352,9 @@ class BaseRetrying(ABC): self.statistics["idle_for"] = 0 def _add_action_func(self, fn: t.Callable[..., t.Any]) -> None: - self.iter_sta...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_retry", "tests/test_asyncio.py::TestAsyncio::test_...
["tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::TestAsyncio::test_repr", "tests/test_asyncio.py::TestAsyncio::test_retry_attributes", "tests/test_asyncio.py::TestAsyncio::test_retry_preserves_argument_defaults", "tests/test_asyncio.py::TestContextManager::test_async_retying_iter...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
38
95
858
0
0.6
1
0.75
1
0.269667
81.084
6,096
swe_smith::train::18253
swe_smith
train
18,253
msiemens__tinydb.10644a0e.func_basic__dsxx74o9
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Table.remove() fails with TypeError when using document values as keys #### Description When calling `Table.remove()` with a query condition, the operation fails with a `TypeError: unhashable type: 'dict'`. This appears to be related to how the remove operation processes table entries during the removal process. ###...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..8bd9e1d 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -589,23 +589,17 @@ class Table: # as its first argument. See ``Table._update`` for details on this # operation def updater(table: dict): - # W...
["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
22
9
1,178
0
0.6
1
0.75
1
0.269667
81.084
6,097
swe_smith::train::33444
swe_smith
train
33,444
pallets__click.fde47b4b.func_basic__2da26b8a
swesmith/pallets__click.fde47b4b
pallets/click
python
null
`get_current_context()` returns wrong context when called outside command execution #### Description When `get_current_context()` is called outside of any command execution context, it returns the first context from the stack instead of the most recent one, and the silent parameter behavior is inverted. #### Steps/C...
diff --git a/src/click/globals.py b/src/click/globals.py index a2f9172..2c5bcbf 100644 --- a/src/click/globals.py +++ b/src/click/globals.py @@ -33,12 +33,12 @@ 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
8
97
1,458
0
0.6
1
0.75
1
0.269667
81.084
6,098
swe_smith::train::30446
swe_smith
train
30,446
pyca__pyopenssl.04766a49.lm_rewrite__0juu23jd
swesmith/pyca__pyopenssl.04766a49
pyca/pyopenssl
python
null
# Connection.bio_write fails with TypeError when using string input ## Description Python Version: 3.10.15 OpenSSL Version: 3.4.0 I've encountered an issue with the `Connection.bio_write` method in pyOpenSSL. Previously, it was possible to pass a string to this method, but now it raises a TypeError. ## Code to Repr...
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index eed27a0..e2a1e4c 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -2327,17 +2327,17 @@ class Connection: :param buf: The string to put into the memory BIO. :return: The number of bytes written """ - buf = _text_to_by...
["tests/test_ssl.py::TestConnection::test_bio_write"]
["tests/test_crypto.py::TestX509Ext::test_str", "tests/test_crypto.py::TestX509Ext::test_type", "tests/test_crypto.py::TestX509Ext::test_construction", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[thisIsMadeUp-False-hi]", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[proxyCertInfo-True-langua...
jyangballin/swesmith.x86_64.pyca_1776_pyopenssl.04766a49
true
null
1
14
1
1,338
0
0.6
1
0.75
1
0.269667
81.084
6,099
swe_smith::train::39182
swe_smith
train
39,182
pallets__jinja.ada0a9a6.func_basic__q156nt2c
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
TemplateSyntaxError constructor arguments are incorrectly assigned #### Description When creating a TemplateSyntaxError, the constructor arguments are being assigned to the wrong attributes, causing various template parsing and error handling issues. #### Steps/Code to Reproduce ```python from jinja2.exceptions imp...
diff --git a/src/jinja2/exceptions.py b/src/jinja2/exceptions.py index 082ebe8..58c8d48 100644 --- a/src/jinja2/exceptions.py +++ b/src/jinja2/exceptions.py @@ -95,15 +95,14 @@ class TemplateSyntaxError(TemplateError): name: t.Optional[str] = None, filename: t.Optional[str] = None, ) -> None: - ...
["tests/test_core_tags.py::TestForLoop::test_loop_unassignable", "tests/test_core_tags.py::TestMacros::test_arguments_defaults_nonsense", "tests/test_core_tags.py::TestMacros::test_caller_defaults_nonsense", "tests/test_core_tags.py::TestSet::test_set_invalid", "tests/test_debug.py::TestDebug::test_syntax_error", "test...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
13
44
1,358
0
0.6
1
0.75
1
0.269667
81.084