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
300
swe_gym::train::952
swe_gym
train
952
dask__dask-8106
dask/dask
dask/dask
python
fb038dbb53565f31507649380d021310f0204f6b
`TypeError` in `asanyarray` `__array_function__` As reported by @jsignell and @jakirkham over in https://github.com/dask/dask/pull/8054 ```python import numpy as np import dask.array as da like = da.from_array(np.array([1,2,3])) arr = np.asanyarray([1,2,3], like=like) np.asanyarray([1,2,3], like=np.empty([])) ``` wo...
Yeah Peter's out this week
diff --git a/dask/array/core.py b/dask/array/core.py --- a/dask/array/core.py +++ b/dask/array/core.py @@ -4114,18 +4114,29 @@ def retrieve_from_ooc(keys, dsk_pre, dsk_post=None): return load_dsk -def asarray(a, allow_unknown_chunksizes=False, *, like=None, **kwargs): +def asarray( + a, allow_unknown_chunks...
diff --git a/dask/array/tests/test_array_function.py b/dask/array/tests/test_array_function.py --- a/dask/array/tests/test_array_function.py +++ b/dask/array/tests/test_array_function.py @@ -231,3 +231,15 @@ def test_like_raises(func): RuntimeError, match="The use of ``like`` required NumPy >= 1.20" ...
["dask/array/tests/test_array_function.py::test_like_with_numpy_func_and_dtype[asarray]", "dask/array/tests/test_array_function.py::test_like_with_numpy_func_and_dtype[asanyarray]"]
["dask/array/tests/test_array_function.py::test_stack_functions_require_sequence_of_arrays[<lambda>0]", "dask/array/tests/test_array_function.py::test_binary_function_type_precedence[arr_upcast1-arr_downcast1-equal]", "dask/array/tests/test_array_function.py::test_binary_function_type_precedence[arr_upcast1-arr_downcas...
null
true
2021-09-01T14:19:11Z
1
36
2
2,004
0
0.85
1
0.85
1
0.454
91.237
301
swe_gym::train::1932
swe_gym
train
1,932
bokeh__bokeh-13298
bokeh/bokeh
bokeh/bokeh
python
38d05d037223234aedeb25e35502abf3332bf0b4
Non-specific error when the DataFrame Used to construct a ColumnDataSource contains non-string keys ### Software versions Python version : 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46) IPython version : 8.14.0 Tornado version : 6.3.2 Bokeh version : 3.2.1 BokehJS static path...
Bokeh has an extensive typed property system to mediate the communication between Python and Javascript. It has to handle all sorts of property validation errors for many dozens of types, and it always does so in a completely uniform way, by providing the same two pieces of information every time: * What type was ex...
diff --git a/src/bokeh/core/property/container.py b/src/bokeh/core/property/container.py --- a/src/bokeh/core/property/container.py +++ b/src/bokeh/core/property/container.py @@ -202,11 +202,25 @@ def validate(self, value: Any, detail: bool = True) -> None: key_is_valid = self.keys_type.is_valid val...
diff --git a/tests/unit/bokeh/core/property/test_validation__property.py b/tests/unit/bokeh/core/property/test_validation__property.py --- a/tests/unit/bokeh/core/property/test_validation__property.py +++ b/tests/unit/bokeh/core/property/test_validation__property.py @@ -80,6 +80,9 @@ StringSpec, ) +KEYS = ((Str...
["tests/unit/bokeh/core/property/test_validation__property.py::TestValidateDetailDefault::test_Dict_Multiple_Invalid_Keys_And_Values", "tests/unit/bokeh/core/property/test_validation__property.py::TestValidateDetailDefault::test_ColumnData", "tests/unit/bokeh/core/property/test_validation__property.py::TestValidateDeta...
["tests/unit/bokeh/core/property/test_validation__property.py::TestValidateDetailExplicit::test_MarkerType[True]", "tests/unit/bokeh/core/property/test_validation__property.py::TestValidateDetailExplicit::test_Regex[False]", "tests/unit/bokeh/core/property/test_validation__property.py::TestValidateDetailExplicit::test_...
null
true
2023-08-03T23:17:51Z
1
24
8
2,239
0
0.85
1
0.85
1
0.453167
91.2345
302
swe_gym::train::1201
swe_gym
train
1,201
pandas-dev__pandas-51157
pandas-dev/pandas
pandas-dev/pandas
python
8deae52ff633a3e9f89e5543bd8585aa7bab5026
BUG: to_datetime with errors coerce throws InvalidOperation decimal.DivisionImpossible ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [x] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I ha...
thanks @gkep for the report this comes from dateutil: ```python In [4]: from dateutil.parser import parse as du_parse In [5]: du_parse('87156549591102612381000001219H5') --------------------------------------------------------------------------- InvalidOperation Traceback (most recent...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index bdf27020dbdfa..f629e669edf49 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -1132,6 +1132,7 @@ Datetimelike - Bug in :meth:`Series.interpolate` and :meth:`DataFrame.interpolate` with datetime or time...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index 7a93d2fe8b5ce..b930bbc2e3e69 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -2501,6 +2501,16 @@ def test_to_datetime_overflow(self): with pytest.raises(OutOfBo...
["pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_string_invalid_operation[True]", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_string_invalid_operation[False]", "pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_invalid_inputs[87156549591102612381000001219H5]"]
["pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[True-2005/11/09", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_to_datetime_iso8...
null
true
2023-02-04T09:18:42Z
2
10
3
2,517
0
0.85
1
0.85
1
0.452833
91.2335
303
swe_gym::train::344
swe_gym
train
344
python__mypy-15045
python/mypy
python/mypy
python
5005428f6bf143d4f8d75b7cb9dd258d00e8ef14
Signature incompatible with supertype when using overload since updating from 1.1.1 to 1.2.0 **Bug Report** Since updating from 1.1.1 to 1.2.0 the following code does not pass anymore. Reading the [change log](https://mypy-lang.blogspot.com/2023/04/mypy-12-released.html) I am assuming this might be related to https:/...
Thanks for the report! It does look related to the PR you mention. Slightly smaller repro: ``` from typing_extensions import Self from typing import Any, Generic, TypeVar, overload T_co = TypeVar('T_co', covariant=True) class Config(Generic[T_co]): @overload def get(self, instance: None) -> Self: ... ...
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -1954,11 +1954,15 @@ def bind_and_map_method( # If we have an overload, filter to overloads that match the self type. # This avoids false positives for concrete subclasses of generic classes, ...
diff --git a/test-data/unit/check-selftype.test b/test-data/unit/check-selftype.test --- a/test-data/unit/check-selftype.test +++ b/test-data/unit/check-selftype.test @@ -232,7 +232,7 @@ class C(A[None]): # N: def f(self, s: int) -> int [builtins fixtures/tuple.pyi] -[c...
["mypy/test/testcheck.py::TypeCheckSuite::check-selftype.test::testSelfTypeOverrideCompatibilityTypeVar", "mypy/test/testcheck.py::TypeCheckSuite::check-selftype.test::testSelfTypeOverrideCompatibilitySelfTypeVar"]
["mypy/test/testcheck.py::TypeCheckSuite::check-selftype.test::testSelfTypeSuper"]
null
true
2023-04-13T01:44:24Z
1
14
2
2,437
0
0.85
1
0.85
1
0.452833
91.2335
304
swe_gym::train::1254
swe_gym
train
1,254
pandas-dev__pandas-50793
pandas-dev/pandas
pandas-dev/pandas
python
afdf0a3e409d02cdfff6c813f512717f1503a4d8
BUG: non-nano strftime returns wrong results ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the [main ...
simpler reproducer: ``` In [2]: Timestamp._from_value_and_reso(-4164570979200, 7, None).strftime('%Y') Out[2]: '1972' ```
diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index 0da8a9e73d963..c1aef2e5115ac 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1409,7 +1409,18 @@ class Timestamp(_Timestamp): >>> ts.strftime('%Y-%m-%d %X') '2020-03-1...
diff --git a/pandas/tests/scalar/timestamp/test_timestamp.py b/pandas/tests/scalar/timestamp/test_timestamp.py index 70f9f7c924844..22f5286569c6e 100644 --- a/pandas/tests/scalar/timestamp/test_timestamp.py +++ b/pandas/tests/scalar/timestamp/test_timestamp.py @@ -1104,3 +1104,15 @@ def test_utctimetuple(): result...
["pandas/tests/scalar/timestamp/test_timestamp.py::test_negative_dates"]
["pandas/tests/scalar/timestamp/test_timestamp.py::TestNonNano::test_sub_timedelta64_mismatched_reso['UTC-02:15'-s]", "pandas/tests/scalar/timestamp/test_timestamp.py::TestNonNano::test_addsub_timedeltalike_non_nano[s-td0]", "pandas/tests/scalar/timestamp/test_timestamp.py::TestTimestampProperties::test_names[es_VE.UTF...
null
true
2023-01-17T18:16:37Z
1
13
1
2,443
0
0.85
1
0.85
1
0.4505
91.2265
305
swe_gym::train::1184
swe_gym
train
1,184
pandas-dev__pandas-58369
pandas-dev/pandas
pandas-dev/pandas
python
a1fc8e8147efb0c7d7e10e674c3ee383b14f2d43
BUG: GroupBy.apply with as_index=False still produces a MultiIndex ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bu...
cc @rhshadrach in case you know the answer The code responsible for this behavior links back to https://github.com/pandas-dev/pandas/issues/5610, but this phenomenon was not discussed there. I'm +1 on your expected behavior. More generally, there are a number of ways `as_index=False` behaves differently than `df.gro...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index c77348b365370..106c2579cd31a 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -441,6 +441,7 @@ Groupby/resample/rolling - Bug in :meth:`.Resampler.interpolate` on a :class:`DataFrame` with non-uniform ...
diff --git a/pandas/tests/groupby/methods/test_value_counts.py b/pandas/tests/groupby/methods/test_value_counts.py index be52b4a591c26..0f136b06c782a 100644 --- a/pandas/tests/groupby/methods/test_value_counts.py +++ b/pandas/tests/groupby/methods/test_value_counts.py @@ -329,13 +329,10 @@ def test_against_frame_and_se...
["pandas/tests/groupby/methods/test_value_counts.py::test_against_frame_and_seriesgroupby[False-True-False-None-False-count-function]", "pandas/tests/groupby/methods/test_value_counts.py::test_against_frame_and_seriesgroupby[False-True-True-True-False-count-column]", "pandas/tests/groupby/test_apply.py::test_groupby_as...
["pandas/tests/groupby/test_groupby.py::test_empty_groupby[False-min-apply-Float64-keys0-columns1]", "pandas/tests/groupby/test_groupby.py::test_empty_groupby[False-skew-agg-cat-keys1-columns1]", "pandas/tests/groupby/test_groupby.py::test_empty_groupby[True-skew-agg-Int64-keys0-C]", "pandas/tests/groupby/test_groupby....
null
true
2024-04-22T14:17:29Z
2
6
15
2,558
0
0.85
1
0.85
1
0.446333
91.214
306
swe_gym::train::1001
swe_gym
train
1,001
dask__dask-6854
dask/dask
dask/dask
python
f9649b45abda9332618938d0c2cb2ea5a3db0d56
Feature Request: add observed- keyword to groupby Hi, dask developers! Thank you for this very nice package, I have been using extensively for a while. I am missing Pandas keyword observed for groupby with categorical variables. Without it, the memory used by my processes is huge, as groupby by default creates all pos...
I am working on implementing it, will keep you posted
diff --git a/dask/dataframe/groupby.py b/dask/dataframe/groupby.py --- a/dask/dataframe/groupby.py +++ b/dask/dataframe/groupby.py @@ -24,6 +24,7 @@ raise_on_meta_error, is_series_like, is_dataframe_like, + PANDAS_GT_100, ) from ..base import tokenize from ..utils import derived_from, M, funcname, ...
diff --git a/dask/dataframe/tests/test_groupby.py b/dask/dataframe/tests/test_groupby.py --- a/dask/dataframe/tests/test_groupby.py +++ b/dask/dataframe/tests/test_groupby.py @@ -2420,3 +2420,44 @@ def test_groupby_sort_true_split_out(): with pytest.raises(NotImplementedError): # Cannot use sort=True with...
["dask/dataframe/tests/test_groupby.py::test_groupby_aggregate_categorical_observed[mean-False-groupby1-True-True]", "dask/dataframe/tests/test_groupby.py::test_groupby_aggregate_categorical_observed[count-False-cat_1-False-False]", "dask/dataframe/tests/test_groupby.py::test_groupby_aggregate_categorical_observed[coun...
["dask/dataframe/tests/test_groupby.py::test_groupby_multilevel_getitem[var-<lambda>1]", "dask/dataframe/tests/test_groupby.py::test_groupby_multilevel_getitem[first-<lambda>4]", "dask/dataframe/tests/test_groupby.py::test_series_aggregations_multilevel[mean-<lambda>0]", "dask/dataframe/tests/test_groupby.py::test_aggr...
null
true
2020-11-18T16:31:48Z
1
91
136
844
0
0.85
1
0.85
1
0.444
91.207
307
swe_gym::train::1902
swe_gym
train
1,902
facebookresearch__hydra-1976
facebookresearch/hydra
facebookresearch/hydra
python
abb36af33e83f391a22d6269fd2f317378171ec9
[Bug?] multirun does not work with hydra.verbose=True # 🐛 Bug ## Description --multirun does not seem to work when using hydra.verbose=True ## Checklist - [x] I checked on the latest version of Hydra - [x] I created a minimal repro (See [this](https://stackoverflow.com/help/minimal-reproducible-example) for tips). #...
Hi @BenFis, Thanks very much for the report. I can reproduce the issue.
diff --git a/hydra/_internal/hydra.py b/hydra/_internal/hydra.py --- a/hydra/_internal/hydra.py +++ b/hydra/_internal/hydra.py @@ -384,7 +384,10 @@ def _print_plugins(self) -> None: log.debug("\t\t{}".format(plugin_name)) def _print_search_path( - self, config_name: Optional[str], overrid...
diff --git a/tests/test_apps/hydra_verbose/__init__.py b/tests/test_apps/hydra_verbose/__init__.py new file mode 100644 --- /dev/null +++ b/tests/test_apps/hydra_verbose/__init__.py @@ -0,0 +1 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved diff --git a/tests/test_apps/hydra_verbose/config.ya...
["tests/test_hydra.py::test_hydra_verbose_1897[True]"]
["tests/test_hydra.py::test_hydra_main_rerun[None-tests.test_apps.hydra_main_rerun.my_app]", "tests/test_hydra.py::test_module_env_override[FB_PAR_MAIN_MODULE]", "tests/test_hydra.py::test_hydra_main_rerun[tests/test_apps/hydra_main_rerun/my_app.py-None]", "tests/test_hydra.py::test_config_name_and_path_overrides[cfg2-...
null
true
2022-01-19T22:32:51Z
1
62
1
1,392
0
0.85
1
0.85
1
0.438667
91.191
308
swe_gym::train::49
swe_gym
train
49
getmoto__moto-6312
getmoto/moto
getmoto/moto
python
60065b3cf87f30bb2c1fc8756d2237c40b60f992
mock_cloudformation with SNS fails to delete stack Using the mock_cloudformation, creating a stack containing a single SNS topic, then deleting the stack fails with an invalid ARN ## Reproduction steps: ```python def test_failure(cloudformation_mock): cloudformation_mock.create_stack( StackName="test-stac...
Thanks for raising this @pwrmiller - marking it as a bug. I'll submit a PR to fix this shortly.
diff --git a/moto/cloudformation/parsing.py b/moto/cloudformation/parsing.py --- a/moto/cloudformation/parsing.py +++ b/moto/cloudformation/parsing.py @@ -793,17 +793,7 @@ def update( for logical_name in resource_names_by_action["Remove"]: resource_json = self._resource_json_map[logical_name] ...
diff --git a/tests/test_sns/test_sns_cloudformation.py b/tests/test_sns/test_sns_cloudformation.py --- a/tests/test_sns/test_sns_cloudformation.py +++ b/tests/test_sns/test_sns_cloudformation.py @@ -1,6 +1,7 @@ import boto3 import json import sure # noqa # pylint: disable=unused-import +import pytest from moto i...
["tests/test_sns/test_sns_cloudformation.py::test_sns_update_remove_topic[False]", "tests/test_sns/test_sns_cloudformation.py::test_sns_delete_topic[False]"]
["tests/test_sns/test_sns_cloudformation.py::test_sns_delete_topic[True]", "tests/test_sns/test_sns_cloudformation.py::test_sns_update_remove_topic[True]", "tests/test_sns/test_sns_cloudformation.py::test_sns_update_topic", "tests/test_sns/test_sns_cloudformation.py::test_sns_topic"]
null
true
2023-05-10 19:08:13
2
80
2
1,029
0
0.85
1
0.85
1
0.438167
91.1895
309
swe_gym::train::1769
swe_gym
train
1,769
pandas-dev__pandas-48774
pandas-dev/pandas
pandas-dev/pandas
python
b3552c54be2d49d52e6c0ae90db23ccb13bbfe0d
IndexError raised on invalid csv file #### Code Sample, a copy-pastable example if possible ```python $ python Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pandas >>> pandas.__version__ '0.19.2' >>> with op...
@Dominik1123 ``` In [1]: data = '+++123456789...\ncol1,col2,col3\n1,2,3\n' In [2]: pd.read_csv(StringIO(data)) Out[2]: +++123456789... col1 col2 col3 1 2 3 In [3]: pd.read_csv(StringIO(data), index_col=0) IndexError: list index out of range In [4]: pd.DataFr...
diff --git a/doc/source/whatsnew/v1.6.0.rst b/doc/source/whatsnew/v1.6.0.rst index d726f69286469..79d498c4d1669 100644 --- a/doc/source/whatsnew/v1.6.0.rst +++ b/doc/source/whatsnew/v1.6.0.rst @@ -115,7 +115,7 @@ See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for mor Other API changes ^^^^...
diff --git a/pandas/tests/io/parser/common/test_read_errors.py b/pandas/tests/io/parser/common/test_read_errors.py index f52af109626e9..fc30ebff0d93a 100644 --- a/pandas/tests/io/parser/common/test_read_errors.py +++ b/pandas/tests/io/parser/common/test_read_errors.py @@ -292,6 +292,18 @@ def test_conflict_on_bad_line(...
["pandas/tests/io/parser/common/test_read_errors.py::test_bad_header_uniform_error[c_high]", "pandas/tests/io/parser/common/test_read_errors.py::test_bad_header_uniform_error[c_low]"]
["pandas/tests/io/parser/common/test_read_errors.py::test_null_byte_char[python]", "pandas/tests/io/parser/common/test_read_errors.py::test_warn_bad_lines[c_low-kwargs1]", "pandas/tests/io/parser/common/test_read_errors.py::test_malformed_chunks[c_high-5]", "pandas/tests/io/parser/common/test_read_errors.py::test_raise...
null
true
2022-09-25T18:44:06Z
2
10
2
2,427
0
0.85
1
0.85
1
0.437833
91.1885
310
swe_gym::train::493
swe_gym
train
493
python__mypy-11867
python/mypy
python/mypy
python
3d205764fff2ca792886d84d0a16791dfd33f077
Consider `from .sub import *` as re-exporting all the public symbols of `sub` **Bug Report** This goes directly against what was made in #7361 but it's more consistent with [PEP 484](https://www.python.org/dev/peps/pep-0484/) which says: > - Modules and variables imported into the stub are not considered exported fro...
Linking https://github.com/python/mypy/issues/8754 which is not the same but also has issues related to re-exports and is another discrepancy between mypy and Pyright. Thanks for flagging this, I'd be in favour of changing mypy's behaviour here. Should be backward compatible in that we're allowing strictly more code. ...
diff --git a/mypy/semanal.py b/mypy/semanal.py --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -2037,12 +2037,10 @@ def visit_import_all(self, i: ImportAll) -> None: if self.process_import_over_existing_name( name, existing_symbol, node, i): ...
diff --git a/test-data/unit/check-flags.test b/test-data/unit/check-flags.test --- a/test-data/unit/check-flags.test +++ b/test-data/unit/check-flags.test @@ -1562,17 +1562,7 @@ __all__ = ('b',) [out] main:2: error: Module "other_module_2" does not explicitly export attribute "a"; implicit reexport disabled -[case ...
["mypy/test/testcheck.py::TypeCheckSuite::check-flags.test::testNoImplicitReexportStarConsideredExplicit"]
["mypy/test/testcheck.py::TypeCheckSuite::check-flags.test::testNoImplicitReexportGetAttr"]
null
true
2021-12-29T18:04:40Z
1
8
1
2,457
0
0.85
1
0.85
1
0.436167
91.1835
311
swe_bench_verified::test::187
swe_bench_verified
test
187
django__django-15315
django/django
django/django
python
652c68ffeebd510a6f59e1b56b3e007d07683ad8
Model Field.__hash__() should be immutable. Description Field.__hash__ changes value when a field is assigned to a model class. This code crashes with an AssertionError: from django.db import models f = models.CharField(max_length=200) d = {f: 1} class Book(models.Model): title = f assert f in d The bug was introduce...
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -542,11 +542,7 @@ def __lt__(self, other): return NotImplemented def __hash__(self): - return hash(( - self.crea...
diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py --- a/tests/model_fields/tests.py +++ b/tests/model_fields/tests.py @@ -128,9 +128,14 @@ class InheritAbstractModel2(AbstractModel): self.assertLess(abstract_model_field, inherit2_model_field) self.assertLess(inherit1_model_field, ...
["test_hash_immutability (model_fields.tests.BasicFieldTests)"]
["test_check (model_fields.tests.ChoicesTests)", "test_choices (model_fields.tests.ChoicesTests)", "test_flatchoices (model_fields.tests.ChoicesTests)", "test_formfield (model_fields.tests.ChoicesTests)", "test_invalid_choice (model_fields.tests.ChoicesTests)", "test_blank_in_choices (model_fields.tests.GetChoicesTests...
null
true
2022-01-13T18:51:58Z
1
6
1
791
0
1
1
0.85
1
0.151833
91.1805
312
swe_gym::train::1768
swe_gym
train
1,768
pandas-dev__pandas-48697
pandas-dev/pandas
pandas-dev/pandas
python
cda0f6bee2a6520729247f92eef9f722ad2487ec
BUG: None value converted to NaN in Series ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the main bra...
Can confirm (as I expected :)) ``` commit bd9a6f09264c58ef402d4c7faf5fc9d48c159194 Author: Patrick Hoefler <61934744+phofl@users.noreply.github.com> Date: Sat Jul 2 00:18:05 2022 +0200 BUG: Series.setitem losing precision when enlarging (#47342) ``` I'll look into this
diff --git a/doc/source/whatsnew/v1.5.1.rst b/doc/source/whatsnew/v1.5.1.rst index 3f4265245bcb6..c998b2ce99628 100644 --- a/doc/source/whatsnew/v1.5.1.rst +++ b/doc/source/whatsnew/v1.5.1.rst @@ -14,6 +14,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ +- Fixed Regression in :meth:`Ser...
diff --git a/pandas/tests/series/indexing/test_setitem.py b/pandas/tests/series/indexing/test_setitem.py index 90051405c6935..9ab3b6ead017f 100644 --- a/pandas/tests/series/indexing/test_setitem.py +++ b/pandas/tests/series/indexing/test_setitem.py @@ -562,6 +562,14 @@ def test_setitem_enlarge_with_na(self, na, target_...
["pandas/tests/series/indexing/test_setitem.py::TestSetitemWithExpansion::test_setitem_enlargement_object_none[NaTType]", "pandas/tests/series/indexing/test_setitem.py::TestSetitemWithExpansion::test_setitem_enlargement_object_none[NAType]", "pandas/tests/series/indexing/test_setitem.py::TestSetitemWithExpansion::test_...
["pandas/tests/series/indexing/test_setitem.py::TestCoercionInt64::test_slice_key[setitem-1-int64]", "pandas/tests/series/indexing/test_setitem.py::test_setitem_bool_indexer_dont_broadcast_length1_values[<lambda>2-nan-mask0-3]", "pandas/tests/series/indexing/test_setitem.py::TestSetitemCastingEquivalents::test_slice_ke...
null
true
2022-09-21T21:55:12Z
2
8
5
2,442
0
0.85
1
0.85
1
0.433667
91.176
313
swe_bench_verified::test::6
swe_bench_verified
test
6
astropy__astropy-13977
astropy/astropy
astropy/astropy
python
5250b2442501e6c671c6b380536f1edb352602d1
Should `Quantity.__array_ufunc__()` return `NotImplemented` instead of raising `ValueError` if the inputs are incompatible? ### Description I'm trying to implement a duck type of `astropy.units.Quantity`. If you are interested, the project is available [here](https://github.com/Kankelborg-Group/named_arrays). I'm runni...
@byrdie - I think you are right that really one should return `NotImplemented`. In general, the idea is indeed that one only works on classes that are recognized, while in the implementation that we have (which I wrote...) essentially everything that has a `unit` attribute is treated as a `Quantity`. I think it is a go...
diff --git a/astropy/units/quantity.py b/astropy/units/quantity.py --- a/astropy/units/quantity.py +++ b/astropy/units/quantity.py @@ -633,53 +633,70 @@ def __array_ufunc__(self, function, method, *inputs, **kwargs): Returns ------- - result : `~astropy.units.Quantity` + result : `~ast...
diff --git a/astropy/units/tests/test_quantity.py b/astropy/units/tests/test_quantity.py --- a/astropy/units/tests/test_quantity.py +++ b/astropy/units/tests/test_quantity.py @@ -505,11 +505,10 @@ def test_incompatible_units(self): def test_non_number_type(self): q1 = u.Quantity(11.412, unit=u.meter) - ...
["astropy/units/tests/test_quantity_ufuncs.py::TestUfuncReturnsNotImplemented::TestBinaryUfuncs::test_full[None-duck_quantity0-quantity0-add]", "astropy/units/tests/test_quantity_ufuncs.py::TestUfuncReturnsNotImplemented::TestBinaryUfuncs::test_full[None-duck_quantity0-quantity0-less]", "astropy/units/tests/test_quanti...
["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...
null
true
2022-11-01T22:24:58Z
1
95
20
3,654
0.027778
1
1
0.77
1
0.816667
91.175236
314
swe_gym::train::194
swe_gym
train
194
getmoto__moto-5870
getmoto/moto
getmoto/moto
python
b0ee64f24a95286f8466d2a4b54a9df85ec29073
Getting a KeyError('RequestId') while trying to use mock_batch in moto Hi, I am getting a `KeyError('RequestId'))` when i am trying to use `mock_batch` functionality of moto. Code: ``` @mock_iam @mock_batch def test_aws_batch(self): client = boto3.client('batch') iam = boto3.client('iam') #mock iam role ...
Thanks for raising this @X404-ch1nVR46 - I'll mark this as an enhancement to add this field.
diff --git a/moto/batch/responses.py b/moto/batch/responses.py --- a/moto/batch/responses.py +++ b/moto/batch/responses.py @@ -1,4 +1,5 @@ from moto.core.responses import BaseResponse +from moto.utilities.aws_headers import amzn_request_id from .models import batch_backends, BatchBackend from urllib.parse import url...
diff --git a/tests/test_batch/test_batch_jobs.py b/tests/test_batch/test_batch_jobs.py --- a/tests/test_batch/test_batch_jobs.py +++ b/tests/test_batch/test_batch_jobs.py @@ -72,11 +72,12 @@ def test_submit_job_by_name(): resp = batch_client.submit_job( jobName="test1", jobQueue=queue_arn, jobDefinition=j...
["tests/test_batch/test_batch_jobs.py::test_submit_job_by_name"]
["tests/test_batch/test_batch_jobs.py::test_submit_job_with_timeout_set_at_definition", "tests/test_batch/test_batch_jobs.py::test_submit_job_with_timeout", "tests/test_batch/test_batch_jobs.py::test_register_job_definition_with_timeout", "tests/test_batch/test_batch_jobs.py::test_cancel_job_empty_argument_strings", "t...
null
true
2023-01-23 12:42:33
1
18
1
2,191
0
0.85
1
0.85
1
0.425167
91.1505
315
swe_gym::train::46
swe_gym
train
46
getmoto__moto-6185
getmoto/moto
getmoto/moto
python
dc460a325839bc6797084a54afc297a2c9d87e63
DynamoDB put_item SerializationException when any key inside the Item is 'S' Hey everyone, thanks for the all the great work on this library. It makes unit testing a breeze! I ran into a bit of a strange issue with the Table.put_item() method in a mock DynamoDB table. It looks like if any key inside the item (includin...
Appreciate the feedback @hidi-adouv, always good to hear that Moto is useful! When using the DynamoDB client, users have to manually set the type of their attributes - so in your example, with one Number-attribute and one String, that would result in this: `{'index': {'N': '0'}, 'S': {'S': 's'}}` Moto does some v...
diff --git a/moto/dynamodb/models/table.py b/moto/dynamodb/models/table.py --- a/moto/dynamodb/models/table.py +++ b/moto/dynamodb/models/table.py @@ -484,10 +484,12 @@ def _validate_key_sizes(self, item_attrs: Dict[str, Any]) -> None: if DynamoType(range_value).size() > RANGE_KEY_MAX_LENGTH: ...
diff --git a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py --- a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py +++ b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py @@ -933,12 +933,21 @@ def test_put_item__string_as_intege...
["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_put_item__string_as_integer_value"]
["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_query_gsi_with_wrong_key_attribute_names_throws_exception", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_update_primary_key", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_creating_table_with_0_local_indexes", "t...
null
true
2023-04-07 16:35:37
1
8
1
2,388
0
0.85
1
0.85
1
0.424667
91.149
316
swe_gym::train::861
swe_gym
train
861
iterative__dvc-10277
iterative/dvc
iterative/dvc
python
84b2e685e25c31fc1296d2902c728d84785a656d
dvc status: reports change for frozen import ## Description According to https://dvc.org/doc/command-reference/freeze , when a stage is "frozen" `dvc status` should not consider it as changed. But it does when the stage is obtained by `dvc import` ### Reproduce Here's a trivial example that imports from the same git...
TBH I don't know if it's "expected" to show as a clean status or not, but if non-import frozen stages behave differently, then it looks like a bug to me. How do you use it? Can you use `dvc data status` instead? @dberenbaum Doc of `dvc freeze` says: > [dvc freeze](https://dvc.org/doc/command-reference/freeze) causes...
diff --git a/dvc/commands/data_sync.py b/dvc/commands/data_sync.py --- a/dvc/commands/data_sync.py +++ b/dvc/commands/data_sync.py @@ -429,5 +429,11 @@ def add_parser(subparsers, _parent_parser): default=False, help="Show status in JSON format.", ) + status_parser.add_argument( + "--no-...
diff --git a/tests/func/test_status.py b/tests/func/test_status.py --- a/tests/func/test_status.py +++ b/tests/func/test_status.py @@ -1,5 +1,7 @@ import os +import pytest + from dvc.cli import main from dvc.fs import localfs @@ -30,19 +32,25 @@ def test_implied_cloud(dvc, mocker): assert mock_status.called...
["tests/unit/command/test_status.py::test_status_check_updates", "tests/unit/command/test_status.py::test_cloud_status"]
["tests/func/test_status.py::test_quiet", "tests/func/test_status.py::test_status_recursive", "tests/func/test_status.py::test_status_outputs", "tests/unit/command/test_status.py::test_status_up_to_date[cloud_opts1-Cache", "tests/unit/command/test_status.py::test_status_quiet[status1-1]", "tests/unit/command/test_statu...
null
true
2024-02-01T19:04:52Z
3
30
2
1,936
0
0.85
1
0.85
1
0.422667
91.143
317
swe_gym::train::1552
swe_gym
train
1,552
pandas-dev__pandas-53681
pandas-dev/pandas
pandas-dev/pandas
python
af83376640ec7d86cb3166d0e01052dc6648bfdf
BUG: inconsistent behavior of DateOffset ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the main branc...
While this is a bug, I would say that the second test actually gives the correct results (because you're adding one month at a time, when you add 1 month to 30-Jan-2020, you get 29-Feb-2020, and next year it'd be 28-Feb-2021). But it is a bug because the results mismatch when you add offsets to a series v/s a Timestam...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 2436d91690ed3..4dbaf65c9e7ab 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -361,6 +361,7 @@ Categorical Datetimelike ^^^^^^^^^^^^ - :meth:`DatetimeIndex.map` with ``na_action="ignore"`` now works ...
diff --git a/pandas/tests/tseries/offsets/test_offsets.py b/pandas/tests/tseries/offsets/test_offsets.py index 6df47968bd3bb..5139331bebaf7 100644 --- a/pandas/tests/tseries/offsets/test_offsets.py +++ b/pandas/tests/tseries/offsets/test_offsets.py @@ -27,6 +27,7 @@ from pandas.errors import PerformanceWarning from...
["pandas/tests/tseries/offsets/test_offsets.py::test_dateoffset_operations_on_dataframes", "pandas/tests/tseries/offsets/test_offsets.py::test_offset_multiplication[1-2-2020-01-30-2020-03-30]"]
["pandas/tests/tseries/offsets/test_offsets.py::TestCommon::test_add_dt64_ndarray_non_nano[BusinessMonthBegin1-s]", "pandas/tests/tseries/offsets/test_offsets.py::TestCommon::test_add_empty_datetimeindex[CustomBusinessDay1-'-02:15']", "pandas/tests/tseries/offsets/test_offsets.py::TestCommon::test_add[CustomBusinessMon...
null
true
2023-06-15T06:36:50Z
2
8
2
2,366
0
0.85
1
0.85
1
0.421
91.138
318
swe_bench_pro::test::190
swe_bench_pro
test
190
instance_flipt-io__flipt-507170da0f7f4da330f6732bffdf11c4df7fc192
flipt-io/flipt
flipt-io/flipt
go
5c6de423ccaad9eda072d951c4fc34e779308e95
# Authorization policy methods should support readable identifiers ## Description: The current authorization policy engine requires scoping rules for authentication methods using numeric values corresponding to internal enum entries. This design introduces friction and reduces clarity, as users must refer to internal...
## Requirements - `flipt.is_auth_method` must be registered as a built-in usable by the Rego policy engine and must accept exactly two arguments: a structured input object and a string representing the expected authentication method. - The second argument of `flipt.is_auth_method` must accept the string values `"token...
diff --git a/internal/server/authz/engine/bundle/engine.go b/internal/server/authz/engine/bundle/engine.go index c81293f74b..4e3de04bab 100644 --- a/internal/server/authz/engine/bundle/engine.go +++ b/internal/server/authz/engine/bundle/engine.go @@ -10,6 +10,7 @@ import ( "github.com/open-policy-agent/opa/storage/in...
diff --git a/internal/server/authz/engine/bundle/engine_test.go b/internal/server/authz/engine/bundle/engine_test.go index fc94e45faa..74e8934561 100644 --- a/internal/server/authz/engine/bundle/engine_test.go +++ b/internal/server/authz/engine/bundle/engine_test.go @@ -8,11 +8,13 @@ import ( "strings" "testing" ...
["go.flipt.io/flipt/internal/server/authz/engine/bundle.TestEngine_IsAllowed", "go.flipt.io/flipt/internal/server/authz/engine/rego.TestEngine_IsAllowed", "go.flipt.io/flipt/internal/server/authz/engine/rego.TestEngine_IsAuthMethod"]
[]
ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-507170da0f7f4da330f6732bffdf11c4df7fc192
true
null
3
59
3
1,535
0
0.95
1
0.85
1
0.4525
91.1325
319
swe_bench_verified::test::484
swe_bench_verified
test
484
sympy__sympy-21930
sympy/sympy
sympy/sympy
python
de446c6d85f633271dfec1452f6f28ea783e293f
Issues with Latex printing output in second quantization module There are Latex rendering problems within the "secondquant" module, as it does not correctly interpret double superscripts containing the "dagger" command within Jupyter Notebook. Let's see a minimal example ``` In [1]: import sympy as sp from sy...
diff --git a/sympy/physics/secondquant.py b/sympy/physics/secondquant.py --- a/sympy/physics/secondquant.py +++ b/sympy/physics/secondquant.py @@ -218,7 +218,7 @@ def _sortkey(cls, index): return (12, label, h) def _latex(self, printer): - return "%s^{%s}_{%s}" % ( + return "{%s^{%s}_{...
diff --git a/sympy/physics/tests/test_secondquant.py b/sympy/physics/tests/test_secondquant.py --- a/sympy/physics/tests/test_secondquant.py +++ b/sympy/physics/tests/test_secondquant.py @@ -94,7 +94,7 @@ def test_operator(): def test_create(): i, j, n, m = symbols('i,j,n,m') o = Bd(i) - assert latex(o) =...
["test_create", "test_commutation", "test_create_f", "test_NO", "test_Tensors", "test_issue_19661"]
["test_PermutationOperator", "test_index_permutations_with_dummies", "test_dagger", "test_operator", "test_annihilate", "test_basic_state", "test_basic_apply", "test_complex_apply", "test_number_operator", "test_inner_product", "test_symbolic_matrix_elements", "test_matrix_elements", "test_fixed_bosonic_basis", "test_a...
null
true
2021-08-22T20:29:08Z
1
6
6
692
0
1
1
0.85
1
0.135333
91.131
320
swe_bench_pro::test::256
swe_bench_pro
test
256
instance_future-architect__vuls-2c84be80b65d022c262956cd26fc79d8bb2f7010
future-architect/vuls
future-architect/vuls
go
4c598bb9726d68b6fdef264b26fc700591b303f6
# Scanner fails on non-standard source RPM filenames and epoch handling # Description. When parsing RPM package information during scans, the run terminates with a fatal error if the `SOURCERPM` value doesn’t match the canonical `<name>-<version>-<release>.<arch>.rpm` pattern (for example, `elasticsearch-8.17.0-1-src...
## Requirements - Update `parseInstalledPackagesLine` to append warnings for unparseable source RPM filenames, continue processing, produce the binary package (e.g, `wantbp: &models.Package{Name: "elasticsearch", Version: "8.17.0", Release: "1", Arch: "x86_64"}`) and skip the source package (`wantsp: nil`). - Implemen...
diff --git a/scanner/redhatbase.go b/scanner/redhatbase.go index e63878ec19..1b749f37fe 100644 --- a/scanner/redhatbase.go +++ b/scanner/redhatbase.go @@ -582,9 +582,10 @@ func (o *redhatBase) parseInstalledPackagesLine(line string) (*models.Package, * case "(none)": return nil, nil default: - n, v, r, ...
diff --git a/scanner/redhatbase_test.go b/scanner/redhatbase_test.go index 28399d419c..19e6d5cf5f 100644 --- a/scanner/redhatbase_test.go +++ b/scanner/redhatbase_test.go @@ -342,6 +342,22 @@ func Test_redhatBase_parseInstalledPackagesLine(t *testing.T) { }, wantsp: nil, }, + { + name: "epoch in source pa...
["Test_redhatBase_parseInstalledPackagesLine", "Test_redhatBase_parseInstalledPackagesLine/epoch_in_source_package", "Test_redhatBase_parseInstalledPackagesLine/invalid_source_package"]
["Test_redhatBase_parseInstalledPackagesLine/old:_package_1", "Test_redhatBase_parseInstalledPackagesLine/new:_package_1", "Test_redhatBase_parseInstalledPackagesLine/new:_package_2", "Test_redhatBase_parseInstalledPackagesLine/modularity:_package_1", "Test_redhatBase_parseInstalledPackagesLine/modularity:_package_2"]
ghcr.io/scaleapi/swe-bench_pro-v2:instance_future-architect__vuls-2c84be80b65d022c262956cd26fc79d8bb2f7010
true
null
1
50
3
1,697
0
0.95
1
0.85
1
0.4495
91.1235
321
swe_gym::train::470
swe_gym
train
470
python__mypy-10432
python/mypy
python/mypy
python
389a1725c1df7fad4e2605360157c9f910cb502c
"AssertionError: Cannot find component" for local NamedTuple I've got an obscure bug which I narrowed down to some cache issues when you have a local class inheriting from `NamedTuple`. Stacktrace: ``` Traceback (most recent call last): File "/home/karlicos/.local/bin/mypy", line 10, in <module> sys.exit(console...
This is related to https://github.com/python/mypy/issues/6422 in the sense that a proper fix for that issues should fix this crash as well. Today I was hit by something similar to this (which didn't happen before recreating my tox environment): ``` Traceback (most recent call last): File "/home/languitar/src/poetl...
diff --git a/mypy/nodes.py b/mypy/nodes.py --- a/mypy/nodes.py +++ b/mypy/nodes.py @@ -2796,15 +2796,18 @@ def f(x: B[T]) -> T: ... # without T, Any would be used here itself an alias), while the second cannot be subscripted because of Python runtime limitation. line and column: Line an column o...
diff --git a/test-data/unit/check-incremental.test b/test-data/unit/check-incremental.test --- a/test-data/unit/check-incremental.test +++ b/test-data/unit/check-incremental.test @@ -5532,3 +5532,32 @@ def g() -> None: n: NT = NT(y='x') [builtins fixtures/tuple.pyi] + +[case testIncrementalNestedTypeAlias] +imp...
["mypy/test/testcheck.py::TypeCheckSuite::testIncrementalNestedTypeAlias"]
[]
null
true
2021-05-06T14:24:06Z
3
26
1
1,961
0
0.85
1
0.85
1
0.4135
91.1155
322
swe_gym::train::1673
swe_gym
train
1,673
pandas-dev__pandas-57174
pandas-dev/pandas
pandas-dev/pandas
python
0fd71768147d6cace22f99c6fca7dc19679337ff
BUG: Interchange protocol implementation allows non-string column names ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed th...
Can you assign this issue to me?
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index 56e645d4c55db..13d5024b5a131 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -32,6 +32,7 @@ Bug fixes ~~~~~~~~~ - Fixed bug in :func:`pandas.api.interchange.from_dataframe` which was raising for Null...
diff --git a/pandas/tests/interchange/test_impl.py b/pandas/tests/interchange/test_impl.py index c8f286f22a43e..4933cca97462f 100644 --- a/pandas/tests/interchange/test_impl.py +++ b/pandas/tests/interchange/test_impl.py @@ -162,8 +162,6 @@ def test_missing_from_masked(): } ) - df2 = df.__dataframe__...
["pandas/tests/interchange/test_impl.py::test_non_str_names_w_duplicates", "pandas/tests/interchange/test_impl.py::test_non_str_names"]
["pandas/tests/interchange/test_impl.py::test_bitmasks_pyarrow[2-None-expected_values2]", "pandas/tests/interchange/test_impl.py::test_empty_string_column", "pandas/tests/interchange/test_impl.py::test_datetimetzdtype[us-UTC]", "pandas/tests/interchange/test_impl.py::test_dataframe[<lambda>2]", "pandas/tests/interchang...
null
true
2024-01-31T14:22:15Z
3
11
2
2,257
0
0.85
1
0.85
1
0.412833
91.1135
323
swe_gym::train::2009
swe_gym
train
2,009
Project-MONAI__MONAI-5845
Project-MONAI/MONAI
project-monai/monai
python
4b464e7b6bee1b52fa0be4d72a4662f384f095af
Slicing a MetaTensor: `TypeError: only integer tensors of a single element can be converted to an index` The goal is to slice the tensor in half. For some reason that I cannot comprehend, it doesn't work on a particular tensor: ```python >>> type(x) <class 'monai.data.meta_tensor.MetaTensor'> >>> x.shape torch.Size([...
thanks for reporting, it's related to the `is_batch` flag, I'm looking into this issue ```py >>> x = MetaTensor(np.random.rand(128, 1024, 8, 64)) >>> x.is_batch = True >>> x[slice(0, 64, None), ...] 2023-01-11 15:45:21,510 - > collate/stack a list of tensors Traceback (most recent call last): ``` (it se...
diff --git a/monai/data/meta_tensor.py b/monai/data/meta_tensor.py --- a/monai/data/meta_tensor.py +++ b/monai/data/meta_tensor.py @@ -235,11 +235,19 @@ def update_meta(rets: Sequence, func, args, kwargs) -> Sequence: # respectively. Don't need to do anything with the metadata. ...
diff --git a/tests/test_meta_tensor.py b/tests/test_meta_tensor.py --- a/tests/test_meta_tensor.py +++ b/tests/test_meta_tensor.py @@ -406,6 +406,13 @@ def test_indexing(self): for _d in d: self.check_meta(_d, data) + def test_slicing(self): + x = MetaTensor(np.zeros((10, 3, 4))) + ...
["tests/test_meta_tensor.py::TestMetaTensor::test_slicing"]
["tests/test_meta_tensor.py::TestMetaTensor::test_construct_with_pre_applied_transforms", "tests/test_meta_tensor.py::TestMetaTensor::test_decollate_5", "tests/test_meta_tensor.py::TestMetaTensor::test_pending_ops", "tests/test_meta_tensor.py::TestMetaTensor::test_dataset_4", "tests/test_meta_tensor.py::TestMetaTensor:...
null
true
2023-01-11T21:36:55Z
1
16
1
2,156
0
0.85
1
0.85
1
0.412667
91.113
324
swe_bench_verified::test::321
swe_bench_verified
test
321
pylint-dev__pylint-4604
pylint-dev/pylint
pylint-dev/pylint
python
1e55ae64624d28c5fe8b63ad7979880ee2e6ef3f
unused-import false positive for a module used in a type comment ### Steps to reproduce ```python """Docstring.""" import abc from abc import ABC X = ... # type: abc.ABC Y = ... # type: ABC ``` ### Current behavior ``` ************* Module a /tmp/a.py:3:0: W0611: Unused import abc (unused-import) --------------...
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py --- a/pylint/checkers/variables.py +++ b/pylint/checkers/variables.py @@ -1826,6 +1826,10 @@ def _store_type_annotation_node(self, type_annotation): self._type_annotation_names.append(type_annotation.name) return + ...
diff --git a/tests/checkers/unittest_variables.py b/tests/checkers/unittest_variables.py --- a/tests/checkers/unittest_variables.py +++ b/tests/checkers/unittest_variables.py @@ -21,11 +21,13 @@ import os import re import sys +import unittest from pathlib import Path import astroid from pylint.checkers import...
["tests/checkers/unittest_variables.py::TestVariablesChecker::test_bitbucket_issue_78", "tests/checkers/unittest_variables.py::TestVariablesChecker::test_no_name_in_module_skipped", "tests/checkers/unittest_variables.py::TestVariablesChecker::test_all_elements_without_parent", "tests/checkers/unittest_variables.py::Tes...
[]
null
true
2021-06-22T10:44:14Z
2
6
21
646
0
1
1
0.85
1
0.127667
91.108
325
swe_gym::train::410
swe_gym
train
410
python__mypy-15541
python/mypy
python/mypy
python
66d03daf35bde2dcc8fdc746aa31b2f59dcba515
mypy doesn't correctly infer `Self` attributes on subclasses **Bug Report** When using the `Self` special form to annotate class attributes, `mypy` doesn't correctly infer the bound type in subclasses methods. ```python class A: _ref: Self class B(A): def func(self): self._ref # should be inferred as `B`...
> self._ref # should be inferred as `B` It should not be `B`, it should still be `Self` (otherwise `return self` will fail in a method annotated with `-> Self`), but it should be a different `Self`, the one of the subclass.
diff --git a/mypy/checkmember.py b/mypy/checkmember.py --- a/mypy/checkmember.py +++ b/mypy/checkmember.py @@ -735,12 +735,12 @@ def analyze_var( """Analyze access to an attribute via a Var node. This is conceptually part of analyze_member_access and the arguments are similar. - - itype is the class obje...
diff --git a/test-data/unit/check-selftype.test b/test-data/unit/check-selftype.test --- a/test-data/unit/check-selftype.test +++ b/test-data/unit/check-selftype.test @@ -1867,3 +1867,20 @@ class B: return B() # E: Incompatible return value type (got "B", expected "A") [builtins fixtures/isinstancelist...
["mypy/test/testcheck.py::TypeCheckSuite::check-selftype.test::testAttributeOnSelfAttributeInSubclass"]
["mypy/test/testpythoneval.py::PythonEvaluationSuite::pythoneval.test::testDataclassReplaceOptional"]
null
true
2023-06-28T21:10:32Z
3
19
1
2,077
0
0.85
1
0.85
1
0.4095
91.1035
326
swe_gym::train::1414
swe_gym
train
1,414
pandas-dev__pandas-57422
pandas-dev/pandas
pandas-dev/pandas
python
c43727711067e474857005cb7669fcec6552cac2
pd.json_normalize doesn't return data with index from series ## TLDR; `pd.json_normalize` creates a new index for the normalised series. ## Issue `pd.json_normalize` returns a new index for the normalised series, rather than the one supplied. Given the other methods in pandas, this seems like it violates the 'principa...
It sure looks weird, but I don't think it is a bug. You perform the join on two dataframes with the rows interchanged due to the sort you performed. If you do this: ```python df1j = pd.json_normalize(df1['json_data'].sort_index()) df2j = pd.json_normalize(df2['json_data'].sort_index()) display(df1.join(df1j)) disp...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index 012fe47c476d1..ab23f0adcb958 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -31,6 +31,7 @@ Other enhancements - :func:`DataFrame.to_excel` now raises an ``UserWarning`` when the character count in a ...
diff --git a/pandas/tests/io/json/test_normalize.py b/pandas/tests/io/json/test_normalize.py index 0f33883feba3a..d83e7b4641e88 100644 --- a/pandas/tests/io/json/test_normalize.py +++ b/pandas/tests/io/json/test_normalize.py @@ -561,6 +561,14 @@ def test_top_column_with_leading_underscore(self): tm.assert_fr...
["pandas/tests/io/json/test_normalize.py::TestJSONNormalize::test_series_index", "pandas/tests/io/json/test_normalize.py::TestNestedToRecord::test_series_non_zero_index"]
["pandas/tests/io/json/test_normalize.py::TestNestedToRecord::test_json_normalize_errors", "pandas/tests/io/json/test_normalize.py::TestNestedToRecord::test_missing_meta_multilevel_record_path_errors_raise", "pandas/tests/io/json/test_normalize.py::TestJSONNormalize::test_non_list_record_path_errors[{}]", "pandas/tests...
null
true
2024-02-14T18:06:34Z
2
41
2
1,622
0
0.85
1
0.85
1
0.407
91.096
327
swe_gym::train::61
swe_gym
train
61
getmoto__moto-6784
getmoto/moto
getmoto/moto
python
870f0ad22dd6b31aba0dd942c8b6995a2ae52975
BUG: mock_dynamodb not handling query key conditions correctly When making a dynamo query that compares a substituted ExpressionAttributeName against a literal value, moto accepts this comparison with no issue, but real AWS resources reject it as invalid. This allowed a bug in our query logic to get past our test suite...
Thanks for raising this @CrypticCabub! Marking it as a bug.
diff --git a/moto/dynamodb/parsing/key_condition_expression.py b/moto/dynamodb/parsing/key_condition_expression.py --- a/moto/dynamodb/parsing/key_condition_expression.py +++ b/moto/dynamodb/parsing/key_condition_expression.py @@ -150,11 +150,11 @@ def parse_expression( # hashkey = :id and sortkey = :sk ...
diff --git a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py --- a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py +++ b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py @@ -1094,3 +1094,22 @@ def test_query_with_empty_filter_e...
["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_query_with_missing_expression_attribute"]
["tests/test_dynamodb/test_dynamodb.py::test_remove_list_index__remove_existing_nested_index", "tests/test_dynamodb/test_dynamodb.py::test_list_table_tags_paginated", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_hash_key_can_only_use_equals_operations[<]", "tests/test_dynamodb/test_dynamodb.py::tes...
null
true
2023-09-07 18:35:46
1
8
1
2,207
0
0.85
1
0.85
1
0.3945
91.0585
328
swe_bench_pro::test::67
swe_bench_pro
test
67
instance_ansible__ansible-5f4e332e3762999d94af27746db29ff1729252c1-v0f01c69f1e2528b935359cfe578530722bca2c59
ansible/ansible
ansible/ansible
python
a870e7d0c6368dbc4c8f1f088f540e8be07223e1
# INI string values are not unquoted correctly in `ansible.cfg` ## Description. Since Ansible 2.15, string values loaded from INI configuration files (e.g., `ansible.cfg`) are returned with surrounding quotes instead of being unquoted. This affects any string configuration set in INI files, causing values to include ...
## Requirements - Configuration string values must have a surrounding pair of matching single (`'...'`) or double (`"..."`) quotes automatically removed during type coercion when the declared type is `str` (or `string`) and the value originates from an INI file. - The `ensure_type` function signature must include an `...
diff --git a/changelogs/fragments/82387-unquote-strings-from-ini-files.yml b/changelogs/fragments/82387-unquote-strings-from-ini-files.yml new file mode 100644 index 00000000000000..c8176876559143 --- /dev/null +++ b/changelogs/fragments/82387-unquote-strings-from-ini-files.yml @@ -0,0 +1,2 @@ +bugfixes: + - Fix condi...
diff --git a/test/integration/targets/config/files/types.env b/test/integration/targets/config/files/types.env index b5fc43ee4f9c12..675d2064b30b4d 100644 --- a/test/integration/targets/config/files/types.env +++ b/test/integration/targets/config/files/types.env @@ -9,3 +9,6 @@ ANSIBLE_TYPES_NOTVALID= # totallynotva...
["test/units/config/test_manager.py::TestConfigManager::test_ensure_type_unquoting[\"value\"-\"value\"-str-/app/test/units/config/test.yml-yaml]", "test/units/config/test_manager.py::TestConfigManager::test_ensure_type_unquoting[\"value\"-value-str-/app/test/units/config/test.cfg-ini]", "test/units/config/test_manager....
["test/units/config/test_manager.py::TestConfigManager::test_ensure_type[a,b-list-list]", "test/units/config/test_manager.py::TestConfigManager::test_ensure_type[value1-list-list]", "test/units/config/test_manager.py::TestConfigManager::test_ensure_type[y-bool-bool]", "test/units/config/test_manager.py::TestConfigManag...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-5f4e332e3762999d94af27746db29ff1729252c1-v0f01c69f1e2528b935359cfe578530722bca2c59
true
null
2
52
5
1,482
0
0.95
1
0.85
1
0.420333
91.036
329
swe_bench_pro::test::579
swe_bench_pro
test
579
instance_qutebrowser__qutebrowser-34a13afd36b5e529d553892b1cd8b9d5ce8881c4-vafb3e8e01b31319c66c4e666b8a3b1d8ba55db24
qutebrowser/qutebrowser
qutebrowser/qutebrowser
python
f8692cb141776c3567e35f9032e9892bf0a7cfc9
# Title Make ELF parser handle file read and seek errors more safely ## Description The ELF parser needs to be more robust when reading from or seeking in a file. Right now, some file operations during parsing can raise low-level exceptions (such as `OSError` or `OverflowError`) that are not handled, so callers can ...
## Requirements - When parsing any invalid, malformed, or truncated ELF data through the file-backed parsing path, the parser must only ever raise `ParseError`; it must not crash or raise any other exception type (for example `struct.error`, `OSError`, or `OverflowError`). - Failures while reading from or seeking in t...
diff --git a/qutebrowser/misc/elf.py b/qutebrowser/misc/elf.py index 8913b082678..1da4709af0a 100644 --- a/qutebrowser/misc/elf.py +++ b/qutebrowser/misc/elf.py @@ -19,7 +19,7 @@ """Simplistic ELF parser to get the QtWebEngine/Chromium versions. -I know what you must be thinking when reading this: "Why on earth do...
diff --git a/tests/unit/misc/test_elf.py b/tests/unit/misc/test_elf.py index 3bfcb4c56e5..d5d5b0ac5ca 100644 --- a/tests/unit/misc/test_elf.py +++ b/tests/unit/misc/test_elf.py @@ -38,16 +38,33 @@ (elf.SectionHeader._FORMATS[elf.Bitness.x32], 0x28), ]) def test_format_sizes(fmt, expected): + """Ensure the str...
["tests/unit/misc/test_elf.py::test_hypothesis"]
["tests/unit/misc/test_elf.py::test_format_sizes[<4sBBBBB7x-16]", "tests/unit/misc/test_elf.py::test_format_sizes[<HHIQQQIHHHHHH-48]", "tests/unit/misc/test_elf.py::test_format_sizes[<HHIIIIIHHHHHH-36]", "tests/unit/misc/test_elf.py::test_format_sizes[<IIQQQQIIQQ-64]", "tests/unit/misc/test_elf.py::test_format_sizes[<I...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-34a13afd36b5e529d553892b1cd8b9d5ce8881c4-vafb3e8e01b31319c66c4e666b8a3b1d8ba55db24
true
null
1
50
1
1,480
0
0.95
1
0.85
1
0.413333
91.015
330
swe_gym::train::114
swe_gym
train
114
getmoto__moto-4847
getmoto/moto
getmoto/moto
python
de559e450dd921bf7f85b0750001a6cb4f840758
[ACM] while requesting a certificate with DNS validation no DomainValidationOptions present on describe certificate ## Reporting Bugs While requesting for a certificate with DNS as the validation option and then Describing the certificate does not return DomainValidationOptions how to reproduce ```python acm_client =...
Thanks for raising this @inai-shreyas - will mark it as an enhancement to return the right attributes here. Waiting for that @bblommers thanks for all of your efforts. Word of warning - requests like this are logged, but that is no guarantee that they will be fixed. If this is something you really need, it may be qui...
diff --git a/moto/acm/models.py b/moto/acm/models.py --- a/moto/acm/models.py +++ b/moto/acm/models.py @@ -367,17 +367,36 @@ def describe(self): "KeyAlgorithm": key_algo, "NotAfter": datetime_to_epoch(self._cert.not_valid_after), "NotBefore": datetime_to_epoch(self._ce...
diff --git a/tests/terraform-tests.success.txt b/tests/terraform-tests.success.txt --- a/tests/terraform-tests.success.txt +++ b/tests/terraform-tests.success.txt @@ -1,4 +1,5 @@ TestAccAWSAccessKey +TestAccAWSAcmCertificateDataSource TestAccAWSAPIGatewayV2Authorizer TestAccAWSAPIGatewayV2IntegrationResponse TestAc...
["tests/test_acm/test_acm.py::test_request_certificate_no_san", "tests/test_acm/test_acm.py::test_describe_certificate"]
["tests/test_acm/test_acm.py::test_import_certificate_with_tags", "tests/test_acm/test_acm.py::test_resend_validation_email_invalid", "tests/test_acm/test_acm.py::test_remove_tags_from_invalid_certificate", "tests/test_acm/test_acm.py::test_import_certificate", "tests/test_acm/test_acm.py::test_request_certificate", "t...
null
true
2022-02-09 21:15:36
1
23
2
1,819
0
0.85
1
0.85
1
0.379833
91.0145
331
swe_bench_pro::test::91
swe_bench_pro
test
91
instance_ansible__ansible-be59caa59bf47ca78a4760eb7ff38568372a8260-v1055803c3a812189a1133297f7f5468579283f86
ansible/ansible
ansible/ansible
python
98726ad86c27b4cbd607f7be97ae0f56461fcc03
## Title: The Ansible `iptables` module lacked support for ipset-based sets via the set extension (parameters `match_set` and `match_set_flags`). ## Description: Before this change, the Ansible `iptables` module did not provide parameters to define firewall rules using ipsets (`-m set --match-set`). As a result, users ...
## Requirements - The module must allow defining rules that match against sets managed by `ipset` using two parameters: `match_set`, the name of the ipset to be used, and `match_set_flags`, the address or addresses to which the set applies, accepting the values `src`, `dst`, `src,dst`, and `dst,src`. - When both `matc...
diff --git a/changelogs/fragments/72984_adding_set_support.yml b/changelogs/fragments/72984_adding_set_support.yml new file mode 100644 index 00000000000000..31cdc60d77953b --- /dev/null +++ b/changelogs/fragments/72984_adding_set_support.yml @@ -0,0 +1,2 @@ +minor_changes: +- Module iptables set/ipset support added (h...
diff --git a/test/units/modules/test_iptables.py b/test/units/modules/test_iptables.py index 7326b6563ca349..e8d8ff2c616960 100644 --- a/test/units/modules/test_iptables.py +++ b/test/units/modules/test_iptables.py @@ -953,3 +953,66 @@ def test_destination_ports(self): '-m', 'comment', '--comm...
["test/units/modules/test_iptables.py::TestIptables::test_match_set"]
["test/units/modules/test_iptables.py::TestIptables::test_jump_tee_gateway", "test/units/modules/test_iptables.py::TestIptables::test_comment_position_at_end", "test/units/modules/test_iptables.py::TestIptables::test_insert_rule_with_wait", "test/units/modules/test_iptables.py::TestIptables::test_append_rule", "test/un...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-be59caa59bf47ca78a4760eb7ff38568372a8260-v1055803c3a812189a1133297f7f5468579283f86
true
null
2
35
1
1,767
0
0.95
1
0.85
1
0.411167
91.0085
332
swe_gym::train::2013
swe_gym
train
2,013
Project-MONAI__MONAI-7734
Project-MONAI/MONAI
project-monai/monai
python
e1a69b03c86ce065db2816b696ea4a6b57d46435
Attention-UNet implementation does not propagate kernel_size **Description** When changing the kernel_size of the attention-unet, amount of trainable parameters stays the same. Reason: The kernel size will be set to the assigned default value, because the when creating ConvBlocks the Kernelsize is not propagated. **To...
I'd like to take this as a first contribution :)
diff --git a/monai/networks/nets/attentionunet.py b/monai/networks/nets/attentionunet.py --- a/monai/networks/nets/attentionunet.py +++ b/monai/networks/nets/attentionunet.py @@ -29,7 +29,7 @@ def __init__( spatial_dims: int, in_channels: int, out_channels: int, - kernel_size: int = 3,...
diff --git a/tests/test_attentionunet.py b/tests/test_attentionunet.py --- a/tests/test_attentionunet.py +++ b/tests/test_attentionunet.py @@ -14,11 +14,17 @@ import unittest import torch +import torch.nn as nn import monai.networks.nets.attentionunet as att from tests.utils import skip_if_no_cuda, skip_if_quic...
["tests/test_attentionunet.py::TestAttentionUnet::test_attentionunet_kernel_size"]
["tests/test_attentionunet.py::TestAttentionUnet::test_attention_block", "tests/test_attentionunet.py::TestAttentionUnet::test_attentionunet"]
null
true
2024-05-01T16:20:02Z
1
12
1
2,020
0
0.85
1
0.85
1
0.376667
91.005
333
swe_gym::train::1887
swe_gym
train
1,887
facebookresearch__hydra-892
facebookresearch/hydra
facebookresearch/hydra
python
7afee0976f7507c3c1b607ebd129d3408b608fa2
[Bug] multirun is not working well with bash autocompletion when sweeps are lists (p=1,2) # 🐛 Bug ## Description When I do this: ```shell python simple.py -m model.p1=1,2 model.p2=2 Ambiguous value for argument 'model.p1=1,2' 1. To use it as a list, use model.p1=[1,2] 2. To use it as string use model.p1=\'1,2\' 3. To ...
Thanks for reporting. tab comes here? ``` python simple.py -m model.p1=1,2 model.p2=2 <TAB> ``` Yes, @omry . Basically, this will work: ```bash python simple.py -m model.p1=1 model.p2=2 <TAB><TAB> ``` And these ones will not: ```bash python simple.py -m model.p1=1,2 m<TAB><TAB> ``` ```bash python simple.p...
diff --git a/hydra/plugins/completion_plugin.py b/hydra/plugins/completion_plugin.py --- a/hydra/plugins/completion_plugin.py +++ b/hydra/plugins/completion_plugin.py @@ -9,8 +9,6 @@ import re import sys from abc import abstractmethod -from typing import Any, List, Optional, Tuple, Union - from omegaconf import ( ...
diff --git a/tests/test_completion.py b/tests/test_completion.py --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -80,7 +80,7 @@ def test_bash_completion_with_dot_in_path(self) -> None: ] -@pytest.mark.parametrize("line_prefix", ["", "dict.key1=val1 ", "-r "]) +@pytest.mark.parametrize("line_prefix...
["tests/test_completion.py::TestMultirunCompletion::test_completion_plugin_multirun[multirun1]"]
["tests/test_completion.py::test_strip[dict.-5-foo.par-]", "tests/test_completion.py::test_strip[-0-hydra_app", "tests/test_completion.py::test_strip[foo=bar-None-hy1-_=ra_app-/foo/bar]", "tests/test_completion.py::test_strip[dict.-5-hy1-_=ra_app-", "tests/test_completion.py::TestRunCompletion::test_completion_plugin[g...
null
true
2020-08-19T19:04:12Z
1
10
1
2,053
0
0.85
1
0.85
1
0.3755
91.0015
334
swe_bench_pro::test::618
swe_bench_pro
test
618
instance_qutebrowser__qutebrowser-cc360cd4a34a126274c7b51f3b63afbaf3e05a02-v5fc38aaf22415ab0b70567368332beee7955b367
qutebrowser/qutebrowser
qutebrowser/qutebrowser
python
96b997802e942937e81d2b8a32d08f00d3f4bc4e
## Title `parse_duration` incorrectly handles invalid and formatted duration inputs. ### Description The function `parse_duration` does not correctly validate or parse duration strings in several scenarios. It currently accepts some invalid inputs by returning `-1`, and it does not consistently handle fractional value...
## Requirements - If the input string consists only of digits, `parse_duration` should interpret those digits directly as a number of milliseconds and return that value unchanged as an integer. **Note: this is a breaking change from the previous behavior — plain digit-only inputs used to be treated as seconds (multipli...
diff --git a/qutebrowser/misc/utilcmds.py b/qutebrowser/misc/utilcmds.py index 95302488af9..2662f364bdc 100644 --- a/qutebrowser/misc/utilcmds.py +++ b/qutebrowser/misc/utilcmds.py @@ -49,9 +49,10 @@ def later(duration: str, command: str, win_id: int) -> None: duration: Duration to wait in format XhYmZs or num...
diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py index 48e66003dea..a03f36de0da 100644 --- a/tests/unit/utils/test_utils.py +++ b/tests/unit/utils/test_utils.py @@ -820,24 +820,42 @@ def test_libgl_workaround(monkeypatch, skip): utils.libgl_workaround() # Just make sure it doesn't cras...
["tests/unit/utils/test_utils.py::test_parse_duration[0.5s-500]", "tests/unit/utils/test_utils.py::test_parse_duration[60-60]", "tests/unit/utils/test_utils.py::test_parse_duration[60.4s-60400]", "tests/unit/utils/test_utils.py::test_parse_duration[1.5m-90000]", "tests/unit/utils/test_utils.py::test_parse_duration[0.5h...
["tests/unit/utils/test_utils.py::TestCompactText::test_compact_text['foo\\\\nbar'-'foobar']", "tests/unit/utils/test_utils.py::TestCompactText::test_compact_text[' foo \\\\n bar '-'foobar']", "tests/unit/utils/test_utils.py::TestCompactText::test_compact_text['\\\\nfoo\\\\n'-'foo']", "tests/unit/utils/test_utils.p...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-cc360cd4a34a126274c7b51f3b63afbaf3e05a02-v5fc38aaf22415ab0b70567368332beee7955b367
true
null
2
44
9
1,552
0
0.95
1
0.85
1
0.405333
90.991
335
swe_bench_pro::test::177
swe_bench_pro
test
177
instance_flipt-io__flipt-1737085488ecdcd3299c8e61af45a8976d457b7e
flipt-io/flipt
flipt-io/flipt
go
1f6255dda6648ecafd94826cda3fac2486af4b0f
## Title: [Bug]: import metadata issue ## Bug Description: Importing exported flags fails with a proto type error after exporting and then importing the file; this occurs when the export contains complex and nested metadata and/or when the JSON export begins with a leading \"#\" comment line, causing the import proces...
## Requirements - The YAML import must use the YAML v3 decoder so that mappings deserialize into JSON compatible structures and preserve nested ‘metadata’ structures (maps and arrays) without type errors during import. - When handling JSON in the import flow, the reader must accept files that begin with exactly one le...
diff --git a/internal/ext/encoding.go b/internal/ext/encoding.go index 12d4fbce62..950d24a04d 100644 --- a/internal/ext/encoding.go +++ b/internal/ext/encoding.go @@ -5,6 +5,7 @@ import ( "io" "gopkg.in/yaml.v2" + yamlv3 "gopkg.in/yaml.v3" ) type Encoding string @@ -44,7 +45,7 @@ func (n NopCloseEncoder) Clos...
diff --git a/internal/ext/importer_test.go b/internal/ext/importer_test.go index 909c0e9b1e..3546fc059c 100644 --- a/internal/ext/importer_test.go +++ b/internal/ext/importer_test.go @@ -1101,6 +1101,21 @@ func TestImport(t *testing.T) { }, }, }, + { + name: "import with flag complex metadata", + path:...
["TestImport"]
[]
ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-1737085488ecdcd3299c8e61af45a8976d457b7e
true
null
2
52
1
1,357
0
0.95
1
0.85
1
0.3995
90.9735
336
swe_gym::train::467
swe_gym
train
467
python__mypy-15440
python/mypy
python/mypy
python
e14cddbe31c9437502acef022dca376a25d0b50d
dmypy ignores flags and config file **Bug Report** dmypy ignores flags and config file https://github.com/python/mypy/pull/11396#issuecomment-1048483794 > @sehyun-hwang This seems like a dmypy bug. It seems that dmypy ignores cli flags or config file flags in certain cases. > > Here's a file structure: > > ``` > $ tr...
Is there a workaround for this issue? I'd really like to use dmypy on a project I'm working on (as it will speed up our CI job considerably compared to mypy), but I need to be able to set options in a config file. We have the same problem, first execution `dmypy run -- --config-file mypy.ini` uses the `--config-file`, ...
diff --git a/mypy/dmypy_server.py b/mypy/dmypy_server.py --- a/mypy/dmypy_server.py +++ b/mypy/dmypy_server.py @@ -857,6 +857,21 @@ def _find_changed( assert path removed.append((source.module, path)) + # Always add modules that were (re-)added, since they may be detected as not chang...
diff --git a/test-data/unit/daemon.test b/test-data/unit/daemon.test --- a/test-data/unit/daemon.test +++ b/test-data/unit/daemon.test @@ -62,6 +62,28 @@ Daemon started \[mypy] files = ./foo.py +[case testDaemonRunMultipleStrict] +$ dmypy run -- foo.py --strict --follow-imports=error +Daemon started +foo.py:1: erro...
["mypy/test/testfinegrained.py::FineGrainedSuite::fine-grained.test::testErrorInReAddedModule", "mypy/test/testdaemon.py::DaemonSuite::daemon.test::testDaemonRunMultipleStrict"]
["mypy/test/testdaemon.py::DaemonSuite::daemon.test::testDaemonRunRestartPretty", "mypy/test/testdaemon.py::DaemonSuite::daemon.test::testDaemonRunRestart", "mypy/test/testdaemon.py::DaemonSuite::daemon.test::testDaemonRunRestartGlobs", "mypy/test/testdaemon.py::DaemonSuite::daemon.test::testDaemonRunRestartPluginVersi...
null
true
2023-06-14T23:44:18Z
1
15
2
1,886
0
0.85
1
0.85
1
0.364333
90.968
337
swe_gym::train::530
swe_gym
train
530
python__mypy-13731
python/mypy
python/mypy
python
f5ce4ee6ca7e2d8bb1cde8a2b49865f53bbacff5
False warnings and crash with dynamic class in match statement **Crash Report** Using a dynamically created class in a match statement produces a warning about it not being a type. If the match also has `*rest` clause mypy crashes. **Traceback** ``` reproducer.py:15: error: Expected type in class pattern; found "Typ...
In case anyone else hits this: It's possible to work around it with a plugin using the [`get_dynamic_class_hook`](https://mypy.readthedocs.io/en/stable/extending_mypy.html#current-list-of-plugin-hooks) callback. The plugin just have to create the types for mypy, so it properly understands that it's classes. E.g. I h...
diff --git a/mypy/checkpattern.py b/mypy/checkpattern.py --- a/mypy/checkpattern.py +++ b/mypy/checkpattern.py @@ -257,16 +257,13 @@ def visit_sequence_pattern(self, o: SequencePattern) -> PatternType: contracted_inner_types = self.contract_starred_pattern_types( inner_types, star_position, requir...
diff --git a/test-data/unit/check-python310.test b/test-data/unit/check-python310.test --- a/test-data/unit/check-python310.test +++ b/test-data/unit/check-python310.test @@ -317,6 +317,21 @@ match x: case [str()]: pass +[case testMatchSequencePatternWithInvalidClassPattern] +class Example: + __match...
["mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchSequencePatternWithInvalidClassPattern"]
[]
null
true
2022-09-25T23:29:05Z
1
13
1
1,920
0
0.85
1
0.85
1
0.363333
90.965
338
swe_bench_pro::test::399
swe_bench_pro
test
399
instance_internetarchive__openlibrary-431442c92887a3aece3f8aa771dd029738a80eb1-v76304ecdb3a5954fcf13feb710e8c40fcf24b73c
internetarchive/openlibrary
internetarchive/openlibrary
python
188a76779dbd2368d73313ad15cae639c295eb21
## Title: Child nodes in Luqum parse trees cannot be replaced. ### Problem: Currently, the Luqum utilities provide functionality to traverse and remove nodes in a parse tree, but they do not offer a direct way to replace an existing child node with a new one. This limitation complicates scenarios where an expression ...
## Requirements - A new helper `luqum_replace_child` should be introduced to replace a direct child node in a luqum parse tree, taking `parent`, `old_child`, and `new_child` as `Item`. - When `parent` is a supported node type, `luqum_replace_child` should rebuild the children sequence preserving order and type, replac...
diff --git a/openlibrary/plugins/worksearch/schemes/works.py b/openlibrary/plugins/worksearch/schemes/works.py index 0d443e8250f..76293f9d973 100644 --- a/openlibrary/plugins/worksearch/schemes/works.py +++ b/openlibrary/plugins/worksearch/schemes/works.py @@ -2,7 +2,7 @@ import logging import re import sys -from ty...
diff --git a/openlibrary/tests/solr/test_query_utils.py b/openlibrary/tests/solr/test_query_utils.py index e6399449380..25c18d042bf 100644 --- a/openlibrary/tests/solr/test_query_utils.py +++ b/openlibrary/tests/solr/test_query_utils.py @@ -3,6 +3,7 @@ EmptyTreeError, luqum_parser, luqum_remove_child, + ...
["openlibrary/tests/solr/test_query_utils.py::test_luqum_remove_child[Group]", "openlibrary/tests/solr/test_query_utils.py::test_luqum_remove_child[Unary]", "openlibrary/tests/solr/test_query_utils.py::test_luqum_parser", "openlibrary/tests/solr/test_query_utils.py::test_luqum_remove_child[Complete", "openlibrary/tests...
[]
ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-431442c92887a3aece3f8aa771dd029738a80eb1-v76304ecdb3a5954fcf13feb710e8c40fcf24b73c
true
null
2
56
7
1,255
0
0.95
1
0.85
1
0.395833
90.9625
339
swe_gym::train::521
swe_gym
train
521
python__mypy-11345
python/mypy
python/mypy
python
9bd651758e8ea2494837814092af70f8d9e6f7a1
Crash with slices e.g. `Annotated[int, 3:4]` **Bug Report / To Reproduce / Actual Behavior** This: ```python # file.py from typing import Annotated def func(x: Annotated[int, 3:4]): pass # command line mypy file.py ``` produces: ``` file.py:4: error: syntax error in type comment Found 1 error in 1 file (errors pr...
That's a fun one! It's probably pretty easy to fix if you track down where the error comes from (probably somewhere in `fastparse.py`). I did some digging. The error is being raised from `visit_Subscript` in `mypy.fastparse.TypeConverter`. The code is different depending on the Python version but the error is the same...
diff --git a/mypy/fastparse.py b/mypy/fastparse.py --- a/mypy/fastparse.py +++ b/mypy/fastparse.py @@ -1,4 +1,5 @@ from mypy.util import unnamed_function +import copy import re import sys import warnings @@ -130,8 +131,6 @@ def ast3_parse(source: Union[str, bytes], filename: str, mode: str, INVALID_TYPE_IGNORE: ...
diff --git a/test-data/unit/check-annotated.test b/test-data/unit/check-annotated.test --- a/test-data/unit/check-annotated.test +++ b/test-data/unit/check-annotated.test @@ -126,3 +126,20 @@ class Meta: x = Annotated[int, Meta()] reveal_type(x) # N: Revealed type is "def () -> builtins.int" [builtins fixtures/tupl...
["mypy/test/testcheck.py::TypeCheckSuite::testSliceAnnotated39", "mypy/test/testcheck.py::TypeCheckSuite::testSliceInDict38", "mypy/test/testcheck.py::TypeCheckSuite::testSliceAnnotated38", "mypy/test/testcheck.py::TypeCheckSuite::testSliceInDict39", "mypy/test/testcheck.py::TypeCheckSuite::testSliceInCustomTensorType"...
["mypy/test/testcheck.py::TypeCheckSuite::testPrintStatementTrailingCommaFastParser_python2", "mypy/test/testparse.py::ParserSuite::testSliceInList39"]
null
true
2021-10-16T05:45:29Z
1
39
5
1,365
0
0.85
1
0.85
1
0.3575
90.9475
340
swe_gym::train::353
swe_gym
train
353
python__mypy-16503
python/mypy
python/mypy
python
0699dde8dc2633861a65ac43701eda09e79de366
mypy's narrowing for match statements sometimes fails when the subject of the match is a function call **Bug Report** mypy's narrowing for `match` statements sometimes fails when the subject of the match is a function call. **To Reproduce** ```python from typing_extensions import assert_never def fn() -> int | None...
Potential workaround (yet this is certainly a bug): ```python match value := fn(): ... ``` Overall, I think the problem is with `Callable`: ```python def foo(f: Callable[[], Result[int, str]]) -> str: match f(): # does not work, mypy complains case Ok(value): return f"{valu...
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -5043,6 +5043,19 @@ def visit_continue_stmt(self, s: ContinueStmt) -> None: return None def visit_match_stmt(self, s: MatchStmt) -> None: + named_subject: Expression + if isinstance(s.subject, Cal...
diff --git a/test-data/unit/check-python310.test b/test-data/unit/check-python310.test --- a/test-data/unit/check-python310.test +++ b/test-data/unit/check-python310.test @@ -1139,6 +1139,21 @@ match m: reveal_type(a) # N: Revealed type is "builtins.str" +[case testMatchCapturePatternFromFunctionReturningUnion] +...
["mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchCapturePatternFromFunctionReturningUnion"]
["mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchSimplePatternGuard"]
null
true
2023-11-16T00:06:30Z
1
19
1
1,762
0
0.85
1
0.85
1
0.357
90.946
341
swe_gym::train::2229
swe_gym
train
2,229
Project-MONAI__MONAI-2513
Project-MONAI/MONAI
project-monai/monai
python
0711e0421afc16da378ffe7e348578ff2b3881f2
Focal Loss returning 0.0 with include_background=False (7/July) **Describe the bug** Focal Loss returns 0 for all entries when input consists of only one channel. Tried running the spleen 3D segmentation tutorial with `DiceFocalLoss(include_background=False)`. Printing out dice and focal loss separately shows the probl...
Hi @SteEcker , Thanks for your issue report! @yiheng-wang-nv , could you please help check this issue? Thanks in advance. Hi @SteEcker , could you please clarify what is the number of classes in your case? As the docsting shown in: https://github.com/Project-MONAI/MONAI/blob/dev/monai/losses/focal_loss.py#L...
diff --git a/monai/losses/focal_loss.py b/monai/losses/focal_loss.py --- a/monai/losses/focal_loss.py +++ b/monai/losses/focal_loss.py @@ -22,7 +22,7 @@ class FocalLoss(_Loss): """ - Reimplementation of the Focal Loss described in: + Reimplementation of the Focal Loss (with a build-in sigmoid activation) ...
diff --git a/tests/test_focal_loss.py b/tests/test_focal_loss.py --- a/tests/test_focal_loss.py +++ b/tests/test_focal_loss.py @@ -22,9 +22,9 @@ class TestFocalLoss(unittest.TestCase): def test_consistency_with_cross_entropy_2d(self): - # For gamma=0 the focal loss reduces to the cross entropy loss - ...
["tests/test_focal_loss.py::TestFocalLoss::test_consistency_with_cross_entropy_2d_onehot_label", "tests/test_focal_loss.py::TestFocalLoss::test_consistency_with_cross_entropy_classification", "tests/test_focal_loss.py::TestFocalLoss::test_ill_shape", "tests/test_focal_loss.py::TestFocalLoss::test_consistency_with_cross...
["tests/test_focal_loss.py::TestFocalLoss::test_script", "tests/test_focal_loss.py::TestFocalLoss::test_multi_class_seg_2d", "tests/test_focal_loss.py::TestFocalLoss::test_ill_class_weight", "tests/test_focal_loss.py::TestFocalLoss::test_empty_class_2d", "tests/test_masked_loss.py::TestMaskedLoss::test_ill_opts", "test...
null
true
2021-07-02T19:02:27Z
1
26
6
1,621
0
0.85
1
0.85
1
0.356833
90.9455
342
swe_gym::train::1526
swe_gym
train
1,526
pandas-dev__pandas-55495
pandas-dev/pandas
pandas-dev/pandas
c
abba4e2df1ba1651f89ca4b02f8eeeffc17375c2
BUG: DataFrame.to_json OverflowError with np.long* dtypes ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confirmed this bug exists ...
I can confirm this bug occurs on the main development branch. ```Python >>> df = pd.DataFrame( ... np.random.randint(0, 100, size=(10, 1)), ... dtype=np.longdouble, ... ) >>> df.to_json(sys.stdout) Traceback (most recent call last): ... OverflowError: Maximum recursion level reached >>> df = pd.Da...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 29a2d5c0b5877..e40553353fc20 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -349,6 +349,7 @@ I/O - Bug in :func:`read_excel`, with ``engine="xlrd"`` (``xls`` files) erroring when file contains NaNs/I...
diff --git a/pandas/tests/io/json/test_ujson.py b/pandas/tests/io/json/test_ujson.py index d5f8c5200c4a3..646f6745936bd 100644 --- a/pandas/tests/io/json/test_ujson.py +++ b/pandas/tests/io/json/test_ujson.py @@ -814,10 +814,19 @@ def test_array_float(self): def test_0d_array(self): # gh-18878 - ...
["pandas/tests/io/json/test_ujson.py::TestNumpyJSONTests::test_array_long_double", "pandas/tests/io/json/test_ujson.py::TestNumpyJSONTests::test_0d_array"]
["pandas/tests/io/json/test_ujson.py::TestNumpyJSONTests::test_bool[False]", "pandas/tests/io/json/test_ujson.py::TestNumpyJSONTests::test_bool[True]", "pandas/tests/io/json/test_ujson.py::TestUltraJSONTests::test_encode_time_conversion_basic[test1]", "pandas/tests/io/json/test_ujson.py::TestUltraJSONTests::test_decode...
null
true
2023-10-12T13:02:00Z
2
5
2
2,979
0
0.85
1
1
0.8
0.513167
90.9395
343
swe_gym::train::1192
swe_gym
train
1,192
pandas-dev__pandas-52330
pandas-dev/pandas
pandas-dev/pandas
python
5ea55705aefb66358ce7318f0a8874142f5979d4
BUG: AttributeError: 'ArrowTemporalProperties' object has no attribute 'year' ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirme...
Looks like these functions haven't been implemented yet in the ArrowExtensionArray class ``` iso_week(values, /, *[, memory_pool]) iso_year(values, /, *[, memory_pool]) millisecond(values, /, *[, memory_pool]) subsecond(values, /, *[, memory_pool]) us_week(values, /, *[, memory_pool]) us_year(values, /, *[, me...
diff --git a/pandas/core/arrays/arrow/array.py b/pandas/core/arrays/arrow/array.py index 998aa6b9e6f08..86a15ba6ca61b 100644 --- a/pandas/core/arrays/arrow/array.py +++ b/pandas/core/arrays/arrow/array.py @@ -1961,6 +1961,10 @@ def _str_wrap(self, width: int, **kwargs): "str.wrap not supported with pd.Arro...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index 24013f4aa3a9a..f441c2656c92a 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -2110,6 +2110,7 @@ def test_unsupported_dt(data): @pytest.mark.parametrize( "prop, expected", ...
["pandas/tests/extension/test_arrow.py::test_dt_properties[year-2023]"]
["pandas/tests/extension/test_arrow.py::TestBaseSetitem::test_setitem_scalar[timestamp[s,", "pandas/tests/extension/test_arrow.py::TestConstructors::test_from_dtype[timestamp[us,", "pandas/tests/extension/test_arrow.py::TestBaseMethods::test_shift_0_periods[binary]", "pandas/tests/extension/test_arrow.py::TestBaseInter...
null
true
2023-03-31T18:18:15Z
1
4
1
2,992
0
0.85
1
1
0.8
0.512
90.936
344
swe_gym::train::748
swe_gym
train
748
iterative__dvc-4978
iterative/dvc
iterative/dvc
python
6d745eb4f0fc4578e3abea25a9becaf2c9da1612
dvc init fails when .dvc directory is git-ignored Tested on Windows (binary & pip install) in Windows Terminal (Powershell) and in Git Bash. **Issue** I tried to run "dvc init" in a repository that had an ".*" entry in its .gitignore. With -v flag, it fails with the following message: ``` Traceback (most recent call l...
Discord Context: https://discordapp.com/channels/485586884165107732/485596304961962003/706846820172824679
diff --git a/dvc/repo/init.py b/dvc/repo/init.py --- a/dvc/repo/init.py +++ b/dvc/repo/init.py @@ -45,19 +45,22 @@ def init(root_dir=os.curdir, no_scm=False, force=False, subdir=False): scm = SCM(root_dir, search_parent_directories=subdir, no_scm=no_scm) except SCMError: raise InitError( - ...
diff --git a/tests/func/test_init.py b/tests/func/test_init.py --- a/tests/func/test_init.py +++ b/tests/func/test_init.py @@ -111,3 +111,17 @@ def test_gen_dvcignore(tmp_dir): "# https://dvc.org/doc/user-guide/dvcignore\n" ) assert text == (tmp_dir / ".dvcignore").read_text() + + +def test_init_when...
["tests/func/test_scm.py::test_ignored", "tests/func/test_init.py::test_init_when_ignored_by_git"]
["tests/func/test_scm.py::test_init_none", "tests/func/test_scm.py::test_ignore", "tests/func/test_scm.py::test_gitignore_should_append_newline_to_gitignore", "tests/func/test_scm.py::TestSCMGit::test_commit", "tests/func/test_init.py::test_gen_dvcignore", "tests/func/test_init.py::TestDoubleInit::test_api", "tests/fun...
null
true
2020-11-26T17:55:56Z
3
25
2
1,600
0
0.85
1
0.85
1
0.35
90.925
345
swe_gym::train::2090
swe_gym
train
2,090
Project-MONAI__MONAI-5067
Project-MONAI/MONAI
project-monai/monai
python
f9e8e10fab3a0c0b87708222db96571236c9e764
ThreadDataLoader dataloading order is related to numworker, which makes it difficult to reproduce **Describe the bug** During our experiments, we found that the ThreadDataLoader loading order made a difference when using the shuffling strategy related to numworkers **To Reproduce** ```python import torch from monai.ut...
thanks for reporting, I did more tests, indeed it's an issue even for the default monai DataLoaders: ```py import torch from monai.data import DataLoader from monai.utils import set_determinism def main(): set_determinism(0) loader = DataLoader(torch.arange(10), batch_size=2, shuffle=True, num_wo...
diff --git a/monai/data/dataloader.py b/monai/data/dataloader.py --- a/monai/data/dataloader.py +++ b/monai/data/dataloader.py @@ -66,6 +66,8 @@ def __len__(self): num_workers: how many subprocesses to use for data loading. ``0`` means that the data will be loaded in the main process. ...
diff --git a/tests/test_compose.py b/tests/test_compose.py --- a/tests/test_compose.py +++ b/tests/test_compose.py @@ -169,16 +169,16 @@ def test_data_loader(self): set_determinism(seed=123) train_loader = DataLoader(train_ds, num_workers=0) out_1 = next(iter(train_loader)) - self.asse...
["tests/test_patch_dataset.py::TestPatchDataset::test_loading_array", "tests/test_compose.py::TestCompose::test_data_loader", "tests/test_grid_dataset.py::TestGridPatchDataset::test_loading_array", "tests/test_thread_buffer.py::TestDataLoader::test_deterministic", "tests/test_grid_dataset.py::TestGridPatchDataset::test...
["tests/test_thread_buffer.py::TestDataLoader::test_values", "tests/test_grid_dataset.py::TestGridPatchDataset::test_shape", "tests/test_dataloader.py::TestDataLoader::test_exception_0", "tests/test_compose.py::TestCompose::test_flatten_and_len", "tests/test_compose.py::TestCompose::test_randomize_warn", "tests/test_da...
null
true
2022-09-01T21:25:09Z
1
11
7
1,853
0
0.85
1
0.85
1
0.3455
90.9115
346
swe_gym::train::1071
swe_gym
train
1,071
pydantic__pydantic-6274
pydantic/pydantic
pydantic/pydantic
python
9cfad5c3cee6a31d2bcb410feffff2afc4d0c489
Duplicate ref with multiple optional Enums inside a pydantic dataclass ### Initial Checks - [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent ### Description When using `pydantic.dataclasses.dataclass`, I noticed a data constellation which cannot be built (see the exam...
Thanks for reporting this, it's definitely a bug Slightly simplified version, it also happens with TypedDict: ```python from enum import Enum, auto from typing import Optional from typing_extensions import TypedDict from pydantic.type_adapter import TypeAdapter class MyEnum(Enum): a = auto() c...
diff --git a/pydantic/_internal/_core_utils.py b/pydantic/_internal/_core_utils.py --- a/pydantic/_internal/_core_utils.py +++ b/pydantic/_internal/_core_utils.py @@ -475,6 +475,9 @@ def flatten_refs(s: core_schema.CoreSchema, recurse: Recurse) -> core_schema.Cor schema = walk_core_schema(schema, flatten_refs) ...
diff --git a/tests/test_edge_cases.py b/tests/test_edge_cases.py --- a/tests/test_edge_cases.py +++ b/tests/test_edge_cases.py @@ -4,7 +4,7 @@ from abc import ABC, abstractmethod from collections.abc import Hashable from decimal import Decimal -from enum import Enum +from enum import Enum, auto from typing import (...
["tests/test_internal.py::test_build_schema_defs[input_schema8-flattened8-inlined8]", "tests/test_edge_cases.py::test_multiple_enums"]
["tests/test_edge_cases.py::test_long_int", "tests/test_edge_cases.py::test_frozen_config_and_field", "tests/test_edge_cases.py::test_recursive_list", "tests/test_edge_cases.py::test_type_var_constraint", "tests/test_edge_cases.py::test_int_subclass", "tests/test_edge_cases.py::test_model_issubclass", "tests/test_edge_...
null
true
2023-06-27T18:15:20Z
1
3
2
2,946
0
0.85
1
1
0.8
0.501
90.903
347
swe_gym::train::543
swe_gym
train
543
python__mypy-12048
python/mypy
python/mypy
python
6d243321d632c47b9fef5f2ad6a972f9f4b94eff
crash with generator in list comprehension **Crash Report** possibly related to #10188 **Traceback** ``` mypybug.py:7: error: INTERNAL ERROR -- Please try using mypy master on Github: https://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build Please report a bug at https://github.com/python/myp...
This is a syntax error in 3.8 and later, presumably because it has no useful behavior: https://docs.python.org/3.10/whatsnew/3.8.html#changes-in-python-behavior. Perhaps mypy should just produce an error for it in any Python version. Hey! I'm relatively new to Open Source Contribution, Is there anything I could be help...
diff --git a/mypy/semanal.py b/mypy/semanal.py --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -3830,13 +3830,15 @@ def visit_star_expr(self, expr: StarExpr) -> None: expr.expr.accept(self) def visit_yield_from_expr(self, e: YieldFromExpr) -> None: - if not self.is_func_scope(): # not sure + ...
diff --git a/test-data/unit/check-semanal-error.test b/test-data/unit/check-semanal-error.test --- a/test-data/unit/check-semanal-error.test +++ b/test-data/unit/check-semanal-error.test @@ -77,10 +77,47 @@ continue # E: "continue" outside loop [case testYieldOutsideFunction] yield # E: "yield" outside function - -...
["mypy/test/testcheck.py::TypeCheckSuite::check-semanal-error.test::testYieldOutsideFunction"]
["mypy/test/testsemanal.py::SemAnalErrorSuite::semanal-errors.test::testYieldOutsideFunction", "mypy/test/testcheck.py::TypeCheckSuite::check-semanal-error.test::testImportFuncDup"]
null
true
2022-01-23T22:40:12Z
2
38
1
1,295
0
0.85
1
0.85
1
0.3425
90.9025
348
swe_gym::train::1598
swe_gym
train
1,598
pandas-dev__pandas-49118
pandas-dev/pandas
pandas-dev/pandas
python
7bf8d6b318e0b385802e181ace3432ae73cbf79b
BUG: `USFederalHolidayCalendar.holidays` inconsistently returns Index and not DateTimeIndex ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X]...
Same behavior seen for March (the other month with no US Federal holidays), but interestingly the behavior is consistent for 2019. ```>>> import datetime >>> from pandas.tseries.holiday import USFederalHolidayCalendar >>> cal = USFederalHolidayCalendar() >>> cal.holidays(start=datetime.date(2018,8,1), end=datetim...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 14b4df286d989..dfea3d450fa8a 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -353,7 +353,7 @@ Datetimelike - Bug in :func:`to_datetime` was raising on invalid offsets with ``errors='coerce'`` and ``in...
diff --git a/pandas/tests/tseries/holiday/test_federal.py b/pandas/tests/tseries/holiday/test_federal.py index 64c60d4e365e6..2565877f8a2a4 100644 --- a/pandas/tests/tseries/holiday/test_federal.py +++ b/pandas/tests/tseries/holiday/test_federal.py @@ -1,7 +1,11 @@ from datetime import datetime +from pandas import D...
["pandas/tests/tseries/holiday/test_federal.py::test_federal_holiday_inconsistent_returntype", "pandas/tests/tseries/holiday/test_holiday.py::test_half_open_interval_with_observance"]
["pandas/tests/tseries/holiday/test_holiday.py::test_holidays_within_dates[New", "pandas/tests/tseries/holiday/test_holiday.py::test_holidays_within_dates[holiday7-2015-11-26-expected7]", "pandas/tests/tseries/holiday/test_holiday.py::test_argument_types[<lambda>0]", "pandas/tests/tseries/holiday/test_holiday.py::test_...
null
true
2022-10-15T19:27:43Z
2
8
2
1,880
0
0.85
1
0.85
1
0.34
90.895
349
swe_gym::train::2204
swe_gym
train
2,204
Project-MONAI__MONAI-6412
Project-MONAI/MONAI
project-monai/monai
python
4404075818624f069520ff87bce2b74fca46df1c
Wrong channel in `DiceHelper` **Describe the bug** `DiceHelper` should add a `n_classs` arg if the user adds post-processing on the prediction, L218 will generate wrong channel. https://github.com/Project-MONAI/MONAI/blob/fbf8847a491b1909c7cda76e4278bb5395fcb323/monai/metrics/meandice.py#L218 **To Reproduce** ``` impo...
previously the docstring states that `y_pred` should have n-channels though https://github.com/Project-MONAI/MONAI/blob/8279a30a39c037402d0a5c4e11a2a0a613591412/monai/metrics/meandice.py#L30 https://github.com/Project-MONAI/MONAI/blob/8279a30a39c037402d0a5c4e11a2a0a613591412/monai/metrics/meandice.py#L144 so c...
diff --git a/monai/handlers/mean_dice.py b/monai/handlers/mean_dice.py --- a/monai/handlers/mean_dice.py +++ b/monai/handlers/mean_dice.py @@ -27,6 +27,7 @@ def __init__( self, include_background: bool = True, reduction: MetricReduction | str = MetricReduction.MEAN, + num_classes: int ...
diff --git a/tests/test_compute_meandice.py b/tests/test_compute_meandice.py --- a/tests/test_compute_meandice.py +++ b/tests/test_compute_meandice.py @@ -207,12 +207,16 @@ def test_helper(self, input_data, _unused): result = DiceHelper(softmax=True, get_not_nans=False)(**vals) np.testing.assert_allcl...
["tests/test_handler_mean_dice.py::TestHandlerMeanDice::test_compute_n_class_2", "tests/test_handler_mean_dice.py::TestHandlerMeanDice::test_compute_n_class_1", "tests/test_compute_meandice.py::TestComputeMeanDice::test_helper_0", "tests/test_handler_mean_dice.py::TestHandlerMeanDice::test_compute_n_class_0"]
["tests/test_compute_meandice.py::TestComputeMeanDice::test_nans_class_0", "tests/test_compute_meandice.py::TestComputeMeanDice::test_value_0", "tests/test_compute_meandice.py::TestComputeMeanDice::test_value_class_1", "tests/test_compute_meandice.py::TestComputeMeanDice::test_value_class_2", "tests/test_handler_mean_d...
null
true
2023-04-21T09:47:55Z
2
50
4
1,016
0
0.85
1
0.85
1
0.336
90.883
350
swe_gym::train::598
swe_gym
train
598
python__mypy-13514
python/mypy
python/mypy
python
80c09d56c080cad93847eeee50ddddf5e3abab06
`match` crashes on Union of Tuple and non-Tuple **Crash Report** _mypy_ 0.942 crashes when the match expression in a match statement is a Union of a Tuple type and a non-tuple type. **Traceback** ``` $ mypy --python-version 3.10 --show-traceback x.py x.py:14: error: INTERNAL ERROR -- Please try using mypy master on ...
I have a similar, but slightly different case triggering this. ```py match cast(results.get(table_ref), tuple[str, int | None]): case _, None: return f"`{table_ref.undecorated}{m['alias'] or ''}`" case _, snapshotTime: return f"`{table_ref.undecorate...
diff --git a/mypy/checkpattern.py b/mypy/checkpattern.py --- a/mypy/checkpattern.py +++ b/mypy/checkpattern.py @@ -33,6 +33,7 @@ coerce_to_literal, make_simplified_union, try_getting_str_literals_from_type, + tuple_fallback, ) from mypy.types import ( AnyType, @@ -325,7 +326,9 @@ def get_sequen...
diff --git a/test-data/unit/check-python310.test b/test-data/unit/check-python310.test --- a/test-data/unit/check-python310.test +++ b/test-data/unit/check-python310.test @@ -1600,3 +1600,31 @@ def foo(x: NoneType): # E: NoneType should not be used as a type, please use Non reveal_type(x) # N: Revealed type is "No...
["mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchUnionTwoTuplesNoCrash", "mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchTupleInstanceUnionNoCrash", "mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchTupleOptionalNoCrash"]
[]
null
true
2022-08-25T19:31:32Z
1
10
3
1,782
0
0.85
1
0.85
1
0.330333
90.866
351
swe_gym::train::2376
swe_gym
train
2,376
modin-project__modin-6404
modin-project/modin
modin-project/modin
python
2a6aafed41f7758d75dab88517c76b5cdb1905fc
BUG: Ray to_parquet defaults to Pandas while documentation says supported ### Modin version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the latest released version of Modin. - [ ] I have confirmed this bug exists on the main branch of Modin. (I...
Solution: DON'T specify compression, it will write just fine without defaulting to pandas. Documentation should be clarified on this as Pandas documentation has snappy as default compression, but Modin says not to specify snappy, I figured I would specify another but this is not the case.. @ajalberd thank you for repor...
diff --git a/modin/core/io/column_stores/parquet_dispatcher.py b/modin/core/io/column_stores/parquet_dispatcher.py --- a/modin/core/io/column_stores/parquet_dispatcher.py +++ b/modin/core/io/column_stores/parquet_dispatcher.py @@ -695,31 +695,6 @@ def _read(cls, path, engine, columns, use_nullable_dtypes, dtype_backend...
diff --git a/modin/pandas/test/test_io.py b/modin/pandas/test/test_io.py --- a/modin/pandas/test/test_io.py +++ b/modin/pandas/test/test_io.py @@ -1710,15 +1710,27 @@ def test_read_empty_parquet_file(self, tmp_path, engine): condition="config.getoption('--simulate-cloud').lower() != 'off'", reason="Th...
["modin/pandas/test/test_io.py::TestParquet::test_to_parquet[.xz-compression=gzip-fastparquet]", "modin/pandas/test/test_io.py::TestParquet::test_to_parquet[.gz-no_compression_kwargs-fastparquet]", "modin/pandas/test/test_io.py::TestParquet::test_to_parquet[.gz-compression=None-fastparquet]", "modin/pandas/test/test_io...
["modin/pandas/test/test_io.py::TestCsv::test_read_csv_parsing_2[latin1-None-None-skiprows5-infer]", "modin/pandas/test/test_io.py::TestParquet::test_read_parquet_directory[rows_per_file0-1000-columns1-pyarrow]", "modin/pandas/test/test_io.py::TestCsv::test_read_csv_parse_dates[None-infer-5-nonexistent_string_column-st...
null
true
2023-07-21T02:43:59Z
1
30
20
1,369
0
0.85
1
0.85
1
0.328167
90.8595
352
swe_bench_verified::test::395
swe_bench_verified
test
395
sphinx-doc__sphinx-7889
sphinx-doc/sphinx
sphinx-doc/sphinx
python
ec9af606c6cfa515f946d74da9b51574f2f9b16f
Autodoc extension's mock file throws TypeError for generic-typed classes. **Describe the bug** When building the docs for a generically-typed class, a TypeError is thrown as Autodoc's `mock._make_subclass` attempts to concatenate a `str` to a `TypeVar`. See the attached log: [sphinx-err-325ndteh.log](https://github.com...
diff --git a/sphinx/ext/autodoc/mock.py b/sphinx/ext/autodoc/mock.py --- a/sphinx/ext/autodoc/mock.py +++ b/sphinx/ext/autodoc/mock.py @@ -52,8 +52,8 @@ def __iter__(self) -> Iterator: def __mro_entries__(self, bases: Tuple) -> Tuple: return (self.__class__,) - def __getitem__(self, key: str) -> "_Mo...
diff --git a/tests/test_ext_autodoc_mock.py b/tests/test_ext_autodoc_mock.py --- a/tests/test_ext_autodoc_mock.py +++ b/tests/test_ext_autodoc_mock.py @@ -11,6 +11,7 @@ import abc import sys from importlib import import_module +from typing import TypeVar import pytest @@ -39,6 +40,7 @@ def test_MockObject(): ...
["tests/test_ext_autodoc_mock.py::test_MockObject"]
["tests/test_ext_autodoc_mock.py::test_MockModule", "tests/test_ext_autodoc_mock.py::test_mock", "tests/test_ext_autodoc_mock.py::test_mock_does_not_follow_upper_modules", "tests/test_ext_autodoc_mock.py::test_abc_MockObject", "tests/test_ext_autodoc_mock.py::test_mock_decorator"]
null
true
2020-06-29T16:20:55Z
1
4
1
1,136
0
1
1
1
0.8
0.202667
90.858
353
swe_gym::train::1553
swe_gym
train
1,553
pandas-dev__pandas-58767
pandas-dev/pandas
pandas-dev/pandas
python
a3e751c6b435575de96c4a83bf67797e4a989771
BUG: No kwargs in df.apply(raw=True, engine="numba") ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on th...
Hm, this doesn't look too hard to fix, looking at the error (the ``nb_compat_func`` line). It's been a while since I've looked at any numba stuff, though. Are you interested in potentially contributing a PR? > Are you interested in potentially contributing a PR? Sure, but I find the solution may not be that tr...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index 731406394ed46..7cb6af877be42 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -498,6 +498,7 @@ Other - Bug in :class:`DataFrame` when passing a ``dict`` with a NA scalar and ``columns`` that would alwa...
diff --git a/pandas/tests/apply/test_frame_apply.py b/pandas/tests/apply/test_frame_apply.py index cbc68265a1cc1..939997f44c1a9 100644 --- a/pandas/tests/apply/test_frame_apply.py +++ b/pandas/tests/apply/test_frame_apply.py @@ -63,16 +63,60 @@ def test_apply(float_frame, engine, request): @pytest.mark.parametrize("...
["pandas/tests/apply/test_frame_apply.py::test_apply_args[numba-True-False-0]", "pandas/tests/apply/test_frame_apply.py::test_apply_args[numba-False-True-1]", "pandas/tests/apply/test_frame_apply.py::test_apply_args[numba-True-True-0]", "pandas/tests/apply/test_frame_apply.py::test_apply_args[numba-False-True-0]", "pan...
["pandas/tests/window/test_numba.py::TestEngine::test_numba_vs_cython_rolling_methods[False-True-True-arithmetic_numba_supported_operators0-10-data1]", "pandas/tests/apply/test_frame_apply.py::test_agg_axis1_duplicate_index[data2-None]", "pandas/tests/window/test_numba.py::TestEngine::test_numba_vs_cython_rolling_metho...
null
true
2024-05-18T05:56:48Z
4
105
9
4,831
0
0.85
1
0.92
0.85
0.85
90.8575
354
swe_gym::train::1111
swe_gym
train
1,111
pydantic__pydantic-9170
pydantic/pydantic
pydantic/pydantic
python
75012318fbb65036fbb38c2d04869f38ca4e15d6
Warn when `Field(alias=...)` is used as nested `Annotated` metadata ### Initial Checks - [X] I confirm that I'm using Pydantic V2 ### Description Consider the following models: ```python class AnnotatedOptional(BaseModel): field: Annotated[Optional[int], Field(alias='field_alias', gt=0)] class OptionalAnnotate...
In regard to `gt` in `OptionalAnnotated`, it makes sense since this constraint is only applicable to the wrapped `int` type, that is, `Optional[Annotated[int, Field(gt=0)]]` is roughly translated to `PositiveInteger | NoneType`. `alias` is a different beast — it is a property of the field as a whole, not a property of...
diff --git a/pydantic/_internal/_fields.py b/pydantic/_internal/_fields.py --- a/pydantic/_internal/_fields.py +++ b/pydantic/_internal/_fields.py @@ -226,6 +226,7 @@ def collect_model_fields( # noqa: C901 # Nothing stops us from just creating a new FieldInfo for this type hint, so we do this. ...
diff --git a/tests/test_annotated.py b/tests/test_annotated.py --- a/tests/test_annotated.py +++ b/tests/test_annotated.py @@ -1,5 +1,5 @@ import sys -from typing import Any, Generic, Iterator, List, Set, TypeVar +from typing import Any, Generic, Iterator, List, Optional, Set, TypeVar import pytest from annotated_...
["tests/test_annotated.py::test_annotated_alias_at_low_level"]
["tests/test_annotated.py::test_annotated_private_field_with_default", "tests/test_annotated.py::test_field_reuse", "tests/test_annotated.py::test_get_pydantic_core_schema_source_type", "tests/test_annotated.py::test_merge_field_infos_type_adapter", "tests/test_annotated.py::test_predicate_error_python", "tests/test_an...
null
true
2024-04-05T05:57:38Z
1
16
1
1,628
0
0.85
1
0.85
1
0.324667
90.849
355
swe_gym::train::26
swe_gym
train
26
getmoto__moto-6636
getmoto/moto
getmoto/moto
python
303b1b92cbfaf6d8ec034d50ec4edfc15fb588d3
Inconsistency between moto and boto when DynamoDb Query FilterExpression is empty I have a conditional DynamoDB `Query` where, depending on the parameters, I may want to pass a `FilterExpression` or not. Initially I wrote it like this: ``` filter_condition = Attr('permissions').contains('admin') if admins_only else '...
Thanks for raising this @luisabtrace - marking it as an enhancement to add this validation.
diff --git a/moto/dynamodb/models/__init__.py b/moto/dynamodb/models/__init__.py --- a/moto/dynamodb/models/__init__.py +++ b/moto/dynamodb/models/__init__.py @@ -316,7 +316,7 @@ def query( limit: int, exclusive_start_key: Dict[str, Any], scan_index_forward: bool, - projection_expressi...
diff --git a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py --- a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py +++ b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py @@ -144,7 +144,7 @@ def test_empty_expressionattributenam...
["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_query_with_empty_filter_expression"]
["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_query_gsi_with_wrong_key_attribute_names_throws_exception", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_update_primary_key", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_creating_table_with_0_local_indexes", "t...
null
true
2023-08-11 20:39:43
3
38
1
1,177
0
0.85
1
0.85
1
0.322833
90.8435
356
swe_gym::train::1943
swe_gym
train
1,943
bokeh__bokeh-13391
bokeh/bokeh
bokeh/bokeh
python
0bdaa42ce135a88d1476809fe0439b111c8167c7
[BUG] Static paths loaded always from localhost in Bokeh 3.1.1 ### Software versions Python version : 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] IPython version : (not installed) Tornado version : 6.3.2 Bokeh version : 3.1.1 BokehJS static path : C:\bokeh-e...
This is a side effect of PR #13041. +1, I currently did not find a way to deploy a Dockerfile based on `docker serve` on a standalone server. All static URLs point to `http://localhost:5006/static/` or to whatever I pass to `--address`. There is currently no way to configure a standalone server on `bokeh==3.11.1` @albe...
diff --git a/src/bokeh/server/tornado.py b/src/bokeh/server/tornado.py --- a/src/bokeh/server/tornado.py +++ b/src/bokeh/server/tornado.py @@ -605,20 +605,28 @@ def session_token_expiration(self) -> int: ''' return self._session_token_expiration - def resources(self, absolute_url: str | None = No...
diff --git a/tests/support/plugins/selenium.py b/tests/support/plugins/selenium.py --- a/tests/support/plugins/selenium.py +++ b/tests/support/plugins/selenium.py @@ -21,6 +21,7 @@ #----------------------------------------------------------------------------- # Standard library imports +from shutil import which fr...
["tests/unit/bokeh/server/test_tornado__server.py::test_default_resources"]
["tests/unit/bokeh/server/test_tornado__server.py::test_env_resources", "tests/unit/bokeh/server/test_tornado__server.py::test_xsrf_cookies", "tests/unit/bokeh/server/test_tornado__server.py::Test_create_static_handler::test_no_app_static_path", "tests/unit/bokeh/server/test_tornado__server.py::test_websocket_max_messa...
null
true
2023-09-23T11:44:42Z
1
20
1
1,525
0
0.85
1
0.85
1
0.320833
90.8375
357
swe_gym::train::795
swe_gym
train
795
iterative__dvc-4719
iterative/dvc
iterative/dvc
python
6a79111047a838b2e7daee0861570ffe01c38d02
Callback stage not exectued if params defined in dvc.yaml ## Bug Report Callback stages (defined by not existing dependencies as well as by `dvc run --always-changed` option) are not executed if parameters were defined in the `dvc.yaml` but restored from the run-cache and skipped. Minimal example: ``` $ git init $ dvc...
Reproduction script with `always_changed`: ``` #!/bin/bash rm -rf repo mkdir repo pushd repo set -ex git init --quiet dvc init --quiet echo -e "foo:\n bar: 2" > params.yaml dvc run -p params.yaml:foo.bar -n cp -o a.txt --always-changed "echo 'a' > a.txt" # not reproduced dvc repro cp ``` So ...
diff --git a/dvc/stage/cache.py b/dvc/stage/cache.py --- a/dvc/stage/cache.py +++ b/dvc/stage/cache.py @@ -3,7 +3,7 @@ import tempfile from contextlib import contextmanager -from funcy import first +from funcy import cached_property, first from voluptuous import Invalid from dvc.cache.local import _log_exceptio...
diff --git a/tests/unit/stage/test_cache.py b/tests/unit/stage/test_cache.py --- a/tests/unit/stage/test_cache.py +++ b/tests/unit/stage/test_cache.py @@ -1,5 +1,7 @@ import os +import pytest + def test_stage_cache(tmp_dir, dvc, mocker): tmp_dir.gen("dep", "dep") @@ -204,3 +206,19 @@ def _mode(path): as...
["tests/unit/stage/test_cache.py::test_always_changed"]
[]
null
true
2020-10-14T11:50:56Z
1
10
1
1,718
0
0.85
1
0.85
1
0.319667
90.834
358
swe_gym::train::1327
swe_gym
train
1,327
pandas-dev__pandas-54428
pandas-dev/pandas
pandas-dev/pandas
python
f32c52d07c71c38c02edc3b9a3ef9d6915c13aa5
BUG: AttributeError raised with pd.concat between a None and Timestamp ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed thi...
Looks like in pd.core.internals.concat we need to change `i8values = np.full(self.shape, fill_value._value)` to `i8values = np.full(self.shape, NaT.value)` ran into this bug this AM in pandas 2.0.1 PR to address this is welcome. take
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 9eb5bbc8f07d5..e3d17977ad26c 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -301,6 +301,7 @@ Categorical Datetimelike ^^^^^^^^^^^^ +- Bug in :func:`concat` raising ``AttributeError`` when concaten...
diff --git a/pandas/tests/reshape/concat/test_concat.py b/pandas/tests/reshape/concat/test_concat.py index 74c79d20a3fb3..131058010808e 100644 --- a/pandas/tests/reshape/concat/test_concat.py +++ b/pandas/tests/reshape/concat/test_concat.py @@ -867,3 +867,14 @@ def test_concat_ea_upcast(): result = concat([df1, df...
["pandas/tests/reshape/concat/test_concat.py::test_concat_none_with_timezone_timestamp"]
["pandas/tests/reshape/concat/test_concat.py::test_concat_retain_attrs[data0]", "pandas/tests/reshape/concat/test_concat.py::test_concat_will_upcast[int-Series]", "pandas/tests/reshape/concat/test_concat.py::test_concat_preserves_subclass[obj1]", "pandas/tests/reshape/concat/test_concat.py::test_concat_will_upcast[int6...
null
true
2023-08-05T15:27:21Z
2
5
1
2,762
0
0.85
1
1
0.8
0.477
90.831
359
swe_gym::train::366
swe_gym
train
366
python__mypy-15491
python/mypy
python/mypy
python
7d031beb017450ac990c97e288d064290e3be55f
[1.4] Regression with AsyncGenerator **Bug Report** I can't seem to find a minimal reproducer, but whenever using watchfiles.awatch(), mypy produces the error: `error: "Coroutine[Any, Any, AsyncGenerator[set[tuple[Change, str]], None]]" has no attribute "__aiter__" (not async iterable) [attr-defined]` As can be seen...
Source code is just annotated with `AsyncGenerator`: https://github.com/samuelcolvin/watchfiles/blob/main/watchfiles/main.py#L137 Hmmm I wonder if related to #14150 Yeah, I think so, cc @JukkaL (btw, thanks again for the change, it's a huge perf win for various codebases at work) ``` λ cat main.py from third_part...
diff --git a/mypy/fastparse.py b/mypy/fastparse.py --- a/mypy/fastparse.py +++ b/mypy/fastparse.py @@ -521,7 +521,14 @@ def translate_stmt_list( return [block] stack = self.class_and_function_stack - if self.strip_function_bodies and len(stack) == 1 and stack[0] == "F": + # Fast ca...
diff --git a/test-data/unit/check-async-await.test b/test-data/unit/check-async-await.test --- a/test-data/unit/check-async-await.test +++ b/test-data/unit/check-async-await.test @@ -945,17 +945,21 @@ async def bar(x: Union[A, B]) -> None: [typing fixtures/typing-async.pyi] [case testAsyncIteratorWithIgnoredErrors]...
["mypy/test/testcheck.py::TypeCheckSuite::check-async-await.test::testAsyncIteratorWithIgnoredErrors"]
["mypy/test/testcheck.py::TypeCheckSuite::check-async-await.test::testAsyncIteratorWithIgnoredErrorsAndYieldFrom"]
null
true
2023-06-21T21:28:15Z
1
58
1
747
0
0.85
1
0.85
1
0.317833
90.8285
360
swe_gym::train::1158
swe_gym
train
1,158
pandas-dev__pandas-57175
pandas-dev/pandas
pandas-dev/pandas
python
db11e25d2b1175fdf85d963a88ff5a1d4bdb6fd8
BUG: Interchange protocol implementation handles empty dataframes incorrectly ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confir...
Tagging @MarcoGorelli as I know you have looked at the implementation before. thanks, will take a look!
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index 19b7e3493f964..4a20eda08937a 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -29,6 +29,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ +- Fixed bug in :func:`pandas.api.interchange.from_dataframe` which...
diff --git a/pandas/tests/interchange/test_impl.py b/pandas/tests/interchange/test_impl.py index aeee98f5a125e..76f80c20fa217 100644 --- a/pandas/tests/interchange/test_impl.py +++ b/pandas/tests/interchange/test_impl.py @@ -392,3 +392,12 @@ def test_large_string(): result = pd.api.interchange.from_dataframe(df.__...
["pandas/tests/interchange/test_impl.py::test_empty_dataframe"]
["pandas/tests/interchange/test_impl.py::test_bitmasks_pyarrow[2-None-expected_values2]", "pandas/tests/interchange/test_impl.py::test_empty_string_column", "pandas/tests/interchange/test_impl.py::test_datetimetzdtype[us-UTC]", "pandas/tests/interchange/test_impl.py::test_dataframe[<lambda>2]", "pandas/tests/interchang...
null
true
2024-01-31T14:31:00Z
2
3
1
2,794
0
0.85
1
1
0.8
0.475667
90.827
361
swe_gym::train::201
swe_gym
train
201
getmoto__moto-6724
getmoto/moto
getmoto/moto
python
b6a582e6244f705c4e3234b25d86e09c2d1d0100
logs: Cannot add a second subscription filter ## Description According to the [cloudwatch logs documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html), we should be able to add 2 subscription filters per log group. Currently, when I try to write a test to add a second one, I...
If memory serves me right, when this behaviour was implemented we could only add 1 Filter. Sounds like AWS has changed this in the meantime. Thank you for raising this @rushilgala!
diff --git a/moto/logs/models.py b/moto/logs/models.py --- a/moto/logs/models.py +++ b/moto/logs/models.py @@ -1,5 +1,5 @@ from datetime import datetime, timedelta -from typing import Any, Dict, List, Tuple, Optional +from typing import Any, Dict, Iterable, List, Tuple, Optional from moto.core import BaseBackend, Bac...
diff --git a/tests/test_logs/test_integration.py b/tests/test_logs/test_integration.py --- a/tests/test_logs/test_integration.py +++ b/tests/test_logs/test_integration.py @@ -62,7 +62,7 @@ def test_put_subscription_filter_update(): sub_filter["filterPattern"] = "" # when - # to update an existing subscri...
["tests/test_logs/test_integration.py::test_put_subscription_filter_update"]
["tests/test_logs/test_integration.py::test_put_subscription_filter_with_kinesis", "tests/test_logs/test_integration.py::test_delete_subscription_filter_errors", "tests/test_logs/test_integration.py::test_delete_subscription_filter", "tests/test_logs/test_integration.py::test_put_subscription_filter_with_firehose", "te...
null
true
2023-08-24 21:25:58
2
190
1
2,222
0
0.85
1
1
0.75
0.870333
90.8235
362
swe_gym::train::427
swe_gym
train
427
python__mypy-16717
python/mypy
python/mypy
python
761965d260e54f8e150d8bd7ac3ab3efd6503b93
Starting from version 1.0.0, a union of Generators is (sometimes) treated as if it has no ReturnType **Bug Report** Starting from version 1.0.0, `yield from` a union on `Generator` types generates the error `Function does not return a value [func-returns-value]`, and attempting to use the return reveals that Mypy is...
I bisected this back to #14224 , which fixed a case where we were basically not type checking coroutines and generators. My guess is you'd need to make a similar change in https://github.com/python/mypy/blob/6b326d556e3a34949c363ef1f728abda164a9f24/mypy/checkexpr.py#L5079 By the way, did you happen to encounter this re...
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -992,8 +992,9 @@ def get_generator_return_type(self, return_type: Type, is_coroutine: bool) -> Ty # AwaitableGenerator, Generator: tr is args[2]. return return_type.args[2] else: - ...
diff --git a/mypyc/test-data/run-generators.test b/mypyc/test-data/run-generators.test --- a/mypyc/test-data/run-generators.test +++ b/mypyc/test-data/run-generators.test @@ -246,12 +246,12 @@ assert run_generator(another_triple()()) == ((1,), None) assert run_generator(outer()) == ((0, 1, 2, 3, 4), None) [case tes...
["mypy/test/testcheck.py::TypeCheckSuite::check-statements.test::testYieldFromUnionOfGeneratorWithIterableStr", "mypy/test/testcheck.py::TypeCheckSuite::check-statements.test::testYieldFromUnionOfGenerators", "mypy/test/testcheck.py::TypeCheckSuite::check-statements.test::testYieldIteratorReturn"]
["mypy/test/testcheck.py::TypeCheckSuite::check-statements.test::testYieldFromInvalidUnionReturn", "mypyc/test/test_run.py::TestRun::run-generators.test::testYieldThrow", "mypy/test/testcheck.py::TypeCheckSuite::check-statements.test::testNoCrashOnStarRightHandSide"]
null
true
2023-12-30T07:37:16Z
2
17
3
1,490
0
0.85
1
0.85
1
0.305
90.79
363
swe_gym::train::298
swe_gym
train
298
getmoto__moto-4846
getmoto/moto
getmoto/moto
python
5580b519e0a9af926a9e7fdc61bfe680f907f7a3
removing inexisting permissions on lambda does not raise exceptions Hello, I figured out that removing permissions that do not exist from lambdas does not raise any error in the mock environment. Using the real environment, it raises a `botocore.errorfactory.ResourceNotFoundException`. Is this a feature not developed...
Hi @Guriido, welcome to Moto! Correct, the error handling here is not yet implemented. Will mark it as an enhancement to add this. Thank you for your answer @bblommers ! I am not familiar yet with moto source code, but I may be interested in creating a PR for adding this. Regarding the development policy of moto, wou...
diff --git a/moto/awslambda/exceptions.py b/moto/awslambda/exceptions.py --- a/moto/awslambda/exceptions.py +++ b/moto/awslambda/exceptions.py @@ -1,11 +1,9 @@ -from botocore.client import ClientError from moto.core.exceptions import JsonRESTError -class LambdaClientError(ClientError): +class LambdaClientError(Jso...
diff --git a/tests/test_awslambda/test_lambda.py b/tests/test_awslambda/test_lambda.py --- a/tests/test_awslambda/test_lambda.py +++ b/tests/test_awslambda/test_lambda.py @@ -5,6 +5,7 @@ import sure # noqa # pylint: disable=unused-import import pytest +from botocore.exceptions import ClientError from freezegun im...
["tests/test_awslambda/test_lambda.py::test_remove_unknown_permission_throws_error"]
["tests/test_awslambda/test_lambda.py::test_create_function_from_zipfile", "tests/test_awslambda/test_lambda.py::test_create_function_with_already_exists", "tests/test_awslambda/test_lambda.py::test_get_function_configuration[FunctionArn]", "tests/test_awslambda/test_lambda.py::test_update_configuration[FunctionArn]", ...
null
true
2022-02-09 18:21:28
3
39
1
1,038
0
0.85
1
0.85
1
0.303
90.784
364
swe_bench_pro::test::86
swe_bench_pro
test
86
instance_ansible__ansible-a6e671db25381ed111bbad0ab3e7d97366395d05-v0f01c69f1e2528b935359cfe578530722bca2c59
ansible/ansible
ansible/ansible
python
1f59bbf4f39504c8f2087f8132f2475a6ac38dcb
**Title: Incorrect Processor Facts Reported on AIX** **Summary** When gathering hardware facts using the `ansible-core` from the devel branch on GitHub, the AIX hardware facts module incorrectly reports processor-related information. **Impact** Incorrect processor fact values may lead to misconfiguration, incorrect...
## Requirements - The `processor_count` fact should be set to a constant value of `1`. - The `processor_cores` fact should represent the total number of processor cores detected from the device list output. - The `processor_threads_per_core` fact should be set to the reported SMT threads value extracted from the devi...
diff --git a/changelogs/fragments/78223_aix_fix_processor_facts.yml b/changelogs/fragments/78223_aix_fix_processor_facts.yml new file mode 100644 index 00000000000000..b14f1eba0f8371 --- /dev/null +++ b/changelogs/fragments/78223_aix_fix_processor_facts.yml @@ -0,0 +1,2 @@ +bugfixes: + - "facts - fix processor facts o...
diff --git a/test/units/module_utils/facts/hardware/aix_data.py b/test/units/module_utils/facts/hardware/aix_data.py new file mode 100644 index 00000000000000..d1a6c9abcec972 --- /dev/null +++ b/test/units/module_utils/facts/hardware/aix_data.py @@ -0,0 +1,75 @@ +# This file is part of Ansible +# +# Ansible is free sof...
["test/units/module_utils/facts/hardware/test_aix_processor.py::test_get_cpu_info[scenario0]", "test/units/module_utils/facts/hardware/test_aix_processor.py::test_get_cpu_info[scenario1]"]
[]
ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-a6e671db25381ed111bbad0ab3e7d97366395d05-v0f01c69f1e2528b935359cfe578530722bca2c59
true
null
2
30
2
1,414
0
0.95
1
0.85
1
0.335667
90.782
365
swe_gym::train::419
swe_gym
train
419
python__mypy-9796
python/mypy
python/mypy
python
9c54cc3f1c73150992345350be834f2987b3967d
Class __init__ "Too few arguments" should be a better error message Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues Please provide more information to help us understand ...
Hi, This would be my first time contributing to this repo. Can I take this up ? Sure, give it a try. Read CONTRIBUTING.md to get started. I took a look at this issue recently. The problem is reproduced not only on "init" but for empty function as well. With next samples: ```python a = 2 a.__pow__() class ...
diff --git a/mypy/messages.py b/mypy/messages.py --- a/mypy/messages.py +++ b/mypy/messages.py @@ -590,8 +590,7 @@ def invalid_index_type(self, index_type: Type, expected_type: Type, base_str: st def too_few_arguments(self, callee: CallableType, context: Context, argument_names: Option...
diff --git a/test-data/unit/check-attr.test b/test-data/unit/check-attr.test --- a/test-data/unit/check-attr.test +++ b/test-data/unit/check-attr.test @@ -623,7 +623,7 @@ class A: return cls(6, 'hello') @classmethod def bad(cls) -> A: - return cls(17) # E: Too few arguments for "A" + re...
["mypy/test/testfinegrainedcache.py::FineGrainedCacheSuite::testNestedClassMethodSignatureChanges_cached", "mypy/test/testcheck.py::TypeCheckSuite::testForwardReferenceToDynamicallyTypedClassMethod", "mypy/test/testfinegrainedcache.py::FineGrainedCacheSuite::testImportStarPropagateChange2_cached", "mypy/test/testcheck....
["mypy/test/testfinegrainedcache.py::FineGrainedCacheSuite::testTwoRounds_cached", "mypy/test/testfinegrained.py::FineGrainedSuite::testRemoveBaseClass", "mypy/test/testfinegrained.py::FineGrainedSuite::testFollowImportsNormalDuringStartup3", "mypy/test/testcheck.py::TypeCheckSuite::testSerializeFromImportedClassAs", "...
null
true
2020-12-12T11:46:36Z
1
6
93
1,674
0
0.85
1
0.85
1
0.299
90.772
366
swe_gym::train::1822
swe_gym
train
1,822
pandas-dev__pandas-52964
pandas-dev/pandas
pandas-dev/pandas
python
29f949980170ada984ebf02770356f1d28b980ff
BUG: Groupby mean differs depending on where `np.inf` value was introduced ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed...
Thanks for the report; I'm not able to reproduce on main - I get NaN in both cases. What version of NumPy are you using? @rhshadrach I have `numpy=1.23.5` I can't reproduce either, neither on pandas 1.5.2 nor on main: ```python In [6]: pdf Out[6]: x y z 0 inf 1.0 alice 1 1.0 1.0 bob 2 2.0...
diff --git a/pandas/_libs/groupby.pyx b/pandas/_libs/groupby.pyx index c62e60b7cdaa0..0a6ac9240ce99 100644 --- a/pandas/_libs/groupby.pyx +++ b/pandas/_libs/groupby.pyx @@ -1075,6 +1075,13 @@ def group_mean( y = val - compensation[lab, j] t = sumx[lab, j] + y ...
diff --git a/pandas/tests/groupby/test_libgroupby.py b/pandas/tests/groupby/test_libgroupby.py index 9552d67bfe992..d10bcf9053d1a 100644 --- a/pandas/tests/groupby/test_libgroupby.py +++ b/pandas/tests/groupby/test_libgroupby.py @@ -282,3 +282,23 @@ def test_cython_group_mean_not_datetimelike_but_has_NaT_values(): ...
["pandas/tests/groupby/test_libgroupby.py::test_cython_group_mean_Inf_at_begining_and_end"]
["pandas/tests/groupby/test_libgroupby.py::TestGroupVarFloat64::test_group_var_constant", "pandas/tests/groupby/test_libgroupby.py::TestGroupVarFloat64::test_group_var_large_inputs", "pandas/tests/groupby/test_libgroupby.py::test_cython_group_transform_algos", "pandas/tests/groupby/test_libgroupby.py::test_cython_group...
null
true
2023-04-27T15:30:01Z
1
7
1
1,651
0
0.85
1
0.85
1
0.2985
90.7705
367
swe_gym::train::1593
swe_gym
train
1,593
pandas-dev__pandas-54109
pandas-dev/pandas
pandas-dev/pandas
python
dc830eab5516f6911c894abdb1e3782cb18c503e
BUG: idxmax raises when used with tuples ### - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on the master branch of pandas. ### Re...
The problem actually comes from `argmax`: ```python >>> x.argmax() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/goyo/.local/lib/python3.9/site-packages/pandas/core/base.py", line 647, in argmax return nanops.nanargmax( # type: ignore[return-value] File "/home/go...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 30b2f03dec98c..9000c83b323df 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -128,6 +128,7 @@ Other enhancements - Many read/to_* functions, such as :meth:`DataFrame.to_pickle` and :func:`read_csv`, s...
diff --git a/pandas/tests/frame/test_reductions.py b/pandas/tests/frame/test_reductions.py index b4a4324593d22..6636850ce20f1 100644 --- a/pandas/tests/frame/test_reductions.py +++ b/pandas/tests/frame/test_reductions.py @@ -982,13 +982,12 @@ def test_idxmin_empty(self, index, skipna, axis): @pytest.mark.parametri...
["pandas/tests/groupby/test_raises.py::test_groupby_raises_string[by8-False-idxmin-agg]", "pandas/tests/groupby/test_raises.py::test_groupby_raises_string[by2-True-idxmax-method]", "pandas/tests/groupby/test_raises.py::test_groupby_raises_string[by1-True-idxmin-method]", "pandas/tests/groupby/test_raises.py::test_group...
["pandas/tests/groupby/test_raises.py::test_groupby_raises_datetime[by7-True-min-transform]", "pandas/tests/groupby/aggregate/test_aggregate.py::test_callable_result_dtype_frame[apply-int32-int64-keys1-agg_index1]", "pandas/tests/groupby/test_function.py::test_groupby_non_arithmetic_agg_types[min-data2-int8]", "pandas/...
null
true
2023-07-13T17:49:36Z
2
3
140
2,678
0
0.85
1
1
0.8
0.456333
90.769
368
swe_gym::train::2
swe_gym
train
2
getmoto__moto-5876
getmoto/moto
getmoto/moto
python
6d41ad72e09b49f61e54d47880f8a65026e7c0e4
Cognito - No validation that there isn't already an existing user with the same username in admin_update_user_attributes Hi, Sorry for the spam, just raising another issue for a potential enhancement. There is currently no validation on the `admin_update_user_attributes` function to check that the email address we are...
All good @JorisLimousin - every enhancement is useful! hi, I am interested in fixing this issue. it will be a great opportunity to fix this issue and contribute to this project if you assign me this issue . @JorisLimousin @bblommers @corasaurus-hex @olleolleolle @JackDanger Done @ArpanShah2k! We have some documentatio...
diff --git a/moto/cognitoidp/exceptions.py b/moto/cognitoidp/exceptions.py --- a/moto/cognitoidp/exceptions.py +++ b/moto/cognitoidp/exceptions.py @@ -2,6 +2,13 @@ from typing import Optional +class AliasExistsException(JsonRESTError): + def __init__(self) -> None: + super().__init__( + "Alias...
diff --git a/tests/test_cognitoidp/test_cognitoidp_exceptions.py b/tests/test_cognitoidp/test_cognitoidp_exceptions.py --- a/tests/test_cognitoidp/test_cognitoidp_exceptions.py +++ b/tests/test_cognitoidp/test_cognitoidp_exceptions.py @@ -1,6 +1,8 @@ from unittest import TestCase import boto3 +import pytest + from...
["tests/test_cognitoidp/test_cognitoidp_exceptions.py::TestCognitoUserPoolDuplidateEmails::test_use_existing_email__when_email_is_login"]
["tests/test_cognitoidp/test_cognitoidp_exceptions.py::TestCognitoUserPoolDuplidateEmails::test_use_existing_email__when_username_is_login", "tests/test_cognitoidp/test_cognitoidp_exceptions.py::TestCognitoUserDeleter::test_authenticate_with_signed_out_user"]
null
true
2023-01-24 23:37:57
2
32
1
1,147
0
0.85
1
0.85
1
0.297833
90.7685
369
swe_gym::train::1913
swe_gym
train
1,913
facebookresearch__hydra-1006
facebookresearch/hydra
facebookresearch/hydra
python
94bbaaad028678166896cf139f778240e02d0a69
[Bug] String interpolation in instantiate is broken in hydra 1.0.2 # 🐛 Bug ## Description String interpolation does not work when the config node is used in instantiate(). ## Checklist - [x] I checked on the latest version of Hydra - [x] I created a minimal repro ## To reproduce ** Minimal Code/Config snippet to r...
Thanks for reporting, is this a regression in 1.0.2? (does it work with 1.0.1)? I saw you created a PR and closed, what's going on with that? Yes, it is a regression in 1.0.2. It works perfectly in 1.0.1. The 'Expected Behavior' above is the output from hydra 1.0.1. I have no idea about this PR. It was opened and c...
diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py --- a/hydra/_internal/utils.py +++ b/hydra/_internal/utils.py @@ -586,7 +586,9 @@ def _get_kwargs(config: Union[ObjectConf, DictConfig], **kwargs: Any) -> Any: config_overrides = {} passthrough = {} for k, v in kwargs.items(): - if k...
diff --git a/tests/__init__.py b/tests/__init__.py --- a/tests/__init__.py +++ b/tests/__init__.py @@ -28,11 +28,10 @@ def module_function(x: int) -> int: @dataclass class AClass: - def __init__(self, a: Any, b: Any, c: Any, d: Any = "default_value") -> None: - self.a = a - self.b = b - self...
["tests/test_utils.py::test_interpolation_accessing_parent[interpolation_into_parent]", "tests/test_utils.py::test_class_instantiate[class+override+interpolation]", "tests/test_utils.py::test_class_instantiate_deprecated[class+override+interpolation]", "tests/test_utils.py::test_class_instantiate_deprecated[instantiate...
["tests/test_utils.py::test_class_instantiate_deprecated[passthrough0]", "tests/test_utils.py::test_instantiate_adam_conf", "tests/test_utils.py::test_class_instantiate_deprecated[builtin_types]", "tests/test_utils.py::test_a_class_eq", "tests/test_utils.py::test_class_instantiate[passthrough1]", "tests/test_utils.py::...
null
true
2020-09-22T17:54:11Z
1
9
6
1,602
0
0.85
1
0.85
1
0.297
90.766
370
swe_gym::train::1933
swe_gym
train
1,933
bokeh__bokeh-13239
bokeh/bokeh
bokeh/bokeh
python
06a6bf5d7544500431d0fa106c9fec50f15436bf
[BUG] `PropertyValueColumnData._stream()` doesn't handle the case when `rollover` is `0` ### Software versions Bokeh version: `branch-3.3` ### Expected behavior If `rollover` is set to 0, calling the `_stream` method within `PropertyValueColumnData` should remove all rows. This behavior can be used to delete all row...
> https://panel.holoviz.org/reference/panes/Perspective.html. For future reference [Minimal Reproducible Examples](https://stackoverflow.com/help/minimal-reproducible-example) should be *pure Bokeh code*, and not e.g. Panel code. Panel is a different project maintained by different people and introducing Panel adds ...
diff --git a/src/bokeh/core/property/wrappers.py b/src/bokeh/core/property/wrappers.py --- a/src/bokeh/core/property/wrappers.py +++ b/src/bokeh/core/property/wrappers.py @@ -467,18 +467,18 @@ def _stream(self, doc: Document, source: ColumnarDataSource, new_data: dict[str, # For arrays is reports the actual ol...
diff --git a/tests/unit/bokeh/core/property/test_wrappers__property.py b/tests/unit/bokeh/core/property/test_wrappers__property.py --- a/tests/unit/bokeh/core/property/test_wrappers__property.py +++ b/tests/unit/bokeh/core/property/test_wrappers__property.py @@ -190,6 +190,7 @@ def test_PropertyValueColumnData__stream_...
["tests/unit/bokeh/core/property/test_wrappers__property.py::test_PropertyValueColumnData__stream_list_with_rollover_equals_zero"]
["tests/unit/bokeh/core/property/test_wrappers__property.py::test_PropertyValueColumnData___setitem__", "tests/unit/bokeh/core/property/test_wrappers__property.py::Test___all__::test_contents[PropertyValueSet]", "tests/unit/bokeh/core/property/test_wrappers__property.py::test_PropertyValueColumnData__patch_with_slice_i...
null
true
2023-07-02T01:44:51Z
1
8
1
1,608
0
0.85
1
0.85
1
0.294667
90.759
371
swe_gym::train::1856
swe_gym
train
1,856
pandas-dev__pandas-51691
pandas-dev/pandas
pandas-dev/pandas
python
f7f0df109f84ec70a61718b285b73a7527e65c91
BUG: stack_multi_columns extension array downcast ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the m...
Thanks for the report @ladidadadum. Happy to have your pull request https://github.com/ladidadadum/pandas/commit/430dd915a7094e0124f72ff27ae3aa17162f8b0f with an associated test. Thank you @mroeschke for the reply. I've added a simple test to a new file at extension/test_stack.py. Please let me know if I should - ...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 47a61d41b2440..29e681b1b85d1 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -202,6 +202,7 @@ Groupby/resample/rolling Reshaping ^^^^^^^^^ +- Bug in :meth:`DataFrame.stack` losing extension dtypes ...
diff --git a/pandas/tests/frame/test_stack_unstack.py b/pandas/tests/frame/test_stack_unstack.py index 4a23e750e7875..889c44522f7bb 100644 --- a/pandas/tests/frame/test_stack_unstack.py +++ b/pandas/tests/frame/test_stack_unstack.py @@ -1146,6 +1146,27 @@ def test_stack_multi_columns_non_unique_index(self, index, colum...
["pandas/tests/frame/test_stack_unstack.py::TestStackUnstackMultiLevel::test_stack_nullable_dtype", "pandas/tests/frame/test_stack_unstack.py::TestDataFrameReshape::test_stack_multi_columns_mixed_extension_types[vals10-vals20-Int64-Float64-Float64]"]
["pandas/tests/frame/test_stack_unstack.py::TestDataFrameReshape::test_unstack_nan_index_repeats[5th-0-idx2]", "pandas/tests/frame/test_stack_unstack.py::TestDataFrameReshape::test_unstack_unused_levels_mixed_with_nan[1-idces1-col_level1-idx_level1]", "pandas/tests/frame/test_stack_unstack.py::TestDataFrameReshape::tes...
null
true
2023-02-28T12:17:23Z
2
22
2
1,301
0
0.85
1
0.85
1
0.290167
90.7455
372
swe_gym::train::1653
swe_gym
train
1,653
pandas-dev__pandas-48619
pandas-dev/pandas
pandas-dev/pandas
python
85246fe460e93d2b891a1c116bcef3cb1a698664
BUG: "ValueError: The truth value ... is ambiguous" when using .loc setitem ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirme...
Hi, thanks for your report and especially for already pointing to the correct commit. This helps a lot! I'll look into this. That said, support for nested data is not great, we don't have many test cases covering this. Just to avoid misunderstandings: ``` label a 0 1 new_label a 0 1 dtyp...
diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index 09737901cbbc6..009c4ecc6bddd 100644 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -2102,7 +2102,9 @@ def _setitem_with_indexer_missing(self, indexer, value): return self._setitem_with_indexer(new_indexer, value, "...
diff --git a/pandas/tests/series/indexing/test_indexing.py b/pandas/tests/series/indexing/test_indexing.py index 5e87e36f21cca..0bab391dab27d 100644 --- a/pandas/tests/series/indexing/test_indexing.py +++ b/pandas/tests/series/indexing/test_indexing.py @@ -358,6 +358,15 @@ def test_loc_boolean_indexer_miss_matching_ind...
["pandas/tests/series/indexing/test_indexing.py::test_loc_setitem_nested_data_enlargement"]
["pandas/tests/series/indexing/test_indexing.py::TestDeprecatedIndexers::test_setitem_dict_and_set_deprecated_multiindex[key3]", "pandas/tests/series/indexing/test_indexing.py::TestDeprecatedIndexers::test_getitem_dict_and_set_deprecated_multiindex[key2]", "pandas/tests/series/indexing/test_indexing.py::test_getitem_du...
null
true
2022-09-18T12:43:37Z
1
4
1
2,584
0
0.85
1
1
0.8
0.444
90.732
373
swe_gym::train::587
swe_gym
train
587
python__mypy-10288
python/mypy
python/mypy
python
1e96f1df48a6e06ba598fa8230b96671b206cba0
Python version check is sensitive to comparison order **Bug Report** Whether mypy successfully detects a Python version check is dependent on the order of the comparison. **To Reproduce** ```python """This will not pass on Python 3.8.""" import sys if (3, 8) <= sys.version_info: pass else: import invalid_l...
Hey, @paw-lu , I want to work on this issue. But I am new to open source projects. Is it also applicable for windows? Hi @Pank3 ! While I admitedly haven't tested it on Windows—I expect it should be applicable! @Pank3 I beleive (but am not sure) the problem orginates somewhere around `consider_sys_version_info` ...
diff --git a/mypy/reachability.py b/mypy/reachability.py --- a/mypy/reachability.py +++ b/mypy/reachability.py @@ -27,6 +27,14 @@ MYPY_FALSE: MYPY_TRUE, } # type: Final +reverse_op = {"==": "==", + "!=": "!=", + "<": ">", + ">": "<", + "<=": ">=", + ...
diff --git a/test-data/unit/check-unreachable-code.test b/test-data/unit/check-unreachable-code.test --- a/test-data/unit/check-unreachable-code.test +++ b/test-data/unit/check-unreachable-code.test @@ -196,6 +196,16 @@ reveal_type(foo()) # N: Revealed type is 'builtins.str' [builtins_py2 fixtures/ops.pyi] [out] +...
["mypy/test/testcheck.py::TypeCheckSuite::testSysVersionInfoReversedOperandsOrder"]
["mypy/test/testcheck.py::TypeCheckSuite::testSysVersionInfoNegated", "mypy/test/testcheck.py::TypeCheckSuite::testSysVersionInfoNegated_python2"]
null
true
2021-04-06T21:34:57Z
1
17
1
1,369
0
0.85
1
0.85
1
0.284833
90.7295
374
swe_gym::train::589
swe_gym
train
589
python__mypy-11707
python/mypy
python/mypy
python
5d71f58b9dc5a89862253fef3d82356a7370bf8e
The behavior of `--no-explicit-reexport` is inconsistent/misleading **Bug Report** The behavior of `--no-explicit-reexport` is inconsistent/misleading, see MWE below. **To Reproduce** Define the following package of four files: ``` ├── a │   ├── __init__.py │   └── X.py ├── c.py └── d.py ``` **`a/__init__.py`**: ...
Thanks, can repro the inconsistency on master, the expected behaviour is an error in both cases. This was somewhat recently clarified in PEP 484 (https://github.com/python/peps/pull/1630/files) I'd welcome a corresponding update to our docs, if you want to make a PR for it! :-)
diff --git a/mypy/semanal.py b/mypy/semanal.py --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -1892,7 +1892,11 @@ def process_imported_symbol(self, fullname: str, module_public: bool, context: ImportBase) -> None: - ...
diff --git a/test-data/unit/check-modules.test b/test-data/unit/check-modules.test --- a/test-data/unit/check-modules.test +++ b/test-data/unit/check-modules.test @@ -1910,6 +1910,24 @@ class C: [builtins fixtures/module.pyi] +[case testReExportChildStubs3] +from util import mod +reveal_type(mod) # N: Revealed ty...
["mypy/test/testcheck.py::TypeCheckSuite::check-modules.test::testReExportChildStubs3"]
["mypy/test/testcheck.py::TypeCheckSuite::check-modules.test::testNoReExportChildStubs"]
null
true
2021-12-10T19:49:29Z
1
6
1
1,532
0
0.85
1
0.85
1
0.275333
90.701
375
swe_gym::train::101
swe_gym
train
101
getmoto__moto-7584
getmoto/moto
getmoto/moto
python
cc1193076090f9daf90970db286b6b41581dd8bc
SNS `subscribe` should raise `InvalidParameterException` when the endpoint does not exist using `application` protocol Currently, moto allows subscribing a non-existing endpoint to a topic when the `application` protocol is used. It would be nice if moto could match the behavior on AWS. On AWS, an `InvalidParameterExce...
Hi @DiegoHDMGZ, it looks like the `delete_endpoint` in AWS is effectively an asyncronous operation. If you call `subscribe` immediately after the `delete_endpoint`, it does succeed. The `InvalidParameterException` only occurs when you try to subscribe 10 seconds after deletion. I'll mark it as an enhancement, but I ...
diff --git a/moto/sns/models.py b/moto/sns/models.py --- a/moto/sns/models.py +++ b/moto/sns/models.py @@ -515,6 +515,18 @@ def subscribe(self, topic_arn: str, endpoint: str, protocol: str) -> Subscriptio old_subscription = self._find_subscription(topic_arn, endpoint, protocol) if old_subscription: ...
diff --git a/tests/test_sns/test_application_boto3.py b/tests/test_sns/test_application_boto3.py --- a/tests/test_sns/test_application_boto3.py +++ b/tests/test_sns/test_application_boto3.py @@ -438,6 +438,50 @@ def test_publish_to_disabled_platform_endpoint(api_key=None): conn.delete_platform_application(...
["tests/test_sns/test_application_boto3.py::test_publish_to_deleted_platform_endpoint"]
["tests/test_sns/test_application_boto3.py::test_delete_platform_application", "tests/test_sns/test_application_boto3.py::test_publish_to_disabled_platform_endpoint", "tests/test_sns/test_application_boto3.py::test_get_list_endpoints_by_platform_application", "tests/test_sns/test_application_boto3.py::test_set_sms_attr...
null
true
2024-04-09 18:32:57
1
12
1
1,377
0
0.85
1
0.85
1
0.2695
90.6835
376
swe_gym::train::533
swe_gym
train
533
python__mypy-11483
python/mypy
python/mypy
python
2db0511451ecf511f00dbfc7515cb6fc0d25119c
`dataclasses` plugins does not respect `slots=True` argument Since `3.10` now has `slots=True` argument for `@dataclass` decorator, we need to support it, since https://github.com/python/mypy/pull/10864 is merged. Failing case right now: ```python from dataclasses import dataclass @dataclass(slots=True) class Some: ...
I cannot assign myself, but consider me assigned 🙂 We also need to check for slots confict: ```python from dataclasses import dataclass @dataclass(slots=True) class Some: __slots__ = ('x',) x: int # Traceback (most recent call last): # ... # TypeError: Some already specifies __slots__ ```
diff --git a/mypy/plugins/dataclasses.py b/mypy/plugins/dataclasses.py --- a/mypy/plugins/dataclasses.py +++ b/mypy/plugins/dataclasses.py @@ -125,7 +125,9 @@ def transform(self) -> None: 'eq': _get_decorator_bool_argument(self._ctx, 'eq', True), 'order': _get_decorator_bool_argument(self._ctx...
diff --git a/test-data/unit/check-dataclasses.test b/test-data/unit/check-dataclasses.test --- a/test-data/unit/check-dataclasses.test +++ b/test-data/unit/check-dataclasses.test @@ -1350,3 +1350,74 @@ class Foo: reveal_type(Foo(bar=1.5)) # N: Revealed type is "__main__.Foo" [builtins fixtures/dataclasses.pyi] + +...
["mypy/test/testcheck.py::TypeCheckSuite::testDataclassWithSlotsConflict", "mypy/test/testcheck.py::TypeCheckSuite::testDataclassWithSlotsArgBefore310", "mypy/test/testcheck.py::TypeCheckSuite::testDataclassWithSlotsArg"]
["mypy/test/testcheck.py::TypeCheckSuite::testDataclassWithSlotsDef"]
null
true
2021-11-06T10:25:08Z
1
34
3
936
0
0.85
1
0.85
1
0.269333
90.683
377
swe_bench_pro::test::191
swe_bench_pro
test
191
instance_flipt-io__flipt-518ec324b66a07fdd95464a5e9ca5fe7681ad8f9
flipt-io/flipt
flipt-io/flipt
go
0018c5df774444117b107dfe3fe503d4c7126d73
# Title: Bug: CORS `allowed_origins` does not parse whitespace-separated values ## Bug Description Configuration fields that should be parsed as string slices (for example, `allowed_origins`) are only split on commas. This deviates from previous behavior where values separated by spaces or newlines were parsed correc...
## Requirements - All parsing behavior (whitespace splitting, whitespace collapsing, empty-string handling, source-type guards) must be implemented in the configuration loader in `internal/config/config.go`. - When loading configuration in `internal/config/config.go`, any field defined as `[]string` that is sourced fr...
diff --git a/internal/config/config.go b/internal/config/config.go index 1333704eec..6d00496dc7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -14,7 +14,7 @@ import ( var decodeHooks = mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), - mapstructure.StringT...
diff --git a/internal/config/config_whitespace_test.go b/internal/config/config_whitespace_test.go new file mode 100644 index 0000000..27ccb90 --- /dev/null +++ b/internal/config/config_whitespace_test.go @@ -0,0 +1,73 @@ +package config + +import ( + "os" + "strings" + "testing" + + "github.com/stretchr/testify/assert...
["TestWhitespaceCorsAllowedOrigins"]
[]
ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-518ec324b66a07fdd95464a5e9ca5fe7681ad8f9
true
null
1
22
1
1,348
0
0.95
1
0.85
1
0.298
90.669
378
swe_gym::train::456
swe_gym
train
456
python__mypy-11207
python/mypy
python/mypy
python
8e82171a3e68a5180fab267cad4d2b7cfa1f5cdc
mypy should support optional tagged unions __Report Type:__ Bug __Example:__ https://mypy-play.net/?mypy=latest&python=3.8&gist=529e99849ebe65749d8568b743f21050 ```python from typing import Literal, TypedDict, Union class NewJob(TypedDict): event_type: Literal["new-job"] job_description: str class CancelJob...
This looks like a bug.
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -4473,14 +4473,14 @@ def has_no_custom_eq_checks(t: Type) -> bool: if_map = {} else_map = {} - if_assignment_map, else_assignment_map = self.find_isinstance_check_helper(node.target) + ...
diff --git a/test-data/unit/check-narrowing.test b/test-data/unit/check-narrowing.test --- a/test-data/unit/check-narrowing.test +++ b/test-data/unit/check-narrowing.test @@ -655,6 +655,27 @@ else: reveal_type(y["model"]) # N: Revealed type is "Union[TypedDict('__main__.Model1', {'key': Literal['A']}), TypedDi...
["mypy/test/testcheck.py::TypeCheckSuite::testNarrowingExprPropagation"]
["mypy/test/testcheck.py::TypeCheckSuite::testNarrowingEqualityFlipFlop"]
null
true
2021-09-27T19:13:50Z
1
14
1
1,304
0
0.85
1
0.85
1
0.264
90.667
379
swe_gym::train::1962
swe_gym
train
1,962
Project-MONAI__MONAI-2621
Project-MONAI/MONAI
project-monai/monai
python
f943ab4126b37894b3aa5336ceae828731c126d6
Bugs in `create_test_image_2d` and `create_test_image_3d` **Describe the bug** 1) There is a limitation in the current implementation: The following line: ``` rad = rs.randint(5, rad_max) ``` requires `rad_max` be larger than 5. I think we should not use the magic number `5` here, and there is no docstring about thi...
I will enhance these functions later to resolve the bugs.
diff --git a/monai/data/synthetic.py b/monai/data/synthetic.py --- a/monai/data/synthetic.py +++ b/monai/data/synthetic.py @@ -23,23 +23,25 @@ def create_test_image_2d( height: int, num_objs: int = 12, rad_max: int = 30, + rad_min: int = 5, noise_max: float = 0.0, num_seg_classes: int = 5, ...
diff --git a/tests/test_gibbs_noise.py b/tests/test_gibbs_noise.py --- a/tests/test_gibbs_noise.py +++ b/tests/test_gibbs_noise.py @@ -38,7 +38,7 @@ def tearDown(self): @staticmethod def get_data(im_shape, as_tensor_input): create_test_image = create_test_image_2d if len(im_shape) == 2 else create_te...
["tests/test_synthetic.py::TestDiceCELoss::test_create_test_image_0", "tests/test_synthetic.py::TestDiceCELoss::test_create_test_image_1", "tests/test_synthetic.py::TestDiceCELoss::test_ill_radius", "tests/test_synthetic.py::TestDiceCELoss::test_create_test_image_2"]
["tests/test_gibbs_noise.py::TestGibbsNoise::test_identity_6", "tests/test_rand_gibbs_noised.py::TestRandGibbsNoised::test_dict_matches_0", "tests/test_rand_k_space_spike_noise.py::TestRandKSpaceSpikeNoise::test_same_result_01", "tests/test_gibbs_noise.py::TestGibbsNoise::test_alpha_1_0", "tests/test_rand_k_space_spike...
null
true
2021-07-16T16:42:34Z
1
46
4
645
0
0.85
1
0.85
1
0.260833
90.6575
380
swe_gym::train::556
swe_gym
train
556
python__mypy-11162
python/mypy
python/mypy
python
23e02e20f50255bd5b3217d224d1f9c77d85f6ce
arg-type error when inheriting from NamedTuple **Bug Report** `mypy` does not identify `NamedTuple` as a base type when passing objects from a subclass in function calls. However, everything works as expected when using a custom base class. **To Reproduce** (Write your steps here:) ```python from typing import Nam...
This happens because `Bar` is not considered neither nominal nor structural subtype of `NamedTuple` instance type. `NamedTuple` is not even listed in `Bar`'s `mro`. This special case can be easily added. 🤖
diff --git a/mypy/subtypes.py b/mypy/subtypes.py --- a/mypy/subtypes.py +++ b/mypy/subtypes.py @@ -263,8 +263,13 @@ def visit_instance(self, left: Instance) -> bool: rname = right.type.fullname # Always try a nominal check if possible, # there might be errors that a user wants to ...
diff --git a/test-data/unit/check-namedtuple.test b/test-data/unit/check-namedtuple.test --- a/test-data/unit/check-namedtuple.test +++ b/test-data/unit/check-namedtuple.test @@ -973,3 +973,90 @@ B = namedtuple('X', ['a']) # E: First argument to namedtuple() should be C = NamedTuple('X', [('a', 'Y')]) # E: Fi...
["mypy/test/testpythoneval.py::PythonEvaluationSuite::testNamedTupleTypeInheritanceSpecialCase"]
["mypy/test/testpythoneval.py::PythonEvaluationSuite::testNewAnalyzerBasicTypeshed_newsemanal"]
null
true
2021-09-21T17:33:18Z
1
9
1
1,378
0
0.85
1
0.85
1
0.259667
90.654
381
swe_gym::train::424
swe_gym
train
424
python__mypy-10689
python/mypy
python/mypy
python
e4c2668e29bfe6f588143af00a7021e5d3b7e747
0.902 crashes on tuple assignment **Crash Report** Mypy crashed after upgraded from 0.812 to 0.902 **Traceback** ``` /Users/admin/Library/Caches/pypoetry/virtualenvs/test/lib/python3.8/site-packages/mode/services.py:684: error: INTERNAL ERROR -- Please try using mypy master on Github: https://mypy.readthedocs.io/en/...
Could you share the crashing code? Same issue here. ```sh /home/nico/.local/share/virtualenvs/blacklists_service--dBzAapY/lib/python3.9/site-packages/mode/services.py:684: error: INTERNAL ERROR -- Please try using mypy master on Github: https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-...
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -2707,8 +2707,13 @@ def check_multi_assignment_from_tuple(self, lvalues: List[Lvalue], rvalue: Expre reinferred_rvalue_type, context, ...
diff --git a/test-data/unit/check-async-await.test b/test-data/unit/check-async-await.test --- a/test-data/unit/check-async-await.test +++ b/test-data/unit/check-async-await.test @@ -758,3 +758,44 @@ class Foo(Generic[T]): [builtins fixtures/async_await.pyi] [typing fixtures/typing-async.pyi] + +[case testAwaitOver...
["mypy/test/testcheck.py::TypeCheckSuite::testAwaitOverloadSpecialCase"]
[]
null
true
2021-06-22T12:06:04Z
1
9
1
1,374
0
0.85
1
0.85
1
0.259
90.652
382
swe_gym::train::1273
swe_gym
train
1,273
pandas-dev__pandas-55395
pandas-dev/pandas
pandas-dev/pandas
python
4c359a336ccd29a6b1dd4c07871658e27ad9702c
BUG: Get deprecation warning from `Series` constructor ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on ...
https://github.com/pandas-dev/pandas/blob/2a08b052305ed35150d1355bc537548bec697778/pandas/_libs/lib.pyx#L869 is the offending line. cc @jbrockmendel The hasattr check is bad. Changing it to `hasattr(type(val), "_data")` might avoid the warning for now? I can confirm that the deprecation warning occurs on the main...
diff --git a/doc/source/whatsnew/v2.1.4.rst b/doc/source/whatsnew/v2.1.4.rst index 04bbb0f806cbd..25afcbb3bb532 100644 --- a/doc/source/whatsnew/v2.1.4.rst +++ b/doc/source/whatsnew/v2.1.4.rst @@ -21,7 +21,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ -- +- Bug in :class:`Series` constructor raising DeprecationWarning...
diff --git a/pandas/tests/series/test_constructors.py b/pandas/tests/series/test_constructors.py index 195c50969ffae..57cc674754cc7 100644 --- a/pandas/tests/series/test_constructors.py +++ b/pandas/tests/series/test_constructors.py @@ -2144,16 +2144,14 @@ def test_series_constructor_datetimelike_index_coercion(self): ...
["pandas/tests/series/test_constructors.py::TestSeriesConstructorIndexCoercion::test_series_constructor_infer_multiindex[data1-Series]", "pandas/tests/series/test_constructors.py::TestSeriesConstructorIndexCoercion::test_series_constructor_infer_multiindex[1.0-Series]"]
["pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_constructor_period_incompatible_frequency", "pandas/tests/series/test_constructors.py::TestSeriesConstructorIndexCoercion::test_series_constructor_infer_multiindex[data1-array]", "pandas/tests/series/test_constructors.py::TestSeriesConstructors::t...
null
true
2023-10-04T08:27:24Z
2
12
2
1,302
0
0.85
1
0.85
1
0.257
90.646
383
swe_gym::train::2358
swe_gym
train
2,358
modin-project__modin-5946
modin-project/modin
modin-project/modin
python
9159d813926816c840e53d6e8ecf43e2765a9e9c
Reading large json lines dataset fails because of rows having different columns ### System information - **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Ubuntu 20.04.4 LTS - **Modin version** (`modin.__version__`): 0.15.3 - **Python version**: 3.10.6 - **Code we can use to reproduce**: ```python import mod...
@WaDelma thank you for opening this issue! I am able to reproduce this on the latest master. @mvashishtha I took a look and it seems like we're making an incorrect assumption about the columns of the resulting dataframe from the first line of the JSON file. For example, in `json_dispatcher`, we try to get a gist of...
diff --git a/modin/core/io/file_dispatcher.py b/modin/core/io/file_dispatcher.py --- a/modin/core/io/file_dispatcher.py +++ b/modin/core/io/file_dispatcher.py @@ -26,6 +26,7 @@ from modin.logging import ClassLogger from modin.config import AsyncReadMode +from modin.utils import ModinAssumptionError NOT_IMPLEME...
diff --git a/modin/pandas/test/data/test_different_columns_in_rows.json b/modin/pandas/test/data/test_different_columns_in_rows.json new file mode 100644 --- /dev/null +++ b/modin/pandas/test/data/test_different_columns_in_rows.json @@ -0,0 +1,16 @@ +{"a1": 1} +{"a2": 1} +{"a3": 2} +{"a4": 1} +{"a5": 2} +{"a6": 1} +{"a...
["modin/pandas/test/test_io.py::TestJson::test_read_json_different_columns"]
["modin/pandas/test/test_io.py::TestCsv::test_read_csv_parsing_2[latin1-None-None-skiprows5-infer]", "modin/pandas/test/test_io.py::TestParquet::test_read_parquet_directory[rows_per_file0-1000-columns1-pyarrow]", "modin/pandas/test/test_io.py::TestCsv::test_read_csv_parse_dates[None-infer-5-nonexistent_string_column-st...
null
true
2023-04-05T19:16:03Z
3
17
1
1,197
0
0.85
1
0.85
1
0.256167
90.6435
384
swe_gym::train::452
swe_gym
train
452
python__mypy-11247
python/mypy
python/mypy
python
f2978c3b1b23ea939db58332f94876b73bc01d65
`Enum` types cannot be inherited **Feature** ## Subtyping with `Enum` exact values This core currently passes `mypy`: ```python from enum import Enum class A(Enum): x = 1 class B(A): ... ``` But, in runtime this code fails with: ``` Traceback (most recent call last): File "ex.py", line 6, in <module> ...
I would love to work on it after #10852
diff --git a/mypy/semanal.py b/mypy/semanal.py --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -76,7 +76,8 @@ get_nongen_builtins, get_member_expr_fullname, REVEAL_TYPE, REVEAL_LOCALS, is_final_node, TypedDictExpr, type_aliases_source_versions, EnumCallExpr, RUNTIME_PROTOCOL_DECOS, FakeExpression, Stateme...
diff --git a/test-data/unit/check-enum.test b/test-data/unit/check-enum.test --- a/test-data/unit/check-enum.test +++ b/test-data/unit/check-enum.test @@ -1391,3 +1391,256 @@ class Foo(Enum): x = 3 x = 4 [builtins fixtures/bool.pyi] + +[case testEnumImplicitlyFinalForSubclassing] +from enum import Enum, IntE...
["mypy/test/testcheck.py::TypeCheckSuite::testFinalEnumWithClassDef", "mypy/test/testcheck.py::TypeCheckSuite::testEnumImplicitlyFinalForSubclassing", "mypy/test/testcheck.py::TypeCheckSuite::testEnumFinalSubtypingMethodAndValueSpecialCase"]
["mypy/test/testcheck.py::TypeCheckSuite::testEnumFinalSubtypingEnumMetaSpecialCase", "mypy/test/testcheck.py::TypeCheckSuite::testSubclassingNonFinalEnums", "mypy/test/testcheck.py::TypeCheckSuite::testEnumExplicitlyAndImplicitlyFinal", "mypy/test/testcheck.py::TypeCheckSuite::testEnumFinalSubtypingOverloadedSpecialCa...
null
true
2021-10-02T10:53:50Z
1
21
3
1,104
0
0.85
1
0.85
1
0.254
90.637
385
swe_gym::train::476
swe_gym
train
476
python__mypy-16080
python/mypy
python/mypy
python
49419835045b09c98b545171abb10384b6ecf6a9
__post_init__() causes INTERNAL ERROR **Crash Report** When I code with `def __post_init__()`, mypy reports INTERNAL ERROR. **To Reproduce** Here is a minimal code snippet to reproduce the crash: ``` def __post_init__(self): self._a = a ``` Print the code in the `file.py` and execute `mypy file.py`. **Traceback*...
Looks like this is a recent regression. The code doesn't cause mypy to crash using mypy 1.4.1: https://mypy-play.net/?mypy=1.4.1&python=3.11&gist=ca0d08947e4e0659f5b8d4d794752422 But does with mypy 1.5.0 or mypy 1.5.1: https://mypy-play.net/?mypy=1.5.1&python=3.11&gist=4d266591df6934e48c26bc0f3fa61634
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -1076,6 +1076,8 @@ def check_func_item( if name == "__exit__": self.check__exit__return_type(defn) + # TODO: the following logic should move to the dataclasses plugin + # https://github.c...
diff --git a/test-data/unit/check-dataclasses.test b/test-data/unit/check-dataclasses.test --- a/test-data/unit/check-dataclasses.test +++ b/test-data/unit/check-dataclasses.test @@ -2280,6 +2280,10 @@ reveal_type(a2) # N: Revealed type is "__main__.A[builtins.int]" [builtins fixtures/tuple.pyi] +[case testPostIn...
["mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testPostInitNotMethod"]
["mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testPostInitCorrectSignature"]
null
true
2023-09-09T22:27:54Z
3
10
1
1,299
0
0.85
1
0.85
1
0.249833
90.6245
386
swe_gym::train::1753
swe_gym
train
1,753
pandas-dev__pandas-50444
pandas-dev/pandas
pandas-dev/pandas
python
0971f55d27680245865eecb4f5d6270fdc45b130
GroupBy nth with Categorical, NA Data and dropna The `nth` method of GroupBy objects can accept a `dropna` keyword, but it doesn't handle Categorical data appropriately. For instance: ```python-traceback In [9]: cat = pd.Categorical(['a', np.nan, np.nan], categories=['a', 'b']) ...: ser = pd.Series([1, 2, 3]) .....
This doesn't seem specific to Categorical data, I get exactly the same error with object data: ``` In [27]: df['cat'] = df['cat'].astype(object) I...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 12b0d90e68ab9..1c7e9f09fcf21 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -924,6 +924,7 @@ Groupby/resample/rolling - Bug in :meth:`.SeriesGroupBy.describe` with ``as_index=False`` would have the i...
diff --git a/pandas/tests/groupby/test_nth.py b/pandas/tests/groupby/test_nth.py index de5025b998b30..77422c28d356f 100644 --- a/pandas/tests/groupby/test_nth.py +++ b/pandas/tests/groupby/test_nth.py @@ -603,8 +603,11 @@ def test_nth_column_order(): def test_nth_nan_in_grouper(dropna): # GH 26011 df = DataF...
["pandas/tests/groupby/test_nth.py::test_nth_nan_in_grouper_series[any]", "pandas/tests/groupby/test_nth.py::test_nth_nan_in_grouper_series[all]"]
["pandas/tests/groupby/test_nth.py::test_groupby_last_first_nth_with_none[Decimal-first]", "pandas/tests/groupby/test_nth.py::test_groupby_head_tail[True-columns3-tail-7-expected_rows7]", "pandas/tests/groupby/test_nth.py::test_first_multi_key_groupby_categorical", "pandas/tests/groupby/test_nth.py::test_groupby_head_t...
null
true
2022-12-27T02:53:32Z
2
11
2
1,275
0
0.85
1
0.85
1
0.249167
90.6225
387
swe_bench_pro::test::424
swe_bench_pro
test
424
instance_internetarchive__openlibrary-89e4b4431fe7506c365a6f6eb6f6d048d04c044c-v08d8e8889ec945ab821fb156c04c7d2e2810debb
internetarchive/openlibrary
internetarchive/openlibrary
python
64c18604714c0672f272ee1e620ad62e9a248312
# Title: KeyError in make_work() when processing documents without author fields ## Description `make_work()` fails when processing documents that lack `author_key` and/or `author_name`. The function assumes these fields are present and attempts to build the authors' list, raising an exception. Documents without auth...
## Requirements -    The existing function `make_author` should be updated to declare `key` and `name` as strings and the return type as `Author`. -    The existing function `make_author` should build the path using the `"/authors/"` prefix concatenated with the key and call `web.ctx.site.new` with that path and the d...
diff --git a/openlibrary/plugins/upstream/addbook.py b/openlibrary/plugins/upstream/addbook.py index 42f7f0c6963..680ed78d0dc 100644 --- a/openlibrary/plugins/upstream/addbook.py +++ b/openlibrary/plugins/upstream/addbook.py @@ -16,6 +16,7 @@ from infogami.utils.view import safeint, add_flash_message from infogami.in...
diff --git a/openlibrary/plugins/upstream/tests/test_addbook.py b/openlibrary/plugins/upstream/tests/test_addbook.py index a644a09b105..7858905b276 100644 --- a/openlibrary/plugins/upstream/tests/test_addbook.py +++ b/openlibrary/plugins/upstream/tests/test_addbook.py @@ -388,3 +388,71 @@ def test_moving_edition_to_new...
["openlibrary/plugins/upstream/tests/test_addbook.py::TestMakeWork::test_make_author_adds_the_correct_key", "openlibrary/plugins/upstream/tests/test_addbook.py::TestMakeWork::test_make_work_handles_no_author"]
["openlibrary/plugins/upstream/tests/test_addbook.py::TestSaveBookHelper::test_authors", "openlibrary/plugins/upstream/tests/test_addbook.py::TestSaveBookHelper::test_editing_orphan_creates_work", "openlibrary/plugins/upstream/tests/test_addbook.py::TestSaveBookHelper::test_never_create_an_orphan", "openlibrary/plugins...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-89e4b4431fe7506c365a6f6eb6f6d048d04c044c-v08d8e8889ec945ab821fb156c04c7d2e2810debb
true
null
1
32
2
1,053
0
0.95
1
0.85
1
0.282167
90.6215
388
swe_gym::train::1136
swe_gym
train
1,136
pandas-dev__pandas-47528
pandas-dev/pandas
pandas-dev/pandas
python
2fc7fab763f169bfb67ab6e48be584306150c904
BUG: UserWarning about lacking infer_datetime_format with pd.to_datetime ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed t...
Can you provide a small DataFrame that reproduces this warning? I attempted with df = pd.DataFrame({'date': ['15/09/1979']}) on main and did not get a warning. closing for now, will reopen if you provide a reproducible example @moojen @MarcoGorelli Here is a small example to reproduce this warning: ```py...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 56b09348189ee..2fed373a5c79b 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -727,6 +727,7 @@ Other Deprecations - Deprecated the ``display.column_space`` global configuration option (:issue:`7576`) ...
diff --git a/pandas/tests/io/parser/test_parse_dates.py b/pandas/tests/io/parser/test_parse_dates.py index 449d5a954613b..d05961b702c51 100644 --- a/pandas/tests/io/parser/test_parse_dates.py +++ b/pandas/tests/io/parser/test_parse_dates.py @@ -1677,9 +1677,7 @@ def test_parse_delimited_date_swap_with_warning( ): ...
["pandas/tests/io/parser/test_parse_dates.py::test_parse_delimited_date_swap_with_warning[c_low-02/13/2019-True-expected1]", "pandas/tests/io/parser/test_parse_dates.py::test_parse_delimited_date_swap_with_warning[python-13/02/2019-False-expected0]", "pandas/tests/io/parser/test_parse_dates.py::test_parse_delimited_dat...
["pandas/tests/io/parser/test_parse_dates.py::test_read_with_parse_dates_invalid_type[python-parse_dates0]", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_...
null
true
2022-06-28T12:10:29Z
2
14
12
1,213
0
0.85
1
0.85
1
0.248833
90.6215
389
swe_gym::train::396
swe_gym
train
396
python__mypy-11824
python/mypy
python/mypy
python
f96446ce2f99a86210b21d39c7aec4b13a8bfc66
Regression in 0.930 - Slots **Bug Report** This error is incorrectly showing up on my class that inherits from Generic[V]. This is probably because it inherits from Protocol, which defines `__slots__ = ()` error: "Node" both defines "__slots__" and is used with "slots=True" [misc] **To Reproduce** ``` C = TypeVar(...
This happens because `semanal` requires two passes and we already set `__slots__` during the first pass. Fix is incomming.
diff --git a/mypy/plugins/dataclasses.py b/mypy/plugins/dataclasses.py --- a/mypy/plugins/dataclasses.py +++ b/mypy/plugins/dataclasses.py @@ -221,9 +221,12 @@ def add_slots(self, self._ctx.reason, ) return - if info.slots is not None or info.names.get('__slots__'): + +...
diff --git a/test-data/unit/check-dataclasses.test b/test-data/unit/check-dataclasses.test --- a/test-data/unit/check-dataclasses.test +++ b/test-data/unit/check-dataclasses.test @@ -1456,3 +1456,69 @@ class Other: __slots__ = ('x',) x: int [builtins fixtures/dataclasses.pyi] + + +[case testSlotsDefinitionWi...
["mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testSlotsDefinitionWithTwoPasses4", "mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testSlotsDefinitionWithTwoPasses1"]
["mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testSlotsDefinitionWithTwoPasses2", "mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testSlotsDefinitionWithTwoPasses3"]
null
true
2021-12-22T20:41:24Z
1
9
2
1,264
0
0.85
1
0.85
1
0.240667
90.597
390
swe_gym::train::1314
swe_gym
train
1,314
pandas-dev__pandas-51631
pandas-dev/pandas
pandas-dev/pandas
python
b99e2961e1aa89f80dbc9561d8ed47afbe4bc822
BUG?: Series.any / Series.all behavior for pyarrow vs. non-pyarrow empty/all-NA ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have conf...
I think the difference is in `min_count`; pyarrow defaults to 1 whereas pandas (where it exists) defaults to 0. I think pandas should use the pandas default when calling pyarrow.
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index cb72b68fd319b..fd7593737387f 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -199,7 +199,7 @@ Sparse ExtensionArray ^^^^^^^^^^^^^^ -- +- Bug in :meth:`Series.any` and :meth:`Series.all` returning `...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index a838dc6550f78..f9af3a3063386 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -2144,3 +2144,15 @@ def test_dt_tz_localize(unit): dtype=ArrowDtype(pa.timestamp(unit, "US/...
["pandas/tests/extension/test_arrow.py::test_boolean_reduce_series_all_null[any-True]", "pandas/tests/extension/test_arrow.py::test_boolean_reduce_series_all_null[all-True]"]
["pandas/tests/extension/test_arrow.py::TestBaseSetitem::test_setitem_scalar[timestamp[s,", "pandas/tests/extension/test_arrow.py::TestConstructors::test_from_dtype[timestamp[us,", "pandas/tests/extension/test_arrow.py::TestBaseMethods::test_shift_0_periods[binary]", "pandas/tests/extension/test_arrow.py::TestBaseInter...
null
true
2023-02-25T15:19:14Z
2
6
2
1,300
0
0.85
1
0.85
1
0.236667
90.585
391
swe_gym::train::91
swe_gym
train
91
getmoto__moto-7065
getmoto/moto
getmoto/moto
python
41467373210438c86352ecee4c93b7b47919207d
Dynamodb query with a KeyConditionExpression should raise ClientError when the partition key is empty Moto Version: 4.2.9 In an almost identical situation to https://github.com/getmoto/moto/issues/5345, which was about this issue when using `get_item`, when using `query` instead with a KeyConditionExpression the same ...
Thanks for letting us know @LiamCato - I'll raise a PR for this shortly.
diff --git a/moto/dynamodb/exceptions.py b/moto/dynamodb/exceptions.py --- a/moto/dynamodb/exceptions.py +++ b/moto/dynamodb/exceptions.py @@ -19,6 +19,13 @@ def __init__(self, message: str): self.exception_msg = message +class KeyIsEmptyStringException(MockValidationException): + def __init__(self, emp...
diff --git a/tests/test_dynamodb/exceptions/test_key_length_exceptions.py b/tests/test_dynamodb/exceptions/test_key_length_exceptions.py --- a/tests/test_dynamodb/exceptions/test_key_length_exceptions.py +++ b/tests/test_dynamodb/exceptions/test_key_length_exceptions.py @@ -3,6 +3,7 @@ from moto import mock_dynamodb...
["tests/test_dynamodb/exceptions/test_key_length_exceptions.py::test_query_empty_key_exception"]
["tests/test_dynamodb/exceptions/test_key_length_exceptions.py::test_item_add_long_string_range_key_exception", "tests/test_dynamodb/exceptions/test_key_length_exceptions.py::test_item_add_empty_key_exception", "tests/test_dynamodb/exceptions/test_key_length_exceptions.py::test_update_item_with_long_string_hash_key_exc...
null
true
2023-11-24 19:35:11
3
28
1
859
0
0.85
1
0.85
1
0.2365
90.5845
392
swe_gym::train::1096
swe_gym
train
1,096
pydantic__pydantic-8977
pydantic/pydantic
pydantic/pydantic
python
e58134b876a340863ea417f6c7967c9ed14ec03b
validate_call makes an unexpected conversion ### Initial Checks - [X] I confirm that I'm using Pydantic V2 ### Description In this example: ```python >>> from collections.abc import Set >>> from pydantic import ConfigDict, validate_call >>> >>> @validate_call(config=ConfigDict(strict=True, arbitrary_types_allowed=T...
Ah, this does seem like a bug, but isn't just for `validate_call`, but also this problem applies to general validation with `BaseModel`, pydantic dataclasses, etc (it's all the same logic, so this isn't surprising). We should revisit the set validation logic.
diff --git a/pydantic/_internal/_std_types_schema.py b/pydantic/_internal/_std_types_schema.py --- a/pydantic/_internal/_std_types_schema.py +++ b/pydantic/_internal/_std_types_schema.py @@ -274,7 +274,7 @@ class SequenceValidator: item_source_type: type[Any] min_length: int | None = None max_length: int...
diff --git a/tests/test_main.py b/tests/test_main.py --- a/tests/test_main.py +++ b/tests/test_main.py @@ -2377,6 +2377,28 @@ class StrictModel(BaseModel): ] +@pytest.mark.xfail( + reason='strict=True in model_validate_json does not overwrite strict=False given in ConfigDict' + 'See issue: https://github...
["tests/test_types.py::test_frozenset_strict", "tests/test_types.py::test_list_strict", "tests/test_validate_call.py::test_config_strict", "tests/test_types.py::test_set_strict"]
["tests/test_main.py::test_allow_extra_from_attributes[forbid]", "tests/test_types.py::test_finite_float_validation_error[inf]", "tests/test_types.py::test_default_validators[date_check-value113-result113]", "tests/test_main.py::test_field_order_is_preserved_with_extra", "tests/test_types.py::test_decimal_validation[co...
null
true
2024-03-08T21:28:26Z
1
7
4
1,270
0
0.85
1
0.85
1
0.235
90.58
393
swe_gym::train::1511
swe_gym
train
1,511
pandas-dev__pandas-56788
pandas-dev/pandas
pandas-dev/pandas
python
5fc2ed2703a1370207f4ebad834e665b6c2ad42f
BUG: Interchange protocol implementation does not allow for empty string columns ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have con...
> @MarcoGorelli FYI ( sorry for the spam) 😄 don't apologies, I very much appreciate you digging in and finding these take
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 9a9ac769a4893..2018c8936ee3c 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -934,6 +934,7 @@ Other - Bug in :func:`cut` and :func:`qcut` with ``datetime64`` dtype values with non-nanosecond units inc...
diff --git a/pandas/tests/interchange/test_impl.py b/pandas/tests/interchange/test_impl.py index 4ba6eb8464261..2bc488fbb1dd1 100644 --- a/pandas/tests/interchange/test_impl.py +++ b/pandas/tests/interchange/test_impl.py @@ -355,6 +355,14 @@ def test_interchange_from_corrected_buffer_dtypes(monkeypatch) -> None: p...
["pandas/tests/interchange/test_impl.py::test_empty_string_column"]
["pandas/tests/interchange/test_impl.py::test_bitmasks_pyarrow[2-None-expected_values2]", "pandas/tests/interchange/test_impl.py::test_datetimetzdtype[us-UTC]", "pandas/tests/interchange/test_impl.py::test_mixed_data[data2]", "pandas/tests/interchange/test_impl.py::test_dataframe[<lambda>2]", "pandas/tests/interchange/...
null
true
2024-01-08T22:11:33Z
2
4
1
2,270
0
0.85
1
1
0.8
0.391667
90.575
394
swe_gym::train::422
swe_gym
train
422
python__mypy-11314
python/mypy
python/mypy
python
eeafe6b6945eb68eaab7552010c59102b4457be6
`bool` and `TypeGuard` incorrect match in `@overload` method While working on https://github.com/python/typeshed/pull/6140 I've noticed that there's a problem with how `TypeGuard` and `bool` types match in `overload` method. Here's a simplified example: ```python from typing import Callable, TypeVar, Generic, TypeGuar...
Try playing with this line: https://github.com/python/mypy/blob/1b6f63b9fdf6f05a554974a470136c7623ad9ea2/mypy/typeanal.py#L359 Looks like that the problem is more likely here: https://github.com/python/mypy/blob/eeafe6b6945eb68eaab7552010c59102b4457be6/mypy/constraints.py#L475-L478 One more weird case: ```python fr...
diff --git a/mypy/messages.py b/mypy/messages.py --- a/mypy/messages.py +++ b/mypy/messages.py @@ -1740,7 +1740,10 @@ def format(typ: Type) -> str: # return type (this always works). return format(TypeType.make_normalized(erase_type(func.items[0].ret_type))) elif isinstance(func, Call...
diff --git a/test-data/unit/check-typeguard.test b/test-data/unit/check-typeguard.test --- a/test-data/unit/check-typeguard.test +++ b/test-data/unit/check-typeguard.test @@ -458,3 +458,92 @@ def foobar_typeguard(x: object): return reveal_type(x) # N: Revealed type is "__main__.<subclass of "Foo" and "Ba...
["mypy/test/testcheck.py::TypeCheckSuite::testTypeGuardAsFunctionArg", "mypy/test/testcheck.py::TypeCheckSuite::testTypeGuardSubtypingVariance", "mypy/test/testcheck.py::TypeCheckSuite::testTypeGuardAsOverloadedFunctionArg", "mypy/test/testcheck.py::TypeCheckSuite::testTypeGuardAsGenericFunctionArg"]
["mypy/test/testcheck.py::TypeCheckSuite::testTypeGuardAsFunctionArgAsBoolSubtype"]
null
true
2021-10-11T11:38:46Z
2
12
4
1,146
0
0.85
1
0.85
1
0.231
90.568
395
swe_gym::train::630
swe_gym
train
630
conan-io__conan-11348
conan-io/conan
conan-io/conan
python
d41822f3ad7dcab4aa71841d93d02a7dcc5d7e0b
[bug] missing CMakeUserPresets.json Conan 1.48.0 does not generate `CMakeUserPresets.json` if `conanfile.txt` used instead of `.py`. Probably this is duplicate of #11172. ### Environment Details * Operating System: linux * Conan version: 1.48.0 ### Steps to reproduce ``` cd "$(mktemp -d)" conan new hello/0.1 -m=...
Hi @magras That's expected because it needs a ``layout`` to create the ``CMakeUserPresets.json``, so it's impossible to do that without a ``conanfile.py``: ```python def layout(self): cmake_layout(self) ``` That's why it's failing when a ``conanfile.txt`` is there instead. More information [he...
diff --git a/conans/client/loader.py b/conans/client/loader.py --- a/conans/client/loader.py +++ b/conans/client/loader.py @@ -3,10 +3,14 @@ import inspect import os import sys +import types import uuid import yaml +from conan.tools.cmake import cmake_layout +from conan.tools.google import bazel_layout +from c...
diff --git a/conans/test/conftest.py b/conans/test/conftest.py --- a/conans/test/conftest.py +++ b/conans/test/conftest.py @@ -76,7 +76,8 @@ "3.23": { "path": {'Windows': 'C:/cmake/cmake-3.23.1-win64-x64/bin', 'Darwin': '/Users/jenkins/cmake/cmake-3.23.1/bin', - ...
["conans/test/unittests/client/conanfile_loader_test.py::ConanLoaderTxtTest::test_layout_not_predefined", "conans/test/unittests/client/conanfile_loader_test.py::ConanLoaderTxtTest::test_layout_multiple"]
["conans/test/unittests/client/conanfile_loader_test.py::ImportModuleLoaderTest::test_py3_recipe_colliding_init_filenames_0", "conans/test/unittests/client/conanfile_loader_test.py::ImportModuleLoaderTest::test_py3_recipe_colliding_init_filenames_2", "conans/test/unittests/client/conanfile_loader_test.py::ConanLoaderTx...
null
true
2022-05-27T10:54:29Z
2
29
2
805
0
0.85
1
0.85
1
0.230833
90.5675
396
swe_gym::train::531
swe_gym
train
531
python__mypy-15722
python/mypy
python/mypy
python
d2022a0007c0eb176ccaf37a9aa54c958be7fb10
intentionally empty generator marked as unreachable **Bug Report** this seems to be a common pattern: ```python def f() -> Generator[None, None, None]: return yield ``` it can instead be rewritten as: ```python def f() -> Generator[None, None, None]: yield from () ``` **To Reproduce** see above **Ex...
Uum... I couldn't reproduce this bug. - mypy: 1.3.0 - with `--warn-unreachable` flag - w/o `mypy.ini` - python 3.10.5 ```bash ❯ mypy --warn-unreachable t.py Success: no issues found in 1 source file ❯ cat t.py from typing import Generator def f() -> Generator[None, None, None]: yield from () ...
diff --git a/mypy/binder.py b/mypy/binder.py --- a/mypy/binder.py +++ b/mypy/binder.py @@ -42,13 +42,6 @@ def __init__(self, id: int, conditional_frame: bool = False) -> None: self.types: dict[Key, Type] = {} self.unreachable = False self.conditional_frame = conditional_frame - - # Sho...
diff --git a/test-data/unit/check-unreachable-code.test b/test-data/unit/check-unreachable-code.test --- a/test-data/unit/check-unreachable-code.test +++ b/test-data/unit/check-unreachable-code.test @@ -1446,3 +1446,19 @@ def f() -> None: Foo()['a'] = 'a' x = 0 # This should not be reported as unreachable [b...
["mypy/test/testcheck.py::TypeCheckSuite::check-unreachable-code.test::testIntentionallyEmptyGeneratorFunction", "mypy/test/testcheck.py::TypeCheckSuite::check-unreachable-code.test::testIntentionallyEmptyGeneratorFunction_None"]
[]
null
true
2023-07-20T03:01:49Z
2
33
2
724
0
0.85
1
0.85
1
0.230667
90.567
397
swe_gym::train::320
swe_gym
train
320
getmoto__moto-6187
getmoto/moto
getmoto/moto
python
dc460a325839bc6797084a54afc297a2c9d87e63
bug: "DeleteMarker" should be returned in "delete_object" response ## Steps to reproduce 1. Create a versioned bucket 2. Upload an object to the bucket 3. Call `delete_object` on that bucket ## Expected output That the response coming from `delete_object` would contain "DeleteMarker" set to `False`. I expect this fo...
Investigating this a bit more, here's what I found using `boto3==1.26.91` against a versioned bucket: * Deleting an object by key only will create a delete marker for it. The response will include the `DeleteMarker` flag set to `True` and the `VersionId` set to the version of the delete marker. * Deleting the objec...
diff --git a/moto/s3/models.py b/moto/s3/models.py --- a/moto/s3/models.py +++ b/moto/s3/models.py @@ -2182,11 +2182,13 @@ def delete_object(self, bucket_name, key_name, version_id=None, bypass=False): if version_id is None: delete_marker = self._set_delete_marker(bucket_name, key_...
diff --git a/tests/test_s3/test_s3.py b/tests/test_s3/test_s3.py --- a/tests/test_s3/test_s3.py +++ b/tests/test_s3/test_s3.py @@ -1622,27 +1622,65 @@ def test_delete_versioned_bucket(): @mock_s3 -def test_delete_versioned_bucket_returns_meta(): +def test_delete_versioned_bucket_returns_metadata(): + # Verified...
["tests/test_s3/test_s3.py::test_delete_versioned_bucket_returns_metadata"]
["tests/test_s3/test_s3.py::test_head_object_if_modified_since_refresh", "tests/test_s3/test_s3.py::test_put_bucket_notification", "tests/test_s3/test_s3.py::test_get_bucket_cors", "tests/test_s3/test_s3.py::test_get_object", "tests/test_s3/test_s3.py::test_create_bucket_duplicate", "tests/test_s3/test_s3.py::test_list...
null
true
2023-04-07 20:56:47
1
13
1
1,111
0
0.85
1
0.85
1
0.2285
90.5605
398
swe_bench_pro::test::416
swe_bench_pro
test
416
instance_internetarchive__openlibrary-798055d1a19b8fa0983153b709f460be97e33064-v13642507b4fc1f8d234172bf8129942da2c2ca26
internetarchive/openlibrary
internetarchive/openlibrary
python
7b1ec94b425e4032a8c1b66a5219b4262af49484
# Bug Report: `map_data` fails with dictionary-based feed entries ## Problem The `map_data` function cannot handle Standard Ebooks feed entries because it assumes attribute-style access (for example, `entry.id`, `entry.language`). The feed now delivers dictionary-based data, so these lookups fail. ## Reproducing the...
## Requirements - `map_data` must accept a dictionary parameter instead of an attribute-accessible object. The keys `id`, `title`, `dcterms_language`, `published`, `authors`, `content`, `value`, `term`, and `tags` must be accessed using dictionary key notation (square brackets) instead of attribute access. - The `publ...
diff --git a/scripts/import_standard_ebooks.py b/scripts/import_standard_ebooks.py index 97064b208e0..155d926c719 100755 --- a/scripts/import_standard_ebooks.py +++ b/scripts/import_standard_ebooks.py @@ -17,7 +17,6 @@ FEED_URL = 'https://standardebooks.org/opds/all' LAST_UPDATED_TIME = './standard_ebooks_last_update...
diff --git a/scripts/tests/test_import_standard_ebooks.py b/scripts/tests/test_import_standard_ebooks.py new file mode 100644 index 00000000000..8c81ee0b21a --- /dev/null +++ b/scripts/tests/test_import_standard_ebooks.py @@ -0,0 +1,150 @@ +from scripts.import_standard_ebooks import map_data + + +SAMPLE_1 = { + 'id'...
["scripts/tests/test_import_standard_ebooks.py::test_map_data"]
[]
ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-798055d1a19b8fa0983153b709f460be97e33064-v13642507b4fc1f8d234172bf8129942da2c2ca26
true
null
1
36
1
814
0
0.95
1
0.85
1
0.255667
90.542
399
swe_gym::train::158
swe_gym
train
158
getmoto__moto-6176
getmoto/moto
getmoto/moto
python
9f91ac0eb96b1868905e1555cb819757c055b652
CloudWatchLog's put_subscription_filter() does not accept kinesis data stream destination How to reproduce: Write a test which puts a subscription filter to a cloudwatch loggroup, mocking the loggroup name, the kinesis data stream, and the role arn. When the test calls the boto3 method put_subscription_filter(), the f...
A simpler way to trigger the issue is to simply carry out the mocked action within the test code itself rather than calling actual code. e.g. this stack track has the full test and doesn't call any functional code: ``` ./tests/unit/test_cloudwatch_loggroup_subscriptions_lambda_code.py::test_unsubscribe_loggroup_fr...
diff --git a/moto/kinesis/models.py b/moto/kinesis/models.py --- a/moto/kinesis/models.py +++ b/moto/kinesis/models.py @@ -1,5 +1,9 @@ +from base64 import b64encode from collections import OrderedDict +from gzip import GzipFile import datetime +import io +import json import re import itertools @@ -8,6 +12,7 @@ ...
diff --git a/tests/test_logs/test_integration.py b/tests/test_logs/test_integration.py --- a/tests/test_logs/test_integration.py +++ b/tests/test_logs/test_integration.py @@ -10,6 +10,7 @@ from botocore.exceptions import ClientError from datetime import datetime from moto import mock_logs, mock_lambda, mock_iam, moc...
["tests/test_logs/test_integration.py::test_put_subscription_filter_with_kinesis"]
["tests/test_logs/test_integration.py::test_put_subscription_filter_update", "tests/test_logs/test_integration.py::test_delete_subscription_filter_errors", "tests/test_logs/test_integration.py::test_delete_subscription_filter", "tests/test_logs/test_integration.py::test_put_subscription_filter_with_firehose", "tests/te...
null
true
2023-04-04 20:51:58
2
58
1
7,724
0
0.85
1
0.8
1
0.693333
90.53