Dataset Viewer
Auto-converted to Parquet Duplicate
repo
stringclasses
9 values
instance_id
stringlengths
18
32
base_commit
stringlengths
40
40
patch
stringlengths
437
6.86k
test_patch
stringlengths
418
3.51k
problem_statement
stringlengths
162
5.36k
hints_text
stringlengths
0
15.4k
created_at
stringdate
2016-09-15 20:01:58
2023-08-07 19:30:22
version
stringlengths
3
7
FAIL_TO_PASS
stringlengths
20
712
PASS_TO_PASS
stringlengths
2
28.8k
environment_setup_commit
stringlengths
40
40
difficulty
stringclasses
3 values
astropy/astropy
astropy__astropy-7166
26d147868f8a891a6009a25cd6a8576d2e1bd747
diff --git a/astropy/utils/misc.py b/astropy/utils/misc.py --- a/astropy/utils/misc.py +++ b/astropy/utils/misc.py @@ -4,9 +4,6 @@ A "grab bag" of relatively small general-purpose utilities that don't have a clear module/package to live in. """ - - - import abc import contextlib import difflib @@ -27,7 +24,6 @@ ...
diff --git a/astropy/utils/tests/test_misc.py b/astropy/utils/tests/test_misc.py --- a/astropy/utils/tests/test_misc.py +++ b/astropy/utils/tests/test_misc.py @@ -80,14 +80,26 @@ def __call__(self, *args): "FOO" pass + @property + def bar(self): + "BAR" + ...
InheritDocstrings metaclass doesn't work for properties Inside the InheritDocstrings metaclass it uses `inspect.isfunction` which returns `False` for properties.
This was as implemented back in #2159. I don't see any `inspect.isproperty`. Do you have any suggestions? I guess it should work with [inspect.isdatadescriptor](https://docs.python.org/3/library/inspect.html#inspect.isdatadescriptor). And I wonder if this class is still needed, it seems that it started with #2136 for...
2018-02-07T15:05:31Z
1.3
["astropy/utils/tests/test_misc.py::test_inherit_docstrings"]
["astropy/utils/tests/test_misc.py::test_isiterable", "astropy/utils/tests/test_misc.py::test_signal_number_to_name_no_failure", "astropy/utils/tests/test_misc.py::test_skip_hidden", "astropy/utils/tests/test_misc.py::test_JsonCustomEncoder", "astropy/utils/tests/test_misc.py::test_check_broadcast", "astropy/utils/test...
848c8fa21332abd66b44efe3cb48b72377fb32cc
<15 min fix
astropy/astropy
astropy__astropy-14995
b16c7d12ccbc7b2d20364b89fb44285bcbfede54
diff --git a/astropy/nddata/mixins/ndarithmetic.py b/astropy/nddata/mixins/ndarithmetic.py --- a/astropy/nddata/mixins/ndarithmetic.py +++ b/astropy/nddata/mixins/ndarithmetic.py @@ -520,10 +520,10 @@ def _arithmetic_mask(self, operation, operand, handle_mask, axis=None, **kwds): elif self.mask is None and ope...
diff --git a/astropy/nddata/mixins/tests/test_ndarithmetic.py b/astropy/nddata/mixins/tests/test_ndarithmetic.py --- a/astropy/nddata/mixins/tests/test_ndarithmetic.py +++ b/astropy/nddata/mixins/tests/test_ndarithmetic.py @@ -1310,3 +1310,42 @@ def test_raise_method_not_supported(): # raise error for unsupported ...
In v5.3, NDDataRef mask propagation fails when one of the operand does not have a mask ### Description This applies to v5.3. It looks like when one of the operand does not have a mask, the mask propagation when doing arithmetic, in particular with `handle_mask=np.bitwise_or` fails. This is not a problem in v5.2. ...
Welcome to Astropy 👋 and thank you for your first issue! A project member will respond to you as soon as possible; in the meantime, please double-check the [guidelines for submitting issues](https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md#reporting-issues) and make sure you've provided the requested deta...
2023-06-27T19:48:18Z
5.2
["astropy/nddata/mixins/tests/test_ndarithmetic.py::test_nddata_bitmask_arithmetic"]
["astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data10-data20]", "astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data11-data21]", "astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data12-data22]", "astropy/nddata/mixins/tests/test_ndarithmetic.py...
362f6df12abf9bd769d4915fabf955c993ea22cf
<15 min fix
django/django
django__django-7530
f8fab6f90233c7114d642dfe01a4e6d4cb14ee7d
diff --git a/django/core/management/commands/makemigrations.py b/django/core/management/commands/makemigrations.py --- a/django/core/management/commands/makemigrations.py +++ b/django/core/management/commands/makemigrations.py @@ -105,7 +105,7 @@ def handle(self, *app_labels, **options): # At least...
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -598,6 +598,7 @@ def test_makemigrations_empty_connections(self): init_file = os.path.join(migration_dir, '__init__.py') ...
makemigrations router.allow_migrate() calls for consistency checks use incorrect (app_label, model) pairs Description As reported in ticket:27200#comment:14, I makemigrations incorrectly calls allow_migrate() for each app with all the models in the project rather than for each app with the app's models. It broke the ...
2016-11-08T17:27:19Z
1.11
["test_squashmigrations_initial_attribute (migrations.test_commands.SquashMigrationsTests)"]
["test_squashmigrations_invalid_start (migrations.test_commands.SquashMigrationsTests)", "test_squashmigrations_optimizes (migrations.test_commands.SquashMigrationsTests)", "test_squashmigrations_squashes (migrations.test_commands.SquashMigrationsTests)", "test_squashmigrations_valid_start (migrations.test_commands.Squ...
3545e844885608932a692d952c12cd863e2320b5
15 min - 1 hour
django/django
django__django-17087
4a72da71001f154ea60906a2f74898d32b7322a7
diff --git a/django/db/migrations/serializer.py b/django/db/migrations/serializer.py --- a/django/db/migrations/serializer.py +++ b/django/db/migrations/serializer.py @@ -168,7 +168,7 @@ def serialize(self): ): klass = self.value.__self__ module = klass.__module__ - return ...
diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py --- a/tests/migrations/test_writer.py +++ b/tests/migrations/test_writer.py @@ -211,6 +211,10 @@ class NestedChoices(models.TextChoices): X = "X", "X value" Y = "Y", "Y value" + @classmethod + def method(cls...
Class methods from nested classes cannot be used as Field.default. Description (last modified by Mariusz Felisiak) Given the following model: class Profile(models.Model): class Capability(models.TextChoices): BASIC = ("BASIC", "Basic") PROFESSIONAL = ("PROFESSIONAL", "Professional") @classmethod d...
Thanks for the report. It seems that FunctionTypeSerializer should use __qualname__ instead of __name__: django/db/migrations/serializer.py diff --git a/django/db/migrations/serializer.py b/django/db/migrations/serializer.py index d88cda6e20..06657ebaab 100644 a b class FunctionTypeSerializer(BaseSerializer): 168168 ):...
2023-07-17T20:28:41Z
5.0
["test_serialize_nested_class_method (migrations.test_writer.WriterTests.test_serialize_nested_class_method)"]
["test_args_kwargs_signature (migrations.test_writer.OperationWriterTests.test_args_kwargs_signature)", "test_args_signature (migrations.test_writer.OperationWriterTests.test_args_signature)", "test_empty_signature (migrations.test_writer.OperationWriterTests.test_empty_signature)", "test_expand_args_signature (migrati...
4a72da71001f154ea60906a2f74898d32b7322a7
<15 min fix
matplotlib/matplotlib
matplotlib__matplotlib-13989
a3e2897bfaf9eaac1d6649da535c4e721c89fa69
diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -6686,7 +6686,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, density = bool(density) or bool(normed) if density and not stacked...
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 @@ -6369,3 +6369,10 @@ def test_hist_nan_data(): assert np.allclose(bins, nanbins) assert np.allclose(edges, nanedges) + + +def test_hist_range_a...
hist() no longer respects range=... when density=True <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--> <!--You can feel free to delete the sections that do not apply.--> ### Bug report **Bug summary** <!--A short 1-2 sentences that succinctly describes...
:anger: I was about to tag....
2019-04-19T01:47:57Z
3.0
["lib/matplotlib/tests/test_axes.py::test_hist_range_and_density"]
["lib/matplotlib/tests/test_axes.py::test_get_labels", "lib/matplotlib/tests/test_axes.py::test_spy_invalid_kwargs", "lib/matplotlib/tests/test_axes.py::test_twinx_cla", "lib/matplotlib/tests/test_axes.py::test_twinx_axis_scales[png]", "lib/matplotlib/tests/test_axes.py::test_twin_inherit_autoscale_setting", "lib/matpl...
d0628598f8d9ec7b0da6b60e7b29be2067b6ea17
<15 min fix
matplotlib/matplotlib
matplotlib__matplotlib-26466
3dd06a46750d174f821df5377996f493f1af4ebb
diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py --- a/lib/matplotlib/text.py +++ b/lib/matplotlib/text.py @@ -1389,7 +1389,8 @@ def __init__(self, artist, ref_coord, unit="points"): The screen units to use (pixels or points) for the offset input. """ self._artist = artist - ...
diff --git a/lib/matplotlib/tests/test_text.py b/lib/matplotlib/tests/test_text.py --- a/lib/matplotlib/tests/test_text.py +++ b/lib/matplotlib/tests/test_text.py @@ -16,7 +16,7 @@ import matplotlib.transforms as mtransforms from matplotlib.testing.decorators import check_figures_equal, image_comparison from matplot...
Updating an array passed as the xy parameter to annotate updates the anottation ### Bug report **Bug summary** When an array is used as the _xy_ kwarg for an annotation that includes arrows, changing the array after calling the function changes the arrow position. It is very likely that the same array is kept inste...
I guess that a simple patch to _AnnotationBase init should work, but I'd check for more places where the a similar bug can be hidden: Maybe changing: https://github.com/matplotlib/matplotlib/blob/89fa0e43b63512c595387a37bdfd37196ced69be/lib/matplotlib/text.py#L1332 for `self.xy=np.array(xy)` is enough. This code...
2023-08-07T19:30:22Z
3.7
["lib/matplotlib/tests/test_text.py::test_annotate_and_offsetfrom_copy_input[png]"]
["lib/matplotlib/tests/test_text.py::test_font_styles[png]", "lib/matplotlib/tests/test_text.py::test_font_styles[pdf]", "lib/matplotlib/tests/test_text.py::test_multiline[png]", "lib/matplotlib/tests/test_text.py::test_multiline[pdf]", "lib/matplotlib/tests/test_text.py::test_multiline2[png]", "lib/matplotlib/tests/te...
0849036fd992a2dd133a0cffc3f84f58ccf1840f
15 min - 1 hour
pydata/xarray
pydata__xarray-2905
7c4e2ac83f7b4306296ff9b7b51aaf016e5ad614
diff --git a/xarray/core/variable.py b/xarray/core/variable.py --- a/xarray/core/variable.py +++ b/xarray/core/variable.py @@ -218,7 +218,8 @@ def as_compatible_data(data, fastpath=False): data = np.timedelta64(getattr(data, "value", data), "ns") # we don't want nested self-described arrays - data = ...
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 @@ -2300,6 +2300,11 @@ def __init__(self, array): class CustomIndexable(CustomArray, indexing.ExplicitlyIndexed): pass + # Type with data stor...
Variable.__setitem__ coercing types on objects with a values property #### Minimal example ```python import xarray as xr good_indexed, bad_indexed = xr.DataArray([None]), xr.DataArray([None]) class HasValues(object): values = 5 good_indexed.loc[{'dim_0': 0}] = set() bad_indexed.loc[{'dim_0': 0}] = ...
Thanks for the report. We did not consider to store an object type array other than string, but it should be supported. I think we should improve this line, https://github.com/pydata/xarray/blob/39b2a37207fc8e6c5199ba9386831ba7eb06d82b/xarray/core/variable.py#L171-L172 We internally use many inhouse array-lik...
2019-04-17T21:52:37Z
0.12
["xarray/tests/test_variable.py::TestAsCompatibleData::test_unsupported_type"]
["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...
1c198a191127c601d091213c4b3292a8bb3054e1
15 min - 1 hour
pydata/xarray
pydata__xarray-7393
41fef6f1352be994cd90056d47440fe9aa4c068f
diff --git a/xarray/core/indexing.py b/xarray/core/indexing.py --- a/xarray/core/indexing.py +++ b/xarray/core/indexing.py @@ -1531,8 +1531,12 @@ def __init__( self.level = level def __array__(self, dtype: DTypeLike = None) -> np.ndarray: + if dtype is None: + dtype = self.dtype ...
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 @@ -697,3 +697,10 @@ def test_safe_cast_to_index_datetime_datetime(): actual = safe_cast_to_index(np.array(dates)) assert_array_equal(expected, actual) assert isi...
stack casts int32 dtype coordinate to int64 ### What happened? The code example below results in `False`, because the data type of the `a` coordinate is changed from 'i4' to 'i8'. ### What did you expect to happen? I expect the result to be `True`. Creating a MultiIndex should not change the data type of the Indexes...
Unfortunately this is a pandas thing, so we can't fix it. Pandas only provides `Int64Index` so everything gets cast to that. Fixing that is on the roadmap for pandas 2.0 I think (See https://github.com/pandas-dev/pandas/pull/44819#issuecomment-999790361) Darn. Well, to help this be more transparent, I think it would be...
2022-12-20T04:34:24Z
2022.09
["xarray/tests/test_indexes.py::test_restore_dtype_on_multiindexes[int32]", "xarray/tests/test_indexes.py::test_restore_dtype_on_multiindexes[float32]"]
["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::...
087ebbb78668bdf5d2d41c3b2553e3f29ce75be1
15 min - 1 hour
pylint-dev/pylint
pylint-dev__pylint-4551
99589b08de8c5a2c6cc61e13a37420a868c80599
diff --git a/pylint/pyreverse/diagrams.py b/pylint/pyreverse/diagrams.py --- a/pylint/pyreverse/diagrams.py +++ b/pylint/pyreverse/diagrams.py @@ -122,7 +122,7 @@ def class_names(self, nodes): if isinstance(node, astroid.Instance): node = node._proxied if ( - is...
diff --git a/tests/unittest_pyreverse_writer.py b/tests/unittest_pyreverse_writer.py --- a/tests/unittest_pyreverse_writer.py +++ b/tests/unittest_pyreverse_writer.py @@ -22,12 +22,14 @@ import codecs import os from difflib import unified_diff +from unittest.mock import patch +import astroid import pytest from...
Use Python type hints for UML generation It seems that pyreverse does not read python type hints (as defined by [PEP 484](https://www.python.org/dev/peps/pep-0484/)), and this does not help when you use `None` as a default value : ### Code example ``` class C(object): def __init__(self, a: str = None): ...
Is this something that's in the pipeline (or going to make it)? Type hinting is becoming more and more common, and this will be a huge benefit towards working with `pyreverse`. Especially as it's considered Python idiomatic (and sensible) to use `None` as a default parameter for mutable data structures. @pohutukawa We...
2021-06-07T15:14:31Z
2.9
["tests/unittest_pyreverse_writer.py::test_dot_files[packages_No_Name.dot]", "tests/unittest_pyreverse_writer.py::test_dot_files[classes_No_Name.dot]", "tests/unittest_pyreverse_writer.py::test_get_visibility[names0-special]", "tests/unittest_pyreverse_writer.py::test_get_visibility[names1-private]", "tests/unittest_py...
[]
c04f92ef68e5ea779a60bfddb91dc677c5470fd0
1-4 hours
pylint-dev/pylint
pylint-dev__pylint-8898
1f8c4d9eb185c16a2c1d881c054f015e1c2eb334
diff --git a/pylint/config/argument.py b/pylint/config/argument.py --- a/pylint/config/argument.py +++ b/pylint/config/argument.py @@ -114,7 +114,7 @@ def _regex_transformer(value: str) -> Pattern[str]: def _regexp_csv_transfomer(value: str) -> Sequence[Pattern[str]]: """Transforms a comma separated list of regul...
diff --git a/tests/config/test_config.py b/tests/config/test_config.py --- a/tests/config/test_config.py +++ b/tests/config/test_config.py @@ -5,8 +5,10 @@ from __future__ import annotations import os +import re from pathlib import Path from tempfile import TemporaryDirectory +from typing import Any import pyt...
bad-names-rgxs mangles regular expressions with commas ### Bug description Since pylint splits on commas in this option, instead of taking a list of strings, if there are any commas in the regular expression, the result is mangled before being parsed. The config below demonstrates this clearly by causing pylint to c...
The crash will be fixed in https://github.com/PyCQA/pylint/pull/7228. Regarding the issue with the comma, I think a list of regex is not possible and it could be a big regex with both smaller regex and a ``|``. So we might want to change the way we handle this. thanks for the response! As you mentioned, this isn't urge...
2023-07-29T21:53:59Z
3.0
["tests/config/test_config.py::test_csv_regex_error"]
["tests/config/test_config.py::test_can_read_toml_env_variable", "tests/config/test_config.py::test_unknown_message_id", "tests/config/test_config.py::test_unknown_option_name", "tests/config/test_config.py::test_unknown_short_option_name", "tests/config/test_config.py::test_unknown_confidence", "tests/config/test_conf...
a0ce6e424e3a208f3aed1cbf6e16c40853bec3c0
1-4 hours
pytest-dev/pytest
pytest-dev__pytest-5262
58e6a09db49f34886ff13f3b7520dd0bcd7063cd
diff --git a/src/_pytest/capture.py b/src/_pytest/capture.py --- a/src/_pytest/capture.py +++ b/src/_pytest/capture.py @@ -447,6 +447,10 @@ def name(self): """Ensure that file.name is a string.""" return repr(self.buffer) + @property + def mode(self): + return self.buffer.mode.replace("...
diff --git a/testing/test_capture.py b/testing/test_capture.py --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -1051,6 +1051,9 @@ def test_simple_resume_suspend(self, tmpfile): cap.done() pytest.raises(AttributeError, cap.suspend) + def test_capfd_sys_stdout_mode(self, capf...
_pytest.capture.EncodedFile mode should not include `b` (binary) <!-- Thanks for submitting an issue! Here's a quick checklist for what to provide: --> - [x] a detailed description of the bug or suggestion Exception when youtube-dl logs to pytest captured output. Youtube-dl looks for `b` in `out.mode` to dec...
here's where this comes from: https://github.com/pytest-dev/pytest/blob/6a43c8cd9405c68e223f4c6270bd1e1ac4bc8c5f/src/_pytest/capture.py#L450-L451 Probably an easy fix to ```python @property def mode(self): return self.buffer.mode.replace('b', '') ``` Want to supply a PR with a quick test demonstrating ...
2019-05-14T21:54:55Z
4.5
["testing/test_capture.py::TestFDCapture::test_capfd_sys_stdout_mode"]
["[100%]", "testing/test_capture.py::TestCaptureManager::test_getmethod_default_no_fd", "testing/test_capture.py::TestCaptureManager::test_capturing_basic_api[no]", "testing/test_capture.py::TestCaptureManager::test_capturing_basic_api[sys]", "testing/test_capture.py::TestCaptureManager::test_capturing_basic_api[fd]", ...
693c3b7f61d4d32f8927a74f34ce8ac56d63958e
<15 min fix
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
8