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
400
swe_gym::train::82
swe_gym
train
82
getmoto__moto-5286
getmoto/moto
getmoto/moto
python
fff61af6fc9eb2026b0d9eb14b5f5a52f263a406
Cognito client describe_user_pool does not return with associated domain Hi, I would like to test our programmatically created user pool's domain but it seems that the user pool's domain property is not implemented in the `describe_user_pool()` response in moto. I'm using boto version `1.24.20` and moto version `3.1.1...
Thanks for raising this @janoskranczler!
diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py --- a/moto/cognitoidp/models.py +++ b/moto/cognitoidp/models.py @@ -443,6 +443,21 @@ def __init__(self, region, name, extended_config): ) as f: self.json_web_key = json.loads(f.read()) + @property + def backend(self): + ...
diff --git a/tests/test_cognitoidp/test_cognitoidp.py b/tests/test_cognitoidp/test_cognitoidp.py --- a/tests/test_cognitoidp/test_cognitoidp.py +++ b/tests/test_cognitoidp/test_cognitoidp.py @@ -870,6 +870,8 @@ def test_describe_user_pool_domain(): result["DomainDescription"]["Domain"].should.equal(domain) re...
["tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_domain"]
["tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_required", "tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up", "tests/test_cognitoidp/test_cognitoidp.py::test_get_user_unknown_accesstoken", "tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool", "tests/t...
null
true
2022-07-03 01:04:00
1
18
1
945
0
0.85
1
0.85
1
0.2175
90.5275
401
swe_gym::train::940
swe_gym
train
940
dask__dask-6911
dask/dask
dask/dask
python
efc8b9070c43957fced33f992e00463c43e16322
IndexError when supplying multiple paths to dask.dataframe.read_csv() and including a path column I fixed my installation (dask version 2.30) locally by adding ` and i < len(self.paths)` to this line https://github.com/dask/dask/blob/fbccc4ef3e1974da2b4a9cb61aa83c1e6d61efba/dask/dataframe/io/csv.py#L82 I bet there is ...
Would you mind expanding your example code to generate some files too, and then include the traceback, so that we can be sure talk about exactly the same thing, and help with diagnosis? ( @jsignell , for the include_path_column logic) I am not sure if this is a regression or not, but I can reproduce. Thanks for bringki...
diff --git a/dask/dataframe/io/csv.py b/dask/dataframe/io/csv.py --- a/dask/dataframe/io/csv.py +++ b/dask/dataframe/io/csv.py @@ -1,4 +1,3 @@ -from os.path import basename from collections.abc import Mapping from io import BytesIO from warnings import warn, catch_warnings, simplefilter @@ -78,9 +77,12 @@ def __geti...
diff --git a/dask/dataframe/io/tests/test_csv.py b/dask/dataframe/io/tests/test_csv.py --- a/dask/dataframe/io/tests/test_csv.py +++ b/dask/dataframe/io/tests/test_csv.py @@ -458,6 +458,23 @@ def test_read_csv_include_path_column_is_dtype_category(dd_read, files): assert has_known_categories(result.path) +...
["dask/dataframe/io/tests/test_csv.py::test_read_csv_include_path_column_with_multiple_partitions_per_file[read_csv-files0]", "dask/dataframe/io/tests/test_csv.py::test_read_csv_include_path_column_with_multiple_partitions_per_file[read_table-files1]"]
["dask/dataframe/io/tests/test_csv.py::test_to_csv_warns_using_scheduler_argument", "dask/dataframe/io/tests/test_csv.py::test_read_csv_include_path_column[read_table-files1]", "dask/dataframe/io/tests/test_csv.py::test_pandas_read_text_with_header[read_table-files1]", "dask/dataframe/io/tests/test_csv.py::test_none_us...
null
true
2020-11-30T21:16:43Z
1
31
2
626
0
0.85
1
0.85
1
0.207667
90.498
402
swe_gym::train::1820
swe_gym
train
1,820
pandas-dev__pandas-51565
pandas-dev/pandas
pandas-dev/pandas
python
c71645fff865c29e77bb81bd9510dba97d93a67c
BUG: Transpose changes dtype from object to timedelta/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 this bug ex...
I'd expect object too
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 12d35288d1ee6..9000b3fc446c5 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -195,7 +195,7 @@ Groupby/resample/rolling Reshaping ^^^^^^^^^ -- +- Bug in :meth:`DataFrame.transpose` inferring dtype f...
diff --git a/pandas/tests/frame/methods/test_transpose.py b/pandas/tests/frame/methods/test_transpose.py index 6213a6dbbd0ca..e8710cea95219 100644 --- a/pandas/tests/frame/methods/test_transpose.py +++ b/pandas/tests/frame/methods/test_transpose.py @@ -7,6 +7,8 @@ DataFrame, DatetimeIndex, IntervalIndex,...
["pandas/tests/frame/methods/test_transpose.py::TestTranspose::test_transpose_tzaware_2col_mixed_tz", "pandas/tests/frame/methods/test_transpose.py::TestTranspose::test_transpose_not_inferring_dt_mixed_blocks", "pandas/tests/frame/methods/test_transpose.py::TestTranspose::test_transpose_object_to_tzaware_mixed_tz", "pa...
["pandas/tests/groupby/test_quantile.py::test_groupby_quantile_with_arraylike_q_and_int_columns[q0-groupby0-frame_size0]", "pandas/tests/groupby/test_quantile.py::test_quantile[0.75-a_vals5-b_vals5-higher]", "pandas/tests/groupby/test_quantile.py::test_groupby_quantile_all_na_group_masked_interp[UInt8-midpoint]", "pand...
null
true
2023-02-22T21:57:32Z
2
12
4
1,005
0
0.85
1
0.85
1
0.2075
90.4975
403
swe_gym::train::546
swe_gym
train
546
python__mypy-14093
python/mypy
python/mypy
python
77dd4b4df5b8bcd716352144feeb78862427f4dd
Internal Error due to overloaded generic method? **Bug Report** I ran into an internal error that seems to be related to type inference with an overloaded method. Apologies for the bland description but I don't know mypy internals well enough to debug further. **To Reproduce** Create a py file with the following code...
Slightly more minimal repro: ```python from __future__ import annotations from typing import Protocol, TypeVar, overload _KT_contra = TypeVar("_KT_contra", contravariant=True) _VT_co = TypeVar("_VT_co", covariant=True) _T = TypeVar("_T") class MappingProtocol(Protocol[_KT_contra, _VT_co]): @overload ...
diff --git a/mypy/applytype.py b/mypy/applytype.py --- a/mypy/applytype.py +++ b/mypy/applytype.py @@ -73,6 +73,7 @@ def apply_generic_arguments( report_incompatible_typevar_value: Callable[[CallableType, Type, str, Context], None], context: Context, skip_unsatisfied: bool = False, + allow_erased_call...
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 @@ -1958,3 +1958,26 @@ lst = SubLinkedList(1, LinkedList(2)) # E: Argument 2 to "SubLinkedList" has in reveal_type(lst.next) # N: Revealed...
["mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testNoCrashOnNestedGenericCallable"]
[]
null
true
2022-11-14T20:10:10Z
3
54
1
11,280
0
0.85
1
0.8
1
0.68
90.49
404
swe_gym::train::671
swe_gym
train
671
conan-io__conan-13403
conan-io/conan
conan-io/conan
python
55163679ad1fa933f671ddf186e53b92bf39bbdb
[bug] Can't specify Autotools.autoreconf() location to the build directory ### Environment details * Operating System+version: Linux * Compiler+version: gcc 8.5 * Conan version: 2.0.1 * Python version: 3.6.8 ### Steps to reproduce I tried to run autoreconf on my configure.ac file in the build folder. However, even d...
Thanks for your report @gabeblack Quick hint: for sure you wouldn't need ``with chdir(self, self.build_folder):``, the ``build()`` method already runs in the ``self.build_folder``. It seems that the ``autoreconf`` should also gain a ``build_script_folder`` argument then? Would you like to contribute it yourself?...
diff --git a/conan/tools/gnu/autotools.py b/conan/tools/gnu/autotools.py --- a/conan/tools/gnu/autotools.py +++ b/conan/tools/gnu/autotools.py @@ -98,16 +98,20 @@ def install(self, args=None, target="install"): args.insert(0, "DESTDIR={}".format(unix_path(self._conanfile, self._conanfile.package_folder))) ...
diff --git a/conans/test/unittests/tools/gnu/autotools_test.py b/conans/test/unittests/tools/gnu/autotools_test.py --- a/conans/test/unittests/tools/gnu/autotools_test.py +++ b/conans/test/unittests/tools/gnu/autotools_test.py @@ -1,4 +1,5 @@ import os +from mock import patch from conan.tools.build import save_tool...
["conans/test/unittests/tools/gnu/autotools_test.py::test_source_folder_works"]
[]
null
true
2023-03-09T21:27:25Z
1
8
1
1,058
0
0.85
1
0.85
1
0.203
90.484
405
swe_gym::train::657
swe_gym
train
657
conan-io__conan-10408
conan-io/conan
conan-io/conan
python
45d7983565868c9211eabc1b1a46e54cc2fb7ada
[bug][2.0] patches cannot be applied when using cmake_layout Hello, It seems that `files.patch` and `cmake_layout` do not get along very well. The former does not find the patch files, even when specifying `base_path=self.build_folder`, although they are inside the build folder. I've joined a 2.0 version of `docopt.c...
This might be missing a small detail: ```python with files.chdir(self, self.source_folder): for patch in self.conan_data["patches"][str(self._upstream_version)]: files.patch(self, **patch) ``` Note: - You are running in the ``build()`` method, not the ``source()`` method - By default, the ...
diff --git a/conan/tools/files/patches.py b/conan/tools/files/patches.py --- a/conan/tools/files/patches.py +++ b/conan/tools/files/patches.py @@ -50,13 +50,17 @@ def patch(conanfile, base_path=None, patch_file=None, patch_string=None, strip=0 patchlog.addHandler(PatchLogHandler(conanfile, patch_file)) if p...
diff --git a/conans/test/unittests/tools/files/test_patches.py b/conans/test/unittests/tools/files/test_patches.py --- a/conans/test/unittests/tools/files/test_patches.py +++ b/conans/test/unittests/tools/files/test_patches.py @@ -37,23 +37,46 @@ def mock_fromstring(string): def test_single_patch_file(mock_patch_ng)...
["conans/test/unittests/tools/files/test_patches.py::test_single_patch_file", "conans/test/unittests/tools/files/test_patches.py::test_base_path", "conans/test/unittests/tools/files/test_patches.py::test_apply_in_build_from_patch_in_source", "conans/test/unittests/tools/files/test_patches.py::test_single_patch_argument...
["conans/test/unittests/tools/files/test_patches.py::test_single_apply_fail", "conans/test/unittests/tools/files/test_patches.py::test_single_patch_type", "conans/test/unittests/tools/files/test_patches.py::test_single_patch_file_from_forced_build", "conans/test/unittests/tools/files/test_patches.py::test_single_patch_...
null
true
2022-01-24T12:17:47Z
1
6
4
1,081
0
0.85
1
0.85
1
0.200167
90.4755
406
swe_gym::train::1385
swe_gym
train
1,385
pandas-dev__pandas-55764
pandas-dev/pandas
pandas-dev/pandas
python
51f3d03087414bdff763d3f45b11e37b2a28ea84
BUG: pandas 2.1.2 changes how `copy` works ### 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 bran...
We’re pinning Pandas to !=2.1.2. Can we rely on Pandas 2.2.0 to fix this?
diff --git a/doc/source/whatsnew/v2.1.3.rst b/doc/source/whatsnew/v2.1.3.rst index 31ab01f171b4a..6413e16afd800 100644 --- a/doc/source/whatsnew/v2.1.3.rst +++ b/doc/source/whatsnew/v2.1.3.rst @@ -13,7 +13,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ -- +- Fixed infinite recursion fr...
diff --git a/pandas/tests/frame/test_subclass.py b/pandas/tests/frame/test_subclass.py index 55bfefaeb53a9..f19e31002c877 100644 --- a/pandas/tests/frame/test_subclass.py +++ b/pandas/tests/frame/test_subclass.py @@ -773,3 +773,44 @@ def test_constructor_with_metadata(): ) subset = df[["A", "B"]] assert ...
["pandas/tests/frame/test_subclass.py::TestSubclassWithoutConstructor::test_copy_series", "pandas/tests/frame/test_subclass.py::TestSubclassWithoutConstructor::test_copy_df", "pandas/tests/frame/test_subclass.py::TestSubclassWithoutConstructor::test_groupby"]
["pandas/tests/frame/test_subclass.py::TestDataFrameSubclassing::test_corrwith", "pandas/tests/frame/test_subclass.py::TestDataFrameSubclassing::test_idx[idxmin]", "pandas/tests/frame/test_subclass.py::TestDataFrameSubclassing::test_indexing_sliced", "pandas/tests/frame/test_subclass.py::TestDataFrameSubclassing::test_...
null
true
2023-10-30T13:51:56Z
3
6
3
1,071
0
0.85
1
0.85
1
0.1985
90.4705
407
swe_gym::train::389
swe_gym
train
389
python__mypy-17287
python/mypy
python/mypy
python
43a605f742bd554acbdff9bea74c764621e3aa44
mypy does not check the code after the line with lambda function that calls NoReturn function **Bug Report** mypy does not check the code after the line with lambda function that calls NoReturn function **To Reproduce** Check the code below. I also attached a mypy Playground link. ```python from typing import NoRetur...
It looks like this bug was introduced in version 1.5.0. I tested previous versions and version 1.4.1 is the last one that works as expected. I've found the culprit - https://github.com/python/mypy/commit/3bf85217386806b0f68bf8857b61379ae2f6ad1e. @ikonst please take a look file mypy/checker.py line 467- ```python -...
diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py --- a/mypy/checkexpr.py +++ b/mypy/checkexpr.py @@ -5223,15 +5223,16 @@ def visit_lambda_expr(self, e: LambdaExpr) -> Type: self.chk.return_types.append(AnyType(TypeOfAny.special_form)) # Type check everything in the body except for the final ...
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 @@ -1494,3 +1494,23 @@ from typing import Generator def f() -> Generator[None, None, None]: return None yield ...
["mypy/test/testcheck.py::TypeCheckSuite::check-unreachable-code.test::testLambdaNoReturn", "mypy/test/testcheck.py::TypeCheckSuite::check-unreachable-code.test::testLambdaNoReturnAnnotated"]
[]
null
true
2024-05-24T20:41:42Z
1
10
2
976
0
0.85
1
0.85
1
0.196
90.463
408
swe_gym::train::489
swe_gym
train
489
python__mypy-15050
python/mypy
python/mypy
python
084581839b3f39766154aa81e8019bec6cee416e
Generic type parameters to Argument 1 of `attrs.evolve` only unify under very specific circumstances (mypy 1.2) **Bug Report** (A clear and concise description of what the bug is.) **To Reproduce** ```python from __future__ import annotations from attrs import evolve, frozen from typing import Generic, TypeVar T1...
diff --git a/mypy/plugins/attrs.py b/mypy/plugins/attrs.py --- a/mypy/plugins/attrs.py +++ b/mypy/plugins/attrs.py @@ -2,15 +2,18 @@ from __future__ import annotations -from typing import Iterable, List, cast +from collections import defaultdict +from functools import reduce +from typing import Iterable, List, Map...
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 @@ -1970,6 +1970,81 @@ reveal_type(ret) # N: Revealed type is "Any" [typing fixtures/typing-medium.pyi] +[case testEvolveGeneric] +import attrs +from typing import...
["mypy/test/testcheck.py::TypeCheckSuite::check-attr.test::testEvolveUnionOfTypeVar", "mypy/test/testcheck.py::TypeCheckSuite::check-attr.test::testEvolveGeneric", "mypy/test/testcheck.py::TypeCheckSuite::check-attr.test::testEvolveTypeVarBoundNonAttrs", "mypy/test/testcheck.py::TypeCheckSuite::check-attr.test::testEvo...
["mypy/test/testcheck.py::TypeCheckSuite::check-attr.test::testEvolveTypeVarBound", "mypy/test/testcheck.py::TypeCheckSuite::check-attr.test::testEvolveTypeVarConstrained"]
null
true
2023-04-13T18:23:05Z
1
115
4
2,861
0
0.85
1
0.85
1
0.860167
90.4555
409
swe_gym::train::1665
swe_gym
train
1,665
pandas-dev__pandas-51274
pandas-dev/pandas
pandas-dev/pandas
python
9764f3dbf0173892aba5da4b122851ded43c09bc
BUG: can't resample with non-nano dateindex, out-of-nanosecond-bounds ### 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...
similarly for ``` In [5]: idx = date_range('1900-01-01', '2000-01-01', unit='s') In [6]: ser = Series(np.ones(len(idx)), index=idx) In [7]: ser.resample('1000Y').mean() ``` What happens if you get rid if "first = first.as_unit('ns')" and same for second? I'll try this out next week, hopefully it's not-too-dif...
diff --git a/pandas/core/resample.py b/pandas/core/resample.py index cb129ec272ff3..96982f8727188 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -1731,6 +1731,7 @@ def _get_time_bins(self, ax: DatetimeIndex): ax.min(), ax.max(), self.freq, + unit=...
diff --git a/pandas/tests/resample/test_datetime_index.py b/pandas/tests/resample/test_datetime_index.py index d18db6ab5f643..13041a81dadcf 100644 --- a/pandas/tests/resample/test_datetime_index.py +++ b/pandas/tests/resample/test_datetime_index.py @@ -1838,7 +1838,7 @@ def test_get_timestamp_range_edges(first, last, f...
["pandas/tests/resample/test_datetime_index.py::test_get_timestamp_range_edges[s-1991-08-1992-04-M-19910831-19920531]", "pandas/tests/resample/test_datetime_index.py::test_get_timestamp_range_edges[s-19910906-19920406-M-19910831-19920430]", "pandas/tests/resample/test_datetime_index.py::test_get_timestamp_range_edges[u...
["pandas/tests/resample/test_datetime_index.py::test_nearest_upsample_with_limit[tzlocal()-s-15Min-10S]", "pandas/tests/resample/test_datetime_index.py::test_nearest_upsample_with_limit[tzutc()-us-30S-10H]", "pandas/tests/resample/test_datetime_index.py::test_nearest_upsample_with_limit['dateutil/Asia/Singapore'-us-3M-...
null
true
2023-02-09T18:45:38Z
1
48
21
9,297
0
0.85
1
0.8
1
0.66
90.43
410
swe_gym::train::1454
swe_gym
train
1,454
pandas-dev__pandas-52281
pandas-dev/pandas
pandas-dev/pandas
python
80b4524d22b50baea912d0a951440522acd90bb2
BUG: Series / DataFrame reductions convert string data to numeric - [x] I have checked that this issue has not already been reported. - [x] I have confirmed this bug exists on the latest version of pandas. - [x] (optional) I have confirmed this bug exists on the master branch of pandas. --- #### Code Sample, a copy...
I think we clearly don't want to do this, for the above case. But I suppose this way it enables numeric values in object dtype in general? And there might be use cases for that which would be broken if we remove this conversion to float .. (eg decimals, etc) > But I suppose this way it enables numeric values in obj...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index efc8bc695df85..af1e86021ef19 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -311,8 +311,11 @@ Timezones Numeric ^^^^^^^ +- Bug in :meth:`Series.corr` and :meth:`Series.cov` raising ``AttributeErro...
diff --git a/pandas/tests/apply/test_invalid_arg.py b/pandas/tests/apply/test_invalid_arg.py index 5995b78d4bea5..d75b784302676 100644 --- a/pandas/tests/apply/test_invalid_arg.py +++ b/pandas/tests/apply/test_invalid_arg.py @@ -244,6 +244,9 @@ def test_agg_cython_table_raises_frame(df, func, expected, axis): def test...
["pandas/tests/groupby/test_raises.py::test_groupby_raises_string[by1-True-median-method]", "pandas/tests/groupby/test_raises.py::test_groupby_raises_string[by6-False-median-agg]", "pandas/tests/groupby/test_raises.py::test_groupby_raises_string[by8-True-median-transform]", "pandas/tests/groupby/test_raises.py::test_gr...
["pandas/tests/groupby/test_raises.py::test_groupby_raises_datetime[by7-True-min-transform]", "pandas/tests/groupby/test_function.py::test_groupby_non_arithmetic_agg_types[min-data2-int8]", "pandas/tests/groupby/test_groupby.py::test_empty_groupby[False-skew-agg-cat-keys1-columns1]", "pandas/tests/groupby/test_raises.p...
null
true
2023-03-29T16:02:08Z
2
18
181
718
0
0.85
1
0.85
1
0.179667
90.414
411
swe_gym::train::460
swe_gym
train
460
python__mypy-11213
python/mypy
python/mypy
python
8e82171a3e68a5180fab267cad4d2b7cfa1f5cdc
Untyped functions content show up in mypy output **Bug Report** For default configuration, violations can be reported in untyped (shouldn't be checked) functions. **To Reproduce** ``` def f(): return UNDEFINED def g(): return lambda x: UNDEFINED in x ``` https://mypy-play.net/?mypy=latest&python=3.10&gist=...
Good question! We don't check unannotated functions without `--check-untyped-defs` option. But, `lambda` is not considered to be unannotated, because it cannot be annotated due to Python syntax limitations. So, `lambda x: UNDEFINED in x` is considered to be typed. That's why it is checked. I also agree with it...
diff --git a/mypy/semanal.py b/mypy/semanal.py --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -4961,9 +4961,26 @@ def in_checked_function(self) -> bool: - Yes in annotated functions. - No otherwise. """ - return (self.options.check_untyped_defs - or not self.function_sta...
diff --git a/mypy/test/testsemanal.py b/mypy/test/testsemanal.py --- a/mypy/test/testsemanal.py +++ b/mypy/test/testsemanal.py @@ -32,7 +32,8 @@ 'semanal-typeddict.test', 'semenal-literal.test', 'semanal-classvar.test', - 'semanal-python2.test'] + ...
["mypy/test/testsemanal.py::SemAnalSuite::testLambdaInheritsCheckedContextFromFuncLambdaStack", "mypy/test/testsemanal.py::SemAnalSuite::testLambdaInheritsCheckedContextFromFunc"]
["mypy/test/testsemanal.py::SemAnalSuite::testLambdaInheritsCheckedContextFromClassLambdaStackForce", "mypy/test/testsemanal.py::SemAnalSuite::testLambdaInheritsCheckedContextFromModuleForce", "mypy/test/testsemanal.py::SemAnalSuite::testLambdaInheritsCheckedContextFromFuncLambdaStackForce", "mypy/test/testcheck.py::Ty...
null
true
2021-09-28T09:50:48Z
1
23
2
592
0
0.85
1
0.85
1
0.175333
90.401
412
swe_gym::train::487
swe_gym
train
487
python__mypy-11857
python/mypy
python/mypy
python
f96446ce2f99a86210b21d39c7aec4b13a8bfc66
reveal_type(x) where x: Tuple[int, ...] doesn't show "..." **Bug Report** Using `reveal_type()` on a variable whose type is a variable-length tuple shows misleading output. While it's different from the output for a fixed-length tuple (which shows `Tuple[builtins.int]`), it doesn't clearly indicate that the type is v...
It looks like mypy uses builtins.tuple as a homogenous tuple type: https://github.com/python/mypy/blob/b884a394b4406b647317668a28538821ca08c056/mypy/typeanal.py#L290 Seems possibly worrisome for transitioning to the PEP 585 world, eg #9459
diff --git a/mypy/types.py b/mypy/types.py --- a/mypy/types.py +++ b/mypy/types.py @@ -1485,7 +1485,7 @@ class TupleType(ProperType): Instance variables: items: Tuple item types partial_fallback: The (imprecise) underlying instance type that is used - for non-tuple methods. This is gen...
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 @@ -87,7 +87,7 @@ from typing import Tuple from typing_extensions import Annotated Alias = Annotated[Tuple[int, ...], ...] x: Alias -reveal_type(x...
["mypy/test/testpep561.py::PEP561Suite::pep561.test::testTypedPkgSimpleEditable", "mypy/test/testcheck.py::TypeCheckSuite::check-generic-alias.test::testTypeAliasWithBuiltinTupleInStub", "mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadVarargsSelectionWithNamedTuples", "mypy/test/testcheck.p...
["mypy/test/testpep561.py::PEP561Suite::pep561.test::testTypedPkgSimplePackageSearchPath", "mypy/test/testpep561.py::PEP561Suite::pep561.test::testTypedPkgNamespaceImportFrom", "mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadVarargsAndKwargsSelection", "mypy/test/testcheck.py::TypeCheckSuit...
null
true
2021-12-28T15:10:19Z
1
8
12
866
0
0.85
1
0.85
1
0.171
90.388
413
swe_gym::train::880
swe_gym
train
880
iterative__dvc-2141
iterative/dvc
iterative/dvc
python
c023b8da570a9b18ff26969d602011ae03ff75bf
metrics show all tags includes master branch I was going through the `compare-experiments.md` and I faced the following expected output: ```bash $ dvc metrics show -T baseline-experiment: auc.metric: 0.588426 bigram-experiment: auc.metric: 0.602818 ``` But mine was: ```bash $ dvc metrics show -T Working Tre...
Looks like a minor bug in `dvc metrics show -T`. `master` should not be included. There is a step that creates `bigram-experiment`. @ricardoserradas, please check the `compare-experiments.md` once again: ``` git commit -a -m "evaluate bigram model" git tag -a "bigram-experiment" -m "bigrams" ``` I would re...
diff --git a/dvc/repo/brancher.py b/dvc/repo/brancher.py --- a/dvc/repo/brancher.py +++ b/dvc/repo/brancher.py @@ -1,3 +1,6 @@ +from dvc.scm.tree import WorkingTree + + def brancher( # noqa: E302 self, branches=None, all_branches=False, tags=None, all_tags=False ): @@ -24,11 +27,8 @@ def brancher( # noqa: E302...
diff --git a/tests/func/test_metrics.py b/tests/func/test_metrics.py --- a/tests/func/test_metrics.py +++ b/tests/func/test_metrics.py @@ -706,6 +706,7 @@ def _test_metrics(self, func): "master": {"metrics.json": ["master"]}, "one": {"metrics.json": ["one"]}, "two": {"...
["tests/func/test_metrics.py::TestCachedMetrics::test_add", "tests/func/test_metrics.py::TestCachedMetrics::test_run"]
["tests/func/test_metrics.py::TestMetricsRecursive::test", "tests/func/test_metrics.py::TestMetrics::test_formatted_output", "tests/func/test_metrics.py::TestMetrics::test_xpath_is_none", "tests/func/test_metrics.py::TestMetricsType::test_show", "tests/func/test_metrics.py::TestNoMetrics::test", "tests/func/test_metric...
null
true
2019-06-17T17:22:11Z
1
14
2
727
0
0.85
1
0.85
1
0.167833
90.3785
414
swe_gym::train::354
swe_gym
train
354
python__mypy-11267
python/mypy
python/mypy
python
3ad69a08206790d378cb392a8a7d806e82287cca
Duplicate fields in Enum must raise an error I have this example: ```python from enum import Enum class A(Enum): x = 1 x = 2 reveal_type(A.x) ``` Mypy is happy with it: ```python » mypy ex.py ex.py:8: note: Revealed type is "Literal[ex.A.x]?" ``` But, it raises in runtime: ```python » python ex.py Tracebac...
I will add a PR after https://github.com/python/mypy/issues/10858
diff --git a/mypy/semanal.py b/mypy/semanal.py --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -2748,6 +2748,13 @@ def analyze_name_lvalue(self, existing = names.get(name) outer = self.is_global_or_nonlocal(name) + if kind == MDEF and isinstance(self.type, TypeInfo) and self.type.is_enum: + ...
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 @@ -1360,3 +1360,34 @@ class E(IntEnum): A = N(0) reveal_type(E.A.value) # N: Revealed type is "__main__.N" + + +[case testEnumReusedKeys] +# https://github.com/...
["mypy/test/testcheck.py::TypeCheckSuite::testEnumReusedKeys"]
["mypy/test/testcheck.py::TypeCheckSuite::testEnumReusedKeysOverlapWithLocalVar"]
null
true
2021-10-04T13:55:40Z
1
7
1
866
0
0.85
1
0.85
1
0.167667
90.378
415
swe_gym::train::90
swe_gym
train
90
getmoto__moto-7168
getmoto/moto
getmoto/moto
python
e5f962193cb12e696bd6ec641844c4d09b5fb87c
Scheduler should raise ResourceNotFoundException for delete_schedule if not exists Calling delete_schedule for unknown schedule name raises KeyError instead of ResourceNotFoundException. ``` File "/Source/SH-service/.venv/lib/python3.8/site-packages/moto/scheduler/responses.py", line 60, in delete_schedule self.s...
Hi @abrahamko, thanks for raising this. Marking it as an enhancement to add validation for this use case.
diff --git a/moto/scheduler/exceptions.py b/moto/scheduler/exceptions.py --- a/moto/scheduler/exceptions.py +++ b/moto/scheduler/exceptions.py @@ -8,8 +8,10 @@ def __init__(self, name: str) -> None: class ScheduleNotFound(JsonRESTError): - def __init__(self) -> None: - super().__init__("ResourceNotFoundE...
diff --git a/tests/test_scheduler/test_scheduler.py b/tests/test_scheduler/test_scheduler.py --- a/tests/test_scheduler/test_scheduler.py +++ b/tests/test_scheduler/test_scheduler.py @@ -175,6 +175,17 @@ def test_get_schedule_for_unknown_group(): assert err["Code"] == "ResourceNotFoundException" +@mock_schedul...
["tests/test_scheduler/test_scheduler.py::test_get_schedule_for_none_existing_schedule", "tests/test_scheduler/test_scheduler.py::test_delete_schedule_for_none_existing_schedule"]
["tests/test_scheduler/test_scheduler.py::test_list_schedules", "tests/test_scheduler/test_scheduler.py::test_create_get_schedule", "tests/test_scheduler/test_scheduler.py::test_create_duplicate_schedule", "tests/test_scheduler/test_scheduler.py::test_create_get_delete__in_different_group", "tests/test_scheduler/test_s...
null
true
2023-12-29 06:22:47
2
10
2
797
0
0.85
1
0.85
1
0.166167
90.3735
416
swe_gym::train::1874
swe_gym
train
1,874
facebookresearch__hydra-1783
facebookresearch/hydra
facebookresearch/hydra
python
e3ba7cce892f8429173f95cb2465de27be7d86cf
[Bug] Incorrect error message when missing default has non-standard package # 🐛 Bug ## Description If the primary config's defaults list has an element of the form `- platform@foo: ???`, the user is required to select an option for `platform@foo`. If no option is selected for `platform@foo`, the resulting error messag...
Seems like a bug, try to fix it?
diff --git a/hydra/_internal/defaults_list.py b/hydra/_internal/defaults_list.py --- a/hydra/_internal/defaults_list.py +++ b/hydra/_internal/defaults_list.py @@ -307,6 +307,7 @@ def _check_not_missing( return True if isinstance(default, GroupDefault): group_path = default.get_group_p...
diff --git a/tests/defaults_list/data/group1/with_missing_at_foo.yaml b/tests/defaults_list/data/group1/with_missing_at_foo.yaml new file mode 100644 --- /dev/null +++ b/tests/defaults_list/data/group1/with_missing_at_foo.yaml @@ -0,0 +1,2 @@ +defaults: + - group2@foo: ??? diff --git a/tests/defaults_list/data/with_mi...
["tests/defaults_list/test_defaults_tree.py::test_with_missing[with_missing_at_foo]", "tests/defaults_list/test_defaults_tree.py::test_with_missing[nested_missing_at_foo]"]
["tests/defaults_list/test_defaults_tree.py::test_deprecated_package_header_keywords[deprecated_headers/group_foo]", "tests/defaults_list/test_defaults_tree.py::test_interpolation[interpolation_with_nested_defaults_list_with_override]", "tests/defaults_list/test_defaults_tree.py::test_simple_defaults_tree_cases[empty]"...
null
true
2021-08-21T05:44:53Z
1
3
2
1,841
0
0.85
1
1
0.8
0.316833
90.3505
417
swe_gym::train::2419
swe_gym
train
2,419
modin-project__modin-6790
modin-project/modin
modin-project/modin
python
2fee14409bfda6661b8fcccbb33f3c93ae17204f
BUG: Unable to read parquet files using fastparquet ### 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. - [x] I have confirmed this bug exists on the main branch of Modin. (In order to do this you...
Hi @seydar, thanks for the contribution! Could you provide data to reproduce the problem? Maybe it will be possible to generate synthetic data on which the problem will be repeated? (if you can't share the dataset) @anmyachev What a fun bug! In trying to make my private data publicly accessible, I got to learn a lit...
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 @@ -285,19 +285,33 @@ def files(self): def to_pandas_dataframe(self, columns): ...
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 @@ -1464,6 +1464,20 @@ def comparator(df1, df2): comparator=comparator, ) + # Tests issue #6778 + def test_read_parquet_no_extension(self, ...
["modin/pandas/test/test_io.py::TestParquet::test_read_parquet_no_extension[fastparquet]"]
["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_file2-None-None-None-pyarrow]", "modin/pandas/test/test_io.py::TestCsv::test_read_csv_parse_dates[None-infer-5-nonexistent_string_column-s...
null
true
2023-11-30T22:13:37Z
1
32
1
7,935
0
0.85
1
0.8
1
0.606667
90.27
418
swe_gym::train::2405
swe_gym
train
2,405
modin-project__modin-7160
modin-project/modin
modin-project/modin
python
d2390100802c808b7ca0f612359b365916d6fec1
BUG: The quantile method throws exceptions in some scenarios ### 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. - [X] I have confirmed this bug exists on the main branch of Modin. (In order to do...
Thanks @DiDeoxy! I can reproduce your errors.
diff --git a/modin/core/storage_formats/pandas/query_compiler.py b/modin/core/storage_formats/pandas/query_compiler.py --- a/modin/core/storage_formats/pandas/query_compiler.py +++ b/modin/core/storage_formats/pandas/query_compiler.py @@ -2588,7 +2588,7 @@ def quantile_for_list_of_values(self, **kwargs): axis ...
diff --git a/modin/tests/pandas/dataframe/test_window.py b/modin/tests/pandas/dataframe/test_window.py --- a/modin/tests/pandas/dataframe/test_window.py +++ b/modin/tests/pandas/dataframe/test_window.py @@ -669,6 +669,32 @@ def test_quantile(request, data, q): modin_df.T.quantile(q) +def test_quantile_...
["modin/tests/pandas/dataframe/test_window.py::test_quantile_7157"]
["modin/tests/pandas/dataframe/test_window.py::test_fillna[5-over_rows_int-backfill-int_data]", "modin/tests/pandas/dataframe/test_window.py::test_cumprod_cummin_cummax_cumsum_transposed[cummax-columns]", "modin/tests/pandas/dataframe/test_window.py::test_fillna[-5-over_rows_int-backfill-int_data]", "modin/tests/pandas...
null
true
2024-04-09T16:28:21Z
2
31
1
10,382
0
0.85
1
0.8
1
0.603333
90.26
419
swe_gym::train::518
swe_gym
train
518
python__mypy-16541
python/mypy
python/mypy
python
242ad2ac4dec105fbed37c177d4cff5944a00f1d
Internal error with an alias type that is a callable with an unpacked tuple as args **Bug Report** Mypy crashes (errors) when using an aliased `Callable` with an unpacked `Tuple` within the arguments part. The definition throws no errors and using the type without the use of an alias is also working fine. mypy versio...
Here's the traceback using uncompiled mypy from the `master` branch, FWIW: ```pytb version: 1.8.0+dev.242ad2ac4dec105fbed37c177d4cff5944a00f1d Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\alexw\coding...
diff --git a/mypy/expandtype.py b/mypy/expandtype.py --- a/mypy/expandtype.py +++ b/mypy/expandtype.py @@ -307,18 +307,24 @@ def interpolate_args_for_unpack(self, t: CallableType, var_arg: UnpackType) -> l suffix = self.expand_types(t.arg_types[star_index + 1 :]) var_arg_type = get_proper_type(var_a...
diff --git a/test-data/unit/check-typevar-tuple.test b/test-data/unit/check-typevar-tuple.test --- a/test-data/unit/check-typevar-tuple.test +++ b/test-data/unit/check-typevar-tuple.test @@ -2235,3 +2235,45 @@ z: Tuple[int, Unpack[Tuple[int, ...]]] = (1,) w: Tuple[int, Unpack[Tuple[int, ...]]] = (1, *[2, 3, 4]) t: Tu...
["mypy/test/testcheck.py::TypeCheckSuite::check-typevar-tuple.test::testAliasToCallableWithUnpack"]
["mypy/test/testcheck.py::TypeCheckSuite::check-typevar-tuple.test::testAliasToCallableWithUnpack2"]
null
true
2023-11-22T15:49:30Z
1
28
1
6,898
0
0.85
1
0.8
1
0.593333
90.23
420
swe_gym::train::1255
swe_gym
train
1,255
pandas-dev__pandas-49169
pandas-dev/pandas
pandas-dev/pandas
python
4d41ccc2431f36a72c1701dd31be7139582baf71
BUG: DataFrame and Series constructor inconsistent in handling of Datetimelike object index - [x] I have checked that this issue has not already been reported. (Looked through and could not find anything) - [x] I have confirmed this bug exists on the latest version of pandas. - [x] (optional) I have confirmed this bu...
IIRC we deprecated the series behavior but then un-deprecated just before 1.2.0 bc it was causing futurewarnings that we hadn’t found a good way to suppress. +1 for re-deprecating #38679 > +1 for re-deprecating I think we accepted that we would defer the deprecation to 1.3 (and fix the warnings issue) We could e...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 8ee2baf0768ec..5e8677e2ae7a6 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -127,6 +127,8 @@ Other API changes - Passing ``dtype`` of "timedelta64[s]", "timedelta64[ms]", or "timedelta64[us]" to :cla...
diff --git a/pandas/tests/series/test_constructors.py b/pandas/tests/series/test_constructors.py index d05eccae922aa..208917ca34b04 100644 --- a/pandas/tests/series/test_constructors.py +++ b/pandas/tests/series/test_constructors.py @@ -1986,7 +1986,9 @@ def test_series_constructor_datetimelike_index_coercion(self): ...
["pandas/tests/series/test_constructors.py::TestSeriesConstructorIndexCoercion::test_series_constructor_datetimelike_index_coercion"]
["pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_constructor_period_incompatible_frequency", "pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_construction_to_datetimelike_unit[ns-m-float64]", "pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_construct...
null
true
2022-10-18T16:52:29Z
4
42
1
4,689
0
0.85
1
0.92
0.85
0.64
90.2275
421
swe_gym::train::208
swe_gym
train
208
getmoto__moto-6785
getmoto/moto
getmoto/moto
python
3545d38595e91a94a38d88661cd314172cb48bef
bug: KeyError: 'Action' when using set_initial_no_auth_action_count Hello, It seems I found an unwanted behavior, as the above code yields a KeyError: 'Action' instead of a more helpful exception. The above code is to reproduce the issue, but in the real codebase I have a set_initial_no_auth_action_count(**4**) to al...
Hi @ajoga, thanks for raising this! Marking it as a bug - I'll create a PR with a fix for this shortly.
diff --git a/moto/core/responses.py b/moto/core/responses.py --- a/moto/core/responses.py +++ b/moto/core/responses.py @@ -149,6 +149,7 @@ def _authenticate_and_authorize_action( method=self.method, # type: ignore[attr-defined] path=path, data=self.data, # type: igno...
diff --git a/tests/test_core/test_auth.py b/tests/test_core/test_auth.py --- a/tests/test_core/test_auth.py +++ b/tests/test_core/test_auth.py @@ -5,7 +5,7 @@ import pytest -from moto import mock_iam, mock_ec2, mock_s3, mock_sts, mock_elbv2, mock_rds +from moto import mock_iam, mock_ec2, mock_s3, mock_sts, mock_ss...
["tests/test_core/test_auth.py::test_ssm_service"]
["tests/test_core/test_auth.py::test_s3_access_denied_with_denying_attached_group_policy", "tests/test_core/test_auth.py::test_allowed_with_wildcard_action", "tests/test_core/test_auth.py::test_access_denied_for_run_instances", "tests/test_core/test_auth.py::test_access_denied_with_no_policy", "tests/test_core/test_aut...
null
true
2023-09-07 20:06:23
2
20
1
7,137
0
0.85
1
0.8
1
0.566667
90.15
422
swe_gym::train::1469
swe_gym
train
1,469
pandas-dev__pandas-57474
pandas-dev/pandas
pandas-dev/pandas
python
63dc0f76faa208450b8aaa57246029fcf94d015b
BUG: "ValueError: ndarray is not C-contiguous" when aggregating concatenated dataframe ### 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 ha...
Thanks for the report. Here is a simpler reproducer showing this isn't caused by `concat`, StringDtype columns, nor the presence of NA values: ``` dtype = "Int64" df = pd.DataFrame( { "col1": pd.Series([1, 2, 3], dtype=dtype), "col2": pd.Series([1, 2, 3], dtype=dtype), }, index=pd....
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index ca4fef4f57fb6..54b0d5f93dfa3 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -32,6 +32,7 @@ Fixed regressions - Fixed regression in :meth:`DataFrame.to_dict` with ``orient='list'`` and datetime or tim...
diff --git a/pandas/tests/frame/methods/test_transpose.py b/pandas/tests/frame/methods/test_transpose.py index 495663ce135f9..f42fd4483e9ac 100644 --- a/pandas/tests/frame/methods/test_transpose.py +++ b/pandas/tests/frame/methods/test_transpose.py @@ -1,6 +1,7 @@ import numpy as np import pytest +import pandas as ...
["pandas/tests/frame/methods/test_transpose.py::TestTranspose::test_transpose[Float64-Float64]", "pandas/tests/frame/methods/test_transpose.py::TestTranspose::test_transpose[Int64-Int64]"]
["pandas/tests/frame/methods/test_transpose.py::TestTranspose::test_transpose_td64_intervals", "pandas/tests/frame/methods/test_transpose.py::TestTranspose::test_transpose_tzaware_2col_mixed_tz", "pandas/tests/frame/methods/test_transpose.py::TestTranspose::test_transpose_preserves_dtindex_equality_with_dst[America/New...
null
true
2024-02-17T20:49:51Z
2
18
2
6,964
0
0.85
1
0.8
1
0.56
90.13
423
swe_gym::train::1458
swe_gym
train
1,458
pandas-dev__pandas-51333
pandas-dev/pandas
pandas-dev/pandas
python
9764f3dbf0173892aba5da4b122851ded43c09bc
ENH: Support "std" aggregation in groupby for groupby datetime column ### 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...
Hi, thanks for your report. We don't have support for date time columns in our groupby var/std algos Ok so if understand corectly it is not a issue and I should just aggregate with DataFrame's std: `gb["dt"].agg(lambda d: d.std())` in case of time variable? It would be more of an enhancement request than a bug imo
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 778169b0dbeb4..aeb9d476a0a87 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -284,6 +284,7 @@ Other enhancements - Added support for ``dt`` accessor methods when using :class:`ArrowDtype` with a ``pya...
diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py index e175f6dda980f..a0b129b65d293 100644 --- a/pandas/tests/groupby/test_groupby.py +++ b/pandas/tests/groupby/test_groupby.py @@ -37,6 +37,33 @@ def test_repr(): assert result == expected +def test_groupby_std_datetimeli...
["pandas/tests/groupby/test_raises.py::test_groupby_raises_datetime[a-False-sem-method]", "pandas/tests/groupby/test_raises.py::test_groupby_raises_datetime[by2-False-sem-transform]", "pandas/tests/groupby/test_raises.py::test_groupby_raises_datetime[a-False-std-agg]", "pandas/tests/groupby/test_raises.py::test_groupby...
["pandas/tests/groupby/test_raises.py::test_groupby_raises_datetime[by7-True-min-transform]", "pandas/tests/groupby/test_groupby.py::test_empty_groupby[False-skew-agg-cat-keys1-columns1]", "pandas/tests/groupby/test_raises.py::test_groupby_raises_string[a-False-rank-method]", "pandas/tests/groupby/test_groupby.py::test...
null
true
2023-02-11T21:08:16Z
4
31
122
3,710
0
0.85
1
0.92
0.85
0.603333
90.1175
424
swe_bench_verified::test::412
swe_bench_verified
test
412
sphinx-doc__sphinx-9229
sphinx-doc/sphinx
sphinx-doc/sphinx
python
876fa81e0a038cda466925b85ccf6c5452e0f685
Inconsistent behaviour with type alias documentation (not overwriting all the default messages, just some) **Describe the bug** Hello, I have 3 muiltiline docstrings for type aliases (using the next-line `"""` documentation syntax). For 1 one them the docstring is correctly shown in the rendered HTML, but for 2 of them...
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -1676,7 +1676,11 @@ def get_object_members(self, want_all: bool) -> Tuple[bool, ObjectMembers]: def get_doc(self, ignore: int = None) -> Optional[List[List[str]]...
diff --git a/tests/roots/test-ext-autodoc/target/classes.py b/tests/roots/test-ext-autodoc/target/classes.py --- a/tests/roots/test-ext-autodoc/target/classes.py +++ b/tests/roots/test-ext-autodoc/target/classes.py @@ -30,3 +30,6 @@ class Quux(List[Union[int, float]]): Alias = Foo + +#: docstring +OtherAlias = Bar...
["tests/test_ext_autodoc_autoclass.py::test_class_alias_having_doccomment"]
["tests/test_ext_autodoc_autoclass.py::test_classes", "tests/test_ext_autodoc_autoclass.py::test_instance_variable", "tests/test_ext_autodoc_autoclass.py::test_inherited_instance_variable", "tests/test_ext_autodoc_autoclass.py::test_uninitialized_attributes", "tests/test_ext_autodoc_autoclass.py::test_undocumented_unin...
null
true
2021-05-15T07:21:49Z
1
17
1
3,730
0
1
1
0.77
1
0.556667
90.115
425
swe_gym::train::2332
swe_gym
train
2,332
modin-project__modin-6267
modin-project/modin
modin-project/modin
python
e987314820f4483ca00a5a2e19fdd88060e4a743
BUG: ValueError: buffer source array is read-only ### 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. - [X] I have confirmed this bug exists on the main branch of Modin. (In order to do this you c...
Blocking upgrade to Modin 0.22.0 in https://github.com/aws/aws-sdk-pandas/pull/2338 @kukushking thank you for reporting this issue; I can reproduce it at commit 60bcab0a98e7b3deba44982afaf1fbd0870bbf58. I'm investigating some more. It turns out that you don't need the index part to reproduce the error: ```python im...
diff --git a/modin/core/dataframe/pandas/dataframe/dataframe.py b/modin/core/dataframe/pandas/dataframe/dataframe.py --- a/modin/core/dataframe/pandas/dataframe/dataframe.py +++ b/modin/core/dataframe/pandas/dataframe/dataframe.py @@ -27,6 +27,7 @@ from pandas._libs.lib import no_default from typing import List, Hash...
diff --git a/modin/pandas/test/dataframe/test_map_metadata.py b/modin/pandas/test/dataframe/test_map_metadata.py --- a/modin/pandas/test/dataframe/test_map_metadata.py +++ b/modin/pandas/test/dataframe/test_map_metadata.py @@ -545,6 +545,23 @@ def test_astype_category_large(): assert modin_result.dtypes.equals(pan...
["modin/pandas/test/dataframe/test_map_metadata.py::test_astype_int64_to_astype_category_github_issue_6259"]
["modin/pandas/test/dataframe/test_map_metadata.py::test_convert_dtypes_single_partition[convert_floating_None-convert_boolean_None-convert_integer_True-convert_string_None-infer_objects_False]", "modin/pandas/test/dataframe/test_map_metadata.py::test_constructor_from_modin_series[str-Equal_idx-No_intersection_idx]", "...
null
true
2023-06-14T00:07:58Z
1
13
1
7,210
0
0.85
1
0.8
1
0.543333
90.08
426
swe_gym::train::1696
swe_gym
train
1,696
pandas-dev__pandas-47848
pandas-dev/pandas
pandas-dev/pandas
python
a62897ae5f5c68360f478bbd5facea231dd55f30
BUG: Styling of a `DataFrame` with boolean column labels leaves out `False` and fails when adding non-numerical column ### 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/in...
Yes this is a bit of a problem. The Styler ``subset`` arg is designed to work similar to `.loc` but doesn't always replicate it as you have discovered. The solution proposed seems simple enough to possibly be included if it works and has no other impact. I wonder if we document if something like: `subset=(slice(N...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 7f07187e34c78..cc44f43ba8acf 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -1042,6 +1042,7 @@ Styler - Bug in :meth:`Styler.set_sticky` leading to white text on white background in dark mode (:issue...
diff --git a/pandas/tests/io/formats/style/test_style.py b/pandas/tests/io/formats/style/test_style.py index 23b05c8242274..192fec048a930 100644 --- a/pandas/tests/io/formats/style/test_style.py +++ b/pandas/tests/io/formats/style/test_style.py @@ -746,6 +746,22 @@ def color_negative_red(val): df.loc[pct_subse...
["pandas/tests/io/formats/style/test_style.py::TestStyler::test_subset_for_boolean_cols[bar]", "pandas/tests/io/formats/style/test_style.py::TestStyler::test_subset_for_boolean_cols[text_gradient]", "pandas/tests/io/formats/style/test_style.py::TestStyler::test_subset_for_boolean_cols[background_gradient]"]
["pandas/tests/io/formats/style/test_style.py::TestStyler::test_column_and_row_styling", "pandas/tests/io/formats/style/test_style.py::test_hide_raises", "pandas/tests/io/formats/style/test_style.py::TestStyler::test_uuid_len[32]", "pandas/tests/io/formats/style/test_style.py::TestStyler::test_uuid_len[1]", "pandas/tes...
null
true
2022-07-25T15:50:08Z
2
13
3
6,214
0
0.85
1
0.8
1
0.543333
90.08
427
swe_gym::train::1579
swe_gym
train
1,579
pandas-dev__pandas-47860
pandas-dev/pandas
pandas-dev/pandas
python
96fe05979c13ef4575faaf65c673016e3432c175
BUG: to_datetime ParserError on incorrect element ### 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 @mousey92 for the report. #16757 and #46509 are similar in that they both relate to the clarity of the error messages but will leave this one open for now. contributions and PRs to fix welcome @simonjayhawkins hey I've tried to debug this issue, this message is coming from dateutil parser, I believe we han...
diff --git a/pandas/_libs/tslib.pyx b/pandas/_libs/tslib.pyx index b3e51191e8efa..fe4078f611f7e 100644 --- a/pandas/_libs/tslib.pyx +++ b/pandas/_libs/tslib.pyx @@ -799,6 +799,7 @@ cdef _array_to_datetime_object( # We return an object array and only attempt to parse: # 1) NaT or NaT-like values # 2) date...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index b128838318ac0..f3824d0bf3ea2 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -2591,6 +2591,13 @@ def test_invalid_origins_tzinfo(self): with pytest.raises(Value...
["pandas/tests/tools/test_to_datetime.py::TestOrigin::test_incorrect_value_exception"]
["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
2022-07-26T09:59:40Z
2
12
1
7,513
0
0.85
1
0.8
1
0.54
90.07
428
swe_gym::train::54
swe_gym
train
54
getmoto__moto-6085
getmoto/moto
getmoto/moto
python
5eef06ee518b424b4980acfd906a2e056f9b3f75
IoT delete_certificate() "forceDelete" param does not work # Summary The `forceDelete` parameter in the iot implementation is not congruent with boto3 behavior. ## Steps to reproduce Run the following python code: ```python import json import boto3 from moto import mock_iot IOT_THING_POLICY_NAME = "ThingCertPolicy" ...
Thanks for raising this @baxterjo - marking it as an enhancement to add this field. Welcome to Moto!
diff --git a/moto/iot/models.py b/moto/iot/models.py --- a/moto/iot/models.py +++ b/moto/iot/models.py @@ -857,12 +857,12 @@ def delete_ca_certificate(self, certificate_id): self._validation_delete(cert) del self.ca_certificates[certificate_id] - def delete_certificate(self, certificate_id): + ...
diff --git a/tests/test_iot/test_iot_certificates.py b/tests/test_iot/test_iot_certificates.py --- a/tests/test_iot/test_iot_certificates.py +++ b/tests/test_iot/test_iot_certificates.py @@ -232,6 +232,31 @@ def test_delete_certificate_validation(): res.should.have.key("certificates").which.should.have.length_of(0...
["tests/test_iot/test_iot_certificates.py::test_delete_certificate_force"]
["tests/test_iot/test_iot_certificates.py::test_delete_certificate_with_status[REVOKED]", "tests/test_iot/test_iot_certificates.py::test_delete_certificate_validation", "tests/test_iot/test_iot_certificates.py::test_register_certificate_without_ca", "tests/test_iot/test_iot_certificates.py::test_certs_create_inactive",...
null
true
2023-03-17 20:39:08
2
11
1
6,741
0
0.85
1
0.8
1
0.536667
90.06
429
swe_bench_verified::test::385
swe_bench_verified
test
385
sphinx-doc__sphinx-10614
sphinx-doc/sphinx
sphinx-doc/sphinx
python
ac2b7599d212af7d04649959ce6926c63c3133fa
inheritance-diagram 404 links with SVG ### Describe the bug I have created some SVG inheritance diagrams using the `sphinx.ext.inheritance_diagram` plugin. If the inheritance diagram is created in a file that is not in the root directory, the links lead to a 404 page. This issue does not happen in the default (png?) m...
diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py --- a/sphinx/ext/inheritance_diagram.py +++ b/sphinx/ext/inheritance_diagram.py @@ -412,13 +412,16 @@ def html_visit_inheritance_diagram(self: HTML5Translator, node: inheritance_diag pending_xrefs = cast(Iterable[addnodes.pending_xr...
diff --git a/tests/roots/test-ext-inheritance_diagram/conf.py b/tests/roots/test-ext-inheritance_diagram/conf.py --- a/tests/roots/test-ext-inheritance_diagram/conf.py +++ b/tests/roots/test-ext-inheritance_diagram/conf.py @@ -3,4 +3,4 @@ sys.path.insert(0, os.path.abspath('.')) -extensions = ['sphinx.ext.inherita...
["tests/test_ext_inheritance_diagram.py::test_inheritance_diagram_svg_html"]
["tests/test_ext_inheritance_diagram.py::test_inheritance_diagram", "tests/test_ext_inheritance_diagram.py::test_inheritance_diagram_png_html", "tests/test_ext_inheritance_diagram.py::test_inheritance_diagram_latex", "tests/test_ext_inheritance_diagram.py::test_inheritance_diagram_latex_alias", "tests/test_ext_inherita...
null
true
2022-06-29T14:29:04Z
1
11
1
3,031
0
1
1
0.77
1
0.536667
90.055
430
swe_gym::train::1445
swe_gym
train
1,445
pandas-dev__pandas-57329
pandas-dev/pandas
pandas-dev/pandas
python
4d0068e330fd8a3f4f4313c6a368775b65e7cb74
BUG: Pandas 2.2: `Index.difference` regression with categoricals ### 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 ...
cc: @mroeschke This may have been caused by https://github.com/pandas-dev/pandas/pull/55108 cc @lukemanley
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index 69e14a9028dd3..335dada439029 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -20,6 +20,7 @@ Fixed regressions - Fixed regression in :func:`wide_to_long` raising an ``AttributeError`` for string column...
diff --git a/pandas/tests/indexes/categorical/test_setops.py b/pandas/tests/indexes/categorical/test_setops.py new file mode 100644 index 0000000000000..2e87b90efd54c --- /dev/null +++ b/pandas/tests/indexes/categorical/test_setops.py @@ -0,0 +1,18 @@ +import numpy as np +import pytest + +from pandas import ( + Cate...
["pandas/tests/indexes/categorical/test_setops.py::test_difference_with_na[None]"]
["pandas/tests/indexes/categorical/test_setops.py::test_difference_with_na[nan]"]
null
true
2024-02-10T01:05:52Z
2
8
1
6,455
0
0.85
1
0.8
1
0.526667
90.03
431
swe_gym::train::1597
swe_gym
train
1,597
pandas-dev__pandas-56647
pandas-dev/pandas
pandas-dev/pandas
python
8872b9e01dfbb2c632b7b404b7d0e4fc2a1d9db6
BUG: `ArrowInvalid` dividing large `int64[pyarrow]` ### 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 the...
> This appears to be a 2.2 regression. Thanks for the report - confirmed on main. I'm also seeing this on 2.1.x, so that would point toward it not being a 2.2 regression. Are you seeing this operation succeed in a previous version of pandas? I'm going through the next release of Effective Pandas with the 2.2rc0 cand...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 5b955aa45219a..2fcab46c9e229 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -727,6 +727,7 @@ Timezones Numeric ^^^^^^^ - Bug in :func:`read_csv` with ``engine="pyarrow"`` causing rounding errors fo...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index 3b03272f18203..1ade1d398a4dd 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -3133,6 +3133,14 @@ def test_arrow_floordiv(): tm.assert_series_equal(result, expected) +de...
["pandas/tests/extension/test_arrow.py::test_arrow_floordiv_large_values"]
["pandas/tests/extension/test_arrow.py::TestArrowArray::test_setitem_mask[False-int32-numpy-array]", "pandas/tests/extension/test_arrow.py::TestArrowArray::test_value_counts_returns_pyarrow_int64[timestamp[ms,", "pandas/tests/extension/test_arrow.py::TestArrowArray::test_argmin_argmax[uint32]", "pandas/tests/extension/...
null
true
2023-12-27T23:47:02Z
2
8
1
10,302
0
0.85
1
0.8
1
0.526667
90.03
432
swe_gym::train::1809
swe_gym
train
1,809
pandas-dev__pandas-47987
pandas-dev/pandas
pandas-dev/pandas
python
7214f857e45965fe7a0cfbba1d2dc35abb0fd7f4
BUG: Can't use iloc assign a list of None to a 1-d subset of a string dataframe. ### 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 con...
Using `pd.NA` gives the desired results ``` import pandas as pd s = pd.Series(["A", "B", "C"], dtype="string") s[[0, 1]] = [pd.NA, pd.NA] print(s) # 0 <NA> # 1 <NA> # 2 C # dtype: string ``` @levibaguley I'm sorry, but the code snippet I posted was incorrect. The bug is for dataframes, not serie...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index bdf811f6a8f6a..8a2a4ea511ec7 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -889,6 +889,8 @@ Indexing - Bug in setting a NA value (``None`` or ``np.nan``) into a :class:`Series` with int-based :class...
diff --git a/pandas/tests/frame/indexing/test_indexing.py b/pandas/tests/frame/indexing/test_indexing.py index 24d7365b52159..34668193ed132 100644 --- a/pandas/tests/frame/indexing/test_indexing.py +++ b/pandas/tests/frame/indexing/test_indexing.py @@ -1340,6 +1340,22 @@ def test_loc_internals_not_updated_correctly(sel...
["pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_iloc_setitem_string_list_na[None]", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_iloc_setitem_string_na[val1]", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_iloc_setitem_string_na[None...
["pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_setting_mismatched_na_into_nullable_fails[Int16-null2]", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_setitem_mixed_datetime", "pandas/tests/frame/indexing/test_indexing.py::TestDepreactedIndexers::test_getitem_dic...
null
true
2022-08-05T22:16:27Z
3
8
6
10,774
0
0.85
1
0.8
1
0.526667
90.03
433
swe_gym::train::1397
swe_gym
train
1,397
pandas-dev__pandas-55115
pandas-dev/pandas
pandas-dev/pandas
python
98f5a787940e02966f2747edbcbd992f0031c277
BUG: usecols in pandas.read_csv has incorrect behavior when using pyarrow engine ### 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 con...
Could you use `io.StringIO` to make your example copy-pastable? take Thanks for the report! PR to fix is most welcome!
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 0760840f9950a..445b93705cde5 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -314,6 +314,7 @@ MultiIndex I/O ^^^ - Bug in :func:`read_csv` where ``on_bad_lines="warn"`` would write to ``stderr`` ins...
diff --git a/pandas/tests/io/parser/test_header.py b/pandas/tests/io/parser/test_header.py index d72174c40478e..d6eab59074dd6 100644 --- a/pandas/tests/io/parser/test_header.py +++ b/pandas/tests/io/parser/test_header.py @@ -684,3 +684,21 @@ def test_header_delim_whitespace(all_parsers): result = parser.read_csv(S...
["pandas/tests/io/parser/test_header.py::test_usecols_no_header_pyarrow[pyarrow]"]
["pandas/tests/io/parser/test_header.py::test_header_multi_index_invalid[pyarrow-kwargs2-cannot", "pandas/tests/io/parser/test_header.py::test_mangles_multi_index[python-A,A,A,B,B\\none,one,one.1,two,two\\n0,40,34,0.1,0.1-expected2]", "pandas/tests/io/parser/test_header.py::test_negative_multi_index_header[pyarrow-head...
null
true
2023-09-13T03:56:26Z
2
7
1
7,165
0
0.85
1
0.8
1
0.523333
90.02
434
swe_gym::train::1508
swe_gym
train
1,508
pandas-dev__pandas-53698
pandas-dev/pandas
pandas-dev/pandas
python
33199e1c372710223700cbdf3454f8d6f971b56a
BUG: `KeyError: '[nan] not in index'` when using `nan` to index ### 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 e...
Interestingly, indexing with `nan` works, if it's the only element. See this example for which I added an extra column 'a' compared to the initial post (to make it easier to follow): ``` >>> df = pd.DataFrame({'a': [1, 2, 3, 4, 5]}, index=pd.Index([np.nan, 100.0, 200.0, 300, 100.0])) >>> >>> df a NaN ...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 4dbaf65c9e7ab..430b92e2e3025 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -422,6 +422,7 @@ Indexing ^^^^^^^^ - Bug in :meth:`DataFrame.__setitem__` losing dtype when setting a :class:`DataFrame` i...
diff --git a/pandas/tests/indexes/base_class/test_indexing.py b/pandas/tests/indexes/base_class/test_indexing.py index 070fec47b90e6..51aa7e26b3911 100644 --- a/pandas/tests/indexes/base_class/test_indexing.py +++ b/pandas/tests/indexes/base_class/test_indexing.py @@ -37,6 +37,24 @@ def test_get_indexer_non_unique_dtyp...
["pandas/tests/indexes/base_class/test_indexing.py::TestGetIndexerNonUnique::test_get_indexer_non_unique_int_index[idx_values0-idx_non_unique0]", "pandas/tests/indexes/base_class/test_indexing.py::TestGetIndexerNonUnique::test_get_indexer_non_unique_int_index[idx_values1-idx_non_unique1]"]
["pandas/tests/indexes/base_class/test_indexing.py::TestGetSliceBounds::test_get_slice_bounds_outside[data0-x-6-right]", "pandas/tests/indexes/base_class/test_indexing.py::test_getitem_boolean_ea_indexer", "pandas/tests/indexes/base_class/test_indexing.py::TestGetLoc::test_get_loc_tuple_monotonic_above_size_cutoff", "p...
null
true
2023-06-16T08:05:08Z
2
7
2
7,838
0
0.85
1
0.8
1
0.523333
90.02
435
swe_gym::train::2313
swe_gym
train
2,313
Project-MONAI__MONAI-6523
Project-MONAI/MONAI
project-monai/monai
python
e084885c6d498ab02df8107d23aa159f742a2cdd
TypeError: unsupported format string passed to MetaTensor.__format__ **Describe the bug** Not sure if the bug lies on this side, or on the side of PyTorch Lightning, but here it goes: I'm using PyTorch Lightning to set up a simple training pipeline. When I use `pl.callbacks.EarlyStopping` with a `CacheDataset` and ass...
maybe it's because 'val_loss' is not a scalar? ```py >>> "{:.2f}".format(torch.tensor([1])) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/anaconda3/envs/py38/lib/python3.8/site-packages/torch/_tensor.py", line 873, in __format__ return object.__format__(self, fo...
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 @@ -590,6 +590,12 @@ def __str__(self): """ return f"meta{str(self.as_tensor())}" + def __format__(self, format_spec): + """ + returns the output of pyt...
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 @@ -433,6 +433,7 @@ def test_str(self): t = MetaTensor([1.0], affine=torch.tensor(1), meta={"fname": "filename"}) self.assertEqual(str(t), "metatensor([1.])") sel...
["tests/test_meta_tensor.py::TestMetaTensor::test_str"]
["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-05-16T15:04:36Z
1
6
1
17,254
0
0.85
1
0.8
1
0.52
90.01
436
swe_bench_verified::test::373
swe_bench_verified
test
373
scikit-learn__scikit-learn-25102
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
f9a1cf072da9d7375d6c2163f68a6038b13b310f
Preserving dtypes for DataFrame output by transformers that do not modify the input values ### Describe the workflow you want to enable It would be nice to optionally preserve the dtypes of the input using pandas output for transformers #72. Dtypes can contain information relevant for later steps of the analyses. E.g....
I mitigating regarding this topic. Indeed, we already preserve the `dtype` if it is supported by the transformer and the type of data is homogeneous: ```python In [10]: import numpy as np ...: from sklearn.datasets import load_iris ...: from sklearn.preprocessing import StandardScaler ...: ....
diff --git a/sklearn/base.py b/sklearn/base.py --- a/sklearn/base.py +++ b/sklearn/base.py @@ -498,6 +498,7 @@ def _validate_data( y="no_validation", reset=True, validate_separately=False, + cast_to_ndarray=True, **check_params, ): """Validate input data and set ...
diff --git a/sklearn/feature_selection/tests/test_base.py b/sklearn/feature_selection/tests/test_base.py --- a/sklearn/feature_selection/tests/test_base.py +++ b/sklearn/feature_selection/tests/test_base.py @@ -6,23 +6,25 @@ from sklearn.base import BaseEstimator from sklearn.feature_selection._base import Selector...
["sklearn/feature_selection/tests/test_base.py::test_output_dataframe", "sklearn/feature_selection/tests/test_feature_select.py::test_dataframe_output_dtypes"]
["sklearn/feature_selection/tests/test_base.py::test_transform_dense", "sklearn/feature_selection/tests/test_base.py::test_transform_sparse", "sklearn/feature_selection/tests/test_base.py::test_inverse_transform_dense", "sklearn/feature_selection/tests/test_base.py::test_inverse_transform_sparse", "sklearn/feature_sele...
null
true
2022-12-02T20:03:37Z
2
29
2
2,465
0
1
1
0.7
1
0.5075
89.9725
437
swe_gym::train::1626
swe_gym
train
1,626
pandas-dev__pandas-50203
pandas-dev/pandas
pandas-dev/pandas
python
08a4e74810ac8264c87e07cbaef9e510a22b41ef
BUG: chaining style.concat overwrites each other ### 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 ma...
`.to_string()` is here to give a minimal example, the issues exists in any styler format, and visible in jupyter notebooks, etc. Also, I would be glad to submit a PR with a fix for this issue
diff --git a/doc/source/whatsnew/v1.5.3.rst b/doc/source/whatsnew/v1.5.3.rst index 808b609700193..36dce687eb91e 100644 --- a/doc/source/whatsnew/v1.5.3.rst +++ b/doc/source/whatsnew/v1.5.3.rst @@ -26,7 +26,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ -- +- Bug when chaining several :meth:`.Styler.concat` calls, only ...
diff --git a/pandas/tests/io/formats/style/test_html.py b/pandas/tests/io/formats/style/test_html.py index 46891863975ea..4ae95645a075d 100644 --- a/pandas/tests/io/formats/style/test_html.py +++ b/pandas/tests/io/formats/style/test_html.py @@ -1,4 +1,7 @@ -from textwrap import dedent +from textwrap import ( + deden...
["pandas/tests/io/formats/style/test_html.py::test_concat_chain", "pandas/tests/io/formats/style/test_to_string.py::test_concat_chain", "pandas/tests/io/formats/style/test_html.py::test_concat_recursion", "pandas/tests/io/formats/style/test_html.py::test_concat_combined", "pandas/tests/io/formats/style/test_to_latex.py...
["pandas/tests/io/formats/style/test_to_latex.py::test_kwargs_combinations[position_float0-column_format1-caption0-position1-label1]", "pandas/tests/io/formats/style/test_to_latex.py::test_empty_clines[None-df1-\\begin{tabular}{llll}\\n", "pandas/tests/io/formats/style/test_html.py::test_rowspan_w3", "pandas/tests/io/f...
null
true
2022-12-12T16:32:55Z
3
85
6
3,268
0
0.85
1
0.77
1
0.783333
89.945
438
swe_bench_verified::test::325
swe_bench_verified
test
325
pylint-dev__pylint-6528
pylint-dev/pylint
pylint-dev/pylint
python
273a8b25620467c1e5686aa8d2a1dbb8c02c78d0
Pylint does not respect ignores in `--recursive=y` mode ### Bug description Pylint does not respect the `--ignore`, `--ignore-paths`, or `--ignore-patterns` setting when running in recursive mode. This contradicts the documentation and seriously compromises the usefulness of recursive mode. ### Configuration _No res...
I suppose that ignored paths needs to be filtered here: https://github.com/PyCQA/pylint/blob/0220a39f6d4dddd1bf8f2f6d83e11db58a093fbe/pylint/lint/pylinter.py#L676
diff --git a/pylint/lint/expand_modules.py b/pylint/lint/expand_modules.py --- a/pylint/lint/expand_modules.py +++ b/pylint/lint/expand_modules.py @@ -46,6 +46,20 @@ def _is_in_ignore_list_re(element: str, ignore_list_re: list[Pattern[str]]) -> b return any(file_pattern.match(element) for file_pattern in ignore_li...
diff --git a/tests/lint/unittest_lint.py b/tests/lint/unittest_lint.py --- a/tests/lint/unittest_lint.py +++ b/tests/lint/unittest_lint.py @@ -864,6 +864,49 @@ def test_by_module_statement_value(initialized_linter: PyLinter) -> None: assert module_stats["statement"] == linter2.stats.statement +@pytest.mark...
["tests/lint/unittest_lint.py::test_recursive_ignore[--ignore-ignored_subdirectory]", "tests/lint/unittest_lint.py::test_recursive_ignore[--ignore-patterns-ignored_*]", "tests/test_self.py::TestRunTC::test_ignore_recursive", "tests/test_self.py::TestRunTC::test_ignore_pattern_recursive"]
["tests/lint/unittest_lint.py::test_no_args", "tests/lint/unittest_lint.py::test_one_arg[case0]", "tests/lint/unittest_lint.py::test_one_arg[case1]", "tests/lint/unittest_lint.py::test_one_arg[case2]", "tests/lint/unittest_lint.py::test_one_arg[case3]", "tests/lint/unittest_lint.py::test_one_arg[case4]", "tests/lint/un...
null
true
2022-05-06T21:03:37Z
2
35
4
2,280
0
1
1
0.7
1
0.496667
89.94
439
swe_gym::train::1744
swe_gym
train
1,744
pandas-dev__pandas-57553
pandas-dev/pandas
pandas-dev/pandas
python
cfe191db8b5e556a5e5995e7aa1305534122f972
BUG: DeprecationWarning shown for internal operations on subclassed Series and DataFrame ### 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 ...
this comes from #52419, so gonna ping @jbrockmendel on this one I suspect this was solved by #53871, which was reverted by #54922. Discussion about these methods in #56681.
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 8fd0cd8c66e3c..1be72c60783ec 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -651,25 +651,36 @@ def _constructor(self) -> type[DataFrame]: return DataFrame def _constructor_from_mgr(self, mgr, axes) -> DataFrame: - if ...
diff --git a/pandas/tests/frame/test_subclass.py b/pandas/tests/frame/test_subclass.py index 316216e69a587..355953eac9d51 100644 --- a/pandas/tests/frame/test_subclass.py +++ b/pandas/tests/frame/test_subclass.py @@ -16,6 +16,17 @@ class TestDataFrameSubclassing: + def test_no_warning_on_mgr(self): + # G...
["pandas/tests/frame/test_subclass.py::TestDataFrameSubclassing::test_no_warning_on_mgr"]
["pandas/tests/frame/test_subclass.py::TestSubclassWithoutConstructor::test_groupby", "pandas/tests/frame/test_subclass.py::TestDataFrameSubclassing::test_corrwith", "pandas/tests/frame/test_subclass.py::TestDataFrameSubclassing::test_idx[idxmin]", "pandas/tests/frame/test_subclass.py::TestDataFrameSubclassing::test_in...
null
true
2024-02-21T20:21:57Z
3
72
1
3,598
0
0.85
1
0.77
1
0.74
89.815
440
swe_bench_verified::test::341
swe_bench_verified
test
341
pytest-dev__pytest-7236
pytest-dev/pytest
pytest-dev/pytest
python
c98bc4cd3d687fe9b392d8eecd905627191d4f06
unittest.TestCase.tearDown executed on skipped tests when running --pdb With this minimal test: ```python import unittest class MyTestCase(unittest.TestCase): def setUp(self): xxx @unittest.skip("hello") def test_one(self): pass def tearDown(self): xxx ``` ``` $ python --versi...
This might a regression from https://github.com/pytest-dev/pytest/pull/7151 , I see it changes pdb, skip and teardown I'd like to work on this. Hi @gdhameeja, Thanks for the offer, but this is a bit trickier because of the unittest-pytest interaction. I plan to tackle this today as it is a regression. 👍 But aga...
diff --git a/src/_pytest/unittest.py b/src/_pytest/unittest.py --- a/src/_pytest/unittest.py +++ b/src/_pytest/unittest.py @@ -41,7 +41,7 @@ def collect(self): if not getattr(cls, "__test__", True): return - skipped = getattr(cls, "__unittest_skip__", False) + skipped = _is_skipped...
diff --git a/testing/test_unittest.py b/testing/test_unittest.py --- a/testing/test_unittest.py +++ b/testing/test_unittest.py @@ -1193,6 +1193,40 @@ def test_2(self): ] +@pytest.mark.parametrize("mark", ["@unittest.skip", "@pytest.mark.skip"]) +def test_pdb_teardown_skipped(testdir, monkeypatch, mark): + "...
["testing/test_unittest.py::test_pdb_teardown_skipped[@unittest.skip]"]
["testing/test_unittest.py::test_simple_unittest", "testing/test_unittest.py::test_runTest_method", "testing/test_unittest.py::test_isclasscheck_issue53", "testing/test_unittest.py::test_setup", "testing/test_unittest.py::test_setUpModule", "testing/test_unittest.py::test_setUpModule_failing_no_teardown", "testing/test...
null
true
2020-05-21T19:53:14Z
1
11
1
2,476
0
1
1
0.7
1
0.449333
89.798
441
swe_bench_verified::test::163
swe_bench_verified
test
163
django__django-14631
django/django
django/django
python
84400d2e9db7c51fee4e9bb04c028f665b8e7624
BaseForm's _clean_fields() and changed_data should access values via BoundField Description (last modified by Chris Jerdonek) While working on #32917, I noticed that ​BaseForm._clean_fields() and ​BaseForm.changed_data don't currently access their values through a BoundField object. It would be better for consisten...
Here is how to make the failing test I mentioned above (roughly): def test_datetime_clean_initial_callable_disabled(self): - now = datetime.datetime(2006, 10, 25, 14, 30, 45, 123456) - class DateTimeForm(forms.Form): - dt = DateTimeField(initial=lambda: now, disabled=True) + dt = DateTimeField(initial=datetime.datetime...
diff --git a/django/forms/boundfield.py b/django/forms/boundfield.py --- a/django/forms/boundfield.py +++ b/django/forms/boundfield.py @@ -1,6 +1,7 @@ import datetime import re +from django.core.exceptions import ValidationError from django.forms.utils import flatatt, pretty_name from django.forms.widgets import ...
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py --- a/tests/forms_tests/tests/test_forms.py +++ b/tests/forms_tests/tests/test_forms.py @@ -2112,15 +2112,47 @@ class DateTimeForm(Form): self.assertEqual(unbound['hi_without_microsec'].value(), now_no_ms) self....
["The cleaned value for a form with a disabled DateTimeField and callable", "Cleaning a form with a disabled DateTimeField and callable initial"]
["test_attribute_class (forms_tests.tests.test_forms.RendererTests)", "test_attribute_instance (forms_tests.tests.test_forms.RendererTests)", "test_attribute_override (forms_tests.tests.test_forms.RendererTests)", "test_default (forms_tests.tests.test_forms.RendererTests)", "test_kwarg_class (forms_tests.tests.test_for...
null
true
2021-07-13T09:16:48Z
2
65
2
1,394
0
1
1
0.7
1
0.449
89.797
442
swe_gym::train::2286
swe_gym
train
2,286
Project-MONAI__MONAI-4847
Project-MONAI/MONAI
project-monai/monai
python
ac3d4f97eb6bd22f360054f9d5475557360fe463
ShuffleBuffer can not iterate twice **Describe the bug** `ShuffleBuffer` overwrites `self.data` on the first iteration and can not be iterated twice. [`data` is originally set to the source data](https://github.com/Project-MONAI/MONAI/blob/e3b47fe62c5a63dd9f479499fe971211a70811ec/monai/data/iterable_dataset.py#L78), b...
diff --git a/monai/data/iterable_dataset.py b/monai/data/iterable_dataset.py --- a/monai/data/iterable_dataset.py +++ b/monai/data/iterable_dataset.py @@ -72,6 +72,25 @@ class ShuffleBuffer(Randomizable, IterableDataset): every iter() call, refer to the PyTorch idea: https://github.com/pytorch...
diff --git a/tests/test_shuffle_buffer.py b/tests/test_shuffle_buffer.py --- a/tests/test_shuffle_buffer.py +++ b/tests/test_shuffle_buffer.py @@ -16,18 +16,26 @@ from monai.data import DataLoader, ShuffleBuffer from monai.utils import convert_data_type +from tests.utils import SkipIfBeforePyTorchVersion +@Skip...
["tests/test_shuffle_buffer.py::TestShuffleBuffer::test_shape"]
[]
null
true
2022-08-06T12:21:28Z
1
64
1
2,485
0
0.85
1
0.85
1
0.6275
89.7575
443
swe_gym::train::1879
swe_gym
train
1,879
facebookresearch__hydra-1905
facebookresearch/hydra
facebookresearch/hydra
python
555899cd7c73692b67f537af4b66eb55f92e8576
[Feature Request] Partial instantiate/call First off, thanks for the wonderful library!! # 🚀 Feature Request I would like to be able to partially instantiate/call a class/function. For example: ```yaml # config.yaml loss_fn: _target_: main.cross_entropy_loss _partial_: True label_smooth_amount: 0.1 ``` ```py...
Can you explain what problem you are trying to solve in more details? Sure, below is an example similar to what I am facing in my current project. Consider this simple CNN class: ```python # main.py from torch import nn from typing import Sequence class CNN(nn.Module): def __init__(self, ...
diff --git a/examples/instantiate/partial/my_app.py b/examples/instantiate/partial/my_app.py new file mode 100644 --- /dev/null +++ b/examples/instantiate/partial/my_app.py @@ -0,0 +1,38 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved +from typing import Any + +from omegaconf import DictConfi...
diff --git a/tests/instantiate/__init__.py b/tests/instantiate/__init__.py --- a/tests/instantiate/__init__.py +++ b/tests/instantiate/__init__.py @@ -2,13 +2,51 @@ import collections import collections.abc from dataclasses import dataclass +from functools import partial from typing import Any, Dict, List, Optional...
["tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict_config-class_method+partial-not_recursive]", "tests/instantiate/test_instantiate.py::test_recursive_instantiation[instantiate2-dict-recursive:direct:dataclass:passthrough1]", "tests/instantiate/test_instantiate.py::test_class_instantiate[...
["tests/instantiate/test_instantiate.py::test_override_target[instantiate2-dict-type:override_same_args]", "tests/instantiate/test_instantiate.py::test_convert_params_override[instantiate2-interpolation-all]", "tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict-class_method_on_an_object_nes...
null
true
2021-11-30T00:51:23Z
2
63
101
3,120
0
0.85
1
0.77
1
0.71
89.725
444
swe_gym::train::2318
swe_gym
train
2,318
Project-MONAI__MONAI-4282
Project-MONAI/MONAI
project-monai/monai
python
f4ff8e2a07b5af29a62ef6ed14b92bd6806adc61
Inconsistency networks.layer.AffineTransform and transforms.Affine Hello, **Describe the bug** Applying the same affine transformation using networks.layer.AffineTransform and transforms.Affine seems to lead to different result. The layer seems to introduce an unwanted shear. **To Reproduce** Steps to reproduce the b...
This is a good question, in your example the affine of `monai.networks.layers.AffineTransform` is interpreted as applying it to the normalized coordinates (in the range of [-1, 1]) while `monai.transforms.Affine`'s affine is interpreted as to the `create_grid` coordinates ([-d/2, d/2] where d is the length of the dimen...
diff --git a/monai/networks/layers/spatial_transforms.py b/monai/networks/layers/spatial_transforms.py --- a/monai/networks/layers/spatial_transforms.py +++ b/monai/networks/layers/spatial_transforms.py @@ -420,6 +420,7 @@ def __init__( padding_mode: Union[GridSamplePadMode, str] = GridSamplePadMode.ZEROS, ...
diff --git a/tests/test_affine_transform.py b/tests/test_affine_transform.py --- a/tests/test_affine_transform.py +++ b/tests/test_affine_transform.py @@ -23,12 +23,14 @@ TEST_NORM_CASES = [ [(4, 5), True, [[[0.666667, 0, -1], [0, 0.5, -1], [0, 0, 1]]]], + [(4, 5), True, [[[0.666667, 0, 0], [0, 0.5, 0], [0, ...
["tests/test_affine_transform.py::TestToNormAffine::test_to_norm_affine_2", "tests/test_affine_transform.py::TestNormTransform::test_norm_xform_3", "tests/test_affine_transform.py::TestToNormAffine::test_to_norm_affine_1", "tests/test_affine_transform.py::TestNormTransform::test_norm_xform_2", "tests/test_affine_transf...
["tests/test_affine_transform.py::TestAffineTransform::test_affine_shift", "tests/test_affine_transform.py::TestAffineTransform::test_ill_affine_transform", "tests/test_affine_transform.py::TestToNormAffine::test_to_norm_affine_ill_2", "tests/test_affine_transform.py::TestAffineTransform::test_affine_shift_1", "tests/t...
null
true
2022-05-17T09:04:03Z
3
62
12
5,756
0
0.85
1
0.77
1
0.706667
89.715
445
swe_gym::train::289
swe_gym
train
289
getmoto__moto-6255
getmoto/moto
getmoto/moto
python
65611082be073018a898ae795a0a7458cf2ac9f2
Publishing to a FIFO SNS topic with MessageDeduplicationId fails As of moto 4.1.7 I get an exception when publishing to a FIFO topic when content-based deduplication is disabled. Here's a snippet to demonstrate the problem: ```python @mock_sns @mock_sqs def test(): sns = boto3.resource("sns", region_name="eu-north...
diff --git a/moto/sns/models.py b/moto/sns/models.py --- a/moto/sns/models.py +++ b/moto/sns/models.py @@ -58,7 +58,14 @@ def __init__(self, name, sns_backend): self.fifo_topic = "false" self.content_based_deduplication = "false" - def publish(self, message, subject=None, message_attributes=None,...
diff --git a/tests/test_sns/test_publish_batch.py b/tests/test_sns/test_publish_batch.py --- a/tests/test_sns/test_publish_batch.py +++ b/tests/test_sns/test_publish_batch.py @@ -100,7 +100,7 @@ def test_publish_batch_standard_with_message_group_id(): { "Id": "id_2", "Code": "InvalidP...
["tests/test_sns/test_publishing_boto3.py::test_publish_deduplication_id_to_non_fifo", "tests/test_sns/test_publishing_boto3.py::test_publish_fifo_needs_deduplication_id", "tests/test_sns/test_publish_batch.py::test_publish_batch_standard_with_message_group_id", "tests/test_sns/test_publishing_boto3.py::test_publish_gr...
["tests/test_sns/test_publish_batch.py::test_publish_batch_non_unique_ids", "tests/test_sns/test_publish_batch.py::test_publish_batch_unknown_topic", "tests/test_sns/test_publish_batch.py::test_publish_batch_too_many_items", "tests/test_sns/test_publishing_boto3.py::test_publish_sms", "tests/test_sns/test_publishing_bo...
null
true
2023-04-25 13:07:57
2
51
4
2,650
0
0.85
1
0.85
1
0.611667
89.71
446
swe_bench_verified::test::67
swe_bench_verified
test
67
django__django-11964
django/django
django/django
python
fc2b1cc926e34041953738e58fa6ad3053059b22
The value of a TextChoices/IntegerChoices field has a differing type Description If we create an instance of a model having a CharField or IntegerField with the keyword choices pointing to IntegerChoices or TextChoices, the value returned by the getter of the field will be of the same type as the one created by enum.E...
Hi NyanKiyoshi, what a lovely report. Thank you. Clearly :) the expected behaviour is that test_created_object_is_str should pass. It's interesting that the underlying __dict__ values differ, which explains all I guess: Created: {'_state': <django.db.models.base.ModelState object at 0x10730efd0>, 'id': 1, 'my_str_value...
diff --git a/django/db/models/enums.py b/django/db/models/enums.py --- a/django/db/models/enums.py +++ b/django/db/models/enums.py @@ -60,7 +60,13 @@ def values(cls): class Choices(enum.Enum, metaclass=ChoicesMeta): """Class for creating enumerated choices.""" - pass + + def __str__(self): + """ + ...
diff --git a/tests/model_enums/tests.py b/tests/model_enums/tests.py --- a/tests/model_enums/tests.py +++ b/tests/model_enums/tests.py @@ -143,6 +143,12 @@ class Fruit(models.IntegerChoices): APPLE = 1, 'Apple' PINEAPPLE = 1, 'Pineapple' + def test_str(self): + for test in ...
["test_str (model_enums.tests.ChoicesTests)", "test_textchoices (model_enums.tests.ChoicesTests)"]
["test_integerchoices (model_enums.tests.ChoicesTests)", "test_integerchoices_auto_label (model_enums.tests.ChoicesTests)", "test_integerchoices_containment (model_enums.tests.ChoicesTests)", "test_integerchoices_empty_label (model_enums.tests.ChoicesTests)", "test_integerchoices_functional_api (model_enums.tests.Choic...
null
true
2019-10-23T14:16:45Z
1
8
2
2,351
0
1
1
0.7
1
0.4185
89.7055
447
swe_gym::train::423
swe_gym
train
423
python__mypy-15006
python/mypy
python/mypy
python
bf82b76a2ab2bfb29cab432d25b516e4907ac27e
mypy has implemented pep-681 incorrectly and does not intepret descriptors correctly Hi - Now that mypy has pep-681 support, they are making a mistake that we spent a lot of time with the pyright people working out. This SQLAlchemy mapping and usage is valid: ```py from __future__ import annotations from sqlalchemy...
I've updated the description to include a typing-only example, illustrating how this spec is meant to work per the authors of pep-681 it looks like mypy has this issue already at #13856. why was mypy 1.1.1 released with this feature knowing it was broken? Is there a way I can tell my users to disable mypy's pep-681 ...
diff --git a/mypy/plugins/dataclasses.py b/mypy/plugins/dataclasses.py --- a/mypy/plugins/dataclasses.py +++ b/mypy/plugins/dataclasses.py @@ -6,7 +6,7 @@ from typing_extensions import Final from mypy import errorcodes, message_registry -from mypy.expandtype import expand_type +from mypy.expandtype import expand_ty...
diff --git a/test-data/unit/check-dataclass-transform.test b/test-data/unit/check-dataclass-transform.test --- a/test-data/unit/check-dataclass-transform.test +++ b/test-data/unit/check-dataclass-transform.test @@ -807,3 +807,217 @@ reveal_type(bar.base) # N: Revealed type is "builtins.int" [typing fixtures/typing-...
["mypy/test/testcheck.py::TypeCheckSuite::check-dataclass-transform.test::testDataclassTransformGenericDescriptor", "mypy/test/testcheck.py::TypeCheckSuite::check-dataclass-transform.test::testDataclassTransformUnsupportedDescriptors", "mypy/test/testcheck.py::TypeCheckSuite::check-dataclass-transform.test::testDatacla...
[]
null
true
2023-04-04T12:42:40Z
1
61
6
4,188
0
0.85
1
0.77
1
0.703333
89.705
448
swe_gym::train::814
swe_gym
train
814
iterative__dvc-6983
iterative/dvc
iterative/dvc
python
e0fd0790fc77b19694aabef3c94b52e7cd0135f1
exp push: fails # Bug Report ## Description `dvc exp push` is failing. ### Reproduce 1. Fork https://github.com/iterative/example-dvc-experiments and clone the fork. 2. Run experiments. 3. Try to push experiments. Output: ``` $ dvc exp push origin exp-b270f 2021-11-02 20:08:40,190 DEBUG: git push experiment 'refs/...
I tried a self push and it succeeded. ``` dvc exp push . exp-96581 Pushed experiment 'exp-96581'to Git remote '.'. ``` But can not push to the origin, maybe because of permission? and the strange thing is that my error is different from yours. ``` 2021-11-04 15:15:00,563 ERROR: unexpected error - Connection l...
diff --git a/dvc/scm/git/backend/dulwich/asyncssh_vendor.py b/dvc/scm/git/backend/dulwich/asyncssh_vendor.py --- a/dvc/scm/git/backend/dulwich/asyncssh_vendor.py +++ b/dvc/scm/git/backend/dulwich/asyncssh_vendor.py @@ -41,11 +41,56 @@ async def _read(self, n: Optional[int] = None) -> bytes: read = sync_wrapper(_...
diff --git a/tests/unit/scm/test_git.py b/tests/unit/scm/test_git.py --- a/tests/unit/scm/test_git.py +++ b/tests/unit/scm/test_git.py @@ -594,3 +594,29 @@ def test_pygit_checkout_subdir(tmp_dir, scm, git): with (tmp_dir / "dir").chdir(): git.checkout(rev) assert not (tmp_dir / "dir" / "bar").exi...
["tests/unit/scm/test_git.py::test_dulwich_github_compat[rsa-sha2-512]", "tests/unit/scm/test_git.py::test_dulwich_github_compat[rsa-sha2-256]", "tests/unit/scm/test_git.py::test_dulwich_github_compat[ssh-rsa]"]
["tests/unit/scm/test_git.py::test_remove_ref[gitpython]", "tests/unit/scm/test_git.py::test_checkout_index[pygit2]", "tests/unit/scm/test_git.py::test_set_ref_with_message[gitpython]", "tests/unit/scm/test_git.py::test_add[gitpython]", "tests/unit/scm/test_git.py::test_is_tracked", "tests/unit/scm/test_git.py::test_ch...
null
true
2021-11-15T11:03:16Z
1
60
3
4,420
0
0.85
1
0.77
1
0.7
89.695
449
swe_bench_verified::test::439
swe_bench_verified
test
439
sympy__sympy-13852
sympy/sympy
sympy/sympy
python
c935e1d106743efd5bf0705fbeedbd18fadff4dc
Add evaluation for polylog ``` In [1]: polylog(2, Rational(1,2)) Out[1]: polylog(2, 1/2) In [2]: polylog(2, Rational(1,2)).expand(func=True) Out[2]: polylog(2, 1/2) The answer should be -log(2)**2/2 + pi**2/12 In [11]: print(nsimplify(expand_func(polylog(2, Rational(1,2))).evalf(), [pi**2, log(2)**2])) -log(2)**2/2 ...
``` **Cc:** raou...@gmail.com ``` Original comment: http://code.google.com/p/sympy/issues/detail?id=4033#c1 Original author: https://code.google.com/u/asmeurer@gmail.com/
diff --git a/sympy/functions/special/zeta_functions.py b/sympy/functions/special/zeta_functions.py --- a/sympy/functions/special/zeta_functions.py +++ b/sympy/functions/special/zeta_functions.py @@ -1,12 +1,12 @@ """ Riemann zeta and related function. """ from __future__ import print_function, division -from sympy....
diff --git a/sympy/functions/special/tests/test_zeta_functions.py b/sympy/functions/special/tests/test_zeta_functions.py --- a/sympy/functions/special/tests/test_zeta_functions.py +++ b/sympy/functions/special/tests/test_zeta_functions.py @@ -1,6 +1,6 @@ from sympy import (Symbol, zeta, nan, Rational, Float, pi, diric...
["test_polylog_values"]
["test_zeta_eval", "test_dirichlet_eta_eval", "test_stieltjes", "test_stieltjes_evalf"]
null
true
2018-01-06T23:54:51Z
1
30
1
1,865
0
1
1
0.7
1
0.410833
89.6825
450
swe_gym::train::1248
swe_gym
train
1,248
pandas-dev__pandas-55580
pandas-dev/pandas
pandas-dev/pandas
python
00f10db680c6cf836fad80dda33849081e540230
BUG: `merge_asof` gives incorrect results when `by` consists of multiple categorical columns with equal, but differently ordered, categories Observing that `merge_asof` gives unexpected output when: - `by` includes more than one column, one of which is categorical - categorical columns included in `by` have equal categ...
Somehow related to https://github.com/pandas-dev/pandas/issues/26249 However, reading that issue it seems to me like `merge_asof` should already raise an exception if called on unordered categories for a merge key, which is not happening.
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index c8c27f2f2e178..f21cbdfa0c3a4 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -277,6 +277,7 @@ Other Deprecations Performance improvements ~~~~~~~~~~~~~~~~~~~~~~~~ - Performance improvement in :func:...
diff --git a/pandas/tests/reshape/merge/test_merge_asof.py b/pandas/tests/reshape/merge/test_merge_asof.py index d4cb89dadde9b..8ada42898f947 100644 --- a/pandas/tests/reshape/merge/test_merge_asof.py +++ b/pandas/tests/reshape/merge/test_merge_asof.py @@ -353,7 +353,8 @@ def test_multiby(self): result = merge...
["pandas/tests/reshape/merge/test_merge_asof.py::test_merge_asof_multiby_with_categorical"]
["pandas/tests/reshape/merge/test_merge_asof.py::TestAsOfMerge::test_by_nullable[UInt64]", "pandas/tests/reshape/merge/test_merge_asof.py::TestAsOfMerge::test_basic_right_index", "pandas/tests/reshape/merge/test_merge_asof.py::test_merge_asof_array_as_on", "pandas/tests/reshape/merge/test_merge_asof.py::TestAsOfMerge::...
null
true
2023-10-18T21:15:57Z
2
58
1
3,603
0
0.85
1
0.77
1
0.693333
89.675
451
swe_bench_verified::test::130
swe_bench_verified
test
130
django__django-13810
django/django
django/django
python
429d089d0a8fbd400e0c010708df4f0d16218970
MiddlewareNotUsed leaves undesired side effects when loading middleware in ASGI context Description I experienced strange issues when working with ​ASGI , ​django-debug-toolbar and my own small middleware. It was hard problem to debug, I uploaded an example project here: ​https://github.com/hbielenia/asgi-djangotoolba...
Many thanks for the detailed report.
diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py --- a/django/core/handlers/base.py +++ b/django/core/handlers/base.py @@ -51,11 +51,11 @@ def load_middleware(self, is_async=False): middleware_is_async = middleware_can_async try: # Adapt handler, if...
diff --git a/tests/middleware_exceptions/tests.py b/tests/middleware_exceptions/tests.py --- a/tests/middleware_exceptions/tests.py +++ b/tests/middleware_exceptions/tests.py @@ -181,6 +181,25 @@ def test_do_not_log_when_debug_is_false(self): with self.assertLogs('django.request', 'DEBUG'): ...
["test_async_and_sync_middleware_chain_async_call (middleware_exceptions.tests.MiddlewareNotUsedTests)"]
["test_missing_root_urlconf (middleware_exceptions.tests.RootUrlconfTests)", "test_do_not_log_when_debug_is_false (middleware_exceptions.tests.MiddlewareNotUsedTests)", "test_log (middleware_exceptions.tests.MiddlewareNotUsedTests)", "test_log_custom_message (middleware_exceptions.tests.MiddlewareNotUsedTests)", "test_...
null
true
2020-12-26T12:31:18Z
1
6
1
2,257
0
1
1
0.7
1
0.396167
89.6385
452
swe_gym::train::482
swe_gym
train
482
python__mypy-16856
python/mypy
python/mypy
python
ba90dc48fef38e48f0615f1f742a767fcde70fa9
false positive on interaction between `@property`, `@lru_cache`, and inheritance **Bug Report** My thanks to @hauntsaninja for their excellent work on #5858! However, I suspect there's a related issue with the combination of `@lru_cache` and `@property` where inheritance is at play: **To Reproduce** Gists: [mypy-pla...
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -2022,22 +2022,29 @@ def check_method_override_for_base_with_name( if original_node and is_property(original_node): original_type = get_property_type(original_type) - if isins...
diff --git a/test-data/unit/check-functions.test b/test-data/unit/check-functions.test --- a/test-data/unit/check-functions.test +++ b/test-data/unit/check-functions.test @@ -2730,6 +2730,49 @@ f: Callable[[Sequence[TI]], None] g: Callable[[Union[Sequence[TI], Sequence[TS]]], None] f = g +[case testOverrideDecorate...
["mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testOverrideDecoratedProperty"]
["mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::requireExplicitOverrideMultipleInheritance", "mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::explicitOverrideClassmethod", "mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::explicitOverrideStaticmethod", "mypy/test/testcheck.py:...
null
true
2024-02-02T05:28:51Z
1
39
1
2,745
0
0.85
1
0.85
1
0.5875
89.6375
453
swe_gym::train::1386
swe_gym
train
1,386
pandas-dev__pandas-49877
pandas-dev/pandas
pandas-dev/pandas
python
14dc069f09634054d2db95681fab96f5b9b30f18
BUG: `combine_first()` coerces to `object` for `MultiIndex` and all-nan index 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. - [x] I hav...
Hi thanks for your report. This comes from MultiIndex.join
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 42170aaa09978..973c51307ed9c 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -705,6 +705,7 @@ MultiIndex - Bug in :meth:`MultiIndex.union` not sorting when sort=None and index contains missing values ...
diff --git a/pandas/tests/frame/methods/test_combine_first.py b/pandas/tests/frame/methods/test_combine_first.py index e838c8fabf456..ad6122501bc19 100644 --- a/pandas/tests/frame/methods/test_combine_first.py +++ b/pandas/tests/frame/methods/test_combine_first.py @@ -543,3 +543,17 @@ def test_combine_first_int64_not_c...
["pandas/tests/indexes/multi/test_join.py::test_join_dtypes_all_nan[Int16]", "pandas/tests/indexes/multi/test_join.py::test_join_dtypes[Float32-0]", "pandas/tests/indexes/multi/test_join.py::test_join_dtypes[UInt64-0]", "pandas/tests/indexes/multi/test_join.py::test_join_dtypes[Int16-0]", "pandas/tests/indexes/multi/te...
["pandas/tests/frame/methods/test_combine_first.py::TestDataFrameCombineFirst::test_combine_first_same_as_in_update", "pandas/tests/frame/methods/test_combine_first.py::test_combine_first_timestamp_bug[NaTType-scalar11-scalar21]", "pandas/tests/frame/methods/test_combine_first.py::test_combine_first_timestamp_bug[NoneT...
null
true
2022-11-23T23:12:29Z
3
53
31
4,040
0
0.85
1
0.77
1
0.676667
89.625
454
swe_gym::train::752
swe_gym
train
752
iterative__dvc-10213
iterative/dvc
iterative/dvc
python
987b1c421346a9e1faf518a9cf64f0d16c86ac53
pull: "No file hash info found" and checkout fails when pulling frozen imported url that is a directory that has subsequently changed # Bug Report ## Description I have used `dvc import-url` to track a GCS directory that is updated daily with incremental new data. [The documentation](https://dvc.org/doc/user-guide/d...
Thanks for the report @ahasha. I can confirm at least the part about push not doing anything, and I can reproduce even on a local remote with this script: ```sh set -eux IMPORT=$(mktemp -d) REPO=$(mktemp -d) REMOTE=$(mktemp -d) echo foo > $IMPORT/foo tree $IMPORT cd $REPO git init -q dvc init -q dvc remote...
diff --git a/dvc/repo/index.py b/dvc/repo/index.py --- a/dvc/repo/index.py +++ b/dvc/repo/index.py @@ -174,6 +174,30 @@ def _load_data_from_outs(index, prefix, outs): ) +def _load_storage_from_import(storage_map, key, out): + from fsspec.utils import tokenize + + from dvc_data.index import FileStorag...
diff --git a/tests/func/test_repo_index.py b/tests/func/test_repo_index.py --- a/tests/func/test_repo_index.py +++ b/tests/func/test_repo_index.py @@ -360,26 +360,47 @@ def test_data_index(tmp_dir, dvc, local_cloud, erepo_dir): dvc.imp(os.fspath(erepo_dir), "efoo") dvc.imp(os.fspath(erepo_dir), "edir") + ...
["tests/func/test_repo_index.py::test_data_index"]
["tests/func/test_repo_index.py::test_deps_outs_getters", "tests/func/test_repo_index.py::test_view_granular_dir", "tests/func/test_repo_index.py::test_view_combined_filter", "tests/func/test_repo_index.py::test_update", "tests/func/test_repo_index.py::test_with_gitignore", "tests/func/test_repo_index.py::test_param_ke...
null
true
2024-01-02T07:46:15Z
1
51
1
5,397
0
0.85
1
0.77
1
0.67
89.605
455
swe_gym::train::2371
swe_gym
train
2,371
modin-project__modin-6486
modin-project/modin
modin-project/modin
python
3b3bba9a83b6bec35e86826800004987afe24d47
BUG: np.sin(modin_series) returns numpy array instead of modin.pandas series ### 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. - [X] I have confirmed this bug exists on the main branch of Modin....
This blocks #4580 because some of the query tests use np.arctan2 and np.sin through query.
diff --git a/modin/pandas/base.py b/modin/pandas/base.py --- a/modin/pandas/base.py +++ b/modin/pandas/base.py @@ -52,7 +52,7 @@ ) import pickle as pkl import re -from typing import Optional, Union, Sequence, Hashable +from typing import Optional, Union, Sequence, Hashable, Any import warnings @@ -3903,3 +3903,...
diff --git a/modin/pandas/test/test_series.py b/modin/pandas/test/test_series.py --- a/modin/pandas/test/test_series.py +++ b/modin/pandas/test/test_series.py @@ -4815,3 +4815,21 @@ def test_apply_return_df(data): lambda x: pandas.Series([x + i for i in range(100)]) ), ) + + +@pytest.mark.par...
["modin/pandas/test/test_series.py::test_unary_numpy_universal_function_issue_6483[sin]", "modin/pandas/test/test_series.py::test_binary_numpy_universal_function_issue_6483", "modin/pandas/test/test_series.py::test_unary_numpy_universal_function_issue_6483[absolute]"]
["modin/pandas/test/test_series.py::test_str_find[-5-1-comma", "modin/pandas/test/test_series.py::test_cat_as_ordered[ordered]", "modin/pandas/test/test_series.py::test_str_find[1--5-empty", "modin/pandas/test/test_series.py::test_str_index[-1--1-None", "modin/pandas/test/test_series.py::test_drop_duplicates[False-last...
null
true
2023-08-17T22:06:17Z
1
51
3
3,140
0
0.85
1
0.77
1
0.67
89.605
456
swe_gym::train::1699
swe_gym
train
1,699
pandas-dev__pandas-49140
pandas-dev/pandas
pandas-dev/pandas
python
8608ac919fbad7fb656d6b9bc5ddf7f09ae7a430
BUG: The behavior of DataFrame.corrwith against `Series` is changed? ### 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 ...
diff --git a/doc/source/whatsnew/v1.5.1.rst b/doc/source/whatsnew/v1.5.1.rst index 4518c6f544e48..d3a804ff9f400 100644 --- a/doc/source/whatsnew/v1.5.1.rst +++ b/doc/source/whatsnew/v1.5.1.rst @@ -88,6 +88,7 @@ Fixed regressions - Fixed regression in :meth:`Series.groupby` and :meth:`DataFrame.groupby` when the groupe...
diff --git a/pandas/tests/frame/methods/test_cov_corr.py b/pandas/tests/frame/methods/test_cov_corr.py index ee9af3f436943..25ef49718fbe7 100644 --- a/pandas/tests/frame/methods/test_cov_corr.py +++ b/pandas/tests/frame/methods/test_cov_corr.py @@ -355,7 +355,10 @@ def test_corrwith_mixed_dtypes(self, numeric_only): ...
["pandas/tests/frame/methods/test_cov_corr.py::TestDataFrameCorrWith::test_corrwith_spearman_with_tied_data", "pandas/tests/frame/methods/test_cov_corr.py::TestDataFrameCorrWith::test_corrwith_mixed_dtypes[False]"]
["pandas/tests/frame/methods/test_cov_corr.py::TestDataFrameCorr::test_corr_scipy_method[kendall]", "pandas/tests/frame/methods/test_cov_corr.py::TestDataFrameCorr::test_corr_nooverlap[spearman]", "pandas/tests/frame/methods/test_cov_corr.py::TestDataFrameCorr::test_corr_int", "pandas/tests/frame/methods/test_cov_corr....
null
true
2022-10-17T08:25:24Z
2
35
2
2,742
0
0.85
1
0.85
1
0.573667
89.596
457
swe_gym::train::1510
swe_gym
train
1,510
pandas-dev__pandas-53795
pandas-dev/pandas
pandas-dev/pandas
python
4494f26c044674f857f50b387bd304196b3dd90b
BUG: weekday incorrect for dates before 0000-03-01 ### 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 ...
From https://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week#Sakamoto.27s_methods, it looks like the current method is only accurate if the year is greater than 1752 take
diff --git a/doc/source/whatsnew/v2.0.3.rst b/doc/source/whatsnew/v2.0.3.rst index 8aab1e7b58f5e..14e65e9e577ce 100644 --- a/doc/source/whatsnew/v2.0.3.rst +++ b/doc/source/whatsnew/v2.0.3.rst @@ -13,6 +13,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ +- Bug in :meth:`Timestamp.weekda...
diff --git a/pandas/tests/scalar/timestamp/test_timestamp.py b/pandas/tests/scalar/timestamp/test_timestamp.py index aa326f3a43bd5..283a3a9e7148d 100644 --- a/pandas/tests/scalar/timestamp/test_timestamp.py +++ b/pandas/tests/scalar/timestamp/test_timestamp.py @@ -14,6 +14,10 @@ tzlocal, tzutc, ) +from hypot...
["pandas/tests/scalar/timestamp/test_timestamp.py::TestTimestampProperties::test_dow_historic[-0040-1-1-4]", "pandas/tests/scalar/timestamp/test_timestamp.py::TestTimestampProperties::test_dow_historic[0000-2-29-1]", "pandas/tests/scalar/timestamp/test_timestamp.py::TestTimestampProperties::test_dow_parametric"]
["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-06-22T13:36:53Z
2
46
3
3,116
0
0.85
1
0.77
1
0.653333
89.555
458
swe_gym::train::1630
swe_gym
train
1,630
pandas-dev__pandas-49120
pandas-dev/pandas
pandas-dev/pandas
python
90b4add77859d1349530fff3c8cadeef95f36f39
BUG: _guess_datetime_format_for_array doesn't guess if first element is '' or 'NaT' ### 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 ...
diff --git a/pandas/_libs/tslib.pyi b/pandas/_libs/tslib.pyi index 2212f8db8ea1e..8fec9ecf27f30 100644 --- a/pandas/_libs/tslib.pyi +++ b/pandas/_libs/tslib.pyi @@ -16,6 +16,7 @@ def array_with_unit_to_datetime( unit: str, errors: str = ..., ) -> tuple[np.ndarray, tzinfo | None]: ... +def first_non_null(valu...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index 2b5457fc9f7b3..263f2b597947a 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -2093,9 +2093,8 @@ def test_to_datetime_dta_tz(self, klass): class TestGuessDatetimeFor...
["pandas/tests/tools/test_to_datetime.py::TestGuessDatetimeFormat::test_guess_datetime_format_for_array[test_list3]", "pandas/tests/tools/test_to_datetime.py::TestGuessDatetimeFormat::test_guess_datetime_format_for_array[test_list2]"]
["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
2022-10-15T20:52:21Z
3
23
2
2,841
0
0.85
1
0.85
1
0.550167
89.5255
459
swe_bench_verified::test::274
swe_bench_verified
test
274
matplotlib__matplotlib-24970
matplotlib/matplotlib
matplotlib/matplotlib
python
a3011dfd1aaa2487cce8aa7369475533133ef777
[Bug]: NumPy 1.24 deprecation warnings ### Bug summary Starting NumPy 1.24 I observe several deprecation warnings. ### Code for reproduction ```python import matplotlib.pyplot as plt import numpy as np plt.get_cmap()(np.empty((0, ), dtype=np.uint8)) ``` ### Actual outcome ``` /usr/lib/python3.10/site-packages/mat...
Thanks for the report! Unfortunately I can't reproduce this. What version of numpy are you using when the warning appears? Sorry, forgot to mention that you need to enable the warnings during normal execution, e.g., `python -W always <file>.py`. In my case, the warnings are issued during `pytest` run which seems to act...
diff --git a/lib/matplotlib/colors.py b/lib/matplotlib/colors.py --- a/lib/matplotlib/colors.py +++ b/lib/matplotlib/colors.py @@ -715,16 +715,17 @@ def __call__(self, X, alpha=None, bytes=False): if not xa.dtype.isnative: xa = xa.byteswap().newbyteorder() # Native byteorder is faster. i...
diff --git a/lib/matplotlib/tests/test_colors.py b/lib/matplotlib/tests/test_colors.py --- a/lib/matplotlib/tests/test_colors.py +++ b/lib/matplotlib/tests/test_colors.py @@ -30,6 +30,13 @@ def test_create_lookup_table(N, result): assert_array_almost_equal(mcolors._create_lookup_table(N, data), result) +@pytes...
["lib/matplotlib/tests/test_colors.py::test_index_dtype[uint8]"]
["lib/matplotlib/tests/test_colors.py::test_create_lookup_table[5-result0]", "lib/matplotlib/tests/test_colors.py::test_create_lookup_table[2-result1]", "lib/matplotlib/tests/test_colors.py::test_create_lookup_table[1-result2]", "lib/matplotlib/tests/test_colors.py::test_index_dtype[int]", "lib/matplotlib/tests/test_co...
null
true
2023-01-13T14:23:39Z
1
21
1
1,690
0
1
1
0.7
1
0.351667
89.505
460
swe_bench_verified::test::384
swe_bench_verified
test
384
sphinx-doc__sphinx-10466
sphinx-doc/sphinx
sphinx-doc/sphinx
python
cab2d93076d0cca7c53fac885f927dde3e2a5fec
Message.locations duplicate unnecessary ### Describe the bug When running `make clean; make gettext` there are times the list of locations is duplicated unnecessarily, example: ``` #: ../../manual/render/shader_nodes/vector/vector_rotate.rst:38 #: ../../manual/modeling/hair.rst:0 #: ../../manual/modeling/hair.rst:0...
Just to add to the part of the solution. The `self.locations = list(set(locations)) ` in the __init__ method of gettext.py is NOT enough. The `def __iter__(self) -> Generator[Message, None, None]:` needed to have this as well: `positions = [(os.path.relpath(source, start=os.getcwd()), line) for source,...
diff --git a/sphinx/builders/gettext.py b/sphinx/builders/gettext.py --- a/sphinx/builders/gettext.py +++ b/sphinx/builders/gettext.py @@ -57,7 +57,8 @@ def add(self, msg: str, origin: Union[Element, "MsgOrigin"]) -> None: def __iter__(self) -> Generator[Message, None, None]: for message in self.message...
diff --git a/tests/test_build_gettext.py b/tests/test_build_gettext.py --- a/tests/test_build_gettext.py +++ b/tests/test_build_gettext.py @@ -8,9 +8,29 @@ import pytest +from sphinx.builders.gettext import Catalog, MsgOrigin from sphinx.util.osutil import cd +def test_Catalog_duplicated_message(): + catal...
["tests/test_build_gettext.py::test_Catalog_duplicated_message"]
["tests/test_build_gettext.py::test_build_gettext", "tests/test_build_gettext.py::test_gettext_index_entries", "tests/test_build_gettext.py::test_gettext_disable_index_entries", "tests/test_build_gettext.py::test_gettext_template", "tests/test_build_gettext.py::test_gettext_template_msgid_order_in_sphinxpot", "tests/te...
null
true
2022-05-22T16:46:53Z
1
3
1
2,996
0
1
1
0.85
0.8
0.509333
89.503
461
swe_bench_verified::test::381
swe_bench_verified
test
381
sphinx-doc__sphinx-10323
sphinx-doc/sphinx
sphinx-doc/sphinx
python
31eba1a76dd485dc633cae48227b46879eda5df4
Use of literalinclude prepend results in incorrect indent formatting for code eamples ### Describe the bug Cannot determine a mechanism to use literalinclude directive with `prepend` or `append` to match code example indentation, as leading whitespace is removed. ### How to Reproduce Example of including xml snippet...
Docutils; the reST parser library ignores the leading whitespaces of directive options. So it's difficult to handle it from directive implementation. >Use of dedent could be a good solution, if dedent was applied only to the literalinclude and not to the prepend and append content. Sounds good. The combination of...
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -224,9 +224,9 @@ def read(self, location: Tuple[str, int] = None) -> Tuple[str, int]: self.start_filter, self.end_filter, ...
diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py --- a/tests/test_directive_code.py +++ b/tests/test_directive_code.py @@ -251,6 +251,19 @@ def test_LiteralIncludeReader_dedent(literal_inc_path): "\n") +@pytest.mark.xfail(os.name != 'posix', reason="Not working on win...
["tests/test_directive_code.py::test_LiteralIncludeReader_dedent_and_append_and_prepend"]
["tests/test_directive_code.py::test_LiteralIncludeReader", "tests/test_directive_code.py::test_LiteralIncludeReader_lineno_start", "tests/test_directive_code.py::test_LiteralIncludeReader_pyobject1", "tests/test_directive_code.py::test_LiteralIncludeReader_pyobject2", "tests/test_directive_code.py::test_LiteralInclude...
null
true
2022-04-02T14:42:24Z
1
4
1
2,971
0
1
1
0.85
0.8
0.5085
89.5005
462
swe_bench_verified::test::360
swe_bench_verified
test
360
scikit-learn__scikit-learn-13328
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
37b0e66c871e8fb032a9c7086b2a1d5419838154
TypeError when supplying a boolean X to HuberRegressor fit #### Description `TypeError` when fitting `HuberRegressor` with boolean predictors. #### Steps/Code to Reproduce ```python import numpy as np from sklearn.datasets import make_regression from sklearn.linear_model import HuberRegressor # Random data X, y, coe...
diff --git a/sklearn/linear_model/huber.py b/sklearn/linear_model/huber.py --- a/sklearn/linear_model/huber.py +++ b/sklearn/linear_model/huber.py @@ -251,7 +251,8 @@ def fit(self, X, y, sample_weight=None): self : object """ X, y = check_X_y( - X, y, copy=False, accept_sparse=['cs...
diff --git a/sklearn/linear_model/tests/test_huber.py b/sklearn/linear_model/tests/test_huber.py --- a/sklearn/linear_model/tests/test_huber.py +++ b/sklearn/linear_model/tests/test_huber.py @@ -53,8 +53,12 @@ def test_huber_gradient(): rng = np.random.RandomState(1) X, y = make_regression_with_outliers() ...
["sklearn/linear_model/tests/test_huber.py::test_huber_bool"]
["sklearn/linear_model/tests/test_huber.py::test_huber_equals_lr_for_high_epsilon", "sklearn/linear_model/tests/test_huber.py::test_huber_max_iter", "sklearn/linear_model/tests/test_huber.py::test_huber_gradient", "sklearn/linear_model/tests/test_huber.py::test_huber_sample_weights", "sklearn/linear_model/tests/test_hu...
null
true
2019-02-28T12:47:52Z
1
3
1
4,527
0
1
1
0.92
0.8
0.51
89.5
463
swe_gym::train::1724
swe_gym
train
1,724
pandas-dev__pandas-57402
pandas-dev/pandas
pandas-dev/pandas
python
92a52e231534de236c4e878008a4365b4b1da291
BUG: wrong future Warning on string assignment in certain condition ### 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 b...
cc @MarcoGorelli I think the middle case is raising erroneously? Otherwise, this should raise as well: ``` df.loc[df.index < 2, 'E'] = 1 ``` which isn't showing a warning at the moment That's correct - the warning is only showing on the middle case, so it requires * multi column assignment (it also ha...
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index 9733aff0e6eb5..5e814ec2a1b92 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -24,6 +24,7 @@ Fixed regressions - Fixed regression in :meth:`CategoricalIndex.difference` raising ``KeyError`` when other ...
diff --git a/pandas/tests/frame/indexing/test_setitem.py b/pandas/tests/frame/indexing/test_setitem.py index 20e7651f8af83..658fafd3ea2cc 100644 --- a/pandas/tests/frame/indexing/test_setitem.py +++ b/pandas/tests/frame/indexing/test_setitem.py @@ -1369,3 +1369,19 @@ def test_full_setter_loc_incompatible_dtype(): ...
["pandas/tests/frame/indexing/test_setitem.py::test_setitem_partial_row_multiple_columns"]
["pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItemBooleanMask::test_setitem_ea_boolean_mask", "pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItemSlicing::test_setitem_slice_broadcasting_rhs_mixed_dtypes[iloc-3-array0]", "pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItemBo...
null
true
2024-02-13T14:41:08Z
3
40
1
3,509
0
0.85
1
0.77
1
0.633333
89.495
464
swe_gym::train::503
swe_gym
train
503
python__mypy-15042
python/mypy
python/mypy
python
b43e0d34247a6d1b3b9d9094d184bbfcb9808bb9
Callables and `__init__` methods **Bug Report** I am currently working on https://github.com/encode/starlette/pull/1987 where I'm defining a type hint for an [argument](https://github.com/encode/starlette/blob/54cc128f924dbca7916dad9afd5243a0d58f8ab4/starlette/middleware/__init__.py#L7) that can take either a type of...
Thanks for the report! When comparing a type object to a callback protocol, we should be comparing the type's `__init__` to the protocol's `__call__`. Note that `ExampleMiddleware` isn't a `MiddleWareType` because it doesn't accept arbitrary kwargs. ``` class MiddlewareType(Protocol): def __call__(self, ap...
diff --git a/mypy/messages.py b/mypy/messages.py --- a/mypy/messages.py +++ b/mypy/messages.py @@ -19,6 +19,7 @@ from typing import Any, Callable, Collection, Iterable, Iterator, List, Sequence, cast from typing_extensions import Final +import mypy.typeops from mypy import errorcodes as codes, message_registry fr...
diff --git a/test-data/unit/check-protocols.test b/test-data/unit/check-protocols.test --- a/test-data/unit/check-protocols.test +++ b/test-data/unit/check-protocols.test @@ -3522,7 +3522,12 @@ class C: def test(arg: P) -> None: ... test(B) # OK test(C) # E: Argument 1 to "test" has incompatible type "Type[C]"; ex...
["mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testProtocolClassObjectCallableError", "mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testProtocolClassObjectPureCallback"]
["mypy/test/testcheck.py::TypeCheckSuite::check-protocols.test::testProtocolTypeTypeAttribute"]
null
true
2023-04-12T07:32:49Z
3
40
2
3,360
0
0.85
1
0.77
1
0.633333
89.495
465
swe_gym::train::1380
swe_gym
train
1,380
pandas-dev__pandas-56291
pandas-dev/pandas
pandas-dev/pandas
python
46c8da3e5b987154d2e0a44562c71be635ae826a
BUG: `pd.get_dummies` should return `bool[pyarrow]` types ### 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 ...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 919ac8b03f936..2e82387d64d7b 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -218,6 +218,7 @@ Other enhancements - :meth:`~DataFrame.to_sql` with method parameter set to ``multi`` works with Oracle ...
diff --git a/pandas/tests/reshape/test_get_dummies.py b/pandas/tests/reshape/test_get_dummies.py index 3bfff56cfedf2..9b7aefac60969 100644 --- a/pandas/tests/reshape/test_get_dummies.py +++ b/pandas/tests/reshape/test_get_dummies.py @@ -4,13 +4,18 @@ import numpy as np import pytest +import pandas.util._test_decora...
["pandas/tests/reshape/test_get_dummies.py::TestGetDummies::test_dataframe_dummies_string_dtype", "pandas/tests/reshape/test_get_dummies.py::TestGetDummies::test_get_dummies_arrow_dtype", "pandas/tests/reshape/test_get_dummies.py::TestGetDummies::test_get_dummies_ea_dtype"]
["pandas/tests/reshape/test_get_dummies.py::TestGetDummies::test_dataframe_dummies_drop_first_with_categorical[dense-uint8]", "pandas/tests/reshape/test_get_dummies.py::TestGetDummies::test_get_dummies_ea_dtype_series[int8[pyarrow]]", "pandas/tests/reshape/test_get_dummies.py::TestGetDummies::test_dataframe_dummies_wit...
null
true
2023-12-02T00:04:52Z
2
25
3
2,739
0
0.85
1
0.85
1
0.539833
89.4945
466
swe_bench_verified::test::367
swe_bench_verified
test
367
scikit-learn__scikit-learn-14496
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
d49a6f13af2f22228d430ac64ac2b518937800d0
[BUG] Optics float min_samples NN instantiation #### Reference Issues/PRs None yet. ``` data = load_some_data() clust = OPTICS(metric='minkowski', n_jobs=-1, min_samples=0.1) clust.fit(data) ``` #### What does this implement/fix? Explain your changes. When passing min_samples as a float to optics l439 & 440 execute ...
thanks for spotting this (1) OPTICS was introduced in 0.21, so we don't need to consider python2. maybe use int(...) directly? (2) please fix similar issues in cluster_optics_xi (3) please update the doc of min_samples in compute_optics_graph (4) please add some tests (5) please add what's new Where shall the what...
diff --git a/sklearn/cluster/optics_.py b/sklearn/cluster/optics_.py --- a/sklearn/cluster/optics_.py +++ b/sklearn/cluster/optics_.py @@ -44,7 +44,7 @@ class OPTICS(BaseEstimator, ClusterMixin): Parameters ---------- - min_samples : int > 1 or float between 0 and 1 (default=None) + min_samples : int ...
diff --git a/sklearn/cluster/tests/test_optics.py b/sklearn/cluster/tests/test_optics.py --- a/sklearn/cluster/tests/test_optics.py +++ b/sklearn/cluster/tests/test_optics.py @@ -101,6 +101,12 @@ def test_extract_xi(): xi=0.4).fit(X) assert_array_equal(clust.labels_, expected_labels) + # c...
["sklearn/cluster/tests/test_optics.py::test_extract_xi"]
["sklearn/cluster/tests/test_optics.py::test_extend_downward[r_plot0-3]", "sklearn/cluster/tests/test_optics.py::test_extend_downward[r_plot1-0]", "sklearn/cluster/tests/test_optics.py::test_extend_downward[r_plot2-4]", "sklearn/cluster/tests/test_optics.py::test_extend_downward[r_plot3-4]", "sklearn/cluster/tests/test...
null
true
2019-07-28T13:47:05Z
1
22
1
1,640
0
1
1
0.7
1
0.346667
89.49
467
swe_gym::train::2260
swe_gym
train
2,260
Project-MONAI__MONAI-4511
Project-MONAI/MONAI
project-monai/monai
python
ed233d9b48bd71eb623cf9777ad9b60142c8ad66
Wrong generalized dice score metric when denominator is 0 but prediction is non-empty **Describe the bug** When the denominator of the generalized dice score metric is zero, i.e., the ground-truth is empty, score should be 1 if the prediction is also empty and 0 otherwise. Right now, the output score is always 1. **To...
diff --git a/monai/metrics/generalized_dice.py b/monai/metrics/generalized_dice.py --- a/monai/metrics/generalized_dice.py +++ b/monai/metrics/generalized_dice.py @@ -169,9 +169,15 @@ def compute_generalized_dice( numer = 2.0 * (intersection * w).sum(dim=1) denom = (denominator * w).sum(dim=1) - # Comput...
diff --git a/tests/test_compute_generalized_dice.py b/tests/test_compute_generalized_dice.py --- a/tests/test_compute_generalized_dice.py +++ b/tests/test_compute_generalized_dice.py @@ -107,12 +107,16 @@ TEST_CASE_6 = [{"y": torch.ones((2, 2, 3, 3)), "y_pred": torch.ones((2, 2, 3, 3))}, [1.0000, 1.0000]] -TEST_CA...
["tests/test_compute_generalized_dice.py::TestComputeMeanDice::test_value_3"]
["tests/test_compute_generalized_dice.py::TestComputeMeanDice::test_nans_class_0", "tests/test_compute_generalized_dice.py::TestComputeMeanDice::test_nans_class_1", "tests/test_compute_generalized_dice.py::TestComputeMeanDice::test_value_4", "tests/test_compute_generalized_dice.py::TestComputeMeanDice::test_value_class...
null
true
2022-06-15T16:18:42Z
1
12
1
2,988
0
0.85
1
0.85
1
0.538
89.489
468
swe_bench_verified::test::98
swe_bench_verified
test
98
django__django-13112
django/django
django/django
python
09914ccf688974e068941f55412b930729bafa06
makemigrations crashes for ForeignKey with mixed-case app name. Description When i run "python3 manage.py migrate" on Django 3.1b1 shows me that error (Please, note that the code works well in 3.0) ValueError: The field DJ_RegLogin.Content.category was declared with a lazy reference to 'dj_reglogin.category', but app ...
Thanks for the report. Regression in 9e1b6b8a66af4c2197e5b1b41eb9dbb36e4f6502. Reproduced at fbe82f82555bc25dccb476c749ca062f0b522be3. Potential fix: diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index d517d7269b..894d931d50 100644 --- a/django/db/models/fields/related.py +++ b/dj...
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -582,7 +582,11 @@ def deconstruct(self): if self.remote_field.parent_link: kwargs['parent_link'] = self.remote_field.parent_link...
diff --git a/tests/migrations/test_state.py b/tests/migrations/test_state.py --- a/tests/migrations/test_state.py +++ b/tests/migrations/test_state.py @@ -867,6 +867,34 @@ class Meta: with self.assertRaisesMessage(ValueError, msg): project_state.apps + def test_reference_mixed_case_app_label(...
["test_reference_mixed_case_app_label (migrations.test_state.StateTests)"]
["test_abstract_model_children_inherit_indexes (migrations.test_state.ModelStateTests)", "test_bound_field_sanity_check (migrations.test_state.ModelStateTests)", "test_create_swappable (migrations.test_state.ModelStateTests)", "test_create_swappable_from_abstract (migrations.test_state.ModelStateTests)", "test_custom_m...
null
true
2020-06-26T04:51:38Z
1
6
1
1,942
0
1
1
0.7
1
0.343667
89.481
469
swe_gym::train::717
swe_gym
train
717
iterative__dvc-8381
iterative/dvc
iterative/dvc
python
a3f20eb6f425d002007bb2ce16d70713f754d2e2
hydra: append (`+`) doesn't work with sweeps # Bug Report ## Description In `dvc exp`, using `+` from the basic override syntax doesn't work when doing a choice or range sweep. Similar non-DVC hydra examples seem to work fine, so I assume it's a DVC issue. ### Reproduce Script: ``` git init hydra cd hydra dvc init...
diff --git a/dvc/utils/hydra.py b/dvc/utils/hydra.py --- a/dvc/utils/hydra.py +++ b/dvc/utils/hydra.py @@ -1,4 +1,3 @@ -from collections import defaultdict from pathlib import Path from typing import TYPE_CHECKING, List @@ -83,32 +82,21 @@ def to_hydra_overrides(path_overrides): return parser.parse_overrides(o...
diff --git a/tests/func/utils/test_hydra.py b/tests/func/utils/test_hydra.py --- a/tests/func/utils/test_hydra.py +++ b/tests/func/utils/test_hydra.py @@ -190,6 +190,15 @@ def test_compose_and_dump(tmp_dir, suffix, overrides, expected): {"params.yaml": ["defaults/foo=2"]}, ], ), +...
["tests/func/utils/test_hydra.py::test_hydra_sweeps[overrides1-expected1]"]
["tests/func/utils/test_hydra.py::test_apply_overrides[overrides4-expected4-toml]", "tests/func/utils/test_hydra.py::test_hydra_sweeps[overrides6-expected6]", "tests/func/utils/test_hydra.py::test_apply_overrides[overrides6-expected6-yaml]", "tests/func/utils/test_hydra.py::test_apply_overrides[overrides10-expected10-t...
null
true
2022-09-29T15:08:49Z
1
44
1
2,330
0
0.85
1
0.85
1
0.535
89.48
470
swe_bench_verified::test::19
swe_bench_verified
test
19
astropy__astropy-7671
astropy/astropy
astropy/astropy
python
a7141cd90019b62688d507ae056298507678c058
minversion failures The change in PR #7647 causes `minversion` to fail in certain cases, e.g.: ``` >>> from astropy.utils import minversion >>> minversion('numpy', '1.14dev') TypeError Traceback (most recent call last) <ipython-input-1-760e6b1c375e> in <module>() 1 from astropy.uti...
Oops, sounds like we should put the regex back in that was there for `LooseVersion` - definitely don't want to go back to `pkg_resources`... Huh I don't understand why I couldn't reproduce this before. Well I guess we know why that regexp was there before! @mhvk - will you open a PR to restore the regexp?
diff --git a/astropy/utils/introspection.py b/astropy/utils/introspection.py --- a/astropy/utils/introspection.py +++ b/astropy/utils/introspection.py @@ -4,6 +4,7 @@ import inspect +import re import types import importlib from distutils.version import LooseVersion @@ -139,6 +140,14 @@ def minversion(module, ve...
diff --git a/astropy/utils/tests/test_introspection.py b/astropy/utils/tests/test_introspection.py --- a/astropy/utils/tests/test_introspection.py +++ b/astropy/utils/tests/test_introspection.py @@ -67,7 +67,7 @@ def test_minversion(): from types import ModuleType test_module = ModuleType(str("test_module")) ...
["astropy/utils/tests/test_introspection.py::test_minversion"]
["astropy/utils/tests/test_introspection.py::test_pkg_finder", "astropy/utils/tests/test_introspection.py::test_find_current_mod", "astropy/utils/tests/test_introspection.py::test_find_mod_objs"]
null
true
2018-07-20T19:37:49Z
1
9
1
1,859
0
1
1
0.7
1
0.339833
89.4695
471
swe_gym::train::302
swe_gym
train
302
getmoto__moto-7273
getmoto/moto
getmoto/moto
python
d46b3f35e31eae7efd6ff5b5dee621a1017898ff
DynamoDB query with Limit and ScanIndexForward=False not working as expected in 5.0.0 Looks like there was a change between 4.2.14 and 5.0.0 how DynamoDB queries work when I use Limit and ScanIndexForward=False. In the test below, the very last assert passes in 4.2.14 but fails in 5.0.0. I am using Limit=1 and ScanInd...
Hi @mlalevic, thanks for raising this, and welcome to Moto! I think it was already broken in 4.2.14 because of this PR, in an attempt to correct the scan-count: https://github.com/getmoto/moto/pull/7208 I'll try to raise a fix shortly.
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 @@ -707,6 +707,24 @@ def query( if isinstance(item, Item) and item.hash_key == hash_key ] + # SORT + if index_name: + ...
diff --git a/tests/test_dynamodb/test_dynamodb.py b/tests/test_dynamodb/test_dynamodb.py --- a/tests/test_dynamodb/test_dynamodb.py +++ b/tests/test_dynamodb/test_dynamodb.py @@ -1386,6 +1386,25 @@ def test_query_filter(): ) assert response["Count"] == 2 + # Combine Limit + Scan + response = table.que...
["tests/test_dynamodb/test_dynamodb.py::test_query_filter"]
["tests/test_dynamodb/test_dynamodb.py::test_remove_list_index__remove_existing_nested_index", "tests/test_dynamodb/test_dynamodb.py::test_basic_projection_expressions_using_query_with_attr_expression_names", "tests/test_dynamodb/test_dynamodb.py::test_describe_backup_for_non_existent_backup_raises_error", "tests/test_...
null
true
2024-01-29 19:40:22
1
36
1
3,013
0
0.85
1
0.77
1
0.62
89.455
472
swe_gym::train::1159
swe_gym
train
1,159
pandas-dev__pandas-54159
pandas-dev/pandas
pandas-dev/pandas
python
2f08999a537646ee9d9d698a3fd502ccebb3d79d
BUG: inconsistent space stripping in read_xml ### 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 the [main...
I haven't found a universal solution like replacing ```python pd.read_xml(str, xpath='//c[../b="bar"]') # fails ``` with ```python pd.read_xml(str, xpath='//c[starts-with(../b, "bar")]') ``` as it would work for `"bar "` but not `" bar"`. Other [XPATH 1.0 String Functions](https://www.w3.org/TR/xpath-10/#se...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index c3dff0c2e8449..ce42a8020a7b2 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -519,6 +519,7 @@ I/O - Bug in :func:`read_html`, style elements were read into DataFrames (:issue:`52197`) - Bug in :func:...
diff --git a/pandas/tests/io/xml/test_xml.py b/pandas/tests/io/xml/test_xml.py index 1a64d9910d8bf..19668c2c4cfc0 100644 --- a/pandas/tests/io/xml/test_xml.py +++ b/pandas/tests/io/xml/test_xml.py @@ -487,23 +487,7 @@ def test_empty_string_etree(val): read_xml(BytesIO(val), parser="etree") -@td.skip_if...
["pandas/tests/io/xml/test_xml.py::test_whitespace[lxml]", "pandas/tests/io/xml/test_xml.py::test_whitespace[etree]"]
["pandas/tests/io/xml/test_xml.py::test_wrong_dict_type[lxml]", "pandas/tests/io/xml/test_xml.py::test_file_elems_and_attrs[etree]", "pandas/tests/io/xml/test_xml.py::test_wrong_compression[lxml-gzip-tar]", "pandas/tests/io/xml/test_xml.py::test_bad_xml[lxml]", "pandas/tests/io/xml/test_xml.py::test_wrong_compression[l...
null
true
2023-07-17T00:18:43Z
2
36
2
3,459
0
0.85
1
0.77
1
0.62
89.455
473
swe_gym::train::544
swe_gym
train
544
python__mypy-10057
python/mypy
python/mypy
python
11d4fb25a8af7a3eff5f36328a11d68e82d33017
Wrong enum value type inferred for members defined in a subclass (regression) **Bug Report** I have an Enum base class with a `__new__` implementation with multiple parameters, so that for the declaration of members a tuple can be given, one of which is used as the value for the member. The members are only defined in...
I found some time to have a closer look today. So it seems that the proper fix would be to teach mypy to infer attributes from `__new__` (see #1021). Of course, this is somewhat out of scope for fixing the regression in #9443, and also for what I can realistically contribute. Instead, for the time being I propose...
diff --git a/mypy/plugins/enums.py b/mypy/plugins/enums.py --- a/mypy/plugins/enums.py +++ b/mypy/plugins/enums.py @@ -15,6 +15,7 @@ import mypy.plugin # To avoid circular imports. from mypy.types import Type, Instance, LiteralType, CallableType, ProperType, get_proper_type +from mypy.nodes import TypeInfo # No...
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 @@ -1243,3 +1243,59 @@ class Comparator(enum.Enum): reveal_type(Comparator.__foo__) # N: Revealed type is 'builtins.dict[builtins.str, builtins.int]' [builtins fixt...
["mypy/test/testcheck.py::TypeCheckSuite::testEnumWithInstanceAttributes", "mypy/test/testcheck.py::TypeCheckSuite::testNewSetsUnexpectedValueType", "mypy/test/testcheck.py::TypeCheckSuite::testValueTypeWithNewInParentClass"]
[]
null
true
2021-02-10T00:34:03Z
1
35
3
3,430
0
0.85
1
0.77
1
0.616667
89.445
474
swe_bench_verified::test::480
swe_bench_verified
test
480
sympy__sympy-21379
sympy/sympy
sympy/sympy
python
624217179aaf8d094e6ff75b7493ad1ee47599b0
Unexpected `PolynomialError` when using simple `subs()` for particular expressions I am seeing weird behavior with `subs` for particular expressions with hyperbolic sinusoids with piecewise arguments. When applying `subs`, I obtain an unexpected `PolynomialError`. For context, I was umbrella-applying a casting from int...
Some functions call `Mod` when evaluated. That does not work well with arguments involving `Piecewise` expressions. In particular, calling `gcd` will lead to `PolynomialError`. That error should be caught by something like this: ``` --- a/sympy/core/mod.py +++ b/sympy/core/mod.py @@ -40,6 +40,7 @@ def eval(cls, p, ...
diff --git a/sympy/core/mod.py b/sympy/core/mod.py --- a/sympy/core/mod.py +++ b/sympy/core/mod.py @@ -40,6 +40,7 @@ def eval(cls, p, q): from sympy.core.mul import Mul from sympy.core.singleton import S from sympy.core.exprtools import gcd_terms + from sympy.polys.polyerrors import Po...
diff --git a/sympy/core/tests/test_arit.py b/sympy/core/tests/test_arit.py --- a/sympy/core/tests/test_arit.py +++ b/sympy/core/tests/test_arit.py @@ -1913,6 +1913,16 @@ def test_Mod(): assert Mod(x, y).rewrite(floor) == x - y*floor(x/y) assert ((x - Mod(x, y))/y).rewrite(floor) == floor(x/y) + # issue 2...
["test_Mod"]
["test_bug1", "test_Symbol", "test_arit0", "test_div", "test_pow", "test_pow2", "test_pow3", "test_mod_pow", "test_pow_E", "test_pow_issue_3516", "test_pow_im", "test_real_mul", "test_ncmul", "test_mul_add_identity", "test_ncpow", "test_powerbug", "test_Mul_doesnt_expand_exp", "test_Mul_is_integer", "test_Add_Mul_is_in...
null
true
2021-04-24T19:49:52Z
1
12
1
1,747
0
1
1
0.7
1
0.331167
89.4435
475
swe_bench_verified::test::94
swe_bench_verified
test
94
django__django-13028
django/django
django/django
python
78ad4b4b0201003792bfdbf1a7781cbc9ee03539
Queryset raises NotSupportedError when RHS has filterable=False attribute. Description (last modified by Nicolas Baccelli) I'm migrating my app to django 3.0.7 and I hit a strange behavior using a model class with a field labeled filterable class ProductMetaDataType(models.Model): label = models.CharField(max_leng...
Thanks for the report, that's a nice edge case. We should be able to fix this by checking if rhs is an expression: diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index ce18098fd2..ad981377a0 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1124,7 +1124,7 @@ ...
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1124,7 +1124,10 @@ def check_related_objects(self, field, value, opts): def check_filterable(self, expression): """Raise an error if expression cannot be...
diff --git a/tests/queries/models.py b/tests/queries/models.py --- a/tests/queries/models.py +++ b/tests/queries/models.py @@ -68,6 +68,7 @@ class ExtraInfo(models.Model): note = models.ForeignKey(Note, models.CASCADE, null=True) value = models.IntegerField(null=True) date = models.ForeignKey(DateTimePK,...
["test_field_with_filterable (queries.tests.Queries1Tests)", "test_ticket8439 (queries.tests.Queries1Tests)"]
["#13227 -- If a queryset is already evaluated, it can still be used as a query arg", "test_no_fields_cloning (queries.tests.CloneTests)", "test_no_model_options_cloning (queries.tests.CloneTests)", "test_no_extra_params (queries.tests.DefaultValuesInsertTest)", "test_ticket_7302 (queries.tests.EscapingTests)", "test_t...
null
true
2020-06-05T19:49:04Z
1
5
2
2,834
0
1
1
0.85
0.8
0.489
89.442
476
swe_gym::train::1295
swe_gym
train
1,295
pandas-dev__pandas-57570
pandas-dev/pandas
pandas-dev/pandas
python
4ed67ac9ef3d9fde6fb8441bc9ea33c0d786649e
BUG: Interchange object data buffer has the wrong dtype / `from_dataframe` incorrect ### 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...
thanks @stinodego for the report could you clarify how to reproduce the assertion error please? I've tried building from source with the latest commits from both pandas and polars, but didn't get the assertionerror Hey @MarcoGorelli , I've opened a PR in the Polars repo, you can use that branch to reproduce this:...
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 375c74f29e63a..3253f9ab87363 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,13 +53,11 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - - id: check-ast - id: check...
diff --git a/pandas/tests/interchange/test_impl.py b/pandas/tests/interchange/test_impl.py index 4933cca97462f..e4fa6e4451a4c 100644 --- a/pandas/tests/interchange/test_impl.py +++ b/pandas/tests/interchange/test_impl.py @@ -435,3 +435,48 @@ def test_empty_dataframe(): result = pd.api.interchange.from_dataframe(df...
["pandas/tests/interchange/test_impl.py::test_buffer_dtype_categorical[data2-expected_dtype2-expected_buffer_dtype2]", "pandas/tests/interchange/test_impl.py::test_buffer_dtype_categorical[data1-expected_dtype1-expected_buffer_dtype1]"]
["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-02-22T18:30:43Z
3
34
2
4,476
0
0.85
1
0.77
1
0.613333
89.435
477
swe_gym::train::1817
swe_gym
train
1,817
pandas-dev__pandas-51611
pandas-dev/pandas
pandas-dev/pandas
python
5dd6efc209f5a47aadc9813def6bb29695a14653
BUG: Weighted rolling aggregations do not respect min_periods=0 ### 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 e...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 45b5c16415f9d..a60d4806252dd 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -187,6 +187,7 @@ Plotting Groupby/resample/rolling ^^^^^^^^^^^^^^^^^^^^^^^^ - Bug in :meth:`DataFrameGroupBy.idxmin`, :me...
diff --git a/pandas/tests/window/test_win_type.py b/pandas/tests/window/test_win_type.py index 8438e0727c174..a0d052257ec6b 100644 --- a/pandas/tests/window/test_win_type.py +++ b/pandas/tests/window/test_win_type.py @@ -321,16 +321,16 @@ def test_cmov_window_frame(f, xp, step): tm.assert_frame_equal(xp, rs) +...
["pandas/tests/window/test_win_type.py::test_cmov_window_na_min_periods[None-0]", "pandas/tests/window/test_win_type.py::test_cmov_window_na_min_periods[10-0]", "pandas/tests/window/test_win_type.py::test_cmov_window_na_min_periods[1-0]", "pandas/tests/window/test_win_type.py::test_cmov_window_na_min_periods[2-0]", "pa...
["pandas/tests/window/test_win_type.py::test_constructor[Series]", "pandas/tests/window/test_win_type.py::test_cmov_window_special_linear_range[gaussian-10]", "pandas/tests/window/test_win_type.py::test_cmov_window_regular_missing_data[bartlett-None]", "pandas/tests/window/test_win_type.py::test_cmov_window[10]", "pand...
null
true
2023-02-24T10:56:29Z
2
7
5
2,975
0
0.85
1
0.85
1
0.519167
89.4325
478
swe_gym::train::1756
swe_gym
train
1,756
pandas-dev__pandas-48008
pandas-dev/pandas
pandas-dev/pandas
python
3670fbfe4495a819b3e0131cd6d6cb0694476fcf
BUG: The `nanoseconds` in pd.DateOffset was ignored when add to pd.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. - [ ] I have confirmed ...
take
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 0b450fab53137..aece8caef65f1 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -824,6 +824,7 @@ Datetimelike - Bug in :meth:`DatetimeIndex.resolution` incorrectly returning "day" instead of "nanosecond"...
diff --git a/pandas/tests/tseries/offsets/test_offsets.py b/pandas/tests/tseries/offsets/test_offsets.py index 49661fe1ec8ce..bca4ba98f37b7 100644 --- a/pandas/tests/tseries/offsets/test_offsets.py +++ b/pandas/tests/tseries/offsets/test_offsets.py @@ -33,6 +33,7 @@ from pandas import ( DatetimeIndex, + Seri...
["pandas/tests/tseries/offsets/test_offsets.py::test_dateoffset_add_sub_timestamp_series_with_nano[offset1-expected1]", "pandas/tests/tseries/offsets/test_offsets.py::test_dateoffset_add_sub_timestamp_series_with_nano[offset0-expected0]"]
["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
2022-08-08T17:52:55Z
2
12
2
2,841
0
0.85
1
0.85
1
0.5135
89.4155
479
swe_gym::train::1763
swe_gym
train
1,763
pandas-dev__pandas-55352
pandas-dev/pandas
pandas-dev/pandas
python
0db27c0df815718bb4cb31ae69dddfc68828bc69
BUG: Incorrect result when `method!=None` for `MultiIndex.get_indexer` ### 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 thi...
cc: @mroeschke take
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 9dc095e6de6ff..1bf18bfba4b84 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -310,7 +310,7 @@ Missing MultiIndex ^^^^^^^^^^ -- +- Bug in :meth:`MultiIndex.get_indexer` not raising ``ValueError`` wh...
diff --git a/pandas/tests/indexes/multi/test_indexing.py b/pandas/tests/indexes/multi/test_indexing.py index 78b2c493ec116..d86692477f381 100644 --- a/pandas/tests/indexes/multi/test_indexing.py +++ b/pandas/tests/indexes/multi/test_indexing.py @@ -342,6 +342,19 @@ def test_get_indexer_methods(self): expected ...
["pandas/tests/indexes/multi/test_indexing.py::TestGetIndexer::test_get_indexer_methods_raise_for_non_monotonic[pad]", "pandas/tests/indexes/multi/test_indexing.py::TestGetIndexer::test_get_indexer_methods_raise_for_non_monotonic[bfill]", "pandas/tests/indexes/multi/test_indexing.py::TestGetIndexer::test_get_indexer_me...
["pandas/tests/indexes/multi/test_indexing.py::TestGetIndexer::test_get_indexer_nearest", "pandas/tests/indexes/multi/test_indexing.py::TestContains::test_contains_top_level", "pandas/tests/indexes/multi/test_indexing.py::TestGetLoc::test_get_loc_missing_nan", "pandas/tests/indexes/multi/test_indexing.py::test_getitem_...
null
true
2023-10-02T11:20:43Z
2
6
4
2,949
0
0.85
1
0.85
1
0.5115
89.4095
480
swe_bench_verified::test::442
swe_bench_verified
test
442
sympy__sympy-13974
sympy/sympy
sympy/sympy
python
84c125972ad535b2dfb245f8d311d347b45e5b8a
Evaluating powers of `TensorProduct` Powers of tensor product expressions are not possible to evaluate with either `expand(tensorproduct=True)` method nor the `tensor_product_simp`function. This is an example session showing the issue ``` In [1]: from sympy import * from sympy.physics.quantum import TensorProd...
I would like to work on it. Can you please guide me as to how I should proceed? @ArighnaIITG The file would be `sympy/physics/quantum/tensorproduct.py`, in which you can see that `tensor_product_simp` acts differently depending on the argument. Just as there is a `tensor_product_simp_Mul` when the argument is `Mul`,...
diff --git a/sympy/physics/quantum/tensorproduct.py b/sympy/physics/quantum/tensorproduct.py --- a/sympy/physics/quantum/tensorproduct.py +++ b/sympy/physics/quantum/tensorproduct.py @@ -18,6 +18,7 @@ matrix_tensor_product ) + __all__ = [ 'TensorProduct', 'tensor_product_simp' @@ -310,18 +311,26 @@ d...
diff --git a/sympy/physics/quantum/tests/test_tensorproduct.py b/sympy/physics/quantum/tests/test_tensorproduct.py --- a/sympy/physics/quantum/tests/test_tensorproduct.py +++ b/sympy/physics/quantum/tests/test_tensorproduct.py @@ -10,7 +10,7 @@ from sympy.physics.quantum.density import Density from sympy.core.trace i...
["test_tensor_product_simp"]
["test_tensor_product_abstract", "test_tensor_product_expand", "test_tensor_product_commutator", "test_issue_5923"]
null
true
2018-01-20T18:25:59Z
1
45
1
1,007
0
1
1
0.7
1
0.317833
89.4035
481
swe_gym::train::1430
swe_gym
train
1,430
pandas-dev__pandas-51895
pandas-dev/pandas
pandas-dev/pandas
python
6f47a17ac169a72c46d7e4fd69667079596b7e5e
BUG: Partial multiindex columns selection breaks categorical 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. - [ ] I have confirmed this b...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index b0e9fa2cea0ee..742324c18428f 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -347,8 +347,8 @@ Missing MultiIndex ^^^^^^^^^^ +- Bug in :meth:`DataFrame.__getitem__` not preserving dtypes for :class:...
diff --git a/pandas/tests/indexing/multiindex/test_multiindex.py b/pandas/tests/indexing/multiindex/test_multiindex.py index d7285f0069c71..955c4acfd4c97 100644 --- a/pandas/tests/indexing/multiindex/test_multiindex.py +++ b/pandas/tests/indexing/multiindex/test_multiindex.py @@ -6,12 +6,14 @@ import pandas as pd f...
["pandas/tests/indexing/multiindex/test_multiindex.py::TestMultiIndexBasic::test_multiindex_dtype_preservation"]
["pandas/tests/indexing/multiindex/test_multiindex.py::TestMultiIndexBasic::test_multiindex_with_datatime_level_preserves_freq", "pandas/tests/indexing/multiindex/test_multiindex.py::TestMultiIndexBasic::test_multiindex_repeated_keys", "pandas/tests/indexing/multiindex/test_multiindex.py::TestMultiIndexBasic::test_excl...
null
true
2023-03-11T01:01:31Z
2
16
1
2,729
0
0.85
1
0.85
1
0.508167
89.3995
482
swe_gym::train::1561
swe_gym
train
1,561
pandas-dev__pandas-55314
pandas-dev/pandas
pandas-dev/pandas
python
1c1bb854cce61a8d653c468bcce70db84ac07cf9
BUG: `copy.deepcopy()` doesn't deepcopy the metadata in `.attrs` ### 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 ...
Thanks for the report. Can you give this issue an informative title?
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 7a177344a42c7..9a524db89de85 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -74,12 +74,12 @@ enhancement2 Other enhancements ^^^^^^^^^^^^^^^^^^ +- :attr:`Series.attrs` / :attr:`DataFrame.attrs` no...
diff --git a/pandas/tests/frame/test_api.py b/pandas/tests/frame/test_api.py index 8fc78629beb0a..06bf169bf4dbc 100644 --- a/pandas/tests/frame/test_api.py +++ b/pandas/tests/frame/test_api.py @@ -315,6 +315,15 @@ def test_attrs(self): result = df.rename(columns=str) assert result.attrs == {"version":...
["pandas/tests/frame/test_api.py::TestDataFrameMisc::test_attrs_deepcopy"]
["pandas/tests/frame/test_api.py::TestDataFrameMisc::test_set_flags[DataFrame-True]", "pandas/tests/frame/test_api.py::TestDataFrameMisc::test_inspect_getmembers", "pandas/tests/frame/test_api.py::TestDataFrameMisc::test_new_empty_index", "pandas/tests/frame/test_api.py::TestDataFrameMisc::test_empty_nonzero", "pandas/...
null
true
2023-09-28T10:16:26Z
2
30
1
3,256
0
0.85
1
0.77
1
0.6
89.395
483
swe_bench_verified::test::303
swe_bench_verified
test
303
pydata__xarray-3993
pydata/xarray
pydata/xarray
python
8cc34cb412ba89ebca12fc84f76a9e452628f1bc
DataArray.integrate has a 'dim' arg, but Dataset.integrate has a 'coord' arg This is just a minor gripe but I think it should be fixed. The API syntax is inconsistent: ```python ds.differentiate(coord='x') da.differentiate(coord='x') ds.integrate(coord='x') da.integrate(dim='x') # why dim?? ``` It should definitely ...
Just found that @max-sixty already [pointed this out](https://github.com/pydata/xarray/pull/3469#pullrequestreview-309347524). It's bugging me, so I'll open a PR :)
diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -3481,21 +3481,26 @@ def differentiate( return self._from_temp_dataset(ds) def integrate( - self, dim: Union[Hashable, Sequence[Hashable]], datetime_unit: str = None +...
diff --git a/xarray/tests/test_dataset.py b/xarray/tests/test_dataset.py --- a/xarray/tests/test_dataset.py +++ b/xarray/tests/test_dataset.py @@ -6603,6 +6603,9 @@ def test_integrate(dask): with pytest.raises(ValueError): da.integrate("x2d") + with pytest.warns(FutureWarning): + da.integrate(...
["xarray/tests/test_dataset.py::test_integrate[True]", "xarray/tests/test_dataset.py::test_integrate[False]"]
["xarray/tests/test_dataset.py::TestDataset::test_repr", "xarray/tests/test_dataset.py::TestDataset::test_repr_multiindex", "xarray/tests/test_dataset.py::TestDataset::test_repr_period_index", "xarray/tests/test_dataset.py::TestDataset::test_unicode_data", "xarray/tests/test_dataset.py::TestDataset::test_repr_nep18", "...
null
true
2020-04-21T20:30:35Z
2
49
2
903
0
1
1
0.7
1
0.313833
89.3915
484
swe_gym::train::2139
swe_gym
train
2,139
Project-MONAI__MONAI-2645
Project-MONAI/MONAI
project-monai/monai
python
027947bf91ff0dfac94f472ed1855cd49e3feb8d
RandBiasField missing np.exp **Describe the bug** The bias field generated by `RandBiasField._generate_random_field` ([link](https://github.com/Project-MONAI/MONAI/blob/0ad9e73639e30f4f1af5a1f4a45da9cb09930179/monai/transforms/intensity/array.py#L434)) should be exponentiated, as done so in [NiftyNet's implementation](...
diff --git a/monai/transforms/intensity/array.py b/monai/transforms/intensity/array.py --- a/monai/transforms/intensity/array.py +++ b/monai/transforms/intensity/array.py @@ -431,22 +431,19 @@ def __init__( self.coeff_range = coeff_range self.dtype = dtype - def _generate_random_field( - s...
diff --git a/tests/test_random_bias_field.py b/tests/test_random_bias_field.py --- a/tests/test_random_bias_field.py +++ b/tests/test_random_bias_field.py @@ -18,17 +18,12 @@ TEST_CASES_2D = [{}, (3, 32, 32)] TEST_CASES_3D = [{}, (3, 32, 32, 32)] -TEST_CASES_2D_ZERO_RANGE = [{"coeff_range": (0.0, 0.0)}, (3, 32, 32)...
["tests/test_random_bias_fieldd.py::TestRandBiasFieldd::test_zero_range_0", "tests/test_random_bias_field.py::TestRandBiasField::test_zero_range_0", "tests/test_random_bias_fieldd.py::TestRandBiasFieldd::test_one_range_input_0", "tests/test_random_bias_field.py::TestRandBiasField::test_one_range_input_0"]
["tests/test_random_bias_field.py::TestRandBiasField::test_zero_prob", "tests/test_random_bias_fieldd.py::TestRandBiasFieldd::test_output_shape_1", "tests/test_random_bias_fieldd.py::TestRandBiasFieldd::test_zero_prob", "tests/test_random_bias_field.py::TestRandBiasField::test_output_shape_0", "tests/test_random_bias_f...
null
true
2021-07-22T22:28:57Z
1
33
4
2,367
0
0.85
1
0.85
1
0.5045
89.3885
485
swe_gym::train::1276
swe_gym
train
1,276
pandas-dev__pandas-47840
pandas-dev/pandas
pandas-dev/pandas
python
6e1a0401420bffd282f3cf8b57e653a39e373d3b
BUG: Groupby on a partial index with fillna drops the grouped by key when the dataframe is empty ### 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. ...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index d138ebb9c02a3..7fc8b16bbed9a 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -1010,6 +1010,7 @@ Groupby/resample/rolling - Bug in :meth:`DataFrame.resample` reduction methods when used with ``on`` wou...
diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py index 920b869ef799b..df49db9ec9dad 100644 --- a/pandas/tests/groupby/test_groupby.py +++ b/pandas/tests/groupby/test_groupby.py @@ -2348,6 +2348,42 @@ def test_groupby_duplicate_index(): tm.assert_series_equal(result, expected...
["pandas/tests/groupby/test_groupby.py::test_group_on_empty_multiindex[fillna]"]
["pandas/tests/groupby/test_groupby.py::test_empty_groupby[mad-apply-Int64-keys0-columns1]", "pandas/tests/groupby/test_groupby.py::test_dup_labels_output_shape[quantile-idx1]", "pandas/tests/groupby/test_groupby.py::test_groupby_duplicate_columns", "pandas/tests/groupby/test_groupby.py::test_empty_groupby[idxmax-apply...
null
true
2022-07-24T21:00:05Z
2
6
1
2,906
0
0.85
1
0.85
1
0.504333
89.388
486
swe_gym::train::437
swe_gym
train
437
python__mypy-9573
python/mypy
python/mypy
python
952ca239e6126aff52067a37869bd394eb08cf21
Position of double-starred kwargs affects the type errors when instantiating subclasses attr objects ## 🐛 Bug Report I'm not sure this is the issue for typeshed or mypy, but with `attrs`, unpacking a dict to initialize a subclassed attr instance generates a weird type error or not depending on the position of the do...
diff --git a/mypy/argmap.py b/mypy/argmap.py --- a/mypy/argmap.py +++ b/mypy/argmap.py @@ -24,6 +24,7 @@ def map_actuals_to_formals(actual_kinds: List[int], """ nformals = len(formal_kinds) formal_to_actual = [[] for i in range(nformals)] # type: List[List[int]] + ambiguous_actual_kwargs = [] # type...
diff --git a/test-data/unit/check-kwargs.test b/test-data/unit/check-kwargs.test --- a/test-data/unit/check-kwargs.test +++ b/test-data/unit/check-kwargs.test @@ -377,6 +377,29 @@ f(*l, **d) class A: pass [builtins fixtures/dict.pyi] +[case testPassingMultipleKeywordVarArgs] +from typing import Any, Dict +def f1(a:...
["mypy/test/testcheck.py::TypeCheckSuite::testTypedDictAsStarStarAndDictAsStarStar", "mypy/test/testcheck.py::TypeCheckSuite::testPassingMultipleKeywordVarArgs"]
["mypy/test/testcheck.py::TypeCheckSuite::testPEP570Signatures1", "mypy/test/testcheck.py::TypeCheckSuite::testPEP570Calls", "mypy/test/testcheck.py::TypeCheckSuite::testTypedDictNonMappingMethods_python2", "mypy/test/testcheck.py::TypeCheckSuite::testPassingKeywordVarArgsToVarArgsOnlyFunction", "mypy/test/testcheck.py...
null
true
2020-10-10T14:12:35Z
2
62
2
1,774
0
0.85
1
0.85
1
0.502333
89.382
487
swe_gym::train::2263
swe_gym
train
2,263
Project-MONAI__MONAI-6735
Project-MONAI/MONAI
project-monai/monai
python
4afa2ad317f8daa65c42a1aa13077401f5ec302d
`ViTAutoEnc` hard-codes output patch size to 4 **Describe the bug** The `ViTAutoEnc` constructor hard-codes the output patch size to 4 in [this line](https://github.com/Project-MONAI/MONAI/blob/ae95bf920daad142bd8230580617a5e0a8d5d907/monai/networks/nets/vitautoenc.py#L103). [Edit] I think `new_patch_size` needs to be...
Hi @finalelement, could you please share some comments on this issue? Thanks in advance! thanks, it's probably a bug according to Vish, would you like to submit a patch? Yes, happy to contribute! How should we go about it? We could use an approach similar to what is done in `UNETR`. For example, if we fix the input pa...
diff --git a/monai/networks/nets/vitautoenc.py b/monai/networks/nets/vitautoenc.py --- a/monai/networks/nets/vitautoenc.py +++ b/monai/networks/nets/vitautoenc.py @@ -11,6 +11,7 @@ from __future__ import annotations +import math from collections.abc import Sequence import torch @@ -19,7 +20,7 @@ from monai.ne...
diff --git a/tests/test_vitautoenc.py b/tests/test_vitautoenc.py --- a/tests/test_vitautoenc.py +++ b/tests/test_vitautoenc.py @@ -49,7 +49,7 @@ { "in_channels": 1, "img_size": (512, 512, 32), - "patch_size": (16, 16, 16), + "patch_size": (64, 64, 16), ...
["tests/test_vitautoenc.py::TestVitAutoenc::test_shape_24"]
["tests/test_vitautoenc.py::TestVitAutoenc::test_shape_05", "tests/test_vitautoenc.py::TestVitAutoenc::test_shape_13", "tests/test_vitautoenc.py::TestVitAutoenc::test_shape_11", "tests/test_vitautoenc.py::TestVitAutoenc::test_shape_07", "tests/test_vitautoenc.py::TestVitAutoenc::test_shape_10", "tests/test_vitautoenc.p...
null
true
2023-07-18T05:42:20Z
3
28
1
3,518
0
0.85
1
0.77
1
0.593333
89.375
488
swe_gym::train::1090
swe_gym
train
1,090
pydantic__pydantic-5591
pydantic/pydantic
pydantic/pydantic
python
f50ae9f282c29e460563829d40d9eeffcf87e479
Support implicit casting for enum members in Literal ### Checks * [x] I added a descriptive title to this issue * [x] I have searched (google, github) for similar issues ~and couldn't find anything~ * [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this feature/change is n...
Hi @tobinus I don't understand. If you want raw enums, then you should use raw enum as value hence write ```python print(type(Meal(dessert={'kind': DessertTypes.CAKE}).dessert).__name__) # Cake ``` which works instead of ```python print(type(Meal(dessert={'kind': 'cake'}).dessert).__name__) # ValidationError...
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 @@ -13,11 +13,11 @@ from enum import Enum from ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface...
diff --git a/tests/test_construction.py b/tests/test_construction.py --- a/tests/test_construction.py +++ b/tests/test_construction.py @@ -37,13 +37,16 @@ def test_construct_fields_set(): assert m.model_dump() == {'a': 3, 'b': -1} -def test_construct_allow_extra(): - """model_construct() should allow extra ...
["tests/test_types.py::test_plain_enum_validate"]
["tests/test_types.py::test_finite_float_validation_error[inf]", "tests/test_types.py::test_default_validators[date_check-value113-result113]", "tests/test_construction.py::test_construct_misuse", "tests/test_construction.py::test_simple_copy[copy]", "tests/test_types.py::test_default_validators[date_check-value106-res...
null
true
2023-04-25T22:58:54Z
1
26
1
3,810
0
0.85
1
0.77
1
0.586667
89.355
489
swe_gym::train::1533
swe_gym
train
1,533
pandas-dev__pandas-49536
pandas-dev/pandas
pandas-dev/pandas
python
7bc699fbb8dd94177d723dd637d7e99fe0eea65a
BUG: NumericIndex should not support float16 dtype ### 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 ...
diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index de9e3ace4f0ca..aa9d1c8152019 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -891,6 +891,8 @@ def value_counts( else: values = _ensure_arraylike(values) keys, counts = value_counts_array...
diff --git a/pandas/tests/arithmetic/test_numeric.py b/pandas/tests/arithmetic/test_numeric.py index 529dd6baa70c0..5c6cbf73d5bfc 100644 --- a/pandas/tests/arithmetic/test_numeric.py +++ b/pandas/tests/arithmetic/test_numeric.py @@ -7,7 +7,6 @@ from datetime import timedelta from decimal import Decimal import operat...
["pandas/tests/base/test_conversion.py::TestToIterable::test_iterable[index-iter-float16-float]", "pandas/tests/base/test_conversion.py::TestToIterable::test_iterable_map[index-float16-float]", "pandas/tests/base/test_value_counts.py::test_value_counts_null[float16-series-None]", "pandas/tests/base/test_conversion.py::...
["pandas/tests/arithmetic/test_numeric.py::TestNumericArraylikeArithmeticWithDatetimeLike::test_numeric_arr_rdiv_tdscalar[numexpr-Day-UInt64Index-DataFrame]", "pandas/tests/arithmetic/test_numeric.py::TestMultiplicationDivision::test_mul_int_identity[python-Int64Index-Index-floordiv]", "pandas/tests/indexes/numeric/tes...
null
true
2022-11-04T21:06:28Z
4
22
9
1,088
0
0.85
1
1
0.85
0.254667
89.3515
490
swe_gym::train::1738
swe_gym
train
1,738
pandas-dev__pandas-52174
pandas-dev/pandas
pandas-dev/pandas
python
525f1ef36d8c49ef17f102a8e45be5f054000b13
BUG: to_numeric does not return Arrow backed data for `StringDtype("pyarrow")` ### 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 conf...
Thanks for the report. Unfortunately part of the issue here is that `str` of the older `StringDtype("pyarrow")` implementation returns `"string"` even though it's also backed by pyarrow ``` In [17]: str(df2.x.dtype) Out[17]: 'string' In [18]: repr(df2.x.dtype) Out[18]: 'string[pyarrow]' In [19]: df2.x.array...
diff --git a/pandas/_libs/lib.pyx b/pandas/_libs/lib.pyx index 88ea61a23a426..c3bb33df34e56 100644 --- a/pandas/_libs/lib.pyx +++ b/pandas/_libs/lib.pyx @@ -2325,10 +2325,14 @@ def maybe_convert_numeric( if not seen.coerce_numeric: raise type(err)(f"{err} at position {i}") - ...
diff --git a/pandas/tests/tools/test_to_numeric.py b/pandas/tests/tools/test_to_numeric.py index 4a0b01a275523..fe6794b120681 100644 --- a/pandas/tests/tools/test_to_numeric.py +++ b/pandas/tests/tools/test_to_numeric.py @@ -723,12 +723,12 @@ def test_precision_float_conversion(strrep): @pytest.mark.parametrize( ...
["pandas/tests/tools/test_to_numeric.py::test_to_numeric_from_nullable_string[string[pyarrow]-values3-expected3]", "pandas/tests/tools/test_to_numeric.py::test_to_numeric_from_nullable_string[string[python]-values1-expected1]", "pandas/tests/tools/test_to_numeric.py::test_to_numeric_from_nullable_string[string[pyarrow]...
["pandas/tests/tools/test_to_numeric.py::test_datetime_like[pytz.FixedOffset(-300)-transform_assert_equal0]", "pandas/tests/tools/test_to_numeric.py::test_to_numeric_dtype_backend_downcasting_uint[uint8[pyarrow]-pyarrow]", "pandas/tests/tools/test_to_numeric.py::test_really_large_in_arr[100000000000000000000-True-str-T...
null
true
2023-03-24T18:58:45Z
2
25
16
3,433
0
0.85
1
0.77
1
0.583333
89.345
491
swe_gym::train::1790
swe_gym
train
1,790
pandas-dev__pandas-55841
pandas-dev/pandas
pandas-dev/pandas
python
6493d2a4bcf402d5fcb8b5349e70928d8dbf3344
BUG: describe started rounding reported percentile 99.999% to 100% ### 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 bu...
Confirmed on `main` I think the change was implemented in #48298 where the rounding logic was updated. It is because in this line it is giving back a precision of 4 and therefore rounding up 99.999: https://github.com/pandas-dev/pandas/blob/2d2d67db48413fde356bce5c8d376d5b9dd5d0c2/pandas/io/formats/format.py#L...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 0b1eb1760b94f..c591ea4f24dba 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -423,7 +423,6 @@ I/O - Bug in :meth:`pandas.read_excel` with ``engine="odf"`` (``ods`` files) when string contains annotati...
diff --git a/pandas/tests/io/formats/test_format.py b/pandas/tests/io/formats/test_format.py index b3b718a81ccf5..9e7d59ffb50c2 100644 --- a/pandas/tests/io/formats/test_format.py +++ b/pandas/tests/io/formats/test_format.py @@ -2196,6 +2196,10 @@ class TestFormatPercentiles: ), ([0.281, 0.29,...
["pandas/tests/io/formats/test_format.py::TestFormatPercentiles::test_format_percentiles[percentiles4-expected4]"]
["pandas/tests/io/formats/test_format.py::TestSeriesFormatting::test_format_explicit", "pandas/tests/io/formats/test_format.py::TestSeriesFormatting::test_east_asian_unicode_series", "pandas/tests/io/formats/test_format.py::TestTimedelta64Formatter::test_days_neg", "pandas/tests/io/formats/test_format.py::TestDataFrame...
null
true
2023-11-06T07:22:36Z
2
24
1
3,297
0
0.85
1
0.77
1
0.58
89.335
492
swe_gym::train::275
swe_gym
train
275
getmoto__moto-6795
getmoto/moto
getmoto/moto
python
a75e30faae06c4e8b9073b28a2cf0b8e6c4c5715
Moto doesn't base64 decode messages before signing them Hello, we've been testing some of our KMS interactions with Moto and have run across a weird inconsistency. I've found that Moto is not base64 decoding the messages before signing them--AWS does. Its hard to notice it when you're using moto for both the sign and v...
Hi @blbuford, thanks for raising this, and for the detailed repro case! > Is this as simple as dropping a one line encode/decode in the related sign/verify in the KMS backed? > It's actually even easier than that - I'll submit a PR for this shortly.
diff --git a/moto/kms/models.py b/moto/kms/models.py --- a/moto/kms/models.py +++ b/moto/kms/models.py @@ -629,9 +629,8 @@ def __ensure_valid_key_spec(self, key_spec: str) -> None: def sign( self, key_id: str, message: bytes, signing_algorithm: str ) -> Tuple[str, bytes, str]: - """Sign messag...
diff --git a/tests/test_kms/test_kms_boto3.py b/tests/test_kms/test_kms_boto3.py --- a/tests/test_kms/test_kms_boto3.py +++ b/tests/test_kms/test_kms_boto3.py @@ -1,7 +1,7 @@ import json from datetime import datetime -from cryptography.hazmat.primitives import hashes -from cryptography.hazmat.primitives.asymmetric im...
["tests/test_kms/test_kms_boto3.py::test_ensure_key_can_be_verified_manually"]
["tests/test_kms/test_kms_boto3.py::test__create_alias__raises_if_alias_has_restricted_characters[alias/my-alias!]", "tests/test_kms/test_kms_boto3.py::test_update_key_description", "tests/test_kms/test_kms_boto3.py::test_invalid_signing_algorithm_for_key_spec_type_ECDSA[ECC_SECG_P256K1-ECDSA_SHA_512-valid_signing_algo...
null
true
2023-09-08 21:11:12
2
22
1
3,454
0
0.85
1
0.77
1
0.573333
89.315
493
swe_gym::train::2406
swe_gym
train
2,406
modin-project__modin-6649
modin-project/modin
modin-project/modin
python
c400b96f7361b11428f31ada097ba24ea15d33e3
BUG: groupby and apply function produced unexpected column name `__reduced__` ### 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...
Confirmed. Somewhat similar to https://github.com/modin-project/modin/issues/3219 @Garra1980 This function seems to be unstable. Below code will give me AssertionError ```py import modin.pandas as pd import numpy as np df = pd.DataFrame(np.random.rand(1246, 49), index=[f's{i+1}' for i in range(1246)]).round(2)...
diff --git a/modin/pandas/groupby.py b/modin/pandas/groupby.py --- a/modin/pandas/groupby.py +++ b/modin/pandas/groupby.py @@ -659,16 +659,20 @@ def apply(self, func, *args, **kwargs): if not isinstance(func, BuiltinFunctionType): func = wrap_udf_function(func) - return self._check_index(...
diff --git a/modin/pandas/test/test_groupby.py b/modin/pandas/test/test_groupby.py --- a/modin/pandas/test/test_groupby.py +++ b/modin/pandas/test/test_groupby.py @@ -2962,6 +2962,23 @@ def test_reshuffling_groupby_on_strings(modify_config): ) +@pytest.mark.parametrize( + "modify_config", [{ExperimentalGrou...
["modin/pandas/test/test_groupby.py::test_groupby_apply_series_result[modify_config0]"]
["modin/pandas/test/test_groupby.py::test_agg_func_None_rename[False-by_and_agg_dict0]", "modin/pandas/test/test_groupby.py::test_validate_by", "modin/pandas/test/test_groupby.py::test_not_str_by[True-by4]", "modin/pandas/test/test_groupby.py::test_unknown_groupby[columns1]", "modin/pandas/test/test_groupby.py::test_gr...
null
true
2023-10-14T03:50:23Z
1
22
1
3,220
0
0.85
1
0.77
1
0.573333
89.315
494
swe_gym::train::1152
swe_gym
train
1,152
pandas-dev__pandas-57865
pandas-dev/pandas
pandas-dev/pandas
python
dd56ad8715a59bed83d1858eadb2ecdcfa69f47d
BUG: DataFrame.replace with regex on `StringDtype` column with NA values stops replacing after first 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 pa...
Oops, pasting again. Maybe related to issue #54399
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index 7263329d2e53b..dfbebae8d42b6 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -296,6 +296,7 @@ Bug fixes - Fixed bug in :meth:`DataFrameGroupBy.apply` that was returning a completely empty DataFrame wh...
diff --git a/pandas/tests/series/methods/test_replace.py b/pandas/tests/series/methods/test_replace.py index d4ec09332ad97..c7b894e73d0dd 100644 --- a/pandas/tests/series/methods/test_replace.py +++ b/pandas/tests/series/methods/test_replace.py @@ -616,7 +616,8 @@ def test_replace_with_compiled_regex(self): def ...
["pandas/tests/series/methods/test_replace.py::TestSeriesReplace::test_pandas_replace_na"]
["pandas/tests/series/methods/test_replace.py::TestSeriesReplace::test_replace_nat_with_tz", "pandas/tests/series/methods/test_replace.py::TestSeriesReplace::test_replace_cascade[False]", "pandas/tests/series/methods/test_replace.py::TestSeriesReplace::test_replace_commutative[ser0-to_replace0-exp0]", "pandas/tests/ser...
null
true
2024-03-16T13:59:56Z
2
22
1
3,677
0
0.85
1
0.77
1
0.573333
89.315
495
swe_gym::train::1429
swe_gym
train
1,429
pandas-dev__pandas-52470
pandas-dev/pandas
pandas-dev/pandas
python
fdc13d65822e6572ac0e2c99c51c84c32dd72b9d
BUG: describe with double[pyarrow] does not return pyarrow backed 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. - [ ] I have confirmed ...
diff --git a/doc/source/whatsnew/v2.0.1.rst b/doc/source/whatsnew/v2.0.1.rst index 4fda2cd11ce12..33ce62415ea0f 100644 --- a/doc/source/whatsnew/v2.0.1.rst +++ b/doc/source/whatsnew/v2.0.1.rst @@ -21,6 +21,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ - Fixed bug in :func:`merge` when merging with ``ArrowDtype`` one on...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index df470d85a4fad..31d4c76a8db11 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -2387,3 +2387,16 @@ def test_setitem_boolean_replace_with_mask_segfault(): expected = arr.copy(...
["pandas/tests/extension/test_arrow.py::test_describe_numeric_data[pa_type9]", "pandas/tests/extension/test_arrow.py::test_describe_numeric_data[pa_type7]", "pandas/tests/extension/test_arrow.py::test_describe_numeric_data[pa_type4]", "pandas/tests/extension/test_arrow.py::test_describe_numeric_data[pa_type5]", "pandas...
["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-04-05T23:00:20Z
2
9
10
2,683
0
0.85
1
0.85
1
0.477167
89.3065
496
swe_gym::train::555
swe_gym
train
555
python__mypy-15174
python/mypy
python/mypy
python
d71ece838c54488af0452cc9ccca5f2b3f2a8663
`incompatible type` when combining a literal with keyword expansion **Bug Report** Having a code snippet: ``` dict1 = {"a": 1, "b": "a"} dict2 = {"c": 1, "d": 2, **dict1} ``` I receive `error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[str, object]"; expected "SupportsKeysAndGetItem[str, i...
diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py --- a/mypy/checkexpr.py +++ b/mypy/checkexpr.py @@ -4319,12 +4319,19 @@ def visit_dict_expr(self, e: DictExpr) -> Type: if dt: return dt + # Define type variables (used in constructors below). + kt = TypeVarType("KT", "KT", -1, [],...
diff --git a/test-data/unit/check-expressions.test b/test-data/unit/check-expressions.test --- a/test-data/unit/check-expressions.test +++ b/test-data/unit/check-expressions.test @@ -1800,11 +1800,12 @@ a = {'a': 1} b = {'z': 26, **a} c = {**b} d = {**a, **b, 'c': 3} -e = {1: 'a', **a} # E: Argument 1 to "update" o...
["mypy/test/testcheck.py::TypeCheckSuite::check-generics.test::testDictStarAnyKeyJoinValue", "mypy/test/testcheck.py::TypeCheckSuite::check-generics.test::testDictStarInference", "mypy/test/testcheck.py::TypeCheckSuite::check-python38.test::testDictExpressionErrorLocations"]
["mypy/test/testpythoneval.py::PythonEvaluationSuite::pythoneval.test::testLoadsOfOverloads"]
null
true
2023-05-03T08:31:28Z
2
94
3
977
0
0.85
1
0.85
1
0.476167
89.3035
497
swe_gym::train::1535
swe_gym
train
1,535
pandas-dev__pandas-57046
pandas-dev/pandas
pandas-dev/pandas
python
aaa276043223821bf743e51b373148b41cbf857d
BUG: unexpected results for `idxmax` groupby aggregation on uint column ### 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...
Thanks for the report - we currently use the minimum/maximum value of a dtype as the starting value. This was essentially adopted from the min/max implementation. However, unlike max, it matters to idxmax when the minimum value is encountered. We can avoid this by using a 1-d Boolean array to track whether a label was ...
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index d3065cdd8b624..f2d406620774b 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -14,6 +14,8 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ - Fixed regression in :func:`merge...
diff --git a/pandas/tests/groupby/test_reductions.py b/pandas/tests/groupby/test_reductions.py index 7530c9ca78cbc..d24a2a26bba81 100644 --- a/pandas/tests/groupby/test_reductions.py +++ b/pandas/tests/groupby/test_reductions.py @@ -257,6 +257,68 @@ def test_empty(frame_or_series, all_boolean_reductions): tm.asser...
["pandas/tests/groupby/test_reductions.py::test_idxmin_idxmax_extremes_skipna[True-float64-idxmax]", "pandas/tests/groupby/test_reductions.py::test_idxmin_idxmax_extremes[uint32-idxmin]", "pandas/tests/groupby/test_reductions.py::test_idxmin_idxmax_extremes_skipna[True-float32-idxmin]", "pandas/tests/groupby/test_reduc...
["pandas/tests/groupby/test_reductions.py::test_regression_allowlist_methods[True-False-0-prod]", "pandas/tests/groupby/test_reductions.py::test_groupby_non_arithmetic_agg_types[last-data1-float32]", "pandas/tests/groupby/test_reductions.py::test_object_NA_raises_with_skipna_false[any]", "pandas/tests/groupby/test_redu...
null
true
2024-01-24T04:29:20Z
3
20
20
3,584
0
0.85
1
0.77
1
0.566667
89.295
498
swe_gym::train::528
swe_gym
train
528
python__mypy-10401
python/mypy
python/mypy
python
44925f4b121392135440f53d7c8a3fb30593d6cc
Unresolved references + tuples crashes mypy **Crash Report** Uhh.. mypy crashed? Not sure what to put here... **Traceback** (running dev version, and I put a few print statements to figure out what was erroring, so the line numbers may be off) ``` $ mypy repro.py Traceback (most recent call last): File "/home/a...
diff --git a/mypy/join.py b/mypy/join.py --- a/mypy/join.py +++ b/mypy/join.py @@ -7,7 +7,7 @@ Type, AnyType, NoneType, TypeVisitor, Instance, UnboundType, TypeVarType, CallableType, TupleType, TypedDictType, ErasedType, UnionType, FunctionLike, Overloaded, LiteralType, PartialType, DeletedType, Uninhabi...
diff --git a/test-data/unit/check-tuples.test b/test-data/unit/check-tuples.test --- a/test-data/unit/check-tuples.test +++ b/test-data/unit/check-tuples.test @@ -1470,3 +1470,29 @@ x9, y9, x10, y10, z5 = *points2, 1, *points2 # E: Contiguous iterable with same [case testAssignEmptyBogus] () = 1 # E: "Literal[1]?" o...
["mypy/test/testcheck.py::TypeCheckSuite::testMultipleUndefinedTypeAndTuple", "mypy/test/testcheck.py::TypeCheckSuite::testSingleUndefinedTypeAndTuple"]
["mypy/test/testcheck.py::TypeCheckSuite::testAssignEmptyBogus"]
null
true
2021-05-02T04:23:21Z
1
10
2
2,631
0
0.85
1
0.85
1
0.471833
89.2905
499
swe_bench_verified::test::14
swe_bench_verified
test
14
astropy__astropy-14598
astropy/astropy
astropy/astropy
python
80c3854a5f4f4a6ab86c03d9db7854767fcd83c1
Inconsistency in double single-quote ('') management in FITS Card ### Description The management of single-quotes in FITS cards seem correct, except *sometimes* when dealing with null strings, i.e. double single quotes (`''`), which sometimes are transformed into single single quotes (`'`). E.g.: ```python In [39]: f...
Hello, I would like to be assigned to this issue if possible. Thank you. Hi @ashtonw3, We don't usually assign people to issues, mentioning here that you want to work on it is enough. But on this specific issue I already have a fix and will open a PR soon, I was going to do that yesterday but I found another related ...
diff --git a/astropy/io/fits/card.py b/astropy/io/fits/card.py --- a/astropy/io/fits/card.py +++ b/astropy/io/fits/card.py @@ -66,7 +66,7 @@ class Card(_Verify): # followed by an optional comment _strg = r"\'(?P<strg>([ -~]+?|\'\'|) *?)\'(?=$|/| )" _comm_field = r"(?P<comm_field>(?P<sepr>/ *)(?P<comm>(.|...
diff --git a/astropy/io/fits/tests/test_header.py b/astropy/io/fits/tests/test_header.py --- a/astropy/io/fits/tests/test_header.py +++ b/astropy/io/fits/tests/test_header.py @@ -582,6 +582,22 @@ def test_long_string_value_via_fromstring(self, capsys): "CONTINUE '' / comments in line 1 comments with '...
["astropy/io/fits/tests/test_header.py::TestHeaderFunctions::test_long_string_value_with_quotes"]
["astropy/io/fits/tests/test_header.py::test_shallow_copy", "astropy/io/fits/tests/test_header.py::test_init_with_header", "astropy/io/fits/tests/test_header.py::test_init_with_dict", "astropy/io/fits/tests/test_header.py::test_init_with_ordereddict", "astropy/io/fits/tests/test_header.py::TestHeaderFunctions::test_ren...
null
true
2023-03-29T10:34:49Z
1
4
1
2,550
0
1
1
0.85
0.8
0.438333
89.29