selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
6,800
swe_smith::train::41466
swe_smith
train
41,466
scanny__python-pptx.278b47b1.func_basic__ozsoj3al
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
DataLabels.font property returns None instead of Font object #### Description When accessing the `font` property on a `DataLabels` object, it returns `None` instead of the expected `Font` object. This breaks font formatting operations on chart data labels. #### Steps/Code to Reproduce ```python from pptx import Pre...
diff --git a/src/pptx/oxml/chart/datalabel.py b/src/pptx/oxml/chart/datalabel.py index b6aac2f..7f4b5e3 100644 --- a/src/pptx/oxml/chart/datalabel.py +++ b/src/pptx/oxml/chart/datalabel.py @@ -164,9 +164,9 @@ class CT_DLbls(BaseOxmlElement): ``<a:defRPr>`` great-great-grandchild element, added with its ...
["tests/chart/test_datalabel.py::DescribeDataLabels::it_provides_access_to_its_font"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
6
1
1,337
0
0.6
1
0.75
1
0.242833
81.0035
6,801
swe_smith::train::2391
swe_smith
train
2,391
pdfminer__pdfminer.six.1a8bd2f7.func_pm_class_rm_funcs__mw5zunu0
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFXRefStream missing get_pos method causes AttributeError When processing certain PDF files with cross-reference streams, pdfminer fails with an AttributeError because the `get_pos` method is missing from the `PDFXRefStream` class. #### Steps/Code to Reproduce ```python from pdfminer.high_level import extract_text ...
diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py index 1c06335..4f75afd 100644 --- a/pdfminer/pdfdocument.py +++ b/pdfminer/pdfdocument.py @@ -299,33 +299,6 @@ class PDFXRefStream(PDFBaseXRef): if f1 == 1 or f1 == 2: yield start + i - def get_pos(self, objid: int...
["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_sim...
["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
27
9
917
0
0.6
1
0.75
1
0.242833
81.0035
6,802
swe_smith::train::25897
swe_smith
train
25,897
pylint-dev__astroid.b114f6b5.func_basic__pljwptyq
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Container builtin inference broken for various edge cases #### Description The builtin inference for container types (list, tuple, set, frozenset) is producing incorrect results in several scenarios. When creating containers from iterables, the inference logic appears to have issues with element handling and string p...
diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py index a56b152..be56558 100644 --- a/astroid/brain/brain_builtin_inference.py +++ b/astroid/brain/brain_builtin_inference.py @@ -286,27 +286,25 @@ def _container_generic_transform( if all(isinstance(elt, nodes.Const...
["tests/brain/test_brain.py::RandomSampleTest::test_no_crash_on_evaluatedobject", "tests/test_inference.py::InferenceTest::test_conversion_of_dict_methods", "tests/test_inference.py::InferenceTest::test_frozenset_builtin_inference", "tests/test_inference.py::InferenceTest::test_list_builtin_inference", "tests/test_infe...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
14
8
1,177
0
0.6
1
0.75
1
0.242833
81.0035
6,803
swe_smith::train::48948
swe_smith
train
48,948
facebookresearch__hydra.0f03eb60.func_pm_remove_wrapper__07x8wj6a
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
Module import error handling broken for nested modules #### Description When trying to import nested modules through the `_locate` function, the error handling is not working correctly. The function fails to properly handle `ModuleNotFoundError` exceptions when attempting to import submodules, causing incorrect error...
diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py index 941efc5..a238974 100644 --- a/hydra/_internal/utils.py +++ b/hydra/_internal/utils.py @@ -646,25 +646,12 @@ def _locate(path: str) -> Any: parent_dotpath = ".".join(parts[:m]) if isinstance(obj, ModuleType): ...
["tests/instantiate/test_helpers.py::test_locate[nested_not_found]", "tests/instantiate/test_helpers.py::test_locate[import_assertion_error]", "tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_1_job[basic-overrides0]", "tests/test_basic_launcher.py::TestBasicLauncher::test_sweep_2_jobs[basic-overrides0]", "t...
["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
13
57
1,197
0
0.6
1
0.75
1
0.242833
81.0035
6,804
swe_smith::train::29031
swe_smith
train
29,031
tox-dev__pipdeptree.c31b6418.combine_file__ui1ec61y
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
CLI argument parsing broken after recent changes #### Description The command line argument parsing is completely broken. When trying to use any CLI options, the tool crashes with various errors including `UnboundLocalError` and `ValueError` messages about default values not being among enum choices. #### Steps/Code...
diff --git a/src/pipdeptree/_cli.py b/src/pipdeptree/_cli.py index 46a984a..8b04083 100644 --- a/src/pipdeptree/_cli.py +++ b/src/pipdeptree/_cli.py @@ -156,18 +156,17 @@ def build_parser() -> ArgumentParser: def get_options(args: Sequence[str] | None) -> Options: - parser = build_parser() - parsed_args = pa...
["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_cli.py::test_parser_default", "tests/test_cli...
["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
18
39
1,097
0
0.6
1
0.75
1
0.242833
81.0035
6,805
swe_smith::train::52346
swe_smith
train
52,346
pydicom__pydicom.7d361b3d.func_pm_class_rm_funcs__9qmkaczl
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
DT timezone parsing broken after removing _utc_offset method #### Description When creating DT (DateTime) objects with timezone information, the parsing fails with an AttributeError. This affects datetime strings that include UTC offset suffixes like `'-0600'` or `'+0245'`. #### Steps/Code to Reproduce ```python im...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..cd7c601 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -699,28 +699,6 @@ class DT(_DateTimeBase, datetime.datetime): _regex_dt = re.compile(r"((\d{4,14})(\.(\d{1,6}))?)([+-]\d{4})?") - @staticmethod - def...
["tests/test_filewriter.py::TestScratchWriteDateTime::test_multivalue_DA", "tests/test_valuerep.py::TestDT::test_pickling_with_timezone", "tests/test_valuerep.py::TestDateTime::test_date_time"]
["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
23
3
997
0
0.6
1
0.75
1
0.242833
81.0035
6,806
swe_smith::train::32538
swe_smith
train
32,538
pydantic__pydantic.acb0f10f.func_pm_ctrl_shuffle__5nmtjrxp
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
PluggableSchemaValidator initialization order causes UnboundLocalError #### Description When creating a PluggableSchemaValidator, the initialization order is incorrect, causing references to undefined variables during the wrapper building process. #### Steps/Code to Reproduce ```python from pydantic import BaseMode...
diff --git a/pydantic/plugin/_schema_validator.py b/pydantic/plugin/_schema_validator.py index 83f2562..29add13 100644 --- a/pydantic/plugin/_schema_validator.py +++ b/pydantic/plugin/_schema_validator.py @@ -66,11 +66,15 @@ class PluggableSchemaValidator: plugins: Iterable[PydanticPluginProtocol], pl...
["tests/test_plugins.py::test_on_validate_json_on_success", "tests/test_plugins.py::test_on_validate_json_on_error", "tests/test_plugins.py::test_on_validate_python_on_success", "tests/test_plugins.py::test_on_validate_python_on_error", "tests/test_plugins.py::test_stateful_plugin", "tests/test_plugins.py::test_all_han...
["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
13
13
1,197
0
0.6
1
0.75
1
0.242833
81.0035
6,807
swe_smith::train::39627
swe_smith
train
39,627
pallets__jinja.ada0a9a6.lm_rewrite__wayabezk
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Namespace Attribute Access Issue ### Description It seems there's a problem with accessing attributes in the `Namespace` class after the recent changes. The issue arises when trying to access attributes that should be available within a namespace block or loop. ### Steps to Reproduce 1. Create a template using the ...
diff --git a/src/jinja2/utils.py b/src/jinja2/utils.py index 5c1ff5d..97269a3 100644 --- a/src/jinja2/utils.py +++ b/src/jinja2/utils.py @@ -740,14 +740,21 @@ class Namespace: self.__attrs = dict(*args, **kwargs) def __getattribute__(self, name: str) -> t.Any: - # __class__ is needed for the awai...
["tests/test_async.py::test_namespace_awaitable[asyncio]", "tests/test_async.py::test_namespace_awaitable[trio]", "tests/test_core_tags.py::TestSet::test_namespace", "tests/test_core_tags.py::TestSet::test_namespace_block", "tests/test_core_tags.py::TestSet::test_init_namespace", "tests/test_core_tags.py::TestSet::test...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
21
7
1,037
0
0.6
1
0.75
1
0.242833
81.0035
6,808
r2e_gym::train::4204
r2e_gym
train
4,204
numpy__173fbc7009719ce802aa70634fb93031a0c00cfb
numpy
numpy/numpy
python
173fbc7009719ce802aa70634fb93031a0c00cfb
**Title:** AttributeError: 'numpy.array_api' has no attribute 'isdtype' when using isdtype() **Description:** When attempting to use the `isdtype()` function from `numpy.array_api`, an `AttributeError` is raised because the function does not exist in the module. This prevents users from checking if a given dtype belon...
diff --git a/numpy/array_api/__init__.py b/numpy/array_api/__init__.py --- a/numpy/array_api/__init__.py +++ b/numpy/array_api/__init__.py @@ -173,6 +173,7 @@ broadcast_to, can_cast, finfo, + isdtype, iinfo, result_type, ) diff --git a/numpy/array_api/_data_type_functions.py b/numpy/array_a...
diff --git a/numpy/array_api/tests/test_data_type_functions.py b/numpy/array_api/tests/test_data_type_functions.py --- a/numpy/array_api/tests/test_data_type_functions.py +++ b/numpy/array_api/tests/test_data_type_functions.py @@ -1,7 +1,8 @@ import pytest +from numpy.testing import assert_raises from numpy import ...
null
null
namanjain12/numpy_final:173fbc7009719ce802aa70634fb93031a0c00cfb
true
null
3
53
null
1,109
0
0.75
1
0.6375
1
0.3615
81.00325
6,809
swe_smith::train::18098
swe_smith
train
18,098
pndurette__gTTS.dbcda4f3.combine_module__cbkolf6y
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
Text preprocessing broken after recent changes #### Description The text preprocessing functionality appears to be completely broken. When trying to use gTTS with any text, it fails with various errors related to file handling and regex processing. #### Steps/Code to Reproduce ```python from gtts import gTTS # Sim...
diff --git a/gtts/tokenizer/core.py b/gtts/tokenizer/core.py index d7e0a4e..74e7638 100644 --- a/gtts/tokenizer/core.py +++ b/gtts/tokenizer/core.py @@ -116,12 +116,12 @@ class PreProcessorRegex: """ def __init__(self, search_args, search_func, repl, flags=0): - self.repl = repl + self.repl = ...
["gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_cli.py::test_params_set", "gtts/tests/test_cli.py::test_stdin_text", "gtts/tests/test_cli.py::test_stdin_text_unicode", "gtts/tests/test_cli.py::test_stdin_file", "gtts/tests/test_cli.py::test_stdin_file_unicode", "gtts/tests/test_cli.py::test_text", "gtts/...
["gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_lang.py::test_main_langs...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
2
10
86
1,256
0
0.6
1
0.75
1
0.242667
81.003
6,810
swe_smith::train::26349
swe_smith
train
26,349
pylint-dev__astroid.b114f6b5.func_pm_remove_assign__9shuj9be
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
NameError in functools.partial inference after recent changes #### Description After some recent changes to the functools brain module, using `functools.partial` in code causes a `NameError` when astroid tries to infer the partial function. The error occurs because some variables are being referenced before they're d...
diff --git a/astroid/brain/brain_functools.py b/astroid/brain/brain_functools.py index c11b856..a87e79a 100644 --- a/astroid/brain/brain_functools.py +++ b/astroid/brain/brain_functools.py @@ -77,17 +77,14 @@ def _functools_partial_inference( node: nodes.Call, context: InferenceContext | None = None ) -> Iterator...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-True]", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-False]", "tests/brain/n...
["tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
9
24
1,276
0
0.6
1
0.75
1
0.242667
81.003
6,811
swe_smith::train::12258
swe_smith
train
12,258
lepture__mistune.bf54ef67.combine_module__w92c6w0i
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
Table of Contents directive breaks with KeyError: 'id' #### Description When using the table of contents directive, the code fails with a KeyError for 'id' when trying to generate heading IDs. This affects both RST-style and fenced-style TOC directives. #### Steps/Code to Reproduce ```python from mistune import cre...
diff --git a/src/mistune/directives/_base.py b/src/mistune/directives/_base.py index 49769de..066b09f 100644 --- a/src/mistune/directives/_base.py +++ b/src/mistune/directives/_base.py @@ -151,7 +151,7 @@ class DirectivePlugin: return self.parser.parse_type(m) def parse_title(self, m: Match[str]) -> str...
["tests/test_directives.py::TestDirective_rst_admonition::test_admonition_002", "tests/test_directives.py::TestDirective_rst_admonition::test_admonition_004", "tests/test_directives.py::TestDirective_rst_toc::test_collapse_toc_001", "tests/test_directives.py::TestDirective_rst_toc::test_complex_001", "tests/test_direct...
["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx...
jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67
true
null
2
20
23
1,056
0
0.6
1
0.75
1
0.242667
81.003
6,812
swe_smith::train::38443
swe_smith
train
38,443
dbader__schedule.82a43db1.lm_rewrite__r21f6xn7
swesmith/dbader__schedule.82a43db1
dbader/schedule
python
null
### Bug: TypeError when scheduling jobs with `every().second` #### Description After updating to the latest version, I've encountered a TypeError when trying to schedule jobs using `every().second`. This issue seems to affect multiple functionalities related to job scheduling and management. #### Steps to Reproduce ...
diff --git a/schedule/__init__.py b/schedule/__init__.py index 8e12eeb..e4652d7 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -322,12 +322,19 @@ class Job: timestats=timestats, ) + @property @property def second(self): + """Schedule the job to run ev...
["test_schedule.py::SchedulerTests::test_at_time", "test_schedule.py::SchedulerTests::test_cancel_job", "test_schedule.py::SchedulerTests::test_cancel_jobs", "test_schedule.py::SchedulerTests::test_clear_by_tag", "test_schedule.py::SchedulerTests::test_get_by_tag", "test_schedule.py::SchedulerTests::test_job_func_args_...
["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT...
jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1
true
null
1
9
8
1,276
0
0.6
1
0.75
1
0.242667
81.003
6,813
swe_smith::train::9847
swe_smith
train
9,847
keleshev__schema.24a30457.func_pm_op_swap__ut6xtxbt
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
String formatting broken in error messages When using Schema validation, error messages are not being formatted correctly. The string formatting operations appear to be reversed, causing TypeError exceptions. #### Steps/Code to Reproduce ```python from schema import Schema, SchemaError # Simple type validation try:...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..d908531 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -489,7 +489,7 @@ class Schema(object): message = self._prepend_schema_name(k) raise SchemaError( ...
["test_schema.py::test_schema", "test_schema.py::test_validate_file", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_or_only_one", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.py::test_strictly", "test_sch...
["test_schema.py::test_test", "test_schema.py::test_ignore_extra_keys", "test_schema.py::test_ignore_extra_keys_validation_and_return_keys", "test_schema.py::test_dict_optional_defaults", "test_schema.py::test_dict_subtypes", "test_schema.py::test_complex", "test_schema.py::test_use_error_handling", "test_schema.py::te...
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
15
22
1,156
0
0.6
1
0.75
1
0.242667
81.003
6,814
swe_smith::train::27291
swe_smith
train
27,291
tkrajina__gpxpy.09fc46b3.func_pm_op_change_const__xenufrev
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX smoothing algorithm causes IndexError when accessing array indices #### Description When calling the `smooth()` method on GPX track segments, the algorithm fails with an IndexError due to incorrect array index calculations in the smoothing logic. #### Steps/Code to Reproduce ```python import gpxpy import gpxpy....
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..afa88b7 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -1262,7 +1262,7 @@ class GPXTrackSegment: # points -- then is a candidate for deletion: # TODO: Make this a method parameter remove_2d_extremes_threshold = 1.75 * avg_distance - ...
["test.py::GPXTests::test_clone_and_smooth", "test.py::GPXTests::test_horizontal_and_vertical_smooth_remove_extremes", "test.py::GPXTests::test_horizontal_smooth_remove_extremes", "test.py::GPXTests::test_moving_stopped_times", "test.py::GPXTests::test_smooth_without_removing_extreemes_preserves_point_count_2", "test.p...
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
15
7
1,155
0
0.6
1
0.75
1
0.2425
81.0025
6,815
swe_smith::train::3387
swe_smith
train
3,387
pygments__pygments.27649ebb.combine_file__g5fu546t
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Option validation logic inverted causing OptionError for valid values #### Description When using lexers with options, valid option values are being rejected with an OptionError. The validation logic appears to be inverted - valid values that should be accepted are raising errors instead. #### Steps/Code to Reproduc...
diff --git a/pygments/util.py b/pygments/util.py index 83cf104..42f120f 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -43,11 +43,11 @@ def get_choice_opt(options, optname, allowed, default=None, normcase=False): `allowed`, raise an error, otherwise return it. """ string = options.get(optname, d...
["tests/test_util.py::test_guess_decode_from_terminal", "tests/test_util.py::test_doctype_matches", "tests/test_util.py::test_getoptions", "tests/test_basic_api.py::test_lexer_options[TypstLexer]", "tests/test_basic_api.py::test_formatter_public_api[RawTokenFormatter]", "tests/test_basic_api.py::test_formatter_unicode_...
["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
16
31
1,135
0
0.6
1
0.75
1
0.2425
81.0025
6,816
r2e_gym::train::6583
r2e_gym
train
6,583
pillow__79fe70a71a891b09986c6b6025454f0f76b6bcc5
pillow
python-pillow/pillow
python
79fe70a71a891b09986c6b6025454f0f76b6bcc5
**Title:** `ImageColor.getrgb` Fails to Parse Hexadecimal RGBA and Uppercase Color Specifiers **Description:** The `ImageColor.getrgb` function raises a `ValueError` when provided with hexadecimal RGBA strings or when color functions use uppercase letters. **Example Buggy Code:** ```python from PIL import ImageColor ...
diff --git a/PIL/ImageColor.py b/PIL/ImageColor.py --- a/PIL/ImageColor.py +++ b/PIL/ImageColor.py @@ -31,35 +31,46 @@ :param color: A color string :return: ``(red, green, blue[, alpha])`` """ - try: - rgb = colormap[color] - except KeyError: - try: - # fall back on case-in...
diff --git a/Tests/test_imagecolor.py b/Tests/test_imagecolor.py --- a/Tests/test_imagecolor.py +++ b/Tests/test_imagecolor.py @@ -6,20 +6,115 @@ class TestImageColor(PillowTestCase): - def test_sanity(self): + def test_hash(self): + # short 3 components self.assertEqual((255, 0, 0), ImageCol...
null
null
namanjain12/pillow_final:79fe70a71a891b09986c6b6025454f0f76b6bcc5
true
null
1
48
null
1,207
0
0.75
1
0.6375
1
0.361167
81.00225
6,817
swe_smith::train::48324
swe_smith
train
48,324
sqlfluff__sqlfluff.50a1c4b6.func_pm_op_swap__krkff5dj
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
IndexError in python templater when processing empty slice buffers #### Description When using the python templater with certain template configurations, an IndexError occurs during slice processing. The error happens when the templater tries to access slice_buffer elements without properly checking if the buffer is ...
diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py index a2126a8..d1f023f 100644 --- a/src/sqlfluff/core/templaters/python.py +++ b/src/sqlfluff/core/templaters/python.py @@ -51,12 +51,12 @@ class IntermediateFileSlice(NamedTuple): end_buffer = [] # Yield an...
["test/core/templaters/python_test.py::test__templater_python_intermediate__trim[int_slice1-foo-head_test1-tail_test1-int_test1]", "test/core/templaters/python_test.py::test__templater_python_intermediate__trim[int_slice2-foo1bar-head_test2-tail_test2-int_test2]", "test/core/templaters/python_test.py::test__templater_p...
["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
7
3
1,314
0
0.6
1
0.75
1
0.242333
81.002
6,818
swe_smith::train::36036
swe_smith
train
36,036
stanfordnlp__dspy.651a4c71.pr_601
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
[Bug]: Missing import of deque in module.py causes module traversal to fail ### Bug summary After a recent change, the `deque` import was removed from `dspy/primitives/module.py`, causing module traversal to fail with a NameError. This affects various module-related functionality. ### Code for reproduction ```pytho...
diff --git a/dspy/primitives/module.py b/dspy/primitives/module.py index 13ebe88..a9c3cb7 100644 --- a/dspy/primitives/module.py +++ b/dspy/primitives/module.py @@ -1,6 +1,5 @@ import copy import logging -from collections import deque from collections.abc import Generator from pathlib import Path @@ -82,7 +81,6 @...
["tests/primitives/test_program.py::test_empty_module", "tests/primitives/test_program.py::test_single_level", "tests/primitives/test_program.py::test_multiple_levels", "tests/primitives/test_program.py::test_multiple_sub_modules", "tests/primitives/test_program.py::test_non_base_module_attributes", "tests/primitives/t...
["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
10
6
1,254
0
0.6
1
0.75
1
0.242333
81.002
6,819
swe_smith::train::7009
swe_smith
train
7,009
cantools__cantools.0c6a7871.combine_file__h8qxxgob
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
DID decode function returns wrong data slice #### Description When decoding DID data, the decode function is returning the wrong portion of the input data. Instead of decoding the first `length` bytes of the data, it's decoding from `length` onwards, which causes incorrect decoding results and failures when loading C...
diff --git a/src/cantools/database/diagnostics/did.py b/src/cantools/database/diagnostics/did.py index 5a0712c..6966b7a 100644 --- a/src/cantools/database/diagnostics/did.py +++ b/src/cantools/database/diagnostics/did.py @@ -116,14 +116,14 @@ class Did: """ - return decode_data(data[:self._length], ...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanTo...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
12
7
1,214
0
0.6
1
0.75
1
0.242333
81.002
6,820
swe_smith::train::44445
swe_smith
train
44,445
pydata__patsy.a5d16484.func_pm_remove_cond__btbkavt8
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Infix parser fails to validate operator arity #### Description The infix parser is not properly validating operator arity, causing it to accept operators with invalid arity values and then fail during parsing with confusing error messages. #### Steps/Code to Reproduce ```python from patsy.infix_parser import infix_...
diff --git a/patsy/infix_parser.py b/patsy/infix_parser.py index 6c127b5..954001e 100644 --- a/patsy/infix_parser.py +++ b/patsy/infix_parser.py @@ -213,12 +213,6 @@ def infix_parse(tokens, operators, atomic_types, trace=False): binary_ops = {} for op in operators: assert op.precedence > _open_paren....
["patsy/constraint.py::test_linear_constraint", "patsy/constraint.py::test_eval_errors", "patsy/desc.py::test_ModelDesc_from_formula", "patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/desc.py::test_formula_factor_origin", "patsy/design_info.py::test_DesignInfo_linear_constr...
["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
11
30
1,233
0
0.6
1
0.75
1
0.242167
81.0015
6,821
swe_smith::train::9771
swe_smith
train
9,771
marshmallow-code__webargs.dbde72fe.lm_rewrite__owgcs6kp
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
# Error message changed when using invalid location in Parser.parse ## Description When using an invalid location with the `parse` method of a Parser, the error message has changed. This is a regression from previous behavior. ## Steps to Reproduce Create a simple script that attempts to parse data with an invalid lo...
diff --git a/src/webargs/core.py b/src/webargs/core.py index 44294e9..6722644 100644 --- a/src/webargs/core.py +++ b/src/webargs/core.py @@ -211,17 +211,15 @@ class Parser(typing.Generic[Request]): :raises: ValueError if a given location is invalid. """ - valid_locations = set(self.__location...
["tests/test_core.py::test_value_error_raised_if_parse_called_with_invalid_location"]
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
20
1
1,053
0
0.6
1
0.75
1
0.242167
81.0015
6,822
swe_smith::train::1833
swe_smith
train
1,833
agronholm__typeguard.b6a7e438.func_pm_class_rm_funcs__kzrekxiq
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Import hook not working after removing find_spec method #### Description The import hook functionality appears to be broken. When trying to use typeguard with import hook instrumentation, modules are not being instrumented and type checking is not occurring. #### Steps/Code to Reproduce ```python import sys from ty...
diff --git a/src/typeguard/_importhook.py b/src/typeguard/_importhook.py index 0d1c627..5c0795c 100644 --- a/src/typeguard/_importhook.py +++ b/src/typeguard/_importhook.py @@ -113,20 +113,6 @@ class TypeguardFinder(MetaPathFinder): self.packages = packages self._original_pathfinder = original_pathfin...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation"]
["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
15
2
1,152
0
0.6
1
0.75
1
0.242
81.001
6,823
swe_smith::train::3317
swe_smith
train
3,317
pygments__pygments.27649ebb.combine_file__73eb2ty4
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
EmacsLispLexer class inheritance broken #### Description The EmacsLispLexer class is not properly inheriting from RegexLexer, causing various lexer functionality to break. When trying to use the lexer, it fails with AttributeError because it's missing essential methods and attributes that should be inherited from the...
diff --git a/pygments/lexers/lisp.py b/pygments/lexers/lisp.py index e6cc587..810aa79 100644 --- a/pygments/lexers/lisp.py +++ b/pygments/lexers/lisp.py @@ -1657,7 +1657,7 @@ class NewLispLexer(RegexLexer): } -class EmacsLispLexer(RegexLexer): +class EmacsLispLexer(): """ An ELisp lexer, parsing a st...
["tests/test_cmdline.py::test_C_opt", "tests/test_cmdline.py::test_stdin", "tests/test_basic_api.py::test_lexer_options[EmacsLispLexer]", "tests/test_basic_api.py::test_lexer_options[ShenLexer]", "tests/test_basic_api.py::test_random_input[EmacsLispLexer]", "tests/test_basic_api.py::test_random_input[ShenLexer]", "test...
["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
18
24
1,092
0
0.6
1
0.75
1
0.242
81.001
6,824
swe_smith::train::1082
swe_smith
train
1,082
jd__tenacity.0d40e76f.func_basic__6xjkrkm1
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
Future.construct method returns None instead of Future object #### Description The `Future.construct` method is returning `None` instead of the constructed Future object, causing failures in retry condition checks and other operations that depend on the Future object. #### Steps/Code to Reproduce ```python import t...
diff --git a/tenacity/__init__.py b/tenacity/__init__.py index 72eba04..7aeb957 100644 --- a/tenacity/__init__.py +++ b/tenacity/__init__.py @@ -510,12 +510,12 @@ class Future(FutureGenericT): cls, attempt_number: int, value: t.Any, has_exception: bool ) -> "Future": """Construct a new Future obj...
["tests/test_tenacity.py::TestBase::test_callstate_repr", "tests/test_tenacity.py::TestRetryConditions::test_retry_all", "tests/test_tenacity.py::TestRetryConditions::test_retry_and", "tests/test_tenacity.py::TestRetryConditions::test_retry_any", "tests/test_tenacity.py::TestRetryConditions::test_retry_if_not_result", ...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
8
7
1,292
0
0.6
1
0.75
1
0.242
81.001
6,825
swe_smith::train::5037
swe_smith
train
5,037
bottlepy__bottle.a8dfef30.lm_rewrite__dcarlyqe
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
# FormsDict.decode() method fails with non-string values ## Description I'm encountering an issue with the `decode()` method in the `FormsDict` class. When trying to decode a dictionary that contains non-string values (like integers or other objects), the method fails. ## Steps to Reproduce Here's a simple code sni...
diff --git a/bottle.py b/bottle.py index 286b5bc..2b8d82d 100755 --- a/bottle.py +++ b/bottle.py @@ -2220,13 +2220,13 @@ class FormsDict(MultiDict): """ Returns a copy with all keys and values de- or recoded to match :attr:`input_encoding`. Some libraries (e.g. WTForms) want a unicode...
["test/test_formsdict.py::TestFormsDict::test_decode_method"]
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
12
1
1,211
0
0.6
1
0.75
1
0.241833
81.0005
6,826
swe_smith::train::10501
swe_smith
train
10,501
paramiko__paramiko.23f92003.func_basic__kj3b8qbl
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Channel operations always raise SSHException after timeout #### Description SSH channel operations are failing with "Channel closed." exceptions even when the channel should be working normally. This appears to happen consistently after some timeout period. #### Steps/Code to Reproduce ```python import paramiko # ...
diff --git a/paramiko/channel.py b/paramiko/channel.py index 25326ca..0492cab 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -1214,12 +1214,15 @@ class Channel(ClosingContextManager): self.event_ready = False def _wait_for_event(self): - self.event.wait() - assert self.event...
["tests/test_client.py::SSHClientTest::test_auth_trickledown", "tests/test_client.py::SSHClientTest::test_certs_allowed_as_key_filename_values", "tests/test_client.py::SSHClientTest::test_certs_implicitly_loaded_alongside_key_filename_keys", "tests/test_client.py::SSHClientTest::test_client", "tests/test_client.py::SSH...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
11
43
1,231
0
0.6
1
0.75
1
0.241833
81.0005
6,827
swe_smith::train::24605
swe_smith
train
24,605
marshmallow-code__marshmallow.9716fc62.combine_module__ryii7a1v
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Email validation fails with UnboundLocalError when checking user part #### Description The Email validator is throwing an `UnboundLocalError: local variable 'user_part' referenced before assignment` when trying to validate email addresses. This happens because the code tries to use `user_part` before it's defined. #...
diff --git a/src/marshmallow/decorators.py b/src/marshmallow/decorators.py index 965edb6..2c15aea 100644 --- a/src/marshmallow/decorators.py +++ b/src/marshmallow/decorators.py @@ -119,9 +119,9 @@ def validates_schema( return set_hook( fn, VALIDATES_SCHEMA, - many=pass_many, - pass_...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
["tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_invalid_data", "tests/test_decorators.py::test_decorator_post_dump_with_nested_original_and_pass_many[data0-expected_data0-expected_original_data0]", "tests/test_decorators.py::test_decorator_post_load_with_nested_original_and_pass_man...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
2
24
90
971
0
0.6
1
0.75
1
0.241833
81.0005
6,828
swe_smith::train::33151
swe_smith
train
33,151
django-money__django-money.835c1ab8.combine_module__zyvupr11
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
Exchange rate management commands are broken I was trying to use the exchange rate management commands and found that they're not working correctly anymore. Code to reproduce: ```python from django.core.management import call_command from djmoney.contrib.exchange.models import Rate # Try to clear rates for a specif...
diff --git a/djmoney/contrib/exchange/management/base.py b/djmoney/contrib/exchange/management/base.py index 77035e3..21d83f9 100644 --- a/djmoney/contrib/exchange/management/base.py +++ b/djmoney/contrib/exchange/management/base.py @@ -16,8 +16,8 @@ class BaseExchangeCommand(BaseCommand): action="store", ...
["tests/contrib/exchange/test_commands.py::TestCommand::test_update_rates[setup0]", "tests/contrib/exchange/test_commands.py::TestCommand::test_update_rates[setup1]", "tests/contrib/exchange/test_commands.py::TestClearRates::test_for_specific_backend", "tests/contrib/exchange/test_commands.py::TestClearRates::test_for_...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
2
14
4
1,171
0
0.6
1
0.75
1
0.241833
81.0005
6,829
swe_smith::train::5183
swe_smith
train
5,183
agronholm__exceptiongroup.0b4f4937.func_pm_remove_cond__cqsxwbel
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
Exception handling broken for single exceptions and async handlers #### Description The exception catching mechanism is not working properly. When trying to catch exceptions, both single exceptions and exception groups are not being handled correctly. Additionally, async handlers are not being properly validated. ##...
diff --git a/src/exceptiongroup/_catch.py b/src/exceptiongroup/_catch.py index 0246568..1e29896 100644 --- a/src/exceptiongroup/_catch.py +++ b/src/exceptiongroup/_catch.py @@ -49,10 +49,6 @@ class _Catcher: def handle_exception(self, exc: BaseException) -> BaseException | None: excgroup: BaseExceptionG...
["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tests/test_catch.py::test_catch_single_no_match", "tests/test_catch.py::test_catch_full_match", "tests/test_catch.py::test_catch_handler_rai...
["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
11
11
1,230
0
0.6
1
0.75
1
0.241667
81
6,830
swe_smith::train::52494
swe_smith
train
52,494
pydicom__pydicom.7d361b3d.func_pm_remove_assign__f5hfgqkk
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
String encoding fails with undefined variables after recent changes #### Description When encoding strings with multiple character sets, the encoding process fails with `UnboundLocalError` for undefined variables `max_index` and `best_encoding`. This affects multi-byte character encoding functionality. #### Steps/Co...
diff --git a/src/pydicom/charset.py b/src/pydicom/charset.py index 28a777e..b6101b9 100644 --- a/src/pydicom/charset.py +++ b/src/pydicom/charset.py @@ -575,11 +575,7 @@ def _encode_string_parts(value: str, encodings: Sequence[str]) -> bytes: """ encoded = bytearray() unencoded_part = value - best_enc...
["tests/test_charset.py::TestCharset::test_japanese_multi_byte_personname", "tests/test_charset.py::TestCharset::test_japanese_multi_byte_encoding", "tests/test_filewriter.py::TestWriteText::test_encode_mixed_charsets_text", "tests/test_filewriter.py::TestWriteText::test_invalid_encoding", "tests/test_filewriter.py::Te...
["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
11
6
1,230
0
0.6
1
0.75
1
0.241667
81
6,831
swe_smith::train::49136
swe_smith
train
49,136
mozilla__bleach.73871d76.combine_file__m1hfi9st
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
AttributeError when using bleach with html5lib etree treebuilder #### Description When using bleach with the html5lib etree treebuilder, various operations fail with AttributeError exceptions. The errors seem to be related to accessing properties and methods on Element objects that don't exist or have been incorrectl...
diff --git a/bleach/_vendor/html5lib/treebuilders/etree.py b/bleach/_vendor/html5lib/treebuilders/etree.py index 5ccfc4d..fe1cd9a 100644 --- a/bleach/_vendor/html5lib/treebuilders/etree.py +++ b/bleach/_vendor/html5lib/treebuilders/etree.py @@ -55,7 +55,7 @@ def getETreeBuilder(ElementTreeImplementation, fullTree=False...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
18
183
1,090
0
0.6
1
0.75
1
0.241667
81
6,832
swe_smith::train::803
swe_smith
train
803
oauthlib__oauthlib.1fd52536.func_pm_remove_assign__5wt6cmcs
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RefreshTokenGrant fails to set client_id and handle scopes properly #### Description When using the refresh token grant type, the client_id is not being properly set from the authenticated client, and scope handling is broken due to missing variable definitions. #### Steps/Code to Reproduce ```python from oauthlib....
diff --git a/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py b/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py index 43bf55a..096e83d 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py +++ b/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py @@ -103,7 +103,7 @@ class RefreshTokenGrant(GrantTy...
["tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_authentication_required_populate_client_id", "tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_create_cors_headers", "tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::te...
["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
9
41
1,270
0
0.6
1
0.75
1
0.241667
81
6,833
swe_smith::train::30475
swe_smith
train
30,475
pyca__pyopenssl.04766a49.lm_rewrite__trwaoo6t
swesmith/pyca__pyopenssl.04766a49
pyca/pyopenssl
python
null
# set_tlsext_host_name doesn't check for null bytes in hostname ### Bug report **Bug summary** After a recent change, the `set_tlsext_host_name` method no longer properly checks for null bytes in the hostname, which can lead to unexpected behavior. **Code for reproduction** ```python from OpenSSL import SSL ctx = ...
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index eed27a0..fdfcf6b 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -2142,12 +2142,10 @@ class Connection: """ if not isinstance(name, bytes): raise TypeError("name must be a byte string") - elif b"\0" in name: - ...
["tests/test_ssl.py::TestContext::test_set_default_verify_paths", "tests/test_ssl.py::TestServerNameCallback::test_servername", "tests/test_ssl.py::TestConnection::test_set_tlsext_host_name_wrong_args"]
["tests/test_crypto.py::TestX509Ext::test_str", "tests/test_crypto.py::TestX509Ext::test_type", "tests/test_crypto.py::TestX509Ext::test_construction", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[thisIsMadeUp-False-hi]", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[proxyCertInfo-True-langua...
jyangballin/swesmith.x86_64.pyca_1776_pyopenssl.04766a49
true
null
1
10
3
1,250
0
0.6
1
0.75
1
0.241667
81
6,834
swe_smith::train::10039
swe_smith
train
10,039
paramiko__paramiko.23f92003.combine_file__1acju47q
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH key exchange fails with AttributeError in client mode #### Description When attempting to establish an SSH connection in client mode, the key exchange process fails with an AttributeError. The error occurs during the Diffie-Hellman key exchange when computing the client's public key value. #### Steps/Code to Rep...
diff --git a/paramiko/kex_group1.py b/paramiko/kex_group1.py index f074256..c310df0 100644 --- a/paramiko/kex_group1.py +++ b/paramiko/kex_group1.py @@ -54,13 +54,13 @@ class KexGroup1: def start_kex(self): self._generate_x() - if self.transport.server_mode: + if not self.transport.server_...
["tests/test_kex.py::KexTest::test_group1_client", "tests/test_kex.py::KexTest::test_group1_server", "tests/test_kex.py::KexTest::test_kex_group14_sha256_client", "tests/test_kex.py::KexTest::test_kex_group14_sha256_server", "tests/test_kex.py::KexTest::test_kex_group16_sha512_client", "tests/test_kex.py::KexTest::test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
18
6
1,090
0
0.6
1
0.75
1
0.241667
81
6,835
swe_smith::train::44388
swe_smith
train
44,388
pydata__patsy.a5d16484.func_pm_op_swap__lev5b69r
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
String formatting error in categorical error messages When converting data to categorical and encountering errors, the error message formatting is broken due to incorrect string formatting syntax. #### Steps/Code to Reproduce ```python from patsy.categorical import categorical_to_int from patsy.missing import NAActi...
diff --git a/patsy/categorical.py b/patsy/categorical.py index c88ecd5..f6beed5 100644 --- a/patsy/categorical.py +++ b/patsy/categorical.py @@ -377,8 +377,8 @@ def categorical_to_int(data, levels, NA_action, origin=None): else: level_strs += [repr(level) for level in levels[: SHOW...
["patsy/build.py::test__eval_factor_categorical", "patsy/categorical.py::test_categorical_to_int", "patsy/test_build.py::test_data_mismatch", "patsy/test_regressions.py::test_issue_11"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__examine_factor_types", "patsy/builtins.py::test_I",...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
9
4
1,270
0
0.6
1
0.75
1
0.241667
81
6,836
swe_smith::train::50874
swe_smith
train
50,874
python-hyper__h11.bed0dd4a.func_basic__yhpavaxz
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
# HTTP connection reuse is broken after sending a response ## Description I've discovered an issue with connection reuse in h11. After sending a response, subsequent requests on the same connection fail with an assertion error. Here's a simple reproduction script: ```python import h11 # Create a connection conn = ...
diff --git a/h11/_connection.py b/h11/_connection.py index e37d82a..c3c3c5c 100644 --- a/h11/_connection.py +++ b/h11/_connection.py @@ -245,11 +245,11 @@ class Connection: """ old_states = dict(self._cstate.states) - self._cstate.start_next_cycle() - self._request_method = None + ...
["h11/tests/test_connection.py::test_max_incomplete_event_size_countermeasure", "h11/tests/test_connection.py::test_reuse_simple", "h11/tests/test_connection.py::test_pipelining", "h11/tests/test_connection.py::test_protocol_switch", "h11/tests/test_connection.py::test_pipelined_close"]
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_conn...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
6
5
1,330
0
0.6
1
0.75
1
0.241667
81
6,837
swe_smith::train::31586
swe_smith
train
31,586
benoitc__gunicorn.bacbf8aa.func_pm_class_rm_funcs__3wvm4iyk
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Body.read() method missing after recent changes #### Description The `Body.read()` method appears to have been removed from the `Body` class in `gunicorn/http/body.py`, causing `AttributeError` when trying to read request bodies. #### Steps/Code to Reproduce ```python from gunicorn.http.body import Body import io ...
diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py index d7ee29e..b7d42a6 100644 --- a/gunicorn/http/body.py +++ b/gunicorn/http/body.py @@ -205,30 +205,6 @@ class Body: return sys.maxsize return size - def read(self, size=None): - size = self.getsize(size) - if size == ...
["tests/test_http.py::test_readline_buffer_loaded", "tests/test_http.py::test_readline_buffer_loaded_with_size", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_10.http]", "tests/test_invalid_requests.py::test_http_parser[/testbed/tests/requests/invalid/chunked_09.http]", "test...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
26
50
929
0
0.6
1
0.75
1
0.2415
80.9995
6,838
swe_smith::train::6512
swe_smith
train
6,512
mahmoud__boltons.3bfcfdd0.lm_rewrite__1br0xnqd
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
### Issue with `FrozenDict` Hashing It seems there's a problem with the `FrozenDict` class when computing hash values. The issue arises when attempting to hash a `FrozenDict` object, which results in a `TypeError`. This behavior is unexpected and inconsistent with the intended functionality of `FrozenDict`. Here's a ...
diff --git a/boltons/dictutils.py b/boltons/dictutils.py index f913f29..b09f149 100644 --- a/boltons/dictutils.py +++ b/boltons/dictutils.py @@ -1090,19 +1090,19 @@ class FrozenDict(dict): return type(self), (dict(self),) def __hash__(self): + """Computes a hash value for the FrozenDict based on ...
["tests/test_dictutils.py::test_frozendict"]
["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
22
1
1,009
0
0.6
1
0.75
1
0.2415
80.9995
6,839
swe_smith::train::44004
swe_smith
train
44,004
pydata__patsy.a5d16484.func_basic__e2f3rqyg
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
B-spline evaluation fails with boundary points #### Description When evaluating B-splines with data points that fall exactly on the boundary knots, the function raises a `NotImplementedError` even though these points should be valid. #### Steps/Code to Reproduce ```python import numpy as np from patsy.splines impor...
diff --git a/patsy/splines.py b/patsy/splines.py index a6735e5..5760c35 100644 --- a/patsy/splines.py +++ b/patsy/splines.py @@ -21,9 +21,6 @@ def _eval_bspline_basis(x, knots, degree): from scipy.interpolate import splev except ImportError: # pragma: no cover raise ImportError("spline functiona...
["patsy/mgcv_cubic_splines.py::test_te_1smooth", "patsy/splines.py::test_bs_compat", "patsy/splines.py::test_bs_0degree", "patsy/splines.py::test_bs_errors"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
25
4
949
0
0.6
1
0.75
1
0.2415
80.9995
6,840
swe_smith::train::18541
swe_smith
train
18,541
HIPS__autograd.ac044f0d.lm_rewrite__kx535eel
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Issue with Reshape Functions in Autograd #### What happened? I encountered an issue when using reshape functions like `np.atleast_1d`, `np.atleast_2d`, and `np.atleast_3d` in the autograd library. The functions are not handling certain input shapes correctly, leading to unexpected errors. #### Steps to Reproduce...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..00425bc 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -798,10 +798,9 @@ def unpermuter(g, permutation): def grad_reshape_list(ans, *arys): - if len(arys) > 1: - raise NotImplementedEr...
["tests/test_scipy.py::test_mvn_logpdf_broadcast", "tests/test_systematic.py::test_kron", "tests/test_systematic.py::test_atleast_1d", "tests/test_systematic.py::test_atleast_2d", "tests/test_systematic.py::test_atleast_3d", "tests/test_systematic.py::test_vstack_3d", "tests/test_systematic.py::test_hstack_1d", "tests/...
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
7
18
1,309
0
0.6
1
0.75
1
0.2415
80.9995
6,841
swe_smith::train::3914
swe_smith
train
3,914
pygments__pygments.27649ebb.func_basic__hlkqvf9v
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Lexer analysis returns wrong confidence values #### Description The `make_analysator` function in `pygments/util.py` is returning incorrect confidence values. When lexer analysis functions return valid scores or encounter exceptions, the confidence values are inverted - returning 1.0 when they should return 0.0 and v...
diff --git a/pygments/util.py b/pygments/util.py index 83cf104..d6f6955 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -125,13 +125,13 @@ def make_analysator(f): try: rv = f(text) except Exception: - return 0.0 + return 1.0 if not rv: - r...
["tests/test_util.py::test_analysator_value_error", "tests/test_util.py::test_analysator_returns_boolean", "tests/test_util.py::test_analysator_type_error", "tests/test_util.py::test_analysator_returns_float", "tests/test_util.py::test_analysator_raises_exception", "tests/test_sql.py::test_can_analyze_text", "tests/tes...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
10
35
1,249
0
0.6
1
0.75
1
0.2415
80.9995
6,842
swe_smith::train::7069
swe_smith
train
7,069
cantools__cantools.0c6a7871.combine_file__qvzta46h
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML frame length parsing returns incorrect values #### Description When loading ARXML files, the frame length values are being parsed incorrectly, causing signal overlap errors and incorrect byte order detection. #### Steps/Code to Reproduce ```python import cantools # Load an ARXML file that should work correct...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..a200da2 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -1351,9 +1351,8 @@ class SystemL...
["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
13
14
1,188
0
0.6
1
0.75
1
0.241333
80.999
6,843
swe_smith::train::41019
swe_smith
train
41,019
scanny__python-pptx.278b47b1.func_basic__ettwn27w
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Chart text formatting fails when text body has no paragraphs #### Description When working with chart elements that have empty text bodies (no paragraphs), accessing font properties causes an AttributeError. This affects chart tick labels, data labels, and legend formatting. #### Steps/Code to Reproduce ```python f...
diff --git a/src/pptx/oxml/text.py b/src/pptx/oxml/text.py index 0f9ecc1..493dd0a 100644 --- a/src/pptx/oxml/text.py +++ b/src/pptx/oxml/text.py @@ -105,8 +105,10 @@ class CT_TextBody(BaseOxmlElement): Used when element is a ``c:txPr`` in a chart and the `p` element is used only to specify formatting,...
["tests/chart/test_axis.py::DescribeTickLabels::it_provides_access_to_its_font", "tests/chart/test_axis.py::DescribeTickLabels::it_adds_a_txPr_to_help_font[txPr_fixture0]", "tests/chart/test_axis.py::DescribeTickLabels::it_adds_a_txPr_to_help_font[txPr_fixture1]", "tests/chart/test_axis.py::DescribeTickLabels::it_adds_...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
6
9
1,328
0
0.6
1
0.75
1
0.241333
80.999
6,844
swe_smith::train::12064
swe_smith
train
12,064
lepture__mistune.bf54ef67.combine_file__fo5son44
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
Footnotes plugin breaks when using reference footnotes I'm trying to use the footnotes plugin with reference-style footnotes, but I'm getting an error. Here's a minimal example that reproduces the issue: ```markdown Here is some text with a footnote[^1]. [^1]: This is the footnote text. ``` When I try to parse this...
diff --git a/src/mistune/plugins/footnotes.py b/src/mistune/plugins/footnotes.py index 96fe8df..eb0f12b 100644 --- a/src/mistune/plugins/footnotes.py +++ b/src/mistune/plugins/footnotes.py @@ -53,13 +53,13 @@ def parse_ref_footnote( ) -> int: ref = state.env.get("ref_footnotes") if not ref: - ref = {}...
["tests/test_plugins.py::TestPlugin1_footnotes::test_footnotes_002", "tests/test_plugins.py::TestPlugin1_footnotes::test_footnotes_003", "tests/test_plugins.py::TestPlugin2_footnotes::test_footnotes_002", "tests/test_plugins.py::TestPlugin2_footnotes::test_footnotes_003"]
["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx...
jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67
true
null
1
15
4
1,148
0
0.6
1
0.75
1
0.241333
80.999
6,845
swe_smith::train::24049
swe_smith
train
24,049
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__n8g5xu73
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
HECClient initialization fails with UnboundLocalError when SSL error occurs #### Description When creating a HECClient instance and an SSL error occurs during initialization, the code raises an UnboundLocalError instead of properly handling the SSL error. #### Steps/Code to Reproduce ```python from sunpy.net.helio ...
diff --git a/sunpy/net/helio/hec.py b/sunpy/net/helio/hec.py index 8b84536..044a221 100644 --- a/sunpy/net/helio/hec.py +++ b/sunpy/net/helio/hec.py @@ -67,6 +67,17 @@ class HECClient(BaseClient): """ def __init__(self, link=None): + transport = Transport(session=session) + session = Session()...
["sunpy/net/helio/tests/test_helio.py::test_ssl_verify_error"]
["sunpy/net/helio/tests/test_helio.py::test_webservice_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_webservice_parser_get_links", "sunpy/net/helio/tests/test_helio.py::test_endpoint_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_endpoint_parser_get_links", "sunpy/net/helio/tests/test_h...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
23
1
988
0
0.6
1
0.75
1
0.241333
80.999
6,846
swe_smith::train::18887
swe_smith
train
18,887
seperman__deepdiff.ed252022.func_basic__pgyt0pw6
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
# Enum comparison in DeepDiff is broken I found an issue when comparing Enum objects with DeepDiff. When comparing two identical Enum objects, DeepDiff should return an empty dictionary, but it's not working correctly. ## Reproduction Here's a simple example that demonstrates the issue: ```python from enum import E...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..c59ef30 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -429,17 +429,17 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): return {i: getattr(object, key) for i in all_slots if hasattr(object, key := unmangle(i))} ...
["tests/test_diff_text.py::TestDeepDiffText::test_enums"]
["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
14
1
1,168
0
0.6
1
0.75
1
0.241333
80.999
6,847
swe_smith::train::26117
swe_smith
train
26,117
pylint-dev__astroid.b114f6b5.func_basic__yd21yajf
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
AssignName inference fails with AttributeError when context is None #### Description When inferring AssignName nodes, the inference process crashes with an AttributeError when the context becomes None. This affects various inference scenarios including augmented assignment operations and numpy masked array functions....
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index fde3239..021c125 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -464,27 +464,24 @@ class AssignName( """Infer a Name: use name lookup rules. Same implementation as Name._infer.""" - ...
["tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-True]", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-False]", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_where-True]", "t...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
9
23
1,268
0
0.6
1
0.75
1
0.241333
80.999
6,848
swe_smith::train::3462
swe_smith
train
3,462
pygments__pygments.27649ebb.combine_file__p70do4ul
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
SnowballLexer constructor fails with TypeError on keyword arguments #### Description The SnowballLexer class is throwing a TypeError when initialized with keyword arguments. This affects basic lexer functionality and prevents the lexer from being used properly. #### Steps/Code to Reproduce ```python from pygments.l...
diff --git a/pygments/lexers/dsls.py b/pygments/lexers/dsls.py index 35dfda9..1dfa170 100644 --- a/pygments/lexers/dsls.py +++ b/pygments/lexers/dsls.py @@ -875,7 +875,7 @@ class SnowballLexer(ExtendedRegexLexer): def __init__(self, **options): self._reset_stringescapes() - ExtendedRegexLexer.__i...
["tests/test_basic_api.py::test_lexer_options[SnowballLexer]", "tests/test_basic_api.py::test_lexer_classes[SnowballLexer]", "tests/test_basic_api.py::test_random_input[SnowballLexer]", "tests/examplefiles/snowball/example.sbl::"]
["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
22
4
1,008
0
0.6
1
0.75
1
0.241333
80.999
6,849
swe_smith::train::7861
swe_smith
train
7,861
cantools__cantools.0c6a7871.func_pm_class_rm_funcs__6yrfhk8c
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
UnsupportedDatabaseFormatError constructor missing after refactor Description After a recent change, the `UnsupportedDatabaseFormatError` class is missing its `__init__` method, causing the exception to not format error messages properly when raised. Steps/Code to Reproduce ```python import cantools # Try to load ...
diff --git a/src/cantools/database/__init__.py b/src/cantools/database/__init__.py index 701b1bc..04a1884 100644 --- a/src/cantools/database/__init__.py +++ b/src/cantools/database/__init__.py @@ -21,35 +21,6 @@ class UnsupportedDatabaseFormatError(Error): """ - def __init__(self, e_arxml, e_dbc, e_kcd, e_s...
["tests/test_database.py::CanToolsDatabaseTest::test_dbc_issue_199_more_than_11_bits_standard_frame_id", "tests/test_database.py::CanToolsDatabaseTest::test_dbc_issue_199_more_than_29_bits_extended_frame_id", "tests/test_database.py::CanToolsDatabaseTest::test_dbc_parse_error_messages", "tests/test_database.py::CanTool...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
29
15
868
0
0.6
1
0.75
1
0.241333
80.999
6,850
swe_smith::train::43935
swe_smith
train
43,935
pydata__patsy.a5d16484.func_basic__7gxugrxz
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Factor memorization fails with empty evaluation environment #### Description When using patsy to build design matrices, the factor memorization process fails when an empty evaluation environment is passed. This causes various high-level functions like `dmatrix` and `dmatrices` to break with AttributeError exceptions....
diff --git a/patsy/build.py b/patsy/build.py index cbe2524..e87424d 100644 --- a/patsy/build.py +++ b/patsy/build.py @@ -384,22 +384,20 @@ def test__subterm_column_names_iter_and__build_subterm(): def _factors_memorize(factors, data_iter_maker, eval_env): - # First, start off the memorization process by setting...
["patsy/build.py::test__factors_memorize", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths", "patsy/test_highlevel.py::test_formula_likes", "patsy/test_highlevel.py::test_term_info", "patsy/test_highlevel.p...
["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__examine_factor_types", "patsy/builtins.py::t...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
13
20
1,188
0
0.6
1
0.75
1
0.241333
80.999
6,851
swe_smith::train::42090
swe_smith
train
42,090
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__bff4spv4
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
DataLabel.position property returns undefined variable instead of actual position #### Description When accessing the `position` property of a DataLabel object, it returns an undefined variable `dLblPos.val` instead of the actual position value. This causes a NameError when trying to read the position of data labels....
diff --git a/src/pptx/chart/datalabel.py b/src/pptx/chart/datalabel.py index af7cdf5..c410b96 100644 --- a/src/pptx/chart/datalabel.py +++ b/src/pptx/chart/datalabel.py @@ -190,20 +190,19 @@ class DataLabel(object): @property def position(self): + return dLblPos.val + if dLbl is None: + ...
["tests/chart/test_datalabel.py::DescribeDataLabel::it_knows_its_position[position_get_fixture0]", "tests/chart/test_datalabel.py::DescribeDataLabel::it_knows_its_position[position_get_fixture1]", "tests/chart/test_datalabel.py::DescribeDataLabel::it_knows_its_position[position_get_fixture2]"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
15
3
1,147
0
0.6
1
0.75
1
0.241167
80.9985
6,852
swe_smith::train::44370
swe_smith
train
44,370
pydata__patsy.a5d16484.func_pm_op_change__jo5ey7t9
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
DesignMatrix repr() crashes with TypeError on string formatting operations #### Description The `DesignMatrix.__repr__()` method contains several string formatting errors that cause crashes when trying to display a DesignMatrix object. The method uses incorrect operators for string formatting and concatenation. ####...
diff --git a/patsy/design_info.py b/patsy/design_info.py index d94b97a..6891a84 100644 --- a/patsy/design_info.py +++ b/patsy/design_info.py @@ -1193,7 +1193,7 @@ class DesignMatrix(np.ndarray): names = self.design_info.column_names column_name_widths = [len(name) for name in names] min_total...
["patsy/design_info.py::test_design_matrix"]
["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
19
1
1,067
0
0.6
1
0.75
1
0.241167
80.9985
6,853
swe_smith::train::10187
swe_smith
train
10,187
paramiko__paramiko.23f92003.combine_file__t580yp4z
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Ed25519Key initialization broken with incorrect parameter handling #### Description Ed25519Key constructor is not working properly when loading keys from files. The key initialization logic appears to have issues with parameter validation and assignment. #### Steps/Code to Reproduce ```python from paramiko import E...
diff --git a/paramiko/ed25519key.py b/paramiko/ed25519key.py index e5e81ac..40327b9 100644 --- a/paramiko/ed25519key.py +++ b/paramiko/ed25519key.py @@ -61,14 +61,14 @@ class Ed25519Key(PKey): elif file_obj is not None: pkformat, data = self._read_private_key("OPENSSH", file_obj) - if fil...
["tests/auth.py::AuthSource_::InMemoryPrivateKey_::repr_shows_pkey_repr", "tests/auth.py::AuthSource_::InMemoryPrivateKey_::repr_appends_agent_flag_when_AgentKey", "tests/test_client.py::SSHClientTest::test_certs_allowed_as_key_filename_values", "tests/test_client.py::SSHClientTest::test_certs_implicitly_loaded_alongsi...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
18
10
1,087
0
0.6
1
0.75
1
0.241167
80.9985
6,854
swe_smith::train::23518
swe_smith
train
23,518
pyparsing__pyparsing.533adf47.func_basic__bnte5wr5
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
trace_parse_action decorator produces incorrect output and swallows exceptions #### Description The `trace_parse_action` decorator is not working correctly. When tracing parse actions that raise exceptions, the decorator produces malformed output and incorrectly swallows exceptions instead of re-raising them. #### S...
diff --git a/pyparsing/core.py b/pyparsing/core.py index 777165c..b379157 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -6022,17 +6022,17 @@ def trace_parse_action(f: ParseAction) -> ParseAction: def z(*paArgs): thisFunc = f.__name__ s, l, t = paArgs[-3:] - if len(paArgs) > 3: ...
["tests/test_unit.py::Test02_WithoutPackrat::testTraceParseActionDecorator_with_exception", "tests/test_unit.py::Test02_WithoutPackrat::test_exception_messages_with_exception_subclass", "tests/test_unit.py::Test04_WithPackrat::testTraceParseActionDecorator_with_exception", "tests/test_unit.py::Test04_WithPackrat::test_...
["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse...
jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47
true
null
1
14
12
1,167
0
0.6
1
0.75
1
0.241167
80.9985
6,855
swe_smith::train::7090
swe_smith
train
7,090
cantools__cantools.0c6a7871.combine_file__wax5fvgt
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
AUTOSAR message properties initialized with incorrect default values Description When creating AutosarMessageSpecifics instances, the default initialization values are causing issues with ARXML parsing. The properties are being set to incorrect types and values that don't match the expected behavior. Steps/Code to R...
diff --git a/src/cantools/database/can/formats/arxml/message_specifics.py b/src/cantools/database/can/formats/arxml/message_specifics.py index ce9a336..e2fe6ad 100644 --- a/src/cantools/database/can/formats/arxml/message_specifics.py +++ b/src/cantools/database/can/formats/arxml/message_specifics.py @@ -13,12 +13,12 @@...
["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_database.py::CanToolsDatabaseTest::test_system_3_arxml", "tests/test_database.py::CanToolsData...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "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::CanTo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
14
7
1,166
0
0.6
1
0.75
1
0.241
80.998
6,856
swe_smith::train::18349
swe_smith
train
18,349
msiemens__tinydb.10644a0e.func_pm_ctrl_shuffle__d984n88y
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Query execution fails with NameError after path validation #### Description When using TinyDB queries, I'm getting a `NameError: free variable 'runner' referenced before assignment in enclosing scope` error. This happens with basic query operations like searching, counting, and filtering. #### Steps/Code to Reproduc...
diff --git a/tinydb/queries.py b/tinydb/queries.py index 0ef6a69..7e97274 100644 --- a/tinydb/queries.py +++ b/tinydb/queries.py @@ -210,6 +210,8 @@ class Query(QueryInstance): hashval: Tuple, allow_empty_path: bool = False ) -> QueryInstance: + if not self._path and not allow_empt...
["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::test_add_int[json]", "tests/test_operations.py::test_add_str[memory]", "tests/test_operations.py::test_add_str[json]", "tests/test_operations.py::...
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
15
105
1,146
0
0.6
1
0.75
1
0.241
80.998
6,857
swe_smith::train::53406
swe_smith
train
53,406
ariga__atlas.1afaaba2.func_pm_remove_loop__nmw5psse
swesmith/ariga__atlas.1afaaba2
ariga/atlas
go
null
FindTable returns NotExistError when case-insensitive matching is enabled #### Description When using case-insensitive table matching (modes 1 or 2), the `FindTable` function incorrectly returns a `NotExistError` even when a matching table exists in the schema. #### Steps/Code to Reproduce ```go package main impor...
diff --git a/sql/mysql/diff_oss.go b/sql/mysql/diff_oss.go index d5644b4..8a23776 100644 --- a/sql/mysql/diff_oss.go +++ b/sql/mysql/diff_oss.go @@ -287,11 +287,7 @@ func (d *diff) FindTable(s *schema.Schema, t1 *schema.Table) (*schema.Table, err // This option is not supported by Linux-based systems. case 1, 2: ...
["TestDiff_LowerCaseMode"]
["TestReferences", "TestUnlabeledBlockReferences", "TestNestedReferences", "TestBlockReference", "TestListRefs", "TestNestedDifference", "TestSchemaRefParse", "TestWithTypes", "TestEmptyStrSQL", "TestOptionalArgs", "TestQualifiedRefs", "TestQuotedRefs", "TestInputValues", "TestVariable_InvalidType", "TestTemplateRefere...
jyangballin/swesmith.x86_64.ariga_1776_atlas.1afaaba2
true
null
1
6
1
1,326
0
0.6
1
0.75
1
0.241
80.998
6,858
swe_smith::train::7655
swe_smith
train
7,655
cantools__cantools.0c6a7871.func_basic__mgpmvsde
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
SYM file parsing broken - messages not loading correctly #### Description When loading SYM files, the parser is failing to properly identify and load messages. Getting various errors like `KeyError: 'ID'` and `UnsupportedDatabaseFormatError: SYM: "'ID'"` when trying to load previously working SYM files. #### Steps/C...
diff --git a/src/cantools/database/can/formats/sym.py b/src/cantools/database/can/formats/sym.py index 4bdc121..85ab664 100644 --- a/src/cantools/database/can/formats/sym.py +++ b/src/cantools/database/can/formats/sym.py @@ -731,7 +731,7 @@ def _parse_message_frame_ids(message): def _load_message_section(section_nam...
["tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_sym", "tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_databases", "tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_files", "tests/test_database.py::CanToolsDatabaseTest::test_big_endian", "te...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
10
23
1,246
0
0.6
1
0.75
1
0.241
80.998
6,859
swe_smith::train::2222
swe_smith
train
2,222
pdfminer__pdfminer.six.1a8bd2f7.func_basic__lem3zq9c
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
pdf2txt.py returns None instead of file handle when no files provided #### Description When calling `extract_text()` with an empty file list, the function now returns `None` instead of raising a `PDFValueError` as expected. This breaks existing code that relies on the function to either return a valid file handle or ...
diff --git a/tools/pdf2txt.py b/tools/pdf2txt.py index 3341690..021b4ac 100755 --- a/tools/pdf2txt.py +++ b/tools/pdf2txt.py @@ -45,25 +45,25 @@ def extract_text( disable_caching: bool = False, **kwargs: Any, ) -> AnyIO: - if not files: - raise PDFValueError("Must provide files to work upon!") + ...
["tests/test_tools_pdf2txt.py::TestPdf2Txt::test_jo", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_simple1", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_simple2", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_simple3", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_sample_one_byte_identity_encode", "tests/tes...
["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
16
35
1,126
0
0.6
1
0.75
1
0.241
80.998
6,860
swe_smith::train::5515
swe_smith
train
5,515
PyCQA__flake8.cf1542ce.func_pm_class_rm_funcs__c0mdde36
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
Manager.run_serial method missing causes AttributeError when jobs=1 #### Description When running flake8 with `--jobs=1`, the application crashes with an AttributeError because the `run_serial` method has been removed from the Manager class but is still being called. #### Steps/Code to Reproduce ```python import su...
diff --git a/src/flake8/checker.py b/src/flake8/checker.py index 329a2cc..8a70a5f 100644 --- a/src/flake8/checker.py +++ b/src/flake8/checker.py @@ -211,17 +211,6 @@ class Manager: pool.terminate() pool.join() - def run_serial(self) -> None: - """Run the checkers in serial....
["tests/integration/test_api_legacy.py::test_legacy_api", "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_option", "tests/integration/test_main.py::test_show_source_option", "tests/integ...
["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
12
25
1,206
0
0.6
1
0.75
1
0.241
80.998
6,861
swe_smith::train::10904
swe_smith
train
10,904
paramiko__paramiko.23f92003.lm_rewrite__c61ljt20
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
ChannelException not raised on failed channel open Hi, I've noticed an issue where a `ChannelException` is not being raised when attempting to open a channel that should fail. This seems to occur when the server rejects the channel open request, but the expected exception is not triggered. To reproduce, you can set ...
diff --git a/paramiko/transport.py b/paramiko/transport.py index f0fcb97..70b9ec1 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -2999,29 +2999,38 @@ class Transport(threading.Thread, ClosingContextManager): return def _parse_channel_open_failure(self, m): + """ + Parse ...
["tests/test_transport.py::TransportTest::test_channel_exception", "tests/test_transport.py::TransportTest::test_server_rejects_open_channel_without_auth", "tests/test_transport.py::ServiceRequestingTransportTest::test_channel_exception", "tests/test_transport.py::ServiceRequestingTransportTest::test_server_rejects_ope...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
33
4
785
0
0.6
1
0.75
1
0.240833
80.9975
6,862
swe_smith::train::32680
swe_smith
train
32,680
pydantic__pydantic.acb0f10f.func_pm_remove_cond__dbe5ds32
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Unpacked TypedDict validation removed causing unexpected behavior #### Description When using `Unpack[TypedDict]` in function signatures with `@validate_call`, the validation that previously ensured only TypedDict classes could be unpacked and prevented parameter name overlaps has been removed. This allows invalid co...
diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py index 9ec8a61..19d1416 100644 --- a/pydantic/_internal/_generate_schema.py +++ b/pydantic/_internal/_generate_schema.py @@ -1934,21 +1934,10 @@ class GenerateSchema: unpack_type = _typing_extra.unpack_type(an...
["tests/test_docs.py::test_docs_examples[docs/errors/usage_errors.md:1303-1316]", "tests/test_validate_call.py::test_unpacked_typed_dict_kwargs_invalid_type", "tests/test_validate_call.py::test_unpacked_typed_dict_kwargs_overlaps"]
["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
12
3
1,205
0
0.6
1
0.75
1
0.240833
80.9975
6,863
swe_smith::train::38507
swe_smith
train
38,507
amueller__word_cloud.ec24191c.func_pm_ctrl_shuffle__p0vuu6sd
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
# WordCloud mask functionality broken ## Description The `_get_bolean_mask` method in the WordCloud class is not working correctly. When trying to use a mask with WordCloud, it fails with an error about a local variable being referenced before assignment. ## Expected behavior When providing a mask to WordCloud, it ...
diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py index 1622c03..19dd0cf 100644 --- a/wordcloud/wordcloud.py +++ b/wordcloud/wordcloud.py @@ -998,10 +998,7 @@ class WordCloud(object): return '\n'.join(result) def _get_bolean_mask(self, mask): - """Cast to two dimensional boolean mask."...
["test/test_wordcloud.py::test_mask", "test/test_wordcloud.py::test_mask_contour", "test/test_wordcloud.py::test_max_font_size_as_mask_height"]
["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
11
3
1,225
0
0.6
1
0.75
1
0.240833
80.9975
6,864
swe_smith::train::6799
swe_smith
train
6,799
joke2k__faker.8b401a7d.func_pm_remove_cond__5shhjepo
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
JSON generation returns list instead of object when num_rows=1 #### Description When using the `json()` method with `num_rows=1`, the method now returns a JSON array containing a single object instead of just the object itself. This breaks existing code that expects a single JSON object when generating one row of dat...
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index 70f20ec..ad1d8b8 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -603,9 +603,6 @@ class Provider(BaseProvider): if not isinstance(kwargs, dict): raise Type...
["tests/providers/test_misc.py::TestMiscProvider::test_json_with_arguments", "tests/providers/test_misc.py::TestMiscProvider::test_json_passthrough_values", "tests/providers/test_misc.py::TestMiscProvider::test_json_type_integrity_int", "tests/providers/test_misc.py::TestMiscProvider::test_json_type_integrity_float", "...
["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
11
13
1,225
0
0.6
1
0.75
1
0.240833
80.9975
6,865
swe_smith::train::26636
swe_smith
train
26,636
pylint-dev__astroid.b114f6b5.lm_rewrite__zsczue06
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
### Attribute Access on Uninferable Objects Causes Errors It seems that recent changes have introduced an issue with attribute access on Uninferable objects. This is causing unexpected behavior in several parts of the codebase, particularly when dealing with numpy functions and attributes. **To Reproduce** Here's a ...
diff --git a/astroid/util.py b/astroid/util.py index 510b81c..eefbaf4 100644 --- a/astroid/util.py +++ b/astroid/util.py @@ -28,14 +28,14 @@ class UninferableBase: __str__ = __repr__ def __getattribute__(self, name: str) -> Any: - if name == "next": - raise AttributeError("next method shou...
["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
14
30
1,165
0
0.6
1
0.75
1
0.240833
80.9975
6,866
swe_smith::train::10645
swe_smith
train
10,645
paramiko__paramiko.23f92003.func_basic__wc1x4agd
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Interactive authentication fallback broken for single-field prompts #### Description Interactive authentication fallback is not working correctly when the server sends a single field prompt. The authentication fails instead of properly handling the password field. #### Steps/Code to Reproduce ```python import param...
diff --git a/paramiko/transport.py b/paramiko/transport.py index f0fcb97..9cc070d 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1644,15 +1644,11 @@ class Transport(threading.Thread, ClosingContextManager): try: def handler(title, instructions, fields): - ...
["tests/auth.py::AuthHandler_::interactive_fallback", "tests/test_config.py::TestMatchExec::test_works_with_tokenized_hostname"]
["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
10
2
1,245
0
0.6
1
0.75
1
0.240833
80.9975
6,867
swe_smith::train::50859
swe_smith
train
50,859
python-hyper__h11.bed0dd4a.func_basic__r5u6r924
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
Connection.receive_data() raises RuntimeError when receiving empty data after connection close #### Description When calling `receive_data(b'')` (empty bytes) on a Connection that has already been closed, a RuntimeError is raised with the message "received close, then received more data?". This seems incorrect since ...
diff --git a/h11/_connection.py b/h11/_connection.py index e37d82a..fd2bbe5 100644 --- a/h11/_connection.py +++ b/h11/_connection.py @@ -400,12 +400,12 @@ class Connection: and equivalent to calling it once.) """ - if data: - if self._receive_buffer_closed: + if not ...
["h11/tests/test_connection.py::test_client_talking_to_http10_server", "h11/tests/test_connection.py::test_server_talking_to_http10_client", "h11/tests/test_connection.py::test_pipelining", "h11/tests/test_connection.py::test_protocol_switch", "h11/tests/test_connection.py::test_close_simple", "h11/tests/test_connectio...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_conn...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
8
9
1,285
0
0.6
1
0.75
1
0.240833
80.9975
6,868
swe_smith::train::40292
swe_smith
train
40,292
scanny__python-pptx.278b47b1.combine_module__4emfjsq5
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
# Picture crop_bottom property returns negative value I'm trying to work with picture cropping in a PowerPoint presentation and noticed that the `crop_bottom` property is returning a negative value when it should be positive. ## Reproduction ```python from pptx import Presentation from pptx.util import Inches # Cre...
diff --git a/src/pptx/shapes/picture.py b/src/pptx/shapes/picture.py index 5918286..aef4637 100644 --- a/src/pptx/shapes/picture.py +++ b/src/pptx/shapes/picture.py @@ -30,7 +30,7 @@ class _BasePicture(BaseShape): Read/write. 1.0 represents 100%. For example, 25% is represented by 0.25. Negative values ...
["tests/shapes/test_picture.py::Describe_BasePicture::it_knows_its_cropping[crop_get_fixture6]", "tests/shapes/test_shapetree.py::DescribeMasterShapes::it_provides_access_to_its_shape_factory"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
2
6
2
1,324
0
0.6
1
0.75
1
0.240667
80.997
6,869
swe_smith::train::31663
swe_smith
train
31,663
benoitc__gunicorn.bacbf8aa.func_pm_remove_loop__zjhxkuq3
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Worker class loading broken for single component names When specifying a worker class using a single component name (like 'sync', 'gevent', etc.), gunicorn fails to load the worker class and raises a RuntimeError. #### Steps to Reproduce ```python from gunicorn.util import load_class # This should work but fails tr...
diff --git a/gunicorn/util.py b/gunicorn/util.py index e66dbeb..8ff1ac7 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -87,22 +87,7 @@ def load_class(uri, default="gunicorn.workers.sync.SyncWorker", else: components = uri.split('.') if len(components) == 1: - while True: - ...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
["tests/test_config.py::test_worker_class", "tests/test_config.py::test_defaults", "tests/test_config.py::test_bool_validation", "tests/test_config.py::test_pos_int_validation", "tests/test_config.py::test_str_validation", "tests/test_config.py::test_str_to_addr_list_validation", "tests/test_config.py::test_str_to_list...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
18
13
1,084
0
0.6
1
0.75
1
0.240667
80.997
6,870
swe_smith::train::46577
swe_smith
train
46,577
python-trio__trio.cfbbe2c1.combine_file__5rco3qho
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Memory channel creation returns channels in wrong order #### Description When creating memory channels using `trio.open_memory_channel()`, the function returns the receive channel first and send channel second, but it should return send channel first and receive channel second according to the expected API. #### Ste...
diff --git a/src/trio/_channel.py b/src/trio/_channel.py index 6410d91..bcb8d47 100644 --- a/src/trio/_channel.py +++ b/src/trio/_channel.py @@ -76,14 +76,14 @@ def _open_memory_channel( this channel (summing over all clones). """ - if max_buffer_size != inf and not isinstance(max_buffer_size, int): + ...
["src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_on_asyncio", "src/trio/_tests/test_channel.py::test_channel", "src/trio/_tests/test_channel.py::test_553", "src/trio/_tests/test_channel.py::test_channel_multiple_producers", "src/trio/_tests/test_channel.py::test_channel_multiple_consumers", "src/trio/_tests/...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
13
65
1,184
0
0.6
1
0.75
1
0.240667
80.997
6,871
swe_smith::train::31962
swe_smith
train
31,962
davidhalter__parso.338a5760.func_basic__gix38qug
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
F-string parsing crashes with IndexError on certain expressions #### Description When parsing f-strings with certain expressions, parso crashes with an IndexError instead of properly handling the syntax. This affects various f-string constructs including format specifications, conversions, and nested expressions. ##...
diff --git a/parso/python/errors.py b/parso/python/errors.py index 09c5047..3cd9575 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -1014,26 +1014,26 @@ class _FStringRule(SyntaxRule): self._check_fstring_contents(format_spec.children[1:], depth) def _check_fstring_expr(self, fstring...
["test/test_file_python_errors.py::test_on_itself[3.6]", "test/test_file_python_errors.py::test_on_itself[3.7]", "test/test_file_python_errors.py::test_on_itself[3.8]", "test/test_file_python_errors.py::test_on_itself[3.9]", "test/test_file_python_errors.py::test_on_itself[3.10]", "test/test_python_errors.py::test_pyth...
["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
16
10
1,124
0
0.6
1
0.75
1
0.240667
80.997
6,872
swe_smith::train::32042
swe_smith
train
32,042
davidhalter__parso.338a5760.func_basic__rhatg2fk
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
get_leaf_for_position raises ValueError for valid positions at node boundaries #### Description When calling `get_leaf_for_position` on a BaseNode with a position that equals the start position of a child element, a ValueError is raised claiming the position doesn't exist within the node, even though the position sho...
diff --git a/parso/tree.py b/parso/tree.py index e529871..cf14966 100644 --- a/parso/tree.py +++ b/parso/tree.py @@ -417,23 +417,21 @@ class BaseNode(NodeOrLeaf): def binary_search(lower, upper): if lower == upper: element = self.children[lower] - if not include_pre...
["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
16
73
1,124
0
0.6
1
0.75
1
0.240667
80.997
6,873
swe_smith::train::43816
swe_smith
train
43,816
pydata__patsy.a5d16484.combine_file__q1ir5rrw
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Formula parsing broken with bracket level tracking and origin handling #### Description Formula parsing is failing due to incorrect bracket level tracking and origin handling in the tokenizer. When parsing formulas with parentheses or brackets, the parser incorrectly tracks nesting levels and mixes up token origins w...
diff --git a/patsy/parse_formula.py b/patsy/parse_formula.py index 1a324f7..efd5cef 100644 --- a/patsy/parse_formula.py +++ b/patsy/parse_formula.py @@ -35,8 +35,6 @@ def _is_a(f, v): # Helper function for _tokenize_formula: def _read_python_expr(it, end_tokens): - # Read out a full python expression, stopping w...
["patsy/desc.py::test_ModelDesc_from_formula", "patsy/desc.py::test_eval_formula", "patsy/desc.py::test_eval_formula_error_reporting", "patsy/desc.py::test_formula_factor_origin", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines...
["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
22
29
1,004
0
0.6
1
0.75
1
0.240667
80.997
6,874
swe_smith::train::32659
swe_smith
train
32,659
pydantic__pydantic.acb0f10f.func_pm_remove_cond__4xv8w0pz
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Model copy methods fail with NameError after recent changes #### Description Model copy operations are broken and raise `NameError` for undefined variables `fields_set` and `extra`. This affects both the deprecated `copy()` method and the new `model_copy()` method. #### Steps/Code to Reproduce ```python from pydant...
diff --git a/pydantic/main.py b/pydantic/main.py index 03cb511..caa7957 100644 --- a/pydantic/main.py +++ b/pydantic/main.py @@ -1489,29 +1489,11 @@ class BaseModel(metaclass=_model_construction.ModelMetaclass): else: private = {k: v for k, v in self.__pydantic_private__.items() if v is not Pydant...
["tests/test_construction.py::test_simple_copy[copy]", "tests/test_construction.py::test_deep_copy[copy]", "tests/test_construction.py::test_copy_exclude", "tests/test_construction.py::test_copy_include", "tests/test_construction.py::test_copy_include_exclude", "tests/test_construction.py::test_copy_advanced_exclude", ...
["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
18
17
1,083
0
0.6
1
0.75
1
0.2405
80.9965
6,875
swe_smith::train::29890
swe_smith
train
29,890
getnikola__nikola.0f4c230e.func_pm_ctrl_shuffle__j10qic19
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
Listing directive broken after recent changes Description The listing directive in reStructuredText files is completely broken. When trying to build a site with listing directives, the build fails with various errors. Steps to Reproduce Create a simple reStructuredText file with a listing directive: ```rst .. list...
diff --git a/nikola/plugins/compile/rest/listing.py b/nikola/plugins/compile/rest/listing.py index f358f28..e23cbc0 100644 --- a/nikola/plugins/compile/rest/listing.py +++ b/nikola/plugins/compile/rest/listing.py @@ -189,14 +189,8 @@ class Listing(Include): option_spec = listing_spec def run(self): - ...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[overall]", "tests/integration/test_archive_full.py::test_full...
["tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_per_day.py::test_check_files", "tests/integration/test_archive_per_month.py::test_check_files", "tests/integration/test_building_in_subdir.py::test_check_files", "tests/integration/test_category_destpath.py::test_archive_exists...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
29
53
863
0
0.6
1
0.75
1
0.2405
80.9965
6,876
swe_smith::train::4848
swe_smith
train
4,848
bottlepy__bottle.a8dfef30.func_basic__rejfmttg
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
Multipart parser memory limit validation broken When setting memory limits for multipart parsing, the validation logic appears to be inverted. The parser is not properly enforcing memory limits, allowing uploads that should be rejected. #### Steps/Code to Reproduce ```python import bottle from io import BytesIO # C...
diff --git a/bottle.py b/bottle.py index 286b5bc..cb9d1f4 100755 --- a/bottle.py +++ b/bottle.py @@ -3220,14 +3220,14 @@ class _MultipartParser(object): self.content_length = content_length self.disk_limit = disk_limit self.memfile_limit = memfile_limit - self.mem_limit = min(mem_limit...
["test/test_multipart.py::TestBrokenMultipart::test_mem_limit"]
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
6
1
1,323
0
0.6
1
0.75
1
0.2405
80.9965
6,877
swe_smith::train::23443
swe_smith
train
23,443
pyparsing__pyparsing.533adf47.func_basic__2kd86tyb
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
PrecededBy parser fails with AttributeError when using exact lookbehind #### Description When using `PrecededBy` with exact lookbehind matching, the parser raises an `AttributeError` instead of properly parsing the input string. #### Steps/Code to Reproduce ```python from pyparsing import * # Create a simple parse...
diff --git a/pyparsing/core.py b/pyparsing/core.py index 777165c..94b4230 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -4926,25 +4926,23 @@ class PrecededBy(ParseElementEnhance): def parseImpl(self, instring, loc=0, do_actions=True) -> ParseImplReturnType: if self.exact: - if loc...
["tests/test_unit.py::Test02_WithoutPackrat::testPrecededBy", "tests/test_unit.py::Test04_WithPackrat::testPrecededBy", "tests/test_unit.py::Test06_WithBoundedPackrat::testPrecededBy", "tests/test_unit.py::Test08_WithUnboundedPackrat::testPrecededBy", "tests/test_unit.py::Test09_WithLeftRecursionParsing::testPrecededBy...
["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse...
jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47
true
null
1
14
6
1,163
0
0.6
1
0.75
1
0.2405
80.9965
6,878
swe_smith::train::30741
swe_smith
train
30,741
mido__mido.a0158ff9.combine_module__eo4cxvcc
swesmith/mido__mido.a0158ff9
mido/mido
python
null
# MetaMessage.from_bytes fails to parse valid meta messages I've found an issue with the `MetaMessage.from_bytes()` method. It's not correctly parsing valid meta messages. Here's a simple example to reproduce the issue: ```python from mido.midifiles.meta import MetaMessage # Create a simple text meta message text_b...
diff --git a/mido/midifiles/meta.py b/mido/midifiles/meta.py index 0a7e2ba..2a7027a 100644 --- a/mido/midifiles/meta.py +++ b/mido/midifiles/meta.py @@ -547,21 +547,21 @@ class MetaMessage(BaseMessage): @classmethod def from_bytes(cls, msg_bytes): - if msg_bytes[0] != 0xff: + if msg_bytes[0] =...
["../dev/tests/midifiles/test_meta.py::test_meta_from_bytes_data_too_short", "../dev/tests/midifiles/test_meta.py::test_meta_from_bytes_data_too_long", "../dev/tests/midifiles/test_meta.py::test_meta_from_bytes_text", "../dev/tests/midifiles/test_midifiles.py::test_midifile_repr", "../dev/tests/midifiles/test_tracks.py...
["../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev...
jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9
true
null
2
24
5
963
0
0.6
1
0.75
1
0.2405
80.9965
6,879
swe_smith::train::45699
swe_smith
train
45,699
conan-io__conan.86f29e13.func_pm_class_rm_funcs__77ks58c5
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Describe the bug After applying the recent changes, I encountered an issue with the `Options` class where it seems to allow modification of options even after they are supposed to be frozen. This behavior is unexpected and breaks the intended immutability of the options once they are set to static. ### How to Rep...
diff --git a/conan/internal/model/options.py b/conan/internal/model/options.py index 99aff01..efcc89f 100644 --- a/conan/internal/model/options.py +++ b/conan/internal/model/options.py @@ -317,23 +317,12 @@ class Options: return super(Options, self).__setattr__(attr, value) return setattr(self._pa...
["test/unittests/model/options_test.py::TestOptions::test_freeze"]
["test/unittests/model/options_test.py::TestOptions::test_booleans", "test/unittests/model/options_test.py::TestOptions::test_invalid_value", "test/unittests/model/options_test.py::TestOptions::test_non_existing_option", "test/unittests/model/options_test.py::TestOptions::test_int", "test/unittests/model/options_test.p...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
13
1
1,183
0
0.6
1
0.75
1
0.2405
80.9965
6,880
swe_smith::train::3229
swe_smith
train
3,229
Suor__funcy.207a7810.func_pm_remove_cond__sshmq0kq
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# Regular expression matching functions broken in funcy/strings.py I'm encountering issues with the regular expression functions in funcy. The `re_find` and `re_all` functions are not working correctly. ## Steps to reproduce Here's a simple script that demonstrates the issue: ```python from funcy import re_find, re...
diff --git a/funcy/strings.py b/funcy/strings.py index b70fd1f..ae5e046 100644 --- a/funcy/strings.py +++ b/funcy/strings.py @@ -12,15 +12,6 @@ __all__ = ['re_iter', 're_all', 're_find', 're_finder', 're_test', 're_tester', def _make_getter(regex): if regex.groups == 0: return methodcaller('group') - ...
["tests/test_debug.py::test_log_durations", "tests/test_debug.py::test_log_durations_ex", "tests/test_seqs.py::test_group_by_keys", "tests/test_strings.py::test_re_find", "tests/test_strings.py::test_re_all"]
["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
9
5
1,263
0
0.6
1
0.75
1
0.2405
80.9965
6,881
swe_smith::train::23882
swe_smith
train
23,882
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__sxc2vt8l
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Scraper filelist fails with AttributeError when using old format patterns #### Description When using the Scraper class with old format patterns (deprecated `pattern` parameter), calling `filelist()` raises an `AttributeError: 'Scraper' object has no attribute 'datetime_pattern'`. #### Steps/Code to Reproduce ```py...
diff --git a/sunpy/net/scraper.py b/sunpy/net/scraper.py index 202638e..c4376bd 100644 --- a/sunpy/net/scraper.py +++ b/sunpy/net/scraper.py @@ -296,14 +296,16 @@ class Scraper: Goes over locally stored archives to return list of files in the given timerange. """ if self.use_old_format: - ...
["sunpy/net/tests/test_scraper.py::test_files_range_same_directory_local", "sunpy/net/tests/test_scraper.py::test_files_range_same_directory_local_new_format"]
["sunpy/net/tests/test_scraper.py::test_directory_date_pattern", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_new_format", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_false", "sunpy/net/tests/test_scraper.py::test_directory_date_patternFalse_new_format", "sunpy/net/tests/test_scraper....
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
23
2
982
0
0.6
1
0.75
1
0.240333
80.996
6,882
swe_smith::train::22408
swe_smith
train
22,408
tweepy__tweepy.91a41c6e.func_basic__tioyohin
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Issue: IndexError in IdIterator when fetching pages #### Description I've encountered an issue with the `IdIterator` in the latest version of the library. When attempting to fetch pages using the `Cursor` class, an `IndexError` is raised unexpectedly. This seems to occur when the iterator tries to access an index...
diff --git a/tweepy/cursor.py b/tweepy/cursor.py index 1db73e1..47d4849 100644 --- a/tweepy/cursor.py +++ b/tweepy/cursor.py @@ -160,10 +160,10 @@ class IdIterator(BaseIterator): def next(self): """Fetch a set of items with IDs less than current set.""" - if self.num_tweets >= self.limit: + ...
["tests/test_cursors.py::TweepyCursorTests::testidcursorpages"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
9
1
1,262
0
0.6
1
0.75
1
0.240333
80.996
6,883
swe_bench::dev::1
swe_bench
dev
1
marshmallow-code__marshmallow-1229
marshmallow-code/marshmallow
marshmallow-code/marshmallow
python
456bacbbead4fa30a1a82892c9446ac9efb8055b
`only` argument inconsistent between Nested(S, many=True) and List(Nested(S)) ```python from pprint import pprint from marshmallow import Schema from marshmallow.fields import Integer, List, Nested, String class Child(Schema): name = String() age = Integer() class Family(Schema): children = List(Nested(C...
For now I'm using following workaround: ```python class ListFix(List): @property def only(self): return getattr(self.container, 'only') @only.setter def only(self, new_options): original_options = getattr(self.container, 'only', ()) if original_options: ne...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -576,12 +576,18 @@ def __init__(self, cls_or_instance, **kwargs): 'The list elements must be a subclass or instance of ' 'marshmallow.base.FieldABC.', ...
diff --git a/tests/test_fields.py b/tests/test_fields.py --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -247,6 +247,36 @@ class MySchema(Schema): class TestListNested: + @pytest.mark.parametrize('param', ('only', 'exclude', 'dump_only', 'load_only')) + def test_list_nested_only_exclude_dump_only_lo...
["tests/test_fields.py::TestListNested::test_list_nested_only_exclude_dump_only_load_only_propagated_to_nested[only]", "tests/test_fields.py::TestListNested::test_list_nested_only_exclude_dump_only_load_only_propagated_to_nested[exclude]", "tests/test_fields.py::TestListNested::test_list_nested_only_and_exclude_merged_...
["tests/test_fields.py::test_field_aliases[Integer-Integer]", "tests/test_fields.py::test_field_aliases[String-String]", "tests/test_fields.py::test_field_aliases[Boolean-Boolean]", "tests/test_fields.py::test_field_aliases[Url-Url]", "tests/test_fields.py::TestField::test_repr", "tests/test_fields.py::TestField::test_...
null
true
2019-06-04T07:29:21Z
1
21
8
821
0
0.8
1
0.55
1
0.206833
80.9955
6,884
swe_smith::train::49151
swe_smith
train
49,151
mozilla__bleach.73871d76.combine_file__sxoqhdvs
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parser returns early from startTag processing causing UnboundLocalError #### Description When parsing HTML with certain tag structures, the parser encounters an UnboundLocalError for the variable `func` in the startTag processing method. This appears to be related to an early return statement that bypasses the n...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..1771a73 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -456,6 +456,7 @@ def getPhases(debug): # requires a circular reference to the Phase, and th...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_unclosed_tag", "tests/test_clean.py::test_stripping_tags[<ul><li><script></li></ul>-kwargs4-<ul><li></li></ul>]", "tests/test_clean.py::test_escaping_tags[<ul><li><script></li></ul>-<ul><l...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
19
47
1,061
0
0.6
1
0.75
1
0.240167
80.9955
6,885
swe_smith::train::48159
swe_smith
train
48,159
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_invert_if__ns1s33d4
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Python templater produces incorrect output when processing invariant slices #### Description The Python templater is not correctly handling invariant slices during template processing, causing KeyError exceptions and incorrect output generation. #### Steps/Code to Reproduce ```python from sqlfluff.core.templaters.p...
diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py index a2126a8..480bac6 100644 --- a/src/sqlfluff/core/templaters/python.py +++ b/src/sqlfluff/core/templaters/python.py @@ -570,6 +570,16 @@ class PythonTemplater(RawTemplater): # Loop through for raw_file_sli...
["test/core/templaters/python_test.py::test__templater_python", "test/core/templaters/python_test.py::test__templater_python_split_invariants[raw_sliced1-literals1-raw_occurrences1-templated_occurrences1-3-result1]"]
["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
21
2
1,021
0
0.6
1
0.75
1
0.240167
80.9955
6,886
swe_smith::train::3246
swe_smith
train
3,246
Suor__funcy.207a7810.lm_rewrite__cgxzrbzd
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# `fallback()` function doesn't handle callable-only approaches ## Bug description The `fallback()` function in `flow.py` doesn't properly handle the case when an approach is just a callable without explicit error types. According to the docstring, each approach should have a form of `(callable, expected_errors)`, bu...
diff --git a/funcy/flow.py b/funcy/flow.py index 85c5a8e..3879189 100644 --- a/funcy/flow.py +++ b/funcy/flow.py @@ -113,14 +113,14 @@ def retry(call, tries, errors=Exception, timeout=0, filter_errors=None): def fallback(*approaches): """Tries several approaches until one works. Each approach has a form o...
["tests/test_flow.py::test_fallback"]
["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
12
1
1,201
0
0.6
1
0.75
1
0.240167
80.9955
6,887
swe_smith::train::20554
swe_smith
train
20,554
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__25pli4wm
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Hive dialect date diff function generates invalid SQL with UnboundLocalError #### Description When using date difference functions in Hive dialect, the SQL generation fails with an UnboundLocalError for the `unit` variable. This appears to happen when the code tries to access the `unit` variable before it's defined i...
diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py index 6084d44..131c9e2 100644 --- a/sqlglot/dialects/hive.py +++ b/sqlglot/dialects/hive.py @@ -84,28 +84,27 @@ def _add_date_sql(self: Hive.Generator, expression: DATE_ADD_OR_SUB) -> str: def _date_diff_sql(self: Hive.Generator, expression: exp.Date...
["tests/dialects/test_hive.py::TestHive::test_time"]
["tests/dialects/test_hive.py::TestHive::test_bits", "tests/dialects/test_hive.py::TestHive::test_cast", "tests/dialects/test_hive.py::TestHive::test_data_type", "tests/dialects/test_hive.py::TestHive::test_ddl", "tests/dialects/test_hive.py::TestHive::test_escapes", "tests/dialects/test_hive.py::TestHive::test_hive", ...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
17
1
1,101
0
0.6
1
0.75
1
0.240167
80.9955
6,888
swe_smith::train::21478
swe_smith
train
21,478
rubik__radon.54b88e58.func_pm_ctrl_shuffle__hlx1zipr
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
# Class.complexity property is broken for classes with methods I found a bug in the `Class.complexity` property calculation. The code is incorrectly structured, causing an `UnboundLocalError` when trying to calculate the complexity of a class with methods. ## Reproduction Here's a simple example that demonstrates th...
diff --git a/radon/visitors.py b/radon/visitors.py index e774648..045806a 100644 --- a/radon/visitors.py +++ b/radon/visitors.py @@ -95,14 +95,13 @@ class Class(BaseClass): @property def complexity(self): + if not self.methods: + return self.real_complexity '''The average complexi...
["radon/tests/test_cli_tools.py::test_cc_to_dict[blocks1-dict_result1]", "radon/tests/test_cli_tools.py::test_cc_to_terminal", "radon/tests/test_complexity_visitor.py::test_visitor_containers[values3-expected3]"]
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
1
7
3
1,300
0
0.6
1
0.75
1
0.24
80.995
6,889
swe_smith::train::28162
swe_smith
train
28,162
Mimino666__langdetect.a1598f1a.combine_file__5swmk7zt
swesmith/Mimino666__langdetect.a1598f1a
mimino666/langdetect
python
null
Language detection fails with ZeroDivisionError after recent changes #### Description Language detection is broken and throws a ZeroDivisionError when trying to detect languages from text. This appears to affect all basic detection functionality. #### Steps/Code to Reproduce ```python from langdetect import detect ...
diff --git a/langdetect/detector_factory.py b/langdetect/detector_factory.py index e026161..03ef5fb 100644 --- a/langdetect/detector_factory.py +++ b/langdetect/detector_factory.py @@ -29,8 +29,8 @@ class DetectorFactory(object): seed = None def __init__(self): - self.word_lang_prob_map = {} - ...
["langdetect/tests/test_detector.py::DetectorTest::test_detector1", "langdetect/tests/test_detector.py::DetectorTest::test_detector2", "langdetect/tests/test_detector.py::DetectorTest::test_detector3", "langdetect/tests/test_detector.py::DetectorTest::test_detector4", "langdetect/tests/test_detector.py::DetectorTest::t...
["langdetect/tests/test_language.py::LanguageTest::test_cmp", "langdetect/tests/test_language.py::LanguageTest::test_language", "langdetect/tests/utils/test_lang_profile.py::LangProfileText::test_add", "langdetect/tests/utils/test_lang_profile.py::LangProfileText::test_add_illegally1", "langdetect/tests/utils/test_lang...
jyangballin/swesmith.x86_64.mimino666_1776_langdetect.a1598f1a
true
null
1
28
6
880
0
0.6
1
0.75
1
0.24
80.995
6,890
swe_smith::train::44003
swe_smith
train
44,003
pydata__patsy.a5d16484.func_basic__dw6rr7fx
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Formula evaluation fails with "compiler_flag" error #### Description When trying to evaluate formulas, patsy throws a ValueError related to compiler flags. This affects basic formula operations and makes the library unusable. #### Steps/Code to Reproduce ```python import patsy import numpy as np # Simple formula e...
diff --git a/patsy/eval.py b/patsy/eval.py index 9d1fba0..046935a 100644 --- a/patsy/eval.py +++ b/patsy/eval.py @@ -25,15 +25,14 @@ from patsy.compat import call_and_wrap_exc def _all_future_flags(): - flags = 0 + flags = 1 for feature_name in __future__.all_feature_names: + if feature_name.star...
["patsy/eval.py::test_EvalEnvironment_capture_flags", "patsy/eval.py::test_EvalEnvironment_eval_namespace", "patsy/eval.py::test_EvalFactor_end_to_end", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths", "pa...
["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
11
22
1,220
0
0.6
1
0.75
1
0.24
80.995
6,891
swe_smith::train::9834
swe_smith
train
9,834
keleshev__schema.24a30457.func_pm_ctrl_invert_if__gz4iiygu
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
# JSON Schema refs generation is broken when using use_refs=True ## Description When generating a JSON schema with `use_refs=True`, the logic for handling references is incorrect. The code is adding the `$id` to objects that haven't been seen before and returning references to objects that have been seen, which is th...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..0cc2299 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -603,13 +603,12 @@ class Schema(object): hashed = hash(repr(sorted(return_dict.items()))) if hashed not in seen: - seen[hashed] =...
["test_schema.py::test_json_schema_refs", "test_schema.py::test_json_schema_refs_is_smaller", "test_schema.py::test_json_schema_refs_no_missing"]
["test_schema.py::test_schema", "test_schema.py::test_validate_file", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_or_only_one", "test_schema.py::test_test", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema....
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
7
3
1,300
0
0.6
1
0.75
1
0.24
80.995
6,892
r2e_gym::train::6035
r2e_gym
train
6,035
tornado__62dde35e3f5329c65db55dde42bf4c065e2605ef
tornado
tornadoweb/tornado
python
62dde35e3f5329c65db55dde42bf4c065e2605ef
**Title:** `AsyncTestCase.wait()` Ignores Custom Timeout Settings, Preventing Proper Timeout Exceptions **Description:** The `wait()` method in `AsyncTestCase` is intended to honor custom timeout configurations set either through the `timeout` parameter or the `ASYNC_TEST_TIMEOUT` environment variable. However, when a...
diff --git a/tornado/testing.py b/tornado/testing.py --- a/tornado/testing.py +++ b/tornado/testing.py @@ -82,6 +82,17 @@ return sock, port +def get_async_test_timeout(): + """Get the global timeout setting for async tests. + + Returns a float, the timeout in seconds. + """ + try: + return f...
diff --git a/tornado/test/testing_test.py b/tornado/test/testing_test.py --- a/tornado/test/testing_test.py +++ b/tornado/test/testing_test.py @@ -10,6 +10,20 @@ import os +@contextlib.contextmanager +def set_environ(name, value): + old_value = os.environ.get('name') + os.environ[name] = value + + try: + ...
null
null
namanjain12/tornado_final:62dde35e3f5329c65db55dde42bf4c065e2605ef
true
null
1
32
null
1,512
0
0.75
1
0.6375
1
0.358667
80.99475
6,893
swe_smith::train::39897
swe_smith
train
39,897
tornadoweb__tornado.d5ac65c1.func_pm_remove_cond__m63hd3vx
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
Locale.format_date fails with offset-naive datetime objects #### Description When calling `format_date` with a naive datetime object (one without timezone info), the method raises a `TypeError` because it tries to compare offset-naive and offset-aware datetimes. #### Steps/Code to Reproduce ```python import datetim...
diff --git a/tornado/locale.py b/tornado/locale.py index abd8668..7a8bc34 100644 --- a/tornado/locale.py +++ b/tornado/locale.py @@ -350,8 +350,6 @@ class Locale: """ if isinstance(date, (int, float)): date = datetime.datetime.fromtimestamp(date, datetime.timezone.utc) - if date.tz...
["test_format_date (tornado.test.locale_test.EnglishTest)"]
["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
22
1
999
0
0.6
1
0.75
1
0.239833
80.9945
6,894
swe_smith::train::18217
swe_smith
train
18,217
msiemens__tinydb.10644a0e.func_basic__3aft8mw4
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
LRU Cache eviction behavior incorrect when cache is at capacity When using the LRU cache with a specific capacity, items are being evicted prematurely when the cache reaches its maximum size. The cache should only evict items when it exceeds the capacity, not when it equals the capacity. #### Steps/Code to Reproduce ...
diff --git a/tinydb/utils.py b/tinydb/utils.py index e1f01fb..314934b 100644 --- a/tinydb/utils.py +++ b/tinydb/utils.py @@ -98,17 +98,12 @@ class LRUCache(abc.MutableMapping, Generic[K, V]): return default def set(self, key: K, value: V): - if self.cache.get(key): - self.cache[key] = ...
["tests/test_tables.py::test_query_cache_size[memory]", "tests/test_tables.py::test_query_cache_size[json]", "tests/test_utils.py::test_lru_cache", "tests/test_utils.py::test_lru_cache_get"]
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
17
4
1,099
0
0.6
1
0.75
1
0.239833
80.9945
6,895
swe_smith::train::43803
swe_smith
train
43,803
pydata__patsy.a5d16484.combine_file__loz0qen3
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
# I and Q functions in patsy.builtins are not working correctly Hi! I'm working with patsy and noticed that the I() and Q() functions are not behaving as expected. ## Issue with I() function The I() function (identity function) is supposed to return the input value unchanged, but it seems to be returning None for nu...
diff --git a/patsy/builtins.py b/patsy/builtins.py index fb4b319..b03ff56 100644 --- a/patsy/builtins.py +++ b/patsy/builtins.py @@ -50,8 +50,8 @@ def I(x): def test_I(): - assert I(1) == 1 - assert I(None) is None + assert I(1) is None + assert I(None) == 1 def Q(name): @@ -99,9 +99,9 @@ def Q(na...
["patsy/builtins.py::test_I", "patsy/builtins.py::test_Q"]
["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
12
2
1,199
0
0.6
1
0.75
1
0.239833
80.9945
6,896
swe_smith::train::19442
swe_smith
train
19,442
seperman__deepdiff.ed252022.func_pm_remove_wrapper__8cszkgc4
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
CSV file patching fails with NameError: name 'dict_writer' is not defined #### Description When trying to patch CSV files using the deeppatch command, the operation fails with a NameError indicating that 'dict_writer' is not defined. This affects the ability to apply patches to CSV format files. #### Steps/Code to R...
diff --git a/deepdiff/serialization.py b/deepdiff/serialization.py index aa56399..dc4104b 100644 --- a/deepdiff/serialization.py +++ b/deepdiff/serialization.py @@ -555,12 +555,6 @@ def _save_content(content, path, file_type, keep_backup=True): with open(path, 'wb') as the_file: content = pickle_d...
["tests/test_command.py::TestCommands::test_deeppatch_command[t2_json.csv-t1.json-args3-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.csv-t2.csv-args4-0]"]
["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
7
2
1,298
0
0.6
1
0.75
1
0.239667
80.994
6,897
swe_smith::train::22012
swe_smith
train
22,012
life4__textdistance.c3aca916.func_pm_op_change_const__25vs1v08
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
LCSSeq algorithm produces incorrect results with index errors #### Description The LCSSeq (Longest Common Subsequence) algorithm is returning incorrect results and throwing IndexError exceptions when computing the longest common subsequence between strings. #### Steps/Code to Reproduce ```python import textdistance...
diff --git a/textdistance/algorithms/sequence_based.py b/textdistance/algorithms/sequence_based.py index b1fd7af..4723e8f 100644 --- a/textdistance/algorithms/sequence_based.py +++ b/textdistance/algorithms/sequence_based.py @@ -51,7 +51,7 @@ class LCSSeq(_BaseSimilarity): if numpy: lengths = nump...
["tests/test_common.py::test_normalization_range[alg7]", "tests/test_common.py::test_normalization_by_one[alg7]", "tests/test_common.py::test_normalization_same[alg7]", "tests/test_common.py::test_normalization_monotonic[alg7]", "tests/test_common.py::test_no_common_chars[alg7]", "tests/test_sequence/test_lcsseq.py::te...
["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati...
jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916
true
null
1
9
12
1,258
0
0.6
1
0.75
1
0.239667
80.994
6,898
swe_smith::train::50869
swe_smith
train
50,869
python-hyper__h11.bed0dd4a.func_basic__vmtnm9qk
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
# bytesify() function in h11._util.py now accepts integers and uses UTF-8 encoding ## Description When using the `bytesify()` function in h11, I noticed that it now behaves differently than before. There are two issues: 1. The function now accepts integers and converts them to bytes, when it previously raised a Type...
diff --git a/h11/_util.py b/h11/_util.py index 6718445..2e1334f 100644 --- a/h11/_util.py +++ b/h11/_util.py @@ -125,11 +125,10 @@ class Sentinel(type): # values. Accepts ascii-strings, or bytes/bytearray/memoryview/..., and always # returns bytes. def bytesify(s: Union[bytes, bytearray, memoryview, int, str]) -> by...
["h11/tests/test_util.py::test_bytesify"]
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_conn...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
9
1
1,257
0
0.6
1
0.75
1
0.2395
80.9935
6,899
swe_smith::train::53998
swe_smith
train
53,998
blevesearch__bleve.f2876b5e.func_pm_flip_operators__dn9l0hw6
swesmith/blevesearch__bleve.f2876b5e
blevesearch/bleve
go
null
Conjunction searcher crashes with nil pointer dereference #### Description The conjunction searcher is crashing with a nil pointer dereference when attempting to optimize composite searches. This appears to be related to incorrect logic conditions in the optimization paths. #### Steps/Code to Reproduce The crash oc...
diff --git a/search/searcher/search_conjunction.go b/search/searcher/search_conjunction.go index 57d8855..09769aa 100644 --- a/search/searcher/search_conjunction.go +++ b/search/searcher/search_conjunction.go @@ -56,11 +56,11 @@ func NewConjunctionSearcher(ctx context.Context, indexReader index.IndexReader, // atte...
["TestQueryStringEmptyConjunctionSearcher", "TestScorchCompositeSearchOptimizations"]
["TestBuilder", "TestIndexAliasSingle", "TestIndexAliasClosed", "TestIndexAliasEmpty", "TestIndexAliasMulti", "TestMultiSearchNoError", "TestMultiSearchSomeError", "TestMultiSearchAllError", "TestMultiSearchSecondPage", "TestMultiSearchTimeout", "TestMultiSearchTimeoutPartial", "TestIndexAliasMultipleLayer", "TestMulti...
jyangballin/swesmith.x86_64.blevesearch_1776_bleve.f2876b5e
true
null
1
8
2
1,277
0
0.6
1
0.75
1
0.2395
80.9935