selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
5,000
swe_smith::train::20653
swe_smith
train
20,653
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__k9v7dx8o
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Column qualification fails with UnboundLocalError #### Description When using the column qualification optimizer, an `UnboundLocalError` is raised for variables that are referenced before assignment. This appears to affect multiple optimization functions that rely on column qualification. #### Steps/Code to Reproduc...
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..a051838 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -952,28 +952,12 @@ class Resolver: def _get_unambiguous_columns( self, source_columns: t.Dict[str,...
["tests/test_optimizer.py::TestOptimizer::test_canonicalize", "tests/test_optimizer.py::TestOptimizer::test_expand_alias_refs", "tests/test_optimizer.py::TestOptimizer::test_lateral_annotation", "tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", "tests/test_optimizer.py::TestOptimizer::test_optimize", "te...
["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
36
14
1,281
0
0.6
1
0.75
1
0.3335
81.2755
5,001
swe_smith::train::10143
swe_smith
train
10,143
paramiko__paramiko.23f92003.combine_file__klxig7c4
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP file operations broken after recent changes I'm experiencing issues with SFTP file operations that seem to have broken recently. Several basic operations are failing in unexpected ways. #### Steps to Reproduce ```python import paramiko # Connect to SFTP server transport = paramiko.Transport(('hostname', 22)) t...
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index c74695e..9e5cc6c 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -136,11 +136,11 @@ class SFTPFile(BufferedFile): return None. this guarantees nothing about the number of bytes collected in the prefetch buffer so far. ...
["tests/test_sftp.py::TestSFTP::test_readline_seek", "tests/test_sftp.py::TestSFTP::test_check", "tests/test_sftp_big.py::TestBigSFTP::test_prefetch_limit"]
["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
25
3
1,501
0
0.6
1
0.75
1
0.3335
81.2755
5,002
r2e_gym::train::4837
r2e_gym
train
4,837
numpy__4feb97e66000b17baa15b8486a7c1f9608865e78
numpy
numpy/numpy
python
4feb97e66000b17baa15b8486a7c1f9608865e78
**Analysis:** 1. **Key Parts from Commit Details and Test Results:** - **Commit Message:** `MAINT: have _validate_axis delegate to normalize_axis_index` - **Change:** The `_validate_axis` function now delegates axis validation to `normalize_axis_index`, removing the direct usage of `argname` unless necessary. ...
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -441,7 +441,7 @@ nullstr = a.dtype.type('') return (a != nullstr).sum(axis=axis, dtype=np.intp) - axis = asarray(_validate_axis(axis, a.ndim, 'axis')) + axis = asarray(_validat...
diff --git a/numpy/core/tests/test_numeric.py b/numpy/core/tests/test_numeric.py --- a/numpy/core/tests/test_numeric.py +++ b/numpy/core/tests/test_numeric.py @@ -2425,11 +2425,11 @@ def test_errors(self): x = np.random.randn(1, 2, 3) - assert_raises_regex(np.AxisError, 'invalid axis .* `source`'...
null
null
namanjain12/numpy_final:4feb97e66000b17baa15b8486a7c1f9608865e78
true
null
1
14
null
2,433
0
0.75
1
0.6375
1
0.452167
81.27525
5,003
swe_smith::train::10687
swe_smith
train
10,687
paramiko__paramiko.23f92003.func_pm_class_rm_funcs__4ft29veo
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTPClient methods missing after recent changes #### Description After some recent changes, several core SFTPClient methods are no longer available, causing AttributeError when trying to use basic SFTP functionality. #### Steps/Code to Reproduce ```python import paramiko # Connect to SFTP server ssh = paramiko.SSH...
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 066cd83..77301d3 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -203,20 +203,6 @@ class SFTPClient(BaseSFTP, ClosingContextManager): """ return self.sock - def listdir(self, path="."): - """ - ...
["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_close", "tests/test_sftp.py::TestSFTP::test_sftp_can_be_used_as_context_manager", "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...
["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
56
45
880
0
0.6
1
0.75
1
0.333333
81.275
5,004
swe_smith::train::44484
swe_smith
train
44,484
pydata__patsy.a5d16484.lm_rewrite__2n2c83jc
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
# Double @classmethod decorator causes DesignInfo.from_array to fail ## Description I found a bug in the `DesignInfo.from_array` method. When trying to use this method with an array that already has a `design_info` attribute, it fails with an AttributeError. ## Steps to reproduce Here's a simple example that demons...
diff --git a/patsy/design_info.py b/patsy/design_info.py index d94b97a..3d99787 100644 --- a/patsy/design_info.py +++ b/patsy/design_info.py @@ -681,7 +681,8 @@ class DesignInfo(object): ) @classmethod - def from_array(cls, array_like, default_column_prefix="column"): + @classmethod + def f...
["patsy/design_info.py::test_DesignInfo_from_array"]
["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
39
1
1,219
0
0.6
1
0.75
1
0.333167
81.2745
5,005
swe_smith::train::39446
swe_smith
train
39,446
pallets__jinja.ada0a9a6.func_pm_ctrl_shuffle__id3oew6a
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Inline if-expression with undefined variable produces incorrect error message #### Description When using an inline if-expression (conditional expression) in Jinja2 templates where the condition evaluates to false and the else clause contains an undefined variable or filter, the error message incorrectly states that ...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..7a28153 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1838,16 +1838,15 @@ class CodeGenerator(NodeVisitor): frame = frame.soft() def write_expr2() -> None: - if node.expr2 is not None: - ...
["tests/test_async.py::TestAsyncForLoop::test_recursive_lookaround", "tests/test_core_tags.py::TestForLoop::test_recursive_lookaround", "tests/test_filters.py::TestFilter::test_filter_undefined_in_condexpr"]
["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
3
1,858
0
0.6
1
0.75
1
0.333
81.274
5,006
swe_smith::train::35823
swe_smith
train
35,823
stanfordnlp__dspy.651a4c71.func_pm_remove_loop__ofyk185j
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
[Bug]: Tool validation is broken - arguments are not being validated ### Bug summary After a recent change, the `Tool` class in DSPy is no longer validating arguments properly. This causes tools to accept invalid arguments without raising any errors, which can lead to unexpected behavior. ### Code for reproduction ...
diff --git a/dspy/primitives/tool.py b/dspy/primitives/tool.py index 3edea2d..0b64b08 100644 --- a/dspy/primitives/tool.py +++ b/dspy/primitives/tool.py @@ -110,20 +110,6 @@ class Tool: self.has_kwargs = any([param.kind == param.VAR_KEYWORD for param in sig.parameters.values()]) def _validate_and_parse_...
["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
15
4
1,697
0
0.6
1
0.75
1
0.332833
81.2735
5,007
swe_smith::train::4611
swe_smith
train
4,611
pygments__pygments.27649ebb.lm_rewrite__z0tjrdhe
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
### Issue: Custom Lexer Loading Fails with IOError #### Description Hello, I've encountered an issue with loading custom lexers using the `load_lexer_from_file` function. When attempting to load a lexer from a non-existent file, the function does not handle the error as expected. Instead of providing a clear error me...
diff --git a/pygments/lexers/__init__.py b/pygments/lexers/__init__.py index a2eaf71..f198028 100644 --- a/pygments/lexers/__init__.py +++ b/pygments/lexers/__init__.py @@ -132,7 +132,7 @@ def get_lexer_by_name(_alias, **options): raise ClassNotFound(f'no lexer for alias {_alias!r} found') -def load_lexer_from...
["tests/test_cmdline.py::test_errors"]
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
40
1
1,197
0
0.6
1
0.75
1
0.332833
81.2735
5,008
swe_smith::train::35528
swe_smith
train
35,528
stanfordnlp__dspy.651a4c71.func_pm_ctrl_shuffle__bifr1nny
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Bug in get_program_with_highest_avg_score function causes incorrect results in teleprompt optimizers The `get_program_with_highest_avg_score` function in `dspy/teleprompt/utils.py` has a critical issue that affects both bayesian and minibatching optimizers. The function is supposed to return the program with the hig...
diff --git a/dspy/teleprompt/utils.py b/dspy/teleprompt/utils.py index 954ce56..68a6df6 100644 --- a/dspy/teleprompt/utils.py +++ b/dspy/teleprompt/utils.py @@ -107,20 +107,20 @@ def eval_candidate_program_with_pruning( def get_program_with_highest_avg_score(param_score_dict, fully_evaled_param_combos): - """Us...
["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
9
4
1,816
0
0.6
1
0.75
1
0.332667
81.273
5,009
swe_smith::train::48007
swe_smith
train
48,007
sqlfluff__sqlfluff.50a1c4b6.func_basic__qtskw2il
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Violation formatting displays incorrect rule information #### Description When formatting violations in the CLI output, the rule name and code are being displayed incorrectly. The formatter is showing the rule code instead of the rule name in brackets, and the logic for determining section colors appears to be invert...
diff --git a/src/sqlfluff/cli/formatters.py b/src/sqlfluff/cli/formatters.py index 4aa668f..8d31070 100644 --- a/src/sqlfluff/cli/formatters.py +++ b/src/sqlfluff/cli/formatters.py @@ -426,15 +426,15 @@ class OutputStreamFormatter(FormatterInterface): dict representation. If the former is passed, then the conv...
["test/cli/formatters_test.py::test__cli__formatters__violation"]
["test/cli/formatters_test.py::test__cli__formatters__filename_nocol", "test/cli/formatters_test.py::test__cli__helpers__colorize", "test/cli/formatters_test.py::test__cli__helpers__cli_table"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
26
1
1,476
0
0.6
1
0.75
1
0.332667
81.273
5,010
swe_smith::train::32324
swe_smith
train
32,324
davidhalter__parso.338a5760.lm_rewrite__bfzfbsi6
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
### Bug: AttributeError in _flows_finished function #### Description After the recent changes, an `AttributeError` is being raised in the `_flows_finished` function when processing certain Python code structures. This seems to occur when handling specific control flow statements like `if`, `for`, and `while`. The err...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..ee02b7b 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -189,12 +189,38 @@ def _flows_finished(pgen_grammar, stack): if, while, for and try might not be finished, because another part might still be parsed. """ - f...
["test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_invalid_to_valid_nodes", "test/test_diff_parser.py::test_if_removal_and_reappearence", "test/test_diff_parser.py::test_add_error_indentation", "test/test_diff_parser.py::test_indentat...
["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
34
13
1,315
0
0.6
1
0.75
1
0.3325
81.2725
5,011
swe_smith::train::24537
swe_smith
train
24,537
sunpy__sunpy.f8edfd5c.combine_module__t4mwj7fc
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# GOES leap second handling and HTML representation broken ## Description I've discovered two issues in the sunpy timeseries module: ### 1. GOES leap second handling is broken When working with GOES data files that contain leap seconds, the code no longer properly handles them. Previously, the code would detect lea...
diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py index 08e2a6a..e700e1b 100644 --- a/sunpy/timeseries/sources/goes.py +++ b/sunpy/timeseries/sources/goes.py @@ -245,25 +245,6 @@ class XRSTimeSeries(GenericTimeSeries): detector_info = True xrsa_primary_ch...
["sunpy/timeseries/sources/tests/test_goes.py::test_goes_leap_seconds", "sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html", "sunpy/timeseries/tests/test_timeseriesbase.py::test_repr_html_", "sunpy/timeseries/tests/test_timeseriesbase.py::test_quicklook"]
["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/t...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
27
4
1,455
0
0.6
1
0.75
1
0.3325
81.2725
5,012
swe_smith::train::3261
swe_smith
train
3,261
Suor__funcy.207a7810.lm_rewrite__taiailwg
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
### Issue: AttributeError in Debugging Utilities I encountered an issue with the debugging utilities in the latest version of the library. Specifically, when using the `log_calls` and `print_calls` decorators, an `AttributeError` is raised. This seems to occur when attempting to log or print the call signature of a fu...
diff --git a/funcy/debug.py b/funcy/debug.py index 62ef1bc..2c8372e 100644 --- a/funcy/debug.py +++ b/funcy/debug.py @@ -219,18 +219,27 @@ def _format_error(label, e, stack=True): ### Call signature stringification utils def signature_repr(call, repr_len=REPR_LEN): - if isinstance(call._func, partial): - ...
["tests/test_debug.py::test_log_calls", "tests/test_debug.py::test_print_calls", "tests/test_debug.py::test_log_calls_raise", "tests/test_debug.py::test_log_errors", "tests/test_debug.py::test_print_errors", "tests/test_debug.py::test_print_errors_recursion", "tests/test_debug.py::test_log_durations", "tests/test_debug...
["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_cal...
jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810
true
null
1
33
8
1,335
0
0.6
1
0.75
1
0.3325
81.2725
5,013
swe_smith::train::52736
swe_smith
train
52,736
pydicom__pydicom.7d361b3d.lm_rewrite__upqa9cdw
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Type Validation for Data Elements Not Working as Expected Description It seems there's an issue with the type validation for Data Elements when assigning values to tags with specific VRs (Value Representations). The validation does not correctly handle certain types, leading to unexpected behavior. To reproduce the ...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..5e31f7a 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -72,9 +72,7 @@ STR_VR_REGEXES = {vr: re.compile(regex) for (vr, regex) in VR_REGEXES.items()} BYTE_VR_REGEXES = {vr: re.compile(regex.encode()) for (vr, regex) in ...
["tests/test_dataelem.py::TestDataElementValidation::test_invalid_string_value[AE-42-int]", "tests/test_dataelem.py::TestDataElementValidation::test_invalid_string_value[AE-(1+2j)-complex]", "tests/test_dataelem.py::TestDataElementValidation::test_invalid_string_value[AE-1.45-float]", "tests/test_dataelem.py::TestDataE...
["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
31
54
1,375
0
0.6
1
0.75
1
0.3325
81.2725
5,014
swe_smith::train::43753
swe_smith
train
43,753
pydata__patsy.a5d16484.combine_file__3h01mua0
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
B-spline basis functions fail with boundary values #### Description When using B-spline basis functions with data points that fall exactly on the boundary knots, the function raises a `NotImplementedError` instead of handling them properly. #### Steps/Code to Reproduce ```python import numpy as np from patsy.spline...
diff --git a/patsy/splines.py b/patsy/splines.py index a6735e5..5aec088 100644 --- a/patsy/splines.py +++ b/patsy/splines.py @@ -21,9 +21,6 @@ def _eval_bspline_basis(x, knots, degree): from scipy.interpolate import splev except ImportError: # pragma: no cover raise ImportError("spline functiona...
["patsy/mgcv_cubic_splines.py::test_te_1smooth", "patsy/splines.py::test_bs_compat", "patsy/splines.py::test_bs_0degree", "patsy/splines.py::test_bs_errors"]
["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
41
4
1,175
0
0.6
1
0.75
1
0.3325
81.2725
5,015
swe_smith::train::5756
swe_smith
train
5,756
luozhouyang__python-string-similarity.115acaac.combine_file__cu1lt1by
swesmith/luozhouyang__python-string-similarity.115acaac
luozhouyang/python-string-similarity
python
null
# LongestCommonSubsequence fails with IndexError when comparing strings I'm trying to use the LongestCommonSubsequence class to compare strings, but I'm running into issues with the implementation. ```python from strsimpy.longest_common_subsequence import LongestCommonSubsequence lcs = LongestCommonSubsequence() s1 ...
diff --git a/strsimpy/longest_common_subsequence.py b/strsimpy/longest_common_subsequence.py index 07ede48..73822c8 100644 --- a/strsimpy/longest_common_subsequence.py +++ b/strsimpy/longest_common_subsequence.py @@ -23,27 +23,25 @@ from .string_distance import StringDistance class LongestCommonSubsequence(StringDis...
["strsimpy/longest_common_subsequence_test.py::LongestCommonSubsequenceTest::test_longest_common_subsequence", "strsimpy/metric_lcs_test.py::TestMetricLCS::test_metric_lcs"]
["strsimpy/cosine_test.py::TestCosine::test_cosine", "strsimpy/damerau_test.py::TestDamerau::test_damerau", "strsimpy/jaccard_test.py::TestJaccard::test_jaccard", "strsimpy/jaro_winkler_test.py::TestJaroWinkler::test_jarowinkler", "strsimpy/levenshtein_test.py::TestLevenshtein::test_levenshtein", "strsimpy/ngram_test.p...
jyangballin/swesmith.x86_64.luozhouyang_1776_python-string-similarity.115acaac
true
null
1
26
2
1,474
0
0.6
1
0.75
1
0.332333
81.272
5,016
swe_smith::train::30801
swe_smith
train
30,801
mido__mido.a0158ff9.combine_module__ze9sdxp4
swesmith/mido__mido.a0158ff9
mido/mido
python
null
# Key signature validation and MidiTrack slicing issues ## Description I've found two issues in the mido library: 1. Key signatures are being rejected when they should be accepted 2. MidiTrack slicing returns reversed tracks when accessing by index ## Steps to Reproduce ### Key Signature Issue ```python from mido...
diff --git a/mido/midifiles/meta.py b/mido/midifiles/meta.py index 0a7e2ba..d6fca1e 100644 --- a/mido/midifiles/meta.py +++ b/mido/midifiles/meta.py @@ -416,7 +416,7 @@ class MetaSpec_key_signature(MetaSpec): return [unsigned('byte', key), mode] def check(self, name, value): - if value not in _ke...
["../dev/tests/midifiles/test_meta.py::TestKeySignature::test_key_signature[input_bytes0-C]", "../dev/tests/midifiles/test_meta.py::TestKeySignature::test_key_signature[input_bytes1-Am]", "../dev/tests/midifiles/test_meta.py::TestKeySignature::test_key_signature[input_bytes2-Cb]", "../dev/tests/midifiles/test_meta.py::...
["../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev...
jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9
true
null
2
10
8
1,794
0
0.6
1
0.75
1
0.332333
81.272
5,017
swe_smith::train::93
swe_smith
train
93
oauthlib__oauthlib.1fd52536.combine_file__ivt14jmt
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Issues with OAuth2 Client token handling I found a couple of issues with the OAuth2 Client class when working with tokens: 1. The `prepare_refresh_token_request` method seems to be mixing up parameters. When I try to refresh a token with a specific scope, the refresh token and scope values get swapped. This causes th...
diff --git a/oauthlib/oauth2/rfc6749/clients/base.py b/oauthlib/oauth2/rfc6749/clients/base.py index a8de78b..a8716ff 100644 --- a/oauthlib/oauth2/rfc6749/clients/base.py +++ b/oauthlib/oauth2/rfc6749/clients/base.py @@ -443,9 +443,9 @@ class Client: resource owner. Note that if none is provided, the ones ...
["tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_add_mac_token", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_prepare_refresh_token_request"]
["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
2
1,791
0
0.6
1
0.75
1
0.331833
81.2705
5,018
swe_smith::train::28179
swe_smith
train
28,179
Mimino666__langdetect.a1598f1a.combine_file__te9ppxjg
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
[Bug]: Language detection completely broken in latest version ### Bug summary The language detection functionality is completely broken in the latest version. When trying to detect the language of a text, the detector fails with errors or returns incorrect results. ### Code for reproduction ```python from langdetec...
diff --git a/langdetect/detector.py b/langdetect/detector.py index cc831a0..7301ecf 100644 --- a/langdetect/detector.py +++ b/langdetect/detector.py @@ -125,10 +125,8 @@ class Detector(object): if latin_count * 2 < non_latin_count: text_without_latin = '' for ch in self.text: - ...
["langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4"]
["langdetect/tests/test_detector.py::DetectorTest::test_factory_from_json_string", "langdetect/tests/test_detector.py::DetectorTest::test_lang_list", "langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_lang_profile.p...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
1
21
4
1,571
0
0.6
1
0.75
1
0.331833
81.2705
5,019
swe_smith::train::38283
swe_smith
train
38,283
burnash__gspread.a8be3b96.func_pm_class_rm_funcs__yon1nvjp
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
Client.open() and Client.set_timeout() methods missing after recent changes #### Description The `Client.open()` and `Client.set_timeout()` methods appear to have been accidentally removed from the client module. Code that previously worked is now failing with `AttributeError`. #### Steps/Code to Reproduce ```pytho...
diff --git a/gspread/client.py b/gspread/client.py index e82e5be..97a1aa8 100644 --- a/gspread/client.py +++ b/gspread/client.py @@ -52,19 +52,6 @@ class Client: """ return self.http_client.auth.expiry - def set_timeout( - self, timeout: Optional[Union[float, Tuple[float, float]]] = None -...
["tests/client_test.py::ClientTest::test_add_timeout", "tests/client_test.py::ClientTest::test_no_found_exeption", "tests/client_test.py::ClientTest::test_open_by_name_has_metadata"]
["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_merge_cells", "tests/cell_test.py::CellTest::test_numeric_value", "tests/ce...
jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96
true
null
1
45
3
1,091
0
0.6
1
0.75
1
0.331833
81.2705
5,020
swe_smith::train::5580
swe_smith
train
5,580
PyCQA__flake8.cf1542ce.func_pm_remove_cond__hgsbnkjo
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
# SyntaxError and TokenError handling broken in FileChecker ## Description After a recent change, Flake8 is no longer correctly handling syntax errors and tokenization errors in Python files. When Flake8 encounters a file with syntax errors, it fails to properly extract the error location information, resulting in in...
diff --git a/src/flake8/checker.py b/src/flake8/checker.py index 329a2cc..330295a 100644 --- a/src/flake8/checker.py +++ b/src/flake8/checker.py @@ -355,23 +355,6 @@ class FileChecker: @staticmethod def _extract_syntax_information(exception: Exception) -> tuple[int, int]: - if ( - len(exce...
["tests/integration/test_checker.py::test_handling_syntaxerrors_across_pythons", "tests/integration/test_main.py::test_tokenization_error_but_not_syntax_error", "tests/integration/test_main.py::test_tokenization_error_is_a_syntax_error"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker....
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
33
3
1,330
0
0.6
1
0.75
1
0.331667
81.27
5,021
swe_smith::train::10072
swe_smith
train
10,072
paramiko__paramiko.23f92003.combine_file__82kidph8
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
# SFTPFile.check() and prefetch() methods are broken ## Description There are issues with the `check()` and `prefetch()` methods in the SFTPFile class. ## Steps to reproduce ### Issue with check() method: ```python from paramiko import Transport, SFTPClient # Connect to your SFTP server t = Transport(('hostname',...
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index c74695e..ac69bdb 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -406,13 +406,13 @@ class SFTPFile(BufferedFile): "check-file", self.handle, hash_algorithm, - int64(offset), - ...
["tests/test_sftp.py::TestSFTP::test_check", "tests/test_sftp_big.py::TestBigSFTP::test_prefetch_limit"]
["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
17
2
1,650
0
0.6
1
0.75
1
0.331667
81.27
5,022
swe_smith::train::35434
swe_smith
train
35,434
alecthomas__voluptuous.a7a55f83.lm_rewrite__gos4mqkx
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
**Unexpected TypeError with raises Context Manager** **Describe the bug** Encountered a `TypeError` when using the `raises` context manager in various scenarios. The error message indicates that a '_GeneratorContextManager' object is not an iterator. **To Reproduce** Here are some examples that reproduce the issue: ...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..d7fbe42 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -51,19 +51,30 @@ def default_factory(value) -> DefaultFactory: @contextmanager -def raises( - exc, msg: typing.Optional[str] = None, reg...
["voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_maybe_accepts_msg", "voluptuous/tests/tests.py::test_SomeOf_min_validation", "voluptuous/tests/tests.py::test_SomeOf_max_validation", "voluptuous/tests/tests.py::test_self_validation", "volupt...
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests.py::test_in", "voluptuous/tests/tests.py::test_in_unsortable_container", "voluptuous/tests/tes...
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
31
19
1,369
0
0.6
1
0.75
1
0.3315
81.2695
5,023
swe_smith::train::24527
swe_smith
train
24,527
sunpy__sunpy.f8edfd5c.combine_module__py48mgnt
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Issues with HECClient and VSOQueryResponseTable in sunpy.net module There are several issues with the `HECClient` and `VSOQueryResponseTable` classes in the sunpy.net module that cause unexpected behavior. ## Issue 1: HECClient search method fails with UnboundLocalError When using the `HECClient.search()` method w...
diff --git a/sunpy/net/helio/hec.py b/sunpy/net/helio/hec.py index 8b84536..b007c55 100644 --- a/sunpy/net/helio/hec.py +++ b/sunpy/net/helio/hec.py @@ -145,7 +145,6 @@ class HECClient(BaseClient): <BLANKLINE> """ if self.hec_client is None: - table = HECResponse([], client=self) ...
["sunpy/net/helio/tests/test_helio.py::test_ssl_verify_error", "sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_extent_type", "sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_no_start_time", "sunpy/net/vso/tests/test_vso.py::test_QueryResponse_build_table_with_no_end_time"]
["sunpy/net/helio/tests/test_helio.py::test_webservice_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_webservice_parser_get_links", "sunpy/net/helio/tests/test_helio.py::test_endpoint_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_endpoint_parser_get_links", "sunpy/net/helio/tests/test_h...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
13
4
1,729
0
0.6
1
0.75
1
0.3315
81.2695
5,024
swe_smith::train::30610
swe_smith
train
30,610
gweis__isodate.17cb25eb.lm_rewrite__vsq15jdh
swesmith/gweis__isodate.17cb25eb
gweis/isodate
python
null
# Timezone handling issue with datetime.timestamp() in Python 3.10+ ## Description I'm experiencing an issue with the `LocalTimezone._isdst` method in the `isodate` library. When using Python 3.10+, the timezone formatting is broken for datetimes with timezone information. The issue appears when formatting datetimes...
diff --git a/src/isodate/tzinfo.py b/src/isodate/tzinfo.py index 6306146..9c4a849 100644 --- a/src/isodate/tzinfo.py +++ b/src/isodate/tzinfo.py @@ -122,22 +122,11 @@ class LocalTimezone(tzinfo): def _isdst(self, dt: Optional[datetime]) -> bool: """Returns true if DST is active for given datetime object d...
["tests/test_strf.py::test_format[dt0-%Y-%m-%dT%H:%M:%S%Z-2012-12-25T13:30:00+10:00]", "tests/test_strf.py::test_format[dt1-%Y-%m-%dT%H:%M:%S%Z-1999-12-25T13:30:00+11:00]"]
["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::tes...
jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb
true
null
1
21
2
1,568
0
0.6
1
0.75
1
0.331333
81.269
5,025
swe_smith::train::29772
swe_smith
train
29,772
getnikola__nikola.0f4c230e.combine_module__qehlpl94
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
# Nikola init command fails with AttributeError Hi everyone, I discovered a bug in the `nikola init` command that causes it to crash with an AttributeError. The issue appears to be related to the order of operations in the `_execute` method of the `CommandInit` class. ## Reproduction Steps 1. Try to create a new si...
diff --git a/nikola/plugins/command/init.py b/nikola/plugins/command/init.py index b42af58..cf4b8f0 100644 --- a/nikola/plugins/command/init.py +++ b/nikola/plugins/command/init.py @@ -490,11 +490,17 @@ class CommandInit(Command): return STORAGE def _execute(self, options={}, args=None): + + if n...
["tests/integration/test_dev_server_serve.py::test_serves_root_dir[https://example.org]", "tests/integration/test_dev_server_serve.py::test_serves_root_dir[https://example.org:1234/blog]", "tests/integration/test_dev_server_serve.py::test_serves_root_dir[https://example.org:3456/blog/]", "tests/integration/test_dev_ser...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
2
37
8
1,247
0
0.6
1
0.75
1
0.331167
81.2685
5,026
r2e_gym::train::6543
r2e_gym
train
6,543
pillow__0084234aa951d43803e1ee05966707a276da0491
pillow
python-pillow/pillow
python
0084234aa951d43803e1ee05966707a276da0491
**Analysis:** - **Key Commit Details:** - **Commit Message:** Changed list of single items dictionaries to dictionary. - **Patch:** Modifies how `self._xmp` is updated from a list of single-item dictionaries to a single dictionary using a dictionary comprehension. - **Test Results:** - **Old Commit:** The test ...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -1334,10 +1334,10 @@ if marker == b"http://ns.adobe.com/xap/1.0/": root = xml.etree.ElementTree.fromstring(xmp_tags) for element in root.findall(".//"): - ...
diff --git a/Tests/test_image_getxmp.py b/Tests/test_image_getxmp.py --- a/Tests/test_image_getxmp.py +++ b/Tests/test_image_getxmp.py @@ -2,8 +2,8 @@ def test_getxmp(): - im = Image.open("Tests/images/xmp_test.jpg") - type_repr = repr(type(im.getxmp())) + with Image.open("Tests/images/xmp_test.jpg") as i...
null
null
namanjain12/pillow_final:0084234aa951d43803e1ee05966707a276da0491
true
null
1
8
null
2,539
0
0.75
1
0.6375
1
0.449833
81.26825
5,027
swe_smith::train::45437
swe_smith
train
45,437
dask__dask.5f61e423.lm_rewrite__qc6alllg
swesmith/dask__dask.5f61e423
dask/dask
python
null
TypeError in indices function with stack() argument I encountered an issue with the `indices` function in Dask when using the latest version. The problem arises when trying to create a grid of indices with specific dimensions and chunks. Here's a minimal example to reproduce the issue: ```python import dask.array as...
diff --git a/dask/array/creation.py b/dask/array/creation.py index b906bc4..7d536e6 100644 --- a/dask/array/creation.py +++ b/dask/array/creation.py @@ -504,7 +504,7 @@ def meshgrid(*xi, sparse=False, indexing="xy", **kwargs): return out_type(grid) -def indices(dimensions, dtype=int, chunks="auto"): +def indic...
["dask/array/tests/test_creation.py::test_indices_dimensions_chunks", "dask/array/tests/test_creation.py::test_empty_indices", "dask/array/tests/test_creation.py::test_indices"]
["dask/array/tests/test_creation.py::test_arr_like[i4-C-None-shape0-chunks0-tuple-tuple-empty_like-numpy]", "dask/array/tests/test_creation.py::test_arr_like[i4-C-None-shape0-chunks0-tuple-tuple-empty-numpy]", "dask/array/tests/test_creation.py::test_arr_like[i4-C-None-shape0-chunks0-tuple-tuple-ones_like-numpy]", "das...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
48
3
1,026
0
0.6
1
0.75
1
0.331
81.268
5,028
swe_smith::train::38058
swe_smith
train
38,058
weaveworks__grafanalib.5c3b17ed.func_basic__8jrwd869
swesmith/weaveworks__grafanalib.5c3b17ed
weaveworks/grafanalib
python
null
Legend to_json_data method returns incorrect field mappings #### Description The Legend class's `to_json_data()` method is returning incorrect field mappings, causing dashboard serialization to fail with AttributeError exceptions. #### Steps/Code to Reproduce ```python from grafanalib import core as G from io impor...
diff --git a/grafanalib/core.py b/grafanalib/core.py index 79849fe..c659426 100644 --- a/grafanalib/core.py +++ b/grafanalib/core.py @@ -510,24 +510,24 @@ class Legend(object): sortDesc = attr.ib(default=False) def to_json_data(self): - values = ((self.avg or self.current or self.max or self.min) - ...
["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_cloudwatch.py::test_serialization_cloudwatch_metrics_target", "grafanalib/tests/test_core.py::test_panel_extra_json", "grafanalib/tests/test_examples.py::test_examples", "grafanalib/tests/test_graf...
["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_azure_graph_target", "grafanalib/tests/test_cloudwatch.py::test_serialization_cloudwatch_logs_insig...
jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed
true
null
1
26
8
1,466
0
0.6
1
0.75
1
0.331
81.268
5,029
swe_smith::train::6595
swe_smith
train
6,595
joke2k__faker.8b401a7d.combine_module__qc6s251i
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# Bug: Latvian VAT ID generation and Norwegian SSN generation broken ### Bug summary I've discovered two issues in the latest version: 1. The Latvian VAT ID generator is completely missing - trying to use it results in an AttributeError 2. The Norwegian SSN generator has a logic error that causes it to fail when pro...
diff --git a/faker/providers/ssn/lv_LV/__init__.py b/faker/providers/ssn/lv_LV/__init__.py index 49e7d4a..c3e9822 100644 --- a/faker/providers/ssn/lv_LV/__init__.py +++ b/faker/providers/ssn/lv_LV/__init__.py @@ -55,12 +55,4 @@ class Provider(SsnProvider): A Faker provider for the Latvian VAT IDs """ - v...
["tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn", "tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn_dob_passed", "tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn_gender_passed", "tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn_invalid_dob_passed", "tests/providers/test_ssn.py::TestNoNO::test_no...
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
2
16
6
1,665
0
0.6
1
0.75
1
0.330833
81.2675
5,030
swe_smith::train::18683
swe_smith
train
18,683
seperman__deepdiff.ed252022.combine_file__sgs5rp20
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Delta operations fail with TypeError when applying changes to lists #### Description When using Delta to apply changes to data structures containing lists, operations fail with TypeError exceptions. The delta application process seems to have issues with parameter ordering and type handling for list operations. ####...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..50f5bb6 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -211,10 +211,10 @@ class Delta: return result def _raise_or_log(self, msg, level='error'): - if self.log_errors: - getattr(logger, level)(msg) if...
["tests/test_delta.py::TestBasicsOfDelta::test_list_difference_add_delta", "tests/test_delta.py::TestBasicsOfDelta::test_multiple_delta", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference_add_delta_when_index_not_valid", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference3_delta", "tests/test_delt...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
31
34
1,364
0
0.6
1
0.75
1
0.330667
81.267
5,031
swe_smith::train::31799
swe_smith
train
31,799
davidhalter__parso.338a5760.combine_file__nmemvq9e
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
# Parso cache system is broken ### Bug description The cache system in parso is completely broken. Several issues have been identified: 1. The cache dictionary structure is inverted - keys and values are swapped 2. Cache files are saved with wrong extension (.txt instead of .pkl) 3. Cache garbage collection only pro...
diff --git a/parso/cache.py b/parso/cache.py index 5592a9f..8c26718 100644 --- a/parso/cache.py +++ b/parso/cache.py @@ -154,19 +154,19 @@ def _load_from_file_system(hashed_grammar, path, p_time, cache_path=None): def _set_cache_item(hashed_grammar, path, module_cache_item): - if sum(len(v) for v in parser_cach...
["test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_used_update[False-False]", "test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_cache.py::test_cache_last_used_update[True-False]", "test/test_cache.py::test_cac...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple",...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
23
9
1,524
0
0.6
1
0.75
1
0.330667
81.267
5,032
swe_smith::train::18204
swe_smith
train
18,204
msiemens__tinydb.10644a0e.combine_file__vrzx0w7o
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Table update and remove operations not working correctly #### Description The table update and remove operations are behaving unexpectedly. When trying to update documents with conditions, the wrong documents are being updated, and remove operations are failing with type errors. #### Steps/Code to Reproduce ```pyth...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..feadd38 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -419,19 +419,13 @@ class Table: def updater(table: dict): _cond = cast(QueryLike, cond) - # We need to convert the keys iterator to a list because - ...
["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::test_add_int[json]", "tests/test_operations.py::test_add_str[memory]", "tests/test_operations.py::test_add_str[json]", "tests/test_operations.py::...
["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
43
35
1,123
0
0.6
1
0.75
1
0.3305
81.2665
5,033
swe_smith::train::9969
swe_smith
train
9,969
google__textfsm.c31b6007.combine_file__vzt34nvz
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
Multiple issues with terminal.py functions I found several issues with the terminal.py module that cause errors when using various functions. ## Issue 1: _AnsiCmd function validation happens after command processing Code to reproduce: ```python from textfsm import terminal terminal._AnsiCmd(['bogus']) ``` Results i...
diff --git a/textfsm/terminal.py b/textfsm/terminal.py index 32252a4..8fc0773 100755 --- a/textfsm/terminal.py +++ b/textfsm/terminal.py @@ -111,6 +111,10 @@ class UsageError(Error): def _AnsiCmd(command_list): + # Convert to numerical strings. + command_str = [str(SGR[x.lower()]) for x in command_list] + if no...
["tests/terminal_test.py::TerminalTest::testAnsiCmd", "tests/terminal_test.py::TerminalTest::testEncloseAnsi", "tests/terminal_test.py::PagerTest::testPage", "tests/terminal_test.py::PagerTest::testPager"]
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.p...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
22
4
1,543
0
0.6
1
0.75
1
0.3305
81.2665
5,034
swe_smith::train::38353
swe_smith
train
38,353
burnash__gspread.a8be3b96.lm_rewrite__9nuqeqz0
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
**TypeError in batch_update method** **Describe the bug** When using the `batch_update` method on a worksheet, a `TypeError` is raised. This occurs when attempting to update multiple cell ranges in a single call. The error seems to be related to the handling of the data parameter within the method. **To Reproduce** H...
diff --git a/gspread/worksheet.py b/gspread/worksheet.py index 883e3a2..7ff1c30 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -1249,14 +1249,12 @@ class Worksheet: return response def batch_update( - self, - data: Iterable[MutableMapping[str, Any]], - raw: bool = T...
["tests/worksheet_test.py::WorksheetTest::test_batch_update"]
["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_merge_cells", "tests/cell_test.py::CellTest::test_numeric_value", "tests/ce...
jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96
true
null
1
38
1
1,223
0
0.6
1
0.75
1
0.3305
81.2665
5,035
swe_bench::test::1269
swe_bench
test
1,269
pydata__xarray-5362
pydata/xarray
pydata/xarray
python
bc41eb20ba96c4d6a4b5bf12f1749523f34fa321
Should weighted operations raise an error when dimensions don't exist? **What happened**: Weighted operations don't raise an error when the dimensions passed don't exist. **What you expected to happen**: This is not really a bug, but I find it a bit confusing because it's not consistent with the same "unweighted" ope...
Thanks — I think it would be reasonable to raise an error here. +1 this should absolutely raise an error! We try to follow the Zen of Python "Errors should never pass silently."
diff --git a/xarray/core/weighted.py b/xarray/core/weighted.py --- a/xarray/core/weighted.py +++ b/xarray/core/weighted.py @@ -119,6 +119,19 @@ def _weight_check(w): self.obj: T_DataWithCoords = obj self.weights: "DataArray" = weights + def _check_dim(self, dim: Optional[Union[Hashable, Iterable[...
diff --git a/xarray/tests/test_weighted.py b/xarray/tests/test_weighted.py --- a/xarray/tests/test_weighted.py +++ b/xarray/tests/test_weighted.py @@ -368,3 +368,19 @@ def test_weighted_operations_keep_attr_da_in_ds(operation): result = getattr(data.weighted(weights), operation)(keep_attrs=True) assert data...
["xarray/tests/test_weighted.py::test_weighted_bad_dim[True]", "xarray/tests/test_weighted.py::test_weighted_bad_dim[False]"]
["xarray/tests/test_weighted.py::test_weighted_non_DataArray_weights[True]", "xarray/tests/test_weighted.py::test_weighted_non_DataArray_weights[False]", "xarray/tests/test_weighted.py::test_weighted_weights_nan_raises[weights0-True]", "xarray/tests/test_weighted.py::test_weighted_weights_nan_raises[weights0-False]", "...
null
true
2021-05-22T16:51:54Z
1
17
2
1,441
0
0.8
1
0.55
1
0.296833
81.2655
5,036
swe_smith::train::45019
swe_smith
train
45,019
mahmoud__glom.fb3c4e76.func_pm_remove_cond__d2e04ug3
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
GROUP spec raises ValueError for dict and list specs #### Description When using GROUP with dict or list specifications, a ValueError is raised with the message "dict not a valid spec type for Group mode" or "list not a valid spec type for Group mode". #### Steps/Code to Reproduce ```python from glom import glom, G...
diff --git a/glom/grouping.py b/glom/grouping.py index 122bd08..d34fd60 100644 --- a/glom/grouping.py +++ b/glom/grouping.py @@ -114,46 +114,7 @@ def GROUP(target, spec, scope): acc = tree[_spec_id] # current accumulator except KeyError: acc = tree[_spec_id] = _spec_type() - if _spec_type is ...
["glom/test/test_error.py::test_all_public_errors", "glom/test/test_grouping.py::test_bucketing", "glom/test/test_grouping.py::test_corner_cases", "glom/test/test_grouping.py::test_agg", "glom/test/test_grouping.py::test_limit"]
["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
41
5
1,160
0
0.6
1
0.75
1
0.33
81.265
5,037
swe_smith::train::42738
swe_smith
train
42,738
python-jsonschema__jsonschema.93e0caa5.func_pm_ctrl_shuffle__vdz9epqx
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
RefResolver.resolve_remote() broken due to code reordering #### Description The `resolve_remote` method in `_RefResolver` class is not working properly. When trying to resolve remote URIs, the method fails because variables are being used before they are defined. #### Steps/Code to Reproduce ```python from jsonsche...
diff --git a/jsonschema/validators.py b/jsonschema/validators.py index b8ca3bd..953cb0d 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -1181,6 +1181,17 @@ class _RefResolver: return document def resolve_remote(self, uri): + + if scheme in self.handlers: + resul...
["jsonschema/tests/test_cli.py::TestCLI::test_invalid_explicit_base_uri", "jsonschema/tests/test_cli.py::TestCLI::test_nonexistent_file_with_explicit_base_uri", "jsonschema/tests/test_cli.py::TestCLI::test_successful_validation_via_explicit_base_uri", "jsonschema/tests/test_cli.py::TestCLI::test_unsuccessful_validation...
["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
35
12
1,280
0
0.6
1
0.75
1
0.33
81.265
5,038
swe_smith::train::26284
swe_smith
train
26,284
pylint-dev__astroid.b114f6b5.func_pm_ctrl_shuffle__c9v6wvnf
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
String format inference broken due to variable reference before assignment #### Description String format method calls are failing to infer properly, causing UnboundLocalError when trying to process format strings. #### Steps/Code to Reproduce ```python import astroid code = ''' "My name is {}, I'm {}".format("Dan...
diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py index a56b152..be690f2 100644 --- a/astroid/brain/brain_builtin_inference.py +++ b/astroid/brain/brain_builtin_inference.py @@ -1023,11 +1023,31 @@ def _is_str_format_call(node: nodes.Call) -> bool: def _infer_str_format_c...
["tests/brain/test_builtin.py::TestStringNodes::test_string_format[empty-indexes]", "tests/brain/test_builtin.py::TestStringNodes::test_string_format[numbered-indexes]", "tests/brain/test_builtin.py::TestStringNodes::test_string_format[named-indexes]", "tests/brain/test_builtin.py::TestStringNodes::test_string_format[n...
["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
47
14
1,039
0
0.6
1
0.75
1
0.329833
81.2645
5,039
swe_smith::train::6873
swe_smith
train
6,873
joke2k__faker.8b401a7d.lm_rewrite__loapp8n8
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
### Describe the bug It seems that the credit card number generation is currently broken due to a missing method. When attempting to generate credit card numbers, an `AttributeError` is raised because the `Provider` object does not have the `_get_luhn_check_digit` attribute. This affects multiple credit card types, in...
diff --git a/faker/providers/credit_card/__init__.py b/faker/providers/credit_card/__init__.py index da82028..24b71e3 100644 --- a/faker/providers/credit_card/__init__.py +++ b/faker/providers/credit_card/__init__.py @@ -176,20 +176,16 @@ class Provider(BaseProvider): may contain any number of digits. The ``l...
["tests/providers/test_credit_card.py::TestCreditCardProvider::test_mastercard", "tests/providers/test_credit_card.py::TestCreditCardProvider::test_visa13", "tests/providers/test_credit_card.py::TestCreditCardProvider::test_visa16", "tests/providers/test_credit_card.py::TestCreditCardProvider::test_visa19", "tests/prov...
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
28
23
1,419
0
0.6
1
0.75
1
0.329833
81.2645
5,040
swe_smith::train::23997
swe_smith
train
23,997
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__dwx4dgb4
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeSeries truncate method broken after recent changes #### Description The `truncate` method in `GenericTimeSeries` is currently broken and raises `UnboundLocalError: cannot access local variable 'object' where it is not associated with a value` when called. #### Steps/Code to Reproduce ```python import sunpy.time...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 80e5d20..e814ffc 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -511,6 +511,20 @@ class GenericTimeSeries: copy.copy(self.units)) def truncate(...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_truncation_timerange", "sunpy/timeseries/tests/test_timeseriesbase.py::test_truncation_dates", "sunpy/timeseries/tests/test_timeseriesbase.py::test_truncated_none_ts", "sunpy/timeseries/tests/test_timeseriesbase.py::test_truncated_start_ts", "sunpy/timeseries/tests/...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
43
7
1,119
0
0.6
1
0.75
1
0.329833
81.2645
5,041
swe_smith::train::18563
swe_smith
train
18,563
HIPS__autograd.ac044f0d.lm_rewrite__uktueq2k
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Issue with `np.diff` Gradient Calculation #### Description It seems there's an issue with the gradient calculation for the `np.diff` function when using certain input shapes and parameters. This problem arises when attempting to compute gradients for arrays with specific dimensions and axis configurations. #### ...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..e83d98b 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -264,28 +264,40 @@ defvjp(anp.rollaxis, grad_rollaxis) def grad_diff(ans, a, n=1, axis=-1): + """Gradient of np.diff function""" nd...
["tests/test_systematic.py::test_diff"]
["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
46
1
1,059
0
0.6
1
0.75
1
0.329833
81.2645
5,042
swe_smith::train::24835
swe_smith
train
24,835
marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_invert_if__dimpm0j4
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Schema validation with `many=True` fails when using `@validates` decorator #### Description When using the `@validates` decorator on a schema with `many=True`, validation fails with a `TypeError: string indices must be integers`. The decorator appears to be trying to iterate over individual data items when `many=True...
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index e21768e..5fb7ca7 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -1114,6 +1114,20 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta): field_obj.data_key if field_obj.data_key is not None else field_nam...
["tests/test_decorators.py::TestValidatesDecorator::test_validates", "tests/test_decorators.py::TestValidatesDecorator::test_validates_with_attribute", "tests/test_decorators.py::TestValidatesDecorator::test_validates_decorator", "tests/test_decorators.py::TestValidatesDecorator::test_precedence", "tests/test_decorator...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
29
9
1,399
0
0.6
1
0.75
1
0.329833
81.2645
5,043
swe_smith::train::42488
swe_smith
train
42,488
python-jsonschema__jsonschema.93e0caa5.combine_file__fnqi73mh
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
# Equality comparison in _RefResolutionError and _WrappedReferencingError is broken ## Description I've found an issue with the equality comparison in the `_RefResolutionError` and `_WrappedReferencingError` classes. The comparison logic is inverted, causing unexpected behavior when comparing instances. ## Steps to ...
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 3dcd296..e014f63 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -225,8 +225,9 @@ class _RefResolutionError(Exception): def __eq__(self, other): if self.__class__ is not other.__class__: - return No...
["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
13
4
1,718
0
0.6
1
0.75
1
0.329667
81.264
5,044
swe_smith::train::26556
swe_smith
train
26,556
pylint-dev__astroid.b114f6b5.lm_rewrite__bbsdpdkj
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
# Type comments in function definitions not properly parsed ## Description When using type comments in function definitions, the parser is not correctly handling the type annotations. This affects both function return type annotations and argument type annotations. ## Steps to Reproduce ```python def func(): # ...
diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py index 4c77906..24e304d 100644 --- a/astroid/rebuilder.py +++ b/astroid/rebuilder.py @@ -598,30 +598,33 @@ class TreeRebuilder: return type_object.value - def check_function_type_comment( - self, node: ast.FunctionDef | ast.AsyncFunctionDef,...
["tests/test_nodes.py::test_type_comments_function", "tests/test_nodes.py::test_type_comments_arguments", "tests/test_nodes.py::test_type_comments_posonly_arguments", "tests/test_nodes.py::test_correct_function_type_comment_parent"]
["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
29
4
1,398
0
0.6
1
0.75
1
0.329667
81.264
5,045
swe_smith::train::19635
swe_smith
train
19,635
kurtmckee__feedparser.cad965a3.combine_file__g083wy7c
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
# Media RSS namespace parsing issues with restriction and license elements I found a couple of issues with the Media RSS namespace parsing in feedparser: ## Issue 1: Media restriction parsing uses wrong delimiter When parsing media:restriction elements, the code is splitting the content by spaces, but according to t...
diff --git a/feedparser/namespaces/mediarss.py b/feedparser/namespaces/mediarss.py index b057580..db2a55e 100644 --- a/feedparser/namespaces/mediarss.py +++ b/feedparser/namespaces/mediarss.py @@ -100,13 +100,13 @@ class Namespace: if restriction is not None and restriction.strip(): context = self...
["tests/test_well_formed.py::test_strict_parser[info1147]", "tests/test_well_formed.py::test_loose_parser[info1147]"]
["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
6
2
1,858
0
0.6
1
0.75
1
0.329667
81.264
5,046
swe_smith::train::33342
swe_smith
train
33,342
pallets__click.fde47b4b.combine_file__m0zwhjra
swesmith/pallets__click.fde47b4b
pallets/click
python
null
# Multiple issues with file handling in Click utils I've discovered several issues with file handling in Click's utils module. The problems seem to be related to parameter ordering and function call patterns in the `safecall`, `LazyFile`, and `open_file` functions. ## Steps to Reproduce Here's a simple example that ...
diff --git a/src/click/utils.py b/src/click/utils.py index ab2fe58..248d575 100644 --- a/src/click/utils.py +++ b/src/click/utils.py @@ -38,10 +38,9 @@ def safecall(func: t.Callable[P, R]) -> t.Callable[P, R | None]: def wrapper(*args: P.args, **kwargs: P.kwargs) -> R | None: try: - return fu...
["tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_file_atomics", "tests/test_basic.py::test_file_option", "tests/test_basic.py::test_path_option", "tests/test_context.py::test_global_context_object", "tests/test_shell_completion.py::test_files_closed", "tests/test_termui.py::test_file_prompt_de...
["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
21
15
1,558
0
0.6
1
0.75
1
0.329667
81.264
5,047
swe_smith::train::45853
swe_smith
train
45,853
conan-io__conan.86f29e13.lm_rewrite__grvvsojf
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
[Bug]: Profile serialization fails with AttributeError ### Bug summary I'm unable to serialize a Profile object after making some changes to it. The serialization fails with an AttributeError. ### Code for reproduction ```python from conan.internal.model.profile import Profile from conan.internal.model.profile_envi...
diff --git a/conan/internal/model/profile.py b/conan/internal/model/profile.py index 54aa126..3c60c8f 100644 --- a/conan/internal/model/profile.py +++ b/conan/internal/model/profile.py @@ -34,33 +34,23 @@ class Profile: return self.dumps() def serialize(self): - def _serialize_tool_requires(): - ...
["test/unittests/model/profile_test.py::test_profile_serialize"]
["test/unittests/model/profile_test.py::ProfileTest::test_apply", "test/unittests/model/profile_test.py::ProfileTest::test_package_settings_update", "test/unittests/model/profile_test.py::ProfileTest::test_profile_dump_order", "test/unittests/model/profile_test.py::ProfileTest::test_profile_settings_update", "test/unit...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
34
1
1,296
0
0.6
1
0.75
1
0.329333
81.263
5,048
swe_smith::train::47464
swe_smith
train
47,464
sqlfluff__sqlfluff.50a1c4b6.combine_file__loyfpecw
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Simple API functions returning incorrect results #### Description The simple API functions `lint()` and `fix()` are not working correctly. When using these functions, they either return empty results, throw errors, or produce unexpected behavior. #### Steps/Code to Reproduce ```python import sqlfluff # Basic linti...
diff --git a/src/sqlfluff/api/simple.py b/src/sqlfluff/api/simple.py index 1d91187..8f0392e 100644 --- a/src/sqlfluff/api/simple.py +++ b/src/sqlfluff/api/simple.py @@ -19,32 +19,29 @@ def get_simple_config( config_path: Optional[str] = None, ) -> FluffConfig: """Get a config object from simple API arguments...
["test/api/simple_test.py::test__api__lint_string_without_violations", "test/api/simple_test.py::test__api__lint_string", "test/api/simple_test.py::test__api__lint_string_specific", "test/api/simple_test.py::test__api__lint_string_specific_single", "test/api/simple_test.py::test__api__lint_string_specific_exclude", "te...
["test/api/simple_test.py::test__api__parse_string", "test/api/simple_test.py::test__api__parse_fail", "test/api/simple_test.py::test__api__config_path", "test/api/simple_test.py::test__api__invalid_dialect", "test/api/simple_test.py::test__api__parse_exceptions"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
37
14
1,235
0
0.6
1
0.75
1
0.329167
81.2625
5,049
swe_smith::train::26807
swe_smith
train
26,807
tkrajina__gpxpy.09fc46b3.combine_file__ehz08wgl
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
Haversine distance calculation returns incorrect results #### Description The haversine distance calculation in `gpxpy.geo.haversine_distance` is producing incorrect results and causing math domain errors in various calculations. When calculating distances between GPS coordinates, the function returns values that are...
diff --git a/gpxpy/geo.py b/gpxpy/geo.py index 00fa3bb..e7bd227 100644 --- a/gpxpy/geo.py +++ b/gpxpy/geo.py @@ -37,15 +37,15 @@ def haversine_distance(latitude_1: float, longitude_1: float, latitude_2: float, Implemented from http://www.movable-type.co.uk/scripts/latlong.html """ - d_lon = mod_math.radi...
["test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_add_missing_elevations", "test.py::GPXTests::test_angle", "test.py::GPXTests::test_angle_0", "test.py::GPXTests::test_course_between", "test.py::G...
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_elevations_without_ele", "test.py::GPXTests::test_add_missing_speeds", "test.py::GPXTests::test_add_missing_times", "test.py::GPXTests::t...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
26
18
1,455
0
0.6
1
0.75
1
0.329167
81.2625
5,050
swe_smith::train::36156
swe_smith
train
36,156
facelessuser__soupsieve.a8080d97.combine_file__0gahu33h
swesmith/facelessuser__soupsieve.a8080d97
facelessuser/soupsieve
python
null
# Version validation issues with pre-release and post-release flags Hello, I've discovered an issue with the version validation in the `Version` class. The problem occurs when creating version objects with certain combinations of pre-release and post-release flags. ## Description When creating a version with both p...
diff --git a/soupsieve/__meta__.py b/soupsieve/__meta__.py index 0fbf71b..ea33364 100644 --- a/soupsieve/__meta__.py +++ b/soupsieve/__meta__.py @@ -89,8 +89,7 @@ class Version(namedtuple("Version", ["major", "minor", "micro", "release", "pre" # Ensure all parts are positive integers. for value in (...
["tests/test_versions.py::TestVersion::test_asserts", "tests/test_versions.py::TestVersion::test_version_output", "tests/test_versions.py::TestVersion::test_version_parsing"]
["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
10
3
1,775
0
0.6
1
0.75
1
0.329167
81.2625
5,051
swe_smith::train::27491
swe_smith
train
27,491
arrow-py__arrow.1d70d009.combine_file__0jlnyumj
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
# Incorrect behavior in Arrow._get_datetime and __radd__ methods I've discovered some issues with the Arrow class in the latest version that are causing unexpected behavior. ## Description There are two main issues: 1. The `__radd__` method is not working correctly. When adding a timedelta to an Arrow object using ...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..6db46d7 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -1721,7 +1721,7 @@ class Arrow: return NotImplemented def __radd__(self, other: Union[timedelta, relativedelta]) -> "Arrow": - return self.__add__(other) + return self.__...
["tests/test_arrow.py::TestArrowMath::test_radd", "tests/test_arrow.py::TestArrowUtil::test_get_datetime"]
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
14
2
1,694
0
0.6
1
0.75
1
0.329
81.262
5,052
swe_smith::train::45516
swe_smith
train
45,516
dask__dask.5f61e423.pr_9237
swesmith/dask__dask.5f61e423
dask/dask
python
null
### NameError: 'bisect' is not defined in Dask DataFrame Repartitioning #### Description It seems there's an issue with the recent changes in the Dask DataFrame module, specifically related to the repartitioning functionality. The error `NameError: name 'bisect' is not defined` is encountered when attempting to perfo...
diff --git a/dask/dataframe/core.py b/dask/dataframe/core.py index 32d8bbc..6f84ba9 100644 --- a/dask/dataframe/core.py +++ b/dask/dataframe/core.py @@ -483,4 +483,4 @@ def _sqrt_and_convert_to_timedelta(partition, axis, dtype=None, *args, **kwargs) if dtype is not None: sqrt = sqrt.astype(dtype) - r...
["dask/dataframe/io/tests/test_io.py::test_from_pandas_npartitions_duplicates[index0]", "dask/dataframe/io/tests/test_io.py::test_from_pandas_npartitions_duplicates[index1]", "dask/dataframe/io/tests/test_io.py::test_from_pandas_npartitions_duplicates[index2]", "dask/dataframe/io/tests/test_io.py::test_sorted_division_...
["dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>0]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>1]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>2]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
3
33
87
1,314
0
0.6
1
0.75
1
0.329
81.262
5,053
swe_smith::train::1900
swe_smith
train
1,900
agronholm__typeguard.b6a7e438.func_pm_remove_assign__ug9n863a
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking instrumentation broken - functions not being properly instrumented #### Description After recent changes, type checking instrumentation appears to be completely broken. Functions decorated with `@typechecked` are no longer having their arguments and return values validated at runtime. #### Steps/Code t...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..57bf6a3 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -696,9 +696,9 @@ class TypeguardTransformer(NodeTransformer): assert self.target_node is None self...
["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
29
115
1,394
0
0.6
1
0.75
1
0.329
81.262
5,054
swe_bench::test::1376
swe_bench
test
1,376
pytest-dev__pytest-10343
pytest-dev/pytest
pytest-dev/pytest
python
2be1b8f3559570c456f4bf64fea8067e368dcdfd
Old-style hookimpl warning has no location information The old-style hookimpl deprecation warning from #9118 has no way to see where the culprit is implemented. I'm now getting: ``` pytest.PytestDeprecationWarning: The hookimpl pytest_configure uses old-style configuration options (marks or attributes). Please use the...
I'll ensure to include the filename in the warning, this is another fatal flaw of the warning system Ah, I agree this is somewhat of a problem with Python warnings. The location is indeed included when showing them as normal warnings, but not when turning them into exceptions (via `filterwarnings = error` or `-Werror`...
diff --git a/src/_pytest/warning_types.py b/src/_pytest/warning_types.py --- a/src/_pytest/warning_types.py +++ b/src/_pytest/warning_types.py @@ -158,12 +158,15 @@ def warn_explicit_for(method: FunctionType, message: PytestWarning) -> None: filename = inspect.getfile(method) module = method.__module__ m...
diff --git a/testing/test_warning_types.py b/testing/test_warning_types.py --- a/testing/test_warning_types.py +++ b/testing/test_warning_types.py @@ -36,3 +36,11 @@ def test(): ) result = pytester.runpytest() result.stdout.fnmatch_lines(["E pytest.PytestWarning: some warning"]) + + +@pytest.mark.f...
["testing/test_warning_types.py::test_warn_explicit_for_annotates_errors_with_location"]
["testing/test_warning_types.py::test_warning_types[PytestWarning]", "testing/test_warning_types.py::test_warning_types[PytestAssertRewriteWarning]", "testing/test_warning_types.py::test_warning_types[PytestCacheWarning]", "testing/test_warning_types.py::test_warning_types[PytestConfigWarning]", "testing/test_warning_t...
null
true
2022-10-06T09:45:16Z
1
21
1
1,353
0
0.8
1
0.55
1
0.2955
81.2615
5,055
swe_smith::train::51609
swe_smith
train
51,609
pydicom__pydicom.7d361b3d.combine_module__g8r9euos
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Pixel data decoding and encoding broken after recent changes #### Description After some recent changes, pixel data operations are failing with incorrect error types and wrong data type calculations. The decoder is raising `RuntimeError` instead of `ImportError` when NumPy is not available, and the encoder lookup is ...
diff --git a/src/pydicom/pixels/decoders/base.py b/src/pydicom/pixels/decoders/base.py index 268f0d4..df77198 100644 --- a/src/pydicom/pixels/decoders/base.py +++ b/src/pydicom/pixels/decoders/base.py @@ -469,40 +469,32 @@ class DecodeRunner(RunnerBase): pixel data. """ if not HAVE_NP: - ...
["tests/pixels/test_decoder_base.py::TestDecodeRunner::test_pixel_dtype_no_numpy_raises", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_compress_inplace", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_encoder_unavailable", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_uid...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
2
34
12
1,293
0
0.6
1
0.75
1
0.328833
81.2615
5,056
swe_smith::train::33065
swe_smith
train
33,065
django-money__django-money.835c1ab8.combine_file__nyz5wb5v
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
Money field queries broken after recent changes #### Description Money field queries are failing with AttributeError when using Q objects and Money values. The issue appears to affect various query patterns including comparisons, lookups, and complex Q object combinations. #### Steps/Code to Reproduce ```python fro...
diff --git a/djmoney/models/managers.py b/djmoney/models/managers.py index d76f0c5..960e7ee 100644 --- a/djmoney/models/managers.py +++ b/djmoney/models/managers.py @@ -92,28 +92,28 @@ def _expand_money_args(model, args): def _expand_arg(model, arg): for i, child in enumerate(arg.children): if isinstance...
["tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters8-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters9-1]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters10-2]", "tests/test_models.py::TestVanillaMoneyField::te...
["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
1
47
16
1,032
0
0.6
1
0.75
1
0.328667
81.261
5,057
swe_smith::train::5065
swe_smith
train
5,065
bottlepy__bottle.a8dfef30.lm_rewrite__w9zynmjs
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
# Jinja2Template fails to load templates by name or file When using Jinja2Template with a template name or file path, the template fails to load properly. This issue occurs when trying to use templates from a lookup directory. ## To Reproduce I have a simple template structure: ``` views/ jinja2_simple.tpl jinj...
diff --git a/bottle.py b/bottle.py index 286b5bc..2eb5f9c 100755 --- a/bottle.py +++ b/bottle.py @@ -4159,15 +4159,23 @@ class CheetahTemplate(BaseTemplate): class Jinja2Template(BaseTemplate): def prepare(self, filters=None, tests=None, globals={}, **kwargs): from jinja2 import Environment, FunctionLoad...
["test/test_jinja2.py::TestJinja2Template::test_file", "test/test_jinja2.py::TestJinja2Template::test_inherit", "test/test_jinja2.py::TestJinja2Template::test_name"]
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
18
3
1,612
0
0.6
1
0.75
1
0.328667
81.261
5,058
swe_smith::train::27989
swe_smith
train
27,989
jsvine__pdfplumber.02ff4313.func_pm_remove_cond__rxnbwot1
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
Page object attributes missing after recent changes #### Description After a recent update, page objects are missing essential attributes like `top`, `bottom`, `text`, and color-related properties. This affects basic functionality like text extraction, cropping, and object manipulation. #### Steps/Code to Reproduce ...
diff --git a/pdfplumber/page.py b/pdfplumber/page.py index 71330d8..302cdc3 100644 --- a/pdfplumber/page.py +++ b/pdfplumber/page.py @@ -402,55 +402,12 @@ class Page(Container): if color_attr in attr: attr[color_attr], attr[pattern_attr] = normalize_color(attr[color_attr]) - if is...
["tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::test_load_with_custom_laparams", "tests/test_basics.py::Test::test_objects", "tests/test_basics.py::Test::test_outside_bbox", "tests/test_basics.py::Test::test_relative_crop", "tests/test_basics.py::Test::test_text_colors", "tests/test_ba...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_invalid_crops", "tests/test_basics.py::Test::test...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
43
84
1,111
0
0.6
1
0.75
1
0.3285
81.2605
5,059
swe_smith::train::45443
swe_smith
train
45,443
dask__dask.5f61e423.lm_rewrite__uwnbl49r
swesmith/dask__dask.5f61e423
dask/dask
python
null
Unexpected TypeError and AttributeError in `set_index` operations I've encountered some unexpected behavior when using the `set_index` function in Dask DataFrame operations. Specifically, I'm seeing `TypeError` and `AttributeError` exceptions being raised under certain conditions. Here's a breakdown of the issue: - W...
diff --git a/dask/dataframe/dask_expr/_shuffle.py b/dask/dataframe/dask_expr/_shuffle.py index 271f52a..b2ca996 100644 --- a/dask/dataframe/dask_expr/_shuffle.py +++ b/dask/dataframe/dask_expr/_shuffle.py @@ -771,29 +771,7 @@ class BaseSetIndexSortValues(Expr): _is_length_preserving = True def _divisions(se...
["dask/dataframe/tests/test_shuffle.py::test_set_index_general[disk-1]", "dask/dataframe/tests/test_shuffle.py::test_set_index_general[disk-4]", "dask/dataframe/tests/test_shuffle.py::test_set_index_general[disk-7]", "dask/dataframe/tests/test_shuffle.py::test_set_index_general[tasks-1]", "dask/dataframe/tests/test_shu...
["dask/dataframe/tests/test_shuffle.py::test_shuffle[disk]", "dask/dataframe/tests/test_shuffle.py::test_shuffle[tasks]", "dask/dataframe/tests/test_shuffle.py::test_default_partitions", "dask/dataframe/tests/test_shuffle.py::test_shuffle_npartitions[disk]", "dask/dataframe/tests/test_shuffle.py::test_shuffle_npartitio...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
24
58
1,490
0
0.6
1
0.75
1
0.328333
81.26
5,060
swe_smith::train::624
swe_smith
train
624
oauthlib__oauthlib.1fd52536.func_basic__sraq2j21
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Token validation logic inverted causing incorrect behavior #### Description The token validation logic appears to be inverted in several conditions, causing unexpected behavior when parsing OAuth2 token responses. Specifically: 1. Missing token type validation is triggered even when token_type is present 2. Scope ch...
diff --git a/oauthlib/oauth2/rfc6749/parameters.py b/oauthlib/oauth2/rfc6749/parameters.py index 6c55000..0714d8f 100644 --- a/oauthlib/oauth2/rfc6749/parameters.py +++ b/oauthlib/oauth2/rfc6749/parameters.py @@ -445,26 +445,22 @@ def parse_token_response(body, scope=None): def validate_token_parameters(params): -...
["tests/oauth2/rfc6749/clients/test_backend_application.py::BackendApplicationClientTest::test_parse_token_response", "tests/oauth2/rfc6749/clients/test_legacy_application.py::LegacyApplicationClientTest::test_parse_token_response", "tests/oauth2/rfc6749/clients/test_mobile_application.py::MobileApplicationClientTest::...
["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
12
8
1,730
0
0.6
1
0.75
1
0.328333
81.26
5,061
swe_smith::train::42654
swe_smith
train
42,654
python-jsonschema__jsonschema.93e0caa5.func_basic__uldokbq4
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Error relevance sorting returns wrong order #### Description The error relevance sorting function is returning errors in the wrong priority order. When validating JSON schemas, the most relevant/specific errors should be prioritized, but currently less specific errors are being returned as the "best match". #### Ste...
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 3dcd296..83803d3 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -408,13 +408,13 @@ def by_relevance(weak=WEAK_MATCHES, strong=STRONG_MATCHES): def relevance(error): validator = error.validator - return...
["jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_non_type_matching_sibling_errors", "jsonschema/tests/test_exceptions.py::TestBestMatch::test_anyOf_traversal_for_single_sibling_errors", "jsonschema/tests/test_exceptions.py::TestBestMatch::test_if_the_most_relevant_error_is_allOf_it_is_trav...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
14
17
1,689
0
0.6
1
0.75
1
0.328167
81.2595
5,062
swe_smith::train::37978
swe_smith
train
37,978
kayak__pypika.1c9646f0.lm_rewrite__mkxiyvxh
swesmith/kayak__pypika.1c9646f0
kayak/pypika
python
null
Join Functionality Fails with String Input Description It seems there's an issue with the `join` method when attempting to join using a string as the input. The method should handle various types of inputs, but currently, it raises a `ValueError` when a string is provided. This behavior is unexpected, as the method s...
diff --git a/pypika/queries.py b/pypika/queries.py index 42c7c45..e0a7247 100644 --- a/pypika/queries.py +++ b/pypika/queries.py @@ -1017,25 +1017,31 @@ class QueryBuilder(Selectable, Term): self._orderbys.append((field, kwargs.get("order"))) @builder - def join( - self, item: Union[Table,...
["pypika/tests/dialects/test_snowflake.py::QuoteTests::test_dont_use_double_quotes_on_joining_queries", "pypika/tests/test_formats.py::QuoteTests::test_no_quote_char_in_complex_query", "pypika/tests/test_formats.py::QuoteTests::test_replace_quote_char_in_complex_query", "pypika/tests/test_joins.py::SelectQueryJoinTests...
["pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_0__ridley_scott_jimi_hendrix_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_1__1_2_3_4_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_2__toInt64_1_toInt64_2_toInt64_3_toInt64_4_", "pypika/tests/clickhouse/test_array...
jyangballin/swesmith.x86_64.kayak_1776_pypika.1c9646f0
true
null
1
44
11
1,088
0
0.6
1
0.75
1
0.328
81.259
5,063
swe_smith::train::45549
swe_smith
train
45,549
alanjds__drf-nested-routers.6144169d.func_basic__ji6o974z
swesmith/alanjds__drf-nested-routers.6144169d
alanjds/drf-nested-routers
python
null
# NestedHyperlinkedRelatedField error handling is broken ## Description I noticed that the error handling in `NestedHyperlinkedRelatedField.to_internal_value()` is not working correctly. When trying to create a child resource using a nested viewset with a mixin, I'm getting an unexpected error. The issue appears to ...
diff --git a/rest_framework_nested/relations.py b/rest_framework_nested/relations.py index 8919b05..2a13cf3 100644 --- a/rest_framework_nested/relations.py +++ b/rest_framework_nested/relations.py @@ -89,14 +89,14 @@ class NestedHyperlinkedRelatedField(HyperlinkedRelatedField, Generic[T_Model]): try: ...
["tests/test_viewsets.py::TestNestedSimpleRouter::test_create_child_on_viewset_with_mixin"]
["tests/serializers/test_serializers.py::TestSerializers::test_custom", "tests/serializers/test_serializers.py::TestSerializers::test_default", "tests/serializers/test_serializers.py::TestSerializers::test_multi_level", "tests/serializers/test_serializers.py::TestSerializers::test_multi_level_parent_ref", "tests/serial...
jyangballin/swesmith.x86_64.alanjds_1776_drf-nested-routers.6144169d
true
null
1
8
1
1,808
0
0.6
1
0.75
1
0.328
81.259
5,064
swe_smith::train::8464
swe_smith
train
8,464
pyupio__safety.7654596b.combine_module__3tl5c9ji
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
**Scan command fails with TypeError when using --debug flag** I'm trying to use the `safety scan` command with the `--debug` flag, but it's failing with a TypeError. **To Reproduce** When running: ``` safety --debug scan ``` I get a TypeError that seems to be related to path handling. The error occurs when trying t...
diff --git a/safety/scan/decorators.py b/safety/scan/decorators.py index 72d7e4e..e72ff38 100644 --- a/safety/scan/decorators.py +++ b/safety/scan/decorators.py @@ -102,7 +102,7 @@ def scan_project_command_init(func): ctx.obj.project.git = git_data if not policy_file_path: - policy_file_p...
["tests/test_cli.py::TestSafetyCLI::test_debug_flag"]
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
2
54
1
887
0
0.6
1
0.75
1
0.327833
81.2585
5,065
swe_smith::train::9971
swe_smith
train
9,971
google__textfsm.c31b6007.combine_file__z6dpbaxw
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
ANSI escape sequence generation broken with case-sensitive SGR names #### Description The ANSI command generation function is now case-sensitive and produces invalid escape sequences. Previously, SGR names like 'RESET' and 'Green' worked correctly, but now they raise ValueError exceptions. #### Steps/Code to Reprodu...
diff --git a/textfsm/terminal.py b/textfsm/terminal.py index 32252a4..1775937 100755 --- a/textfsm/terminal.py +++ b/textfsm/terminal.py @@ -125,15 +125,11 @@ def _AnsiCmd(command_list): """ if not isinstance(command_list, list): raise ValueError('Invalid list: %s' % command_list) - # Checks that entries ar...
["tests/terminal_test.py::TerminalTest::testAnsiCmd", "tests/terminal_test.py::TerminalTest::testAnsiText", "tests/terminal_test.py::TerminalTest::testEncloseAnsi", "tests/terminal_test.py::TerminalTest::testIssue1", "tests/terminal_test.py::TerminalTest::testLineWrap", "tests/terminal_test.py::PagerTest::testPage", "t...
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.p...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
46
7
1,047
0
0.6
1
0.75
1
0.327833
81.2585
5,066
swe_smith::train::36717
swe_smith
train
36,717
lincolnloop__python-qrcode.456b01d4.lm_rewrite__8qrk4jfz
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QR code ASCII output is broken when using borders Description When trying to print a QR code in ASCII format with borders, the output is completely wrong. The issue appears to be in the `print_ascii` method of the `QRCode` class. Here's a simple reproduction script: ```python import qrcode import io # Create a QR ...
diff --git a/qrcode/main.py b/qrcode/main.py index 46116b5..de53380 100644 --- a/qrcode/main.py +++ b/qrcode/main.py @@ -294,41 +294,46 @@ class QRCode(Generic[GenericImage]): :param invert: invert the ASCII characters (solid <-> transparent) """ if out is None: + import sys ...
["qrcode/tests/test_qrcode.py::test_print_ascii_stdout", "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
55
2
867
0
0.6
1
0.75
1
0.327833
81.2585
5,067
swe_smith::train::23814
swe_smith
train
23,814
rustedpy__result.0b855e1e.pr_185
swesmith/rustedpy__result.0b855e1e
rustedpy/result
python
null
# Missing `inspect` and `inspect_err` methods in Result class ## Description The `inspect` and `inspect_err` methods are missing from both `Ok` and `Err` classes. These methods are supposed to allow calling a function with the contained value while returning the original result, but they're not available anymore. Wh...
diff --git a/src/result/result.py b/src/result/result.py index 8551239..83f1248 100644 --- a/src/result/result.py +++ b/src/result/result.py @@ -204,19 +204,6 @@ class Ok(Generic[T]): """ return self - def inspect(self, op: Callable[[T], Any]) -> Result[T, E]: - """ - Calls a functi...
["tests/test_result.py::test_inspect", "tests/test_result.py::test_inspect_err", "tests/test_result.py::test_inspect_regular_fn"]
["tests/test_result.py::test_ok_factories", "tests/test_result.py::test_err_factories", "tests/test_result.py::test_eq", "tests/test_result.py::test_hash", "tests/test_result.py::test_repr", "tests/test_result.py::test_ok_value", "tests/test_result.py::test_err_value", "tests/test_result.py::test_ok", "tests/test_resul...
jyangballin/swesmith.x86_64.rustedpy_1776_result.0b855e1e
true
null
1
28
3
1,406
0
0.6
1
0.75
1
0.327667
81.258
5,068
swe_smith::train::27883
swe_smith
train
27,883
jsvine__pdfplumber.02ff4313.func_pm_ctrl_shuffle__i8rn7hxd
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
WordExtractor initialization fails with AttributeError When creating a WordExtractor instance, the initialization process fails with an AttributeError because some attributes are being accessed before they are defined. #### Steps/Code to Reproduce ```python import pdfplumber from pdfplumber.utils.text import WordExt...
diff --git a/pdfplumber/utils/text.py b/pdfplumber/utils/text.py index 8edafa1..c7aea18 100644 --- a/pdfplumber/utils/text.py +++ b/pdfplumber/utils/text.py @@ -439,32 +439,12 @@ class WordExtractor: split_at_punctuation: Union[bool, str] = False, expand_ligatures: bool = True, ): - self.x...
["tests/test_basics.py::Test::test_outside_bbox", "tests/test_basics.py::Test::test_unicode_normalization", "tests/test_ca_warn_report.py::Test::test_parse", "tests/test_convert.py::Test::test_cli_text", "tests/test_dedupe_chars.py::Test::test_extra_attrs", "tests/test_dedupe_chars.py::Test::test_extract_table", "tests...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
51
58
945
0
0.6
1
0.75
1
0.3275
81.2575
5,069
swe_smith::train::40255
swe_smith
train
40,255
scanny__python-pptx.278b47b1.combine_file__xvumqda1
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
GraphicFrame.has_table property returns inverted boolean value #### Description The `has_table` property on GraphicFrame objects is returning the opposite of what it should. When a graphic frame contains a table, it returns `False`, and when it doesn't contain a table, it returns `True`. #### Steps/Code to Reproduce...
diff --git a/src/pptx/shapes/graphfrm.py b/src/pptx/shapes/graphfrm.py index c0ed2bb..50f490f 100644 --- a/src/pptx/shapes/graphfrm.py +++ b/src/pptx/shapes/graphfrm.py @@ -70,7 +70,7 @@ class GraphicFrame(BaseShape): When |True|, the table object can be accessed using the `.table` property. """ - ...
["tests/shapes/test_graphfrm.py::DescribeGraphicFrame::it_knows_whether_it_contains_a_table[http://schemas.openxmlformats.org/drawingml/2006/chart-False]", "tests/shapes/test_graphfrm.py::DescribeGraphicFrame::it_knows_whether_it_contains_a_table[http://schemas.openxmlformats.org/presentationml/2006/ole-False]", "tests...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
8
7
1,804
0
0.6
1
0.75
1
0.327333
81.257
5,070
swe_smith::train::25186
swe_smith
train
25,186
pylint-dev__astroid.b114f6b5.combine_module__ijh4titu
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Descriptor binding fails with single argument #### Description When calling `__get__` on a function descriptor with only one argument, the binding process incorrectly raises an `InferenceError` instead of properly handling the case. #### Steps/Code to Reproduce ```python import astroid code = ''' class A: pass def...
diff --git a/astroid/interpreter/_import/spec.py b/astroid/interpreter/_import/spec.py index e0c54d4..c5c73f2 100644 --- a/astroid/interpreter/_import/spec.py +++ b/astroid/interpreter/_import/spec.py @@ -386,46 +386,8 @@ def _find_spec_with_path( continue return finder_instance, mod_spec - #...
["tests/test_modutils.py::test_file_info_from_modpath__SixMetaPathImporter", "tests/test_modutils.py::test_find_setuptools_pep660_editable_install", "tests/test_object_model.py::FunctionModelTest::test_descriptor_error_regression", "tests/test_object_model.py::FunctionModelTest::test_descriptors_binding_invalid", "test...
["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
2
57
6
824
0
0.6
1
0.75
1
0.327333
81.257
5,071
swe_smith::train::22373
swe_smith
train
22,373
tweepy__tweepy.91a41c6e.func_basic__n7f6893j
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Bug Description It seems that the `Place.parse` method in the `tweepy.models` module is not functioning as expected. When attempting to retrieve geographic information using the `geo_id` method, the expected place details are not returned, leading to an `AttributeError`. This issue appears to be related to the han...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..5b59cf9 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -229,20 +229,20 @@ class Place(Model): def parse(cls, api, json): place = cls(api) for k, v in json.items(): - if k == 'bounding_box': + if k == 'c...
["tests/test_api.py::TweepyAPITests::testgeoapis"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
14
1
1,684
0
0.6
1
0.75
1
0.327333
81.257
5,072
swe_smith::train::42343
swe_smith
train
42,343
r1chardj0n3s__parse.30da9e4f.func_basic__3fmmp8ao
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
# findall() function broken in multiple ways **What happened**: The `findall()` function is not working correctly. It's failing in several ways: 1. It skips the first match in the string 2. It raises ValueError instead of StopIteration when no more matches are found 3. It returns None instead of Match objects when ev...
diff --git a/parse.py b/parse.py index 80242e1..5bb9e0a 100644 --- a/parse.py +++ b/parse.py @@ -916,15 +916,15 @@ class ResultIterator(object): return self def __next__(self): - m = self.parser._search_re.search(self.string, self.pos, self.endpos) + m = self.parser._search_re.search(self....
["README.rst::README.rst", "tests/test_findall.py::test_findall", "tests/test_findall.py::test_no_evaluate_result", "tests/test_findall.py::test_case_sensitivity"]
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "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...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
10
4
1,764
0
0.6
1
0.75
1
0.327333
81.257
5,073
swe_smith::train::31386
swe_smith
train
31,386
benoitc__gunicorn.bacbf8aa.combine_file__l4cy879n
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Arbiter initialization and shutdown behavior broken #### Description The Arbiter class seems to have some initialization issues that are causing problems with socket handling and process management. When creating an Arbiter instance, the systemd flag is being set incorrectly and the master process identification is g...
diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 646d684..921956f 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -58,22 +58,22 @@ class Arbiter: self.setup(app) self.pidfile = None - self.systemd = False + self.systemd = True # Bug: Changed from False to Tru...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
["tests/test_arbiter.py::test_arbiter_reexec_limit_parent", "tests/test_arbiter.py::test_arbiter_reexec_limit_child", "tests/test_arbiter.py::test_arbiter_calls_worker_exit", "tests/test_arbiter.py::test_arbiter_reap_workers", "tests/test_arbiter.py::test_env_vars_available_during_preload", "tests/test_config.py::test_...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
34
7
1,284
0
0.6
1
0.75
1
0.327333
81.257
5,074
swe_smith::train::7121
swe_smith
train
7,121
cantools__cantools.0c6a7871.combine_module__3bjiz1f4
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
CDD diagnostics database fails to load with "'int' object is not iterable" error #### Description When loading CDD files, the diagnostics database throws an error "'int' object is not iterable" during parsing. This affects all CDD file loading operations. #### Steps/Code to Reproduce ```python import cantools # Th...
diff --git a/src/cantools/database/diagnostics/database.py b/src/cantools/database/diagnostics/database.py index de312e8..164ffc0 100644 --- a/src/cantools/database/diagnostics/database.py +++ b/src/cantools/database/diagnostics/database.py @@ -28,7 +28,7 @@ class Database: """ - return self._dids +...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanTo...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
2
38
8
1,204
0
0.6
1
0.75
1
0.327333
81.257
5,075
swe_smith::train::10511
swe_smith
train
10,511
paramiko__paramiko.23f92003.func_basic__kyqbyj0p
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Channel opening fails with timeout condition reversed #### Description When opening SSH channels, the timeout logic appears to be inverted, causing channels to fail to open properly under certain conditions. #### Steps/Code to Reproduce ```python import paramiko # Create SSH client and connect client = paramiko.SS...
diff --git a/paramiko/transport.py b/paramiko/transport.py index f0fcb97..92ca5a0 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1049,69 +1049,34 @@ class Transport(threading.Thread, ClosingContextManager): max_packet_size=None, timeout=None, ): - """ - Request a...
["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_channel_timeout", "tests/test_clien...
["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
55
48
864
0
0.6
1
0.75
1
0.327333
81.257
5,076
swe_smith::train::31225
swe_smith
train
31,225
scrapy__scrapy.35212ec5.func_pm_class_rm_funcs__ick1kits
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
genspider command fails with AttributeError after recent changes #### Description The `scrapy genspider` command is broken and throws an AttributeError when trying to use various functionality like listing templates or checking for existing spiders. #### Steps/Code to Reproduce ```python # Try to list available spi...
diff --git a/scrapy/commands/genspider.py b/scrapy/commands/genspider.py index 6d4aec3..181eb5a 100644 --- a/scrapy/commands/genspider.py +++ b/scrapy/commands/genspider.py @@ -173,46 +173,6 @@ class Command(ScrapyCommand): print('Use "scrapy genspider --list" to see all available templates.') return ...
["tests/test_commands.py::GenspiderCommandTest::test_arguments", "tests/test_commands.py::GenspiderCommandTest::test_list", "tests/test_commands.py::GenspiderCommandTest::test_same_filename_as_existing_spider", "tests/test_commands.py::GenspiderCommandTest::test_same_filename_as_existing_spider_force", "tests/test_comm...
["tests/test_commands.py::CommandSettings::test_help_formatter", "tests/test_commands.py::CommandSettings::test_settings_json_string", "tests/test_commands.py::StartprojectTest::test_existing_project_dir", "tests/test_commands.py::StartprojectTest::test_startproject", "tests/test_commands.py::StartprojectTest::test_sta...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
1
42
11
1,124
0
0.6
1
0.75
1
0.327333
81.257
5,077
swe_smith::train::4533
swe_smith
train
4,533
pygments__pygments.27649ebb.func_pm_remove_wrapper__nzkl4ut4
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
ErbLexer get_tokens_unprocessed returns None instead of generator #### Description The ErbLexer's get_tokens_unprocessed method is returning None instead of yielding tokens, causing a TypeError when trying to iterate over the results. #### Steps/Code to Reproduce ```python from pygments.lexers.templates import ErbL...
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index e5adf34..9d02fcc 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -80,65 +80,6 @@ class ErbLexer(Lexer): tokens = self._block_re.split(text) tokens.reverse() state = idx = 0 - ...
["tests/test_basic_api.py::test_lexer_options[CssErbLexer]", "tests/test_basic_api.py::test_random_input[RhtmlLexer]", "tests/test_basic_api.py::test_random_input[ErbLexer]", "tests/test_basic_api.py::test_lexer_options[RhtmlLexer]", "tests/test_basic_api.py::test_lexer_options[XmlErbLexer]", "tests/test_basic_api.py::...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_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
59
12
783
0
0.6
1
0.75
1
0.327167
81.2565
5,078
swe_smith::train::6880
swe_smith
train
6,880
joke2k__faker.8b401a7d.lm_rewrite__qdu0izki
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
UniquenessException not raised as expected in successive faker fixture uses When using the `faker` pytest fixture, the expected behavior is that unique values generated by `faker.unique` should be cleared between test functions. However, it seems that the uniqueness constraint is not being reset properly, leading to u...
diff --git a/faker/contrib/pytest/plugin.py b/faker/contrib/pytest/plugin.py index dab476b..f1c2a2b 100644 --- a/faker/contrib/pytest/plugin.py +++ b/faker/contrib/pytest/plugin.py @@ -23,16 +23,19 @@ def _session_faker(request): @pytest.fixture() def faker(request): """Fixture that returns a seeded and suitable...
["tests/pytest/test_unique_clear.py::test_unique_clears"]
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
19
1
1,583
0
0.6
1
0.75
1
0.327167
81.2565
5,079
r2e_gym::train::46
r2e_gym
train
46
orange3__ef789ee61de847e26e297fae3d926f0867914e82
orange3
biolab/orange3
python
ef789ee61de847e26e297fae3d926f0867914e82
**Title:** Tests Fail Due to Missing `select_new_features` Attribute in `OWSelectAttributes` Widget **Description:** When running the test suite for the `OWSelectAttributes` widget, two tests fail because the widget lacks the `select_new_features` attribute. This causes `AttributeError` exceptions when the tests attem...
diff --git a/Orange/widgets/data/owselectcolumns.py b/Orange/widgets/data/owselectcolumns.py --- a/Orange/widgets/data/owselectcolumns.py +++ b/Orange/widgets/data/owselectcolumns.py @@ -1,5 +1,5 @@ from functools import partial -from typing import Optional +from typing import Optional, Dict, Tuple from AnyQt.QtWid...
diff --git a/Orange/widgets/data/tests/test_owselectcolumns.py b/Orange/widgets/data/tests/test_owselectcolumns.py --- a/Orange/widgets/data/tests/test_owselectcolumns.py +++ b/Orange/widgets/data/tests/test_owselectcolumns.py @@ -1,4 +1,5 @@ # pylint: disable=unsubscriptable-object +import unittest from unittest imp...
null
null
namanjain12/orange3_final:ef789ee61de847e26e297fae3d926f0867914e82
true
null
1
59
null
1,495
0
0.75
1
0.6375
1
0.445833
81.25625
5,080
swe_smith::train::45632
swe_smith
train
45,632
conan-io__conan.86f29e13.combine_module__en6yfvtp
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Issue: `Options` Class Fails to Handle Attribute Deletion After Freeze #### Problem Description It seems there's an issue with the `Options` class when attempting to delete an attribute after the `freeze()` method has been called. The deletion of attributes that were previously set appears to be causing unexpecte...
diff --git a/conan/internal/model/conf.py b/conan/internal/model/conf.py index 335d7c0..d9d3c43 100644 --- a/conan/internal/model/conf.py +++ b/conan/internal/model/conf.py @@ -643,12 +643,11 @@ class ConfDefinition: # When loading from profile file, latest line has priority conf = Conf() if ...
["test/unittests/model/options_test.py::TestOptions::test_freeze"]
["test/unittests/model/options_test.py::TestOptions::test_booleans", "test/unittests/model/options_test.py::TestOptions::test_invalid_value", "test/unittests/model/options_test.py::TestOptions::test_non_existing_option", "test/unittests/model/options_test.py::TestOptions::test_int", "test/unittests/model/options_test.p...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
18
1
1,602
0
0.6
1
0.75
1
0.327
81.256
5,081
swe_smith::train::47253
swe_smith
train
47,253
python-trio__trio.cfbbe2c1.lm_rewrite__76psm5s5
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
### Issue with `setsockopt` Method in Trio Sockets #### Summary I encountered an issue with the `setsockopt` method in Trio's socket implementation. The method seems to behave unexpectedly when certain parameters are provided, leading to a TypeError. #### Steps to Reproduce The problem can be reproduced with the foll...
diff --git a/src/trio/_socket.py b/src/trio/_socket.py index 259992b..66daf29 100644 --- a/src/trio/_socket.py +++ b/src/trio/_socket.py @@ -839,29 +839,19 @@ class _SocketType(SocketType): optlen: int, ) -> None: ... - def setsockopt( - self, - /, - level: int, - optname:...
["src/trio/_tests/test_socket.py::test_SocketType_setsockopt"]
["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
34
1
1,282
0
0.6
1
0.75
1
0.327
81.256
5,082
swe_smith::train::1159
swe_smith
train
1,159
jd__tenacity.0d40e76f.func_pm_ctrl_shuffle__d3jm9ipb
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
# Incorrect logging order in before_sleep_log function ## Description I've noticed an issue with the `before_sleep_log` function in the tenacity library. The function is logging information about retries before determining the verb and value to use in the log message. ## Steps to reproduce Here's a simple example t...
diff --git a/tenacity/before_sleep.py b/tenacity/before_sleep.py index 153edb7..a627555 100644 --- a/tenacity/before_sleep.py +++ b/tenacity/before_sleep.py @@ -44,6 +44,19 @@ def before_sleep_log( if retry_state.next_action is None: raise RuntimeError("log_it() called before next_action was set")...
["tests/test_tenacity.py::TestBeforeAfterAttempts::test_before_sleep_log_raises", "tests/test_tenacity.py::TestBeforeAfterAttempts::test_before_sleep_log_raises_with_exc_info", "tests/test_tenacity.py::TestBeforeAfterAttempts::test_before_sleep_log_returns", "tests/test_tenacity.py::TestBeforeAfterAttempts::test_before...
["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
27
4
1,420
0
0.6
1
0.75
1
0.326667
81.255
5,083
swe_smith::train::35096
swe_smith
train
35,096
django__daphne.32ac73e1.combine_file__rsm4pkd0
swesmith/django__daphne.32ac73e1
django/daphne
python
null
# Command line interface issues with Daphne server I've encountered several issues with the command line interface in Daphne that prevent it from working properly. ## Issue Description When trying to start the Daphne server with various command line options, it fails with TypeError exceptions. The server doesn't sta...
diff --git a/daphne/cli.py b/daphne/cli.py index a036821..e6a22d8 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::testCustomEndpoints", "tests/test_cli.py::TestCLIInterface::testMixedCLIEndpointCreation", "tests/test_cli.py::TestCLIInterface::testUnixSockets", "tests/test_cli.py::TestCLIInterface::test_custom_proxyhost", "tests/test_cli.py...
["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
32
9
1,320
0
0.6
1
0.75
1
0.326667
81.255
5,084
swe_smith::train::46721
swe_smith
train
46,721
python-trio__trio.cfbbe2c1.combine_module__9f149hp1
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
# KeyError raised when removing a key from WeakKeyIdentityDictionary ## Description I've encountered an issue with the `WeakKeyIdentityDictionary` class in Trio. When a key is removed from the dictionary, it raises a `KeyError` exception if the key is not present, instead of silently ignoring the missing key. ## MCV...
diff --git a/src/trio/_core/_entry_queue.py b/src/trio/_core/_entry_queue.py index 0691de3..8643ee3 100644 --- a/src/trio/_core/_entry_queue.py +++ b/src/trio/_core/_entry_queue.py @@ -89,11 +89,14 @@ class EntryQueue: # being queued while we iterate, and to do a bounded amount of work on # each pass:...
["src/trio/_core/_tests/test_ki.py::test_weak_key_identity_dict_remove_callback_keyerror", "src/trio/_core/_tests/test_run.py::test_TrioToken_run_sync_soon_idempotent_requeue", "src/trio/_core/_tests/test_run.py::test_TrioToken_run_sync_soon_threaded_stress_test", "src/trio/_core/_tests/test_run.py::test_TrioToken_run_...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
2
15
4
1,660
0
0.6
1
0.75
1
0.326667
81.255
5,085
swe_smith::train::830
swe_smith
train
830
oauthlib__oauthlib.1fd52536.func_pm_remove_cond__s259zj7t
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Authorization code validation removes required error checks #### Description The authorization code grant validation is not properly enforcing required parameters and validation rules. Several critical checks have been removed that should raise appropriate OAuth2 errors when invalid requests are made. #### Steps/Cod...
diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py index 09dc619..b7b5bf8 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py +++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py @@ -349,11 +349,6 @@ class Auth...
["tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_missing_client_id", "tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_unsupported_response_type", "tests/oauth2/rfc6749/grant_types/test_authorization_code.py::AuthorizationCodeGrantTest::test_pkce_wrong_met...
["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
13
9
1,699
0
0.6
1
0.75
1
0.3265
81.2545
5,086
swe_smith::train::24732
swe_smith
train
24,732
marshmallow-code__marshmallow.9716fc62.func_basic__ld5frdqi
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Error merging behavior changed - validation errors not being properly accumulated #### Description When validation errors occur, they're not being properly merged and accumulated. The error merging logic seems to have been altered, causing validation errors to be lost or not properly combined. #### Steps/Code to Rep...
diff --git a/src/marshmallow/error_store.py b/src/marshmallow/error_store.py index 72b7037..37e4026 100644 --- a/src/marshmallow/error_store.py +++ b/src/marshmallow/error_store.py @@ -32,29 +32,29 @@ def merge_errors(errors1, errors2): parameter of :exc:`marshmallow.exceptions.ValidationError`. """ if n...
["tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorated_processor_returning_none[raise]", "tests/test_decorators.py::TestValidatesDecorator::test_validates", "tests/test_decorat...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_single", "tests/test_decorators.py::TestPassOriginal::test_pass_original_many", "tests/test_decorators.py::test_decorated_processor_...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
26
185
1,439
0
0.6
1
0.75
1
0.3265
81.2545
5,087
swe_smith::train::31785
swe_smith
train
31,785
davidhalter__parso.338a5760.combine_file__f2swz0ds
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Multiple bugs in Python syntax error detection ### Problem There are several issues with the Python syntax error detection in the `errors.py` module: 1. The `_is_future_import` function is incorrectly checking for future imports. It's returning the opposite of what it should (returning True when it's not a future im...
diff --git a/parso/python/errors.py b/parso/python/errors.py index 09c5047..dddd4de 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -136,12 +136,10 @@ def _get_comprehension_type(atom): def _is_future_import(import_from): - # It looks like a __future__ import that is relative is still a futu...
["parso/__init__.py::parso", "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...
["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_used_update[False-False]", "...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
22
68
1,518
0
0.6
1
0.75
1
0.326333
81.254
5,088
swe_smith::train::5062
swe_smith
train
5,062
bottlepy__bottle.a8dfef30.lm_rewrite__tmiyzzg4
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
### Unexpected Behavior with Header Handling in Bottle **Description** I've encountered an issue with how headers are being processed in the latest version of Bottle. It seems that the handling of headers has changed, leading to unexpected behavior when setting headers in certain scenarios. **Steps to Reproduce** 1...
diff --git a/bottle.py b/bottle.py index 286b5bc..750d96a 100755 --- a/bottle.py +++ b/bottle.py @@ -1586,10 +1586,14 @@ class BaseRequest(object): def _hkey(key): - if '\n' in key or '\r' in key or '\0' in key: - raise ValueError("Header names must not contain control characters: %r" % key) - return ...
["test/test_environ.py::TestResponse::test_constructor_headerlist", "test/test_environ.py::TestResponse::test_prevent_control_characters_in_headers", "test/test_mdict.py::TestMultiDict::test_isheader", "test/test_mount.py::TestAppMounting::test_mount_json_bug", "test/test_mount.py::TestAppMounting::test_mount_wsgi_ctyp...
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
12
8
1,716
0
0.6
1
0.75
1
0.326
81.253
5,089
swe_smith::train::36420
swe_smith
train
36,420
facelessuser__soupsieve.a8080d97.lm_rewrite__niz2h3l3
swesmith/facelessuser__soupsieve.a8080d97
facelessuser/soupsieve
python
null
### Description It seems there's an issue with attribute selection in the latest update. When attempting to select elements by their attributes, an `AttributeError` is raised. This behavior is unexpected and breaks the functionality of selecting elements based on their attributes. ### Steps/Code to Reproduce Here's ...
diff --git a/soupsieve/css_match.py b/soupsieve/css_match.py index e52e42d..474c31a 100644 --- a/soupsieve/css_match.py +++ b/soupsieve/css_match.py @@ -325,27 +325,21 @@ class _DocumentNav: return str(value) @classmethod - def get_attribute_by_name( - cls, - el: bs4.Tag, - name:...
["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_api.py::TestSoupSieve::test_filter_list", "test...
["tests/test_api.py::TestSoupSieve::test_cache", "tests/test_api.py::TestSoupSieve::test_copy_pickle", "tests/test_api.py::TestSoupSieve::test_escape_ctrl", "tests/test_api.py::TestSoupSieve::test_escape_hyphen", "tests/test_api.py::TestSoupSieve::test_escape_null", "tests/test_api.py::TestSoupSieve::test_escape_number...
jyangballin/swesmith.x86_64.facelessuser_1776_soupsieve.a8080d97
true
null
1
32
64
1,316
0
0.6
1
0.75
1
0.326
81.253
5,090
swe_smith::train::32754
swe_smith
train
32,754
pydantic__pydantic.acb0f10f.lm_rewrite__2hrd936b
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
JSON schema generation fails with RecursionError for annotated types #### Description When generating JSON schemas for certain annotated types using `TypeAdapter`, a `RecursionError` occurs due to infinite recursion in the schema generation process. #### Steps/Code to Reproduce ```python from typing import Annotate...
diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py index 9ec8a61..3b15d16 100644 --- a/pydantic/_internal/_generate_schema.py +++ b/pydantic/_internal/_generate_schema.py @@ -2081,18 +2081,24 @@ class GenerateSchema: pydantic_js_annotation_functions: list[GetJsonSchema...
["tests/test_pipeline.py::test_json_schema[Annotated-expected_val_schema0-expected_ser_schema0]", "tests/test_pipeline.py::test_json_schema[Annotated-expected_val_schema1-expected_ser_schema1]", "tests/test_pipeline.py::test_json_schema[Annotated-expected_val_schema2-expected_ser_schema2]", "tests/test_pipeline.py::tes...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
30
4
1,355
0
0.6
1
0.75
1
0.325833
81.2525
5,091
swe_smith::train::9961
swe_smith
train
9,961
google__textfsm.c31b6007.combine_file__m8q9nshl
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
CliTable initialization fails after recent changes #### Description After some recent changes, creating a CliTable instance now raises a TypeError. The error occurs during initialization and affects basic functionality. #### Steps/Code to Reproduce ```python import textfsm.clitable as clitable # This should work b...
diff --git a/textfsm/clitable.py b/textfsm/clitable.py index c7ad7a7..7856c52 100755 --- a/textfsm/clitable.py +++ b/textfsm/clitable.py @@ -77,10 +77,6 @@ class IndexTable(object): if hasattr(self, '_index_handle'): self._index_handle.close() - def __len__(self): - """Returns number of rows in table....
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.p...
["tests/terminal_test.py::TerminalTest::testAnsiCmd", "tests/terminal_test.py::TerminalTest::testAnsiText", "tests/terminal_test.py::TerminalTest::testEncloseAnsi", "tests/terminal_test.py::TerminalTest::testIssue1", "tests/terminal_test.py::TerminalTest::testLineWrap", "tests/terminal_test.py::TerminalTest::testStripA...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
55
17
854
0
0.6
1
0.75
1
0.325667
81.252
5,092
swe_smith::train::49148
swe_smith
train
49,148
mozilla__bleach.73871d76.combine_file__ru51hdpp
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
URL parsing broken for empty scheme arguments #### Description URL parsing is failing when empty string schemes are passed to urlparse functions. The issue appears to be related to argument type coercion logic that incorrectly handles empty string cases. #### Steps/Code to Reproduce ```python from bleach._vendor.pa...
diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py index ac6e7a9..e75556a 100644 --- a/bleach/_vendor/parse.py +++ b/bleach/_vendor/parse.py @@ -110,18 +110,11 @@ def _decode_args(args, encoding=_implicit_encoding, return tuple(x.decode(encoding, errors) if x else '' for x in args) def _coerce_args(...
["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::test_attributes_wildcard", "tests/test_clean.p...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
32
25
1,314
0
0.6
1
0.75
1
0.325667
81.252
5,093
swe_smith::train::7738
swe_smith
train
7,738
cantools__cantools.0c6a7871.func_basic__sk9cvud7
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
SYM file parsing broken - TypeError when loading signal data #### Description When loading SYM files, the parser is throwing a TypeError about unsupported operand types for addition with 'NoneType' and 'int'. This affects multiple SYM file operations including loading, dumping, and code generation. #### Steps/Code t...
diff --git a/src/cantools/database/can/formats/sym.py b/src/cantools/database/can/formats/sym.py index 4bdc121..efbcebf 100644 --- a/src/cantools/database/can/formats/sym.py +++ b/src/cantools/database/can/formats/sym.py @@ -448,32 +448,35 @@ def _load_message_signal(tokens, signals, ...
["tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_sym", "tests/test_database.py::CanToolsDatabaseTest::test_empty_enum_6_0_sym", "tests/test_database.py::CanToolsDatabaseTest::test_issue_138", "tests/test_database.py::CanToolsDatabaseTest::test_jopp_6_0_sym", "tests/test_database.py::CanTool...
["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
37
15
1,213
0
0.6
1
0.75
1
0.3255
81.2515
5,094
swe_smith::train::19504
swe_smith
train
19,504
seperman__deepdiff.ed252022.lm_rewrite__c11gc40b
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
# TreeResult.__getitem__ behavior changed, breaking custom operators ### Problem I'm using DeepDiff with custom operators and noticed that my code is now failing. After investigating, I found that the `TreeResult.__getitem__` method behavior has changed. Previously, when accessing a key that didn't exist in the TreeR...
diff --git a/deepdiff/model.py b/deepdiff/model.py index f5e5a4d..be513c1 100644 --- a/deepdiff/model.py +++ b/deepdiff/model.py @@ -83,10 +83,22 @@ class TreeResult(ResultDict): del self['iterable_item_added'] def __getitem__(self, item): - if item not in self: - self[item] = SetO...
["tests/test_operators.py::TestOperators::test_custom_operators_prevent_default", "tests/test_operators.py::TestOperators::test_custom_operators_not_prevent_default", "tests/test_operators.py::TestOperators::test_custom_operators_should_not_equal"]
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
20
3
1,553
0
0.6
1
0.75
1
0.3255
81.2515
5,095
swe_smith::train::35512
swe_smith
train
35,512
stanfordnlp__dspy.651a4c71.func_pm_ctrl_shuffle__54e423zy
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# ReAct module fails with UnboundLocalError when executing tools I'm encountering an issue with the ReAct module in DSPy. When trying to use it for tool calling, it crashes with an UnboundLocalError. ## Description The ReAct module is failing with an `UnboundLocalError: cannot access local variable 'max_iters' befor...
diff --git a/dspy/predict/react.py b/dspy/predict/react.py index 4b369c0..d4adf99 100644 --- a/dspy/predict/react.py +++ b/dspy/predict/react.py @@ -74,8 +74,6 @@ class ReAct(Module): return adapter.format_user_message_content(trajectory_signature, trajectory) def forward(self, **input_args): - t...
["tests/predict/test_react.py::test_tool_calling_with_pydantic_args", "tests/predict/test_react.py::test_tool_calling_without_typehint", "tests/predict/test_react.py::test_trajectory_truncation", "tests/predict/test_react.py::test_error_retry"]
["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
7
4
1,813
0
0.6
1
0.75
1
0.3255
81.2515
5,096
swe_smith::train::26433
swe_smith
train
26,433
pylint-dev__astroid.b114f6b5.func_pm_remove_cond__m3m6ttkb
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Binary operations return empty methods list causing inference failures #### Description Binary operations are not being inferred correctly, causing various inference operations to fail. When performing binary operations like subtraction, string formatting with `%`, or other binary operators, the inference system retu...
diff --git a/astroid/nodes/_base_nodes.py b/astroid/nodes/_base_nodes.py index 65b703d..5dcb14e 100644 --- a/astroid/nodes/_base_nodes.py +++ b/astroid/nodes/_base_nodes.py @@ -584,43 +584,7 @@ class OperatorNode(NodeNG): from astroid import helpers # pylint: disable=import-outside-toplevel op = bi...
["tests/brain/test_attr.py::AttrsTest::test_attr_transform", "tests/brain/test_brain.py::TypingBrain::test_namedtuple_can_correctly_access_methods", "tests/brain/test_brain.py::TestFunctoolsPartial::test_inferred_partial_function_calls", "tests/brain/test_builtin.py::TestStringNodes::test_string_format_in_dataclass_pyl...
["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
36
126
1,232
0
0.6
1
0.75
1
0.325333
81.251
5,097
r2e_gym::train::4637
r2e_gym
train
4,637
numpy__23bc50db7b5d17758cb0a1ce82c3d2fc07164306
numpy
numpy/numpy
python
23bc50db7b5d17758cb0a1ce82c3d2fc07164306
**Title:** `np.flip` Raises Errors When Using Multiple Axes or `axis=None` **Description:** Using `np.flip` with `axis=None` or by providing multiple axes results in unexpected errors. This behavior limits the flexibility of the `flip` function when attempting to reverse elements across all dimensions or multiple spec...
diff --git a/doc/release/1.15.0-notes.rst b/doc/release/1.15.0-notes.rst --- a/doc/release/1.15.0-notes.rst +++ b/doc/release/1.15.0-notes.rst @@ -122,6 +122,11 @@ Improvements ============ +``np.flip`` can operate over multiple axes +------------------------------------------ +``np.flip`` now accepts accepts None,...
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -104,9 +104,10 @@ class TestFlip(object): def test_axes(self): - assert_raises(ValueError, np.flip, np.ones(4), axis=1) - ...
null
null
namanjain12/numpy_final:23bc50db7b5d17758cb0a1ce82c3d2fc07164306
true
null
2
57
null
1,524
0
0.75
1
0.6375
1
0.444
81.25075
5,098
swe_smith::train::9054
swe_smith
train
9,054
pyupio__safety.7654596b.lm_rewrite__dfz3ahht
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
# Bug: fetch_database_file doesn't respect ecosystem parameter I found a bug in the `fetch_database_file` function where it doesn't respect the ecosystem parameter when constructing the file path. ## Reproduction Here's a minimal example to reproduce the issue: ```python from safety.safety import fetch_database_fil...
diff --git a/safety/safety.py b/safety/safety.py index 7bb6ad7..d12f4e2 100644 --- a/safety/safety.py +++ b/safety/safety.py @@ -268,7 +268,8 @@ def post_results(session: requests.Session, safety_json: str, policy_file: str) return {} -def fetch_database_file(path: str, db_name: str, cached: int = 0, ecosy...
["tests/test_safety.py::TestSafety::test_get_packages_licenses_with_invalid_db_file"]
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
31
1
1,330
0
0.6
1
0.75
1
0.325
81.25
5,099
swe_smith::train::8073
swe_smith
train
8,073
cantools__cantools.0c6a7871.func_pm_remove_assign__mxkcih5i
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML loader fails with "name 'selector_signal' is not defined" error When loading ARXML files containing multiplexed PDUs, the system loader crashes with a NameError indicating that `selector_signal` is not defined. This affects both AUTOSAR 3 and 4 format files. #### Steps/Code to Reproduce ```python import cantoo...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..548cdb4 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -1134,15 +1134,6 @@ class System...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_database.py::CanToolsDataba...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
37
12
1,209
0
0.6
1
0.75
1
0.324833
81.2495