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
4,000
swe_smith::train::45428
swe_smith
train
45,428
dask__dask.5f61e423.lm_rewrite__l4fljye8
swesmith/dask__dask.5f61e423
dask/dask
python
null
### Issue: Unexpected Behavior in `inline_functions` with Non-Hashable Callables #### Description I've encountered an issue with the `inline_functions` method in the Dask optimization module. When attempting to inline functions, the method seems to mishandle non-hashable callables, leading to unexpected behavior. Thi...
diff --git a/dask/optimization.py b/dask/optimization.py index 4e65fe7..7892cd5 100644 --- a/dask/optimization.py +++ b/dask/optimization.py @@ -263,46 +263,46 @@ def inline(dsk, keys=None, inline_constants=True, dependencies=None): >>> inline(d, keys='y', inline_constants=False) # doctest: +ELLIPSIS {'x': 1,...
["dask/tests/test_optimization.py::test_inline", "dask/tests/test_optimization.py::test_inline_functions", "dask/tests/test_optimization.py::test_inline_ignores_curries_and_partials", "dask/tests/test_optimization.py::test_inline_functions_non_hashable", "dask/tests/test_optimization.py::test_inline_traverses_lists", "...
["dask/tests/test_optimization.py::test_cull", "dask/tests/test_optimization.py::test_fuse", "dask/tests/test_optimization.py::test_fuse_keys", "dask/tests/test_optimization.py::test_donot_substitute_same_key_multiple_times", "dask/tests/test_optimization.py::test_inline_doesnt_shrink_fast_functions_at_top", "dask/test...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
74
7
1,461
0
0.6
1
0.75
1
0.490167
81.7455
4,001
r2e_gym::train::5208
r2e_gym
train
5,208
pyramid__cf46a12292cf15303d68d27c6ba4155ecc2b4586
pyramid
pylons/pyramid
python
cf46a12292cf15303d68d27c6ba4155ecc2b4586
**Title:** `UnencryptedCookieSessionFactoryConfig` Fails to Accept `signed_serialize` and `signed_deserialize` Parameters **Description:** When attempting to configure `UnencryptedCookieSessionFactoryConfig` with custom `signed_serialize` and `signed_deserialize` functions, a `TypeError` is raised indicating that thes...
diff --git a/pyramid/session.py b/pyramid/session.py --- a/pyramid/session.py +++ b/pyramid/session.py @@ -33,6 +33,53 @@ accessed.__doc__ = wrapped.__doc__ return accessed +def signed_serialize(data, secret): + """ Serialize any pickleable structure (``data``) and sign it + using the ``secret`` (must...
diff --git a/pyramid/tests/test_session.py b/pyramid/tests/test_session.py --- a/pyramid/tests/test_session.py +++ b/pyramid/tests/test_session.py @@ -205,6 +205,48 @@ self.assertTrue(token) self.assertTrue('_csrft_' in session) + def test_serialize_option(self): + from pyramid.response im...
null
null
namanjain12/pyramid_final:cf46a12292cf15303d68d27c6ba4155ecc2b4586
true
null
1
106
null
1,532
0
0.75
1
0.6375
1
0.608667
81.74475
4,002
swe_smith::train::44491
swe_smith
train
44,491
pydata__patsy.a5d16484.lm_rewrite__6yyb39uc
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
### Description There seems to be an issue with parsing formulas when using additional operators in the `patsy` library. Specifically, when attempting to parse formulas with extra operators, an `IndexError` is raised, indicating a problem with the handling of the operator stack. ### Expected Behavior Formulas with a...
diff --git a/patsy/infix_parser.py b/patsy/infix_parser.py index 6c127b5..b93795e 100644 --- a/patsy/infix_parser.py +++ b/patsy/infix_parser.py @@ -207,50 +207,65 @@ def _read_op_context(token, c): def infix_parse(tokens, operators, atomic_types, trace=False): - token_source = iter(tokens) - + """Parse an i...
["patsy/desc.py::test_eval_formula_error_reporting", "patsy/parse_formula.py::test_parse_errors", "patsy/parse_formula.py::test_parse_extra_op"]
["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
81
3
1,318
0
0.6
1
0.75
1
0.489667
81.744
4,003
swe_smith::train::24461
swe_smith
train
24,461
sunpy__sunpy.f8edfd5c.combine_module__151n46xf
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
NameError in BasicRegistrationFactory when registering widgets #### Description When trying to register widgets with the BasicRegistrationFactory, a `NameError: name '_classmethod' is not defined` occurs. This happens because the variable `_classmethod` is being referenced but not defined in the current scope. #### ...
diff --git a/sunpy/util/datatype_factory_base.py b/sunpy/util/datatype_factory_base.py index 6c132c0..119f2c9 100644 --- a/sunpy/util/datatype_factory_base.py +++ b/sunpy/util/datatype_factory_base.py @@ -123,9 +123,6 @@ class BasicRegistrationFactory: found = False for vfunc_str in self.valid...
["sunpy/util/tests/test_datatype_factory_base.py::test_default_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_no_default_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_with_external_registry", "sunpy/util/tests/test_datatype_factory_base.py::test_multiple_match_factory", "sunpy/util/te...
["sunpy/util/tests/test_datatype_factory_base.py::test_validation_fun_not_callable", "sunpy/util/tests/test_sysinfo.py::test_find_dependencies", "sunpy/util/tests/test_sysinfo.py::test_missing_dependencies_by_extra", "sunpy/util/tests/test_sysinfo.py::test_resolve_requirement_versions", "sunpy/util/tests/test_sysinfo.p...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
95
6
1,038
0
0.6
1
0.75
1
0.489667
81.744
4,004
swe_smith::train::49408
swe_smith
train
49,408
mozilla__bleach.73871d76.func_pm_class_shuffle_funcs__55wkiu35
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
NameError in html5parser after method reorganization #### Description After recent changes to the html5parser module, there are NameError exceptions being raised when processing HTML content. The errors indicate that certain method names like `startTagTr`, `startTagTableCell`, and others are not defined in their expe...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..7f69e29 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -2025,6 +2025,29 @@ def getPhases(debug): # http://www.whatwg.org/specs/web-apps/current-work/#...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["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
93
185
1,076
0
0.6
1
0.75
1
0.489333
81.743
4,005
swe_smith::train::2783
swe_smith
train
2,783
cknd__stackprinter.219fcc52.lm_rewrite__u01sogmm
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
# Bug: trim_source function breaks stackprinter formatting ## Bug summary After recent changes to the `trim_source` function in `stackprinter/utils.py`, the exception and frame formatting functionality is broken. The function now expects different input parameters and returns a string instead of an OrderedDict, causi...
diff --git a/stackprinter/utils.py b/stackprinter/utils.py index bb5968b..32bd3c2 100644 --- a/stackprinter/utils.py +++ b/stackprinter/utils.py @@ -47,39 +47,38 @@ def trim_source(source_map, context): get part of a source listing, with extraneous indentation removed """ - indent_type = None - min_in...
["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting"]
["tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
65
2
1,630
0
0.6
1
0.75
1
0.488333
81.74
4,006
swe_smith::train::50161
swe_smith
train
50,161
facebookresearch__fvcore.a491d5b9.lm_rewrite__ygjigdm3
swesmith/facebookresearch__fvcore.a491d5b9
facebookresearch/fvcore
python
null
# MultiStepParamScheduler behavior changed when using default milestones I've encountered an issue with the `MultiStepParamScheduler` class in fvcore. The scheduler is not working correctly when using the default milestone generation. ## Reproduction Consider this simple example: ```python from fvcore.common.param_...
diff --git a/fvcore/common/param_scheduler.py b/fvcore/common/param_scheduler.py index 9042981..cddf082 100644 --- a/fvcore/common/param_scheduler.py +++ b/fvcore/common/param_scheduler.py @@ -168,12 +168,8 @@ class MultiStepParamScheduler(ParamScheduler): plus one. """ - def __init__( - self, - ...
["tests/param_scheduler/test_scheduler_multi_step.py::TestMultiStepParamScheduler::test_default_config", "tests/param_scheduler/test_scheduler_multi_step.py::TestMultiStepParamScheduler::test_invalid_config", "tests/param_scheduler/test_scheduler_multi_step.py::TestMultiStepParamScheduler::test_optional_args"]
["io_tests/test_file_io.py::TestNativeIO::test_bad_args", "io_tests/test_file_io.py::TestNativeIO::test_copy", "io_tests/test_file_io.py::TestNativeIO::test_exists", "io_tests/test_file_io.py::TestNativeIO::test_get_local_path", "io_tests/test_file_io.py::TestNativeIO::test_isdir", "io_tests/test_file_io.py::TestNative...
jyangballin/swesmith.x86_64.facebookresearch_1776_fvcore.a491d5b9
true
null
1
71
3
1,510
0
0.6
1
0.75
1
0.488333
81.74
4,007
swe_smith::train::9394
swe_smith
train
9,394
jaraco__inflect.c079a96a.lm_rewrite__9qw8gbnx
swesmith/jaraco__inflect.c079a96a
jaraco/inflect
python
null
# Inflect function doesn't handle variable names in string substitution I'm using the inflect library to handle pluralization in my application, and I noticed an issue with the `inflect` function when using variable names directly in the string. For example, this works fine: ```python p = inflect.engine() p.inflect("...
diff --git a/inflect/__init__.py b/inflect/__init__.py index 3eef486..b7e7ced 100644 --- a/inflect/__init__.py +++ b/inflect/__init__.py @@ -2276,36 +2276,72 @@ class engine: # ex: p.inflect("I plural(see)") instead of p.inflect("I plural('see')") raise NameError(f"name '{obj.id}' is not defined") -...
["tests/test_inflections.py::test_NameError_in_strings"]
["inflect/__init__.py::inflect.bysize", "inflect/__init__.py::inflect.engine._handle_long_compounds", "inflect/__init__.py::inflect.engine._handle_prepositional_phrase", "inflect/__init__.py::inflect.engine.compare", "inflect/__init__.py::inflect.engine.ordinal", "inflect/__init__.py::inflect.engine.singular_noun", "in...
jyangballin/swesmith.x86_64.jaraco_1776_inflect.c079a96a
true
null
1
90
1
1,130
0
0.6
1
0.75
1
0.488333
81.74
4,008
swe_smith::train::20983
swe_smith
train
20,983
tobymao__sqlglot.036601ba.func_pm_remove_cond__mn4nvcgc
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in decorrelate function when processing subqueries #### Description When running SQL optimization with subquery unnesting, the `decorrelate` function in `unnest_subqueries.py` throws an `UnboundLocalError` for the variable `key`. This happens because the code references `key` in the `keys.append((ke...
diff --git a/sqlglot/optimizer/unnest_subqueries.py b/sqlglot/optimizer/unnest_subqueries.py index dcb2f59..aa6d3e8 100644 --- a/sqlglot/optimizer/unnest_subqueries.py +++ b/sqlglot/optimizer/unnest_subqueries.py @@ -137,15 +137,6 @@ def decorrelate(select, parent_select, external_columns, next_alias_name): if...
["tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch", "tests/test_optimizer.py::TestOptimizer::test_unnest_subqueries"]
["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
81
4
1,308
0
0.6
1
0.75
1
0.488
81.739
4,009
swe_smith::train::24610
swe_smith
train
24,610
marshmallow-code__marshmallow.9716fc62.combine_module__wv2v45s0
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Validation logic inverted in multiple validators #### Description Several validators are behaving opposite to their expected behavior. The OneOf validator is rejecting valid values that should be accepted, and the Predicate validator is accepting values that should be rejected. #### Steps/Code to Reproduce ```pytho...
diff --git a/src/marshmallow/class_registry.py b/src/marshmallow/class_registry.py index d41b112..b6b2e31 100644 --- a/src/marshmallow/class_registry.py +++ b/src/marshmallow/class_registry.py @@ -27,45 +27,20 @@ _registry = {} # type: dict[str, list[SchemaType]] def register(classname: str, cls: SchemaType) -> N...
["tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors", "tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_raises_with_errors_with_multiple_validators", "tests/test_registry.py::test_serializer_class_registry_register_same_classname_different_mo...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
2
68
21
1,567
0
0.6
1
0.75
1
0.487833
81.7385
4,010
swe_smith::train::45240
swe_smith
train
45,240
dask__dask.5f61e423.combine_module__m4dfi7kz
swesmith/dask__dask.5f61e423
dask/dask
python
null
FromMapProjectable class inheritance broken after refactoring #### Description The `FromMapProjectable` class no longer inherits from `FromMap`, causing initialization errors when trying to create instances. #### Steps/Code to Reproduce ```python import dask.dataframe as dd import pandas as pd import tempfile impor...
diff --git a/dask/dataframe/dask_expr/io/io.py b/dask/dataframe/dask_expr/io/io.py index ab41615..3dd80d7 100644 --- a/dask/dataframe/dask_expr/io/io.py +++ b/dask/dataframe/dask_expr/io/io.py @@ -305,7 +305,7 @@ class FromMap(PartitionsFiltered, BlockwiseIO): ) -class FromMapProjectable(FromMap): +class F...
["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>-<lambda>3]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-...
["dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>0]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_io_fusion[parquet]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_parquet_complex_filters", "dask/dataframe/dask_expr/io/tests/test_io.py::test_combine_similar[parquet-read_parq...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
2
87
82
1,187
0
0.6
1
0.75
1
0.487833
81.7385
4,011
swe_smith::train::29645
swe_smith
train
29,645
cookiecutter__cookiecutter.b4451231.combine_file__mb7l10ou
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
User choice prompts broken after recent changes #### Description The user choice prompts are not working correctly. When trying to select from multiple options, the prompt format has changed and no longer displays the available choices properly. #### Steps/Code to Reproduce ```python from cookiecutter.prompt import...
diff --git a/cookiecutter/prompt.py b/cookiecutter/prompt.py index f17112f..6ea341e 100644 --- a/cookiecutter/prompt.py +++ b/cookiecutter/prompt.py @@ -88,7 +88,8 @@ def read_repo_password(question: str) -> str: return Prompt.ask(question, password=True) -def read_user_choice(var_name: str, options: list, pro...
["tests/test_cli.py::test_cli_error_on_existing_output_directory", "tests/test_cli.py::test_cli", "tests/test_cli.py::test_cli_verbose", "tests/test_cli.py::test_cli_overwrite_if_exists_when_output_dir_does_not_exist[-f]", "tests/test_cli.py::test_cli_overwrite_if_exists_when_output_dir_does_not_exist[--overwrite-if-ex...
["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl...
jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231
true
null
1
94
61
1,044
0
0.6
1
0.75
1
0.487333
81.737
4,012
swe_smith::train::39624
swe_smith
train
39,624
pallets__jinja.ada0a9a6.lm_rewrite__vrvrzhd5
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Refactor `visit_FromImport` method in `CodeGenerator` class Description The recent changes in the `visit_FromImport` method within the `CodeGenerator` class have introduced some unexpected behavior when handling imports in templates. Specifically, the handling of aliased imports and the management of context variable...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..41b8069 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1123,56 +1123,42 @@ class CodeGenerator(NodeVisitor): if frame.toplevel and not node.target.startswith("_"): self.writeline(f"context.exported_va...
["tests/test_async.py::TestAsyncImports::test_context_imports", "tests/test_async.py::TestAsyncImports::test_trailing_comma", "tests/test_async.py::TestAsyncImports::test_from_import_with_globals", "tests/test_core_tags.py::TestMacros::test_include", "tests/test_imports.py::TestImports::test_context_imports", "tests/te...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
74
9
1,443
0
0.6
1
0.75
1
0.487167
81.7365
4,013
swe_smith::train::21076
swe_smith
train
21,076
tobymao__sqlglot.036601ba.lm_rewrite__1zefdldo
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
# User-defined function parsing broken in TSQL dialect ## Description The recent changes to the `_parse_user_defined_function` method in the TSQL dialect have broken the parsing of user-defined functions. The new implementation doesn't correctly handle various function definition patterns that were previously working...
diff --git a/sqlglot/dialects/tsql.py b/sqlglot/dialects/tsql.py index b3cd555..f687e66 100644 --- a/sqlglot/dialects/tsql.py +++ b/sqlglot/dialects/tsql.py @@ -760,25 +760,64 @@ class TSQL(Dialect): this.set("output", self._prev.text) return this - def _parse_user_defined_functio...
["tests/dialects/test_tsql.py::TestTSQL::test_ddl", "tests/dialects/test_tsql.py::TestTSQL::test_fullproc", "tests/dialects/test_tsql.py::TestTSQL::test_tsql", "tests/dialects/test_tsql.py::TestTSQL::test_udf"]
["tests/dialects/test_tsql.py::TestTSQL::test_add_date", "tests/dialects/test_tsql.py::TestTSQL::test_charindex", "tests/dialects/test_tsql.py::TestTSQL::test_commit", "tests/dialects/test_tsql.py::TestTSQL::test_convert", "tests/dialects/test_tsql.py::TestTSQL::test_count", "tests/dialects/test_tsql.py::TestTSQL::test...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
77
4
1,382
0
0.6
1
0.75
1
0.487
81.736
4,014
swe_smith::train::52732
swe_smith
train
52,732
pydicom__pydicom.7d361b3d.lm_rewrite__tm7m7ruk
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### AttributeError when accessing concepts in Collection #### Description When attempting to access concepts within a `Collection` object, an `AttributeError` is raised unexpectedly. This issue seems to occur when trying to retrieve specific codes using the `Collection` class methods. #### Steps to Reproduce Here's...
diff --git a/src/pydicom/sr/codedict.py b/src/pydicom/sr/codedict.py index 275b631..8bb8532 100644 --- a/src/pydicom/sr/codedict.py +++ b/src/pydicom/sr/codedict.py @@ -158,68 +158,26 @@ class Collection: pydicom.sr.Code The :class:`~pydicom.sr.Code` corresponding to `name`. """ - ...
["tests/test_codes.py::TestCollection::test_concepts", "tests/test_codes.py::TestCollection::test_contains", "tests/test_codes.py::TestCollection::test_dir", "tests/test_codes.py::TestCollection::test_getattr", "tests/test_codes.py::TestCollection::test_getattr_multiple_cid", "tests/test_codes.py::TestCollection::test_...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
82
9
1,281
0
0.6
1
0.75
1
0.486833
81.7355
4,015
swe_smith::train::39570
swe_smith
train
39,570
pallets__jinja.ada0a9a6.lm_rewrite__3t2zyuwt
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### Bug: Incorrect Parsing of Function Call Arguments #### Description There seems to be an issue with parsing function call arguments in the Jinja2 template engine. Specifically, when using a combination of dynamic positional (`*args`) and keyword arguments (`**kwargs`), the parser does not handle them correctly, lea...
diff --git a/src/jinja2/parser.py b/src/jinja2/parser.py index 817abec..0a9096f 100644 --- a/src/jinja2/parser.py +++ b/src/jinja2/parser.py @@ -861,62 +861,54 @@ class Parser: return nodes.Slice(lineno=lineno, *args) # noqa: B026 - def parse_call_args( - self, - ) -> t.Tuple[ - t.List...
["tests/test_lexnparse.py::TestSyntax::test_function_calls"]
["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
70
1
1,519
0
0.6
1
0.75
1
0.4865
81.7345
4,016
swe_smith::train::3275
swe_smith
train
3,275
pygments__pygments.27649ebb.combine_file__1av74s7e
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
JSON and YAML lexers broken after recent changes #### Description The JSON and YAML lexers are producing incorrect output and throwing errors when processing basic input. The lexers appear to have issues with string parsing, number handling, and context management. #### Steps/Code to Reproduce ```python from pygmen...
diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py index 8f384bc..feb7fe8 100644 --- a/pygments/lexers/data.py +++ b/pygments/lexers/data.py @@ -54,12 +54,12 @@ class YamlLexer(ExtendedRegexLexer): """Reset the indentation levels.""" def callback(lexer, match, context): text =...
["tests/test_basic_api.py::test_random_input[YamlLexer]", "tests/test_basic_api.py::test_random_input[YamlJinjaLexer]", "tests/test_basic_api.py::test_lexer_options[YamlJinjaLexer]", "tests/test_basic_api.py::test_random_input[JsonLdLexer]", "tests/test_basic_api.py::test_lexer_options[YamlLexer]", "tests/snippets/yaml...
["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
98
29
958
0
0.6
1
0.75
1
0.486333
81.734
4,017
swe_smith::train::3371
swe_smith
train
3,371
pygments__pygments.27649ebb.combine_file__e92lq076
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
TNT lexer produces incorrect tokenization and infinite recursion #### Description The TNT lexer is not working correctly when parsing basic TNT syntax. It seems to have issues with whitespace handling, term parsing, and produces infinite recursion on simple numerals. #### Steps/Code to Reproduce ```python from pygm...
diff --git a/pygments/lexers/tnt.py b/pygments/lexers/tnt.py index bb444fd..dfb75c8 100644 --- a/pygments/lexers/tnt.py +++ b/pygments/lexers/tnt.py @@ -60,15 +60,15 @@ class TNTLexer(Lexer): """Tokenize whitespace.""" end = start try: - while text[end] in self.WHITESPACE: + ...
["tests/test_tnt.py::test_multiterm_positive_matches[(c+d)]", "tests/test_tnt.py::test_multiterm_positive_matches[(b.a)]", "tests/test_tnt.py::test_error_till_line_end[asdf]", "tests/test_tnt.py::test_error_till_line_end[fdsa\\nasdf]", "tests/test_tnt.py::test_numeral_positive_matches[0]", "tests/test_tnt.py::test_term...
["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
74
14
1,436
0
0.6
1
0.75
1
0.486
81.733
4,018
swe_smith::train::29690
swe_smith
train
29,690
cookiecutter__cookiecutter.b4451231.lm_rewrite__ii2t3b36
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
[Bug]: read_user_choice() function not working correctly with empty options and formatting issues ### Bug summary The `read_user_choice()` function in cookiecutter has two issues: 1. It doesn't raise ValueError when an empty options list is provided 2. The formatting of the prompt is completely different from what's ...
diff --git a/cookiecutter/prompt.py b/cookiecutter/prompt.py index f17112f..7a5f9ea 100644 --- a/cookiecutter/prompt.py +++ b/cookiecutter/prompt.py @@ -88,7 +88,8 @@ def read_repo_password(question: str) -> str: return Prompt.ask(question, password=True) -def read_user_choice(var_name: str, options: list, pro...
["tests/test_read_user_choice.py::test_click_invocation[1-hello]", "tests/test_read_user_choice.py::test_click_invocation[2-world]", "tests/test_read_user_choice.py::test_click_invocation[3-foo]", "tests/test_read_user_choice.py::test_click_invocation[4-bar]", "tests/test_read_user_choice.py::test_raise_if_options_is_n...
["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl...
jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231
true
null
1
65
5
1,613
0
0.6
1
0.75
1
0.4855
81.7315
4,019
swe_bench::test::1255
swe_bench
test
1,255
pydata__xarray-4819
pydata/xarray
pydata/xarray
python
a2b1712afd957deaf189c9b1a04e469596d853c9
drop_sel indices in dimension that doesn't have coordinates? **Is your feature request related to a problem? Please describe.** I am trying to drop particular indices from a dimension that doesn't have coordinates. Following: [drop_sel() documentation](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.drop...
I don't know of an easy way (which does not mean that there is none). `drop_sel` could be adjusted to work with _dimensions without coordinates_ by replacing https://github.com/pydata/xarray/blob/ff6b1f542e52dc330e294fd367f846e02c2955a2/xarray/core/dataset.py#L4038 by `index = self.get_index(dim)`. That would the...
diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -2247,6 +2247,28 @@ def drop_sel( ds = self._to_temp_dataset().drop_sel(labels, errors=errors) return self._from_temp_dataset(ds) + def drop_isel(self, indexers=None, ...
diff --git a/xarray/tests/test_dataarray.py b/xarray/tests/test_dataarray.py --- a/xarray/tests/test_dataarray.py +++ b/xarray/tests/test_dataarray.py @@ -2327,6 +2327,12 @@ def test_drop_index_labels(self): with pytest.warns(DeprecationWarning): arr.drop([0, 1, 3], dim="y", errors="ignore") + ...
["xarray/tests/test_dataarray.py::TestDataArray::test_drop_index_positions", "xarray/tests/test_dataset.py::TestDataset::test_drop_index_labels", "xarray/tests/test_dataset.py::TestDataset::test_drop_labels_by_position"]
["xarray/tests/test_dataarray.py::TestDataArray::test_repr", "xarray/tests/test_dataarray.py::TestDataArray::test_repr_multiindex", "xarray/tests/test_dataarray.py::TestDataArray::test_repr_multiindex_long", "xarray/tests/test_dataarray.py::TestDataArray::test_properties", "xarray/tests/test_dataarray.py::TestDataArray...
null
true
2021-01-17T12:08:18Z
2
89
3
931
0
0.8
1
0.55
1
0.451833
81.7305
4,020
swe_smith::train::8341
swe_smith
train
8,341
cantools__cantools.0c6a7871.lm_rewrite__z8sdi30b
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# Absolute time parsing in plot subparser is broken for certain formats ## Description The timestamp parser in the plot subparser doesn't correctly handle certain time formats that used to work. This affects both the command line tool and the API. ## How to reproduce Try to use the plot functionality with certain t...
diff --git a/src/cantools/subparsers/plot.py b/src/cantools/subparsers/plot.py index c3d5890..f198ce7 100644 --- a/src/cantools/subparsers/plot.py +++ b/src/cantools/subparsers/plot.py @@ -201,41 +201,54 @@ class TimestampParser: return ((d.pop('day',0)*24 + d.pop('hour',0))*60 + d.pop('min',0))*60 + seconds ...
["tests/test_plot.py::CanToolsPlotTest::test_start_absolute_seconds", "tests/test_plot.py::CanToolsPlotTest::test_stop_is_based_on_start_and_xlabel_shows_start", "tests/test_plot_unittests.py::CanToolsPlotUnittests::test_parse_user_input_absolute_time", "tests/test_plot_unittests.py::CanToolsPlotUnittests::test_parse_u...
["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
83
5
1,247
0
0.6
1
0.75
1
0.4845
81.7285
4,021
swe_smith::train::45482
swe_smith
train
45,482
dask__dask.5f61e423.pr_11244
swesmith/dask__dask.5f61e423
dask/dask
python
null
TypeError when using describe_numeric_aggregate and _maybe_partial_time_string functions I encountered an issue after updating to the latest version of the codebase. It seems like the `describe_numeric_aggregate` and `_maybe_partial_time_string` functions are not handling arguments correctly, leading to a `TypeError`....
diff --git a/dask/dataframe/core.py b/dask/dataframe/core.py index 32d8bbc..9cca4e8 100644 --- a/dask/dataframe/core.py +++ b/dask/dataframe/core.py @@ -462,25 +462,15 @@ def _sqrt_and_convert_to_timedelta(partition, axis, dtype=None, *args, **kwargs) sqrt = np.sqrt(partition) if not is_df_like: - re...
["dask/dataframe/tests/test_dataframe.py::test_describe_numeric[dask-test_values1]", "dask/dataframe/tests/test_dataframe.py::test_describe[None-None-None-subset0]", "dask/dataframe/tests/test_dataframe.py::test_describe[None-None-None-subset1]", "dask/dataframe/tests/test_dataframe.py::test_describe[None-None-None-sub...
["dask/dataframe/tests/test_dataframe.py::test_Dataframe", "dask/dataframe/tests/test_dataframe.py::test_head_tail", "dask/dataframe/tests/test_dataframe.py::test_head_npartitions", "dask/dataframe/tests/test_dataframe.py::test_head_npartitions_warn", "dask/dataframe/tests/test_dataframe.py::test_index_head", "dask/dat...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
3
61
18
1,686
0
0.6
1
0.75
1
0.484333
81.728
4,022
swe_smith::train::7036
swe_smith
train
7,036
cantools__cantools.0c6a7871.combine_file__m0i5j1cg
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# Broken timestamp parsing and regex patterns in plot functionality ## Description I've discovered several issues with the plot functionality in the latest version. The changes to the timestamp parsing patterns and regex handling have completely broken the plotting capabilities. Currently, when trying to use the plo...
diff --git a/src/cantools/subparsers/plot.py b/src/cantools/subparsers/plot.py index c3d5890..725768c 100644 --- a/src/cantools/subparsers/plot.py +++ b/src/cantools/subparsers/plot.py @@ -201,28 +201,28 @@ class TimestampParser: return ((d.pop('day',0)*24 + d.pop('hour',0))*60 + d.pop('min',0))*60 + seconds ...
["tests/test_plot.py::CanToolsPlotTest::test_autocolor", "tests/test_plot.py::CanToolsPlotTest::test_break_time", "tests/test_plot.py::CanToolsPlotTest::test_break_time_none", "tests/test_plot.py::CanToolsPlotTest::test_case_sensitive", "tests/test_plot.py::CanToolsPlotTest::test_choices_stem", "tests/test_plot.py::Can...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
57
50
1,765
0
0.6
1
0.75
1
0.484167
81.7275
4,023
swe_smith::train::6835
swe_smith
train
6,835
joke2k__faker.8b401a7d.lm_rewrite__553fwbc0
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
### Issue: `text()` Method Does Not Raise Error for Small Character Count #### Description The `text()` method in the `LoremProvider` is expected to raise a `ValueError` when the `max_nb_chars` parameter is set to a value less than 5. However, it currently returns an empty string instead of raising an error when `max...
diff --git a/faker/providers/lorem/__init__.py b/faker/providers/lorem/__init__.py index b8ccbcd..3b83235 100644 --- a/faker/providers/lorem/__init__.py +++ b/faker/providers/lorem/__init__.py @@ -200,7 +200,8 @@ class Provider(BaseProvider): """ return [self.paragraph(ext_word_list=ext_word_list) for...
["tests/providers/test_lorem.py::TestLoremProvider::test_text_with_less_than_four_characters"]
["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
84
1
1,225
0
0.6
1
0.75
1
0.484167
81.7275
4,024
swe_smith::train::7019
swe_smith
train
7,019
cantools__cantools.0c6a7871.combine_file__j2y9q08y
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# ECU Extract ARXML Loader fails to parse ARXML files ### Describe the bug The ECU Extract ARXML loader is not properly loading ARXML files. When trying to load an ECU extract ARXML file, the loader fails with an `AttributeError: 'NoneType' object has no attribute 'find'`. ### How to Reproduce ```python from cantoo...
diff --git a/src/cantools/database/can/formats/arxml/ecu_extract_loader.py b/src/cantools/database/can/formats/arxml/ecu_extract_loader.py index 67935ab..53887bb 100644 --- a/src/cantools/database/can/formats/arxml/ecu_extract_loader.py +++ b/src/cantools/database/can/formats/arxml/ecu_extract_loader.py @@ -54,14 +54,1...
["tests/test_database.py::CanToolsDatabaseTest::test_ecu_extract_arxml"]
["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
83
1
1,245
0
0.6
1
0.75
1
0.484167
81.7275
4,025
swe_smith::train::38532
swe_smith
train
38,532
amueller__word_cloud.ec24191c.lm_rewrite__mck8czap
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
# WordCloud CLI fails when using color and colormask options ## Description I've found an issue with the WordCloud CLI when trying to use color-related options. The CLI seems to have problems handling color functions properly. ## Expected behavior When using the CLI with color options like `--color` or `--colormask...
diff --git a/wordcloud/wordcloud_cli.py b/wordcloud/wordcloud_cli.py index 4ddd3db..e1b1056 100644 --- a/wordcloud/wordcloud_cli.py +++ b/wordcloud/wordcloud_cli.py @@ -220,38 +220,49 @@ def make_parser(): def parse_args(arguments): - # prog = 'python wordcloud_cli.py' + """Parse command line arguments. + ...
["test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option12]", "test/test_wordcloud_cli.py::test_check_duplicate_color_error", "test/test_wordcloud_cli.py::test_parse_args_defaults_to_random_color", "test/test_wordcloud_cli.py::test_cli_writes_to_imagefile", "test/test_wordcloud_cli.py::test_cli_writes_to_s...
["test/test_wordcloud.py::test_collocations", "test/test_wordcloud.py::test_collocation_stopwords", "test/test_wordcloud.py::test_collocation_stopwords_uppercase", "test/test_wordcloud.py::test_plurals_numbers", "test/test_wordcloud.py::test_multiple_s", "test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.p...
jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c
true
null
1
77
5
1,363
0
0.6
1
0.75
1
0.483833
81.7265
4,026
swe_smith::train::18035
swe_smith
train
18,035
pyasn1__pyasn1.0f07d724.lm_rewrite__addw87rk
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
GeneralizedTime and UTCTime encoding issues with timezone and subseconds It seems there are some issues with encoding GeneralizedTime and UTCTime values, particularly concerning the handling of timezones and subseconds. Here's how you can reproduce the problem: 1. **Missing Timezone**: When encoding a GeneralizedTime...
diff --git a/pyasn1/codec/cer/encoder.py b/pyasn1/codec/cer/encoder.py index e16e9ec..5103601 100644 --- a/pyasn1/codec/cer/encoder.py +++ b/pyasn1/codec/cer/encoder.py @@ -43,63 +43,23 @@ class TimeEncoderMixIn(object): MAX_LENGTH = 19 def encodeValue(self, value, asn1Spec, encodeFun, **options): - ...
["tests/codec/cer/test_encoder.py::GeneralizedTimeEncoderTestCase::testDecimalCommaPoint", "tests/codec/cer/test_encoder.py::GeneralizedTimeEncoderTestCase::testMissingTimezone", "tests/codec/cer/test_encoder.py::GeneralizedTimeEncoderTestCase::testWithSubsecondsDanglingDot", "tests/codec/cer/test_encoder.py::Generaliz...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
62
6
1,657
0
0.6
1
0.75
1
0.482833
81.7235
4,027
swe_smith::train::35896
swe_smith
train
35,896
stanfordnlp__dspy.651a4c71.lm_rewrite__ekz0xmqx
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Neo4jRM retrieval returns incorrect passage format ## Description When using Neo4jRM for retrieval, the returned passages have incorrect field names. The passages are returned with a `text` field instead of the expected `long_text` field. Here's a simple reproduction: ```python from dspy.retrieve import Neo4jRM f...
diff --git a/dspy/retrieve/neo4j_rm.py b/dspy/retrieve/neo4j_rm.py index 3d4f65a..13252c9 100644 --- a/dspy/retrieve/neo4j_rm.py +++ b/dspy/retrieve/neo4j_rm.py @@ -139,22 +139,76 @@ class Neo4jRM(Retrieve): self.embedder = embedding_function or Embedder(provider=embedding_provider, model=embedding_model) ...
["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
92
4
1,055
0
0.6
1
0.75
1
0.4825
81.7225
4,028
swe_smith::train::36429
swe_smith
train
36,429
facelessuser__soupsieve.a8080d97.lm_rewrite__tq5m6f0r
swesmith/facelessuser__soupsieve.a8080d97
facelessuser/soupsieve
python
null
### Unexpected Behavior with Combinator Parsing I've encountered an issue with the combinator parsing in the latest version. It seems that certain combinator patterns are not being handled correctly, leading to unexpected syntax errors. Here's a minimal example to reproduce the issue: ```python from soupsieve import...
diff --git a/soupsieve/css_parser.py b/soupsieve/css_parser.py index bedae69..9ce654e 100644 --- a/soupsieve/css_parser.py +++ b/soupsieve/css_parser.py @@ -795,54 +795,49 @@ class CSSParser: has_selector = False return has_selector, sel, rel_type - def parse_combinator( - self, - s...
["tests/test_level2/test_child.py::TestChild::test_invalid_combinator", "tests/test_level2/test_child.py::TestChild::test_invalid_double_combinator", "tests/test_level3/test_disabled.py::TestDisabled::test_disabled_html5", "tests/test_level3/test_disabled.py::TestDisabled::test_disabled_lxml", "tests/test_level3/test_d...
["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
73
23
1,432
0
0.6
1
0.75
1
0.482
81.721
4,029
swe_bench::test::949
swe_bench
test
949
matplotlib__matplotlib-13980
matplotlib/matplotlib
matplotlib/matplotlib
python
4236b571cb2f0b741c40788d471d3aa553421e7b
Non-sensical negative radial scale minimum autoset in polar plot When plotting a set of data on a polar plot, the default bottom y_limit might not be zero unexpectedly from the perspective of the user, resulting in confusion about the meaning of the plot, especially for a person (like me) unfamiliar with the concept of...
I agree the behavior is less than optimal. Perhaps polar plots should just be created with 0 as explicit lower r-lim? (I think negative r-lims should be explicitly requested.) (And then #10101 could be reverted as unnecessary anymore.) I think the issue here is the autoscaling is including a bit of the plot with `r<...
diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -2402,14 +2402,14 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True): (self._xmargin and scalex and self._autoscaleXon) or (s...
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -797,6 +797,12 @@ def test_polar_rlim_bottom(fig_test, fig_ref): ax.set_rmin(.5) +def test_polar_rlim_zero(): + ax = plt.figure().add_subplot(...
["lib/matplotlib/tests/test_streamplot.py::test_maxlength[png]"]
["lib/matplotlib/tests/test_axes.py::test_get_labels", "lib/matplotlib/tests/test_axes.py::test_spy_invalid_kwargs", "lib/matplotlib/tests/test_axes.py::test_twinx_cla", "lib/matplotlib/tests/test_axes.py::test_twinx_axis_scales[png]", "lib/matplotlib/tests/test_axes.py::test_twin_inherit_autoscale_setting", "lib/matpl...
null
true
2019-04-18T10:09:26Z
1
51
1
1,671
0
0.8
1
0.55
1
0.4485
81.7205
4,030
swe_smith::train::34320
swe_smith
train
34,320
iterative__dvc.1d6ea681.lm_rewrite__exa8fymf
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
# Bug: Stage creation fails with TypeError after code refactoring ## Description After recent changes to the `StageLoad.create()` method, multiple stage operations are failing with `TypeError: expected str, bytes or os.PathLike object, not NoneType`. The issue appears to be related to how stage objects are created and...
diff --git a/dvc/repo/stage.py b/dvc/repo/stage.py index 102a8eb..3a50fd0 100644 --- a/dvc/repo/stage.py +++ b/dvc/repo/stage.py @@ -143,14 +143,9 @@ class StageLoad: return stage - def create( - self, - single_stage: bool = False, - validate: bool = True, - fname: Optional[s...
["tests/func/test_stage.py::test_reload", "tests/func/test_stage.py::test_default_wdir_ignored_in_checksum", "tests/func/test_stage.py::test_external_remote_output_resolution", "tests/func/test_stage.py::test_external_remote_dependency_resolution", "tests/func/test_stage.py::test_md5_ignores_comments", "tests/func/test...
["tests/func/test_stage.py::test_cmd_obj", "tests/func/test_stage.py::test_no_cmd", "tests/func/test_stage.py::test_object", "tests/func/test_stage.py::test_none", "tests/func/test_stage.py::test_empty_list", "tests/func/test_stage.py::test_list", "tests/func/test_stage.py::test_md5_ignores_annotations", "tests/func/te...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
1
65
12
1,585
0
0.6
1
0.75
1
0.480833
81.7175
4,031
swe_smith::train::19552
swe_smith
train
19,552
seperman__deepdiff.ed252022.lm_rewrite__noct1puj
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
### Issue: TypeError in DeepDiff with Non-Subscriptable Iterables #### Description When using `DeepDiff` to compare non-subscriptable iterables, a `TypeError` is raised unexpectedly. This issue seems to occur when the iterables are generators, which are not subscriptable by nature. The error disrupts the expected beh...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..f439220 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -815,56 +815,45 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): t2_from_index=t2_from_index, t2_to_index=t2_to_index ) - def _diff_it...
["tests/test_command.py::TestCommands::test_diff_command[t1.toml-t2.toml-10.0.0.2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_...
["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
77
86
1,342
0
0.6
1
0.75
1
0.480333
81.716
4,032
swe_bench::test::1317
swe_bench
test
1,317
pylint-dev__pylint-4330
pylint-dev/pylint
pylint-dev/pylint
python
5e1928b325bc798f5be1ab94031bf6816d058d9f
Have spellchecker ignore code in docstring or comments (i.e. things flanked with double backticks) ### Is your feature request related to a problem? Please describe When I run the spellchecker, I have comments like > The ``.qsize()`` method requires that blah blah blah The spellchecker raises an error saying qsize is...
Thank you for opening the issue :) ! I think this would make a lot of sense. Should it require double backticks on each side? or should it be more open, and anything flanked in either single or double backticks be considered code? Markdown require a single backtick and rst double backticks, so I think it's ok to permi...
diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py --- a/pylint/checkers/spelling.py +++ b/pylint/checkers/spelling.py @@ -17,6 +17,7 @@ # Copyright (c) 2020 Ganden Schaffner <gschaffner@pm.me> # Copyright (c) 2020 hippo91 <guillaume.peillex@gmail.com> # Copyright (c) 2020 Damien Baty <damien.bat...
diff --git a/tests/checkers/unittest_spelling.py b/tests/checkers/unittest_spelling.py --- a/tests/checkers/unittest_spelling.py +++ b/tests/checkers/unittest_spelling.py @@ -37,7 +37,9 @@ pass -class TestSpellingChecker(CheckerTestCase): +class TestSpellingChecker(CheckerTestCase): # pylint:disable=too-m...
["tests/checkers/unittest_spelling.py::TestSpellingChecker::test_skip_tool_directives_at_beginning_of_comments_but_still_raise_error_if_directive_appears_later_in_comment[fmt-:", "tests/checkers/unittest_spelling.py::TestSpellingChecker::test_skip_tool_directives_at_beginning_of_comments_but_still_raise_error_if_direct...
["tests/checkers/unittest_spelling.py::TestSpellingChecker::test_check_bad_coment", "tests/checkers/unittest_spelling.py::TestSpellingChecker::test_check_bad_coment_custom_suggestion_count", "tests/checkers/unittest_spelling.py::TestSpellingChecker::test_check_bad_docstring", "tests/checkers/unittest_spelling.py::TestS...
null
true
2021-04-09T14:43:27Z
2
84
9
1,001
0
0.8
1
0.55
1
0.446833
81.7155
4,033
swe_smith::train::24932
swe_smith
train
24,932
marshmallow-code__marshmallow.9716fc62.lm_rewrite__tiuxw5bb
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
### Issue: Attribute Access in Schema Serialization #### Description It seems there's an issue with how attributes are accessed during schema serialization. When attempting to serialize objects with nested attributes or custom attribute mappings, the expected keys are not present in the serialized output. This is cau...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..20c9dde 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -263,10 +263,13 @@ class Field(FieldABC): :param callable accessor: A callable used to retrieve the value of `attr` from the object `o...
["tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_attribute_param_symmetry", "tests/test_schema.py::test_datetime_formatted_field", "tests/test_schema.py::test_datetime_iso_field", "tests/test_schema.py::test_class_variable", "tests/test_schema.py::test_custom_field", "tests/test_schema....
["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
11
12
2,661
0
0.6
1
0.75
1
0.480167
81.7155
4,034
swe_smith::train::31917
swe_smith
train
31,917
davidhalter__parso.338a5760.func_basic__agy0kws2
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Diff parser crashes with IndexError on list operations When using the diff parser with certain code modifications, it crashes with `IndexError: list index out of range` errors. This appears to happen during the node copying process in the diff parser. #### Steps/Code to Reproduce ```python from parso.python.diff imp...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..2dd1fe6 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -730,20 +730,18 @@ class _NodesTree: new_prefix = '' for node in nodes: - if node.start_pos[0] > until_line: + if node.start_pos[0] >=...
["test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_one_statement_func", "test/test_diff_parser.py::test_for_on_one_line", "test/test_diff_pa...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
76
74
1,359
0
0.6
1
0.75
1
0.479833
81.7145
4,035
swe_smith::train::34891
swe_smith
train
34,891
pyutils__line_profiler.a646bf0f.combine_file__u1t0q9i8
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
# LineProfiler wrapper function ignores positional arguments ## Description The LineProfiler's wrapper function is not correctly passing positional arguments to the wrapped function, causing functions that use positional arguments to fail. ## Steps/Code to Reproduce ```python from line_profiler import LineProfiler ...
diff --git a/line_profiler/line_profiler.py b/line_profiler/line_profiler.py index 2a71d03..2285018 100755 --- a/line_profiler/line_profiler.py +++ b/line_profiler/line_profiler.py @@ -33,7 +33,7 @@ def load_ipython_extension(ip): def is_coroutine(f): - return inspect.iscoroutinefunction(f) + return inspect....
["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_autoprofile.py::test_autoprofile_module", "tests/t...
["tests/test_cli.py::test_version_agreement", "tests/test_complex_case.py::test_complex_example_python_none", "tests/test_duplicate_functions.py::test_duplicate_function", "tests/test_explicit_profile.py::test_explicit_profile_with_nothing", "tests/test_explicit_profile.py::test_explicit_profile_with_environ_off", "tes...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
1
79
19
1,299
0
0.6
1
0.75
1
0.479833
81.7145
4,036
swe_smith::train::19535
swe_smith
train
19,535
seperman__deepdiff.ed252022.lm_rewrite__k6rcfy0t
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
### Unexpected Behavior in String Hashing with Encoding #### What happened? When attempting to hash byte strings with specific encodings, the function `prepare_string_for_hashing` does not handle encoding errors as expected. This results in `UnicodeDecodeError` being raised even when `ignore_encoding_errors` is set t...
diff --git a/deepdiff/deephash.py b/deepdiff/deephash.py index 1f293bd..a358c87 100644 --- a/deepdiff/deephash.py +++ b/deepdiff/deephash.py @@ -81,54 +81,41 @@ class BoolObj(Enum): FALSE = 0 -def prepare_string_for_hashing( - obj, - ignore_string_type_changes=False, - ignore_string_case=F...
["tests/test_diff_other.py::TestDiffOther::test_multi_processing3_deephash", "tests/test_hash.py::TestDeepHash::test_built_in_hash_not_sensitive_to_bytecode_vs_unicode", "tests/test_hash.py::TestDeepHash::test_sha1_hash_not_sensitive_to_bytecode_vs_unicode", "tests/test_hash.py::TestDeepHashPrep::test_prep_str", "tests...
["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
73
20
1,417
0
0.6
1
0.75
1
0.4795
81.7135
4,037
swe_bench::test::1013
swe_bench
test
1,013
matplotlib__matplotlib-23267
matplotlib/matplotlib
matplotlib/matplotlib
python
9dbcbe291e3bea11fc56c12ba3256a9d4cb4cf2f
[ENH]: Colorbar should support location kwarg that sets both orientation and ticklocation ### Problem When colorbar autocreates an Axes, one can pass `location`, which also sets the colorbar's orientation and the ticklocation (left for a left colorbar, right for a right colorbar, etc.). When one instead passes a manu...
I assume that setting `location` should override `orientation`? Since `orientation` has a default non-None value. Or should one change the default value to None to be able to detect which value was set?
diff --git a/lib/matplotlib/colorbar.py b/lib/matplotlib/colorbar.py --- a/lib/matplotlib/colorbar.py +++ b/lib/matplotlib/colorbar.py @@ -246,14 +246,35 @@ class Colorbar: alpha : float The colorbar transparency between 0 (transparent) and 1 (opaque). - orientation : {'vertical', 'horizontal'} + ...
diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py --- a/lib/matplotlib/tests/test_colorbar.py +++ b/lib/matplotlib/tests/test_colorbar.py @@ -1149,3 +1149,34 @@ def test_title_text_loc(): # colorbar axes, including its extend triangles.... assert (cb.ax.title.get_windo...
["lib/matplotlib/tests/test_colorbar.py::test_passing_location[png]", "lib/matplotlib/tests/test_colorbar.py::test_colorbar_errors[kwargs1-TypeError-location"]
["lib/matplotlib/tests/test_colorbar.py::test_colorbar_extension_shape[png]", "lib/matplotlib/tests/test_colorbar.py::test_colorbar_extension_length[png]", "lib/matplotlib/tests/test_colorbar.py::test_colorbar_extension_inverted_axis[min-expected0-horizontal]", "lib/matplotlib/tests/test_colorbar.py::test_colorbar_exte...
null
true
2022-06-14T09:11:23Z
1
73
2
1,216
0
0.8
1
0.55
1
0.446
81.713
4,038
swe_smith::train::39635
swe_smith
train
39,635
tornadoweb__tornado.d5ac65c1.combine_file__0c0mqgx3
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
SSLIOStream connection and handshake methods missing after refactor #### Description After a recent change, SSL connections are failing because several critical methods have been removed from the `SSLIOStream` class. The `connect()` and `wait_for_handshake()` methods are no longer available, causing SSL handshakes to...
diff --git a/tornado/iostream.py b/tornado/iostream.py index dd2111e..e94606e 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -630,9 +630,9 @@ class BaseIOStream: # an ssl.SSLError), not just StreamClosedError. if not self._ssl_connect_future.done(): if self.erro...
["test_connection_refused (tornado.test.iostream_test.TestIOStream)", "test_match (tornado.test.iostream_test.TestIOStreamCheckHostname)", "test_no_match (tornado.test.iostream_test.TestIOStreamCheckHostname)", "test_connection_refused (tornado.test.iostream_test.TestIOStreamSSL)", "test_inline_read_error (tornado.test...
["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
true
null
1
66
18
1,555
0
0.6
1
0.75
1
0.479167
81.7125
4,039
swe_smith::train::23008
swe_smith
train
23,008
graphql-python__graphene.82903263.pr_1578
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
# TypeError when using deprecated decorator with no reason #### Description When using the `deprecated` decorator without providing a reason, it raises a TypeError. The decorator should work both with and without a reason parameter. #### Steps to Reproduce ```python from graphene.utils.deprecated import deprecated #...
diff --git a/graphene/utils/deprecated.py b/graphene/utils/deprecated.py index 7138bf5..bd9e6cc 100644 --- a/graphene/utils/deprecated.py +++ b/graphene/utils/deprecated.py @@ -1,5 +1,66 @@ -from warnings import warn - - -def warn_deprecation(text: str): - warn(text, category=DeprecationWarning, stacklevel=2) +impor...
["graphene/utils/tests/test_deprecated.py::test_warn_deprecation"]
["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i...
jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263
true
null
3
79
1
1,293
0
0.6
1
0.75
1
0.478833
81.7115
4,040
swe_smith::train::263
swe_smith
train
263
oauthlib__oauthlib.1fd52536.combine_module__dzzyqw84
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth1 signature verification and parameter validation broken #### Description OAuth1 authentication is completely broken - all signature methods are being validated incorrectly and mandatory parameter checks are inverted. Authorization responses are also returning wrong status codes and malformed content. #### Step...
diff --git a/oauthlib/oauth1/rfc5849/endpoints/authorization.py b/oauthlib/oauth1/rfc5849/endpoints/authorization.py index 00d9576..d450722 100644 --- a/oauthlib/oauth1/rfc5849/endpoints/authorization.py +++ b/oauthlib/oauth1/rfc5849/endpoints/authorization.py @@ -109,8 +109,8 @@ class AuthorizationEndpoint(BaseEndpoin...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
["tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointTest::test_get_realms_and_credentials", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_case_insensitive_headers", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_duplicate_params", "tests/oauth1/rfc58...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
2
84
35
1,192
0
0.6
1
0.75
1
0.478667
81.711
4,041
swe_smith::train::21310
swe_smith
train
21,310
Instagram__MonkeyType.70c3acf6.pr_55
swesmith/Instagram__MonkeyType.70c3acf6
instagram/monkeytype
python
null
CLI commands fail with AttributeError after refactoring #### Description After recent changes to the stub generation code, CLI commands are failing with `AttributeError: 'Namespace' object has no attribute 'include_unparsable_defaults'` when trying to generate stubs. #### Steps/Code to Reproduce ```python from monk...
diff --git a/monkeytype/cli.py b/monkeytype/cli.py index 990079d..b80ff35 100644 --- a/monkeytype/cli.py +++ b/monkeytype/cli.py @@ -131,12 +131,7 @@ def get_stub( rewriter = args.config.type_rewriter() if args.disable_type_rewriting: rewriter = NoOpRewriter() - stubs = build_module_stubs_from_tra...
["tests/test_cli.py::test_generate_stub", "tests/test_cli.py::test_print_stub_ignore_existing_annotations", "tests/test_cli.py::test_get_diff", "tests/test_cli.py::test_get_diff2", "tests/test_cli.py::test_display_sample_count_from_cli", "tests/test_cli.py::test_apply_stub_init", "tests/test_cli.py::test_apply_stub_fil...
["demo/test_inbox.py::test_empty_inbox", "demo/test_inbox.py::test_commented", "demo/test_inbox.py::test_followed", "demo/test_inbox.py::test_one_like", "demo/test_inbox.py::test_two_likes", "demo/test_inbox.py::test_three_likes", "demo/test_inbox.py::test_everything", "demo/test_inbox.py::test_aggregator_interface", "...
jyangballin/swesmith.x86_64.instagram_1776_monkeytype.70c3acf6
true
null
2
87
23
1,130
0
0.6
1
0.75
1
0.478333
81.71
4,042
swe_smith::train::8328
swe_smith
train
8,328
cantools__cantools.0c6a7871.lm_rewrite__x8mo9dm9
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
### Description After applying the recent changes, it seems that the `dump_string` function is causing unexpected behavior. Specifically, when attempting to convert a database to a DBC format, the process fails with a `TypeError: 'str' object is not callable`. This issue appears to be affecting multiple parts of the c...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..1d0bf45 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -1906,38 +1906,29 @@ def make_names_unique(database, shorten_long_names): return database ...
["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals2", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_sort_signals_b...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
65
39
1,570
0
0.6
1
0.75
1
0.478333
81.71
4,043
swe_smith::train::17990
swe_smith
train
17,990
pyasn1__pyasn1.0f07d724.func_pm_remove_cond__k6bd346t
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
Real decoder returns undefined variable instead of decoded value #### Description When decoding REAL values using the BER decoder, the decoder fails with a `NameError: name 'value' is not defined` error. This affects all REAL value decoding including binary encoded, character encoded, and infinite values. #### Steps...
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 7e69ca1..3c8d2ee 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -511,8 +511,6 @@ class RealPayloadDecoder(AbstractSimplePayloadDecoder): tagSet=None, length=None, state=None, ...
["tests/codec/ber/test_decoder.py::RealDecoderTestCase::testBin1", "tests/codec/ber/test_decoder.py::RealDecoderTestCase::testBin2", "tests/codec/ber/test_decoder.py::RealDecoderTestCase::testBin3", "tests/codec/ber/test_decoder.py::RealDecoderTestCase::testBin4", "tests/codec/ber/test_decoder.py::RealDecoderTestCase::...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
89
10
1,084
0
0.6
1
0.75
1
0.477333
81.707
4,044
swe_smith::train::34506
swe_smith
train
34,506
iterative__dvc.1d6ea681.pr_9508
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
Missing 'studio' command in CLI parser Hi, I noticed that when trying to use DVC, I'm getting errors with several commands. After investigating, I found that there's an issue in the CLI parser configuration. The problem seems to be in the COMMANDS list in `dvc/cli/parser.py`. The `run` module is included but `studio...
diff --git a/dvc/cli/parser.py b/dvc/cli/parser.py index 3dcec15..a2c829f 100644 --- a/dvc/cli/parser.py +++ b/dvc/cli/parser.py @@ -95,8 +95,8 @@ COMMANDS = [ remove, repro, root, + run, stage, - studio, unprotect, update, version, @@ -212,4 +212,4 @@ def get_main_parser(): ...
["tests/func/test_cli.py::test_argparse", "tests/func/test_cli.py::test_pull", "tests/func/test_cli.py::test_push", "tests/func/test_cli.py::test_status", "tests/func/test_cli.py::test_repro", "tests/func/test_cli.py::test_remove", "tests/func/test_cli.py::test_add", "tests/func/test_cli.py::test_config_unset", "tests/...
["tests/func/test_cli.py::test_find_root", "tests/func/test_cli.py::test_cd", "tests/unit/cli/test_main.py::test_state_pickle_errors_are_correctly_raised", "tests/unit/cli/test_main.py::test_ignore_in_collected_dir_error_is_logged"]
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
2
99
12
883
0
0.6
1
0.75
1
0.477167
81.7065
4,045
swe_smith::train::18025
swe_smith
train
18,025
pyasn1__pyasn1.0f07d724.lm_rewrite__3ad8lbmq
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
### Issue: Unexpected Behavior in NamedTypes and Sequence Handling #### Description I've encountered an issue with the `NamedTypes` and `Sequence` classes after a recent update. The problem seems to manifest when handling tag maps and component constraints, leading to unexpected errors. #### Steps to Reproduce 1. *...
diff --git a/pyasn1/type/namedtype.py b/pyasn1/type/namedtype.py index 5f6c4ca..66db13d 100644 --- a/pyasn1/type/namedtype.py +++ b/pyasn1/type/namedtype.py @@ -459,26 +459,44 @@ class NamedTypes(object): return self.__minTagSet def __computeTagMaps(self, unique): + """Create a TagMap object from...
["tests/type/test_namedtype.py::NamedTypesCaseBase::testContains", "tests/type/test_namedtype.py::NamedTypesCaseBase::testGetItem", "tests/type/test_namedtype.py::NamedTypesCaseBase::testGetNameByPosition", "tests/type/test_namedtype.py::NamedTypesCaseBase::testGetPositionByName", "tests/type/test_namedtype.py::NamedTy...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
50
42
1,863
0
0.6
1
0.75
1
0.477167
81.7065
4,046
swe_smith::train::243
swe_smith
train
243
oauthlib__oauthlib.1fd52536.combine_module__a5og181d
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2 authorization code and refresh token grants broken after recent changes #### Description The OAuth2 authorization code and refresh token grant flows are completely broken. When trying to exchange an authorization code for tokens or refresh an access token, the server returns empty responses or throws unexpecte...
diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py index 09dc619..d8b80dd 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py +++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py @@ -301,19 +301,19 @@ class Aut...
["tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_web", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_client_id_authentication", "tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py::ResourceOwnerAssocia...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
2
60
76
1,662
0
0.6
1
0.75
1
0.477
81.706
4,047
swe_smith::train::48175
swe_smith
train
48,175
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__01dt4t3e
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Jinja templater fails with UnboundLocalError when processing templates #### Description The Jinja templater is throwing an `UnboundLocalError` when trying to process templates. The error occurs because variables are being referenced before they are defined in the method execution flow. #### Steps/Code to Reproduce ...
diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py index 934ded3..734290e 100644 --- a/src/sqlfluff/core/templaters/jinja.py +++ b/src/sqlfluff/core/templaters/jinja.py @@ -657,6 +657,46 @@ class JinjaTemplater(PythonTemplater): config: Optional[FluffConfig] = None, ...
["test/core/templaters/jinja_test.py::test__templater_jinja[simple]", "test/core/templaters/jinja_test.py::test__templater_jinja[unboundlocal_bugfix]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[basic_block]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[strip_left_block]", "...
["test/core/templaters/jinja_test.py::test__templater_jinja_error_macro_path_does_not_exist", "test/core/templaters/jinja_test.py::test__templater_jinja_error_macro_invalid", "test/core/templaters/jinja_test.py::test__templater_jinja_slice_template[-result0-JinjaAnalyzer]", "test/core/templaters/jinja_test.py::test__te...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
81
67
1,240
0
0.6
1
0.75
1
0.476667
81.705
4,048
swe_bench::test::1163
swe_bench
test
1,163
psf__requests-1327
psf/requests
psf/requests
python
e7786ec14fdf20e8c373eddc9ac0f67d211cb1b9
Transport adapters don't work as advertised Having: ``` python >>> import requests >>> s = requests.Session() ``` We cannot currently reliably do:: ``` python >>> import requests_testadapter >>> s.mount('http://test.com', requests_testadapter.TestAdapter(b'Mock')) ``` We should, this is documented: http://d...
> This is because there is already a default adapter for 'http://' in the form of requests.adapters.HTTPAdapter. Depending on the (seemingly random) order of keys in the s.adapters dictionary, for some combinations of keys it will work, for others it won't. **EDIT** None of the information in this comment is correct. ...
diff --git a/requests/sessions.py b/requests/sessions.py --- a/requests/sessions.py +++ b/requests/sessions.py @@ -11,14 +11,13 @@ import os from datetime import datetime -from .compat import cookielib +from .compat import cookielib, OrderedDict, urljoin, urlparse from .cookies import cookiejar_from_dict, extract_...
diff --git a/test_requests.py b/test_requests.py --- a/test_requests.py +++ b/test_requests.py @@ -11,6 +11,7 @@ import requests from requests.auth import HTTPDigestAuth +from requests.adapters import HTTPAdapter from requests.compat import str, cookielib from requests.cookies import cookiejar_from_dict from req...
["test_requests.py::RequestsTestCase::test_transport_adapter_ordering"]
["test_requests.py::RequestsTestCase::test_basic_building", "test_requests.py::RequestsTestCase::test_cannot_send_unprepared_requests", "test_requests.py::RequestsTestCase::test_cookie_parameters", "test_requests.py::RequestsTestCase::test_entry_points", "test_requests.py::RequestsTestCase::test_get_auth_from_url", "te...
null
true
2013-04-25T10:01:49Z
1
14
1
2,379
0
0.8
1
0.55
1
0.443167
81.7045
4,049
swe_smith::train::29030
swe_smith
train
29,030
tox-dev__pipdeptree.c31b6418.combine_file__t74x66s7
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
# Conda environment detection broken in pipdeptree ## Description I've found an issue with the conda environment detection in pipdeptree. When running in a conda environment, the tool fails to properly detect the Python interpreter. ## Steps to Reproduce Here's a simple script that demonstrates the issue: ```pytho...
diff --git a/src/pipdeptree/_detect_env.py b/src/pipdeptree/_detect_env.py index 36037e8..ae82a9c 100644 --- a/src/pipdeptree/_detect_env.py +++ b/src/pipdeptree/_detect_env.py @@ -14,22 +14,26 @@ def detect_active_interpreter() -> str: If it fails to find any, it will fail with a message. """ - detectio...
["tests/test_detect_env.py::test_detect_active_interpreter_using_env_vars[CONDA_PREFIX]", "tests/test_detect_env.py::test_detect_active_interpreter_non_supported_python_implementation", "tests/test_detect_env.py::test_detect_active_interpreter_non_existent_path"]
["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack...
jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418
true
null
1
67
3
1,519
0
0.6
1
0.75
1
0.4765
81.7045
4,050
swe_smith::train::34123
swe_smith
train
34,123
iterative__dvc.1d6ea681.combine_module__btdeybja
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
Plots collection returns None instead of expected data structure #### Description When calling `dvc.plots.show()` or related plot collection methods, the function returns `None` instead of the expected plot data structure. This affects all plot-related functionality including showing plots, collecting plot definition...
diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 2b89626..276f920 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -490,6 +490,8 @@ class Repo: push: bool = False, skip_failed: bool = False, ): + + return used """Get the stages related to the given tar...
["tests/func/plots/test_collect.py::test_subdir_config_not_overwritten_by_parents", "tests/func/plots/test_diff.py::test_diff_dirty", "tests/func/plots/test_modify.py::test_dir_plots", "tests/func/plots/test_show.py::test_show_targets", "tests/func/plots/test_show.py::test_plot_cache_missing", "tests/func/plots/test_sh...
["tests/func/plots/test_diff.py::test_no_commits", "tests/func/plots/test_modify.py::test_plots_modify_should_not_change_lockfile", "tests/func/plots/test_modify.py::test_plots_modify_not_existing_template", "tests/func/plots/test_modify.py::test_unset_nonexistent", "tests/func/test_repo.py::test_open_bare", "tests/fun...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
2
68
30
1,498
0
0.6
1
0.75
1
0.476333
81.704
4,051
swe_smith::train::24389
swe_smith
train
24,389
sunpy__sunpy.f8edfd5c.lm_rewrite__4dgbjznt
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# TimeRange class fails to handle certain input types #### Description The `TimeRange` class in `sunpy.time.timerange` is not properly handling certain input types that were previously working. After a recent change, several use cases are now failing. #### Steps to Reproduce ```python from sunpy.time import TimeRan...
diff --git a/sunpy/time/timerange.py b/sunpy/time/timerange.py index 4938ade..256f960 100644 --- a/sunpy/time/timerange.py +++ b/sunpy/time/timerange.py @@ -89,52 +89,32 @@ class TimeRange: """ def __init__(self, a, b=None, format=None): - # If a is a TimeRange object, copy attributes to new instance...
["sunpy/time/tests/test_timerange.py::test_timerange_inputs[inputs3]", "sunpy/time/tests/test_timerange.py::test_timerange_invalid_range", "sunpy/time/tests/test_timerange.py::test_timerange_input[ainput3]", "sunpy/time/tests/test_timerange.py::test_timerange_input[ainput4]", "sunpy/time/tests/test_timerange.py::test_i...
["sunpy/time/tests/test_timerange.py::test_timerange_inputs[inputs0]", "sunpy/time/tests/test_timerange.py::test_timerange_inputs[inputs1]", "sunpy/time/tests/test_timerange.py::test_timerange_inputs[inputs2]", "sunpy/time/tests/test_timerange.py::test_equals", "sunpy/time/tests/test_timerange.py::test_not_equals", "su...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
66
5
1,537
0
0.6
1
0.75
1
0.476167
81.7035
4,052
swe_smith::train::29010
swe_smith
train
29,010
tox-dev__pipdeptree.c31b6418.combine_file__e97i3dfu
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
UnboundLocalError when using pipdeptree with various options #### Description When running pipdeptree with certain command line options, the tool crashes with an `UnboundLocalError: local variable 'dists' referenced before assignment`. This affects multiple functionalities including JSON output, custom interpreters, ...
diff --git a/src/pipdeptree/_discovery.py b/src/pipdeptree/_discovery.py index ba23498..7195932 100644 --- a/src/pipdeptree/_discovery.py +++ b/src/pipdeptree/_discovery.py @@ -19,51 +19,39 @@ def get_installed_distributions( local_only: bool = False, # noqa: FBT001, FBT002 user_only: bool = False, # noqa: ...
["tests/render/test_render.py::test_json_routing", "tests/render/test_render.py::test_json_tree_routing", "tests/render/test_render.py::test_mermaid_routing", "tests/render/test_render.py::test_grahpviz_routing", "tests/render/test_render.py::test_text_routing", "tests/test_discovery.py::test_local_only", "tests/test_d...
["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack...
jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418
true
null
1
89
20
1,077
0
0.6
1
0.75
1
0.476167
81.7035
4,053
swe_smith::train::48721
swe_smith
train
48,721
facebookresearch__hydra.0f03eb60.combine_module__rq8ghnpq
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
sort() function returns incorrect results for single arguments #### Description The `sort()` function is not handling single arguments correctly. When called with a single primitive value, it should return that value unchanged, but instead it's raising a TypeError. #### Steps/Code to Reproduce ```python from hydra....
diff --git a/hydra/_internal/grammar/functions.py b/hydra/_internal/grammar/functions.py index 6e84a1a..ea9bd39 100644 --- a/hydra/_internal/grammar/functions.py +++ b/hydra/_internal/grammar/functions.py @@ -47,8 +47,6 @@ class Functions: # Unquote strings in kwargs values kwargs = {} for ke...
["tests/test_hydra_cli_errors.py::test_cli_error[empty_sort]", "tests/test_overrides_parser.py::test_value[sort([2,3,1])]", "tests/test_overrides_parser.py::test_value[sort([2,3,1],reverse=true)]", "tests/test_overrides_parser.py::test_value[sort(3,2,1)]", "tests/test_overrides_parser.py::test_value[sort(a,c,b,reverse=...
["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
2
93
43
995
0
0.6
1
0.75
1
0.475833
81.7025
4,054
swe_smith::train::2969
swe_smith
train
2,969
Suor__funcy.207a7810.combine_file__5c2gq3ju
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Multiple issues with function composition and currying Hi, I've found several issues with the latest changes to the `funcs.py` module. The problems affect multiple functions including `identity`, `curry`, `compose`, and `rcompose`. ## Current Behaviour When using the `identity` function, it now returns the negati...
diff --git a/funcy/funcs.py b/funcy/funcs.py index 0a235bb..a243daf 100644 --- a/funcy/funcs.py +++ b/funcy/funcs.py @@ -17,7 +17,7 @@ __all__ = ['identity', 'constantly', 'caller', def identity(x): """Returns its argument.""" - return x + return -x def constantly(x): """Creates a function accepti...
["tests/test_funcs.py::test_curry", "tests/test_funcs.py::test_curry_funcy", "tests/test_funcs.py::test_compose", "tests/test_funcs.py::test_rcompose", "tests/test_funcs.py::test_complement", "tests/test_funcs.py::test_iffy"]
["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
20
6
2,454
0
0.6
1
0.75
1
0.475667
81.702
4,055
swe_smith::train::24442
swe_smith
train
24,442
sunpy__sunpy.f8edfd5c.lm_rewrite__ybc0lyhj
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
### Issue: Observer and Time Argument Validation in Solar Rotation Functions #### Description There seems to be an issue with the validation of the `observer` and `time` arguments in the solar rotation functions. The current implementation is not handling the cases where both `observer` and `time` are specified simul...
diff --git a/sunpy/physics/differential_rotation.py b/sunpy/physics/differential_rotation.py index e4f3f4a..65d0fd1 100644 --- a/sunpy/physics/differential_rotation.py +++ b/sunpy/physics/differential_rotation.py @@ -88,20 +88,39 @@ def diff_rot(duration: u.s, latitude: u.deg, rot_type='howard', frame_time='side d...
["sunpy/physics/tests/test_differential_rotation.py::test_solar_rotate_coordinate", "sunpy/physics/tests/test_differential_rotation.py::test_get_new_observer"]
["sunpy/physics/tests/test_differential_rotation.py::test_diff_rot_deprecated_warning", "sunpy/physics/tests/test_differential_rotation.py::test_consistency_with_rotatedsunframe", "sunpy/physics/tests/test_differential_rotation.py::test_differential_rotate_observer_all_off_disk", "sunpy/physics/tests/test_differential_...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
47
2
1,913
0
0.6
1
0.75
1
0.4755
81.7015
4,056
swe_smith::train::3326
swe_smith
train
3,326
pygments__pygments.27649ebb.combine_file__7y5t3t6d
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
# Erlang Shell Lexer and Elixir Lexer Broken ## Bug Description I've discovered multiple issues with the Erlang Shell Lexer and Elixir Lexer in the latest version. The lexers are not correctly processing input, which causes incorrect syntax highlighting and token generation. ## Erlang Shell Lexer Issue The Erlang S...
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py index 1190182..46fc0fb 100644 --- a/pygments/lexers/erlang.py +++ b/pygments/lexers/erlang.py @@ -161,28 +161,28 @@ class ErlangShellLexer(Lexer): def get_tokens_unprocessed(self, text): erlexer = ErlangLexer(**self.options) - + ...
["tests/test_basic_api.py::test_random_input[ErlangShellLexer]", "tests/test_basic_api.py::test_lexer_options[ErlangShellLexer]", "tests/examplefiles/erl/erl_session.erl-sh::", "tests/examplefiles/iex/iex_example::", "tests/examplefiles/elixir/example_elixir.ex::"]
["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
5
2,051
0
0.6
1
0.75
1
0.475167
81.7005
4,057
swe_smith::train::32308
swe_smith
train
32,308
davidhalter__parso.338a5760.lm_rewrite__2p8hqt30
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
### Parsing Issues with DiffParser Hi team, I've encountered a problem with the `DiffParser` class in the `parso` library. It seems that the recent changes have introduced some unexpected behavior when parsing certain code structures, particularly those involving complex indentation and parentheses. ### Description ...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..f6ccc3c 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -409,27 +409,36 @@ class DiffParser: Parses at least until the given line, but might just parse more until a valid state is reached. """ - las...
["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p...
["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
51
80
1,827
0
0.6
1
0.75
1
0.4745
81.6985
4,058
r2e_gym::train::4717
r2e_gym
train
4,717
numpy__bea761424753c0612a65a6a91d44f9a81bdc4c12
numpy
numpy/numpy
python
bea761424753c0612a65a6a91d44f9a81bdc4c12
**[ISSUE]** **Title:** Inconsistent Return Type in `flatnotmasked_contiguous` with `nomask` vs Zero Mask **Description:** The `flatnotmasked_contiguous` function in NumPy's masked array module behaves inconsistently when handling arrays with no mask (`nomask`) compared to arrays with an all-zero mask. Specifically, ...
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 @@ -45,6 +45,15 @@ Compatibility notes =================== + +``np.ma.notmasked_contiguous`` and ``np.ma.flatnotmasked_contiguous`` always return lists +--------------------...
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py --- a/numpy/ma/tests/test_extras.py +++ b/numpy/ma/tests/test_extras.py @@ -128,7 +128,10 @@ a = arange(10) # No mask test = flatnotmasked_contiguous(a) - assert_equal(test, slice(0, a.size)) + assert_equ...
null
null
namanjain12/numpy_final:bea761424753c0612a65a6a91d44f9a81bdc4c12
true
null
2
61
null
2,339
0
0.75
1
0.6375
1
0.593167
81.69825
4,059
swe_smith::train::49257
swe_smith
train
49,257
mozilla__bleach.73871d76.func_basic__6v9whkd8
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parsing produces incorrect output with nested formatting elements #### Description When parsing HTML with nested formatting elements, the parser produces malformed output where elements are incorrectly positioned or missing entirely. #### Steps/Code to Reproduce ```python import bleach # Test case with nested...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..19db7b4 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -1402,167 +1402,95 @@ def getPhases(debug): break def endTagFormatting(s...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_href_with_wrong_tag", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_attributes_callable", "tests/te...
["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
92
24
1,005
0
0.6
1
0.75
1
0.474167
81.6975
4,060
swe_smith::train::8308
swe_smith
train
8,308
cantools__cantools.0c6a7871.lm_rewrite__rw9gl707
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
#### Description It seems that the recent changes have introduced an issue with handling ARXML files, particularly for AUTOSAR 4. The system is unable to process these files correctly, resulting in an `UnsupportedDatabaseFormatError`. This is affecting several functionalities that rely on ARXML parsing. #### Steps/Co...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..1935b62 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -1548,23 +1548,76 @@ class Syste...
["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
87
11
1,104
0
0.6
1
0.75
1
0.474
81.697
4,061
swe_smith::train::5080
swe_smith
train
5,080
agronholm__exceptiongroup.0b4f4937.combine_file__mw63j2hd
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
# [Bug]: Exception formatting is broken when handling exception groups ## Description When trying to format exception groups, the formatting code is broken and causes errors. This happens in several scenarios: 1. When an exception group is part of a chain of exceptions 2. When using the standard exception formatting...
diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py index 4c52d77..c8e248f 100644 --- a/src/exceptiongroup/_formatting.py +++ b/src/exceptiongroup/_formatting.py @@ -49,7 +49,7 @@ class _ExceptionPrintContext: self.need_close = False def indent(self): - return " " *...
["tests/test_formatting.py::test_exceptionhook", "tests/test_formatting.py::test_exceptiongroup_as_cause", "tests/test_formatting.py::test_exceptiongroup_loop", "tests/test_formatting.py::test_exceptionhook_format_exception_only", "tests/test_formatting.py::test_formatting_syntax_error", "tests/test_formatting.py::test...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
75
28
1,343
0
0.6
1
0.75
1
0.473833
81.6965
4,062
swe_smith::train::6578
swe_smith
train
6,578
joke2k__faker.8b401a7d.combine_module__dk371i7h
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# [Bug]: Norwegian SSN generation broken and Slovak birth number not divisible by 11 ### Bug summary There are two issues with the SSN/birth number generation: 1. The Norwegian SSN generator is completely broken due to a code structure issue in the checksum function 2. The Slovak birth number generator produces numb...
diff --git a/faker/providers/ssn/no_NO/__init__.py b/faker/providers/ssn/no_NO/__init__.py index 05ce2f7..3dc9eb5 100644 --- a/faker/providers/ssn/no_NO/__init__.py +++ b/faker/providers/ssn/no_NO/__init__.py @@ -8,6 +8,8 @@ from .. import Provider as SsnProvider def checksum(digits: Sequence[int], scale: List[int...
["tests/providers/test_ssn.py::TestSkSK::test_birth_number", "tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn", "tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn_checksum", "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/__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
43
5
1,983
0
0.6
1
0.75
1
0.473833
81.6965
4,063
swe_smith::train::48006
swe_smith
train
48,006
sqlfluff__sqlfluff.50a1c4b6.func_basic__qr0quf9p
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
ParseContext initialization breaks parser functionality with incorrect default values #### Description The ParseContext class initialization has been modified with incorrect default values that break core parser functionality. The parser cache is being initialized with a defaultdict that returns "default" strings ins...
diff --git a/src/sqlfluff/core/parser/context.py b/src/sqlfluff/core/parser/context.py index 7edf331..4f38161 100644 --- a/src/sqlfluff/core/parser/context.py +++ b/src/sqlfluff/core/parser/context.py @@ -74,46 +74,20 @@ class ParseContext: indentation of certain features. Defaults to None. ""...
["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof_take_longest_match", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof_take_first", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_anyof_modes[ParseMode.GREEDY-options4-terminators4-input_sli...
["test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar__oneof__copy", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[True]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser__grammar_oneof[False]", "test/core/parser/grammar/grammar_anyof_test.py::test__parser_...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
42
49
1,996
0
0.6
1
0.75
1
0.472667
81.693
4,064
swe_smith::train::19719
swe_smith
train
19,719
kurtmckee__feedparser.cad965a3.combine_module__czgtd5dz
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
Date parsing functions broken after recent changes #### Description Several date parsing functions are not working correctly. The asctime parser seems to be trying to use variables before they're defined, and the ISO8601 parser has some logic issues with ordinal handling. The Korean OnBlog parser is also returning in...
diff --git a/feedparser/datetimes/asctime.py b/feedparser/datetimes/asctime.py index d7f8db0..516153a 100644 --- a/feedparser/datetimes/asctime.py +++ b/feedparser/datetimes/asctime.py @@ -44,6 +44,24 @@ _months = [ def _parse_date_asctime(dt): + + # Reassemble the parts in an RFC822-compatible order and parse ...
["tests/test_ill_formed.py::test_http_conditions[info0]", "tests/test_date_parsers.py::test_date_parser[_parse_date_iso8601-031231-expected_value6]", "tests/test_date_parsers.py::test_date_parser[_parse_date_iso8601--03-12-expected_value8]", "tests/test_date_parsers.py::test_date_parser[_parse_date_onblog--None]", "tes...
["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
3
78
9
1,276
0
0.6
1
0.75
1
0.472667
81.693
4,065
swe_smith::train::45218
swe_smith
train
45,218
dask__dask.5f61e423.combine_module__4uf5jrec
swesmith/dask__dask.5f61e423
dask/dask
python
null
`stack()` function doesn't accept `chunks` parameter causing TypeError #### Description When using `dask.array.indices()` or operations that rely on `stack()` internally, a TypeError is raised because the `stack()` function is being called with an unexpected `chunks` keyword argument. #### Steps/Code to Reproduce `...
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_slicing.py::test_index_with_int_dask_array_nanchunks[1]", "dask/array/tests/test_slicing.py::test_index_with_int_dask_a...
["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
2
85
11
1,136
0
0.6
1
0.75
1
0.472667
81.693
4,066
swe_smith::train::24993
swe_smith
train
24,993
pylint-dev__astroid.b114f6b5.combine_file__7a0iwy44
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Module import resolution broken for namespace packages and zip files #### Description After recent changes, module import resolution is failing for various types of modules including namespace packages, zip files, and egg files. The import system appears to be returning incorrect module specifications with swapped or...
diff --git a/astroid/interpreter/_import/spec.py b/astroid/interpreter/_import/spec.py index e0c54d4..4ae56cf 100644 --- a/astroid/interpreter/_import/spec.py +++ b/astroid/interpreter/_import/spec.py @@ -181,44 +181,6 @@ class ImportlibFinder(Finder): return ModuleSpec(name=modname, location=file_...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_mul...
["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
69
84
1,454
0
0.6
1
0.75
1
0.472333
81.692
4,067
swe_smith::train::32760
swe_smith
train
32,760
pydantic__pydantic.acb0f10f.lm_rewrite__504e93th
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
### Issue with Sequence Validation in Pydantic #### Describe the Bug It seems that the recent changes to the `sequence_validator` function have introduced an issue with how sequences are validated. Specifically, the validation logic for sequences like `list`, `tuple`, and `deque` is not functioning as expected. This ...
diff --git a/pydantic/_internal/_validators.py b/pydantic/_internal/_validators.py index 8261c98..e47ffe6 100644 --- a/pydantic/_internal/_validators.py +++ b/pydantic/_internal/_validators.py @@ -24,45 +24,10 @@ from pydantic._internal._import_utils import import_cached_field_info from pydantic.errors import Pydantic...
["tests/test_discriminated_union.py::test_sequence_discriminated_union_validation", "tests/test_discriminated_union.py::test_sequence_discriminated_union_validation_with_validator", "tests/test_docs.py::test_docs_examples[docs/api/standard_library_types.md:463-477]", "tests/test_docs.py::test_docs_examples[docs/api/sta...
["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
41
18
2,011
0
0.6
1
0.75
1
0.471833
81.6905
4,068
r2e_gym::train::166
r2e_gym
train
166
orange3__cb236e30140c33799167aedc1576fadb8b105f2b
orange3
biolab/orange3
python
cb236e30140c33799167aedc1576fadb8b105f2b
**Analysis:** - **Key Parts:** - **Commit Message:** "Pythagorean Forest: Fix report." - **Test Results:** The `test_report` was failing with an `AttributeError` stating that `'OWPythagoreanForest' object has no attribute 'scene'`. - **Commit Patch:** The `send_report` method was modified to build an HTML report...
diff --git a/Orange/widgets/visualize/owpythagoreanforest.py b/Orange/widgets/visualize/owpythagoreanforest.py --- a/Orange/widgets/visualize/owpythagoreanforest.py +++ b/Orange/widgets/visualize/owpythagoreanforest.py @@ -3,11 +3,13 @@ from typing import Any, Callable, Optional from AnyQt.QtCore import Qt, QRectF,...
diff --git a/Orange/widgets/visualize/tests/test_owpythagoreanforest.py b/Orange/widgets/visualize/tests/test_owpythagoreanforest.py --- a/Orange/widgets/visualize/tests/test_owpythagoreanforest.py +++ b/Orange/widgets/visualize/tests/test_owpythagoreanforest.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring,prot...
null
null
namanjain12/orange3_final:cb236e30140c33799167aedc1576fadb8b105f2b
true
null
1
76
null
2,022
0
0.75
1
0.6375
1
0.590333
81.68975
4,069
swe_smith::train::36053
swe_smith
train
36,053
stanfordnlp__dspy.651a4c71.pr_7872
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Bug: Non-image file types (like PDFs) no longer supported in encode_image function ## Description The `encode_image` function in `dspy/adapters/types/image.py` no longer supports non-image file types like PDFs. The function now specifically checks for `data:image/` prefix instead of just `data:`, which breaks suppo...
diff --git a/dspy/adapters/types/image.py b/dspy/adapters/types/image.py index 1ca1dc6..c894ec8 100644 --- a/dspy/adapters/types/image.py +++ b/dspy/adapters/types/image.py @@ -1,6 +1,5 @@ import base64 import io -import mimetypes import os import re from typing import Any, Dict, List, Union @@ -81,23 +80,23 @@ de...
["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
72
4
1,388
0
0.6
1
0.75
1
0.471333
81.689
4,070
swe_smith::train::36104
swe_smith
train
36,104
stanfordnlp__dspy.651a4c71.pr_8162
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# ImportError: cannot import name 'apply_sync_streaming' from 'dspy.streaming.streamify' ## Description When trying to use the `apply_sync_streaming` function to convert an async streaming generator to a sync generator, I get an import error. This function seems to have been removed or is missing from the module. ##...
diff --git a/dspy/streaming/__init__.py b/dspy/streaming/__init__.py index 9d5ae80..644862f 100644 --- a/dspy/streaming/__init__.py +++ b/dspy/streaming/__init__.py @@ -1,5 +1,5 @@ from dspy.streaming.messages import StatusMessage, StatusMessageProvider, StreamResponse -from dspy.streaming.streamify import apply_sync_...
["tests/streaming/test_streaming.py::test_sync_status_streaming"]
["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
2
53
1
1,766
0
0.6
1
0.75
1
0.471
81.688
4,071
swe_smith::train::52690
swe_smith
train
52,690
pydicom__pydicom.7d361b3d.lm_rewrite__fz0fqut4
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Issue: Adding Nodes Beyond Maximum Depth in FileSet Raises Unexpected Error When attempting to add a custom node to a `FileSet` with a directory structure depth exceeding the allowed limit, an unexpected error is raised. The current implementation should handle this scenario gracefully by raising a `ValueError` wi...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..3fd255e 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -1158,35 +1158,58 @@ class FileSet: else: ds = ds_or_path - # Check the supplied nodes - if leaf.depth > 7: - raise Val...
["tests/test_fileset.py::TestFileSet::test_add_custom_too_deep"]
["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
48
1
1,865
0
0.6
1
0.75
1
0.470833
81.6875
4,072
swe_smith::train::5514
swe_smith
train
5,514
PyCQA__flake8.cf1542ce.func_pm_class_rm_funcs__5v5w0noe
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
FileChecker crashes when processing files with syntax errors #### Description When flake8 encounters files with syntax errors, the FileChecker fails to process them properly due to missing methods that were accidentally removed. This causes flake8 to crash instead of gracefully handling syntax errors and reporting th...
diff --git a/src/flake8/checker.py b/src/flake8/checker.py index 329a2cc..6ac1f35 100644 --- a/src/flake8/checker.py +++ b/src/flake8/checker.py @@ -353,65 +353,6 @@ class FileChecker: exception=all_exc, ) - @staticmethod - def _extract_syntax_information(exception: Exception) -> t...
["tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handling_syntaxerrors_across_pythons", "tests/integration/test_main.py::test_form_feed_line_split", "tests/integration/test_main.py::test_e101_indent_char_does_not_reset", "tests/integration/test_main.py::test_statistics_...
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_gen]", "tests/in...
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
91
22
1,003
0
0.6
1
0.75
1
0.4705
81.6865
4,073
swe_smith::train::45992
swe_smith
train
45,992
conan-io__conan.86f29e13.pr_12117
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Meson Toolchain Configuration Issue with Additional Machine Files #### Code Sample Here's a minimal example to reproduce the issue: ```python from conan import ConanFile from conan.tools.meson import Meson import textwrap class Pkg(ConanFile): settings = "os", "compiler", "build_type", "arch" generators...
diff --git a/conan/tools/meson/meson.py b/conan/tools/meson/meson.py index 17fa592..9c1f523 100644 --- a/conan/tools/meson/meson.py +++ b/conan/tools/meson/meson.py @@ -32,21 +32,20 @@ class Meson(object): generators_folder = self._conanfile.generators_folder cross = os.path.join(generators_folder, Me...
["test/functional/toolchains/meson/test_meson.py::MesonToolchainTest::test_meson_default_dirs", "test/functional/toolchains/meson/test_meson.py::test_meson_and_additional_machine_files_composition"]
["test/integration/toolchains/meson/test_mesontoolchain.py::test_apple_meson_keep_user_custom_flags", "test/integration/toolchains/meson/test_mesontoolchain.py::test_extra_flags_via_conf", "test/integration/toolchains/meson/test_mesontoolchain.py::test_extra_flags_via_toolchain", "test/integration/toolchains/meson/test...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
27
2
2,280
0
0.6
1
0.75
1
0.47
81.685
4,074
swe_smith::train::6539
swe_smith
train
6,539
mahmoud__boltons.3bfcfdd0.lm_rewrite__t5x9izub
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
FunctionBuilder fails to handle keyword-only arguments **Describe the bug** The `FunctionBuilder` class is not correctly handling functions with keyword-only arguments. When attempting to create a function with keyword-only arguments, a `TypeError` is raised unexpectedly. **To Reproduce** Steps to reproduce the behav...
diff --git a/boltons/funcutils.py b/boltons/funcutils.py index 0bdc28e..148f001 100644 --- a/boltons/funcutils.py +++ b/boltons/funcutils.py @@ -856,38 +856,44 @@ class FunctionBuilder: :func:`~boltons.funcutils.wraps`. """ execdict = execdict or {} - body = self.body or self._default_...
["tests/test_funcutils_fb.py::test_wraps_basic", "tests/test_funcutils_fb.py::test_FunctionBuilder_add_arg", "tests/test_funcutils_fb.py::test_wraps_expected", "tests/test_funcutils_fb_py3.py::test_wraps_py3", "tests/test_funcutils_fb_py3.py::test_update_wrapper_partial[functools]", "tests/test_funcutils_fb_py3.py::tes...
["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac...
jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0
true
null
1
60
9
1,617
0
0.6
1
0.75
1
0.4695
81.6835
4,075
swe_smith::train::2781
swe_smith
train
2,781
cknd__stackprinter.219fcc52.lm_rewrite__ss6i64s1
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
# Missing template keys in ColorfulFrameFormatter._format_source Hi! I'm using stackprinter to get nicely formatted stack traces in my application, but after upgrading to the latest version, I'm getting an AttributeError when trying to format exceptions. ## Steps to reproduce 1. Install the latest version of stackp...
diff --git a/stackprinter/frame_formatting.py b/stackprinter/frame_formatting.py index 136920e..05a32da 100644 --- a/stackprinter/frame_formatting.py +++ b/stackprinter/frame_formatting.py @@ -305,33 +305,52 @@ class ColorfulFrameFormatter(FrameFormatter): return msg def _format_source(self, source_map,...
["tests/test_formatting.py::test_exception_formatting"]
["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
71
1
1,396
0
0.6
1
0.75
1
0.469333
81.683
4,076
swe_smith::train::21111
swe_smith
train
21,111
tobymao__sqlglot.036601ba.lm_rewrite__cfjfnvhf
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
### Issue: Unexpected Behavior in SQL Expression Optimization #### Description After applying recent changes to the `isolate_table_selects` function, there seems to be an issue with how SQL expressions are being optimized. The function is intended to isolate table selects within an expression, but it appears to be ca...
diff --git a/sqlglot/optimizer/isolate_table_selects.py b/sqlglot/optimizer/isolate_table_selects.py index a6524b8..ce40a55 100644 --- a/sqlglot/optimizer/isolate_table_selects.py +++ b/sqlglot/optimizer/isolate_table_selects.py @@ -5,31 +5,45 @@ from sqlglot.schema import ensure_schema def isolate_table_selects(e...
["tests/test_optimizer.py::TestOptimizer::test_canonicalize", "tests/test_optimizer.py::TestOptimizer::test_expand_alias_refs", "tests/test_optimizer.py::TestOptimizer::test_file_schema", "tests/test_optimizer.py::TestOptimizer::test_isolate_table_selects", "tests/test_optimizer.py::TestOptimizer::test_lateral_annotati...
["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
68
12
1,455
0
0.6
1
0.75
1
0.469167
81.6825
4,077
swe_smith::train::345
swe_smith
train
345
oauthlib__oauthlib.1fd52536.combine_module__snl82dez
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# [Bug]: OAuth1 Signature Validation Issues ## Description I've discovered several issues with the OAuth1 signature validation in the latest version: 1. Duplicate OAuth parameters are not properly detected 2. The signature validation always returns True, even when signatures are invalid 3. Non-form-urlencoded reques...
diff --git a/oauthlib/oauth1/rfc5849/endpoints/base.py b/oauthlib/oauth1/rfc5849/endpoints/base.py index 8d3d89c..9d689e7 100644 --- a/oauthlib/oauth1/rfc5849/endpoints/base.py +++ b/oauthlib/oauth1/rfc5849/endpoints/base.py @@ -67,18 +67,16 @@ class BaseEndpoint: return signature_type, params, oauth_params ...
["tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_duplicate_params", "tests/oauth1/rfc5849/endpoints/test_signature_only.py::SignatureOnlyEndpointTest::test_validate_client_key", "tests/oauth1/rfc5849/endpoints/test_signature_only.py::SignatureOnlyEndpointTest::test_validate_signature"]
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
2
38
3
2,054
0
0.6
1
0.75
1
0.469
81.682
4,078
swe_bench::dev::161
swe_bench
dev
161
pyvista__pyvista-3747
pyvista/pyvista
pyvista/pyvista
python
0f800862380f60efb1841e5e0b116e945a3079a9
`bounds` property return type is mutable from `MultiBlock` The `bounds` property has a different return type for meshes and `MultiBlock` objects: ``` >>> import pyvista as pv >>> slices = pv.Sphere().slice_orthogonal() # MultiBlock returns list (mutable) >>> slices.bounds [-0.49926671385765076, 0.49926671385765076, -0...
@banesullivan Possibly related to #3180 .
diff --git a/pyvista/core/composite.py b/pyvista/core/composite.py --- a/pyvista/core/composite.py +++ b/pyvista/core/composite.py @@ -132,7 +132,7 @@ def wrap_nested(self): self.SetBlock(i, pyvista.wrap(block)) @property - def bounds(self) -> List[float]: + def bounds(self) -> Tuple[float...
diff --git a/tests/test_composite.py b/tests/test_composite.py --- a/tests/test_composite.py +++ b/tests/test_composite.py @@ -135,7 +135,7 @@ def test_multi_block_set_get_ers(): for i in [0, 2, 3, 4, 5]: assert multi[i] is None # Check the bounds - assert multi.bounds == list(data.bounds) + as...
["tests/test_composite.py::test_multi_block_set_get_ers"]
["tests/test_composite.py::test_multi_block_init_vtk", "tests/test_composite.py::test_multi_block_init_dict", "tests/test_composite.py::test_multi_block_keys", "tests/test_composite.py::test_multi_block_init_list", "tests/test_composite.py::test_multi_block_append", "tests/test_composite.py::test_replace", "tests/test_...
null
true
2022-12-24T21:01:09Z
4
28
1
623
0
0.8
1
0.7
0.85
0.197167
81.679
4,079
swe_smith::train::42813
swe_smith
train
42,813
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__7ovsexkl
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
# Format checkers not working with default formats ### Describe the bug I've found an issue with the `FormatChecker` class. When creating a new instance of `FormatChecker` without any arguments, it seems that the default format checkers are not being registered properly. ### Steps/Code to Reproduce ```python from j...
diff --git a/jsonschema/_format.py b/jsonschema/_format.py index 789fe4f..ed207c6 100644 --- a/jsonschema/_format.py +++ b/jsonschema/_format.py @@ -185,51 +185,40 @@ _draft_checkers: dict[str, FormatChecker] = dict( ) -def _checks_drafts( - name=None, - draft3=None, - draft4=None, - draft6=None, - ...
["jsonschema/tests/test_format.py::TestFormatChecker::test_format_checkers_come_with_defaults"]
["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
77
1
1,268
0
0.6
1
0.75
1
0.468
81.679
4,080
swe_smith::train::2956
swe_smith
train
2,956
madzak__python-json-logger.5f85723f.lm_rewrite__4ihpqcn1
swesmith/madzak__python-json-logger.5f85723f
madzak/python-json-logger
python
null
### Issue with JsonFormatter: Log Record Serialization Fails #### Description I've encountered an issue with the `JsonFormatter` class in the `pythonjsonlogger` module. After a recent update, it seems that the log record serialization is not functioning as expected. The formatter is not correctly handling various log...
diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py index 519a64d..d9ab03e 100644 --- a/src/pythonjsonlogger/jsonlogger.py +++ b/src/pythonjsonlogger/jsonlogger.py @@ -255,31 +255,26 @@ class JsonFormatter(logging.Formatter): def format(self, record: logging.LogRecord) -> str: ...
["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg...
["tests/test_jsonlogger.py::TestJsonLogger::test_merge_record_extra", "tests/test_jsonlogger.py::TestJsonLogger::test_unknown_format_key"]
jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f
true
null
1
45
18
1,908
0
0.6
1
0.75
1
0.468
81.679
4,081
swe_smith::train::1945
swe_smith
train
1,945
agronholm__typeguard.b6a7e438.lm_rewrite__4ulsgec6
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# TypeguardTransformer not working correctly after refactoring source_to_code method ### Describe the bug After refactoring the `source_to_code` method in `TypeguardLoader` class, the import hook functionality is broken. The transformer is not properly instrumenting code for runtime type checking. ### How to Reprodu...
diff --git a/src/typeguard/_importhook.py b/src/typeguard/_importhook.py index 0d1c627..1321e16 100644 --- a/src/typeguard/_importhook.py +++ b/src/typeguard/_importhook.py @@ -53,41 +53,36 @@ def optimized_cache_from_source(path: str, debug_override: bool | None = None) - class TypeguardLoader(SourceFileLoader): ...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_pytest_plugin.py::test_config_options", "tests/test_pytest_plugin.py::test_commandline_options"]
["tests/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
61
4
1,588
0
0.6
1
0.75
1
0.468
81.679
4,082
swe_smith::train::45431
swe_smith
train
45,431
dask__dask.5f61e423.lm_rewrite__mkfjcfha
swesmith/dask__dask.5f61e423
dask/dask
python
null
# kurtosis function returns scalar instead of dask array for 1D inputs When using the `kurtosis` function from `dask.array.stats` with a 1D array, it returns a scalar value instead of a dask array. This breaks the expected behavior and causes issues when trying to use the result in further dask operations. ## Minimal...
diff --git a/dask/array/stats.py b/dask/array/stats.py index 9e22be7..3f6fd76 100644 --- a/dask/array/stats.py +++ b/dask/array/stats.py @@ -293,34 +293,72 @@ def skewtest(a, axis=0, nan_policy="propagate"): @derived_from(scipy.stats) -def kurtosis(a, axis=0, fisher=True, bias=True, nan_policy="propagate"): +def k...
["dask/array/tests/test_stats.py::test_measures[True-kurtosis-kwargs1]", "dask/array/tests/test_stats.py::test_measures[True-kurtosis-kwargs2]", "dask/array/tests/test_stats.py::test_bias_raises", "dask/array/tests/test_stats.py::test_kurtosis_single_return_type"]
["dask/array/tests/test_stats.py::test_measures[True-skew-kwargs0]", "dask/array/tests/test_stats.py::test_measures[False-skew-kwargs0]", "dask/array/tests/test_stats.py::test_measures[False-kurtosis-kwargs1]", "dask/array/tests/test_stats.py::test_measures[False-kurtosis-kwargs2]", "dask/array/tests/test_stats.py::tes...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
76
4
1,287
0
0.6
1
0.75
1
0.467833
81.6785
4,083
swe_smith::train::1672
swe_smith
train
1,672
agronholm__typeguard.b6a7e438.combine_file__nmuahjx1
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Multiple type checking issues in typeguard ## Description I've found several issues with the type checking logic in typeguard. The most obvious problems appear when working with TypeVars, Self types, and Any types. For example, when using the Self type in a method signature: ```python class Foo: @typechecked ...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..831c7af 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -533,25 +533,24 @@ def check_typevar( ) -> None: if origin_type.__bound__ is not None: annotation = ( - Type[origin_type.__bou...
["tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_fail", "tests/test_checkers.py::TestFloat::test_bad_type", "tests/test_checkers.py::TestComplexNumber::test_bad_type", "tests/test_checkers.py::TestCallable::test_bad_type", "tests/test_checkers.py::TestCallable::test_too...
["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::TestBytesLike::test_valid[bytes]", "tests/test_checkers.py::TestBytesLike:...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
47
185
1,867
0
0.6
1
0.75
1
0.467833
81.6785
4,084
swe_smith::train::51643
swe_smith
train
51,643
pydicom__pydicom.7d361b3d.combine_module__rbyzoufe
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Private dictionary description returns wrong tuple index #### Description When calling `private_dictionary_description()` with a valid private tag and creator, the function returns the wrong element from the private dictionary entry tuple, causing incorrect descriptions to be returned. #### Steps/Code to Reproduce ...
diff --git a/src/pydicom/datadict.py b/src/pydicom/datadict.py index b4f9f3a..40b8990 100644 --- a/src/pydicom/datadict.py +++ b/src/pydicom/datadict.py @@ -653,4 +653,4 @@ def private_dictionary_description(tag: TagType, private_creator: str) -> str: If the tag is not present in the private dictionary, ...
["tests/test_dataelem.py::TestDataElement::test_private_tag_in_repeater_range", "tests/test_dataelem.py::TestDataElement::test_private_repeater_tag", "tests/test_dataelem.py::TestRawDataElement::test_read_known_private_tag_implicit", "tests/test_dataelem.py::TestRawDataElement::test_read_known_private_tag_explicit", "t...
["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
85
40
1,102
0
0.6
1
0.75
1
0.467
81.676
4,085
swe_smith::train::10401
swe_smith
train
10,401
paramiko__paramiko.23f92003.func_basic__bis5sw7g
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH authentication methods broken after recent changes #### Description SSH authentication is failing across multiple methods including password, publickey, keyboard-interactive, and GSSAPI authentication. Connections that previously worked are now being rejected by the server. #### Steps/Code to Reproduce ```pytho...
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index bc7f298..d87cda3 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -386,15 +386,15 @@ class AuthHandler: m.add_string("ssh-connection") m.add_string(self.auth_method) if self.auth_method =...
["tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::utf8", "tests/auth.py::AuthHandler_::non_utf8", "tests/auth.py::SHA2SignaturePubkeys::ssh_rsa_still_used_when_sha2_disabled", "tests/auth.py::SHA2SignaturePubkeys::sha2_512", "tests/auth.py::SHA2Si...
["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
71
66
1,381
0
0.6
1
0.75
1
0.466833
81.6755
4,086
swe_smith::train::51134
swe_smith
train
51,134
marshmallow-code__apispec.8b421526.combine_module__wwn9hla7
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
MarshmallowPlugin initialization breaks schema resolution #### Description After recent changes, the MarshmallowPlugin fails to properly initialize and resolve schemas. The plugin sets `self.spec = None` during initialization instead of preserving the spec reference, causing schema resolution to fail. #### Steps/Cod...
diff --git a/src/apispec/ext/marshmallow/__init__.py b/src/apispec/ext/marshmallow/__init__.py index d4f1a54..6023f5a 100644 --- a/src/apispec/ext/marshmallow/__init__.py +++ b/src/apispec/ext/marshmallow/__init__.py @@ -130,15 +130,15 @@ class MarshmallowPlugin(BasePlugin): def init_spec(self, spec: APISpec) ->...
["tests/test_ext_marshmallow.py::TestDefinitionHelper::test_resolve_schema_dict_auto_reference[AnalysisSchema]", "tests/test_ext_marshmallow.py::TestDefinitionHelper::test_resolve_schema_dict_auto_reference[schema1]", "tests/test_ext_marshmallow.py::TestDefinitionHelper::test_resolve_schema_dict_auto_reference_in_list[...
["tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestTags::test_tag[...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
true
null
2
76
120
1,280
0
0.6
1
0.75
1
0.466667
81.675
4,087
swe_smith::train::1180
swe_smith
train
1,180
jd__tenacity.0d40e76f.pr_390
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
# Missing import for iscoroutinefunction in tenacity ## Description When using the `retry` decorator, I'm getting a `NameError` because `iscoroutinefunction` is not defined. This happens when trying to decorate both regular functions and coroutines. ## How to Reproduce Create a simple script that uses the retry dec...
diff --git a/tenacity/__init__.py b/tenacity/__init__.py index 72eba04..01d2811 100644 --- a/tenacity/__init__.py +++ b/tenacity/__init__.py @@ -94,8 +94,8 @@ if t.TYPE_CHECKING: from .wait import WaitBaseT -WrappedFnReturnT = t.TypeVar("WrappedFnReturnT") WrappedFn = t.TypeVar("WrappedFn", bound=t.Callable[....
["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
72
123
1,358
0
0.6
1
0.75
1
0.466333
81.674
4,088
swe_smith::train::24516
swe_smith
train
24,516
sunpy__sunpy.f8edfd5c.combine_module__kpzcorb6
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Map superpixel method fails with NameError #### Description The `superpixel` method on Map objects is broken and raises a `NameError` when called. The method fails because several variables are not defined in the scope where they're being used. #### Steps/Code to Reproduce ```python import sunpy.map import astropy....
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..90965e1 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -2259,9 +2259,6 @@ class GenericMap(NDData): else: data = self.data.copy() - reshaped_data = reshape_image_to_4d_superpixel(data, [dimensions[1],...
["sunpy/map/tests/test_mapbase.py::test_superpixel_simple_map", "sunpy/map/tests/test_mapbase.py::test_superpixel_dims_values[sum]", "sunpy/map/tests/test_mapbase.py::test_superpixel_dims_values[mean]", "sunpy/map/tests/test_mapbase.py::test_superpixel_metadata[sum-dimensions0]", "sunpy/map/tests/test_mapbase.py::test_...
["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
86
12
1,076
0
0.6
1
0.75
1
0.466
81.673
4,089
swe_smith::train::39888
swe_smith
train
39,888
tornadoweb__tornado.d5ac65c1.func_pm_remove_cond__dxw2q2bm
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
Template parsing broken for many directives #### Description Template parsing is not working correctly for several template directives. Many template features like `apply`, `block`, `include`, `set`, `for`, `while`, `if`, `try`, and others are not being processed properly. #### Steps/Code to Reproduce ```python fro...
diff --git a/tornado/template.py b/tornado/template.py index 0064c6f..44c03c9 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -891,15 +891,6 @@ def _parse( start_brace = reader.consume(2) line = reader.line - # Template directives may be escaped as "{{!" or "{%!". - # In ...
["test_custom_escape (tornado.test.template_test.AutoEscapeTest)", "test_default_off (tornado.test.template_test.AutoEscapeTest)", "test_default_on (tornado.test.template_test.AutoEscapeTest)", "test_extended_block (tornado.test.template_test.AutoEscapeTest)", "test_manual_minimize_whitespace (tornado.test.template_tes...
["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
true
null
1
75
32
1,292
0
0.6
1
0.75
1
0.465333
81.671
4,090
swe_smith::train::2670
swe_smith
train
2,670
cknd__stackprinter.219fcc52.combine_file__pim7hbhr
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
# Incorrect formatting of dictionaries and callables in stackprinter ### Describe the bug When using stackprinter to format values, dictionaries and callables are not being formatted correctly. The output is completely wrong and unusable. ```python import stackprinter # Example with a dictionary my_dict = {'a': 1, ...
diff --git a/stackprinter/prettyprinting.py b/stackprinter/prettyprinting.py index 6e17f97..eaea897 100644 --- a/stackprinter/prettyprinting.py +++ b/stackprinter/prettyprinting.py @@ -42,30 +42,30 @@ def format_value(value, indent=0, truncation=None, wrap=60, string """ - if depth > max_depth: + if d...
["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting"]
["tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
35
2
2,090
0
0.6
1
0.75
1
0.465
81.67
4,091
swe_smith::train::49398
swe_smith
train
49,398
mozilla__bleach.73871d76.func_pm_class_rm_funcs__cip0wd5b
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTMLSerializer missing __init__ method causes TypeError #### Description After recent changes, the HTMLSerializer class is missing its `__init__` method, causing a TypeError when trying to instantiate it with keyword arguments. #### Steps/Code to Reproduce ```python from bleach._vendor.html5lib.serializer import HT...
diff --git a/bleach/_vendor/html5lib/serializer.py b/bleach/_vendor/html5lib/serializer.py index 5666f49..d86eb1a 100644 --- a/bleach/_vendor/html5lib/serializer.py +++ b/bleach/_vendor/html5lib/serializer.py @@ -132,95 +132,6 @@ class HTMLSerializer(object): "alphabetical_attributes", "inject_meta_char...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["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
90
185
990
0
0.6
1
0.75
1
0.465
81.67
4,092
swe_smith::train::51501
swe_smith
train
51,501
pydicom__pydicom.7d361b3d.combine_file__fclzhlgj
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Pixel data compression and bit unpacking broken after recent changes #### Description After some recent changes, pixel data compression is failing with `NameError` exceptions, and bit unpacking is producing incorrect results. The compression functions seem to be missing variable definitions, and the bit unpacking log...
diff --git a/src/pydicom/pixels/utils.py b/src/pydicom/pixels/utils.py index f9a31a8..bc48c3c 100644 --- a/src/pydicom/pixels/utils.py +++ b/src/pydicom/pixels/utils.py @@ -409,7 +409,6 @@ def compress( if arr is None: # Check the dataset compression state file_meta = ds.get("file_meta", {}) - ...
["tests/pixels/test_encoder_base.py::TestDatasetCompress::test_compress_inplace", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_encapsulate_extended", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_planar_configuration_rle", "tests/pixels/test_encoder_base.py::TestFuture::test_compress", ...
["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
94
30
909
0
0.6
1
0.75
1
0.464833
81.6695
4,093
swe_smith::train::188
swe_smith
train
188
oauthlib__oauthlib.1fd52536.combine_module__06y8rdsd
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# OAuth1 Authorization Endpoint Issues ## Description I've found several issues with the OAuth1 authorization endpoint that are causing problems in our application: 1. The `get_realms_and_credentials` method in the authorization endpoint is not working correctly. When calling this method, it returns an empty list of...
diff --git a/oauthlib/oauth1/rfc5849/endpoints/authorization.py b/oauthlib/oauth1/rfc5849/endpoints/authorization.py index 00d9576..230f333 100644 --- a/oauthlib/oauth1/rfc5849/endpoints/authorization.py +++ b/oauthlib/oauth1/rfc5849/endpoints/authorization.py @@ -146,13 +146,13 @@ class AuthorizationEndpoint(BaseEndpo...
["tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointTest::test_get_realms_and_credentials", "tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointTest::test_verify_token", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_enforce_ssl", "tests/oauth1/rfc5...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
2
17
4
2,447
0
0.6
1
0.75
1
0.4645
81.6685
4,094
swe_smith::train::75
swe_smith
train
75
oauthlib__oauthlib.1fd52536.combine_file__f4lomc8f
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2 metadata validation logic inverted causing incorrect validation errors #### Description The metadata endpoint validation is throwing errors for valid configurations and accepting invalid ones. When creating a MetadataEndpoint with proper OAuth2 server configuration, validation errors are raised for correctly f...
diff --git a/oauthlib/oauth2/rfc6749/endpoints/metadata.py b/oauthlib/oauth2/rfc6749/endpoints/metadata.py index 34274cb..8eb86f7 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/metadata.py +++ b/oauthlib/oauth2/rfc6749/endpoints/metadata.py @@ -64,24 +64,24 @@ class MetadataEndpoint(BaseEndpoint): return ...
["tests/oauth2/rfc6749/endpoints/test_metadata.py::MetadataEndpointTest::test_create_metadata_response", "tests/oauth2/rfc6749/endpoints/test_metadata.py::MetadataEndpointTest::test_mandatory_fields", "tests/oauth2/rfc6749/endpoints/test_metadata.py::MetadataEndpointTest::test_openid_oauth2_preconfigured", "tests/oauth...
["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
67
6
1,444
0
0.6
1
0.75
1
0.464
81.667
4,095
swe_smith::train::5101
swe_smith
train
5,101
agronholm__exceptiongroup.0b4f4937.combine_module__fm0c4bll
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
BaseExceptionGroup no longer inherits from BaseException #### Description After a recent change, `BaseExceptionGroup` appears to have lost its inheritance from `BaseException`, causing issues when trying to raise or catch exception groups. This breaks the fundamental behavior of exception groups as they can no longer...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..e7dbd7b 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -53,7 +53,7 @@ def _derive_and_copy_attributes(self, excs): return eg -class BaseExceptionGroup(BaseException, Gene...
["tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tes...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_group]", "tests/test_catch.py::test_catch_single_no_match"]
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
2
72
84
1,343
0
0.6
1
0.75
1
0.463833
81.6665
4,096
swe_smith::train::21356
swe_smith
train
21,356
rubik__radon.54b88e58.combine_module__d42mfzxb
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
# MIHarvester.as_xml() doesn't raise NotImplementedError anymore and cc_to_terminal() calculation is incorrect ### What happened? I found two issues in the codebase: 1. The `MIHarvester.as_xml()` method no longer raises a `NotImplementedError` as it should. It's just a placeholder method that should raise an error w...
diff --git a/radon/cli/harvest.py b/radon/cli/harvest.py index ac14fe5..54e546e 100644 --- a/radon/cli/harvest.py +++ b/radon/cli/harvest.py @@ -362,7 +362,7 @@ class MIHarvester(Harvester): def as_xml(self): '''Placeholder method. Currently not implemented.''' - raise NotImplementedError('Cannot...
["radon/tests/test_cli_harvest.py::test_mi_as_xml", "radon/tests/test_cli_tools.py::test_cc_to_terminal"]
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
2
9
2
2,603
0
0.6
1
0.75
1
0.463833
81.6665
4,097
swe_smith::train::5078
swe_smith
train
5,078
agronholm__exceptiongroup.0b4f4937.combine_file__leti1lvr
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
# Issues with ExceptionGroup formatting and display I've encountered problems with the formatting and display of exception groups in the exceptiongroup module. The formatting logic seems to be broken, causing incorrect indentation and structure when displaying exception groups. Here's a minimal example to reproduce t...
diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py index 4c52d77..80b0823 100644 --- a/src/exceptiongroup/_formatting.py +++ b/src/exceptiongroup/_formatting.py @@ -49,7 +49,7 @@ class _ExceptionPrintContext: self.need_close = False def indent(self): - return " " *...
["tests/test_formatting.py::test_exceptionhook", "tests/test_formatting.py::test_exceptiongroup_as_cause", "tests/test_formatting.py::test_exceptiongroup_loop", "tests/test_formatting.py::test_exceptionhook_format_exception_only", "tests/test_formatting.py::test_formatting_syntax_error", "tests/test_formatting.py::test...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
73
28
1,322
0
0.6
1
0.75
1
0.463667
81.666
4,098
swe_smith::train::44760
swe_smith
train
44,760
mahmoud__glom.fb3c4e76.func_basic__jsv5lp7u
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
T and S path evaluation broken after recent changes #### Description Basic T (target) and S (scope) path evaluation is completely broken. Simple operations like `T.attr` or `S.var` are failing with various errors. #### Steps/Code to Reproduce ```python from glom import glom, T, S, A # Basic T path access fails tar...
diff --git a/glom/core.py b/glom/core.py index cee71a3..2a08d99 100644 --- a/glom/core.py +++ b/glom/core.py @@ -1537,122 +1537,109 @@ def _s_first_magic(scope, key, _t): def _t_eval(target, _t, scope): t_path = _t.__ops__ - i = 1 + i = 0 fetch_till = len(t_path) root = t_path[0] if root is...
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
["glom/test/test_basic.py::test_abstract_iterable", "glom/test/test_basic.py::test_glom_extra_kwargs", "glom/test/test_basic.py::test_api_repr", "glom/test/test_basic.py::test_bbformat", "glom/test/test_basic.py::test_bbrepr", "glom/test/test_check.py::test_check_multi", "glom/test/test_check.py::test_check_signature",...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
97
102
842
0
0.6
1
0.75
1
0.463667
81.666
4,099
swe_smith::train::1993
swe_smith
train
1,993
pdfminer__pdfminer.six.1a8bd2f7.combine_file__aj8swz81
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFDevice close() method raises RuntimeError when no resource attribute exists #### Description When calling `close()` on a PDFDevice instance that doesn't have a `resource` attribute, a RuntimeError is raised with the message "No resource to close". This breaks existing code that expects the close method to be a no-...
diff --git a/pdfminer/pdfdevice.py b/pdfminer/pdfdevice.py index 2374601..3ac55df 100644 --- a/pdfminer/pdfdevice.py +++ b/pdfminer/pdfdevice.py @@ -46,13 +46,37 @@ class PDFDevice: self.close() def close(self) -> None: - pass + if hasattr(self, 'resource'): + if not self.resour...
["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cid_range", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_highlevel_extracttext.py::TestExtractText::test_iss...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
91
50
961
0
0.6
1
0.75
1
0.4635
81.6655