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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,700 | swe_bench::test::1297 | swe_bench | test | 1,297 | pydata__xarray-7003 | pydata/xarray | pydata/xarray | python | 5bec4662a7dd4330eca6412c477ca3f238323ed2 | Indexes.get_unique() TypeError with pandas indexes
@benbovy I also just tested the `get_unique()` method that you mentioned and maybe noticed a related issue here, which I'm not sure is wanted / expected.
Taking the above dataset `ds`, accessing this function results in an error:
```python
> ds.indexes.get_unique()
... | diff --git a/xarray/core/indexes.py b/xarray/core/indexes.py
--- a/xarray/core/indexes.py
+++ b/xarray/core/indexes.py
@@ -1092,12 +1092,13 @@ def get_unique(self) -> list[T_PandasOrXarrayIndex]:
"""Return a list of unique indexes, preserving order."""
unique_indexes: list[T_PandasOrXarrayIndex] = [... | diff --git a/xarray/tests/test_indexes.py b/xarray/tests/test_indexes.py
--- a/xarray/tests/test_indexes.py
+++ b/xarray/tests/test_indexes.py
@@ -9,6 +9,7 @@
import xarray as xr
from xarray.core.indexes import (
+ Hashable,
Index,
Indexes,
PandasIndex,
@@ -535,7 +536,7 @@ def test_copy(self) -> N... | ["xarray/tests/test_indexes.py::TestIndexes::test_get_unique[pd_index]", "xarray/tests/test_indexes.py::TestIndexes::test_group_by_index[pd_index]", "xarray/tests/test_indexes.py::TestIndexes::test_copy_indexes[pd_index]"] | ["xarray/tests/test_indexes.py::test_asarray_tuplesafe", "xarray/tests/test_indexes.py::TestIndex::test_from_variables", "xarray/tests/test_indexes.py::TestIndex::test_concat", "xarray/tests/test_indexes.py::TestIndex::test_stack", "xarray/tests/test_indexes.py::TestIndex::test_unstack", "xarray/tests/test_indexes.py::... | null | true | 2022-09-07T11:05:02Z | 1 | 22 | 3 | 613 | 0 | 0.8 | 1 | 0.7 | 1 | 0.1755 | 83.1765 | ||
3,701 | swe_bench::test::1010 | swe_bench | test | 1,010 | matplotlib__matplotlib-23198 | matplotlib/matplotlib | matplotlib/matplotlib | python | 3407cbc42f0e70595813e2b1816d432591558921 | Inconsistency in keyword-arguments ncol/ncols, nrow/nrows
I find it quite inconsistent that one sometimes has to specify `ncols` and sometimes `ncol`. For example:
```python
plt.subplots(ncols=2)
```
while
```python
axis.legend(ncol=2)
```
(Likewise for `nrows`/`nrow`) | diff --git a/lib/matplotlib/backends/qt_editor/figureoptions.py b/lib/matplotlib/backends/qt_editor/figureoptions.py
--- a/lib/matplotlib/backends/qt_editor/figureoptions.py
+++ b/lib/matplotlib/backends/qt_editor/figureoptions.py
@@ -230,12 +230,12 @@ def apply_callback(data):
# re-generate legend, if checkbo... | diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -4013,7 +4013,7 @@ def test_hist_stacked_bar():
fig, ax = plt.subplots()
ax.hist(d, bins=10, histtype='barstacked', align='mid', color=colors,
... | ["lib/matplotlib/tests/test_axes.py::test_hist_stacked_bar[png]", "lib/matplotlib/tests/test_axes.py::test_hist_stacked_bar[pdf]", "lib/matplotlib/tests/test_legend.py::test_fancy[png]", "lib/matplotlib/tests/test_legend.py::test_fancy[pdf]", "lib/matplotlib/tests/test_legend.py::test_legend_expand[png]", "lib/matplotl... | ["lib/matplotlib/tests/test_axes.py::test_get_labels", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[png]", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[pdf]", "lib/matplotlib/tests/test_axes.py::test_label_loc_horizontal[png]", "lib/matplotlib/tests/test_axes.py::test_label_loc_horizontal[... | null | true | 2022-06-03T22:30:50Z | 2 | 35 | 9 | 273 | 0 | 0.8 | 1 | 0.7 | 1 | 0.162167 | 83.1365 | ||
3,702 | swe_bench::dev::79 | swe_bench | dev | 79 | pydicom__pydicom-1076 | pydicom/pydicom | pydicom/pydicom | python | caf0db105ddf389ff5025937fd5f3aa1e61e85e7 | Error writing values with VR OF
[Related to this comment](https://github.com/pydicom/pydicom/issues/452#issuecomment-614038937) (I think)
```python
from pydicom.dataset import Dataset
ds = Dataset()
ds.is_little_endian = True
ds.is_implicit_VR = True
ds.FloatPixelData = b'\x00\x00\x00\x00'
ds.save_as('out.dcm')
```
``... | diff --git a/pydicom/filewriter.py b/pydicom/filewriter.py
--- a/pydicom/filewriter.py
+++ b/pydicom/filewriter.py
@@ -1004,7 +1004,7 @@ def dcmwrite(filename, dataset, write_like_original=True):
'LT': (write_text, None),
'OB': (write_OBvalue, None),
'OD': (write_OWvalue, None),
- 'OF': (write_numbers... | diff --git a/pydicom/tests/test_filereader.py b/pydicom/tests/test_filereader.py
--- a/pydicom/tests/test_filereader.py
+++ b/pydicom/tests/test_filereader.py
@@ -700,6 +700,20 @@ def test_lut_descriptor_singleton(self):
assert elem.value == -2816
assert elem.VR == 'SS'
+ def test_reading_of(self... | ["pydicom/tests/test_filereader.py::TestReader::test_reading_of", "pydicom/tests/test_filewriter.py::TestWriteOtherVRs::test_write_of_dataset", "pydicom/tests/test_values.py::TestConvertOValues::test_convert_of"] | ["pydicom/tests/test_filereader.py::TestReader::test_empty_numbers_tag", "pydicom/tests/test_filereader.py::TestReader::test_UTF8_filename", "pydicom/tests/test_filereader.py::TestReader::test_pathlib_path_filename", "pydicom/tests/test_filereader.py::TestReader::test_RTPlan", "pydicom/tests/test_filereader.py::TestRea... | null | true | 2020-04-17T01:12:48Z | 2 | 4 | 3 | 1,836 | 0 | 0.8 | 1 | 0.85 | 0.8 | 0.319333 | 83.133 | ||
3,703 | swe_bench::test::81 | swe_bench | test | 81 | astropy__astropy-7737 | astropy/astropy | astropy/astropy | python | 153e9447ae032d92be74e54272565f6e39c69b3c | biweight_location of a constant array returns nan
Currently the robust mean estimator `biweight_location` returns `nan` for an array with zero variance.
eg:
```
>>> astropy.stats.biweight_location(np.ones(4))
nan # Instead of expected value 1
```
This is primarily because of a 0/0 division in the code (case when the... | diff --git a/astropy/stats/biweight.py b/astropy/stats/biweight.py
--- a/astropy/stats/biweight.py
+++ b/astropy/stats/biweight.py
@@ -102,8 +102,15 @@ def biweight_location(data, c=6.0, M=None, axis=None):
# set up the weighting
mad = median_absolute_deviation(data, axis=axis)
+
+ if axis is None and ma... | diff --git a/astropy/stats/tests/test_biweight.py b/astropy/stats/tests/test_biweight.py
--- a/astropy/stats/tests/test_biweight.py
+++ b/astropy/stats/tests/test_biweight.py
@@ -20,6 +20,40 @@ def test_biweight_location():
assert abs(cbl - 0) < 1e-2
+def test_biweight_location_constant():
+ cbl = biwei... | ["astropy/stats/tests/test_biweight.py::test_biweight_location_constant", "astropy/stats/tests/test_biweight.py::test_biweight_location_constant_axis_2d", "astropy/stats/tests/test_biweight.py::test_biweight_location_constant_axis_3d", "astropy/stats/tests/test_biweight.py::test_biweight_midvariance_constant_axis", "as... | ["astropy/stats/tests/test_biweight.py::test_biweight_location", "astropy/stats/tests/test_biweight.py::test_biweight_location_small", "astropy/stats/tests/test_biweight.py::test_biweight_location_axis", "astropy/stats/tests/test_biweight.py::test_biweight_location_axis_3d", "astropy/stats/tests/test_biweight.py::test_... | null | true | 2018-08-14T18:13:03Z | 1 | 20 | 7 | 473 | 0 | 0.8 | 1 | 0.7 | 1 | 0.1455 | 83.0865 | ||
3,704 | swe_bench::dev::139 | swe_bench | dev | 139 | pylint-dev__astroid-1616 | pylint-dev/astroid | pylint-dev/astroid | python | 6280a758733434cba32b719519908314a5c2955b | Infer calls to str.format() on names
Future enhancement could infer this value instead of giving an empty string:
```python
from astroid import extract_node
call = extract_node("""
x = 'python is {}'
x.format('helpful sometimes')
""")
call.inferred()[0].value # gives ""
```
_Originally posted by @jacobtylerwalls in ... | diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py
--- a/astroid/brain/brain_builtin_inference.py
+++ b/astroid/brain/brain_builtin_inference.py
@@ -913,12 +913,15 @@ def _infer_copy_method(
def _is_str_format_call(node: nodes.Call) -> bool:
"""Catch calls to str.fo... | diff --git a/tests/unittest_brain_builtin.py b/tests/unittest_brain_builtin.py
--- a/tests/unittest_brain_builtin.py
+++ b/tests/unittest_brain_builtin.py
@@ -66,6 +66,13 @@ class TestStringNodes:
""",
id="mixed-indexes-from-mixed",
),
+ pytest.param(
+ "... | ["tests/unittest_brain_builtin.py::TestStringNodes::test_string_format[empty-indexes-on-variable]"] | ["tests/unittest_brain_builtin.py::BuiltinsTest::test_infer_property", "tests/unittest_brain_builtin.py::TestStringNodes::test_string_format[empty-indexes]", "tests/unittest_brain_builtin.py::TestStringNodes::test_string_format[numbered-indexes]", "tests/unittest_brain_builtin.py::TestStringNodes::test_string_format[na... | null | true | 2022-06-12T11:50:45Z | 1 | 22 | 1 | 385 | 0 | 0.8 | 1 | 0.7 | 1 | 0.1375 | 83.0625 | ||
3,705 | swe_bench::dev::27 | swe_bench | dev | 27 | pvlib__pvlib-python-1191 | pvlib/pvlib-python | pvlib/pvlib-python | python | 0415365031ca8d0b2867f2a2877e0ad9d7098ffc | irradiance.aoi can return NaN when module orientation is perfectly aligned with solar position
**Describe the bug**
I was playing with a dual-axis tracking mount with #1176 and found that when the modules are perfectly aligned with the sun (i.e. AOI should be exactly zero), floating point round-off can result in aoi pr... | diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py
--- a/pvlib/irradiance.py
+++ b/pvlib/irradiance.py
@@ -182,6 +182,9 @@ def aoi_projection(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth):
tools.sind(surface_tilt) * tools.sind(solar_zenith) *
tools.cosd(solar_azimuth - surface_azimut... | diff --git a/pvlib/tests/test_irradiance.py b/pvlib/tests/test_irradiance.py
--- a/pvlib/tests/test_irradiance.py
+++ b/pvlib/tests/test_irradiance.py
@@ -792,6 +792,27 @@ def test_aoi_and_aoi_projection(surface_tilt, surface_azimuth, solar_zenith,
assert_allclose(aoi_projection, aoi_proj_expected, atol=1e-6)
... | ["pvlib/tests/test_irradiance.py::test_aoi_projection_precision"] | ["pvlib/tests/test_irradiance.py::test_get_extra_radiation[asce-300-1383.636203]", "pvlib/tests/test_irradiance.py::test_get_extra_radiation[asce-300.0-1383.636203]", "pvlib/tests/test_irradiance.py::test_get_extra_radiation[asce-testval2-1383.636203]", "pvlib/tests/test_irradiance.py::test_get_extra_radiation[asce-tes... | null | true | 2021-03-10T01:05:50Z | 1 | 3 | 1 | 1,599 | 0 | 0.8 | 1 | 0.85 | 0.8 | 0.2765 | 83.0045 | ||
3,706 | swe_bench::test::1469 | swe_bench | test | 1,469 | pytest-dev__pytest-8463 | pytest-dev/pytest | pytest-dev/pytest | python | 35df3e68d57fcd62a60b2a8568b09fa3674f36a8 | resolve startpath/fspath parameter regressions
the introductin of various `startpath`/`fspath` hooks in the hookspecs
as a non-optional and non-inmplied parameter is practically a api breaking change
back in 2018 i decoded to close the upstream issue in https://github.com/pytest-dev/pluggy/issues/15 as its pretty mu... | Sorry I missed this issue.
So if I understand correctly, the issue is about *invoking* the hooks, rather than implementing them.
The hooks affected are:
- `pytest_ignore_collect`
- `pytest_collect_file`
- `pytest_pycollect_makemodule`
- `pytest_report_header`
- `pytest_report_collectionfinish`
Before we... | diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py
--- a/src/_pytest/config/__init__.py
+++ b/src/_pytest/config/__init__.py
@@ -917,8 +917,10 @@ def __init__(
:type: PytestPluginManager
"""
+ from .compat import PathAwareHookProxy
+
self.trace = self.plugin... | diff --git a/testing/deprecated_test.py b/testing/deprecated_test.py
--- a/testing/deprecated_test.py
+++ b/testing/deprecated_test.py
@@ -1,10 +1,13 @@
import re
+import sys
import warnings
from unittest import mock
import pytest
from _pytest import deprecated
+from _pytest.compat import legacy_path
from _pyte... | ["testing/deprecated_test.py::test_hookproxy_warnings_for_fspath[hook]", "testing/deprecated_test.py::test_hookproxy_warnings_for_fspath[ihook]"] | ["testing/deprecated_test.py::test_pytest_collect_module_deprecated[Collector]", "testing/deprecated_test.py::test_pytest_collect_module_deprecated[Module]", "testing/deprecated_test.py::test_pytest_collect_module_deprecated[Function]", "testing/deprecated_test.py::test_pytest_collect_module_deprecated[Instance]", "tes... | null | true | 2021-03-18T22:18:16Z | 6 | 107 | 2 | 1,689 | 0 | 0.8 | 1 | 0.7 | 0.85 | 0.638167 | 83.002 | |
3,707 | swe_bench::test::1607 | swe_bench | test | 1,607 | scikit-learn__scikit-learn-13549 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 66cc1c7342f7f0cc0dc57fb6d56053fc46c8e5f0 | Stratified subsampler utility?
I have some data `X` and `y` that I want to subsample (i.e. only keep a subset of the samples) in a stratified way.
Using something like
```py
_, X_sub, _, y_sub = train_test_split(
X, y, stratify=stratify, train_size=None, test_size=n_samples_sub)
```
is almost what I need. But th... | diff --git a/sklearn/model_selection/_split.py b/sklearn/model_selection/_split.py
--- a/sklearn/model_selection/_split.py
+++ b/sklearn/model_selection/_split.py
@@ -20,6 +20,7 @@
import numpy as np
from ..utils import indexable, check_random_state, safe_indexing
+from ..utils import _approximate_mode
from ..util... | diff --git a/sklearn/utils/tests/test_utils.py b/sklearn/utils/tests/test_utils.py
--- a/sklearn/utils/tests/test_utils.py
+++ b/sklearn/utils/tests/test_utils.py
@@ -93,6 +93,67 @@ def test_resample():
assert_equal(len(resample([1, 2], n_samples=5)), 5)
+def test_resample_stratified():
+ # Make sure resamp... | ["sklearn/utils/tests/test_utils.py::test_resample_stratified", "sklearn/utils/tests/test_utils.py::test_resample_stratified_replace", "sklearn/utils/tests/test_utils.py::test_resample_stratify_2dy", "sklearn/utils/tests/test_utils.py::test_resample_stratify_sparse_error"] | ["sklearn/utils/tests/test_utils.py::test_make_rng", "sklearn/utils/tests/test_utils.py::test_deprecated", "sklearn/utils/tests/test_utils.py::test_resample", "sklearn/utils/tests/test_utils.py::test_safe_mask", "sklearn/utils/tests/test_utils.py::test_column_or_1d", "sklearn/utils/tests/test_utils.py::test_safe_indexi... | null | true | 2019-03-31T16:22:16Z | 2 | 192 | 4 | 931 | 0 | 0.8 | 1 | 0.85 | 0.75 | 0.655167 | 82.953 | ||
3,708 | swe_bench::test::1106 | swe_bench | test | 1,106 | matplotlib__matplotlib-26089 | matplotlib/matplotlib | matplotlib/matplotlib | python | f588d2b06e5b3c3296046d2ee9f0c13831cafe1c | [ENH]: Add public method to update `Legend` object's loc property .
### Problem
* I'm working on the issue https://github.com/sympy/sympy/pull/24429. The `Legend` object's `loc` property can only be set at initialization time. There is no public method to update the `loc` property when the object has been created.
* ... | See also: https://discourse.matplotlib.org/t/legends-are-difficult-to-modify/21506
admins,Are we planning on implementing this or no?
I'm not sure why this was closed. I think if a PR came in that did this in a non invasive way it should be fine.
@jklymak @cocolato He closed it cause someone gave a thumbs down on my... | diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py
--- a/lib/matplotlib/legend.py
+++ b/lib/matplotlib/legend.py
@@ -330,6 +330,12 @@ def _update_bbox_to_anchor(self, loc_in_canvas):
_legend_kw_doc_base)
_docstring.interpd.update(_legend_kw_doc=_legend_kw_both_st)
+_legend_kw_set_loc_st = (
+ _... | diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
--- a/lib/matplotlib/tests/test_legend.py
+++ b/lib/matplotlib/tests/test_legend.py
@@ -755,6 +755,26 @@ def test_legend_alignment(alignment):
assert leg.get_alignment() == alignment
+@pytest.mark.parametrize('loc', ('center... | ["lib/matplotlib/tests/test_legend.py::test_ax_legend_set_loc[center]", "lib/matplotlib/tests/test_legend.py::test_ax_legend_set_loc[best]", "lib/matplotlib/tests/test_legend.py::test_fig_legend_set_loc[outside", "lib/matplotlib/tests/test_legend.py::test_fig_legend_set_loc[right]"] | ["lib/matplotlib/tests/test_legend.py::test_legend_ordereddict", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[pdf]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[pdf]", "li... | null | true | 2023-06-08T02:56:42Z | 1 | 130 | 4 | 2,495 | 0 | 0.8 | 1 | 0.55 | 1 | 0.849167 | 82.9225 | |
3,709 | swe_bench::test::1795 | swe_bench | test | 1,795 | sphinx-doc__sphinx-7923 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 533b4ac7d6f2a1a20f08c3a595a2580a9742d944 | Bad refs in pot files, when using rst_epilog
**To Reproduce**
conf.py
```python
rst_epilog = """
.. |var1| replace:: VAR1
"""
```
index.rst
```
A
======
a
b
```
`make gettext` produces index.pot with bad string numbers and "\<generated\>" refs:
```
#: ../../index.rst:2
msgid "A"
msgstr ""
#: ../../<generated>:1
m... | diff --git a/sphinx/util/rst.py b/sphinx/util/rst.py
--- a/sphinx/util/rst.py
+++ b/sphinx/util/rst.py
@@ -103,6 +103,11 @@ def prepend_prolog(content: StringList, prolog: str) -> None:
def append_epilog(content: StringList, epilog: str) -> None:
"""Append a string to content body as epilog."""
if epilog:
- ... | diff --git a/tests/test_parser.py b/tests/test_parser.py
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -50,7 +50,7 @@ def test_RSTParser_prolog_epilog(RSTStateMachine, app):
(content, _), _ = RSTStateMachine().run.call_args
assert list(content.xitems()) == [('dummy.rst', 0, 'hello Sphinx world'),
... | ["tests/test_parser.py::test_RSTParser_prolog_epilog", "tests/test_util_rst.py::test_append_epilog"] | ["tests/test_util_rst.py::test_escape", "tests/test_util_rst.py::test_prepend_prolog", "tests/test_util_rst.py::test_prepend_prolog_with_CR", "tests/test_util_rst.py::test_prepend_prolog_without_CR", "tests/test_util_rst.py::test_textwidth", "tests/test_util_rst.py::test_heading"] | null | true | 2020-07-06T16:23:19Z | 1 | 7 | 2 | 384 | 0 | 0.8 | 1 | 0.7 | 1 | 0.087333 | 82.912 | ||
3,710 | swe_bench::test::1905 | swe_bench | test | 1,905 | sphinx-doc__sphinx-9987 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 5adc109b72ce42f6938191c7ad027a4913eaba1d | Using position-only parameter syntax in `__init__` prevents docstrings for attributes from being parsed
### Describe the bug
I'm currently using [position-only parameters](https://www.python.org/dev/peps/pep-0570/) in most of my functions, including `__init__`, however this prevents inline, before, and after doc strin... | diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py
--- a/sphinx/pycode/parser.py
+++ b/sphinx/pycode/parser.py
@@ -312,6 +312,10 @@ def get_self(self) -> Optional[ast.arg]:
"""Returns the name of the first argument if in a function."""
if self.current_function and self.current_function.arg... | diff --git a/tests/test_pycode.py b/tests/test_pycode.py
--- a/tests/test_pycode.py
+++ b/tests/test_pycode.py
@@ -191,3 +191,18 @@ def test_ModuleAnalyzer_find_attr_docs():
'Qux': 15,
'Qux.attr1': 16,
'Qux.attr2': 17}... | ["tests/test_pycode.py::test_ModuleAnalyzer_find_attr_docs_for_posonlyargs_method"] | ["tests/test_pycode.py::test_ModuleAnalyzer_get_module_source", "tests/test_pycode.py::test_ModuleAnalyzer_for_string", "tests/test_pycode.py::test_ModuleAnalyzer_for_file", "tests/test_pycode.py::test_ModuleAnalyzer_for_module", "tests/test_pycode.py::test_ModuleAnalyzer_for_file_in_egg", "tests/test_pycode.py::test_M... | null | true | 2021-12-18T06:25:48Z | 1 | 4 | 1 | 1,193 | 0 | 0.8 | 1 | 0.85 | 0.8 | 0.212167 | 82.8115 | ||
3,711 | swe_bench::test::1595 | swe_bench | test | 1,595 | scikit-learn__scikit-learn-13368 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | afd432137fd840adc182f0bad87f405cb80efac7 | cross_val_predict returns bad prediction when evaluated on a dataset with very few samples
#### Description
`cross_val_predict` returns bad prediction when evaluated on a dataset with very few samples on 1 class, causing class being ignored on some CV splits.
#### Steps/Code to Reproduce
```python
from sklearn.dataset... | diff --git a/sklearn/model_selection/_validation.py b/sklearn/model_selection/_validation.py
--- a/sklearn/model_selection/_validation.py
+++ b/sklearn/model_selection/_validation.py
@@ -876,10 +876,11 @@ def _fit_and_predict(estimator, X, y, train, test, verbose, fit_params,
float_min = np.finfo(predictio... | diff --git a/sklearn/model_selection/tests/test_validation.py b/sklearn/model_selection/tests/test_validation.py
--- a/sklearn/model_selection/tests/test_validation.py
+++ b/sklearn/model_selection/tests/test_validation.py
@@ -975,6 +975,26 @@ def test_cross_val_predict_pandas():
cross_val_predict(clf, X_df, y... | ["sklearn/model_selection/tests/test_validation.py::test_cross_val_predict_unbalanced"] | ["sklearn/model_selection/tests/test_validation.py::test_cross_val_score", "sklearn/model_selection/tests/test_validation.py::test_cross_validate_many_jobs", "sklearn/model_selection/tests/test_validation.py::test_cross_validate_invalid_scoring_param", "sklearn/model_selection/tests/test_validation.py::test_cross_valid... | null | true | 2019-03-01T17:46:46Z | 1 | 5 | 1 | 1,155 | 0 | 0.8 | 1 | 0.85 | 0.8 | 0.209167 | 82.8025 | ||
3,712 | swe_bench::test::1846 | swe_bench | test | 1,846 | sphinx-doc__sphinx-8679 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | b372a99c0158f5799338a9a1b8611626ff1d114f | reference pointing at a "rubric" directive containing a ``quoted`` part breaks
**Describe the bug**
The reference text is broken when trying to display a reference pointing at a "rubric" directive containing a part that is ``quoted``. However, a title with a quoted text is rightfully displayed by a reference
```
.. _r... | diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py
--- a/sphinx/domains/std.py
+++ b/sphinx/domains/std.py
@@ -745,9 +745,11 @@ def process_doc(self, env: "BuildEnvironment", docname: str, document: nodes.doc
name, env.doc2path(self.labels[name][0]),
... | diff --git a/tests/test_domain_std.py b/tests/test_domain_std.py
--- a/tests/test_domain_std.py
+++ b/tests/test_domain_std.py
@@ -412,3 +412,13 @@ def test_disabled_docref(app):
assert_node(doctree, ([nodes.paragraph, ([pending_xref, nodes.inline, "index"],
"\n",
... | ["tests/test_domain_std.py::test_labeled_rubric"] | ["tests/test_domain_std.py::test_process_doc_handle_figure_caption", "tests/test_domain_std.py::test_process_doc_handle_table_title", "tests/test_domain_std.py::test_get_full_qualified_name", "tests/test_domain_std.py::test_cmd_option_with_optional_value", "tests/test_domain_std.py::test_cmd_option_starting_with_bracke... | null | true | 2021-01-11T13:59:02Z | 1 | 4 | 1 | 1,158 | 0 | 0.8 | 1 | 0.85 | 0.8 | 0.206333 | 82.794 | ||
3,713 | swe_smith::train::24417 | swe_smith | train | 24,417 | sunpy__sunpy.f8edfd5c.lm_rewrite__1p8i6t3j | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | ### Issue: Unexpected Behavior in `get_rectangle_coordinates` Function
#### Description
The `get_rectangle_coordinates` function is currently exhibiting unexpected behavior when handling certain input combinations. Specifically, the function does not handle cases where incomplete or conflicting parameters are provide... | diff --git a/sunpy/coordinates/utils.py b/sunpy/coordinates/utils.py
index 6f868af..9d0fb57 100644
--- a/sunpy/coordinates/utils.py
+++ b/sunpy/coordinates/utils.py
@@ -267,8 +267,8 @@ class GreatArc:
@u.quantity_input
-def get_rectangle_coordinates(bottom_left, *, top_right=None,
- wi... | ["sunpy/coordinates/tests/test_utils.py::test_rectangle_incomplete_input", "sunpy/coordinates/tests/test_utils.py::test_rectangle_invalid_input", "sunpy/coordinates/tests/test_utils.py::test_rectangle_all_parameters_passed"] | ["sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start0-end0]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start1-end1]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start2-end2]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start3-end... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 122 | 3 | 2,481 | 0 | 0.6 | 1 | 0.75 | 1 | 0.820167 | 82.7355 | |||
3,714 | swe_smith::train::921 | swe_smith | train | 921 | oauthlib__oauthlib.1fd52536.lm_rewrite__vao90bqi | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | # OAuth2 Authorization Code Grant fails to validate duplicate parameters
## Description
When using the OAuth2 Authorization Code Grant, the code no longer checks for duplicate parameters in the request. This can lead to security issues and non-compliance with the OAuth2 specification.
## Steps to Reproduce
1. Creat... | diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
index 09dc619..6835266 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
@@ -331,106 +331,75 @@ class Au... | ["tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_default_uri_in_token", "tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_invalid_redirect_uri", "tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_redire... | ["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 | 127 | 59 | 2,375 | 0 | 0.6 | 1 | 0.75 | 1 | 0.819167 | 82.7325 | |||
3,715 | swe_bench::test::1416 | swe_bench | test | 1,416 | pytest-dev__pytest-5980 | pytest-dev/pytest | pytest-dev/pytest | python | 0225cb37c02b6760c8b1d0efcf3728f669bbfe17 | Provide an alternative to --result-log
After discussion in https://github.com/pytest-dev/pytest/pull/4447#issuecomment-441132410, @RonnyPfannschmidt mentions he would like to provide a replacement to `--result-log` in the core before removing it (#3081).
This potentially is an easy contribution given that we have the ... | @nicoddemus i would simply put in json serialized report objects for the collect and test reports as a starting point, and start the file with a version specifying object
the subunit protocol might be sensible to take a look at, version 1 of the protocol was text based and seemed limited - version 2 is binary, frame... | diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py
--- a/src/_pytest/config/__init__.py
+++ b/src/_pytest/config/__init__.py
@@ -154,6 +154,7 @@ def directory_arg(path, optname):
"assertion",
"junitxml",
"resultlog",
+ "report_log",
"doctest",
"cacheprovider",
... | diff --git a/testing/test_report_log.py b/testing/test_report_log.py
new file mode 100644
--- /dev/null
+++ b/testing/test_report_log.py
@@ -0,0 +1,54 @@
+import json
+
+import pytest
+from _pytest.reports import BaseReport
+
+
+def test_basics(testdir, tmp_path, pytestconfig):
+ """Basic testing of the report log f... | ["testing/test_report_log.py::test_basics", "testing/test_reports.py::TestHooks::test_test_report", "testing/test_reports.py::TestHooks::test_collect_report", "testing/test_reports.py::TestHooks::test_invalid_report_types[pytest_runtest_logreport]", "testing/test_reports.py::TestHooks::test_invalid_report_types[pytest_... | ["testing/test_reports.py::TestReportSerialization::test_xdist_longrepr_to_str_issue_241", "testing/test_reports.py::TestReportSerialization::test_xdist_report_longrepr_reprcrash_130", "testing/test_reports.py::TestReportSerialization::test_reprentries_serialization_170", "testing/test_reports.py::TestReportSerializati... | null | true | 2019-10-16T22:35:00Z | 4 | 103 | 5 | 1,163 | 0 | 0.8 | 1 | 0.7 | 0.85 | 0.537167 | 82.699 | |
3,716 | swe_smith::train::34459 | swe_smith | train | 34,459 | iterative__dvc.1d6ea681.pr_8938 | swesmith/iterative__dvc.1d6ea681 | iterative/dvc | python | null | # Exception handling in DVC repo index causes unexpected errors
### Bug report
After recent changes to the codebase, I'm encountering unexpected errors when working with DVC repositories. The issue appears to be related to how exceptions are handled in the repo index module.
**Problem description**
When working wit... | diff --git a/dvc/repo/index.py b/dvc/repo/index.py
index ea87208..5c7bc0d 100644
--- a/dvc/repo/index.py
+++ b/dvc/repo/index.py
@@ -88,11 +88,13 @@ def collect_files(
file_path = fs.join(root, file)
try:
index = Index.from_file(repo, file_path)
- except DvcExceptio... | ["tests/unit/repo/experiments/test_executor_status.py::test_celery_queue_success_status", "tests/unit/repo/experiments/test_executor_status.py::test_workspace_executor_success_status[workspace_queue]", "tests/unit/repo/experiments/test_executor_status.py::test_workspace_executor_success_status[tempdir_queue]", "tests/u... | ["tests/func/test_repo.py::test_open_bare", "tests/func/test_repo.py::test_destroy", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown_no_tasks", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown_with_kill", "tests/unit/rep... | jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681 | true | null | 1 | 143 | 8 | 1,950 | 0 | 0.6 | 1 | 0.75 | 1 | 0.801667 | 82.68 | |||
3,717 | swe_bench::test::1596 | swe_bench | test | 1,596 | scikit-learn__scikit-learn-13392 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 21fc1d97452d4e3a6d744d0eef95ecaf7e87859c | Missing multi-output checks in common tests
#### Description
Some classifiers and regressors support multi-output, however we do not have a common test for that. We should add it. See discussion in #11458.
We should also remember to remove redundant individual tests introduced by 95993a4b2b7d067d8d7fff91ccb2463dbd427e... | Thanks for raising this issue!
It might be worth waiting for https://github.com/scikit-learn/scikit-learn/pull/8022 to be merged (probably next week) before adding these tests. | diff --git a/examples/model_selection/plot_roc.py b/examples/model_selection/plot_roc.py
--- a/examples/model_selection/plot_roc.py
+++ b/examples/model_selection/plot_roc.py
@@ -150,7 +150,7 @@
# Area under ROC for the multiclass problem
# .........................................
# The :func:`sklearn.metrics.roc_a... | diff --git a/sklearn/ensemble/tests/test_forest.py b/sklearn/ensemble/tests/test_forest.py
--- a/sklearn/ensemble/tests/test_forest.py
+++ b/sklearn/ensemble/tests/test_forest.py
@@ -1294,27 +1294,6 @@ def test_backend_respected():
assert ba.count == 0
-@pytest.mark.parametrize('name', FOREST_CLASSIFIERS)
-@py... | ["sklearn/utils/tests/test_estimator_checks.py::test_check_estimator"] | ["sklearn/ensemble/tests/test_forest.py::test_classification_toy[ExtraTreesClassifier]", "sklearn/ensemble/tests/test_forest.py::test_classification_toy[RandomForestClassifier]", "sklearn/ensemble/tests/test_forest.py::test_iris[gini-ExtraTreesClassifier]", "sklearn/ensemble/tests/test_forest.py::test_iris[gini-RandomF... | null | true | 2019-03-05T15:33:46Z | 6 | 115 | 1 | 848 | 0 | 0.8 | 1 | 0.7 | 0.85 | 0.524667 | 82.6615 | |
3,718 | swe_smith::train::44537 | swe_smith | train | 44,537 | pydata__patsy.a5d16484.lm_rewrite__swqvjtyc | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | ### Issue: Unexpected Behavior in Cubic Splines Knot Calculation
**Description**
It seems there's an issue with the `_get_all_sorted_knots` function in the `mgcv_cubic_splines.py` module. When attempting to calculate knots with certain parameters, the function raises unexpected `ValueError` exceptions. This behavior ... | diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py
index 5f93680..e14a8ed 100644
--- a/patsy/mgcv_cubic_splines.py
+++ b/patsy/mgcv_cubic_splines.py
@@ -394,9 +394,8 @@ def _get_te_dmatrix(design_matrices, constraints=None):
# Stateful Transforms
-def _get_all_sorted_knots(
- x, n_inner_knot... | ["patsy/mgcv_cubic_splines.py::test__get_all_sorted_knots", "patsy/mgcv_cubic_splines.py::test_crs_compat", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths"] | ["patsy/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 | 147 | 5 | 1,769 | 0 | 0.6 | 1 | 0.75 | 1 | 0.784833 | 82.6295 | |||
3,719 | swe_bench::test::1866 | swe_bench | test | 1,866 | sphinx-doc__sphinx-9180 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | f47bf1471d10d4ac938066bc84df879f1060ba7f | Special member is not documented with automodule
**Describe the bug**
If I have a module which has a special attribute (starting with a double underscore) it will not be documented by automodule even if it's specified in :special-members:. According to my research it's because it's not identified as an attribute.
If a... | diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py
--- a/sphinx/ext/autodoc/__init__.py
+++ b/sphinx/ext/autodoc/__init__.py
@@ -709,6 +709,8 @@ def is_filtered_inherited_member(name: str, obj: Any) -> bool:
# if isattr is True, the member is documented as an attribute
... | diff --git a/tests/roots/test-ext-autodoc/target/module.py b/tests/roots/test-ext-autodoc/target/module.py
new file mode 100644
--- /dev/null
+++ b/tests/roots/test-ext-autodoc/target/module.py
@@ -0,0 +1,14 @@
+undocumented = 1
+
+#: docstring
+documented = 1
+
+undoc_annotated: int
+
+#: docstring
+annotated: int
+
+... | ["tests/test_ext_autodoc_automodule.py::test_automodule_special_members"] | ["tests/test_ext_autodoc_automodule.py::test_empty_all", "tests/test_ext_autodoc_automodule.py::test_automodule", "tests/test_ext_autodoc_automodule.py::test_automodule_undoc_members", "tests/test_ext_autodoc_automodule.py::test_subclass_of_mocked_object"] | null | true | 2021-05-08T08:36:06Z | 1 | 3 | 1 | 816 | 0 | 0.8 | 1 | 0.85 | 0.8 | 0.146 | 82.613 | ||
3,720 | swe_smith::train::845 | swe_smith | train | 845 | oauthlib__oauthlib.1fd52536.lm_rewrite__13gudrrm | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | # OAuth1 Access Token Endpoint raises InvalidClientError instead of returning 401 status code
## Description
I've found an issue with the OAuth1 Access Token Endpoint. When validation fails for various checks (client key, request token, verifier, signature), the endpoint raises `InvalidClientError` instead of returni... | diff --git a/oauthlib/oauth1/rfc5849/endpoints/access_token.py b/oauthlib/oauth1/rfc5849/endpoints/access_token.py
index 13665db..60a8afe 100644
--- a/oauthlib/oauth1/rfc5849/endpoints/access_token.py
+++ b/oauthlib/oauth1/rfc5849/endpoints/access_token.py
@@ -126,90 +126,42 @@ class AccessTokenEndpoint(BaseEndpoint):
... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_validate_client_key", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_validate_request_token", "te... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointTest::test_create_authorization_respo... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 108 | 5 | 2,492 | 0 | 0.6 | 1 | 0.75 | 1 | 0.775333 | 82.601 | |||
3,721 | swe_bench::test::1333 | swe_bench | test | 1,333 | pylint-dev__pylint-5201 | pylint-dev/pylint | pylint-dev/pylint | python | 772b3dcc0b0770a843653783e5c93b4256e5ec6f | ignore-paths: normalize path to PosixPath
### Current problem
In a project of mine, there is an entire directory, "dummy", that I want to exclude running pylint in. I've added the directory name to the "ignore" option and it works great when used from the command line.
```toml
# Files or directories to be skipped. T... | Thank you for opening the issue, this seems like a sensible thing to do. | diff --git a/pylint/config/option.py b/pylint/config/option.py
--- a/pylint/config/option.py
+++ b/pylint/config/option.py
@@ -3,7 +3,9 @@
import copy
import optparse # pylint: disable=deprecated-module
+import pathlib
import re
+from typing import List, Pattern
from pylint import utils
@@ -25,6 +27,19 @@ de... | diff --git a/tests/lint/unittest_expand_modules.py b/tests/lint/unittest_expand_modules.py
--- a/tests/lint/unittest_expand_modules.py
+++ b/tests/lint/unittest_expand_modules.py
@@ -4,10 +4,14 @@
import re
from pathlib import Path
+from typing import Dict, Tuple, Type
import pytest
+from pylint.checkers impor... | ["tests/lint/unittest_expand_modules.py::TestExpandModules::test_expand_modules[files_or_modules0-expected0]", "tests/lint/unittest_expand_modules.py::TestExpandModules::test_expand_modules[files_or_modules1-expected1]", "tests/lint/unittest_expand_modules.py::TestExpandModules::test_expand_modules_with_ignore[files_or... | ["tests/lint/unittest_expand_modules.py::test__is_in_ignore_list_re_match", "tests/unittest_config.py::test__regexp_validator_valid", "tests/unittest_config.py::test__regexp_validator_invalid", "tests/unittest_config.py::test__csv_validator_no_spaces", "tests/unittest_config.py::test__csv_validator_spaces", "tests/unit... | null | true | 2021-10-23T10:09:51Z | 4 | 61 | 6 | 1,803 | 0 | 0.8 | 1 | 0.7 | 0.85 | 0.503833 | 82.599 | |
3,722 | swe_bench::test::1047 | swe_bench | test | 1,047 | matplotlib__matplotlib-24604 | matplotlib/matplotlib | matplotlib/matplotlib | python | 3393a4f22350e5df7aa8d3c7904e26e81428d2cd | [ENH]: gridspec_mosaic
### Problem
Trying to combine subplot_mosaic with axes using various different projections (e.g. one rectilinear axes and one polar axes and one 3d axes) has been requested a few times (once in the original subplot_mosaic thread IIRC, and in #20392 too), and it's something I would recently have ... | I like this better than the current create/remove/replace scheme, but just to be clear- using this method means folks would have to go in manually and create a subplot for each spec, right? So this feature is just providing the ability to layout and identify axes in the same way as subplot_mosaic?
We could do this, b... | diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py
--- a/lib/matplotlib/figure.py
+++ b/lib/matplotlib/figure.py
@@ -1759,6 +1759,25 @@ def get_tightbbox(self, renderer=None, bbox_extra_artists=None):
return _bbox
+ @staticmethod
+ def _norm_per_subplot_kw(per_subplot_kw):
+ expa... | diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
--- a/lib/matplotlib/tests/test_figure.py
+++ b/lib/matplotlib/tests/test_figure.py
@@ -848,7 +848,12 @@ def test_animated_with_canvas_change(fig_test, fig_ref):
class TestSubplotMosaic:
@check_figures_equal(extensions=["png"])... | ["lib/matplotlib/tests/test_figure.py::TestSubplotMosaic::test_per_subplot_kw[BC-png]", "lib/matplotlib/tests/test_figure.py::TestSubplotMosaic::test_per_subplot_kw[multi_value1-png]", "lib/matplotlib/tests/test_figure.py::TestSubplotMosaic::test_per_subplot_kw_expander", "lib/matplotlib/tests/test_figure.py::TestSubpl... | ["lib/matplotlib/tests/test_figure.py::test_align_labels[png]", "lib/matplotlib/tests/test_figure.py::test_align_labels_stray_axes", "lib/matplotlib/tests/test_figure.py::test_figure_label", "lib/matplotlib/tests/test_figure.py::test_fignum_exists", "lib/matplotlib/tests/test_figure.py::test_clf_keyword", "lib/matplotl... | null | true | 2022-12-03T20:20:12Z | 3 | 147 | 4 | 1,472 | 0 | 0.8 | 1 | 0.55 | 1 | 0.735333 | 82.581 | |
3,723 | swe_smith::train::864 | swe_smith | train | 864 | oauthlib__oauthlib.1fd52536.lm_rewrite__90y8ho2d | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | Authorization code grant type fails when using 'openid' grant type or missing parameters
## Problem
When using the OAuth2 authorization code flow with 'openid' as the grant type, the token endpoint fails to process the request. Additionally, there are issues with parameter validation in the authorization code grant fl... | diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
index 09dc619..df4c149 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
@@ -436,111 +436,60 @@ class Au... | ["tests/oauth2/rfc6749/endpoints/test_base_endpoint.py::BaseEndpointTest::test_error_catching", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_web", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_client_id_authentica... | ["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 | 139 | 88 | 1,810 | 0 | 0.6 | 1 | 0.75 | 1 | 0.765 | 82.57 | |||
3,724 | swe_smith::train::27812 | swe_smith | train | 27,812 | arrow-py__arrow.1d70d009.lm_rewrite__jzx0lz0o | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | ### Issue with DateTime Parsing in Arrow
**Describe the bug**
It seems that recent changes have introduced some issues with the `DateTimeParser` in the Arrow library. Specifically, there are problems with parsing certain date and time formats, which result in unexpected errors or incorrect datetime objects.
**To Rep... | diff --git a/arrow/parser.py b/arrow/parser.py
index 3929788..1495e42 100644
--- a/arrow/parser.py
+++ b/arrow/parser.py
@@ -590,12 +590,7 @@ class DateTimeParser:
) -> None:
... # pragma: no cover
- def _parse_token(
- self,
- token: Any,
- value: Any,
- parts: _Parts,
-... | ["tests/test_parser.py::TestDateTimeParser::test_parse_token_invalid_meridians", "tests/test_parser.py::TestDateTimeParserParse::test_parse_subsecond_rounding", "tests/test_parser.py::TestDateTimeParserParse::test_parse_subsecond_rounding_overflow", "tests/test_parser.py::TestDateTimeParserParse::test_parse_ddd_and_ddd... | ["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 | 110 | 19 | 2,378 | 0 | 0.6 | 1 | 0.75 | 1 | 0.763 | 82.564 | |||
3,725 | swe_smith::train::27624 | swe_smith | train | 27,624 | arrow-py__arrow.1d70d009.func_basic__tc1nwnyc | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | Arrow.get() ignores timezone arguments and returns incorrect timezones
#### Description
When using `arrow.get()` with timezone arguments, the timezone information is being ignored or incorrectly handled. This affects multiple use cases including passing timezone as a kwarg, passing timezone as a second argument with ... | diff --git a/arrow/factory.py b/arrow/factory.py
index 53eb8d1..3ec2364 100644
--- a/arrow/factory.py
+++ b/arrow/factory.py
@@ -89,130 +89,24 @@ class ArrowFactory:
... # pragma: no cover
def get(self, *args: Any, **kwargs: Any) -> Arrow:
- """Returns an :class:`Arrow <arrow.arrow.Arrow>` objec... | ["tests/test_factory.py::TestGet::test_one_arg_none", "tests/test_factory.py::TestGet::test_one_arg_timestamp_with_tzinfo", "tests/test_factory.py::TestGet::test_kwarg_tzinfo", "tests/test_factory.py::TestGet::test_kwarg_tzinfo_string", "tests/test_factory.py::TestGet::test_one_arg_datetime_tzinfo_kwarg", "tests/test_f... | ["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 | 148 | 16 | 1,618 | 0 | 0.6 | 1 | 0.75 | 1 | 0.763 | 82.564 | |||
3,726 | swe_smith::train::6855 | swe_smith | train | 6,855 | joke2k__faker.8b401a7d.lm_rewrite__ffzzja9v | swesmith/joke2k__faker.8b401a7d | joke2k/faker | python | null | Decimal Generation Issue with pydecimal Method
Description
I've encountered an issue with the `pydecimal` method in the Faker library after a recent update. The method seems to be generating unexpected results under certain conditions, particularly when dealing with large numbers or specific constraints.
Here's a br... | diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 28b4356..7047d67 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -281,83 +281,36 @@ class Provider(BaseProvider):
max_value = (10**length) - 1
return self.pyin... | ["tests/providers/test_python.py::TestPydecimal::test_min_value_10_pow_1000_return_greater_number", "tests/providers/test_python.py::TestPydecimal::test_min_value_and_max_value_have_different_signs_return_evenly_distributed_values", "tests/providers/test_python.py::TestPydecimal::test_min_value_and_max_value_negative_r... | ["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 | 103 | 7 | 2,503 | 0 | 0.6 | 1 | 0.75 | 1 | 0.7605 | 82.5565 | |||
3,727 | swe_smith::train::39613 | swe_smith | train | 39,613 | pallets__jinja.ada0a9a6.lm_rewrite__qej2fkbn | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | ### Issue: Template Compilation Logging and Path Handling
#### Description
After the recent changes, there seems to be an issue with the template compilation process in the Jinja2 environment. The logging of compiled templates and handling of paths using `pathlib` are not functioning as expected.
#### Steps to Repro... | diff --git a/src/jinja2/environment.py b/src/jinja2/environment.py
index 0b303d5..3282b54 100644
--- a/src/jinja2/environment.py
+++ b/src/jinja2/environment.py
@@ -814,15 +814,11 @@ class Environment:
template = self.from_string(nodes.Template(body, lineno=1))
return TemplateExpression(template, unde... | ["tests/test_loader.py::TestModuleLoader::test_log", "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_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 | 112 | 9 | 2,312 | 0 | 0.6 | 1 | 0.75 | 1 | 0.758667 | 82.551 | |||
3,728 | swe_smith::train::18506 | swe_smith | train | 18,506 | HIPS__autograd.ac044f0d.lm_rewrite__2l1df76i | swesmith/HIPS__autograd.ac044f0d | hips/autograd | python | null | ### Bug report
**Bug summary**
It seems there is an issue with the singular value decomposition (SVD) functionality when handling matrices of various shapes and dimensions. The problem arises when attempting to compute the SVD for tall, wide, and square matrices, both in 2D and 3D, and with complex numbers.
**Code f... | diff --git a/autograd/numpy/linalg.py b/autograd/numpy/linalg.py
index b400a55..62e4e5d 100644
--- a/autograd/numpy/linalg.py
+++ b/autograd/numpy/linalg.py
@@ -269,70 +269,76 @@ defvjp(cholesky, grad_cholesky)
# https://j-towns.github.io/papers/svd-derivative.pdf
# https://arxiv.org/abs/1909.02659
def grad_svd(usv_... | ["tests/test_linalg.py::test_svd_wide_2d", "tests/test_linalg.py::test_svd_wide_2d_complex", "tests/test_linalg.py::test_svd_wide_3d", "tests/test_linalg.py::test_svd_wide_3d_complex", "tests/test_linalg.py::test_svd_square_2d", "tests/test_linalg.py::test_svd_square_2d_complex", "tests/test_linalg.py::test_svd_square_... | ["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_... | jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d | true | null | 1 | 130 | 16 | 1,800 | 0 | 0.6 | 1 | 0.75 | 1 | 0.733333 | 82.475 | |||
3,729 | swe_smith::train::14567 | swe_smith | train | 14,567 | hukkin__tomli.443a0c1b.pr_238 | swesmith/hukkin__tomli.443a0c1b | hukkin/tomli | python | null | # TOMLDecodeError doesn't provide error location information
## Description
The TOMLDecodeError class doesn't include information about the location of errors in TOML documents. When parsing invalid TOML files, the error messages don't show line and column numbers, making it difficult to locate and fix issues.
## St... | diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py
index 16c76cd..807f145 100644
--- a/src/tomli/_parser.py
+++ b/src/tomli/_parser.py
@@ -8,7 +8,6 @@ from collections.abc import Iterable
import string
from types import MappingProxyType
from typing import IO, Any, NamedTuple
-import warnings
from ._re impor... | ["tests/test_error.py::TestError::test_deprecated_tomldecodeerror", "tests/test_error.py::TestError::test_tomldecodeerror"] | ["tests/test_data.py::TestData::test_invalid", "tests/test_data.py::TestData::test_valid", "tests/test_error.py::TestError::test_invalid_char_quotes", "tests/test_error.py::TestError::test_invalid_parse_float", "tests/test_error.py::TestError::test_line_and_col", "tests/test_error.py::TestError::test_missing_value", "t... | jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b | true | null | 1 | 149 | 2 | 1,405 | 0 | 0.6 | 1 | 0.75 | 1 | 0.730833 | 82.4675 | |||
3,730 | swe_smith::train::2386 | swe_smith | train | 2,386 | pdfminer__pdfminer.six.1a8bd2f7.func_pm_class_rm_funcs__j01xx7v7 | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | PSBaseParser missing critical parsing methods after refactoring
#### Description
After a recent change, several core parsing methods in PSBaseParser have been removed, causing widespread failures when processing PDF files. The parser is missing essential methods like `nextline()`, `_parse_main()`, `_parse_float()`, a... | diff --git a/pdfminer/psparser.py b/pdfminer/psparser.py
index b486956..0cd4e9e 100755
--- a/pdfminer/psparser.py
+++ b/pdfminer/psparser.py
@@ -215,105 +215,6 @@ class PSBaseParser:
raise PSEOF("Unexpected EOF")
self.charpos = 0
- def nextline(self) -> Tuple[int, bytes]:
- """Fetches ... | ["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 | 140 | 78 | 1,529 | 0 | 0.6 | 1 | 0.75 | 1 | 0.7215 | 82.4395 | |||
3,731 | swe_smith::train::26524 | swe_smith | train | 26,524 | pylint-dev__astroid.b114f6b5.lm_rewrite__2y9zrs62 | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | ### Issue with `are_exclusive` Function in Handling Walrus Operator and Try-Except Blocks
#### Description
It seems there's an issue with the `are_exclusive` function when dealing with certain Python constructs, specifically the walrus operator and try-except blocks. The function is expected to determine if two state... | diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py
index fde3239..d26423b 100644
--- a/astroid/nodes/node_classes.py
+++ b/astroid/nodes/node_classes.py
@@ -119,7 +119,7 @@ def unpack_infer(stmt, context: InferenceContext | None = None):
return {"node": stmt, "context": context}
-def ar... | ["tests/test_utils.py::InferenceUtil::test_not_exclusive_walrus_multiple", "tests/test_utils.py::InferenceUtil::test_not_exclusive_walrus_operator", "tests/test_utils.py::InferenceUtil::test_not_exclusive_walrus_operator_nested", "tests/test_utils.py::InferenceUtil::test_try_except"] | ["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 | 143 | 4 | 1,465 | 0 | 0.6 | 1 | 0.75 | 1 | 0.720833 | 82.4375 | |||
3,732 | swe_smith::train::34326 | swe_smith | train | 34,326 | iterative__dvc.1d6ea681.lm_rewrite__i06kx2wq | swesmith/iterative__dvc.1d6ea681 | iterative/dvc | python | null | # Missing components in Repo initialization
## Description
The `__init__` method in the `Repo` class has been significantly refactored, but several critical components are missing from the initialization process. The current implementation only initializes a subset of the required components, which causes issues when... | diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py
index 2b89626..0e6b469 100644
--- a/dvc/repo/__init__.py
+++ b/dvc/repo/__init__.py
@@ -131,108 +131,62 @@ class Repo:
assert root_dir
return root_dir, dvc_dir
- def __init__( # noqa: PLR0915, PLR0913
- self,
- root_dir: Opti... | ["tests/unit/repo/test_open_repo.py::test_subrepo_is_constructed_properly[False]", "tests/unit/repo/test_open_repo.py::test_subrepo_is_constructed_properly[True]", "tests/unit/repo/test_repo.py::test_branch_config", "tests/unit/repo/test_repo.py::test_dynamic_cache_initialization"] | ["tests/unit/repo/experiments/test_executor_status.py::test_executor_status_compatibility", "tests/unit/repo/experiments/test_utils.py::test_run_check_ref_format[name-True]", "tests/unit/repo/experiments/test_utils.py::test_run_check_ref_format[group/name-False]", "tests/unit/repo/experiments/test_utils.py::test_run_ch... | jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681 | true | null | 1 | 130 | 4 | 1,713 | 0 | 0.6 | 1 | 0.75 | 1 | 0.718833 | 82.4315 | |||
3,733 | swe_smith::train::2776 | swe_smith | train | 2,776 | cknd__stackprinter.219fcc52.lm_rewrite__h88769hx | swesmith/cknd__stackprinter.219fcc52 | cknd/stackprinter | python | null | # Broken exception formatting with chained exceptions and None values
## Describe the bug
After recent changes to the `format_exc_info` function, exception formatting is broken in several ways:
1. Chained exceptions are no longer properly formatted
2. When passing `None` values to the formatter, it crashes with TypeE... | diff --git a/stackprinter/formatting.py b/stackprinter/formatting.py
index 25f5fd8..b7539de 100644
--- a/stackprinter/formatting.py
+++ b/stackprinter/formatting.py
@@ -112,114 +112,43 @@ def format_stack_from_frame(fr, add_summary=False, **kwargs):
return format_stack(stack, **kwargs)
-def format_exc_info(ety... | ["tests/test_formatting.py::test_exception_formatting", "tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting"] | ["tests/test_formatting.py::test_frame_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"] | jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52 | true | null | 1 | 135 | 3 | 1,608 | 0 | 0.6 | 1 | 0.75 | 1 | 0.718 | 82.429 | |||
3,734 | swe_smith::train::27813 | swe_smith | train | 27,813 | arrow-py__arrow.1d70d009.lm_rewrite__kfjmv6sb | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | ### Issue: DateTime Parsing Fails with Certain Formats
#### Describe the Bug
After a recent update, I've encountered issues with the `DateTimeParser` when parsing certain date formats. The parser seems to fail when handling specific localized month names and ordinal days, which previously worked without issues. This ... | diff --git a/arrow/parser.py b/arrow/parser.py
index 3929788..74ad38b 100644
--- a/arrow/parser.py
+++ b/arrow/parser.py
@@ -445,87 +445,50 @@ class DateTimeParser:
:rtype: Tuple[List[_FORMAT_TYPE], Pattern[str]]
:raises ParserError: If an unrecognized token is encountered in the format string.
... | ["tests/test_factory.py::TestGet::test_one_arg_timestamp", "tests/test_factory.py::TestGet::test_kwarg_normalize_whitespace", "tests/test_factory.py::TestGet::test_locale", "tests/test_parser.py::TestDateTimeParser::test_YY_and_YYYY_format_list", "tests/test_parser.py::TestDateTimeParserParse::test_parse_names", "tests... | ["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 | 123 | 34 | 1,776 | 0 | 0.6 | 1 | 0.75 | 1 | 0.706 | 82.393 | |||
3,735 | swe_smith::train::6874 | swe_smith | train | 6,874 | joke2k__faker.8b401a7d.lm_rewrite__lrgg37p4 | swesmith/joke2k__faker.8b401a7d | joke2k/faker | python | null | json method handling issue with nested structures
Description
When using the `json` method to generate JSON structures with nested lists or dictionaries, a `TypeError` is raised unexpectedly. This occurs when the data columns are specified in a nested format, such as:
```python
kwargs = {'data_columns': [('list', [(... | diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py
index 70f20ec..e98200e 100644
--- a/faker/providers/misc/__init__.py
+++ b/faker/providers/misc/__init__.py
@@ -537,13 +537,8 @@ class Provider(BaseProvider):
"""
return self.json(data_columns=data_columns, num_rows=num_r... | ["tests/providers/test_misc.py::TestMiscProvider::test_json_passthrough_values", "tests/providers/test_misc.py::TestMiscProvider::test_json_invalid_data_columns", "tests/providers/test_misc.py::TestMiscProvider::test_json_list_format_nested_list_of_values", "tests/providers/test_misc.py::TestMiscProvider::test_json_lis... | ["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 | 146 | 5 | 1,313 | 0 | 0.6 | 1 | 0.75 | 1 | 0.7055 | 82.3915 | |||
3,736 | swe_bench::test::1257 | swe_bench | test | 1,257 | pydata__xarray-4879 | pydata/xarray | pydata/xarray | python | 15c68366b8ba8fd678d675df5688cf861d1c7235 | jupyter repr caching deleted netcdf file
**What happened**:
Testing xarray data storage in a jupyter notebook with varying data sizes and storing to a netcdf, i noticed that open_dataset/array (both show this behaviour) continue to return data from the first testing run, ignoring the fact that each run deletes the pre... | Thanks for the clear example!
This happens dues to xarray's caching logic for files:
https://github.com/pydata/xarray/blob/b1c7e315e8a18e86c5751a0aa9024d41a42ca5e8/xarray/backends/file_manager.py#L50-L76
This means that when you open the same filename, xarray doesn't actually reopen the file from disk -- instea... | diff --git a/xarray/backends/file_manager.py b/xarray/backends/file_manager.py
--- a/xarray/backends/file_manager.py
+++ b/xarray/backends/file_manager.py
@@ -3,8 +3,9 @@
import contextlib
import io
import threading
+import uuid
import warnings
-from typing import Any
+from typing import Any, Hashable
from ..cor... | diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py
--- a/xarray/tests/test_backends.py
+++ b/xarray/tests/test_backends.py
@@ -1207,6 +1207,39 @@ def test_multiindex_not_implemented(self) -> None:
pass
+class NetCDFBase(CFEncodedBase):
+ """Tests for all netCDF3 and netCD... | ["xarray/tests/test_backends_file_manager.py::test_file_manager_cache_repeated_open"] | ["xarray/tests/test_backends.py::TestCommon::test_robust_getitem", "xarray/tests/test_backends.py::TestNetCDF4Data::test_zero_dimensional_variable", "xarray/tests/test_backends.py::TestNetCDF4Data::test_write_store", "xarray/tests/test_backends.py::TestNetCDF4Data::test_roundtrip_test_data", "xarray/tests/test_backends... | null | true | 2021-02-07T21:48:06Z | 1 | 78 | 1 | 2,471 | 0 | 0.8 | 1 | 0.55 | 1 | 0.671833 | 82.3905 | |
3,737 | swe_smith::train::52725 | swe_smith | train | 52,725 | pydicom__pydicom.7d361b3d.lm_rewrite__rl4itbd4 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | ### Bug report
**Bug summary**
There seems to be an issue with determining the encoding for writing datasets when certain conditions are not met. Specifically, when the transfer syntax is not provided or when using a private transfer syntax without specifying the necessary encoding parameters, the process fails.
**C... | diff --git a/src/pydicom/filewriter.py b/src/pydicom/filewriter.py
index cb3ce64..f9f48f0 100644
--- a/src/pydicom/filewriter.py
+++ b/src/pydicom/filewriter.py
@@ -995,13 +995,8 @@ def write_file_meta_info(
fp.write(buffer.getvalue())
-def _determine_encoding(
- ds: Dataset,
- tsyntax: UID | None,
- ... | ["tests/test_dataset.py::TestDatasetSaveAs::test_no_transfer_syntax", "tests/test_dataset.py::TestDatasetSaveAs::test_mismatch", "tests/test_dataset.py::TestDatasetSaveAs::test_save_as_private_transfer_syntax", "tests/test_dataset.py::TestDatasetSaveAs::test_save_as_set_little_implicit_with_tsyntax", "tests/test_filere... | ["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 | 125 | 14 | 1,726 | 0 | 0.6 | 1 | 0.75 | 1 | 0.704333 | 82.388 | |||
3,738 | swe_smith::train::8261 | swe_smith | train | 8,261 | cantools__cantools.0c6a7871.lm_rewrite__douwp7rj | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | # SYM format export fails with TypeError when formatting signals
## Description
When trying to export a database to SYM format, the exporter fails with a TypeError. This happens when trying to re-read a previously exported SYM file.
```python
from cantools.database import load_file, load_string
# Load a SYM file
db... | diff --git a/src/cantools/database/can/formats/sym.py b/src/cantools/database/can/formats/sym.py
index 4bdc121..4c019a5 100644
--- a/src/cantools/database/can/formats/sym.py
+++ b/src/cantools/database/can/formats/sym.py
@@ -871,51 +871,120 @@ def _dump_signals(database: InternalDatabase, sort_signals: TypingOptional[C... | ["tests/test_database.py::CanToolsDatabaseTest::test_jopp_6_0_sym_re_read", "tests/test_database.py::CanToolsDatabaseTest::test_multiline_enum_sym_parsing", "tests/test_database.py::CanToolsDatabaseTest::test_multiplex_sym_with_empty_signal_name_dump", "tests/test_database.py::CanToolsDatabaseTest::test_vehicle"] | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 149 | 4 | 1,246 | 0 | 0.6 | 1 | 0.75 | 1 | 0.704333 | 82.388 | |||
3,739 | swe_smith::train::32404 | swe_smith | train | 32,404 | pydantic__pydantic.acb0f10f.combine_module__3xyzzm78 | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | # Missing methods in BaseModel class causes model serialization and validation issues
I'm encountering issues with model serialization and validation after updating to the latest version. Several key methods appear to be missing from the BaseModel class, causing unexpected behavior.
## Description
When working with ... | diff --git a/pydantic/v1/fields.py b/pydantic/v1/fields.py
index 002b60c..26c8422 100644
--- a/pydantic/v1/fields.py
+++ b/pydantic/v1/fields.py
@@ -870,12 +870,12 @@ class ModelField(Representation):
# keep validating
pass
elif self.allow_none:
+ return v, ... | ["tests/test_docs.py::test_docs_examples[docs/migration.md:191-216]", "tests/test_docs.py::test_docs_examples[docs/migration.md:221-254]", "tests/test_main.py::test_nested_v1_model_warns"] | ["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_... | jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f | true | null | 2 | 127 | 3 | 1,682 | 0 | 0.6 | 1 | 0.75 | 1 | 0.703667 | 82.386 | |||
3,740 | swe_smith::train::45470 | swe_smith | train | 45,470 | dask__dask.5f61e423.pr_10535 | swesmith/dask__dask.5f61e423 | dask/dask | python | null | ### Issue: NameError in Dask Order Functionality
Hello, I've encountered an issue with the Dask order functionality after a recent update. It seems that certain functions are not being recognized, leading to a `NameError`. This is affecting the ability to maintain proper task ordering, which is crucial for efficient c... | diff --git a/dask/order.py b/dask/order.py
index d76ac85..4d68ac7 100644
--- a/dask/order.py
+++ b/dask/order.py
@@ -51,7 +51,7 @@ from collections.abc import Callable, Iterable, Mapping, MutableMapping
from typing import Any, Literal, NamedTuple, overload
from dask._task_spec import DataNode, DependenciesMapping
-... | ["dask/tests/test_order.py::test_ordering_keeps_groups_together[abcde]", "dask/tests/test_order.py::test_ordering_keeps_groups_together[edcba]", "dask/tests/test_order.py::test_avoid_broker_nodes[abcde]", "dask/tests/test_order.py::test_avoid_broker_nodes[edcba]", "dask/tests/test_order.py::test_base_of_reduce_preferre... | ["dask/tests/test_order.py::test_stacklimit[abcde]", "dask/tests/test_order.py::test_stacklimit[edcba]", "dask/tests/test_order.py::test_order_empty", "dask/tests/test_order.py::test_connecting_to_roots_single_root", "dask/tests/test_order.py::test_connecting_to_roots_tree_reduction", "dask/tests/test_order.py::test_co... | jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423 | true | null | 1 | 143 | 91 | 1,332 | 0 | 0.6 | 1 | 0.75 | 1 | 0.698667 | 82.371 | |||
3,741 | swe_smith::train::47619 | swe_smith | train | 47,619 | sqlfluff__sqlfluff.50a1c4b6.combine_module__jtr3hbvg | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | CLI lint command broken after recent changes
#### Description
The `sqlfluff lint` command is completely broken and fails with various errors. Basic linting operations that should work are now throwing exceptions and producing incorrect behavior.
#### Steps/Code to Reproduce
```bash
# Basic lint command fails
sqlflu... | diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py
index 14e3c3e..870a33c 100644
--- a/src/sqlfluff/cli/commands.py
+++ b/src/sqlfluff/cli/commands.py
@@ -599,100 +599,67 @@ def lint(
stdin_filename: Optional[str] = None,
**kwargs,
) -> None:
- """Lint SQL files via passing a list of... | ["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_no_dialect[command2]", "test/cli/commands_test.py::test__cli__command_lint_stdin[command0]", "test/cli/commands_test.py::test__cli__command_lint_stdin[command1]", "test/cli/commands_test.py::test__cli__command_lint... | ["test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_no_dialect[command0]", "test/cli/commands_test.py::test__cli__command_no_dialect[command1]", "test/cli/commands_test.py::test__cli__command_no_dialect[command3]", "test/cli/commands_test.py::test__cli__command_no_di... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 2 | 144 | 73 | 1,302 | 0 | 0.6 | 1 | 0.75 | 1 | 0.697 | 82.366 | |||
3,742 | swe_smith::train::51562 | swe_smith | train | 51,562 | pydicom__pydicom.7d361b3d.combine_file__wxkool72 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | CLI filespec parser returns None instead of raising error for missing elements
#### Description
When using the CLI filespec parser to access data elements that don't exist in a DICOM dataset, the parser now returns `None` instead of raising an `ArgumentTypeError` as expected. This breaks the expected error handling b... | diff --git a/src/pydicom/cli/main.py b/src/pydicom/cli/main.py
index 2f616ba..5d05bbd 100644
--- a/src/pydicom/cli/main.py
+++ b/src/pydicom/cli/main.py
@@ -46,15 +46,14 @@ filespec_help = (
def eval_element(ds: Dataset, element: str) -> Any:
try:
- return eval("ds." + element, {"ds": ds})
+ retur... | ["tests/test_cli.py::TestFilespec::test_syntax[extra:colon]", "tests/test_cli.py::TestFilespec::test_syntax[no_callable()]", "tests/test_cli.py::TestFilespec::test_syntax[BeamSequence[0]extra]", "tests/test_cli.py::TestFilespec::test_syntax[BeamSequence[x]]", "tests/test_cli.py::TestFilespec::test_elem_not_exists[NotTh... | ["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 | 148 | 15 | 1,215 | 0 | 0.6 | 1 | 0.75 | 1 | 0.695833 | 82.3625 | |||
3,743 | swe_smith::train::32806 | swe_smith | train | 32,806 | pydantic__pydantic.acb0f10f.lm_rewrite__q3hftjig | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | @validate_arguments decorator breaks with TypeError messages
#### Description
The `@validate_arguments` decorator is raising `PydanticUserError` instead of the expected `TypeError` for various validation scenarios. This breaks backward compatibility and changes the expected exception types.
#### Steps/Code to Reprod... | diff --git a/pydantic/deprecated/decorator.py b/pydantic/deprecated/decorator.py
index e73ad20..1f5489f 100644
--- a/pydantic/deprecated/decorator.py
+++ b/pydantic/deprecated/decorator.py
@@ -226,59 +226,84 @@ class ValidatedFunction:
else:
return self.raw_function(**d, **var_kwargs)
- def c... | ["tests/test_deprecated_validate_arguments.py::test_args", "tests/test_deprecated_validate_arguments.py::test_wrap", "tests/test_deprecated_validate_arguments.py::test_kwargs", "tests/test_deprecated_validate_arguments.py::test_positional_only", "tests/test_deprecated_validate_arguments.py::test_args_name", "tests/test... | ["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 | 133 | 6 | 1,458 | 0 | 0.6 | 1 | 0.75 | 1 | 0.686333 | 82.334 | |||
3,744 | swe_smith::train::24916 | swe_smith | train | 24,916 | marshmallow-code__marshmallow.9716fc62.lm_rewrite__7es6lbv5 | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | ### AttributeError in Error Handling with Decorators
#### Description
It seems there's an issue with error handling when using decorators in the schema. Specifically, an `AttributeError` is raised due to the `ErrorStore` object not having a `valid_data` attribute. This occurs during the error handling process when de... | diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py
index e21768e..74cd6e2 100644
--- a/src/marshmallow/schema.py
+++ b/src/marshmallow/schema.py
@@ -835,81 +835,96 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta):
:param postprocess: Whether to run post_load methods..
:return: Des... | ["tests/test_decorators.py::test_decorator_error_handling", "tests/test_decorators.py::test_decorator_error_handling_with_load[pre_load]", "tests/test_decorators.py::test_decorator_error_handling_with_load_dict_error[pre_load]", "tests/test_decorators.py::test_decorator_error_handling_with_load_dict_error[post_load]", ... | ["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 | 141 | 6 | 1,290 | 0 | 0.6 | 1 | 0.75 | 1 | 0.685 | 82.33 | |||
3,745 | swe_smith::train::34144 | swe_smith | train | 34,144 | iterative__dvc.1d6ea681.combine_module__l9do59bu | swesmith/iterative__dvc.1d6ea681 | iterative/dvc | python | null | Stage methods missing after refactoring
#### Description
Several Stage methods appear to be missing, causing AttributeError when trying to access them. This includes methods like `compute_md5()`, `__repr__()`, `__str__()`, `path_in_repo`, `changed_stage()`, `remove()`, `save_deps()`, `run()`, `already_cached()`, and ... | diff --git a/dvc/stage/__init__.py b/dvc/stage/__init__.py
index 92835fe..351e054 100644
--- a/dvc/stage/__init__.py
+++ b/dvc/stage/__init__.py
@@ -203,12 +203,6 @@ class Stage(params.StageParams):
def metrics(self) -> list["Output"]:
return [out for out in self.outs if out.metric]
- def __repr__(se... | ["tests/func/test_stage.py::test_reload", "tests/func/test_stage.py::test_default_wdir_ignored_in_checksum", "tests/func/test_stage.py::test_external_remote_output_resolution", "tests/func/test_stage.py::test_external_remote_dependency_resolution", "tests/func/test_stage.py::test_md5_ignores_comments", "tests/func/test... | ["tests/func/test_stage.py::test_cmd_obj", "tests/func/test_stage.py::test_no_cmd", "tests/func/test_stage.py::test_object", "tests/func/test_stage.py::test_none", "tests/func/test_stage.py::test_empty_list", "tests/func/test_stage.py::test_list", "tests/func/test_stage.py::test_md5_ignores_annotations", "tests/func/te... | jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681 | true | null | 2 | 130 | 46 | 1,485 | 0 | 0.6 | 1 | 0.75 | 1 | 0.680833 | 82.3175 | |||
3,746 | swe_smith::train::9767 | swe_smith | train | 9,767 | marshmallow-code__webargs.dbde72fe.lm_rewrite__i70w7od6 | swesmith/marshmallow-code__webargs.dbde72fe | marshmallow-code/webargs | python | null | # Stacked use_args decorators not detecting argument name conflicts
I've found an issue with the `use_args` decorator when stacking multiple decorators on the same function. The argument name conflict detection that should prevent duplicate argument names is not working properly.
## To Reproduce
Here's a minimal exa... | diff --git a/src/webargs/core.py b/src/webargs/core.py
index 44294e9..a22dd79 100644
--- a/src/webargs/core.py
+++ b/src/webargs/core.py
@@ -595,71 +595,68 @@ class Parser(typing.Generic[Request]):
arg_name = self.get_default_arg_name(location, argmap)
def decorator(func: typing.Callable) -> typ... | ["tests/test_core.py::test_use_args_errors_on_explicit_arg_name_conflict", "tests/test_core.py::test_use_args_errors_on_implicit_arg_name_conflict", "tests/test_core.py::test_use_args_with_arg_name_supports_multi_stacked_decorators", "tests/test_core.py::test_default_arg_name_pattern_still_allows_conflict_detection"] | ["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T... | jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe | true | null | 1 | 121 | 4 | 1,655 | 0 | 0.6 | 1 | 0.75 | 1 | 0.679167 | 82.3125 | |||
3,747 | swe_smith::train::43731 | swe_smith | train | 43,731 | sloria__environs.73c372df.lm_rewrite__j1p3c330 | swesmith/sloria__environs.73c372df | sloria/environs | python | null | ### Issue: List Parsing with Subcast Fails
#### Description
When attempting to parse environment variables as lists with a subcast, the function does not behave as expected. Specifically, using a subcast with `env.list()` results in a `TypeError`. This issue seems to occur when the list is empty or when a custom subc... | diff --git a/src/environs/__init__.py b/src/environs/__init__.py
index 00f6072..66ca55f 100644
--- a/src/environs/__init__.py
+++ b/src/environs/__init__.py
@@ -96,72 +96,85 @@ class ParserConflictError(ValueError):
"""
-def _field2method(
- field_or_factory: FieldOrFactory,
- method_name: str,
- *,
-... | ["tests/test_environs.py::TestCasting::test_list_cast", "tests/test_environs.py::TestCasting::test_list_with_default_from_string", "tests/test_environs.py::TestCasting::test_list_with_default_from_list", "tests/test_environs.py::TestCasting::test_list_with_default_none", "tests/test_environs.py::TestCasting::test_list_... | ["tests/test_environs.py::TestCasting::test_call", "tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_basic", "tests/test_environs.py::TestCasting::test_empty_str", "tests/test_environs.py::TestCasting::test_int_cast", "tests/test_environs.py::TestCasting::test_inv... | jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df | true | null | 1 | 121 | 11 | 1,643 | 0 | 0.6 | 1 | 0.75 | 1 | 0.677167 | 82.3065 | |||
3,748 | swe_bench::test::1230 | swe_bench | test | 1,230 | pydata__xarray-3979 | pydata/xarray | pydata/xarray | python | 2c77eb531b6689f9f1d2adbde0d8bf852f1f7362 | xr.full_like (often) fails when other is chunked and fill_value is non-scalar
I've been running into some issues when using `xr.full_like`, when my `other.data` is a chunked dask array, and the `fill_value` is a numpy array.
Now, I just checked, ``full_like`` mentions only scalar in the signature. However, this is a v... | diff --git a/xarray/core/common.py b/xarray/core/common.py
--- a/xarray/core/common.py
+++ b/xarray/core/common.py
@@ -25,7 +25,7 @@
from .options import OPTIONS, _get_keep_attrs
from .pycompat import dask_array_type
from .rolling_exp import RollingExp
-from .utils import Frozen, either_dict_or_kwargs
+from .utils i... | diff --git a/xarray/tests/test_variable.py b/xarray/tests/test_variable.py
--- a/xarray/tests/test_variable.py
+++ b/xarray/tests/test_variable.py
@@ -2213,6 +2213,10 @@ def test_full_like(self):
assert expect.dtype == bool
assert_identical(expect, full_like(orig, True, dtype=bool))
+ # raise... | ["xarray/tests/test_variable.py::TestAsCompatibleData::test_full_like"] | ["xarray/tests/test_variable.py::TestVariable::test_properties", "xarray/tests/test_variable.py::TestVariable::test_attrs", "xarray/tests/test_variable.py::TestVariable::test_getitem_dict", "xarray/tests/test_variable.py::TestVariable::test_getitem_1d", "xarray/tests/test_variable.py::TestVariable::test_getitem_1d_fanc... | null | true | 2020-04-16T19:18:50Z | 1 | 5 | 1 | 6,654 | 0 | 0.8 | 1 | 0.8 | 0.8 | 0.516667 | 82.3 | ||
3,749 | swe_smith::train::24487 | swe_smith | train | 24,487 | sunpy__sunpy.f8edfd5c.combine_module__aoqszoua | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | NOAA timeseries plot method fails with UnboundLocalError for sunspot RI plot type
#### Description
When trying to plot NOAA timeseries data with `plot_type='sunspot RI'`, the method fails with an UnboundLocalError because the `ylabel` variable is not defined in all code paths.
#### Steps/Code to Reproduce
```python... | diff --git a/sunpy/timeseries/sources/eve.py b/sunpy/timeseries/sources/eve.py
index c92060b..bfa1a97 100644
--- a/sunpy/timeseries/sources/eve.py
+++ b/sunpy/timeseries/sources/eve.py
@@ -279,87 +279,67 @@ class EVESpWxTimeSeries(GenericTimeSeries):
"""
Parses and EVE Level 0CS file.
"""
- ... | ["sunpy/timeseries/sources/tests/test_eve.py::test_eve", "sunpy/timeseries/sources/tests/test_noaa.py::test_noaa_json_ind_plot_column"] | ["sunpy/timeseries/sources/tests/test_eve.py::test_implicit_esp", "sunpy/timeseries/sources/tests/test_eve.py::test_esp", "sunpy/timeseries/sources/tests/test_eve.py::test_esp_plot_column", "sunpy/timeseries/sources/tests/test_noaa.py::test_noaa_ind_json", "sunpy/timeseries/sources/tests/test_noaa.py::test_noaa_pre_jso... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 2 | 143 | 2 | 1,184 | 0 | 0.6 | 1 | 0.75 | 1 | 0.674 | 82.297 | |||
3,750 | swe_smith::train::34464 | swe_smith | train | 34,464 | iterative__dvc.1d6ea681.pr_9014 | swesmith/iterative__dvc.1d6ea681 | iterative/dvc | python | null | [Bug]: Missing critical methods in Repo class causes AttributeError
### Bug summary
After recent changes to the `dvc/repo/__init__.py` file, several critical methods and properties are missing from the `Repo` class, causing numerous `AttributeError` exceptions when trying to use DVC.
### Code for reproduction
```py... | diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py
index 2b89626..6c92230 100644
--- a/dvc/repo/__init__.py
+++ b/dvc/repo/__init__.py
@@ -166,7 +166,6 @@ class Repo:
self._config = config
self._remote = remote
self._remote_config = remote_config
- self._data_index = None
... | ["tests/unit/repo/test_open_repo.py::test_subrepo_is_constructed_properly[False]", "tests/unit/repo/test_open_repo.py::test_subrepo_is_constructed_properly[True]", "tests/unit/repo/test_repo.py::test_branch_config", "tests/unit/repo/test_repo.py::test_dynamic_cache_initialization"] | ["tests/unit/repo/experiments/test_executor_status.py::test_executor_status_compatibility", "tests/unit/repo/experiments/test_utils.py::test_run_check_ref_format[name-True]", "tests/unit/repo/experiments/test_utils.py::test_run_check_ref_format[group/name-False]", "tests/unit/repo/experiments/test_utils.py::test_run_ch... | jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681 | true | null | 2 | 126 | 4 | 1,513 | 0 | 0.6 | 1 | 0.75 | 1 | 0.672167 | 82.2915 | |||
3,751 | swe_smith::train::20399 | swe_smith | train | 20,399 | tobymao__sqlglot.036601ba.combine_file__b98sw0dh | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | Schema column_names method returns wrong type after refactoring
#### Description
The `column_names` method in `MappingSchema` is supposed to return a list of column names, but after some recent changes it's returning a different type that breaks existing code expecting a list.
#### Steps/Code to Reproduce
```python... | diff --git a/sqlglot/schema.py b/sqlglot/schema.py
index c8362e0..bbcde18 100644
--- a/sqlglot/schema.py
+++ b/sqlglot/schema.py
@@ -312,19 +312,41 @@ class MappingSchema(AbstractMappingSchema, Schema):
only_visible: bool = False,
dialect: DialectType = None,
normalize: t.Optional[bool] = Non... | ["tests/test_schema.py::TestSchema::test_schema", "tests/test_schema.py::TestSchema::test_schema_catalog", "tests/test_schema.py::TestSchema::test_schema_db", "tests/test_schema.py::TestSchema::test_schema_get_column_type", "tests/test_schema.py::TestSchema::test_schema_normalization"] | ["tests/test_schema.py::TestSchema::test_find", "tests/test_schema.py::TestSchema::test_has_column", "tests/test_schema.py::TestSchema::test_same_number_of_qualifiers", "tests/test_schema.py::TestSchema::test_schema_add_table_with_and_without_mapping"] | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 137 | 5 | 1,293 | 0 | 0.6 | 1 | 0.75 | 1 | 0.672167 | 82.2915 | |||
3,752 | swe_smith::train::109 | swe_smith | train | 109 | oauthlib__oauthlib.1fd52536.combine_file__ogcov5sy | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OAuth1 signature verification broken after recent changes
#### Description
OAuth1 authentication is completely broken. All signature verification methods are returning incorrect results and parameter validation logic has been scrambled.
#### Steps/Code to Reproduce
```python
from oauthlib.oauth1 import RequestValid... | diff --git a/oauthlib/oauth1/rfc5849/endpoints/base.py b/oauthlib/oauth1/rfc5849/endpoints/base.py
index 8d3d89c..6225cdc 100644
--- a/oauthlib/oauth1/rfc5849/endpoints/base.py
+++ b/oauthlib/oauth1/rfc5849/endpoints/base.py
@@ -25,30 +25,6 @@ class BaseEndpoint:
self.token_generator = token_generator or gener... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | ["tests/oauth1/rfc5849/test_client.py::ClientRealmTests::test_client_no_realm", "tests/oauth1/rfc5849/test_client.py::ClientRealmTests::test_client_realm_sign_with_additional_realm", "tests/oauth1/rfc5849/test_client.py::ClientRealmTests::test_client_realm_sign_with_default_realm", "tests/oauth1/rfc5849/test_client.py:... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 127 | 50 | 1,486 | 0 | 0.6 | 1 | 0.75 | 1 | 0.671 | 82.288 | |||
3,753 | swe_smith::train::29253 | swe_smith | train | 29,253 | tox-dev__pipdeptree.c31b6418.lm_rewrite__zc4llzl7 | swesmith/tox-dev__pipdeptree.c31b6418 | tox-dev/pipdeptree | python | null | Error with Custom Interpreter and Package Discovery
Description
When using a custom Python interpreter, the package discovery process seems to be malfunctioning. Specifically, the issue arises when attempting to filter packages with the `--local-only` and `--user-only` flags. The expected packages are not being corre... | diff --git a/src/pipdeptree/_discovery.py b/src/pipdeptree/_discovery.py
index ba23498..ff02fef 100644
--- a/src/pipdeptree/_discovery.py
+++ b/src/pipdeptree/_discovery.py
@@ -13,41 +13,103 @@ from packaging.utils import canonicalize_name
from pipdeptree._warning import get_warning_printer
-def get_installed_dist... | ["tests/test_discovery.py::test_local_only", "tests/test_discovery.py::test_user_only", "tests/test_discovery.py::test_user_only_when_in_virtual_env_and_system_site_pkgs_enabled", "tests/test_discovery.py::test_paths", "tests/test_discovery.py::test_paths_when_in_virtual_env", "tests/test_non_host.py::test_custom_inter... | ["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 | 130 | 11 | 1,415 | 0 | 0.6 | 1 | 0.75 | 1 | 0.669167 | 82.2825 | |||
3,754 | swe_bench::dev::70 | swe_bench | dev | 70 | pvlib__pvlib-python-907 | pvlib/pvlib-python | pvlib/pvlib-python | python | 113917b780d4c7a249b09b197c16568f6212c119 | access private _parse_pvgis_tmy_csv() function as read_pvgis_tmy_csv()
**Is your feature request related to a problem? Please describe.**
someone sent me a csv file they downloaded from pvgis, and I needed to parse it, so I had to call the private methods like this:
```python
>>> from pvlib.iotools.pvgis import _parse... | OK with me to refactor to the same pattern as #842 in particular the get / read / parse [trio](https://github.com/pvlib/pvlib-python/pull/842#issuecomment-570309454).
I just started in this, but didn't push it yet, sorry. Kinda important now to have a static/remoteless test that checks parsing, since all of the tests a... | diff --git a/pvlib/iotools/__init__.py b/pvlib/iotools/__init__.py
--- a/pvlib/iotools/__init__.py
+++ b/pvlib/iotools/__init__.py
@@ -12,4 +12,4 @@
from pvlib.iotools.psm3 import get_psm3 # noqa: F401
from pvlib.iotools.psm3 import read_psm3 # noqa: F401
from pvlib.iotools.psm3 import parse_psm3 # noqa: F401
-fr... | diff --git a/pvlib/tests/iotools/test_pvgis.py b/pvlib/tests/iotools/test_pvgis.py
--- a/pvlib/tests/iotools/test_pvgis.py
+++ b/pvlib/tests/iotools/test_pvgis.py
@@ -6,7 +6,7 @@
import pandas as pd
import pytest
import requests
-from pvlib.iotools import get_pvgis_tmy
+from pvlib.iotools import get_pvgis_tmy, read_... | ["pvlib/tests/iotools/test_pvgis.py::test_read_pvgis_tmy_exception"] | [] | null | true | 2020-02-23T09:19:00Z | 2 | 106 | 1 | 1,692 | 0 | 0.8 | 1 | 0.55 | 1 | 0.635333 | 82.281 | |
3,755 | swe_smith::train::8234 | swe_smith | train | 8,234 | cantools__cantools.0c6a7871.lm_rewrite__69fcpyzi | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | ### Issue: Incorrect Argument Handling in `add_sub_references` Method
#### Description
The `add_sub_references` method in the `SystemLoader` class is currently not handling arguments correctly, leading to unexpected behavior. When processing ARXML files, the method is expected to take a specific number of arguments, ... | diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py
index f7aa786..1f5e9d3 100644
--- a/src/cantools/database/can/formats/arxml/system_loader.py
+++ b/src/cantools/database/can/formats/arxml/system_loader.py
@@ -2090,80 +2090,66 @@ class Syste... | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_database.py::CanToolsDataba... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 124 | 20 | 1,529 | 0 | 0.6 | 1 | 0.75 | 1 | 0.668167 | 82.2795 | |||
3,756 | swe_bench::test::1005 | swe_bench | test | 1,005 | matplotlib__matplotlib-23088 | matplotlib/matplotlib | matplotlib/matplotlib | python | b5fc36e9ac52aa130f852effb2fa08094ac5712b | [Bug]: Confusing error messages
### Bug summary
Basically, plotting from a dataframe failed because of a keyerror but the message I received was regarding formatting using a string. The failure happened silently, causing me to spend over an hour tracking down a type because I had no clue where to start.
### Code for ... | I'm not really sure what we can do here. Unfortunately we also support `ax.plot('boo', '-r', data=df)` to plot with `df['boo']` as the y data (x data is assumed np.arange(len(y))), and `'-r'` as the format string. We definitely don't want to warn on `data['-r']` - instead we just assume `'-r'` is a format string and... | diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py
--- a/lib/matplotlib/axes/_base.py
+++ b/lib/matplotlib/axes/_base.py
@@ -118,7 +118,7 @@ def __call__(self, ax, renderer):
self._transform - ax.figure.transSubfigure)
-def _process_plot_format(fmt):
+def _process_plot_format(fmt,... | diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -7698,16 +7698,19 @@ def test_empty_line_plots():
@pytest.mark.parametrize('fmt, match', (
- ("foo", "Unrecognized character f in format string 'f... | ["lib/matplotlib/tests/test_axes.py::test_plot_format_errors[None-f-'f'", "lib/matplotlib/tests/test_axes.py::test_plot_format_errors[None-o+-'o\\\\+'", "lib/matplotlib/tests/test_axes.py::test_plot_format_errors[None-:--':-'", "lib/matplotlib/tests/test_axes.py::test_plot_format_errors[None-rk-'rk'", "lib/matplotlib/t... | ["lib/matplotlib/tests/test_axes.py::test_get_labels", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[png]", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[pdf]", "lib/matplotlib/tests/test_axes.py::test_label_loc_horizontal[png]", "lib/matplotlib/tests/test_axes.py::test_label_loc_horizontal[... | null | true | 2022-05-21T16:32:06Z | 1 | 36 | 10 | 3,058 | 0.105263 | 0.8 | 1 | 0.77 | 1 | 0.62 | 82.268 | |
3,757 | swe_smith::train::26640 | swe_smith | train | 26,640 | pylint-dev__astroid.b114f6b5.pr_1970 | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | ### Bug Report
**Description**
Hey team,
I've stumbled upon a peculiar issue with dataclass initialization after the recent changes. It seems like the order of inherited attributes in dataclasses is not being handled correctly, leading to unexpected behavior. This is particularly noticeable when dealing with multiple... | diff --git a/astroid/brain/brain_dataclasses.py b/astroid/brain/brain_dataclasses.py
index 92d983e..11f2644 100644
--- a/astroid/brain/brain_dataclasses.py
+++ b/astroid/brain/brain_dataclasses.py
@@ -161,11 +161,11 @@ def _check_generate_dataclass_init(node: nodes.ClassDef) -> bool:
def _find_arguments_from_base_... | ["tests/brain/test_dataclasses.py::test_dataclass_order_of_inherited_attributes", "tests/brain/test_dataclasses.py::test_init_empty[dataclasses]", "tests/brain/test_dataclasses.py::test_init_empty[pydantic.dataclasses]", "tests/brain/test_dataclasses.py::test_init_empty[marshmallow_dataclass]", "tests/brain/test_datacl... | ["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 | 130 | 31 | 1,379 | 0 | 0.6 | 1 | 0.75 | 1 | 0.663167 | 82.2645 | |||
3,758 | swe_smith::train::44502 | swe_smith | train | 44,502 | pydata__patsy.a5d16484.lm_rewrite__c4pl6sfb | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | ### Unexpected Behavior in Design Matrix Construction with Categorical Data
I've encountered an issue with the design matrix construction when dealing with categorical data. It seems that the function responsible for handling contrasts in categorical terms is not behaving as expected, leading to errors during matrix b... | diff --git a/patsy/build.py b/patsy/build.py
index cbe2524..b621aff 100644
--- a/patsy/build.py
+++ b/patsy/build.py
@@ -625,70 +625,63 @@ def test__examine_factor_types():
def _make_subterm_infos(terms, num_column_counts, cat_levels_contrasts):
- # Sort each term into a bucket based on the set of numeric facto... | ["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_data_types", "patsy/test_build.py::test_NA_action", "patsy/test_build.py::test_NA_drop_preserves_levels", "patsy/test_build.py::test_data_mismatch", "patsy/test_build.py... | ["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 | 115 | 19 | 1,673 | 0 | 0.6 | 1 | 0.75 | 1 | 0.662167 | 82.2615 | |||
3,759 | swe_smith::train::21702 | swe_smith | train | 21,702 | buriy__python-readability.40256f40.lm_rewrite__vf0aw1hy | swesmith/buriy__python-readability.40256f40 | buriy/python-readability | python | null | # Readability summary() method fails to extract content correctly
## Bug report
After recent changes to the `summary()` method in the Document class, several issues have appeared with content extraction. The method is no longer properly extracting article content in various scenarios.
## Reproduction Steps
Here are... | diff --git a/readability/readability.py b/readability/readability.py
index c86e7d1..6c70c53 100755
--- a/readability/readability.py
+++ b/readability/readability.py
@@ -221,57 +221,34 @@ class Document:
so it is better to call other API methods before this one.
"""
try:
- ruthless ... | ["tests/test_article_only.py::TestArticleOnly::test_correct_cleanup", "tests/test_article_only.py::TestArticleOnly::test_many_repeated_spaces", "tests/test_article_only.py::TestArticleOnly::test_not_self_closing", "tests/test_article_only.py::TestArticleOnly::test_si_sample"] | ["tests/test_article_only.py::TestArticleOnly::test_author_absent", "tests/test_article_only.py::TestArticleOnly::test_author_present", "tests/test_article_only.py::TestArticleOnly::test_best_elem_is_root_and_passing", "tests/test_article_only.py::TestArticleOnly::test_si_sample_html_partial", "tests/test_article_only.... | jyangballin/swesmith.x86_64.buriy_1776_python-readability.40256f40 | true | null | 1 | 77 | 4 | 2,433 | 0 | 0.6 | 1 | 0.75 | 1 | 0.662167 | 82.2615 | |||
3,760 | swe_smith::train::8577 | swe_smith | train | 8,577 | pyupio__safety.7654596b.combine_module__uhxsb0lx | swesmith/pyupio__safety.7654596b | pyupio/safety | python | null | # Safety scan command fails with TypeError when searching for files
## Description
I'm encountering an issue with the `safety scan` command. When running the scan, it fails with a TypeError that seems to be related to the file finder functionality.
## Steps to Reproduce
1. Run the `safety scan` command on a project... | diff --git a/safety/scan/command.py b/safety/scan/command.py
index 2c74baf..20499d3 100644
--- a/safety/scan/command.py
+++ b/safety/scan/command.py
@@ -249,7 +249,7 @@ def scan(ctx: typer.Context,
apply_updates: Annotated[bool,
typer.Option("--apply-fixes",
... | ["tests/test_cli.py::TestSafetyCLI::test_debug_flag", "tests/scan/test_file_finder.py::TestFileFinder::test_search", "tests/scan/test_file_handlers.py::test_download_required_assets", "tests/scan/test_file_handlers.py::test_download_required_assets_no_db_dir"] | ["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t... | jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b | true | null | 3 | 122 | 4 | 1,522 | 0 | 0.6 | 1 | 0.75 | 1 | 0.660333 | 82.256 | |||
3,761 | swe_smith::train::20135 | swe_smith | train | 20,135 | kurtmckee__feedparser.cad965a3.lm_rewrite__2rdkzlmv | swesmith/kurtmckee__feedparser.cad965a3 | kurtmckee/feedparser | python | null | Date Parsing Issue with W3CDTF Format
Description
I've encountered an issue with the `_parse_date_w3dtf` function when parsing certain date strings. It seems that the function is not handling some W3CDTF formatted dates correctly, leading to unexpected `TypeError` exceptions.
Here's a simple reproduction script:
``... | diff --git a/feedparser/datetimes/w3dtf.py b/feedparser/datetimes/w3dtf.py
index cf63f9d..f3ef1c8 100644
--- a/feedparser/datetimes/w3dtf.py
+++ b/feedparser/datetimes/w3dtf.py
@@ -59,70 +59,92 @@ timezonenames = {
def _parse_date_w3dtf(datestr):
- if not datestr.strip():
+ """Parse a W3CDTF date into a date... | ["tests/test_well_formed.py::test_http_conditions[info4]", "tests/test_well_formed.py::test_strict_parser[info1568]", "tests/test_well_formed.py::test_strict_parser[info1350]", "tests/test_well_formed.py::test_strict_parser[info85]", "tests/test_well_formed.py::test_loose_parser[info1267]", "tests/test_well_formed.py::... | ["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te... | jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3 | true | null | 1 | 148 | 154 | 999 | 0 | 0.6 | 1 | 0.75 | 1 | 0.659833 | 82.2545 | |||
3,762 | swe_smith::train::240 | swe_smith | train | 240 | oauthlib__oauthlib.1fd52536.combine_module__9wqu4lhu | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OAuth1 authorization endpoint broken after recent changes
#### Description
The OAuth1 authorization endpoint is not working correctly. When trying to create authorization responses or validate request tokens, the endpoint is behaving unexpectedly and returning wrong status codes.
#### Steps/Code to Reproduce
```pyt... | diff --git a/oauthlib/oauth1/rfc5849/endpoints/authorization.py b/oauthlib/oauth1/rfc5849/endpoints/authorization.py
index 00d9576..7487c21 100644
--- a/oauthlib/oauth1/rfc5849/endpoints/authorization.py
+++ b/oauthlib/oauth1/rfc5849/endpoints/authorization.py
@@ -109,8 +109,8 @@ class AuthorizationEndpoint(BaseEndpoin... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | ["tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_case_insensitive_headers", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_enforce_ssl", "tests/oauth1/rfc5849/endpoints/test_base.py::BaseEndpointTest::test_missing_parameters", "tests/oauth1/rfc5849/endpoints/test_base.py::Base... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 2 | 109 | 37 | 1,760 | 0 | 0.6 | 1 | 0.75 | 1 | 0.656667 | 82.245 | |||
3,763 | swe_smith::train::34442 | swe_smith | train | 34,442 | iterative__dvc.1d6ea681.pr_8537 | swesmith/iterative__dvc.1d6ea681 | iterative/dvc | python | null | # AttributeError when accessing file paths in IndexView
## Description
I'm encountering an issue when working with the `IndexView` class in DVC. When trying to filter outputs based on a path, I get an `AttributeError` because the code is trying to access `out.fs.path.isin` and `out.fs.path.relparts`, but the `path` a... | diff --git a/dvc/repo/index.py b/dvc/repo/index.py
index ea87208..ef5e8fc 100644
--- a/dvc/repo/index.py
+++ b/dvc/repo/index.py
@@ -4,7 +4,7 @@ from collections import defaultdict
from collections.abc import Iterable, Iterator
from functools import partial
from itertools import chain
-from typing import TYPE_CHECKI... | ["tests/unit/repo/experiments/test_executor_status.py::test_celery_queue_success_status", "tests/unit/repo/experiments/test_executor_status.py::test_workspace_executor_success_status[workspace_queue]", "tests/unit/repo/experiments/test_executor_status.py::test_workspace_executor_success_status[tempdir_queue]", "tests/u... | ["tests/func/test_repo.py::test_open_bare", "tests/func/test_repo.py::test_destroy", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown_no_tasks", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown_with_kill", "tests/unit/rep... | jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681 | true | null | 1 | 137 | 5 | 1,182 | 0 | 0.6 | 1 | 0.75 | 1 | 0.653667 | 82.236 | |||
3,764 | swe_smith::train::31680 | swe_smith | train | 31,680 | benoitc__gunicorn.bacbf8aa.lm_rewrite__a0xx2f9m | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | **Import Application Error with Specific Function Calls**
**Description**
When attempting to import an application using specific function calls, the import process fails with an `AppImportError`. This issue arises when the application is specified in the format `module:function_call()` with arguments, such as `suppo... | diff --git a/gunicorn/util.py b/gunicorn/util.py
index e66dbeb..4559ee8 100644
--- a/gunicorn/util.py
+++ b/gunicorn/util.py
@@ -356,87 +356,81 @@ def _called_with_wrong_args(f):
def import_app(module):
- parts = module.split(":", 1)
- if len(parts) == 1:
- obj = "application"
- else:
- modu... | ["tests/test_util.py::test_import_app_good[support:create_app(count=3)]", "tests/test_util.py::test_import_app_bad[support:error_factory()-TypeError-inner]", "tests/test_util.py::test_import_app_bad[support:HOST-AppImportError-callable]", "tests/test_util.py::test_import_app_py_ext"] | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 1 | 130 | 4 | 1,320 | 0 | 0.6 | 1 | 0.75 | 1 | 0.653333 | 82.235 | |||
3,765 | swe_smith::train::18549 | swe_smith | train | 18,549 | HIPS__autograd.ac044f0d.lm_rewrite__pdkg065d | swesmith/HIPS__autograd.ac044f0d | hips/autograd | python | null | ### Issue with Convolution Operations in `autograd.scipy.signal`
#### Describe the problem
After a recent update, it seems that the convolution operations in `autograd.scipy.signal` are not functioning as expected. Specifically, when attempting to perform convolutions, errors are raised that prevent the operations fr... | diff --git a/autograd/scipy/signal.py b/autograd/scipy/signal.py
index 49b7619..cabb828 100644
--- a/autograd/scipy/signal.py
+++ b/autograd/scipy/signal.py
@@ -62,48 +62,105 @@ def pad_to_full(A, B, axes):
def parse_axes(A_shape, B_shape, conv_axes, dot_axes, mode):
+ """
+ Parse and organize axes for convo... | ["tests/test_scipy.py::test_convolve", "tests/test_scipy.py::test_convolve_2d", "tests/test_scipy.py::test_convolve_ignore", "tests/test_scipy.py::test_convolve_ignore_dot"] | ["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_... | jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d | true | null | 1 | 125 | 4 | 1,390 | 0 | 0.6 | 1 | 0.75 | 1 | 0.648333 | 82.22 | |||
3,766 | swe_smith::train::50879 | swe_smith | train | 50,879 | python-hyper__h11.bed0dd4a.func_pm_class_rm_funcs__jtn92p13 | swesmith/python-hyper__h11.bed0dd4a | python-hyper/h11 | python | null | Connection object missing receive_data and trailing_data methods
#### Description
After a recent change, the Connection class is missing critical methods `receive_data` and `trailing_data` that are essential for HTTP connection handling. This breaks basic functionality for receiving and processing HTTP data.
#### St... | diff --git a/h11/_connection.py b/h11/_connection.py
index e37d82a..6c33f08 100644
--- a/h11/_connection.py
+++ b/h11/_connection.py
@@ -350,63 +350,6 @@ class Connection:
if self.their_state != old_states[self.their_role]:
self._reader = self._get_io_object(self.their_role, event, READERS)
- ... | ["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_conne... | ["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_events.py::test_events", "h11/tests/test_events.py::test_intenum_status_code", "h11/tests/test_events.py::test_header_casing", "h11/tests/test... | jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a | true | null | 1 | 133 | 29 | 1,210 | 0 | 0.6 | 1 | 0.75 | 1 | 0.645 | 82.21 | |||
3,767 | swe_bench::test::1793 | swe_bench | test | 1,793 | sphinx-doc__sphinx-7906 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | fdd1aaf77058a579a5b5c2e3e6aff935265a7e49 | :noindex: prevents cross-referencing
If a `:noindex:` flag is added to a directive, it can't be cross-referenced, and no permalink to it is generated.
The following ReST:
```
.. class:: Indexed
.. class:: Unindexed
:noindex:
```
generates the following HTML:
```
<dl class="class">
<dt id="Indexed">
<em class="pro... | The `:noindex:` option is usually used to disable to create a cross-reference target. For example, `.. py:module::` directive goes to create a target and to switch current module (current namespace). And we give `:noindex:` option to one of `py:module:` definition to avoid conflicts.
```
# in getcwd.rst
.. py:module... | diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py
--- a/sphinx/domains/c.py
+++ b/sphinx/domains/c.py
@@ -16,6 +16,7 @@
from docutils import nodes
from docutils.nodes import Element, Node, TextElement, system_message
+from docutils.parsers.rst import directives
from sphinx import addnodes
from sphinx.addno... | diff --git a/tests/test_domain_c.py b/tests/test_domain_c.py
--- a/tests/test_domain_c.py
+++ b/tests/test_domain_c.py
@@ -10,6 +10,7 @@
import pytest
from sphinx import addnodes
+from sphinx.addnodes import desc
from sphinx.domains.c import DefinitionParser, DefinitionError
from sphinx.domains.c import _max_id, ... | ["tests/test_domain_c.py::test_noindexentry", "tests/test_domain_cpp.py::test_noindexentry", "tests/test_domain_js.py::test_noindexentry", "tests/test_domain_py.py::test_noindexentry"] | ["tests/test_domain_c.py::test_expressions", "tests/test_domain_c.py::test_type_definitions", "tests/test_domain_c.py::test_macro_definitions", "tests/test_domain_c.py::test_member_definitions", "tests/test_domain_c.py::test_function_definitions", "tests/test_domain_c.py::test_nested_name", "tests/test_domain_c.py::tes... | null | true | 2020-07-02T15:31:35Z | 4 | 53 | 4 | 1,183 | 0 | 0.8 | 1 | 0.7 | 0.85 | 0.373833 | 82.209 | |
3,768 | swe_smith::train::15 | swe_smith | train | 15 | oauthlib__oauthlib.1fd52536.combine_file__366dyxhy | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OpenID Connect grant types broken after attribute access changes
#### Description
After recent changes to the `GrantTypeBase` class, OpenID Connect grant types are failing to work properly. The `__getattr__` method seems to be appending an underscore to attribute names when proxying to the target, and the `__setattr_... | diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py
index 29d583e..c5a058e 100644
--- a/oauthlib/openid/connect/core/grant_types/base.py
+++ b/oauthlib/openid/connect/core/grant_types/base.py
@@ -17,11 +17,14 @@ class GrantTypeBase:
# proxy_target grant ... | ["tests/oauth2/rfc6749/endpoints/test_metadata.py::MetadataEndpointTest::test_openid_oauth2_preconfigured", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_claims_stored_on_code_creation", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_inval... | ["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 | 88 | 172 | 2,104 | 0 | 0.6 | 1 | 0.75 | 1 | 0.644 | 82.207 | |||
3,769 | swe_smith::train::48100 | swe_smith | train | 48,100 | sqlfluff__sqlfluff.50a1c4b6.func_pm_class_rm_funcs__78gnkvic | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | PythonTemplater methods removed causing AttributeError
#### Description
The PythonTemplater class is missing several critical methods that were previously available. When attempting to use the templater, it fails with AttributeError because methods like `_substring_occurrences`, `_split_invariants`, and `_filter_occu... | diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py
index a2126a8..fabfd7b 100644
--- a/src/sqlfluff/core/templaters/python.py
+++ b/src/sqlfluff/core/templaters/python.py
@@ -449,16 +449,6 @@ class PythonTemplater(RawTemplater):
)
return slices, templated_... | ["test/core/templaters/python_test.py::test__templater_python", "test/core/templaters/python_test.py::test__templater_python_substring_occurrences[-substrings0-positions0]", "test/core/templaters/python_test.py::test__templater_python_substring_occurrences[a-substrings1-positions1]", "test/core/templaters/python_test.p... | ["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 129 | 11 | 1,282 | 0 | 0.6 | 1 | 0.75 | 1 | 0.643667 | 82.206 | |||
3,770 | swe_smith::train::44530 | swe_smith | train | 44,530 | pydata__patsy.a5d16484.lm_rewrite__ore8kzdt | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | # Dictionary constraint with duplicate keys not properly handled
## Description
I found an issue with the `linear_constraint` function in `patsy/constraint.py` when using dictionaries with duplicate keys. The current implementation doesn't properly handle this case and can lead to unexpected behavior.
When using a d... | diff --git a/patsy/constraint.py b/patsy/constraint.py
index 6c04414..ba9b75b 100644
--- a/patsy/constraint.py
+++ b/patsy/constraint.py
@@ -378,64 +378,62 @@ class _EvalConstraint(object):
def linear_constraint(constraint_like, variable_names):
"""This is the internal interface implementing
DesignInfo.linea... | ["patsy/constraint.py::test_linear_constraint"] | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 98 | 1 | 1,900 | 0 | 0.6 | 1 | 0.75 | 1 | 0.643333 | 82.205 | |||
3,771 | swe_smith::train::1938 | swe_smith | train | 1,938 | agronholm__typeguard.b6a7e438.lm_rewrite__1qygh96d | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | # Callable type checking doesn't validate function signatures correctly
## Description
I'm encountering issues with the `check_callable` function when validating function signatures against `Callable` type annotations. The function doesn't properly validate the number of arguments or handle keyword-only arguments cor... | diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py
index 5e34036..3934eea 100644
--- a/src/typeguard/_checkers.py
+++ b/src/typeguard/_checkers.py
@@ -143,64 +143,60 @@ BINARY_MAGIC_METHODS = {
}
-def check_callable(
- value: Any,
- origin_type: Any,
- args: tuple[Any, ...],
- memo: T... | ["tests/test_checkers.py::TestCallable::test_too_few_arguments", "tests/test_checkers.py::TestCallable::test_too_many_arguments", "tests/test_checkers.py::TestCallable::test_mandatory_kwonlyargs"] | ["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 | 104 | 3 | 1,774 | 0 | 0.6 | 1 | 0.75 | 1 | 0.642333 | 82.202 | |||
3,772 | swe_smith::train::28422 | swe_smith | train | 28,422 | encode__starlette.db5063c2.combine_module__coodry6z | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | # Authentication and CORS middleware issues in Starlette
I've found several issues with the authentication and CORS middleware in Starlette:
## Authentication Middleware Issue
The `AuthenticationMiddleware` constructor has the app and backend parameters swapped in the assignment. This causes authentication to fail c... | diff --git a/starlette/middleware/authentication.py b/starlette/middleware/authentication.py
index 8555ee0..c7b4c68 100644
--- a/starlette/middleware/authentication.py
+++ b/starlette/middleware/authentication.py
@@ -20,10 +20,10 @@ class AuthenticationMiddleware:
backend: AuthenticationBackend,
on_er... | ["tests/middleware/test_cors.py::test_cors_allow_all[asyncio]", "tests/middleware/test_cors.py::test_cors_allow_all_except_credentials[asyncio]", "tests/middleware/test_cors.py::test_cors_allow_specific_origin[asyncio]", "tests/middleware/test_cors.py::test_cors_disallowed_preflight[asyncio]", "tests/middleware/test_co... | ["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 | 2 | 44 | 26 | 2,971 | 0 | 0.6 | 1 | 0.75 | 1 | 0.641833 | 82.2005 | |||
3,773 | swe_bench::test::1303 | swe_bench | test | 1,303 | pydata__xarray-7112 | pydata/xarray | pydata/xarray | python | 114bf98719f31a653f2ef7bc7fcdfaf010eb3612 | New deep copy behavior in 2022.9.0 causes maximum recursion error
### What happened?
I have a case where a Dataset to be written to a NetCDF file has "ancillary_variables" that have a circular dependence. For example, variable A has `.attrs["ancillary_variables"]` that contains variable B, and B has `.attrs["ancillary... | CC @headtr1ck any idea if this is supposed to work with your new #7089?
I get a similar error for different structures and if I do something like `data_arr.where(data_arr > 5, drop=True)`. In this case I have dask array based DataArrays and dask ends up trying to hash the object and it ends up in a loop trying to get x... | diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py
--- a/xarray/core/dataarray.py
+++ b/xarray/core/dataarray.py
@@ -516,7 +516,7 @@ def _overwrite_indexes(
new_indexes.pop(name)
if rename_dims:
- new_variable.dims = [rename_dims.get(d, d) for d in new_variable.dims]
+ ... | diff --git a/xarray/tests/test_concat.py b/xarray/tests/test_concat.py
--- a/xarray/tests/test_concat.py
+++ b/xarray/tests/test_concat.py
@@ -219,7 +219,9 @@ def test_concat_errors(self):
concat([data, data], "new_dim", coords=["not_found"])
with pytest.raises(ValueError, match=r"global attribu... | ["xarray/tests/test_dataarray.py::test_deepcopy_recursive", "xarray/tests/test_dataset.py::test_deepcopy_recursive", "xarray/tests/test_formatting.py::TestFormatting::test_array_repr_recursive", "xarray/tests/test_variable.py::TestVariable::test_copy_deep_recursive", "xarray/tests/test_variable.py::TestIndexVariable::t... | ["xarray/tests/test_concat.py::test_concat_compat", "xarray/tests/test_concat.py::TestConcatDataset::test_concat_simple[dim1-different]", "xarray/tests/test_concat.py::TestConcatDataset::test_concat_simple[dim1-minimal]", "xarray/tests/test_concat.py::TestConcatDataset::test_concat_simple[dim2-different]", "xarray/test... | null | true | 2022-10-01T15:24:40Z | 5 | 103 | 5 | 10,333 | 0 | 0.8 | 1 | 0.65 | 0.85 | 0.843333 | 82.1925 | |
3,774 | swe_smith::train::30608 | swe_smith | train | 30,608 | gweis__isodate.17cb25eb.lm_rewrite__j6o0746p | swesmith/gweis__isodate.17cb25eb | gweis/isodate | python | null | KeyError when parsing dates without a sign
There seems to be an issue with the `parse_date` function in the `isodate` module. When attempting to parse dates that do not include a sign, a `KeyError` is raised. This is affecting the ability to correctly parse standard date formats like `YYYY-MM-DD` or `YYYYMMDD` when th... | diff --git a/src/isodate/isodates.py b/src/isodate/isodates.py
index aa432c5..0ee29bc 100644
--- a/src/isodate/isodates.py
+++ b/src/isodate/isodates.py
@@ -21,7 +21,8 @@ DATE_REGEX_CACHE: dict[tuple[int, bool], list[re.Pattern[str]]] = {}
# only for 4 digit years).
-def build_date_regexps(yeardigits: int = 4, exp... | ["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::tes... | ["tests/test_date.py::test_parse[4-1-W1-1-None-%YW%W%w]", "tests/test_date.py::test_parse[6-+001985-expected16-%Y]", "tests/test_date.py::test_parse[6-+001985-04-expected17-%Y-%m]", "tests/test_date.py::test_parse[6-+001985-04-12-expected18-%Y-%m-%d]", "tests/test_date.py::test_parse[6-+0019850412-expected19-%Y%m%d]", ... | jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb | true | null | 1 | 143 | 30 | 973 | 0 | 0.6 | 1 | 0.75 | 1 | 0.638833 | 82.1915 | |||
3,775 | swe_smith::train::51590 | swe_smith | train | 51,590 | pydicom__pydicom.7d361b3d.combine_module__4klepa5f | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | samples_per_pixel property returns incorrect value
#### Description
The `samples_per_pixel` property in `RunnerBase` is returning an incorrect value. When a value is set for `samples_per_pixel`, the property returns `value + 1` instead of the actual value that was set.
#### Steps/Code to Reproduce
```python
from py... | diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py
index 10a4a93..c8118c0 100644
--- a/src/pydicom/pixels/common.py
+++ b/src/pydicom/pixels/common.py
@@ -503,9 +503,9 @@ class RunnerBase:
def samples_per_pixel(self) -> int:
"""Return the expected number of samples per pixel in the d... | ["tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_validate_options", "tests/pixels/test_common.py::TestRunnerBase::test_set_options_ds", "tests/pixels/test_common.py::TestRunnerBase::test_frame_length[shape1-1-length1]", "tests/pixels/test_common.... | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_set_number_of_frames", "tests/pixels/test_common.py::TestRunnerBase::tes... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 2 | 138 | 40 | 1,056 | 0 | 0.6 | 1 | 0.75 | 1 | 0.636 | 82.183 | |||
3,776 | swe_smith::train::10901 | swe_smith | train | 10,901 | paramiko__paramiko.23f92003.lm_rewrite__agngocmq | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | ### Authentication Failure with Unsupported Auth Type
#### Description
It seems there's an issue with the authentication process when an unsupported authentication type is requested. The expected behavior is to receive a `BadAuthenticationType` exception, indicating the allowed authentication types. However, the curr... | diff --git a/paramiko/transport.py b/paramiko/transport.py
index f0fcb97..95836dc 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -1338,18 +1338,9 @@ class Transport(threading.Thread, ClosingContextManager):
self.lock.release()
return chan
- def connect(
- self,
- ... | ["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthOnlyHandler_::fallback_pubkey_algorithm::uses_first_preferred_algo_if_key_type_not_in_list", "tests/auth.py::SHA2SignaturePubkeys::pubkey_auth_honors_disabled_algorithms", "tests/auth.py::SHA2SignaturePubkeys::client_sha2_disabled_server_sha1_disabled_n... | ["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 | 126 | 6 | 1,292 | 0 | 0.6 | 1 | 0.75 | 1 | 0.635333 | 82.181 | |||
3,777 | swe_smith::train::26588 | swe_smith | train | 26,588 | pylint-dev__astroid.b114f6b5.lm_rewrite__jokt8mvk | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | ### Issue with `dict.fromkeys()` Inference
#### Describe the Bug
It seems there's an issue with the inference of `dict.fromkeys()` when certain arguments are provided. Specifically, the function does not handle cases with incorrect argument types or numbers gracefully, leading to unexpected behavior.
#### How to Rep... | diff --git a/astroid/brain/brain_builtin_inference.py b/astroid/brain/brain_builtin_inference.py
index a56b152..ca014f6 100644
--- a/astroid/brain/brain_builtin_inference.py
+++ b/astroid/brain/brain_builtin_inference.py
@@ -930,66 +930,72 @@ def infer_dict_fromkeys(node, context: InferenceContext | None = None):
... | ["tests/brain/test_brain.py::test_infer_dict_from_keys"] | ["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 | 120 | 1 | 1,400 | 0 | 0.6 | 1 | 0.75 | 1 | 0.633333 | 82.175 | |||
3,778 | swe_smith::train::8250 | swe_smith | train | 8,250 | cantools__cantools.0c6a7871.lm_rewrite__bywh0oef | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | The recent changes to the `Signal` class constructor seem to have introduced an issue where the `initial` attribute is no longer being set. This is causing problems when trying to access the `initial` value of a `Signal` object, leading to an `AttributeError`.
To reproduce the issue, you can try creating a `Signal` ob... | diff --git a/src/cantools/database/can/signal.py b/src/cantools/database/can/signal.py
index c518727..47fa70f 100644
--- a/src/cantools/database/can/signal.py
+++ b/src/cantools/database/can/signal.py
@@ -44,116 +44,48 @@ class Signal:
"""
- def __init__(
- self,
- name: str,
- start: i... | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_j1939", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_no_sender", "tests/test_command_line... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 148 | 111 | 821 | 0 | 0.6 | 1 | 0.75 | 1 | 0.630167 | 82.1655 | |||
3,779 | swe_smith::train::170 | swe_smith | train | 170 | oauthlib__oauthlib.1fd52536.combine_file__y02xqgvh | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | # OAuth2 custom validators and token handling broken
I've found several issues with the OAuth2 implementation that cause it to fail in various ways. The main problems appear to be in the `GrantTypeBase` class.
## Description
After recent changes, the OAuth2 implementation is broken in multiple ways:
1. Custom valid... | diff --git a/oauthlib/oauth2/rfc6749/grant_types/base.py b/oauthlib/oauth2/rfc6749/grant_types/base.py
index d96a2db..f26c658 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/base.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/base.py
@@ -93,19 +93,18 @@ class GrantTypeBase:
setattr(self, kw, val)
def... | ["tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_client_id_authentication", "tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_default_uri", "tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_defaul... | ["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 | 54 | 159 | 2,689 | 0 | 0.6 | 1 | 0.75 | 1 | 0.628167 | 82.1595 | |||
3,780 | swe_smith::train::45924 | swe_smith | train | 45,924 | conan-io__conan.86f29e13.pr_11247 | swesmith/conan-io__conan.86f29e13 | conan-io/conan | python | null | Error when using custom package_id_mode in Conan
I've encountered an issue when using custom `package_id_mode` settings in Conan. It seems that certain modes are not being recognized correctly, leading to errors during package creation. Here's a minimal example to reproduce the problem:
```python
from conan import Co... | diff --git a/conans/client/graph/install_graph.py b/conans/client/graph/install_graph.py
index c071b0d..2f5be72 100644
--- a/conans/client/graph/install_graph.py
+++ b/conans/client/graph/install_graph.py
@@ -518,12 +518,27 @@ class InstallGraph:
return missing, invalid
- def raise_errors(self):
- ... | ["test/functional/only_source_test.py::OnlySourceTest::test_build_policies_in_conanfile", "test/functional/only_source_test.py::OnlySourceTest::test_conan_test", "test/functional/only_source_test.py::OnlySourceTest::test_reuse", "test/functional/only_source_test.py::test_build_policy_missing", "test/integration/command... | [] | jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13 | true | null | 2 | 120 | 25 | 1,351 | 0 | 0.6 | 1 | 0.75 | 1 | 0.625167 | 82.1505 | |||
3,781 | swe_smith::train::44516 | swe_smith | train | 44,516 | pydata__patsy.a5d16484.lm_rewrite__hc3q2vg3 | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | There seems to be an issue with the `_do_highlevel_design` function when handling formula-like inputs. Specifically, when a tuple is passed as the `formula_like` argument, the function expects exactly two elements. If the tuple does not meet this requirement, a `PatsyError` is raised, indicating that the tuple must hav... | diff --git a/patsy/highlevel.py b/patsy/highlevel.py
index 1af6ce8..fb0d515 100644
--- a/patsy/highlevel.py
+++ b/patsy/highlevel.py
@@ -148,84 +148,78 @@ def incr_dbuilders(formula_like, data_iter_maker, eval_env=0, NA_action="drop"):
# (DesignInfo, DesignInfo)
# any object with a special method __patsy_get_mode... | ["patsy/test_highlevel.py::test_formula_likes"] | ["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 | 140 | 1 | 944 | 0 | 0.6 | 1 | 0.75 | 1 | 0.624 | 82.147 | |||
3,782 | swe_smith::train::909 | swe_smith | train | 909 | oauthlib__oauthlib.1fd52536.lm_rewrite__s8shk3hn | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | ServiceApplicationClient fails to validate required JWT claims
I'm trying to use the ServiceApplicationClient to generate JWT assertions for OAuth2 token requests, but I've noticed that the validation for required claims has been broken.
When I try to create a request with missing required claims, the client doesn't ... | diff --git a/oauthlib/oauth2/rfc6749/clients/service_application.py b/oauthlib/oauth2/rfc6749/clients/service_application.py
index 8fb1737..bfb83f5 100644
--- a/oauthlib/oauth2/rfc6749/clients/service_application.py
+++ b/oauthlib/oauth2/rfc6749/clients/service_application.py
@@ -61,18 +61,9 @@ class ServiceApplication... | ["tests/oauth2/rfc6749/clients/test_service_application.py::ServiceApplicationClientTest::test_request_body", "tests/oauth2/rfc6749/clients/test_service_application.py::ServiceApplicationClientTest::test_request_body_no_initial_private_key"] | ["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 | 106 | 2 | 1,620 | 0 | 0.6 | 1 | 0.75 | 1 | 0.623333 | 82.145 | |||
3,783 | swe_smith::train::6526 | swe_smith | train | 6,526 | mahmoud__boltons.3bfcfdd0.lm_rewrite__kftwnkqs | swesmith/mahmoud__boltons.3bfcfdd0 | mahmoud/boltons | python | null | Unexpected behavior in backoff_iter function
Hey there,
I've encountered an issue with the `backoff_iter` function in the `boltons.iterutils` module. It seems like there's a problem when using the function with certain parameters. Here's a quick rundown of what I'm seeing:
1. When calling `backoff_iter(5, 5, count='... | diff --git a/boltons/iterutils.py b/boltons/iterutils.py
index e0a5b90..46ff096 100644
--- a/boltons/iterutils.py
+++ b/boltons/iterutils.py
@@ -635,44 +635,81 @@ def backoff_iter(start, stop, count=None, factor=2.0, jitter=False):
Ethernet's time-tested backoff solution. Defaults to `False`.
"""
- ... | ["tests/test_iterutils.py::test_backoff_repeat", "tests/test_iterutils.py::test_backoff_zero_start", "tests/test_iterutils.py::test_backoff_validation"] | ["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac... | jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0 | true | null | 1 | 113 | 3 | 1,474 | 0 | 0.6 | 1 | 0.75 | 1 | 0.622333 | 82.142 | |||
3,784 | swe_smith::train::45445 | swe_smith | train | 45,445 | dask__dask.5f61e423.lm_rewrite__wf7wp5ae | swesmith/dask__dask.5f61e423 | dask/dask | python | null | ### Issue: Unexpected Behavior in `_meta_from_array` Function
#### Description
The recent changes to the `_meta_from_array` function in `dask/dataframe/io/io.py` seem to have introduced some unexpected behavior when handling arrays with certain characteristics. Specifically, there are issues with handling arrays with... | diff --git a/dask/dataframe/io/io.py b/dask/dataframe/io/io.py
index 10e5429..026cda9 100644
--- a/dask/dataframe/io/io.py
+++ b/dask/dataframe/io/io.py
@@ -23,61 +23,30 @@ lock = Lock()
def _meta_from_array(x, columns=None, index=None, meta=None):
"""Create empty DataFrame or Series which has correct dtype"""
... | ["dask/dataframe/io/tests/test_io.py::test_meta_from_array", "dask/dataframe/io/tests/test_io.py::test_meta_from_1darray", "dask/dataframe/io/tests/test_io.py::test_meta_from_recarray", "dask/dataframe/io/tests/test_io.py::test_from_array_with_record_dtype", "dask/dataframe/io/tests/test_io.py::test_from_dask_array_ind... | ["dask/dataframe/io/tests/test_io.py::test_from_array", "dask/dataframe/io/tests/test_io.py::test_from_pandas_dataframe", "dask/dataframe/io/tests/test_io.py::test_from_pandas_small", "dask/dataframe/io/tests/test_io.py::test_from_pandas_npartitions_is_accurate[1]", "dask/dataframe/io/tests/test_io.py::test_from_pandas... | jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423 | true | null | 1 | 73 | 12 | 2,268 | 0 | 0.6 | 1 | 0.75 | 1 | 0.621333 | 82.139 | |||
3,785 | swe_smith::train::45233 | swe_smith | train | 45,233 | dask__dask.5f61e423.combine_module__hzz2vve9 | swesmith/dask__dask.5f61e423 | dask/dask | python | null | apply_over_axes fails with TypeError when axes is an integer
#### Description
When using `apply_over_axes` with an integer axis instead of a tuple, the function raises a `TypeError: 'int' object is not iterable`. This breaks compatibility with NumPy's `apply_over_axes` which accepts both integers and tuples for the a... | diff --git a/dask/array/routines.py b/dask/array/routines.py
index dc30e91..e628adb 100644
--- a/dask/array/routines.py
+++ b/dask/array/routines.py
@@ -539,34 +539,49 @@ def apply_along_axis(func1d, axis, arr, *args, dtype=None, shape=None, **kwargs)
return result
+@derived_from(np)
@derived_from(np)
def ap... | ["dask/array/tests/test_routines.py::test_apply_over_axes[shape1-0-sum0-<lambda>]", "dask/array/tests/test_routines.py::test_apply_over_axes[shape1-0-sum1-<lambda>]", "dask/array/tests/test_routines.py::test_apply_over_axes[shape1-0-range-<lambda>]", "dask/array/tests/test_routines.py::test_apply_over_axes[shape3-axes3... | ["dask/array/tests/test_routines.py::test_array", "dask/array/tests/test_routines.py::test_array_return_type", "dask/array/tests/test_routines.py::test_derived_docstrings", "dask/array/tests/test_routines.py::test_atleast_nd_no_args[atleast_1d]", "dask/array/tests/test_routines.py::test_atleast_nd_no_args[atleast_2d]",... | jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423 | true | null | 2 | 133 | 8 | 1,063 | 0 | 0.6 | 1 | 0.75 | 1 | 0.6205 | 82.1365 | |||
3,786 | swe_smith::train::52710 | swe_smith | train | 52,710 | pydicom__pydicom.7d361b3d.lm_rewrite__okh7h88f | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | <START WRITING>
Error Handling BulkDataURI and InlineBinary in JSON Conversion
Description
After applying the recent changes, there seems to be an issue with handling `BulkDataURI` and `InlineBinary` attributes during JSON conversion. Specifically, the conversion process does not correctly handle cases where these a... | diff --git a/src/pydicom/jsonrep.py b/src/pydicom/jsonrep.py
index 48fd36f..253aca4 100644
--- a/src/pydicom/jsonrep.py
+++ b/src/pydicom/jsonrep.py
@@ -153,69 +153,64 @@ class JsonDataElementConverter:
"""
from pydicom.dataelem import empty_value_for_VR
- # An attribute with an empty value s... | ["tests/test_json.py::TestPersonName::test_json_pn_from_file", "tests/test_json.py::TestSequence::test_nested_sequences", "tests/test_json.py::TestBinary::test_invalid_inline_binary", "tests/test_json.py::TestBinary::test_valid_bulkdata_uri", "tests/test_json.py::TestBinary::test_invalid_bulkdata_uri", "tests/test_json... | ["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 | 107 | 6 | 1,574 | 0 | 0.6 | 1 | 0.75 | 1 | 0.619 | 82.132 | |||
3,787 | swe_smith::train::5103 | swe_smith | train | 5,103 | agronholm__exceptiongroup.0b4f4937.combine_module__kxbg804z | swesmith/agronholm__exceptiongroup.0b4f4937 | agronholm/exceptiongroup | python | null | ExceptionGroup.split() not handling matching exceptions correctly
When using `ExceptionGroup.split()` with nested exception groups, the matching exceptions are not being included in the returned matching group. The split method appears to be skipping the matching exceptions during the recursive splitting process.
###... | diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py
index a4a7ace..9a0974e 100644
--- a/src/exceptiongroup/_exceptions.py
+++ b/src/exceptiongroup/_exceptions.py
@@ -220,8 +220,6 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]):
for exc in self.exceptions:
... | ["tests/test_catch.py::test_catch_nested_group", "tests/test_exceptions.py::NestedExceptionGroupSplitTest::test_split_by_type", "tests/test_exceptions.py::NestedExceptionGroupSubclassSplitTest::test_split_ExceptionGroup_subclass_derive_and_new_overrides", "tests/test_exceptions.py::NestedExceptionGroupSubclassSplitTest... | ["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 | 2 | 126 | 32 | 1,189 | 0 | 0.6 | 1 | 0.75 | 1 | 0.618167 | 82.1295 | |||
3,788 | swe_smith::train::34471 | swe_smith | train | 34,471 | iterative__dvc.1d6ea681.pr_9047 | swesmith/iterative__dvc.1d6ea681 | iterative/dvc | python | null | # Missing methods in Repo class after config schema change
## Description
After updating the config schema for the "feature" section, many methods that were previously available in the `Repo` class are now missing. This is causing a lot of functionality to break, including file system operations, experiments, and rep... | diff --git a/dvc/config_schema.py b/dvc/config_schema.py
index 3c14d9c..2653c28 100644
--- a/dvc/config_schema.py
+++ b/dvc/config_schema.py
@@ -323,12 +323,12 @@ SCHEMA = {
},
},
# section for experimental features
- # only specified keys are validated, others get logged and then ignored/removed
... | ["tests/unit/repo/test_open_repo.py::test_subrepo_is_constructed_properly[False]", "tests/unit/repo/test_open_repo.py::test_subrepo_is_constructed_properly[True]", "tests/unit/repo/test_repo.py::test_branch_config", "tests/unit/repo/test_repo.py::test_dynamic_cache_initialization"] | ["tests/unit/repo/experiments/test_executor_status.py::test_executor_status_compatibility", "tests/unit/repo/experiments/test_utils.py::test_run_check_ref_format[name-True]", "tests/unit/repo/experiments/test_utils.py::test_run_check_ref_format[group/name-False]", "tests/unit/repo/experiments/test_utils.py::test_run_ch... | jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681 | true | null | 2 | 98 | 4 | 1,731 | 0 | 0.6 | 1 | 0.75 | 1 | 0.615167 | 82.1205 | |||
3,789 | swe_smith::train::52680 | swe_smith | train | 52,680 | pydicom__pydicom.7d361b3d.lm_rewrite__d9jh70r0 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | # Validation error message for invalid encoding profiles is not helpful
## Description
When encoding DICOM pixel data with an invalid encoding profile, the error message doesn't provide enough information about what valid profiles are available for the transfer syntax.
## Problem
When attempting to encode pixel dat... | diff --git a/src/pydicom/pixels/encoders/base.py b/src/pydicom/pixels/encoders/base.py
index c5123f9..437f05d 100644
--- a/src/pydicom/pixels/encoders/base.py
+++ b/src/pydicom/pixels/encoders/base.py
@@ -432,7 +432,7 @@ class EncodeRunner(RunnerBase):
f"expected length - {actual} bytes actual vs. {exp... | ["tests/pixels/test_encoder_base.py::TestEncodeRunner::test_validate_encoding_profile"] | ["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 | 78 | 1 | 2,119 | 0 | 0.6 | 1 | 0.75 | 1 | 0.613167 | 82.1145 | |||
3,790 | swe_smith::train::45396 | swe_smith | train | 45,396 | dask__dask.5f61e423.lm_rewrite__7pdt5n91 | swesmith/dask__dask.5f61e423 | dask/dask | python | null | ### Issue: Incorrect Chunk Handling in `svd_compressed`
I encountered an issue with the `svd_compressed` function in the Dask library where it seems to mishandle chunk sizes, leading to errors. This appears to be related to the way chunks are being processed, especially when the input matrix dimensions and chunk sizes... | diff --git a/dask/array/linalg.py b/dask/array/linalg.py
index feee779..1a95a4b 100644
--- a/dask/array/linalg.py
+++ b/dask/array/linalg.py
@@ -654,15 +654,8 @@ def compression_level(n, q, n_oversamples=10, min_subspace_size=20):
return min(max(min_subspace_size, q + n_oversamples), n)
-def compression_matrix... | ["dask/array/tests/test_linalg.py::test_svd_compressed_compute[power]", "dask/array/tests/test_linalg.py::test_svd_compressed_compute[QR]", "dask/array/tests/test_linalg.py::test_svd_compressed[iterator0]", "dask/array/tests/test_linalg.py::test_svd_compressed[iterator1]", "dask/array/tests/test_linalg.py::test_svd_com... | ["dask/array/tests/test_linalg.py::test_tsqr[20-10-10-None]", "dask/array/tests/test_linalg.py::test_tsqr[20-10-chunks1-None]", "dask/array/tests/test_linalg.py::test_tsqr[20-10-chunks2-None]", "dask/array/tests/test_linalg.py::test_tsqr[40-10-chunks3-None]", "dask/array/tests/test_linalg.py::test_tsqr[128-2-chunks4-No... | jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423 | true | null | 1 | 100 | 28 | 1,678 | 0 | 0.6 | 1 | 0.75 | 1 | 0.613 | 82.114 | |||
3,791 | swe_smith::train::24423 | swe_smith | train | 24,423 | sunpy__sunpy.f8edfd5c.lm_rewrite__bnx6rft1 | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | ### Issue with HTTP Error Handling in Scraper
#### What happened?
While using the `Scraper` class to fetch files from a web directory, it seems that certain HTTP errors are not being handled as expected. Specifically, when encountering HTTP errors such as 400 (Bad Request), 403 (Forbidden), 429 (Too Many Requests), a... | diff --git a/sunpy/net/scraper.py b/sunpy/net/scraper.py
index 202638e..3cd10bd 100644
--- a/sunpy/net/scraper.py
+++ b/sunpy/net/scraper.py
@@ -344,60 +344,43 @@ class Scraper:
Goes over http archives hosted on the web, to return list of files in the given timerange.
"""
directories = self.r... | ["sunpy/net/tests/test_scraper.py::test_http_errors_with_enqueue_limit_new_format[403-1-Forbidden]", "sunpy/net/tests/test_scraper.py::test_connection_error_new_format", "sunpy/net/tests/test_scraper.py::test_http_404_error_debug_message_new_format"] | ["sunpy/net/tests/test_scraper.py::test_directory_date_pattern", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_new_format", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_false", "sunpy/net/tests/test_scraper.py::test_directory_date_patternFalse_new_format", "sunpy/net/tests/test_scraper.... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 87 | 3 | 1,934 | 0 | 0.6 | 1 | 0.75 | 1 | 0.612333 | 82.112 | |||
3,792 | swe_smith::train::28069 | swe_smith | train | 28,069 | jsvine__pdfplumber.02ff4313.lm_rewrite__t92ph1os | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | ### Issue: PDF Structure Tree Parsing Inconsistencies
#### Description
After the recent changes to the `_parse_parent_tree` method in `pdfplumber/structure.py`, there seems to be an issue with how the PDF structure tree is being parsed and constructed. The modifications appear to have introduced inconsistencies in th... | diff --git a/pdfplumber/structure.py b/pdfplumber/structure.py
index 88749d7..4fc4f32 100644
--- a/pdfplumber/structure.py
+++ b/pdfplumber/structure.py
@@ -308,34 +308,78 @@ class PDFStructTree(Findable):
def _parse_parent_tree(self, parent_array: List[Any]) -> None:
"""Populate the structure tree using ... | ["tests/test_structure.py::Test::test_structure_tree", "tests/test_structure.py::TestClass::test_all_mcids", "tests/test_structure.py::TestClass::test_element_bbox", "tests/test_structure.py::TestClass::test_structure_tree_class", "tests/test_structure.py::TestMany::test_hello_structure", "tests/test_structure.py::Test... | ["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 | 96 | 8 | 1,748 | 0 | 0.6 | 1 | 0.75 | 1 | 0.611333 | 82.109 | |||
3,793 | swe_smith::train::30498 | swe_smith | train | 30,498 | gweis__isodate.17cb25eb.combine_file__hyu6ynuf | swesmith/gweis__isodate.17cb25eb | gweis/isodate | python | null | Date parsing fails with regex pattern mismatch
#### Description
ISO 8601 date parsing is completely broken - all date strings fail to parse with "Unable to parse date string" errors. The regex patterns used for matching date formats appear to be malformed.
#### Steps/Code to Reproduce
```python
from isodate import ... | diff --git a/src/isodate/isodates.py b/src/isodate/isodates.py
index aa432c5..07a8f6b 100644
--- a/src/isodate/isodates.py
+++ b/src/isodate/isodates.py
@@ -45,7 +45,7 @@ def build_date_regexps(yeardigits: int = 4, expanded: bool = False) -> list[re.P
sign = 0
def add_re(regex_text: str) -> None... | ["tests/test_date.py::test_parse[4-19-expected0-%C]", "tests/test_date.py::test_parse[4-1985-expected1-%Y]", "tests/test_date.py::test_parse[4-1985-04-expected2-%Y-%m]", "tests/test_date.py::test_parse[4-198504-expected3-%Y%m]", "tests/test_date.py::test_parse[4-1985-04-12-expected4-%Y-%m-%d]", "tests/test_date.py::tes... | ["tests/test_date.py::test_parse[4-1-W1-1-None-%YW%W%w]", "tests/test_datetime.py::test_format[19850412T1015-expected0-%Y%m%dT%H%M-19850412T1015]", "tests/test_datetime.py::test_format[1985-04-12T10:15-expected1-%Y-%m-%dT%H:%M-1985-04-12T10:15]", "tests/test_datetime.py::test_format[1985102T1015Z-expected2-%Y%jT%H%M%z-... | jyangballin/swesmith.x86_64.gweis_1776_isodate.17cb25eb | true | null | 1 | 127 | 66 | 1,124 | 0 | 0.6 | 1 | 0.75 | 1 | 0.610667 | 82.107 | |||
3,794 | swe_smith::train::38531 | swe_smith | train | 38,531 | amueller__word_cloud.ec24191c.lm_rewrite__lmr3mdp3 | swesmith/amueller__word_cloud.ec24191c | amueller/word_cloud | python | null | ### Issue: AttributeError in `unigrams_and_bigrams` Function
#### Description
After updating the `unigrams_and_bigrams` function in `wordcloud/tokenization.py`, I encountered an issue where the function returns a list instead of a dictionary. This change in return type is causing an `AttributeError` when attempting t... | diff --git a/wordcloud/tokenization.py b/wordcloud/tokenization.py
index 0d461ff..c21d6a0 100644
--- a/wordcloud/tokenization.py
+++ b/wordcloud/tokenization.py
@@ -36,41 +36,79 @@ def pairwise(iterable):
return zip(a, b)
-def unigrams_and_bigrams(words, stopwords, normalize_plurals=True, collocation_threshold... | ["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_stopwords_lowercasing", "test/test_wordcloud.py::test_check_errors", "test/test_wordcloud.py::test_single_color_func", "test/test_wordcloud.py::test_single_color_func_grey", "test/test_wordcloud.py::test_process_text_default_patterns", "test/test_wordcloud.py::test_process_text_regexp_par... | jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c | true | null | 1 | 106 | 28 | 1,535 | 0 | 0.6 | 1 | 0.75 | 1 | 0.609167 | 82.1025 | |||
3,795 | swe_smith::train::30049 | swe_smith | train | 30,049 | getnikola__nikola.0f4c230e.func_pm_remove_cond__fhhep2sm | swesmith/getnikola__nikola.0f4c230e | getnikola/nikola | python | null | WordPress import fails with AttributeError when processing posts
#### Description
When importing WordPress content, the import process crashes with an AttributeError. The import_postpage_item method appears to be missing critical functionality that was previously working.
#### Steps/Code to Reproduce
```python
from... | diff --git a/nikola/plugins/command/import_wordpress.py b/nikola/plugins/command/import_wordpress.py
index 9a8b130..cf2c2ae 100644
--- a/nikola/plugins/command/import_wordpress.py
+++ b/nikola/plugins/command/import_wordpress.py
@@ -886,8 +886,6 @@ to
def import_postpage_item(self, item, wordpress_namespace, out... | ["tests/integration/test_wordpress_import.py::test_filled_directories[pages]", "tests/integration/test_wordpress_import.py::test_filled_directories[posts]", "tests/test_command_import_wordpress.py::test_importing_posts_and_attachments"] | ["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o... | jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e | true | null | 1 | 96 | 3 | 1,733 | 0 | 0.6 | 1 | 0.75 | 1 | 0.608833 | 82.1015 | |||
3,796 | swe_smith::train::12676 | swe_smith | train | 12,676 | lepture__mistune.bf54ef67.lm_rewrite__j6nxx0l5 | swesmith/lepture__mistune.bf54ef67 | lepture/mistune | python | null | Link Parsing Issue in InlineParser
It seems there's a problem with how links are being parsed in the `InlineParser` class. After the recent changes, certain Markdown links are not being processed correctly, leading to unexpected behavior.
To reproduce the issue, try parsing a Markdown string with various link formats... | diff --git a/src/mistune/inline_parser.py b/src/mistune/inline_parser.py
index 97423db..955484f 100644
--- a/src/mistune/inline_parser.py
+++ b/src/mistune/inline_parser.py
@@ -121,75 +121,77 @@ class InlineParser(Parser[InlineState]):
return m.end()
def parse_link(self, m: Match[str], state: InlineStat... | ["tests/test_commonmark.py::TestCommonMark::test_backslash_escapes_022", "tests/test_commonmark.py::TestCommonMark::test_backslash_escapes_023", "tests/test_commonmark.py::TestCommonMark::test_code_spans_342", "tests/test_commonmark.py::TestCommonMark::test_emphasis_and_strong_emphasis_403", "tests/test_commonmark.py::... | ["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx... | jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67 | true | null | 1 | 130 | 176 | 1,046 | 0 | 0.6 | 1 | 0.75 | 1 | 0.607667 | 82.098 | |||
3,797 | swe_smith::train::24416 | swe_smith | train | 24,416 | sunpy__sunpy.f8edfd5c.lm_rewrite__yw6n57uk | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | # ValueError when parsing IGRF coefficients with future years
## Description
I'm encountering an issue with the `BaseMagnetic` class when trying to parse the IGRF coefficient file. The code fails with a `ValueError` when trying to convert a string to a float.
```python
from sunpy.coordinates import Geomagnetic
obsti... | diff --git a/sunpy/coordinates/frames.py b/sunpy/coordinates/frames.py
index 8e1efd5..a070fc4 100644
--- a/sunpy/coordinates/frames.py
+++ b/sunpy/coordinates/frames.py
@@ -920,32 +920,100 @@ class BaseMagnetic(SunPyBaseCoordinateFrame):
@property
def _lowest_igrf_coeffs(self):
- with open(self._igrf... | ["sunpy/coordinates/tests/test_frames.py::test_magnetic_model_default"] | ["sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args0-None]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args1-kwargs1]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args2-None]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args3-kwargs3]", "sunpy/coordinate... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 116 | 1 | 1,320 | 0 | 0.6 | 1 | 0.75 | 1 | 0.606667 | 82.095 | |||
3,798 | r2e_gym::train::5137 | r2e_gym | train | 5,137 | pyramid__2edbd967ef8f017f53a565d913556c38f545bbaf | pyramid | pylons/pyramid | python | 2edbd967ef8f017f53a565d913556c38f545bbaf | **Analysis:**
- **Key Parts:**
- **Commit Details:** The commit introduces a function `_error_handler` to clear `request.exception` and `request.exc_info` when an exception view fails to handle an error. This refactoring aims to prevent lingering exception information in the request object.
- **Test Results:** Pre... | diff --git a/pyramid/tweens.py b/pyramid/tweens.py
--- a/pyramid/tweens.py
+++ b/pyramid/tweens.py
@@ -10,6 +10,50 @@
from zope.interface import providedBy
from pyramid.view import _call_view
+def _error_handler(request, exc):
+ # NOTE: we do not need to delete exc_info because this function
+ # should never ... | diff --git a/pyramid/tests/test_tweens.py b/pyramid/tests/test_tweens.py
--- a/pyramid/tests/test_tweens.py
+++ b/pyramid/tests/test_tweens.py
@@ -22,6 +22,8 @@
request = DummyRequest()
result = tween(request)
self.assertTrue(result is dummy_response)
+ self.assertIsNone(request.except... | null | null | namanjain12/pyramid_final:2edbd967ef8f017f53a565d913556c38f545bbaf | true | null | 1 | 86 | null | 2,631 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.725167 | 82.09425 | ||
3,799 | swe_smith::train::32775 | swe_smith | train | 32,775 | pydantic__pydantic.acb0f10f.lm_rewrite__axx0a4pn | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | Model signature generation broken for fields with exclude=True
#### Description
When creating a Pydantic model with fields that have `exclude=True`, the signature generation fails because the code tries to access `field_info.exclude` but this attribute doesn't exist on `FieldInfo` objects.
#### Steps/Code to Reprodu... | diff --git a/pydantic/_internal/_signature.py b/pydantic/_internal/_signature.py
index 977e5d2..dca5ac4 100644
--- a/pydantic/_internal/_signature.py
+++ b/pydantic/_internal/_signature.py
@@ -77,90 +77,62 @@ def _process_param_defaults(param: Parameter) -> Parameter:
return param
-def _generate_signature_para... | ["tests/test_aliases.py::test_validation_alias_with_alias", "tests/test_aliases.py::test_validation_alias_from_str_alias", "tests/test_aliases.py::test_validation_alias_from_list_alias", "tests/test_aliases.py::test_serialization_alias_with_alias", "tests/test_aliases.py::test_serialization_alias_from_alias", "tests/te... | ["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_... | jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f | true | null | 1 | 126 | 37 | 1,097 | 0 | 0.6 | 1 | 0.75 | 1 | 0.602833 | 82.0835 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.