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
8,000
swe_smith::train::8065
swe_smith
train
8,065
cantools__cantools.0c6a7871.func_pm_remove_assign__isiqkigz
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML parsing fails with NoneType error when processing numeric values #### Description When loading ARXML files, the parser fails with `int() argument must be a string, a bytes-like object or a real number, not 'NoneType'` error. This appears to affect various ARXML files that were previously working. #### Steps/Co...
diff --git a/src/cantools/database/can/formats/arxml/utils.py b/src/cantools/database/can/formats/arxml/utils.py index d5236ed..e896b42 100644 --- a/src/cantools/database/can/formats/arxml/utils.py +++ b/src/cantools/database/can/formats/arxml/utils.py @@ -16,7 +16,6 @@ def parse_number_string(in_string: str, allow_flo...
["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
10
11
1,047
0
0.6
1
0.75
1
0.207833
80.8985
8,001
swe_smith::train::43183
swe_smith
train
43,183
gawel__pyquery.811cd048.func_pm_ctrl_shuffle__xzpghcyw
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
serialize_dict() raises UnboundLocalError when called #### Description When calling `serialize_dict()` on a PyQuery object containing form elements, an `UnboundLocalError` is raised for the variable `ret`. #### Steps/Code to Reproduce ```python from pyquery import PyQuery as pq html = ''' <form> <input name="s...
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index 5b05681..1bb57c2 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -1618,6 +1618,13 @@ class PyQuery(list): @with_camel_case_alias def serialize_dict(self): + for name, val in self.serialize_pairs(): + if name not in ret:...
["pyquery/pyquery.py::pyquery.pyquery.PyQuery.serialize_dict", "tests/test_pyquery.py::TestAjax::test_serialize_dict"]
["README.rst::README.rst", "docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/manipulating.rst::manipulating.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselec...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
15
2
947
0
0.6
1
0.75
1
0.207833
80.8985
8,002
swe_smith::train::24741
swe_smith
train
24,741
marshmallow-code__marshmallow.9716fc62.func_basic__n4qxz9lt
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
URL validation fails when require_tld=False #### Description When using the URL validator with `require_tld=False`, URLs without top-level domains are incorrectly rejected as invalid. #### Steps/Code to Reproduce ```python from marshmallow import validate # This should pass but raises ValidationError validator = v...
diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py index e4536d8..5371789 100644 --- a/src/marshmallow/validate.py +++ b/src/marshmallow/validate.py @@ -163,12 +163,12 @@ class URL(Validator): def __call__( self, relative: bool, absolute: bool, require_tld: bool ) -> t...
["tests/test_schema.py::TestLoadOnly::test_url_field_requre_tld_false", "tests/test_validate.py::test_url_dont_require_tld_valid[http://example]", "tests/test_validate.py::test_url_dont_require_tld_valid[http://example.]", "tests/test_validate.py::test_url_dont_require_tld_valid[http://example:80]", "tests/test_validat...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
6
6
1,127
0
0.6
1
0.75
1
0.207833
80.8985
8,003
swe_smith::train::32066
swe_smith
train
32,066
davidhalter__parso.338a5760.func_basic__vd0m4rur
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Try-except syntax error detection broken for bare except clauses #### Description The syntax error detection for try-except statements with bare except clauses is not working correctly. When parsing code with a bare except clause followed by specific except clauses, the error detection fails to identify the syntax er...
diff --git a/parso/python/errors.py b/parso/python/errors.py index 09c5047..ea214d0 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -994,13 +994,13 @@ class _TryStmtRule(SyntaxRule): def is_issue(self, try_stmt): default_except = None - for except_clause in try_stmt.children[3...
["test/test_file_python_errors.py::test_on_itself[3.6]", "test/test_file_python_errors.py::test_on_itself[3.7]", "test/test_file_python_errors.py::test_on_itself[3.8]", "test/test_file_python_errors.py::test_on_itself[3.9]", "test/test_file_python_errors.py::test_on_itself[3.10]", "test/test_normalizer_issues_files.py:...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
10
13
1,046
0
0.6
1
0.75
1
0.207667
80.898
8,004
swe_smith::train::42111
swe_smith
train
42,111
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__e526o5hg
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Chart.value_axis property returns incorrect axis when chart has no value axis #### Description When accessing the `value_axis` property on a chart that has no value axis, the code attempts to return a ValueAxis object before checking if the axis list is empty, causing an IndexError instead of the expected ValueError....
diff --git a/src/pptx/chart/chart.py b/src/pptx/chart/chart.py index d73aa93..e64dfe0 100644 --- a/src/pptx/chart/chart.py +++ b/src/pptx/chart/chart.py @@ -178,18 +178,17 @@ class Chart(PartElementProxy): @property def value_axis(self): + valAx_lst = self._chartSpace.valAx_lst + return ValueA...
["tests/chart/test_chart.py::DescribeChart::it_provides_access_to_the_value_axis[val_ax_fixture0]", "tests/chart/test_chart.py::DescribeChart::it_provides_access_to_the_value_axis[val_ax_fixture1]", "tests/chart/test_chart.py::DescribeChart::it_raises_when_no_value_axis"]
["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
9
3
1,066
0
0.6
1
0.75
1
0.207667
80.898
8,005
swe_smith::train::38519
swe_smith
train
38,519
amueller__word_cloud.ec24191c.func_pm_remove_cond__das46loz
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
WordCloud initialization fails with TypeError when comparing matplotlib version #### Description When creating a WordCloud instance, the initialization fails with a `TypeError: '<' not supported between instances of 'str' and 'int'` error. This appears to be related to matplotlib version comparison logic. #### Steps...
diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py index 1622c03..a9d9d5b 100644 --- a/wordcloud/wordcloud.py +++ b/wordcloud/wordcloud.py @@ -319,10 +319,6 @@ class WordCloud(object): font_path = FONT_PATH if color_func is None and colormap is None: version = matplotlib.__v...
["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...
["test/test_wordcloud.py::test_single_color_func", "test/test_wordcloud.py::test_single_color_func_grey", "test/test_wordcloud.py::test_relative_scaling_zero", "test/test_wordcloud_cli.py::test_main_passes_arguments_through", "test/test_wordcloud_cli.py::test_parse_args_are_passed_along[option0]", "test/test_wordcloud_...
jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c
true
null
1
13
31
986
0
0.6
1
0.75
1
0.207667
80.898
8,006
swe_smith::train::52491
swe_smith
train
52,491
pydicom__pydicom.7d361b3d.func_pm_remove_assign__easouv20
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
NameError when compressing datasets without existing file_meta #### Description When trying to compress a dataset that doesn't have a `file_meta` attribute, the compression function fails with a `NameError` because it references undefined variables. #### Steps/Code to Reproduce ```python import pydicom from pydicom...
diff --git a/src/pydicom/pixels/utils.py b/src/pydicom/pixels/utils.py index f9a31a8..974bb82 100644 --- a/src/pydicom/pixels/utils.py +++ b/src/pydicom/pixels/utils.py @@ -409,7 +409,6 @@ def compress( if arr is None: # Check the dataset compression state file_meta = ds.get("file_meta", {}) - ...
["tests/pixels/test_encoder_base.py::TestDatasetCompress::test_compress_inplace", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_encapsulate_extended", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_planar_configuration_rle", "tests/pixels/test_encoder_base.py::TestFuture::test_compress", ...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
11
7
1,026
0
0.6
1
0.75
1
0.207667
80.898
8,007
swe_smith::train::44743
swe_smith
train
44,743
mahmoud__glom.fb3c4e76.func_basic__h4h7ub0y
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Fold operations broken after recent changes #### Description The Fold class and related reduction operations (Sum, Flatten, Merge) are not working correctly. When trying to use these operations, they're throwing errors instead of performing the expected reductions. #### Steps/Code to Reproduce ```python from glom i...
diff --git a/glom/reduction.py b/glom/reduction.py index b400ce0..bdc0457 100644 --- a/glom/reduction.py +++ b/glom/reduction.py @@ -67,17 +67,17 @@ class Fold: def glomit(self, target, scope): is_agg = False - if scope[MODE] is GROUP and scope.get(CUR_AGG) is None: + if scope[MODE] is GRO...
["glom/test/test_error.py::test_all_public_errors", "glom/test/test_grouping.py::test_agg", "glom/test/test_grouping.py::test_reduce", "glom/test/test_reduction.py::test_sum_integers", "glom/test/test_reduction.py::test_sum_seqs", "glom/test/test_reduction.py::test_fold", "glom/test/test_reduction.py::test_fold_bad_ite...
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
8
12
1,086
0
0.6
1
0.75
1
0.207667
80.898
8,008
swe_smith::train::19271
swe_smith
train
19,271
seperman__deepdiff.ed252022.func_pm_remove_assign__rpix23oy
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepDiff crashes with NameError when comparing iterables with moved items #### Description When comparing iterables that contain moved items, DeepDiff raises a `NameError: name 'next_level' is not defined` error. This appears to happen when the comparison involves items that have been moved between positions in the i...
diff --git a/deepdiff/diff.py b/deepdiff/diff.py index 76f186b..214a3f5 100755 --- a/deepdiff/diff.py +++ b/deepdiff/diff.py @@ -928,10 +928,6 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base): self._report_result('iterable_item_moved', change_level, local_tree=local_tree) ...
["tests/test_command.py::TestCommands::test_diff_command[t1.toml-t2.toml-10.0.0.2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
14
115
965
0
0.6
1
0.75
1
0.2075
80.8975
8,009
swe_smith::train::29652
swe_smith
train
29,652
cookiecutter__cookiecutter.b4451231.func_pm_remove_assign__sr0dfj04
swesmith/cookiecutter__cookiecutter.b4451231
cookiecutter/cookiecutter
python
null
NameError: name 'zip_path' is not defined when using local zip files #### Description When trying to use cookiecutter with local zip files, I'm getting a `NameError: name 'zip_path' is not defined` error. This happens both when using local zip files directly and when working with cached zip files from URLs. #### Ste...
diff --git a/cookiecutter/zipfile.py b/cookiecutter/zipfile.py index fdd9645..a222846 100644 --- a/cookiecutter/zipfile.py +++ b/cookiecutter/zipfile.py @@ -42,12 +42,11 @@ def unzip( # Build the name of the cached zipfile, # and prompt to delete if it already exists. identifier = zip_uri.rsp...
["tests/test_cookiecutter_local_no_input.py::test_cookiecutter_template_cleanup", "tests/zipfile/test_unzip.py::test_unzip_local_file", "tests/zipfile/test_unzip.py::test_unzip_protected_local_file_environment_password", "tests/zipfile/test_unzip.py::test_unzip_protected_local_file_bad_environment_password", "tests/zip...
["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl...
jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231
true
null
1
10
16
1,045
0
0.6
1
0.75
1
0.2075
80.8975
8,010
swe_smith::train::49429
swe_smith
train
49,429
mozilla__bleach.73871d76.func_pm_ctrl_shuffle__0kh36kdp
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
Trie.has_keys_with_prefix returns incorrect result when prefix is not found ### Description The `has_keys_with_prefix` method in the Trie class returns incorrect results when checking if a prefix exists in the trie. When a prefix is not found in the trie (i.e., when the index is at the end of the keys list), the meth...
diff --git a/bleach/_vendor/html5lib/_trie/py.py b/bleach/_vendor/html5lib/_trie/py.py index 56f66bd..8ec29f3 100644 --- a/bleach/_vendor/html5lib/_trie/py.py +++ b/bleach/_vendor/html5lib/_trie/py.py @@ -61,7 +61,7 @@ class Trie(ABCTrie): else: i = bisect_left(self._keys, prefix) - if i ...
["tests/test_clean.py::test_regressions[9.test]"]
["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
6
1
1,125
0
0.6
1
0.75
1
0.2075
80.8975
8,011
swe_smith::train::39722
swe_smith
train
39,722
tornadoweb__tornado.d5ac65c1.func_pm_ctrl_invert_if__3k8hyr8n
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
Log rotation with "time" mode raises ValueError incorrectly #### Description When using `enable_pretty_logging` with `log_rotate_mode="time"`, a ValueError is raised incorrectly claiming that "time" is not a valid value, even though it should be accepted. #### Steps/Code to Reproduce ```python from tornado.log impo...
diff --git a/tornado/log.py b/tornado/log.py index f5ca5c0..eee3a18 100644 --- a/tornado/log.py +++ b/tornado/log.py @@ -239,6 +239,12 @@ def enable_pretty_logging( encoding="utf-8", ) # type: logging.Handler elif rotate_mode == "time": + error_message = ( + ...
["test_log_file_with_timed_rotating (tornado.test.log_test.EnablePrettyLoggingTest)", "test_wrong_rotate_mode_value (tornado.test.log_test.EnablePrettyLoggingTest)"]
["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
13
2
985
0
0.6
1
0.75
1
0.2075
80.8975
8,012
swe_bench::test::1129
swe_bench
test
1,129
mwaskom__seaborn-2389
mwaskom/seaborn
mwaskom/seaborn
python
bcdac5411a1b71ff8d4a2fd12a937c129513e79e
ValueError: fill value must be in categories In the _preprocess_colors function, there is the code to replace na's with background color as the comment said, using `colors = colors.fillna('white')`, however, if the original colors do not contain the 'white' category, this line would raise the Pandas ValueError:fill va...
Can you please share a reproducible example that demonstrates the issue? I can't really figure out what you're talking about from this description. Here's a self-contained example, using ``clustermap()``. This has to do with colors input for row/col colors that are pandas ``category`` dtype: ```python import seaborn ...
diff --git a/seaborn/matrix.py b/seaborn/matrix.py --- a/seaborn/matrix.py +++ b/seaborn/matrix.py @@ -38,22 +38,15 @@ def _index_to_ticklabels(index): def _convert_colors(colors): """Convert either a list of colors or nested lists of colors to RGB.""" - to_rgb = mpl.colors.colorConverter.to_rgb - - if is...
diff --git a/seaborn/tests/test_matrix.py b/seaborn/tests/test_matrix.py --- a/seaborn/tests/test_matrix.py +++ b/seaborn/tests/test_matrix.py @@ -780,6 +780,26 @@ def test_colors_input(self): assert len(cg.fig.axes) == 6 + def test_categorical_colors_input(self): + kws = self.default_kws.copy() ...
["seaborn/tests/test_matrix.py::TestClustermap::test_categorical_colors_input"]
["seaborn/tests/test_matrix.py::TestHeatmap::test_ndarray_input", "seaborn/tests/test_matrix.py::TestHeatmap::test_df_input", "seaborn/tests/test_matrix.py::TestHeatmap::test_df_multindex_input", "seaborn/tests/test_matrix.py::TestHeatmap::test_mask_input[float]", "seaborn/tests/test_matrix.py::TestHeatmap::test_mask_i...
null
true
2020-12-18T19:35:43Z
1
34
1
365
0
0.8
1
0.55
1
0.174167
80.8975
8,013
swe_smith::train::26587
swe_smith
train
26,587
pylint-dev__astroid.b114f6b5.lm_rewrite__j5ti37aw
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
# ExceptHandler as_string doesn't handle 'as' variable correctly ## Description When using the `as_string` method on an `ExceptHandler` node, the variable name after the `as` keyword is not properly converted to a string. Instead of calling `accept()` on the name node, it's directly using the node object itself. ## ...
diff --git a/astroid/nodes/as_string.py b/astroid/nodes/as_string.py index d063350..cffdba4 100644 --- a/astroid/nodes/as_string.py +++ b/astroid/nodes/as_string.py @@ -262,18 +262,12 @@ class AsStringVisitor: return "" def visit_excepthandler(self, node: nodes.ExceptHandler) -> str: - n = "excep...
["tests/test_nodes.py::AsStringTest::test_3k_as_string", "tests/test_nodes.py::AsStringTest::test_module_as_string"]
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
14
2
965
0
0.6
1
0.75
1
0.2075
80.8975
8,014
swe_smith::train::39610
swe_smith
train
39,610
pallets__jinja.ada0a9a6.lm_rewrite__mnsztn3a
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Syntax Error Handling in Templates is Misbehaving Hey team, I've noticed an issue with how syntax errors are being handled in Jinja templates. It seems like the error messages are not being generated correctly when there's a mismatch in the expected tags. For instance, when using a template with a for loop, if the lo...
diff --git a/src/jinja2/lexer.py b/src/jinja2/lexer.py index 6dc94b6..c22406d 100644 --- a/src/jinja2/lexer.py +++ b/src/jinja2/lexer.py @@ -190,18 +190,12 @@ def describe_token(token: "Token") -> str: return _describe_token_type(token.type) -def describe_token_expr(expr: str) -> str: +def describe_token_expr(...
["tests/test_debug.py::TestDebug::test_syntax_error", "tests/test_lexnparse.py::TestParser::test_error_messages"]
["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
14
2
965
0
0.6
1
0.75
1
0.2075
80.8975
8,015
swe_smith::train::10111
swe_smith
train
10,111
paramiko__paramiko.23f92003.combine_file__fyo5tsij
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH Agent connection fails with AttributeError when no agent available #### Description When trying to use SSH agent authentication and no SSH agent is available, paramiko raises an AttributeError instead of gracefully handling the situation. #### Steps/Code to Reproduce ```python import paramiko # Make sure no SS...
diff --git a/paramiko/agent.py b/paramiko/agent.py index b29a0d1..c963505 100644 --- a/paramiko/agent.py +++ b/paramiko/agent.py @@ -60,8 +60,8 @@ for key, value in list(ALGORITHM_FLAG_MAP.items()): # TODO 4.0: rename all these - including making some of their methods public? class AgentSSH: def __init__(self): ...
["tests/test_client.py::SSHClientTest::test_auth_timeout", "tests/test_client.py::SSHClientTest::test_auth_trickledown", "tests/test_client.py::SSHClientTest::test_auto_add_policy", "tests/test_client.py::SSHClientTest::test_channel_timeout", "tests/test_client.py::SSHClientTest::test_cleanup", "tests/test_client.py::S...
["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
16
1,045
0
0.6
1
0.75
1
0.2075
80.8975
8,016
swe_smith::train::2403
swe_smith
train
2,403
pdfminer__pdfminer.six.1a8bd2f7.func_pm_ctrl_invert_if__28ht0fm1
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
literal_name function raises PSTypeError for PSLiteral objects in strict mode Description When `settings.STRICT` is enabled, the `literal_name` function incorrectly raises a `PSTypeError` for `PSLiteral` objects instead of processing them normally. This breaks PDF parsing functionality when strict mode is active. St...
diff --git a/pdfminer/psparser.py b/pdfminer/psparser.py index b486956..b4f8d9e 100755 --- a/pdfminer/psparser.py +++ b/pdfminer/psparser.py @@ -113,17 +113,16 @@ KEYWORD_DICT_END = KWD(b">>") def literal_name(x: Any) -> str: if isinstance(x, PSLiteral): + if settings.STRICT: + raise PSTypeErr...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
9
91
1,065
0
0.6
1
0.75
1
0.2075
80.8975
8,017
swe_smith::train::25922
swe_smith
train
25,922
pylint-dev__astroid.b114f6b5.func_basic__qox36bxv
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
__class_getitem__ access incorrectly allowed for typing objects #### Description When accessing `__class_getitem__` on certain typing objects that should not be subscriptable, the access is incorrectly allowed instead of raising an AttributeInferenceError. #### Steps/Code to Reproduce ```python import astroid from ...
diff --git a/astroid/brain/brain_typing.py b/astroid/brain/brain_typing.py index c44687b..05cd008 100644 --- a/astroid/brain/brain_typing.py +++ b/astroid/brain/brain_typing.py @@ -274,20 +274,17 @@ def _forbid_class_getitem_access(node: ClassDef) -> None: Raises an AttributeInferenceError in case of access to...
["tests/brain/test_brain.py::TypingBrain::test_typing_object_notsubscriptable_3"]
["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
11
1
1,025
0
0.6
1
0.75
1
0.2075
80.8975
8,018
swe_smith::train::49446
swe_smith
train
49,446
mozilla__bleach.73871d76.func_pm_ctrl_shuffle__stays1l7
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
nofollow callback raises UnboundLocalError when processing links #### Description The `nofollow` callback function in `bleach.callbacks` is raising an `UnboundLocalError` when trying to process links. The error occurs because the function references `rel_values` before it's defined. #### Steps/Code to Reproduce ```...
diff --git a/bleach/callbacks.py b/bleach/callbacks.py index c895203..d83c2d9 100644 --- a/bleach/callbacks.py +++ b/bleach/callbacks.py @@ -2,6 +2,8 @@ def nofollow(attrs, new=False): + if "nofollow" not in [rel_val.lower() for rel_val in rel_values]: + rel_values.append("nofollow") href_key = (Non...
["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...
["tests/test_callbacks.py::TestTargetBlankCallback::test_empty", "tests/test_callbacks.py::TestTargetBlankCallback::test_mailto", "tests/test_callbacks.py::TestTargetBlankCallback::test_add_target", "tests/test_callbacks.py::TestTargetBlankCallback::test_stomp_target", "tests/test_clean.py::test_clean_idempotent[text<e...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
9
59
1,064
0
0.6
1
0.75
1
0.207333
80.897
8,019
swe_smith::train::5177
swe_smith
train
5,177
agronholm__exceptiongroup.0b4f4937.func_pm_remove_assign__ia3tivl8
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
BaseExceptionGroup.subgroup() returns None when it should return a subgroup #### Description The `subgroup()` method on `BaseExceptionGroup` is returning `None` in cases where it should return a valid subgroup containing matching exceptions. #### Steps/Code to Reproduce ```python from exceptiongroup import Exceptio...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..d4c58da 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -140,7 +140,6 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): | tuple[type[_BaseExceptionT...
["tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predicate__match", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predicate__no_match", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predicate__passthrough", "tests/test_e...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
1
6
13
1,124
0
0.6
1
0.75
1
0.207333
80.897
8,020
swe_smith::train::27652
swe_smith
train
27,652
arrow-py__arrow.1d70d009.func_basic__yjn24u00
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Arrow span methods return incorrect results for quarters and weeks #### Description When using Arrow's span methods with "quarter" or "week" time frames, the results are incorrect. Quarter spans are returning week-based calculations instead of proper quarterly periods, and week operations are failing entirely. #### ...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..4b64aa8 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -1826,11 +1826,11 @@ class Arrow: if name in cls._ATTRS: return name, f"{name}s", 1 elif name[-1] == "s" and name[:-1] in cls._ATTRS: - return name[:-1], name...
["tests/test_arrow.py::TestArrowRange::test_quarter", "tests/test_arrow.py::TestArrowRange::test_week", "tests/test_arrow.py::TestArrowRange::test_range_over_quarter_months_ending_on_different_days", "tests/test_arrow.py::TestArrowSpanRange::test_quarter", "tests/test_arrow.py::TestArrowSpanRange::test_week", "tests/te...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
6
11
1,124
0
0.6
1
0.75
1
0.207333
80.897
8,021
swe_smith::train::10451
swe_smith
train
10,451
paramiko__paramiko.23f92003.func_basic__g1vdxdk9
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH connection fails with signature verification error #### Description SSH connections are failing during the key verification process. The transport layer is rejecting valid host keys and signatures, causing authentication to fail unexpectedly. #### Steps/Code to Reproduce ```python import paramiko # Create SSH ...
diff --git a/paramiko/transport.py b/paramiko/transport.py index f0fcb97..6b973c8 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -2005,16 +2005,13 @@ class Transport(threading.Thread, ClosingContextManager): self._expected_packet = tuple(ptypes) def _verify_key(self, host_key, sig): -...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::interactive_auth", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/auth.py::AuthHandler_::utf8", "tests/auth.py::AuthHandler_::non_utf8", "...
["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
13
119
983
0
0.6
1
0.75
1
0.207167
80.8965
8,022
swe_smith::train::819
swe_smith
train
819
oauthlib__oauthlib.1fd52536.func_pm_remove_cond__9cfhy48f
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth1 Client allows GET/HEAD requests with body parameters #### Description The OAuth1 Client no longer raises a ValueError when GET or HEAD requests include body parameters with form-urlencoded content type. This violates the HTTP 1.1 specification which states that GET and HEAD requests should not have semantic me...
diff --git a/oauthlib/oauth1/rfc5849/__init__.py b/oauthlib/oauth1/rfc5849/__init__.py index 85e0b90..d1d50bc 100644 --- a/oauthlib/oauth1/rfc5849/__init__.py +++ b/oauthlib/oauth1/rfc5849/__init__.py @@ -335,15 +335,6 @@ class Client: raise ValueError( 'Body signatures may only be used wi...
["tests/oauth1/rfc5849/test_client.py::SigningTest::test_sign_get_with_body"]
["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
11
1
1,023
0
0.6
1
0.75
1
0.207167
80.8965
8,023
swe_smith::train::12162
swe_smith
train
12,162
lepture__mistune.bf54ef67.combine_module__3ox6t6q0
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
Footnotes plugin broken after recent changes #### Description The footnotes plugin is not working correctly. When trying to parse markdown with footnotes, I'm getting a TypeError about string indices. #### Steps/Code to Reproduce ```python import mistune from mistune.plugins import plugin_footnotes markdown = mist...
diff --git a/src/mistune/plugins/footnotes.py b/src/mistune/plugins/footnotes.py index 96fe8df..83cd64c 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_plugins.py::TestPlugin1_spoiler::te...
["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
11
14
1,023
0
0.6
1
0.75
1
0.207167
80.8965
8,024
swe_smith::train::3228
swe_smith
train
3,228
Suor__funcy.207a7810.func_pm_remove_cond__ifcltav9
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
autocurry function returns None instead of curried function #### Description The `autocurry` function is not working correctly and returns `None` instead of a properly curried function. This affects all currying functionality in the library. #### Steps/Code to Reproduce ```python from funcy import autocurry # Simp...
diff --git a/funcy/funcs.py b/funcy/funcs.py index 0a235bb..7d5beaa 100644 --- a/funcy/funcs.py +++ b/funcy/funcs.py @@ -79,19 +79,9 @@ def autocurry(func, n=EMPTY, _spec=None, _args=(), _kwargs={}): if not spec.varkw and len(args) + len(kwargs) >= spec.max_n: return func(*args, **kwargs) - ...
["tests/test_funcs.py::test_autocurry", "tests/test_funcs.py::test_autocurry_named", "tests/test_funcs.py::test_autocurry_kwargs", "tests/test_funcs.py::test_autocurry_kwonly", "tests/test_funcs.py::test_autocurry_posonly", "tests/test_funcs.py::test_autocurry_builtin", "tests/test_funcs.py::test_autocurry_hard", "test...
["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
10
8
1,043
0
0.6
1
0.75
1
0.207167
80.8965
8,025
swe_smith::train::46566
swe_smith
train
46,566
python-trio__trio.cfbbe2c1.combine_file__4m2tiruu
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
ParkingLot.statistics() method missing after recent changes #### Description The `ParkingLot.statistics()` method appears to have been removed, causing `AttributeError` when trying to access debugging information about parking lots. #### Steps/Code to Reproduce ```python import trio async def main(): lot = tri...
diff --git a/src/trio/_core/_parking_lot.py b/src/trio/_core/_parking_lot.py index af6ff61..2b24c0c 100644 --- a/src/trio/_core/_parking_lot.py +++ b/src/trio/_core/_parking_lot.py @@ -109,15 +109,14 @@ def add_parking_lot_breaker(task: Task, lot: ParkingLot) -> None: def remove_parking_lot_breaker(task: Task, lot: ...
["src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_basic", "src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_repark", "src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_breaker_registration", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_basic", "src/trio/_core/_tes...
["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
20
8
843
0
0.6
1
0.75
1
0.207167
80.8965
8,026
swe_smith::train::1855
swe_smith
train
1,855
agronholm__typeguard.b6a7e438.func_pm_ctrl_shuffle__2cei2zn1
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
UnboundLocalError in annotation processing when using typeguard #### Description When using typeguard with type annotations, I'm getting `UnboundLocalError: cannot access local variable 'new_annotation' where it is not defined` errors. This seems to happen during the annotation transformation process. #### Steps/Cod...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..e36da93 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -574,12 +574,8 @@ class TypeguardTransformer(NodeTransformer): def _convert_annotation(self, annotation: expr) -> expr: ... def ...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_pytest_plugin.py::test_config_options", "tests/test_pytest_plugin.py::test_commandline_options", "tests/test_suppression.py::test_contextmanager_typechecked", "tests/test_suppression.py::test_decorator_...
["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
13
125
983
0
0.6
1
0.75
1
0.207167
80.8965
8,027
r2e_gym::train::6004
r2e_gym
train
6,004
tornado__88eefe943461a354165db5398602d1185c6656b9
tornado
tornadoweb/tornado
python
88eefe943461a354165db5398602d1185c6656b9
**[ISSUE]** **Title:** Setting `log_rotate_mode` Option Raises AttributeError: Unrecognized Option **Description:** Attempting to configure the logging system with the `log_rotate_mode` option results in an `AttributeError`, indicating that the option is unrecognized. This prevents users from enabling timed rotating ...
diff --git a/tornado/log.py b/tornado/log.py --- a/tornado/log.py +++ b/tornado/log.py @@ -190,10 +190,22 @@ logger = logging.getLogger() logger.setLevel(getattr(logging, options.logging.upper())) if options.log_file_prefix: - channel = logging.handlers.RotatingFileHandler( - filena...
diff --git a/tornado/test/log_test.py b/tornado/test/log_test.py --- a/tornado/test/log_test.py +++ b/tornado/test/log_test.py @@ -24,6 +24,7 @@ import sys import tempfile import warnings +import time from tornado.escape import utf8 from tornado.log import LogFormatter, define_logging_options, enable_pretty_logg...
null
null
namanjain12/tornado_final:88eefe943461a354165db5398602d1185c6656b9
true
null
1
29
null
1,375
0
0.75
1
0.6375
1
0.325833
80.89625
8,028
r2e_gym::train::140
r2e_gym
train
140
orange3__2afb3baf0a091d79b13406a9960a02b34ab3018e
orange3
biolab/orange3
python
2afb3baf0a091d79b13406a9960a02b34ab3018e
**Title:** Confusion Matrix Widget Fails to Handle "Sum of Probabilities" Selection **Description:** The Confusion Matrix widget does not currently support displaying the "Sum of probabilities." When attempting to select this option, the widget fails to recognize it, causing related tests to fail. This limitation prev...
diff --git a/Orange/widgets/evaluate/owconfusionmatrix.py b/Orange/widgets/evaluate/owconfusionmatrix.py --- a/Orange/widgets/evaluate/owconfusionmatrix.py +++ b/Orange/widgets/evaluate/owconfusionmatrix.py @@ -99,7 +99,8 @@ quantities = ["Number of instances", "Proportion of predicted", - ...
diff --git a/Orange/widgets/evaluate/tests/test_owconfusionmatrix.py b/Orange/widgets/evaluate/tests/test_owconfusionmatrix.py --- a/Orange/widgets/evaluate/tests/test_owconfusionmatrix.py +++ b/Orange/widgets/evaluate/tests/test_owconfusionmatrix.py @@ -9,7 +9,7 @@ ShuffleSplit, Results from Orange.widgets.evalu...
null
null
namanjain12/orange3_final:2afb3baf0a091d79b13406a9960a02b34ab3018e
true
null
1
23
null
1,495
0
0.75
1
0.6375
1
0.325833
80.89625
8,029
swe_smith::train::43912
swe_smith
train
43,912
pydata__patsy.a5d16484.func_basic__5dmi8lax
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Diff contrast matrix has incorrect dimensions When using the `Diff` contrast coding, the generated matrix has incorrect dimensions that cause a shape mismatch error. #### Steps/Code to Reproduce ```python import numpy as np from patsy.contrasts import Diff # Create a Diff contrast object t1 = Diff() # Try to gener...
diff --git a/patsy/contrasts.py b/patsy/contrasts.py index 0ac9ac7..2ce9db7 100644 --- a/patsy/contrasts.py +++ b/patsy/contrasts.py @@ -563,21 +563,18 @@ class Diff(object): def _diff_contrast(self, levels): nlevels = len(levels) - contr = np.zeros((nlevels, nlevels - 1)) - int_range = np...
["patsy/contrasts.py::test_diff"]
["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
21
1
822
0
0.6
1
0.75
1
0.207
80.896
8,030
swe_smith::train::27942
swe_smith
train
27,942
jsvine__pdfplumber.02ff4313.func_pm_op_swap__vopi8hnv
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
WordExtractor crashes with IndexError when current_word is empty #### Description The WordExtractor in `pdfplumber/utils/text.py` throws an `IndexError: list index out of range` when trying to access `current_word[-1]` in cases where `current_word` is an empty list. #### Steps/Code to Reproduce ```python import pdf...
diff --git a/pdfplumber/utils/text.py b/pdfplumber/utils/text.py index 8edafa1..52afc50 100644 --- a/pdfplumber/utils/text.py +++ b/pdfplumber/utils/text.py @@ -615,20 +615,20 @@ class WordExtractor: for char in ordered_chars: text = char["text"] - if not self.keep_blank_chars and tex...
["tests/test_basics.py::Test::test_outside_bbox", "tests/test_basics.py::Test::test_unicode_normalization", "tests/test_ca_warn_report.py::Test::test_parse", "tests/test_convert.py::Test::test_cli_text", "tests/test_dedupe_chars.py::Test::test_extra_attrs", "tests/test_dedupe_chars.py::Test::test_extract_table", "tests...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
9
57
1,062
0
0.6
1
0.75
1
0.207
80.896
8,031
swe_smith::train::3878
swe_smith
train
3,878
pygments__pygments.27649ebb.func_basic__eh0j13en
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
RobotFramework lexer tokenization returns incorrect tuple structure #### Description The RobotFramework lexer is returning tokens in an incorrect format, causing tokenization to fail. When tokenizing Robot Framework code, the lexer returns tuples with swapped token type and value positions, and wraps the result in an...
diff --git a/pygments/lexers/robotframework.py b/pygments/lexers/robotframework.py index 5449441..9c50f31 100644 --- a/pygments/lexers/robotframework.py +++ b/pygments/lexers/robotframework.py @@ -185,10 +185,10 @@ class Tokenizer: def tokenize(self, value): values_and_tokens = self._tokenize(value, sel...
["tests/test_basic_api.py::test_lexer_options[RobotFrameworkLexer]", "tests/test_basic_api.py::test_random_input[RobotFrameworkLexer]", "tests/snippets/robotframework/test_basic.txt::", "tests/examplefiles/robotframework/robotframework_test.robot::"]
["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
8
4
1,082
0
0.6
1
0.75
1
0.207
80.896
8,032
swe_smith::train::39078
swe_smith
train
39,078
pallets__jinja.ada0a9a6.func_basic__j3ez7uut
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Template compilation fails with TypeError when using str() on TemplateData nodes #### Description When compiling templates to raw Python source code, the compiler crashes with a TypeError when processing TemplateData nodes. This affects template compilation functionality. #### Steps/Code to Reproduce ```python from...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..4228db1 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1654,11 +1654,9 @@ class CodeGenerator(NodeVisitor): def visit_TemplateData(self, node: nodes.TemplateData, frame: Frame) -> None: try: - se...
["tests/test_ext.py::TestAutoEscape::test_volatile_scoping"]
["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
6
1
1,122
0
0.6
1
0.75
1
0.207
80.896
8,033
swe_smith::train::43831
swe_smith
train
43,831
pydata__patsy.a5d16484.combine_file__vpl9j3oj
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
_Subterm equality comparison broken Description When comparing _Subterm objects for equality, the comparison is broken and always returns True when comparing a _Subterm with itself. This causes issues with redundancy detection and term processing. Steps/Code to Reproduce ```python from patsy.redundancy import _expa...
diff --git a/patsy/redundancy.py b/patsy/redundancy.py index c81d439..ab1bad8 100644 --- a/patsy/redundancy.py +++ b/patsy/redundancy.py @@ -103,7 +103,7 @@ class _Subterm(object): return hash((_Subterm, self.efactors)) def __eq__(self, other): - return isinstance(other, _Subterm) and self.efacto...
["patsy/redundancy.py::test__Subterm", "patsy/redundancy.py::test__simplify_subterms", "patsy/redundancy.py::test_pick_contrasts_for_term", "patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_contrast", "patsy/test_highlev...
["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
6
14
1,122
0
0.6
1
0.75
1
0.207
80.896
8,034
swe_smith::train::44843
swe_smith
train
44,843
mahmoud__glom.fb3c4e76.func_basic__v8dx2cuj
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
M operator returns wrong value when target is falsy #### Description The `M` operator in glom's matching module is returning the wrong value when the target is falsy. When a falsy target is passed to `M`, it should return the target itself, but instead it's returning the spec. #### Steps/Code to Reproduce ```python...
diff --git a/glom/matching.py b/glom/matching.py index 798ac40..cf5d5b1 100644 --- a/glom/matching.py +++ b/glom/matching.py @@ -559,9 +559,9 @@ class _MType: return "M" def glomit(self, target, spec): - if target: - return target - raise MatchError("{0!r} not truthy", target) +...
["glom/test/test_match.py::test_basic", "glom/test/test_match.py::test_shortcircuit"]
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
6
2
1,122
0
0.6
1
0.75
1
0.207
80.896
8,035
swe_smith::train::21926
swe_smith
train
21,926
life4__textdistance.c3aca916.func_basic__rcijjsmd
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
MongeElkan maximum method returns incorrect values #### Description The MongeElkan algorithm's `maximum` method is returning unexpected values, causing issues with normalization and distance calculations. When calling methods like `normalized_distance`, `normalized_similarity`, or checking basic properties, the algor...
diff --git a/textdistance/algorithms/token_based.py b/textdistance/algorithms/token_based.py index d499b84..bf24a8b 100644 --- a/textdistance/algorithms/token_based.py +++ b/textdistance/algorithms/token_based.py @@ -240,10 +240,10 @@ class MongeElkan(_BaseSimilarity): self.external = external def maxim...
["tests/test_common.py::test_normalization_range[alg16]", "tests/test_common.py::test_normalization_by_one[alg16]", "tests/test_common.py::test_normalization_same[alg16]", "tests/test_common.py::test_normalization_monotonic[alg16]", "tests/test_common.py::test_empty[alg16]", "tests/test_common.py::test_unequal_distance...
["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
6
6
1,122
0
0.6
1
0.75
1
0.207
80.896
8,036
swe_smith::train::45385
swe_smith
train
45,385
dask__dask.5f61e423.lm_rewrite__3vh6099k
swesmith/dask__dask.5f61e423
dask/dask
python
null
KeyError: "_partitions" not found in axis Description It seems there's an issue with the recent changes in the `_concat_wrapper` function. The function is supposed to concatenate dataframes and remove the temporary "_partitions" column. However, it appears that the "_partitions" column is not being handled correctly,...
diff --git a/dask/dataframe/multi.py b/dask/dataframe/multi.py index 7903f84..8cc5e47 100644 --- a/dask/dataframe/multi.py +++ b/dask/dataframe/multi.py @@ -353,11 +353,8 @@ def _split_partition(df, on, nsplits): def _concat_wrapper(dfs): """Concat and remove temporary "_partitions" column""" - df = _concat(...
["dask/dataframe/tests/test_multi.py::test_half_indexed_dataframe_avoids_shuffle", "dask/dataframe/tests/test_multi.py::test_merge_tasks_large_to_small[lg-28-inner]", "dask/dataframe/tests/test_multi.py::test_merge_tasks_large_to_small[lg-28-left]", "dask/dataframe/tests/test_multi.py::test_merge_tasks_large_to_small[l...
["dask/dataframe/tests/test_multi.py::test_merge_indexed_dataframe_to_indexed_dataframe", "dask/dataframe/tests/test_multi.py::test_sequential_joins", "dask/dataframe/tests/test_multi.py::test_merge_asof_indexed", "dask/dataframe/tests/test_multi.py::test_merge_asof_on_basic", "dask/dataframe/tests/test_multi.py::test_...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
7
9
1,101
0
0.6
1
0.75
1
0.206833
80.8955
8,037
swe_smith::train::726
swe_smith
train
726
oauthlib__oauthlib.1fd52536.func_pm_ctrl_invert_if__duneo9ba
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Bearer token placement in request body raises ValueError instead of adding token #### Description When using `token_placement=BODY` or `default_token_placement=BODY`, the OAuth2 client raises a `ValueError("Invalid token placement.")` instead of properly adding the bearer token to the request body. #### Steps/Code t...
diff --git a/oauthlib/oauth2/rfc6749/clients/base.py b/oauthlib/oauth2/rfc6749/clients/base.py index a8de78b..b7c9952 100644 --- a/oauthlib/oauth2/rfc6749/clients/base.py +++ b/oauthlib/oauth2/rfc6749/clients/base.py @@ -458,12 +458,10 @@ class Client: uri = tokens.prepare_bearer_uri(self.access_token, uri...
["tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_add_bearer_token"]
["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
6
1
1,121
0
0.6
1
0.75
1
0.206833
80.8955
8,038
swe_smith::train::42142
swe_smith
train
42,142
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__iqf3ci28
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
next_media_partname returns incorrect partname with undefined variable #### Description The `next_media_partname` method in the Package class is returning an incorrect partname due to an undefined variable `idx`. When calling this method, it references a variable that doesn't exist in the current scope. #### Steps/C...
diff --git a/src/pptx/package.py b/src/pptx/package.py index 79703cd..a987006 100644 --- a/src/pptx/package.py +++ b/src/pptx/package.py @@ -73,12 +73,7 @@ class Package(OpcPackage): return PackURI("/ppt/media/image%d.%s" % (idx, ext)) def next_media_partname(self, ext): - """Return |PackURI| ins...
["tests/test_package.py::DescribePackage::it_knows_the_next_available_media_partname[nmp_fixture0]", "tests/test_package.py::DescribePackage::it_knows_the_next_available_media_partname[nmp_fixture1]", "tests/test_package.py::DescribePackage::it_knows_the_next_available_media_partname[nmp_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
941
0
0.6
1
0.75
1
0.206833
80.8955
8,039
swe_smith::train::22024
swe_smith
train
22,024
life4__textdistance.c3aca916.func_pm_remove_cond__zs9jdvez
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
JaroWinkler algorithm crashes with ZeroDivisionError on certain inputs #### Description The JaroWinkler similarity algorithm throws a ZeroDivisionError when computing similarity for certain string pairs, particularly when there are no common characters between the strings. #### Steps/Code to Reproduce ```python imp...
diff --git a/textdistance/algorithms/edit_based.py b/textdistance/algorithms/edit_based.py index 0a6e02f..8f57e16 100644 --- a/textdistance/algorithms/edit_based.py +++ b/textdistance/algorithms/edit_based.py @@ -338,8 +338,6 @@ class JaroWinkler(_BaseSimilarity): min_len = min(s1_len, s2_len) search_...
["tests/test_edit/test_jaro.py::test_distance[hello-haloa-0.7333333333333334]", "tests/test_edit/test_jaro.py::test_distance[fly-ant-0.0]", "tests/test_edit/test_jaro.py::test_distance[frog-fog-0.9166666666666666]", "tests/test_edit/test_jaro.py::test_distance[ATCG-TAGC-0.8333333333333334]", "tests/test_edit/test_jaro....
["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
13
21
981
0
0.6
1
0.75
1
0.206833
80.8955
8,040
swe_smith::train::23753
swe_smith
train
23,753
rustedpy__result.0b855e1e.combine_file__vkyo92k2
swesmith/rustedpy__result.0b855e1e
rustedpy/result
python
null
Result equality comparison broken after recent changes #### Description The equality comparison for `Ok` and `Err` types is not working correctly. When comparing two different `Ok` instances with different values, they are incorrectly considered equal. #### Steps/Code to Reproduce ```python from result import Ok, E...
diff --git a/src/result/result.py b/src/result/result.py index 8551239..cae0a68 100644 --- a/src/result/result.py +++ b/src/result/result.py @@ -55,7 +55,7 @@ class Ok(Generic[T]): return "Ok({})".format(repr(self._value)) def __eq__(self, other: Any) -> bool: - return isinstance(other, Ok) and s...
["tests/test_result.py::test_eq", "tests/test_result.py::test_unwrap_err", "tests/test_result.py::test_as_result", "tests/test_result.py::test_as_async_result", "tests/type_checking/test_result.yml::failure_lash", "tests/type_checking/test_result.yml::covariance", "tests/type_checking/test_result.yml::map_ok_err", "tes...
["tests/test_result.py::test_ok_factories", "tests/test_result.py::test_err_factories", "tests/test_result.py::test_hash", "tests/test_result.py::test_repr", "tests/test_result.py::test_ok_value", "tests/test_result.py::test_err_value", "tests/test_result.py::test_ok", "tests/test_result.py::test_err", "tests/test_resu...
jyangballin/swesmith.x86_64.rustedpy_1776_result.0b855e1e
true
null
1
8
8
1,081
0
0.6
1
0.75
1
0.206833
80.8955
8,041
swe_smith::train::4368
swe_smith
train
4,368
pygments__pygments.27649ebb.func_pm_ctrl_shuffle__vxk2l28m
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Lexer selection broken when code analysis is used #### Description When using `find_lexer_class_for_filename` with code content, the lexer selection logic is broken due to an undefined variable error. The function fails to properly evaluate lexers that have `analyse_text` methods. #### Steps/Code to Reproduce ```py...
diff --git a/pygments/lexers/__init__.py b/pygments/lexers/__init__.py index a2eaf71..1ec2bbb 100644 --- a/pygments/lexers/__init__.py +++ b/pygments/lexers/__init__.py @@ -192,17 +192,16 @@ def find_lexer_class_for_filename(_fn, code=None): code = guess_decode(code) def get_rating(info): + retur...
["tests/test_cmdline.py::test_outfile", "tests/test_cmdline.py::test_O_opt", "tests/test_cmdline.py::test_P_opt", "tests/test_cmdline.py::test_N_opt", "tests/test_cmdline.py::test_F_opt", "tests/test_cmdline.py::test_errors", "tests/test_basic_api.py::test_get_lexers"]
["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
7
7
1,101
0
0.6
1
0.75
1
0.206833
80.8955
8,042
swe_smith::train::24988
swe_smith
train
24,988
pylint-dev__astroid.b114f6b5.combine_file__5yij7bxj
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
AstroidManager transform property causes AttributeError when accessed #### Description The `unregister_transform` property in AstroidManager is causing an AttributeError when accessed. The property appears to be setting `self._transform` to `None` before trying to access its `unregister_transform` method. #### Steps...
diff --git a/astroid/manager.py b/astroid/manager.py index 8742058..5ecb31d 100644 --- a/astroid/manager.py +++ b/astroid/manager.py @@ -109,6 +109,7 @@ class AstroidManager: @property def unregister_transform(self): + self._transform = None return self._transform.unregister_transform ...
["tests/brain/numpy/test_random_mtrand.py::NumpyBrainRandomMtrandTest::test_numpy_random_mtrand_functions", "tests/brain/numpy/test_random_mtrand.py::NumpyBrainRandomMtrandTest::test_numpy_random_mtrand_functions_signature", "tests/brain/test_six.py::SixBrainTest::test_six_with_metaclass_with_additional_transform", "te...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
7
81
1,101
0
0.6
1
0.75
1
0.206833
80.8955
8,043
swe_smith::train::30123
swe_smith
train
30,123
getnikola__nikola.0f4c230e.func_pm_remove_wrapper__wczrznch
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
NameError when processing HTML content with missing lxml parsing #### Description When processing posts with HTML content, Nikola crashes with a `NameError: name 'document' is not defined` error. This happens because the code tries to use a `document` variable that was never created due to missing HTML parsing logic....
diff --git a/nikola/post.py b/nikola/post.py index d7c1b9e..97b5b23 100644 --- a/nikola/post.py +++ b/nikola/post.py @@ -897,14 +897,6 @@ class Post(object): if self.compiler.extension() == '.php': return data - try: - document = lxml.html.fragment_fromstring(data, "body") - ...
["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
9
97
1,061
0
0.6
1
0.75
1
0.206833
80.8955
8,044
swe_smith::train::29150
swe_smith
train
29,150
tox-dev__pipdeptree.c31b6418.func_pm_class_rm_funcs__0afcc1vs
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
# Missing as_requirement() method in DistPackage class breaks reverse dependency tree ## Description I'm trying to use pipdeptree to generate a reverse dependency tree, but it's failing with an AttributeError. This happens when trying to use the `--reverse` flag or when trying to render a mermaid diagram. ## Steps t...
diff --git a/src/pipdeptree/_models/package.py b/src/pipdeptree/_models/package.py index 7e49250..bc1fea1 100644 --- a/src/pipdeptree/_models/package.py +++ b/src/pipdeptree/_models/package.py @@ -138,11 +138,6 @@ class DistPackage(Package): return f"{self.project_name}=={self.version} [requires: {parent_s...
["tests/_models/test_dag.py::test_package_dag_reverse", "tests/render/test_mermaid.py::test_render_mermaid", "tests/render/test_text.py::test_render_text[True-True-True-expected_output1]", "tests/render/test_text.py::test_render_text[False-True-True-expected_output3]", "tests/render/test_text.py::test_render_text[True-...
["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
6
8
1,121
0
0.6
1
0.75
1
0.206833
80.8955
8,045
swe_smith::train::17959
swe_smith
train
17,959
pyasn1__pyasn1.0f07d724.func_pm_remove_assign__kfnva30l
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
TimeMixIn.asDateTime method fails with UnboundLocalError #### Description The `asDateTime` method in `TimeMixIn` class raises `UnboundLocalError: local variable 'text' referenced before assignment` when trying to convert time strings to datetime objects. #### Steps/Code to Reproduce ```python from pyasn1.type impor...
diff --git a/pyasn1/type/useful.py b/pyasn1/type/useful.py index a8ae874..88299e5 100644 --- a/pyasn1/type/useful.py +++ b/pyasn1/type/useful.py @@ -65,9 +65,7 @@ class TimeMixIn(object): : new instance of :py:class:`datetime.datetime` object """ - text = str(self) if text...
["tests/type/test_useful.py::GeneralizedTimeTestCase::testCopy", "tests/type/test_useful.py::GeneralizedTimeTestCase::testToDateTime0", "tests/type/test_useful.py::GeneralizedTimeTestCase::testToDateTime1", "tests/type/test_useful.py::GeneralizedTimeTestCase::testToDateTime2", "tests/type/test_useful.py::GeneralizedTim...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
9
15
1,060
0
0.6
1
0.75
1
0.206667
80.895
8,046
swe_smith::train::3182
swe_smith
train
3,182
Suor__funcy.207a7810.func_basic__vi9w0juh
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
partition and chunks functions broken with swapped arguments #### Description The `partition` and `chunks` functions are not working correctly when called with the standard argument order. They seem to be treating the step size as the sequence and vice versa. #### Steps/Code to Reproduce ```python from funcy import...
diff --git a/funcy/seqs.py b/funcy/seqs.py index 9a96252..e43d121 100644 --- a/funcy/seqs.py +++ b/funcy/seqs.py @@ -371,11 +371,14 @@ def _cut_iter(drop_tail, n, step, seq): def _cut(drop_tail, n, step, seq=EMPTY): if seq is EMPTY: - step, seq = n, step + step, seq = step, n # Swap the assignmen...
["tests/test_seqs.py::test_partition", "tests/test_seqs.py::test_chunks"]
["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
2
1,060
0
0.6
1
0.75
1
0.206667
80.895
8,047
swe_smith::train::42183
swe_smith
train
42,183
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__p1y6vnzg
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
#### Description The `line_spacing` property on paragraph objects returns incorrect values when accessing line spacing information. The property appears to be executing code in the wrong order, causing it to reference undefined variables and return unexpected results. #### Steps/Code to Reproduce ```python from pptx...
diff --git a/src/pptx/oxml/text.py b/src/pptx/oxml/text.py index 0f9ecc1..6f7ea62 100644 --- a/src/pptx/oxml/text.py +++ b/src/pptx/oxml/text.py @@ -511,19 +511,18 @@ class CT_TextParagraphProperties(BaseOxmlElement): @property def line_spacing(self) -> float | Length | None: + if lnSpc.spcPts is not...
["tests/text/test_text.py::Describe_Paragraph::it_knows_its_line_spacing[spacing_get_fixture1]", "tests/text/test_text.py::Describe_Paragraph::it_knows_its_line_spacing[spacing_get_fixture2]", "tests/text/test_text.py::Describe_Paragraph::it_knows_its_line_spacing[spacing_get_fixture3]", "tests/text/test_text.py::Descr...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
7
4
1,100
0
0.6
1
0.75
1
0.206667
80.895
8,048
swe_smith::train::42650
swe_smith
train
42,650
python-jsonschema__jsonschema.93e0caa5.func_basic__tykwljyf
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
RefResolver.pop_scope() silently ignores empty stack instead of raising error #### Description When calling `pop_scope()` on an empty `_RefResolver` stack, the method now silently returns instead of raising a `_RefResolutionError`. This breaks the expected behavior where multiple calls to `pop_scope()` without corres...
diff --git a/jsonschema/validators.py b/jsonschema/validators.py index b8ca3bd..6429a03 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -1002,13 +1002,9 @@ class _RefResolver: called. """ try: - self._scopes_stack.pop() + self._scopes_stack.pop(0)...
["jsonschema/tests/test_validators.py::TestRefResolver::test_helpful_error_message_on_failed_pop_scope"]
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
8
1
1,080
0
0.6
1
0.75
1
0.206667
80.895
8,049
swe_smith::train::24288
swe_smith
train
24,288
sunpy__sunpy.f8edfd5c.func_pm_remove_cond__02w5c8ak
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeSeries objects missing meta attribute after initialization #### Description TimeSeries objects are not properly initializing the `meta` attribute, causing AttributeError when trying to access it. #### Steps/Code to Reproduce ```python import sunpy.timeseries as ts from sunpy.data.test import get_dummy_map_from_...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 80e5d20..946ef88 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -107,19 +107,6 @@ class GenericTimeSeries: def __init__(self, data, meta=None, units=None, **kwargs): self...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_meta_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_meta_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_meta_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_meta_type[norh_test_ts]", ...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
14
27
960
0
0.6
1
0.75
1
0.206667
80.895
8,050
swe_smith::train::23968
swe_smith
train
23,968
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__9ym05fjs
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
MapSequence.mask property raises UnboundLocalError when maps have masks #### Description The `mask` property of `MapSequence` raises an `UnboundLocalError` when trying to access it for sequences containing maps with masks. #### Steps/Code to Reproduce ```python import numpy as np from sunpy.map import Map, MapSeque...
diff --git a/sunpy/map/mapsequence.py b/sunpy/map/mapsequence.py index c875ad6..0a68b09 100644 --- a/sunpy/map/mapsequence.py +++ b/sunpy/map/mapsequence.py @@ -507,6 +507,11 @@ class MapSequence: @property def mask(self): + if not np.any([m.mask is not None for m in self.maps]): + return ...
["sunpy/map/tests/test_mapsequence.py::test_as_array_all_masks", "sunpy/map/tests/test_mapsequence.py::test_as_array_some_masks"]
["sunpy/map/tests/test_mapsequence.py::test_deprecations", "sunpy/map/tests/test_mapsequence.py::test_as_array_different_shapes", "sunpy/map/tests/test_mapsequence.py::test_as_array_no_masks", "sunpy/map/tests/test_mapsequence.py::test_all_meta", "sunpy/map/tests/test_mapsequence.py::test_repr", "sunpy/map/tests/test_m...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
11
2
1,020
0
0.6
1
0.75
1
0.206667
80.895
8,051
swe_smith::train::46832
swe_smith
train
46,832
python-trio__trio.cfbbe2c1.func_basic__81b7p6w1
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Signal receiver only works in non-main thread instead of main thread #### Description The `open_signal_receiver` function is incorrectly rejecting usage in the main thread and only allowing it in non-main threads, which is the opposite of the intended behavior. Signal handling in Python requires running in the main t...
diff --git a/src/trio/_signals.py b/src/trio/_signals.py index 729c48a..03f5c9f 100644 --- a/src/trio/_signals.py +++ b/src/trio/_signals.py @@ -167,7 +167,7 @@ def open_signal_receiver( if not signals: raise TypeError("No signals were provided") - if not is_main_thread(): + if is_main_thread(): ...
["src/trio/_tests/test_signals.py::test_open_signal_receiver", "src/trio/_tests/test_signals.py::test_open_signal_receiver_restore_handler_after_one_bad_signal", "src/trio/_tests/test_signals.py::test_open_signal_receiver_restore_handler_after_duplicate_signal", "src/trio/_tests/test_signals.py::test_catch_signals_wron...
["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
6
7
1,119
0
0.6
1
0.75
1
0.2065
80.8945
8,052
swe_smith::train::18715
swe_smith
train
18,715
seperman__deepdiff.ed252022.func_basic__1icyj64i
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Delta application fails when dictionary_item_added is None #### Description When applying a Delta object, the code crashes with an AttributeError if the `dictionary_item_added` field in the diff is `None`. This happens because the code tries to call `sorted()` on `None` instead of handling the case where no dictionar...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..78ce01b 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -385,9 +385,9 @@ class Delta: self._do_item_added(added_dict, insert=False) def _do_dictionary_item_added(self): - dictionary_item_added = self.diff.get('diction...
["tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t2_json.csv-t1.json-args3-0]", "tests/test_command.py::TestCommands::test_deep...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
6
102
1,119
0
0.6
1
0.75
1
0.2065
80.8945
8,053
swe_smith::train::32556
swe_smith
train
32,556
pydantic__pydantic.acb0f10f.func_pm_ctrl_shuffle__zznwgeos
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
`__deepcopy__` method broken due to variable reference before assignment #### Description The `__deepcopy__` method in BaseModel is broken and raises a `UnboundLocalError` when trying to create a deep copy of a model instance. #### Steps/Code to Reproduce ```python from pydantic import BaseModel import copy class ...
diff --git a/pydantic/main.py b/pydantic/main.py index 03cb511..7aca017 100644 --- a/pydantic/main.py +++ b/pydantic/main.py @@ -927,14 +927,13 @@ class BaseModel(metaclass=_model_construction.ModelMetaclass): return m def __deepcopy__(self, memo: dict[int, Any] | None = None) -> Self: - """Retur...
["tests/test_construction.py::test_deep_copy[copy]", "tests/test_construction.py::test_deep_copy[model_copy]", "tests/test_construction.py::test_copy_deep_extra[model_copy]", "tests/test_docs.py::test_docstrings_examples[pydantic/main.py:1169-1173]", "tests/test_docs.py::test_docs_examples[docs/concepts/serialization.m...
["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
11
7
1,019
0
0.6
1
0.75
1
0.2065
80.8945
8,054
swe_smith::train::20718
swe_smith
train
20,718
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__unklzz2u
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
cast_as_datetime function fails with TypeError when passed datetime objects #### Description The `cast_as_datetime` function in the optimizer's simplify module throws a `TypeError` when trying to process `datetime.datetime` or `datetime.date` objects. The function attempts to call `fromisoformat()` on these objects b...
diff --git a/sqlglot/optimizer/simplify.py b/sqlglot/optimizer/simplify.py index 3f0f732..96f7d2b 100644 --- a/sqlglot/optimizer/simplify.py +++ b/sqlglot/optimizer/simplify.py @@ -1178,15 +1178,14 @@ def cast_as_date(value: t.Any) -> t.Optional[datetime.date]: def cast_as_datetime(value: t.Any) -> t.Optional[date...
["tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_simplify", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch"]
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
9
4
1,059
0
0.6
1
0.75
1
0.2065
80.8945
8,055
swe_smith::train::48288
swe_smith
train
48,288
sqlfluff__sqlfluff.50a1c4b6.func_pm_op_change__6n0zdql6
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
BaseFileSegment.from_raw_segments fails with TypeError when using subtraction operator #### Description When calling `BaseFileSegment.from_raw_segments()`, the method fails with a TypeError due to incorrect use of the subtraction operator (`-`) instead of addition (`+`) for list concatenation operations. #### Steps/...
diff --git a/src/sqlfluff/core/parser/segments/file.py b/src/sqlfluff/core/parser/segments/file.py index b8fce88..f4ca492 100644 --- a/src/sqlfluff/core/parser/segments/file.py +++ b/src/sqlfluff/core/parser/segments/file.py @@ -113,9 +113,9 @@ class BaseFileSegment(BaseSegment): ) ) ...
["test/core/rules/functional/segments_test.py::test_segments_recursive_crawl"]
["test/core/parser/segments/segments_base_test.py::test__parser__base_segments_type", "test/core/parser/segments/segments_base_test.py::test__parser__base_segments_class_types", "test/core/parser/segments/segments_base_test.py::test__parser__base_segments_descendant_type_set", "test/core/parser/segments/segments_base_t...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
6
1
1,119
0
0.6
1
0.75
1
0.2065
80.8945
8,056
swe_smith::train::20742
swe_smith
train
20,742
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__xjjaistr
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Subquery unnesting fails with AttributeError on certain expressions #### Description When processing certain SQL expressions during subquery unnesting optimization, the optimizer crashes with an AttributeError. This appears to happen when the `_other_operand` function encounters specific expression types that don't h...
diff --git a/sqlglot/optimizer/unnest_subqueries.py b/sqlglot/optimizer/unnest_subqueries.py index dcb2f59..471c876 100644 --- a/sqlglot/optimizer/unnest_subqueries.py +++ b/sqlglot/optimizer/unnest_subqueries.py @@ -289,6 +289,8 @@ def _other_operand(expression): if isinstance(expression, exp.In): return...
["tests/test_optimizer.py::TestOptimizer::test_unnest_subqueries"]
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
6
1
1,119
0
0.6
1
0.75
1
0.2065
80.8945
8,057
swe_smith::train::1915
swe_smith
train
1,915
agronholm__typeguard.b6a7e438.func_pm_remove_cond__netpr44z
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Mapping type checking broken after recent changes #### Description Type checking for mapping types (Dict, Mapping, MutableMapping) appears to be completely broken. The checker no longer validates that values are actually mappings or that their keys/values match the expected types. #### Steps/Code to Reproduce ```py...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..831e96b 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -211,31 +211,6 @@ def check_mapping( if origin_type is Dict or origin_type is dict: if not isinstance(value, dict): raise Typ...
["tests/test_checkers.py::TestMapping::test_bad_type", "tests/test_checkers.py::TestMapping::test_bad_key_type", "tests/test_checkers.py::TestMapping::test_bad_value_type", "tests/test_checkers.py::TestMapping::test_bad_key_type_full_check", "tests/test_checkers.py::TestMapping::test_bad_value_type_full_check", "tests/...
["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
25
15
739
0
0.6
1
0.75
1
0.2065
80.8945
8,058
swe_smith::train::28762
swe_smith
train
28,762
encode__starlette.db5063c2.func_pm_class_rm_funcs__ktkm3848
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
ImmutableMultiDict missing __len__ and __repr__ methods #### Description After recent changes, `ImmutableMultiDict` no longer supports `len()` function calls or proper string representation. This breaks basic functionality when working with query parameters and form data. #### Steps/Code to Reproduce ```python from...
diff --git a/starlette/datastructures.py b/starlette/datastructures.py index 90a7296..ca8dc82 100644 --- a/starlette/datastructures.py +++ b/starlette/datastructures.py @@ -300,20 +300,11 @@ class ImmutableMultiDict(typing.Mapping[_KeyType, _CovariantValueType]): def __iter__(self) -> typing.Iterator[_KeyType]: ...
["tests/test_datastructures.py::test_url_query_params", "tests/test_datastructures.py::test_url_blank_params", "tests/test_datastructures.py::test_queryparams", "tests/test_datastructures.py::test_formdata", "tests/test_datastructures.py::test_multidict", "tests/test_formparsers.py::test_multipart_request_data[asyncio]...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
9
53
1,059
0
0.6
1
0.75
1
0.2065
80.8945
8,059
swe_smith::train::37968
swe_smith
train
37,968
kayak__pypika.1c9646f0.lm_rewrite__c42tj7mx
swesmith/kayak__pypika.1c9646f0
kayak/pypika
python
null
# CreateQueryBuilder.as_select() doesn't validate input type ## Description While working on a feature that uses the `as_select()` method of `CreateQueryBuilder`, I noticed that it doesn't properly validate the input type anymore. This can lead to unexpected behavior when passing non-QueryBuilder objects. ## Steps t...
diff --git a/pypika/queries.py b/pypika/queries.py index 42c7c45..a91ce4a 100644 --- a/pypika/queries.py +++ b/pypika/queries.py @@ -1980,7 +1980,7 @@ class CreateQueryBuilder: self._foreign_key_on_update = on_update @builder - def as_select(self, query_builder: QueryBuilder) -> "CreateQueryBuilder":...
["pypika/tests/test_create.py::CreateTableTests::test_create_table_as_select_not_query_raises_error"]
["pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_0__ridley_scott_jimi_hendrix_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_1__1_2_3_4_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_2__toInt64_1_toInt64_2_toInt64_3_toInt64_4_", "pypika/tests/clickhouse/test_array...
jyangballin/swesmith.x86_64.kayak_1776_pypika.1c9646f0
true
null
1
7
1
1,099
0
0.6
1
0.75
1
0.2065
80.8945
8,060
swe_smith::train::39824
swe_smith
train
39,824
tornadoweb__tornado.d5ac65c1.func_pm_ctrl_shuffle__wola0fcd
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
import_object function broken due to variable reference before assignment #### Description The `import_object` function in `tornado.util` is raising `UnboundLocalError: local variable 'parts' referenced before assignment` when trying to import any module or object. #### Steps/Code to Reproduce ```python from tornad...
diff --git a/tornado/util.py b/tornado/util.py index 2e5eee7..2839ee2 100644 --- a/tornado/util.py +++ b/tornado/util.py @@ -106,6 +106,9 @@ class GzipDecompressor: def import_object(name: str) -> Any: + obj = __import__(".".join(parts[:-1]), fromlist=[parts[-1]]) + + parts = name.split(".") """Imports ...
["Doctest: tornado.util.import_object", "test_asyncio (tornado.test.ioloop_test.TestIOLoopConfiguration)", "test_rule_based_router (tornado.test.routing_test.RuleRouterTest)", "test_config_str (tornado.test.util_test.ConfigurableTest)", "test_import_member (tornado.test.util_test.ImportObjectTest)", "test_import_member...
["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
11
9
1,019
0
0.6
1
0.75
1
0.2065
80.8945
8,061
swe_smith::train::49747
swe_smith
train
49,747
facebookresearch__fvcore.a491d5b9.combine_file__ynypprp6
swesmith/facebookresearch__fvcore.a491d5b9
facebookresearch/fvcore
python
null
# Timer class initialization method missing When using the Timer class, I'm getting an AttributeError because the class is trying to call an `initialize` method that doesn't exist. ```python from fvcore.common.timer import Timer timer = Timer() # This fails with AttributeError ``` ## Traceback ``` Traceback (most...
diff --git a/fvcore/common/timer.py b/fvcore/common/timer.py index 6bf3e8a..31821aa 100644 --- a/fvcore/common/timer.py +++ b/fvcore/common/timer.py @@ -13,7 +13,7 @@ class Timer: """ def __init__(self) -> None: - self.reset() + self.initialize() def reset(self) -> None: """ @@...
["tests/test_common.py::TestTimer::test_avg_second", "tests/test_common.py::TestTimer::test_timer"]
["io_tests/test_file_io.py::TestNativeIO::test_bad_args", "io_tests/test_file_io.py::TestNativeIO::test_copy", "io_tests/test_file_io.py::TestNativeIO::test_exists", "io_tests/test_file_io.py::TestNativeIO::test_get_local_path", "io_tests/test_file_io.py::TestNativeIO::test_isdir", "io_tests/test_file_io.py::TestNative...
jyangballin/swesmith.x86_64.facebookresearch_1776_fvcore.a491d5b9
true
null
1
8
2
1,079
0
0.6
1
0.75
1
0.2065
80.8945
8,062
swe_smith::train::21992
swe_smith
train
21,992
life4__textdistance.c3aca916.func_pm_ctrl_shuffle__in886o70
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Cosine similarity calculation broken due to variable reference before assignment #### Description The Cosine similarity algorithm is throwing a `TypeError: can't multiply sequence by non-int of type 'str'` when trying to calculate similarity between text sequences. #### Steps/Code to Reproduce ```python import text...
diff --git a/textdistance/algorithms/token_based.py b/textdistance/algorithms/token_based.py index d499b84..73383aa 100644 --- a/textdistance/algorithms/token_based.py +++ b/textdistance/algorithms/token_based.py @@ -192,18 +192,17 @@ class Cosine(_BaseSimilarity): return 1 def __call__(self, *sequences...
["tests/test_common.py::test_normalization_range[alg14]", "tests/test_common.py::test_normalization_by_one[alg14]", "tests/test_common.py::test_normalization_same[alg14]", "tests/test_common.py::test_normalization_monotonic[alg14]", "tests/test_common.py::test_no_common_chars[alg14]", "tests/test_common.py::test_empty[...
["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
11
9
1,018
0
0.6
1
0.75
1
0.206333
80.894
8,063
swe_smith::train::3289
swe_smith
train
3,289
pygments__pygments.27649ebb.combine_file__3cy6f464
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Filter lookup broken - returns None for existing filters When trying to use filters with Pygments, the filter lookup mechanism is not working correctly. Filters that should be found are returning None instead of the actual filter class. #### Steps/Code to Reproduce ```python from pygments.filters import get_filter_b...
diff --git a/pygments/filters/__init__.py b/pygments/filters/__init__.py index 86e8dac..bff362b 100644 --- a/pygments/filters/__init__.py +++ b/pygments/filters/__init__.py @@ -21,10 +21,10 @@ from pygments.plugin import find_plugin_filters def find_filter_class(filtername): """Lookup a filter by name. Return N...
["tests/test_cmdline.py::test_F_opt", "tests/test_cmdline.py::test_H_opt", "tests/test_basic_api.py::TestFilters::test_codetag_boundary", "tests/test_basic_api.py::TestFilters::test_symbols", "tests/test_basic_api.py::TestFilters::test_raiseonerror", "tests/test_basic_api.py::TestFilters::test_codetag", "tests/test_bas...
["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
9
1,038
0
0.6
1
0.75
1
0.206333
80.894
8,064
swe_smith::train::31244
swe_smith
train
31,244
scrapy__scrapy.35212ec5.func_pm_ctrl_shuffle__5u7r7nvv
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
BaseItemExporter raises TypeError when using fields_to_export parameter #### Description When initializing a BaseItemExporter (or any of its subclasses) with the `fields_to_export` parameter, a TypeError is raised due to unexpected options being detected. #### Steps/Code to Reproduce ```python from scrapy.exporters...
diff --git a/scrapy/exporters.py b/scrapy/exporters.py index 46c6aa3..8910123 100644 --- a/scrapy/exporters.py +++ b/scrapy/exporters.py @@ -41,19 +41,18 @@ class BaseItemExporter: self._configure(kwargs, dont_fail=dont_fail) def _configure(self, options: dict[str, Any], dont_fail: bool = False) -> None...
["tests/test_exporters.py::BaseItemExporterTest::test_fields_to_export", "tests/test_exporters.py::BaseItemExporterDataclassTest::test_fields_to_export", "tests/test_exporters.py::PythonItemExporterTest::test_fields_to_export", "tests/test_exporters.py::PythonItemExporterDataclassTest::test_fields_to_export", "tests/te...
["tests/test_exporters.py::BaseItemExporterTest::test_export_dict_item", "tests/test_exporters.py::BaseItemExporterTest::test_export_item", "tests/test_exporters.py::BaseItemExporterTest::test_field_custom_serializer", "tests/test_exporters.py::BaseItemExporterTest::test_serialize_field", "tests/test_exporters.py::Base...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
1
9
12
1,058
0
0.6
1
0.75
1
0.206333
80.894
8,065
swe_smith::train::11112
swe_smith
train
11,112
rsalmei__alive-progress.35853799.combine_module__w928u6sz
swesmith/rsalmei__alive-progress.35853799
rsalmei/alive-progress
python
null
Progress bar rendering broken after recent changes Description Progress bars are not rendering correctly. When creating a progress bar with various configurations, the output is completely wrong - getting TypeError exceptions and malformed bar displays. Steps/Code to Reproduce ```python from alive_progress import a...
diff --git a/alive_progress/animations/bars.py b/alive_progress/animations/bars.py index e2e5359..d3b51ba 100644 --- a/alive_progress/animations/bars.py +++ b/alive_progress/animations/bars.py @@ -44,7 +44,7 @@ def bar_factory(chars=None, *, tip=None, background=None, borders=None, errors=N fill = ...
["tests/animations/test_bars.py::test_bar_tip_background[--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[_-=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[-0.0-Fa...
["tests/animations/test_bars.py::test_bar_error[params0]", "tests/animations/test_bars.py::test_bar_error[params1]", "tests/animations/test_spinners.py::test_frame_spinner[a\\nb-expected0]", "tests/animations/test_spinners.py::test_frame_spinner[abc-expected1]", "tests/animations/test_spinners.py::test_frame_spinner[fr...
jyangballin/swesmith.x86_64.rsalmei_1776_alive-progress.35853799
true
null
2
11
143
1,018
0
0.6
1
0.75
1
0.206333
80.894
8,066
swe_smith::train::51616
swe_smith
train
51,616
pydicom__pydicom.7d361b3d.combine_module__i5ek8fug
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
hex2bytes returns empty bytes for invalid input types instead of raising TypeError #### Description The `hex2bytes` function in `pydicom.util.hexutil` is not properly handling invalid input types. Instead of raising a `TypeError` for non-string/non-bytes input, it returns an empty bytes object `b""`. #### Steps/Code...
diff --git a/src/pydicom/util/dump.py b/src/pydicom/util/dump.py index 32ec2f8..d6779b6 100644 --- a/src/pydicom/util/dump.py +++ b/src/pydicom/util/dump.py @@ -111,16 +111,16 @@ def pretty_print( """ - indent = indent_chars * indent_level - next_indent = indent_chars * (indent_level + 1) + indent = i...
["tests/test_util.py::TestDump::test_pretty_print", "tests/test_util.py::TestHexUtil::test_hex_to_bytes"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
2
22
2
798
0
0.6
1
0.75
1
0.206333
80.894
8,067
swe_smith::train::30599
swe_smith
train
30,599
gweis__isodate.17cb25eb.func_pm_remove_cond__xrczdnvn
swesmith/gweis__isodate.17cb25eb
gweis/isodate
python
null
parse_date fails with KeyError for ordinal and week dates #### Description When parsing ISO 8601 date strings that represent ordinal dates (year + day of year) or week dates (year + week + day), the `parse_date` function raises a `KeyError` instead of properly parsing the date. #### Steps/Code to Reproduce ```pytho...
diff --git a/src/isodate/isodates.py b/src/isodate/isodates.py index aa432c5..d91db01 100644 --- a/src/isodate/isodates.py +++ b/src/isodate/isodates.py @@ -143,8 +143,6 @@ def parse_date( @raise ISO8601Error: if this function can not parse the datestring @raise ValueError: if datestring can not be represente...
["tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985102-expected6-%Y%j]", "tests/test_date.py::test_parse[4-1985-102-expected7-%Y-%j]", "tests/test_date.py::test_parse[4-1985W155-expected8-%YW%W%w]", "tests/test_date.py::test_parse[4-1985-W15-5-expected9-%Y-W%W-%w]", "tests/tes...
["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::test_parse[4-19850412-expected5-%Y%m%d]", "tests/test_date...
jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb
true
null
1
18
22
878
0
0.6
1
0.75
1
0.206333
80.894
8,068
swe_smith::train::3409
swe_smith
train
3,409
pygments__pygments.27649ebb.combine_file__ifw43907
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
DylanLexer class inheritance broken #### Description The DylanLexer class is missing its parent class inheritance from RegexLexer, causing it to fail basic lexer functionality. When trying to use the Dylan lexer, it raises AttributeError because the class doesn't have the required methods from RegexLexer. #### Steps...
diff --git a/pygments/lexers/dylan.py b/pygments/lexers/dylan.py index a56ac9a..c4de938 100644 --- a/pygments/lexers/dylan.py +++ b/pygments/lexers/dylan.py @@ -18,7 +18,7 @@ from pygments.token import Comment, Operator, Keyword, Name, String, \ __all__ = ['DylanLexer', 'DylanConsoleLexer', 'DylanLidLexer'] -class...
["tests/test_cmdline.py::test_C_opt", "tests/test_cmdline.py::test_stdin", "tests/test_basic_api.py::test_lexer_options[DylanConsoleLexer]", "tests/test_basic_api.py::test_lexer_options[DylanLexer]", "tests/test_basic_api.py::test_random_input[DylanLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
14
25
958
0
0.6
1
0.75
1
0.206333
80.894
8,069
swe_smith::train::27840
swe_smith
train
27,840
jsvine__pdfplumber.02ff4313.func_pm_ctrl_invert_if__5xvxen84
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
TextMap.search() raises error when passing compiled regex pattern #### Description When using a compiled regex pattern with `TextMap.search()`, the method incorrectly tries to apply `re.escape()` to the compiled pattern object, causing a `TypeError`. #### Steps/Code to Reproduce ```python import re import pdfplumbe...
diff --git a/pdfplumber/utils/text.py b/pdfplumber/utils/text.py index 8edafa1..1df042c 100644 --- a/pdfplumber/utils/text.py +++ b/pdfplumber/utils/text.py @@ -179,6 +179,12 @@ class TextMap: main_group: int = 0, ) -> List[Dict[str, Any]]: if isinstance(pattern, Pattern): + if regex i...
["tests/test_utils.py::Test::test_handle_empty_and_whitespace_search_results", "tests/test_utils.py::Test::test_search_regex_compiled", "tests/test_utils.py::Test::test_search_regex_uncompiled", "tests/test_utils.py::Test::test_search_string"]
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
13
4
978
0
0.6
1
0.75
1
0.206333
80.894
8,070
r2e_gym::train::5037
r2e_gym
train
5,037
datalad__26df45e6833f5ac32af463cae8c3cb6bd86971da
datalad
datalad/datalad
python
26df45e6833f5ac32af463cae8c3cb6bd86971da
**Title:** TypeError When Configuration Directories Are Undefined During Provider Loading **Description:** When the user or site configuration directories are not set, attempting to load provider configuration files causes a `TypeError`. This error occurs because the system tries to join path components where one of t...
diff --git a/datalad/downloaders/providers.py b/datalad/downloaders/providers.py --- a/datalad/downloaders/providers.py +++ b/datalad/downloaders/providers.py @@ -18,6 +18,7 @@ import re from os.path import dirname, abspath, join as pathjoin from six.moves.urllib.parse import urlparse +from collections import Ordere...
diff --git a/datalad/downloaders/tests/test_providers.py b/datalad/downloaders/tests/test_providers.py --- a/datalad/downloaders/tests/test_providers.py +++ b/datalad/downloaders/tests/test_providers.py @@ -8,7 +8,11 @@ # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## """Tests for data ...
null
null
namanjain12/datalad_final:26df45e6833f5ac32af463cae8c3cb6bd86971da
true
null
1
31
null
1,330
0
0.75
1
0.6375
1
0.325
80.89375
8,071
swe_smith::train::29537
swe_smith
train
29,537
django__channels.a144b4b8.combine_file__cal03fjh
swesmith/django__channels.a144b4b8
django/channels
python
null
AsyncConsumer.as_asgi() returns None instead of ASGI application #### Description When using `AsyncConsumer.as_asgi()` to create an ASGI application, the method returns `None` instead of the expected ASGI application function. This breaks consumer functionality and causes `TypeError: 'NoneType' object is not callable...
diff --git a/channels/consumer.py b/channels/consumer.py index fc06543..e162787 100644 --- a/channels/consumer.py +++ b/channels/consumer.py @@ -91,15 +91,16 @@ class AsyncConsumer: """ async def app(scope, receive, send): - consumer = cls(**initkwargs) - return await consumer(...
["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket...
["tests/test_generic_websocket.py::test_accept_headers[True]", "tests/test_generic_websocket.py::test_close_reason[True]", "tests/security/test_auth.py::test_login_no_session_in_scope", "tests/security/test_auth.py::test_login_no_user_in_scope", "tests/security/test_auth.py::test_login_user_as_argument", "tests/securit...
jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8
true
null
1
14
21
957
0
0.6
1
0.75
1
0.206167
80.8935
8,072
swe_smith::train::27773
swe_smith
train
27,773
arrow-py__arrow.1d70d009.func_pm_remove_cond__4xvcf3sg
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
SlavicBaseLocale _format_timeframe broken for plural forms #### Description When using Slavic locales (Russian, Polish, Bulgarian, Macedonian, etc.), the `_format_timeframe` method fails with an AttributeError because it tries to call `.format()` on a dictionary instead of a string. #### Steps/Code to Reproduce ```...
diff --git a/arrow/locales.py b/arrow/locales.py index 63b2d48..ac0c28a 100644 --- a/arrow/locales.py +++ b/arrow/locales.py @@ -1334,17 +1334,8 @@ class SlavicBaseLocale(Locale): form = self.timeframes[timeframe] delta = abs(delta) - if isinstance(form, Mapping): - if delta % 10 =...
["tests/test_arrow.py::TestArrowHumanize::test_no_floats", "tests/test_arrow.py::TestArrowHumanize::test_no_floats_multi_gran", "tests/test_arrow.py::TestArrowHumanizeTestsWithLocale::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_minutes", "test...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
9
23
1,057
0
0.6
1
0.75
1
0.206167
80.8935
8,073
swe_smith::train::14298
swe_smith
train
14,298
python-openxml__python-docx.0cf6d71f.func_pm_ctrl_shuffle__lvbefyio
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
NameError when accessing relationships by type #### Description Getting a `NameError: name 'matching' is not defined` error when trying to find related parts by relationship type. This seems to happen when the code tries to access a variable before it's defined. #### Steps/Code to Reproduce ```python from docx impo...
diff --git a/src/docx/opc/rel.py b/src/docx/opc/rel.py index 47e8860..6b6a19f 100644 --- a/src/docx/opc/rel.py +++ b/src/docx/opc/rel.py @@ -89,20 +89,19 @@ class Relationships(Dict[str, "_Relationship"]): return None def _get_rel_of_type(self, reltype: str): - """Return single relationship of ty...
["tests/opc/test_rel.py::DescribeRelationships::it_can_find_a_related_part_by_reltype", "tests/test_blkcntnr.py::DescribeBlockItemContainer::it_can_iterate_its_inner_content", "tests/test_section.py::DescribeSection::it_can_iterate_its_inner_content"]
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
13
3
977
0
0.6
1
0.75
1
0.206167
80.8935
8,074
swe_smith::train::51204
swe_smith
train
51,204
marshmallow-code__apispec.8b421526.func_basic__sspaek66
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
Extension validation fails with custom HTTP methods #### Description When using custom HTTP methods with the `x-` prefix in OpenAPI specifications, the validation logic incorrectly rejects them as invalid methods. #### Steps/Code to Reproduce ```python from apispec import APISpec spec = APISpec( title='Test AP...
diff --git a/src/apispec/core.py b/src/apispec/core.py index e9ccb40..d460c15 100644 --- a/src/apispec/core.py +++ b/src/apispec/core.py @@ -603,23 +603,23 @@ class APISpec: operation_names = set(operations) valid_methods = set(VALID_METHODS[self.openapi_version.major]) invalid = { - ...
["tests/test_core.py::TestComponents::test_response_lazy[3.0.0]", "tests/test_core.py::TestComponents::test_header_lazy[3.0.0]", "tests/test_core.py::TestComponents::test_example_lazy[3.0.0]", "tests/test_core.py::TestPath::test_path[3.0.0]", "tests/test_core.py::TestPath::test_path_merges_paths[3.0.0]", "tests/test_co...
["tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestTags::test_tag[...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
true
null
1
12
22
997
0
0.6
1
0.75
1
0.206167
80.8935
8,075
swe_smith::train::6825
swe_smith
train
6,825
joke2k__faker.8b401a7d.func_pm_remove_wrapper__psvo3kzw
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
tar() method returns empty archive #### Description The `tar()` method in the misc provider is returning empty tar archives instead of generating archives with the specified files and content. #### Steps/Code to Reproduce ```python from faker import Faker import tarfile import io fake = Faker() # Generate a tar a...
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index 70f20ec..af21a21 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -318,27 +318,7 @@ class Provider(BaseProvider): tar_buffer = io.BytesIO() remaining_size = uncompressed_size...
["tests/providers/test_misc.py::TestMiscProvider::test_tar_exact_minimum_size", "tests/providers/test_misc.py::TestMiscProvider::test_tar_over_minimum_size", "tests/providers/test_misc.py::TestMiscProvider::test_tar_compression_py3"]
["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
20
3
837
0
0.6
1
0.75
1
0.206167
80.8935
8,076
swe_smith::train::27755
swe_smith
train
27,755
arrow-py__arrow.1d70d009.func_pm_remove_assign__4j54xtb0
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
NameError when using span() method with various time frames #### Description The `span()` method is throwing a `NameError: name 'values' is not defined` when called with different time frames like 'month', 'week', 'day', 'hour', etc. #### Steps/Code to Reproduce ```python import arrow # Create an arrow instance ar...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..37a7e9a 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -559,16 +559,12 @@ class Arrow: if frame_absolute == "week": attr = "day" elif frame_absolute == "quarter": - attr = "month" + pass else: ...
["tests/test_arrow.py::TestArrowSpanRange::test_year", "tests/test_arrow.py::TestArrowSpanRange::test_quarter", "tests/test_arrow.py::TestArrowSpanRange::test_month", "tests/test_arrow.py::TestArrowSpanRange::test_week", "tests/test_arrow.py::TestArrowSpanRange::test_day", "tests/test_arrow.py::TestArrowSpanRange::test...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
9
31
1,057
0
0.6
1
0.75
1
0.206167
80.8935
8,077
swe_smith::train::42148
swe_smith
train
42,148
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__jxsv0t6y
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Categories.depth property returns incorrect value when chart has no categories #### Description The `Categories.depth` property is returning an incorrect value when accessing charts that have no categories present. Instead of returning 0 as expected, it's attempting to access attributes on a None object. #### Steps/...
diff --git a/src/pptx/chart/category.py b/src/pptx/chart/category.py index 2c28aff..aefe47f 100644 --- a/src/pptx/chart/category.py +++ b/src/pptx/chart/category.py @@ -40,19 +40,18 @@ class Categories(Sequence): @property def depth(self): + return len(cat.lvls) + cat = self._xChart.cat ...
["tests/chart/test_category.py::DescribeCategories::it_knows_its_depth[depth_fixture0]", "tests/chart/test_category.py::DescribeCategories::it_knows_its_depth[depth_fixture1]", "tests/chart/test_category.py::DescribeCategories::it_knows_its_depth[depth_fixture2]", "tests/chart/test_category.py::DescribeCategories::it_k...
["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
9
5
1,057
0
0.6
1
0.75
1
0.206167
80.8935
8,078
swe_smith::train::51221
swe_smith
train
51,221
marshmallow-code__apispec.8b421526.func_basic__xhrad9u7
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
MarshmallowPlugin.header_helper method doesn't work correctly Description I found an issue with the `header_helper` method in the MarshmallowPlugin class. When trying to use a schema in a header component, it fails. Here's a minimal example to reproduce: ```python from apispec import APISpec from apispec.ext.marshm...
diff --git a/src/apispec/ext/marshmallow/__init__.py b/src/apispec/ext/marshmallow/__init__.py index d4f1a54..8cb675f 100644 --- a/src/apispec/ext/marshmallow/__init__.py +++ b/src/apispec/ext/marshmallow/__init__.py @@ -218,9 +218,9 @@ class MarshmallowPlugin(BasePlugin): :param dict header: header fields. Ma...
["tests/test_ext_marshmallow.py::TestComponentHeaderHelper::test_can_use_schema_in_header[PetSchema-3.0.0]", "tests/test_ext_marshmallow.py::TestComponentHeaderHelper::test_can_use_schema_in_header[schema1-3.0.0]"]
["tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestTags::test_tag[...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
true
null
1
6
2
1,117
0
0.6
1
0.75
1
0.206167
80.8935
8,079
swe_smith::train::9790
swe_smith
train
9,790
keleshev__schema.24a30457.func_basic__4dp0lvs4
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
Optional keys with defaults raise ValueError for simple values #### Description When creating Optional keys with default values using simple types like strings or integers, a ValueError is raised with a confusing error message about the values being "too simplistic". #### Steps/Code to Reproduce ```python from sche...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..fecf0c9 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -843,14 +843,14 @@ class Optional(Schema): default: Any = kwargs.pop("default", self._MARKER) super(Optional, self).__init__(*args, **kwargs) if default is n...
["test_schema.py::test_dict_optional_defaults", "test_schema.py::test_optional_callable_default_get_inherited_schema_validate_kwargs", "test_schema.py::test_optional_callable_default_ignore_inherited_schema_validate_kwargs", "test_schema.py::test_inheritance_optional", "test_schema.py::test_json_schema_default_is_custo...
["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
14
16
957
0
0.6
1
0.75
1
0.206167
80.8935
8,080
swe_smith::train::8110
swe_smith
train
8,110
cantools__cantools.0c6a7871.func_pm_remove_cond__4kysmm33
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML selector signal byte order not handled correctly When loading ARXML files with multiplexed messages, the selector field byte order is not being processed properly. The `SELECTOR-FIELD-BYTE-ORDER` element is being ignored, causing signals to overlap incorrectly. #### Steps to Reproduce ```python import cantools...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..115a62e 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -1127,11 +1127,7 @@ class System...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_database.py::CanToolsDatabaseTest::test_gather_signals", "tests/test_database.py::CanToolsDatabaseTest::test_system_3_arxml", "tests/test_list.py::CanToolsList...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "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::CanTools...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
13
5
977
0
0.6
1
0.75
1
0.206167
80.8935
8,081
swe_smith::train::18821
swe_smith
train
18,821
seperman__deepdiff.ed252022.func_basic__g821bxrk
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
stringify_element function breaks when quote_str is None #### Description The `stringify_element` function in `deepdiff/path.py` has a logic error that causes it to fail when `quote_str` is `None`. The function incorrectly returns `None` instead of the original parameter when no quoting is needed. #### Steps/Code to...
diff --git a/deepdiff/path.py b/deepdiff/path.py index ee63b5b..9abf435 100644 --- a/deepdiff/path.py +++ b/deepdiff/path.py @@ -276,14 +276,15 @@ def stringify_element(param, quote_str=None): for char in param: if char in {'"', "'"}: new_param.append('𝆺𝅥𝅯') - new_param....
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case12]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case13]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case14]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_cas...
["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
9
144
1,057
0
0.6
1
0.75
1
0.206167
80.8935
8,082
swe_smith::train::38419
swe_smith
train
38,419
dbader__schedule.82a43db1.func_basic__v5xvfh9g
swesmith/dbader__schedule.82a43db1
dbader/schedule
python
null
Job scheduling fails with TypeError when using at() method #### Description When trying to schedule jobs using the `at()` method, a TypeError is raised saying "at() should be passed a string" even when passing valid string time formats. #### Steps/Code to Reproduce ```python import schedule def job(): print("J...
diff --git a/schedule/__init__.py b/schedule/__init__.py index 8e12eeb..ecdfa05 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -507,20 +507,20 @@ class Job: "Timezone must be string or pytz.timezone object" ) - if not isinstance(time_str, str): + if...
["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...
["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_daylight_saving_time", "test_schedule.py::SchedulerTests::test_get_by_tag", "test_schedule.py::SchedulerTests::test_i...
jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1
true
null
1
10
56
1,036
0
0.6
1
0.75
1
0.206
80.893
8,083
swe_smith::train::48271
swe_smith
train
48,271
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__w6q2ce58
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
FluffConfig.get_templater_class() raises UnboundLocalError due to variable reference before assignment #### Description The `get_templater_class()` method in `FluffConfig` is referencing the variable `templater_name` before it's defined, causing an `UnboundLocalError` when the method is called. #### Steps/Code to Re...
diff --git a/src/sqlfluff/core/config/fluffconfig.py b/src/sqlfluff/core/config/fluffconfig.py index d6e142d..e701571 100644 --- a/src/sqlfluff/core/config/fluffconfig.py +++ b/src/sqlfluff/core/config/fluffconfig.py @@ -438,6 +438,10 @@ class FluffConfig: return cls(overrides=overrides, require_dialect=requir...
["test/core/config/fluffconfig_test.py::test__config__from_strings", "test/core/config/fluffconfig_test.py::test__config__nested_config_tests", "test/core/config/fluffconfig_test.py::test__config__templater_selection[raw-RawTemplater-False]", "test/core/config/fluffconfig_test.py::test__config__templater_selection[jinj...
["test/core/config/fluffconfig_test.py::test__config_missing_dialect", "test/core/config/fluffconfig_test.py::test__config__validate_configs_indirect"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
13
19
976
0
0.6
1
0.75
1
0.206
80.893
8,084
r2e_gym::train::5816
r2e_gym
train
5,816
tornado__4f276caf08ee3b9b7270f295d5cce84c91c9122b
tornado
tornadoweb/tornado
python
4f276caf08ee3b9b7270f295d5cce84c91c9122b
**Title:** AsyncHTTPClient Raises Unclear Errors for GET Requests with Body and POST Requests without Body **Description:** When using `AsyncHTTPClient` to make HTTP requests, providing a body with a GET request or omitting the body in a POST request results in generic `AssertionError` exceptions. This lack of specif...
diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py --- a/tornado/curl_httpclient.py +++ b/tornado/curl_httpclient.py @@ -407,6 +407,11 @@ # Handle curl's cryptic options for every individual HTTP method if request.method in ("POST", "PUT"): + if request.body is None: + ra...
diff --git a/tornado/test/httpclient_test.py b/tornado/test/httpclient_test.py --- a/tornado/test/httpclient_test.py +++ b/tornado/test/httpclient_test.py @@ -387,6 +387,19 @@ allow_nonstandard_methods=True) self.assertEqual(response.body, b'OTHER') + @gen_test + def test...
null
null
namanjain12/tornado_final:4f276caf08ee3b9b7270f295d5cce84c91c9122b
true
null
2
18
null
1,588
0
0.75
1
0.6375
1
0.324667
80.89275
8,085
swe_smith::train::36490
swe_smith
train
36,490
lincolnloop__python-qrcode.456b01d4.combine_file__xdrh2xdv
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
SVG circle drawer coordinates swapped causing rendering issues #### Description When using the SVG circle drawer, the generated QR codes have incorrect positioning due to swapped x and y coordinates. This affects both the `SvgCircleDrawer` and `SvgPathCircleDrawer` classes. #### Steps/Code to Reproduce ```python im...
diff --git a/qrcode/image/styles/moduledrawers/svg.py b/qrcode/image/styles/moduledrawers/svg.py index cf5b9e7..2dac294 100644 --- a/qrcode/image/styles/moduledrawers/svg.py +++ b/qrcode/image/styles/moduledrawers/svg.py @@ -90,9 +90,9 @@ class SvgCircleDrawer(SvgQRModuleDrawer): coords = self.coords(box) ...
["qrcode/tests/test_qrcode_svg.py::test_svg_circle_drawer", "qrcode/tests/test_script.py::test_factory_drawer"]
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
8
2
1,075
0
0.6
1
0.75
1
0.205833
80.8925
8,086
swe_smith::train::22105
swe_smith
train
22,105
jawah__charset_normalizer.1fdd6463.func_basic__m5aq6y1c
swesmith/jawah__charset_normalizer.1fdd6463
jawah/charset_normalizer
python
null
encoding_unicode_range function fails with AttributeError when using IncrementalEncoder instead of IncrementalDecoder #### Description The `encoding_unicode_range` function in `charset_normalizer/cd.py` is incorrectly trying to use `IncrementalEncoder` instead of `IncrementalDecoder`, causing an `AttributeError` when...
diff --git a/charset_normalizer/cd.py b/charset_normalizer/cd.py index 71a3ed5..38135e2 100644 --- a/charset_normalizer/cd.py +++ b/charset_normalizer/cd.py @@ -31,22 +31,22 @@ def encoding_unicode_range(iana_name: str) -> list[str]: if is_multi_byte_encoding(iana_name): raise OSError("Function not suppor...
["tests/test_base_detection.py::test_obviously_ascii_content[g4UsPJdfzNkGW2jwmKDGDilKGKYtpF2X.mx3MaTWL1tL7CNn5U7DeCcodKX7S3lwwJPKNjBT8etY]", "tests/test_base_detection.py::test_obviously_ascii_content[81f4ab054b39cb0e12701e734077d84264308f5fc79494fc5f159fa2ebc07b73c8cc0e98e009664a20986706f90146e8eefcb929ce1f74a8eab2136...
["tests/test_base_detection.py::test_empty", "tests/test_base_detection.py::test_bool_matches", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xfe\\xff-utf_16]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\x841\\x953-gb18030]", "tests/test_base_detection.py::test_empty_but_with_bom_...
jyangballin/swesmith.x86_64.jawah_1776_charset_normalizer.1fdd6463
true
null
1
12
31
995
0
0.6
1
0.75
1
0.205833
80.8925
8,087
swe_smith::train::39156
swe_smith
train
39,156
pallets__jinja.ada0a9a6.func_basic__ogzawk9s
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Template compilation generates incorrect variable assignments #### Description When compiling Jinja2 templates, variable assignments are being generated incorrectly, causing templates to fail with `NameError` exceptions for undefined variables. #### Steps/Code to Reproduce ```python from jinja2 import Environment ...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..5ab398a 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -585,17 +585,17 @@ class CodeGenerator(NodeVisitor): undefs = [] for target, (action, param) in frame.symbols.loads.items(): if action ==...
["tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_expressions", "tests/test_api.py::TestStreaming::test_basic_streaming", "tests/test_api.py::TestStreaming::test_buffered_streaming", "tests/test_api.py::TestLowLevel::test_custom_code_generator", "tests/test_async.py::test_b...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "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", "tests/test_api.py::TestExtendedAPI::test_eval_final...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
10
200
1,035
0
0.6
1
0.75
1
0.205833
80.8925
8,088
swe_smith::train::939
swe_smith
train
939
oauthlib__oauthlib.1fd52536.pr_891
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# DeviceCodeGrant import missing in pre_configured.py I'm trying to use the DeviceCodeGrant in the pre-configured Server classes, but I'm getting import errors. **To Reproduce** When trying to use the pre-configured Server classes with DeviceCodeGrant, I get the following error: ```python from oauthlib.oauth2.rfc67...
diff --git a/oauthlib/oauth2/rfc6749/endpoints/pre_configured.py b/oauthlib/oauth2/rfc6749/endpoints/pre_configured.py index d64a166..ff70e3a 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/pre_configured.py +++ b/oauthlib/oauth2/rfc6749/endpoints/pre_configured.py @@ -44,6 +44,7 @@ class Server(AuthorizationEndpoint, I...
["tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_error_catching", "tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_unavailability", "tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_wrapper", "tests/oauth2/rfc6749/endpoints/test_meta...
["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
3
9
19
1,055
0
0.6
1
0.75
1
0.205833
80.8925
8,089
swe_smith::train::52489
swe_smith
train
52,489
pydicom__pydicom.7d361b3d.func_pm_remove_assign__df7208i5
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
NameError in DataElement.name property for private tags with private_creator #### Description When accessing the `name` property of a private DataElement that has a `private_creator` set, a `NameError` is raised because the variable `name` is referenced before being defined. #### Steps/Code to Reproduce ```python i...
diff --git a/src/pydicom/dataelem.py b/src/pydicom/dataelem.py index 431e294..79cb277 100644 --- a/src/pydicom/dataelem.py +++ b/src/pydicom/dataelem.py @@ -770,12 +770,6 @@ class DataElement: if self.tag.is_private: if self.private_creator: try: - # If we have ...
["tests/test_dataelem.py::TestDataElement::test_name_unknown_private", "tests/test_dataelem.py::TestDataElement::test_private_tag_in_repeater_range", "tests/test_dataelem.py::TestDataElement::test_private_repeater_tag", "tests/test_dataelem.py::TestRawDataElement::test_read_known_private_tag_implicit", "tests/test_data...
["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
7
12
1,095
0
0.6
1
0.75
1
0.205833
80.8925
8,090
swe_smith::train::32313
swe_smith
train
32,313
davidhalter__parso.338a5760.lm_rewrite__5jqkg0sx
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Cache lookup fails when accessing non-existent keys in parser_cache Description When trying to access a key that doesn't exist in the parser_cache dictionary, a TypeError is raised instead of properly handling the missing key. The issue occurs when checking if a module is already in the cache. Currently, the code tr...
diff --git a/parso/cache.py b/parso/cache.py index 5592a9f..788cab5 100644 --- a/parso/cache.py +++ b/parso/cache.py @@ -114,23 +114,24 @@ def load_module(hashed_grammar, file_io, cache_path=None): """ Returns a module or None, if it fails. """ - p_time = file_io.get_last_modified() - if p_time is ...
["test/test_cache.py::test_cache_last_used_update[False-False]", "test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_cache.py::test_cache_last_used_update[True-False]", "test/test_cache.py::test_cache_last_used_update[True-True]"]
["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_inactive_ca...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
21
4
815
0
0.6
1
0.75
1
0.205833
80.8925
8,091
swe_smith::train::26950
swe_smith
train
26,950
tkrajina__gpxpy.09fc46b3.func_basic__ht0b82hn
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
get_course function raises ValueError with certain coordinate parameter order #### Description The `get_course` function in `mod_geo` is raising a `ValueError: math domain error` when called with specific coordinate parameters. This appears to be related to the parameter order when passing latitude and longitude valu...
diff --git a/test.py b/test.py index 7dd6f44..a6757cd 100644 --- a/test.py +++ b/test.py @@ -1031,23 +1031,22 @@ class GPXTests(mod_unittest.TestCase): def test_get_course(self) -> None: pts = [[-73, -150], [43.5798, 35.71265], [85, 0.12345]] - # same long distance checks as in test_get_course_be...
["test.py::GPXTests::test_get_course"]
["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
19
1
854
0
0.6
1
0.75
1
0.205667
80.892
8,092
swe_smith::train::22442
swe_smith
train
22,442
tweepy__tweepy.91a41c6e.func_pm_class_rm_funcs__9qs4fxy6
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
AttributeError when accessing client methods It seems like there's an issue with accessing certain methods in the `Client` class. When trying to perform operations such as managing pinned lists or retrieving liked tweets, an `AttributeError` is raised. This is unexpected as these methods should be available for use. ...
diff --git a/tweepy/client.py b/tweepy/client.py index d463129..4e644d0 100644 --- a/tweepy/client.py +++ b/tweepy/client.py @@ -151,14 +151,6 @@ class BaseClient: return Response(data, includes, errors, meta) - def _process_data(self, data, data_type=None): - if data_type is not None: - ...
["tests/test_asyncclient.py::TweepyAsyncClientTests::test_bookmarks", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_create_and_delete_tweet", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_create_and_get_compliance_job_and_jobs", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_follow_and_u...
["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
78
1,054
0
0.6
1
0.75
1
0.205667
80.892
8,093
swe_smith::train::6876
swe_smith
train
6,876
joke2k__faker.8b401a7d.lm_rewrite__mgmk8ij7
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
### AttributeError in `date_this_month` Method #### Description It seems there's an issue with the `date_this_month` method in the `date_time` provider. After the recent changes, calling this method results in an `AttributeError`. The error message indicates that a `'datetime.date' object has no attribute 'date'`. #...
diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py index f05538e..b26cea4 100644 --- a/faker/providers/date_time/__init__.py +++ b/faker/providers/date_time/__init__.py @@ -2424,7 +2424,8 @@ class Provider(BaseProvider): else: return today - def date_th...
["tests/providers/test_date_time.py::TestDateTime::test_date_this_period"]
["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
6
1
1,114
0
0.6
1
0.75
1
0.205667
80.892
8,094
swe_smith::train::38804
swe_smith
train
38,804
pallets__jinja.ada0a9a6.func_basic__1b3ukg71
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
ModuleLoader fails to load templates with AttributeError #### Description When using ModuleLoader, template loading fails with an AttributeError. The loader appears to be unable to access the compiled template modules properly. #### Steps/Code to Reproduce ```python from jinja2 import Environment from jinja2.loader...
diff --git a/src/jinja2/loaders.py b/src/jinja2/loaders.py index 8ca32cb..de4f976 100644 --- a/src/jinja2/loaders.py +++ b/src/jinja2/loaders.py @@ -666,19 +666,19 @@ class ModuleLoader(BaseLoader): module = f"{self.package_name}.{key}" mod = getattr(self.module, module, None) - if mod is Non...
["tests/test_loader.py::TestModuleLoader::test_deflated_zip_compile", "tests/test_loader.py::TestModuleLoader::test_stored_zip_compile", "tests/test_loader.py::TestModuleLoader::test_filesystem_compile", "tests/test_loader.py::TestModuleLoader::test_weak_references", "tests/test_loader.py::TestModuleLoader::test_choice...
["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
8
8
1,074
0
0.6
1
0.75
1
0.205667
80.892
8,095
swe_smith::train::1519
swe_smith
train
1,519
Cog-Creators__Red-DiscordBot.33e0eac7.func_basic__q7agp6xq
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
Repo initialization fails when folder already exists #### Description When creating a Repo instance, if the target folder already exists, the initialization fails with a FileExistsError. This breaks existing functionality where repos should be able to work with pre-existing directories. #### Steps/Code to Reproduce ...
diff --git a/redbot/cogs/downloader/repo_manager.py b/redbot/cogs/downloader/repo_manager.py index 8d9b3fa..4ea71ff 100644 --- a/redbot/cogs/downloader/repo_manager.py +++ b/redbot/cogs/downloader/repo_manager.py @@ -144,21 +144,21 @@ class Repo(RepoJSONMixin): available_modules: Tuple[Installable, ...] = (), ...
["tests/cogs/downloader/test_downloader.py::test_existing_git_repo", "tests/cogs/downloader/test_downloader.py::test_add_repo", "tests/cogs/downloader/test_downloader.py::test_remove_repo"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
1
12
3
994
0
0.6
1
0.75
1
0.205667
80.892
8,096
swe_smith::train::52530
swe_smith
train
52,530
pydicom__pydicom.7d361b3d.func_pm_remove_assign__vjvzkfr1
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileSet initialization fails with UnboundLocalError when loading DICOMDIR #### Description When initializing a FileSet with a DICOMDIR dataset, the constructor fails with an `UnboundLocalError` for variables `ds`, `path`, and `uid`. This appears to affect all FileSet operations that involve loading from a dataset or ...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..5b8ffd8 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -1615,7 +1615,7 @@ class FileSet: are found in the File-set (default ``False``). """ if isinstance(ds_or_path, Dataset): - ds ...
["tests/test_fileset.py::TestRecordNode::test_root", "tests/test_fileset.py::TestRecordNode::test_leaf", "tests/test_fileset.py::TestRecordNode::test_add", "tests/test_fileset.py::TestRecordNode::test_key", "tests/test_fileset.py::TestRecordNode::test_bad_record", "tests/test_fileset.py::TestRecordNode::test_bad_record...
["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
8
109
1,074
0
0.6
1
0.75
1
0.205667
80.892
8,097
swe_smith::train::39242
swe_smith
train
39,242
pallets__jinja.ada0a9a6.func_basic__umajimh3
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Set blocks with autoescape produce NameError: name 'parent' is not defined #### Description When using `{% set %}` blocks in templates with autoescape enabled, a `NameError: name 'parent' is not defined` is raised during template rendering. #### Steps/Code to Reproduce ```python from jinja2 import Environment env ...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..be73c33 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1585,23 +1585,20 @@ class CodeGenerator(NodeVisitor): def visit_AssignBlock(self, node: nodes.AssignBlock, frame: Frame) -> None: self.push_assign_tracki...
["tests/test_core_tags.py::TestSet::test_block", "tests/test_core_tags.py::TestSet::test_block_escaping", "tests/test_core_tags.py::TestSet::test_namespace_block", "tests/test_core_tags.py::TestSet::test_block_escaping_filtered", "tests/test_core_tags.py::TestSet::test_block_filtered", "tests/test_core_tags.py::TestSet...
["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
11
8
1,013
0
0.6
1
0.75
1
0.2055
80.8915
8,098
swe_smith::train::44806
swe_smith
train
44,806
mahmoud__glom.fb3c4e76.func_basic__qgg8j8gl
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
GlomError.wrap() returns wrong type when wrapping exceptions #### Description The `GlomError.wrap()` method is not working correctly and returns unexpected values instead of properly wrapped exceptions. When trying to wrap exceptions, it appears to return the class itself or None instead of a wrapped exception instan...
diff --git a/glom/core.py b/glom/core.py index cee71a3..a3c0bc8 100644 --- a/glom/core.py +++ b/glom/core.py @@ -131,18 +131,15 @@ class GlomError(Exception): """ @classmethod def wrap(cls, exc): - # TODO: need to test this against a wide array of exception types - # this approach to wrappi...
["glom/test/test_error.py::test_regular_error_stack", "glom/test/test_error.py::test_3_11_byte_code_caret", "glom/test/test_scope_vars.py::test_s_scope_assign", "glom/test/test_scope_vars.py::test_let"]
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
13
4
973
0
0.6
1
0.75
1
0.2055
80.8915
8,099
swe_smith::train::10441
swe_smith
train
10,441
paramiko__paramiko.23f92003.func_basic__fda4aa4u
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Key loading fails with generic Exception instead of SSHException #### Description When loading SSH keys in OpenSSH format, the key parsing is failing and raising a generic `Exception` instead of the expected `SSHException`. This breaks existing error handling code that expects `SSHException` for key loading failures....
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index f0b2d6d..e17feac 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -704,7 +704,7 @@ class PKey: # string s_size = struct.unpack(">L", data[idx : idx + 4])[0] idx += 4 - s = data...
["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_ed25519", "tests/test_pkey.py::KeyTest::test_load_openssh_format_DSS_key", "tests/test_pke...
["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
13
8
973
0
0.6
1
0.75
1
0.2055
80.8915