Dataset Viewer
Auto-converted to Parquet Duplicate
repo
stringclasses
3 values
instance_id
stringclasses
6 values
base_commit
stringclasses
6 values
patch
stringclasses
6 values
test_patch
stringclasses
6 values
problem_statement
stringclasses
6 values
hints_text
stringclasses
5 values
created_at
stringdate
2016-11-08 17:27:19
2022-08-08 23:07:49
version
stringclasses
5 values
FAIL_TO_PASS
stringclasses
6 values
PASS_TO_PASS
stringclasses
6 values
environment_setup_commit
stringclasses
5 values
difficulty
stringclasses
2 values
proxy_required
bool
1 class
astropy/astropy
astropy__astropy-7606
3cedd79e6c121910220f8e6df77c54a0b344ea94
diff --git a/astropy/units/core.py b/astropy/units/core.py --- a/astropy/units/core.py +++ b/astropy/units/core.py @@ -728,7 +728,7 @@ def __eq__(self, other): try: other = Unit(other, parse_strict='silent') except (ValueError, UnitsError, TypeError): - return False + ...
diff --git a/astropy/units/tests/test_units.py b/astropy/units/tests/test_units.py --- a/astropy/units/tests/test_units.py +++ b/astropy/units/tests/test_units.py @@ -185,6 +185,13 @@ def test_unknown_unit3(): assert unit != unit3 assert not unit.is_equivalent(unit3) + # Also test basic (in)equalities. +...
Unit equality comparison with None raises TypeError for UnrecognizedUnit ``` In [12]: x = u.Unit('asdf', parse_strict='silent') In [13]: x == None # Should be False --------------------------------------------------------------------------- TypeError Traceback (most recent call la...
`x is None` works fine. Is there a reason why `==` is needed here? `x is None` would indeed be preferred, but `==` should never fail, so this is still a bug.
2018-06-29T16:27:46Z
1.3
["astropy/units/tests/test_units.py::test_unknown_unit3"]
["astropy/units/tests/test_units.py::test_getting_started", "astropy/units/tests/test_units.py::test_initialisation", "astropy/units/tests/test_units.py::test_invalid_power", "astropy/units/tests/test_units.py::test_invalid_compare", "astropy/units/tests/test_units.py::test_convert", "astropy/units/tests/test_units.py:...
848c8fa21332abd66b44efe3cb48b72377fb32cc
15 min - 1 hour
false
astropy/astropy
astropy__astropy-8707
a85a0747c54bac75e9c3b2fe436b105ea029d6cf
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -554,6 +554,13 @@ def fromstring(cls, image): """ card = cls() + if isinstance(image, bytes): + # FITS supports only ASCII, but decode as latin1 and just ta...
diff --git a/astropy/io/fits/tests/test_header.py b/astropy/io/fits/tests/test_header.py index 7c1725aedb..a87bc19dab 100644 --- a/astropy/io/fits/tests/test_header.py +++ b/astropy/io/fits/tests/test_header.py @@ -9,7 +9,15 @@ from io import StringIO, BytesIO import pytest import numpy as np - +# Compatibility fix...
Header.fromstring does not accept Python 3 bytes According to [the docs](http://docs.astropy.org/en/stable/_modules/astropy/io/fits/header.html#Header.fromstring), the method `Header.fromstring` "...creates an HDU header from a byte string containing the entire header data." By "byte string" here it really means the...
2019-05-15T13:21:19Z
3.1
["astropy/io/fits/tests/test_header.py::TestHeaderFunctions::test_card_from_bytes"]
["astropy/io/fits/tests/test_header.py::test_shallow_copy", "astropy/io/fits/tests/test_header.py::test_init_with_header", "astropy/io/fits/tests/test_header.py::test_init_with_dict", "astropy/io/fits/tests/test_header.py::test_init_with_ordereddict", "astropy/io/fits/tests/test_header.py::TestHeaderFunctions::test_ren...
2e89d074b3b2abc2da80e437c93b1d5516a0ca57
15 min - 1 hour
false
astropy/astropy
astropy__astropy-8872
b750a0e6ee76fb6b8a099a4d16ec51977be46bf6
diff --git a/astropy/units/quantity.py b/astropy/units/quantity.py --- a/astropy/units/quantity.py +++ b/astropy/units/quantity.py @@ -215,8 +215,8 @@ class Quantity(np.ndarray, metaclass=InheritDocstrings): dtype : ~numpy.dtype, optional The dtype of the resulting Numpy array or scalar that will ...
diff --git a/astropy/utils/introspection.py b/astropy/utils/introspection.py index e437b40c87..70c5e2b39b 100644 --- a/astropy/utils/introspection.py +++ b/astropy/utils/introspection.py @@ -7,7 +7,7 @@ import inspect import re import types import importlib -from distutils.version import LooseVersion +from packaging...
float16 quantities get upgraded to float64 automatically When trying to create a `Quantity` from a `np.float16` (not something I actually intended to do, I was experimenting while investigating other issue) it gets upgraded automatically to `np.float64`, which is something that does not happen with other float types: ...
Hmm, it was added in gh-1776 (code in [l299](https://github.com/astropy/astropy/blob/master/astropy/units/quantity.py#L299) and [l379](https://github.com/astropy/astropy/blob/master/astropy/units/quantity.py#L379) by checking `np.can_cast(np.float32, value.dtype)`. From the discussion, it seems half floats were never c...
2019-06-19T20:34:56Z
3.1
["astropy/units/tests/test_quantity.py::TestQuantityCreation::test_preserve_dtype"]
["astropy/units/tests/test_quantity.py::TestQuantityCreation::test_1", "astropy/units/tests/test_quantity.py::TestQuantityCreation::test_2", "astropy/units/tests/test_quantity.py::TestQuantityCreation::test_3", "astropy/units/tests/test_quantity.py::TestQuantityCreation::test_nan_inf", "astropy/units/tests/test_quantit...
2e89d074b3b2abc2da80e437c93b1d5516a0ca57
15 min - 1 hour
false
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_makemigrations_consistency_checks_respect_routers (migrations.test_commands.MakeMigrationsTests)"]
["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
false
pylint-dev/pylint
pylint-dev__pylint-6528
273a8b25620467c1e5686aa8d2a1dbb8c02c78d0
diff --git a/pylint/lint/expand_modules.py b/pylint/lint/expand_modules.py --- a/pylint/lint/expand_modules.py +++ b/pylint/lint/expand_modules.py @@ -46,6 +46,20 @@ def _is_in_ignore_list_re(element: str, ignore_list_re: list[Pattern[str]]) -> b return any(file_pattern.match(element) for file_pattern in ignore_li...
diff --git a/tests/lint/unittest_lint.py b/tests/lint/unittest_lint.py --- a/tests/lint/unittest_lint.py +++ b/tests/lint/unittest_lint.py @@ -864,6 +864,49 @@ def test_by_module_statement_value(initialized_linter: PyLinter) -> None: assert module_stats["statement"] == linter2.stats.statement +@pytest.mark...
Pylint does not respect ignores in `--recursive=y` mode ### Bug description Pylint does not respect the `--ignore`, `--ignore-paths`, or `--ignore-patterns` setting when running in recursive mode. This contradicts the documentation and seriously compromises the usefulness of recursive mode. ### Configuration _...
I suppose that ignored paths needs to be filtered here: https://github.com/PyCQA/pylint/blob/0220a39f6d4dddd1bf8f2f6d83e11db58a093fbe/pylint/lint/pylinter.py#L676
2022-05-06T21:03:37Z
2.14
["tests/lint/unittest_lint.py::test_recursive_ignore[--ignore-ignored_subdirectory]", "tests/lint/unittest_lint.py::test_recursive_ignore[--ignore-patterns-ignored_*]", "tests/test_self.py::TestRunTC::test_ignore_recursive", "tests/test_self.py::TestRunTC::test_ignore_pattern_recursive"]
["tests/lint/unittest_lint.py::test_no_args", "tests/lint/unittest_lint.py::test_one_arg[case0]", "tests/lint/unittest_lint.py::test_one_arg[case1]", "tests/lint/unittest_lint.py::test_one_arg[case2]", "tests/lint/unittest_lint.py::test_one_arg[case3]", "tests/lint/unittest_lint.py::test_one_arg[case4]", "tests/lint/un...
680edebc686cad664bbed934a490aeafa775f163
15 min - 1 hour
false
pylint-dev/pylint
pylint-dev__pylint-7277
684a1d6aa0a6791e20078bc524f97c8906332390
diff --git a/pylint/__init__.py b/pylint/__init__.py --- a/pylint/__init__.py +++ b/pylint/__init__.py @@ -96,9 +96,10 @@ def modify_sys_path() -> None: if pylint is installed in an editable configuration (as the last item). https://github.com/PyCQA/pylint/issues/4161 """ - sys.path.pop(0) - en...
diff --git a/tests/test_self.py b/tests/test_self.py --- a/tests/test_self.py +++ b/tests/test_self.py @@ -759,6 +759,24 @@ def test_modify_sys_path() -> None: modify_sys_path() assert sys.path == paths[1:] + paths = ["", *default_paths] + sys.path = copy(paths) + ...
`pylint` removes first item from `sys.path` when running from `runpy`. ### Bug description This is the line where the first item from sys.path is removed. https://github.com/PyCQA/pylint/blob/ce7cccf96454fb6e286e4a8f38919733a0f28f44/pylint/__init__.py#L99 I think there should be a check to ensure that the first it...
This is a touchy part of the code (very hard to test). It probably make sense to do what you suggest but I don't understand this part of the code very well so I think some investigation/specification is required. I think it makes sense to take this suggestion as it makes the implementation agree with the docstring. @ka...
2022-08-08T23:07:49Z
2.15
["tests/test_self.py::TestRunTC::test_modify_sys_path"]
["tests/test_self.py::TestRunTC::test_pkginfo", "tests/test_self.py::TestRunTC::test_all", "tests/test_self.py::TestRunTC::test_no_ext_file", "tests/test_self.py::TestRunTC::test_w0704_ignored", "tests/test_self.py::TestRunTC::test_exit_zero", "tests/test_self.py::TestRunTC::test_nonexistent_config_file", "tests/test_s...
e90702074e68e20dc8e5df5013ee3ecf22139c3e
<15 min fix
false
README.md exists but content is empty.
Downloads last month
36