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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1,200 | swe_bench_verified::test::195 | swe_bench_verified | test | 195 | django__django-15525 | django/django | django/django | python | fbacaa58ffc5a62456ee68b90efa13957f761ce4 | loaddata fails on non-default database when natural keys uses foreign keys.
Description
(last modified by François Granade)
I've got a one-to-many relationship between two models Book and Author, that define a natural keys in both models. I'm loading some data from a fixture. It works in the default database, but w... | Thanks for this report. I was able to fix the issue by specifying db before checking natural_key(): django/core/serializers/base.py diff --git a/django/core/serializers/base.py b/django/core/serializers/base.py index da85cb4b92..517d2cad85 100644 a b def build_instance(Model, data, db): 336336 and hasattr(default_manag... | diff --git a/django/core/serializers/base.py b/django/core/serializers/base.py
--- a/django/core/serializers/base.py
+++ b/django/core/serializers/base.py
@@ -336,7 +336,9 @@ def build_instance(Model, data, db):
and hasattr(default_manager, "get_by_natural_key")
and hasattr(Model, "natural_key")
... | diff --git a/tests/backends/sqlite/test_features.py b/tests/backends/sqlite/test_features.py
--- a/tests/backends/sqlite/test_features.py
+++ b/tests/backends/sqlite/test_features.py
@@ -10,8 +10,9 @@ def test_supports_json_field_operational_error(self):
if hasattr(connection.features, "supports_json_field"):
... | ["Natural keys with foreing keys in dependencies works in a multiple"] | ["test_supports_json_field_operational_error (backends.sqlite.test_features.FeaturesTests)", "test_fixtures_loaded (fixtures_regress.tests.TestLoadFixtureFromOtherAppDirectory)", "M2M relations with explicit through models should NOT count as", "Circular M2M relations with explicit through models should be serializable... | null | true | 2022-03-18T10:39:26Z | 1 | 4 | 1 | 4,349 | 0 | 1 | 1 | 0.62 | 0.8 | 0.513333 | 82.96 | |
1,201 | swe_gym::train::2274 | swe_gym | train | 2,274 | Project-MONAI__MONAI-1887 | Project-MONAI/MONAI | project-monai/monai | python | 9f6ceebca87c06ec9fed8447791c9a7f3378ef0a | improve list_data_collate error messages
**Is your feature request related to a problem? Please describe.**
`list_data_collate` or the pytorch's `default_collate` may raise `RuntimeError` or `TypeError`, but the error messages are difficult to understand. This is a feature request to improve the error message especiall... | diff --git a/monai/data/utils.py b/monai/data/utils.py
--- a/monai/data/utils.py
+++ b/monai/data/utils.py
@@ -15,7 +15,7 @@
import os
import pickle
import warnings
-from collections import defaultdict
+from collections import abc, defaultdict
from itertools import product, starmap
from pathlib import PurePath
fr... | diff --git a/tests/test_dataloader.py b/tests/test_dataloader.py
--- a/tests/test_dataloader.py
+++ b/tests/test_dataloader.py
@@ -12,9 +12,27 @@
import sys
import unittest
-from monai.data import CacheDataset, DataLoader
+import numpy as np
+import torch
+from parameterized import parameterized
+
+from monai.data ... | ["tests/test_dataloader.py::TestDataLoader::test_exception_0", "tests/test_dataloader.py::TestDataLoader::test_exception_1"] | ["tests/test_dataloader.py::TestDataLoader::test_values"] | null | true | 2021-03-29T08:50:32Z | 1 | 14 | 2 | 4,738 | 0 | 0.85 | 1 | 0.62 | 1 | 0.546667 | 82.96 | ||
1,202 | swe_gym::train::1067 | swe_gym | train | 1,067 | pydantic__pydantic-5021 | pydantic/pydantic | pydantic/pydantic | python | ef3cc495a9c86553b62a95a6052fd9b6ebc045e9 | Show clearer error message in the event of undefined annotations (v2)
Currently, if you include a forward reference _without_ setting the config field `undefined_types_warning = True`, it is difficult to understand what is happening:
```python
from typing import Optional
from pydantic import BaseModel
class Model1(Ba... | diff --git a/pydantic/_internal/_model_construction.py b/pydantic/_internal/_model_construction.py
--- a/pydantic/_internal/_model_construction.py
+++ b/pydantic/_internal/_model_construction.py
@@ -144,10 +144,18 @@ def complete_model_class(
except PydanticUndefinedAnnotation as e:
if raise_errors:
... | diff --git a/tests/test_forward_ref.py b/tests/test_forward_ref.py
--- a/tests/test_forward_ref.py
+++ b/tests/test_forward_ref.py
@@ -64,7 +64,7 @@ class Bar(BaseModel):
'FieldInfo(annotation=SelfType, required=False, metadata=[SchemaRef(__pydantic_core_schema__'
)
# but Foo is not ready to use
- ... | ["tests/test_forward_ref.py::test_undefined_types_warning_raised_by_usage", "tests/test_forward_ref.py::test_undefined_types_warning_1a_raised_by_default_2a_future_annotations", "tests/test_forward_ref.py::test_undefined_types_warning_1a_raised_by_default_2b_forward_ref", "tests/test_forward_ref.py::test_forward_ref_au... | ["tests/test_forward_ref.py::test_self_forward_ref_module", "tests/test_forward_ref.py::test_self_forward_ref_local", "tests/test_forward_ref.py::test_undefined_types_warning_1b_suppressed_via_config_2b_forward_ref", "tests/test_forward_ref.py::test_postponed_annotations_auto_model_rebuild", "tests/test_forward_ref.py:... | null | true | 2023-02-06T23:55:28Z | 1 | 14 | 4 | 3,614 | 0 | 0.85 | 1 | 0.62 | 1 | 0.546667 | 82.96 | ||
1,203 | swe_bench_pro::test::370 | swe_bench_pro | test | 370 | instance_gravitational__teleport-e6d86299a855687b21970504fbf06f52a8f80c74-vce94f93ad1030e3136852817f2423c1b3ac37bc4 | gravitational/teleport | gravitational/teleport | go | ea02952f53663a6a068ac70088ad5a044f54a094 | ## Title: Update user traits when renewing session
### Issue type
Bug
### Description
When a user updates their traits (such as logins or database users) through the web UI, the changes are not applied to the currently active web session. The session continues to use stale certificate data from before the update. T... | ## Requirements
- The session renewal endpoint must accept a request object `WebSessionReq` with fields `User` (string), `PrevSessionID` (string), `AccessRequestID` (string), `Switchback` (bool), and `ReloadUser` (bool).
- Renewing a web session with only `User` and `PrevSessionID` set must succeed and return a new `ty... | diff --git a/lib/auth/apiserver.go b/lib/auth/apiserver.go
index 846210513222f..3f99d28b1673e 100644
--- a/lib/auth/apiserver.go
+++ b/lib/auth/apiserver.go
@@ -500,6 +500,9 @@ type WebSessionReq struct {
// Switchback is a flag to indicate if user is wanting to switchback from an assumed role
// back to their defa... | diff --git a/lib/auth/tls_test.go b/lib/auth/tls_test.go
index 79d5b63d2b1c3..1fb165db8e946 100644
--- a/lib/auth/tls_test.go
+++ b/lib/auth/tls_test.go
@@ -1643,6 +1643,61 @@ func TestWebSessionWithApprovedAccessRequestAndSwitchback(t *testing.T) {
require.Len(t, certRequests(sess2.GetTLSCert()), 0)
}
+func TestE... | ["TestWebSessionWithoutAccessRequest", "TestWebSessionMultiAccessRequests", "TestWebSessionWithApprovedAccessRequestAndSwitchback", "TestExtendWebSessionWithReloadUser"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-e6d86299a855687b21970504fbf06f52a8f80c74-vce94f93ad1030e3136852817f2423c1b3ac37bc4 | true | null | 4 | 40 | 4 | 1,236 | 0 | 0.95 | 1 | 0.7 | 0.85 | 0.339333 | 82.9555 | |
1,204 | swe_gym::train::321 | swe_gym | train | 321 | getmoto__moto-7331 | getmoto/moto | getmoto/moto | python | ad63e3966bbcb65dc1a7c9ef1c90b31c6d6100f4 | Call `GetId` on Cognito Identity when Access Control is available
Authorization may not be included in some Cognito operations.
Not including Authorization results in an error when Access control is enabled.
moto server version: 4.2.14
stack trace.
```
Error on request:
Traceback (most recent call last):
File "/usr... | diff --git a/moto/core/responses.py b/moto/core/responses.py
--- a/moto/core/responses.py
+++ b/moto/core/responses.py
@@ -143,6 +143,14 @@ def response_template(self, source: str) -> Template:
class ActionAuthenticatorMixin(object):
request_count: ClassVar[int] = 0
+ PUBLIC_OPERATIONS = [
+ "AWSCogni... | 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
@@ -19,6 +19,7 @@
from moto import mock_aws, settings
from moto.cognitoidp.utils import create_id
from moto.core import DEFAUL... | ["tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_with_invalid_user_pool", "tests/test_cognitoidp/test_cognitoidp.py::test_get_user_unknown_accesstoken", "tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password", "tests/test_cognitoidp/test_cognitoidp.py::test_confirm_sign_up"] | ["tests/test_cognitoidp/test_cognitoidp.py::test_list_groups_when_limit_more_than_total_items", "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_update_user... | null | true | 2024-02-09 23:36:56 | 1 | 13 | 4 | 4,033 | 0 | 0.85 | 1 | 0.62 | 1 | 0.543333 | 82.95 | ||
1,205 | swe_gym::train::2211 | swe_gym | train | 2,211 | Project-MONAI__MONAI-4972 | Project-MONAI/MONAI | project-monai/monai | python | f49cc963179d1ca678f6ca2d05918157959bd9b3 | `WSIReader` does not support `TiffFile` backend
`image_reader.WSIReader` supports tifffile (https://github.com/Project-MONAI/MONAI/blob/e4624678cc15b5a5670776715c935279f7837c89/monai/data/image_reader.py#L1257), but it does not supported in `wsi_reader.WSIReader`. Can I ask what is the purpose here to remove the suppor... | May need @drbeh 's help here : )
Hi @yiheng-wang-nv, thank you very much to raise this issue. Could you please let me know what is the input image that you are using? and also your environment?
We have intentionally dropped tifffile after cucim reported to be faster than tifffile in reading the entire image to make th... | diff --git a/monai/data/__init__.py b/monai/data/__init__.py
--- a/monai/data/__init__.py
+++ b/monai/data/__init__.py
@@ -108,7 +108,7 @@
)
from .video_dataset import CameraDataset, VideoDataset, VideoFileDataset
from .wsi_datasets import MaskedPatchWSIDataset, PatchWSIDataset, SlidingPatchWSIDataset
-from .wsi_rea... | diff --git a/tests/test_wsireader.py b/tests/test_wsireader.py
--- a/tests/test_wsireader.py
+++ b/tests/test_wsireader.py
@@ -279,45 +279,41 @@ def test_read_whole_image(self, file_path, level, expected_shape):
@parameterized.expand([TEST_CASE_1, TEST_CASE_2, TEST_CASE_3, TEST_CASE_4])
def test_read_... | ["tests/test_wsireader.py::TestTiffFile::test_read_region_3__testbed_tests_testing_data_temp_CMU_1_tiff_tiff", "tests/test_wsireader.py::TestTiffFile::test_read_malformats_0", "tests/test_wsireader.py::TestTiffFile::test_read_malformats_2", "tests/test_wsireader.py::TestTiffFile::test_read_rgba_0", "tests/test_wsireade... | ["tests/test_wsireader.py::TestTiffFileDeprecated::test_read_malformats_0", "tests/test_wsireader.py::TestCuCIM::test_read_region_2__testbed_tests_testing_data_temp_CMU_1_tiff_tiff", "tests/test_wsireader.py::TestTiffFileDeprecated::test_read_rgba_0", "tests/test_wsireader.py::TestTiffFileDeprecated::test_read_malforma... | null | true | 2022-08-23T12:40:00Z | 2 | 135 | 14 | 545 | 0 | 0.85 | 1 | 0.55 | 1 | 0.540833 | 82.9475 | |
1,206 | swe_gym::train::170 | swe_gym | train | 170 | getmoto__moto-5428 | getmoto/moto | getmoto/moto | python | 067e00871640dd9574b4466e39044f8198d5bd7e | logs.filter_log_events is only partially implemented
I suspect this is already well known, but mock_logs.filter_log_events is basically unimplemented.
Given the following code:
```
import boto3
import time
from moto import mock_logs
log_group_name = 'stuff'
log_stream_name = 'whatnot'
mock = mock_logs()
mock.start(... | Thanks; setting as a feature request. | diff --git a/moto/logs/models.py b/moto/logs/models.py
--- a/moto/logs/models.py
+++ b/moto/logs/models.py
@@ -14,7 +14,7 @@
LimitExceededException,
)
from moto.s3.models import s3_backends
-from .utils import PAGINATION_MODEL
+from .utils import PAGINATION_MODEL, EventMessageFilter
MAX_RESOURCE_POLICIES_PER_... | diff --git a/tests/test_logs/test_logs.py b/tests/test_logs/test_logs.py
--- a/tests/test_logs/test_logs.py
+++ b/tests/test_logs/test_logs.py
@@ -1,8 +1,6 @@
import json
-import os
import time
import sure # noqa # pylint: disable=unused-import
-from unittest import SkipTest
from datetime import timedelta, datetim... | ["tests/test_logs/test_logs_filter.py::TestLogsFilterPattern::test_multiple_words_pattern", "tests/test_logs/test_logs_filter.py::TestLogsFilterPattern::test_unknown_pattern", "tests/test_logs/test_logs_filter.py::TestLogsFilterPattern::test_quoted_pattern", "tests/test_logs/test_logs_filter.py::TestLogsFilterPattern::... | ["tests/test_logs/test_logs.py::test_create_log_group[arn:aws:kms:us-east-1:000000000000:key/51d81fab-b138-4bd2-8a09-07fd6d37224d]", "tests/test_logs/test_logs.py::test_describe_log_streams_invalid_order_by[LogStreamname]", "tests/test_logs/test_logs.py::test_create_log_group_invalid_name_length[513]", "tests/test_logs... | null | true | 2022-08-28 22:29:27 | 2 | 56 | 4 | 2,090 | 0 | 0.85 | 1 | 0.55 | 1 | 0.535 | 82.93 | |
1,207 | swe_gym::train::2059 | swe_gym | train | 2,059 | Project-MONAI__MONAI-7395 | Project-MONAI/MONAI | project-monai/monai | python | 78295c7bfbd86c79765bff228040004dcbbcaae3 | ImageFilterd removes applied_operations
**Describe the bug**
When ImageFilterd is in the transformation sequence it removes all the applied_operations from the history.
Now we cant inverse the transformation sequence!
**To Reproduce**
```from monai.transforms import (
LoadImaged,
Spacingd,
ImageFilterd,
... | diff --git a/monai/transforms/utility/array.py b/monai/transforms/utility/array.py
--- a/monai/transforms/utility/array.py
+++ b/monai/transforms/utility/array.py
@@ -1562,17 +1562,22 @@ def __init__(self, filter: str | NdarrayOrTensor | nn.Module, filter_size: int |
self.filter_size = filter_size
sel... | diff --git a/tests/test_image_filter.py b/tests/test_image_filter.py
--- a/tests/test_image_filter.py
+++ b/tests/test_image_filter.py
@@ -17,6 +17,7 @@
import torch
from parameterized import parameterized
+from monai.data.meta_tensor import MetaTensor
from monai.networks.layers.simplelayers import GaussianFilter
... | ["tests/test_image_filter.py::TestImageFilter::test_pass_applied_operations"] | ["tests/test_image_filter.py::TestImageFilter::test_init_from_string_2_elliptical", "tests/test_image_filter.py::TestImageFilter::test_init_from_wrong_type_fails", "tests/test_image_filter.py::TestRandImageFilter::test_call_2d_prob_1_1_laplace", "tests/test_image_filter.py::TestImageFilter::test_init_from_string_4_shar... | null | true | 2024-01-16T23:37:54Z | 1 | 11 | 1 | 4,733 | 0 | 0.85 | 1 | 0.62 | 1 | 0.536667 | 82.93 | ||
1,208 | swe_gym::train::847 | swe_gym | train | 847 | iterative__dvc-9620 | iterative/dvc | iterative/dvc | python | fd73b389c60c771fe79c04fa5ae4d7b4b0ef65f2 | exp list/show: unexpected branch/ref output
# Bug Report
## Description
See the example:
```console
$ git branch --show-current
dormy-raja-branch
$ dvc exp list
refs/ta:
41ecd82 [cagey-fore]
cfdace7 [cauld-amyl]
baf5c80 [gules-dirk]
2228676 [sewed-merk]
7ee8988 [slant-alga]
... | diff --git a/dvc/commands/experiments/ls.py b/dvc/commands/experiments/ls.py
--- a/dvc/commands/experiments/ls.py
+++ b/dvc/commands/experiments/ls.py
@@ -25,7 +25,14 @@ def run(self):
for baseline in exps:
if not (name_only or sha_only):
- ui.write(f"{baseline[:7]}:")
+ ... | diff --git a/tests/func/experiments/test_experiments.py b/tests/func/experiments/test_experiments.py
--- a/tests/func/experiments/test_experiments.py
+++ b/tests/func/experiments/test_experiments.py
@@ -362,7 +362,7 @@ def test_list(tmp_dir, scm, dvc, exp_stage):
exp_c = first(results)
ref_info_c = first(exp_... | ["tests/unit/command/test_experiments.py::test_experiments_list_format[args0-main:\\n\\tsha-a"] | ["tests/func/experiments/test_save.py::test_exp_save_invalid_name[invalidname.]", "tests/func/experiments/test_save.py::test_exp_save_invalid_name[invalid?name]", "tests/unit/command/test_experiments.py::test_experiments_remove_invalid", "tests/unit/command/test_experiments.py::test_experiments_remove_special", "tests/... | null | true | 2023-06-16T19:16:13Z | 2 | 11 | 1 | 5,966 | 0 | 0.85 | 1 | 0.62 | 1 | 0.536667 | 82.93 | ||
1,209 | swe_gym::train::770 | swe_gym | train | 770 | iterative__dvc-5005 | iterative/dvc | iterative/dvc | python | 3a3fa7cdde43ad2e8e31827c46160c8ce86876a0 | dvc 1.10.2 does not provide the extra 'webdavs'
## Bug Report
I wanted to test the webdav protocol. The command `dvc push -r webdavremote` (where webdavremote is the name of my remote). That gave me the useful output:
```
ERROR: failed to push data to the cloud - URL '***snipped***' is supported but requires these miss... | The error message should say to install `dvc[webdav]` and not `dvc[webdavs]`, but either way it should also be installed automatically with `[all]`.
Is this a DVC installation that you've upgraded from earlier versions via pip? webdav support was added (relatively) recently, so it's possible that if you upgraded via... | diff --git a/dvc/tree/base.py b/dvc/tree/base.py
--- a/dvc/tree/base.py
+++ b/dvc/tree/base.py
@@ -70,7 +70,7 @@ def __init__(self, repo, config):
self.repo = repo
self.config = config
- self._check_requires(config)
+ self._check_requires()
shared = config.get("shared")
... | diff --git a/tests/unit/remote/test_base.py b/tests/unit/remote/test_base.py
--- a/tests/unit/remote/test_base.py
+++ b/tests/unit/remote/test_base.py
@@ -5,7 +5,7 @@
from dvc.cache.base import CloudCache
from dvc.path_info import PathInfo
-from dvc.tree.base import BaseTree, RemoteCmdError, RemoteMissingDepsError
... | ["tests/unit/tree/test_base.py::test_missing_deps[conda-conda", "tests/unit/tree/test_base.py::test_missing_deps[None-Please"] | ["tests/unit/remote/test_base.py::test_list_paths", "tests/unit/remote/test_base.py::test_cmd_error", "tests/unit/tree/test_base.py::test_missing_deps[pip-pip", "tests/unit/remote/test_base.py::test_is_dir_hash[3456.dir-True]", "tests/unit/remote/test_base.py::test_is_dir_hash[3456-False]", "tests/unit/remote/test_base... | null | true | 2020-12-01T11:44:43Z | 1 | 57 | 2 | 2,055 | 0 | 0.85 | 1 | 0.55 | 1 | 0.5325 | 82.9225 | |
1,210 | swe_bench_verified::test::287 | swe_bench_verified | test | 287 | mwaskom__seaborn-3069 | mwaskom/seaborn | mwaskom/seaborn | python | 54cab15bdacfaa05a88fbc5502a5b322d99f148e | Nominal scale should be drawn the same way as categorical scales
Three distinctive things happen on the categorical axis in seaborn's categorical plots:
1. The scale is drawn to +/- 0.5 from the first and last tick, rather than using the normal margin logic
2. A grid is not shown, even when it otherwise would be with ... | diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py
--- a/seaborn/_core/plot.py
+++ b/seaborn/_core/plot.py
@@ -25,7 +25,7 @@
from seaborn._stats.base import Stat
from seaborn._core.data import PlotData
from seaborn._core.moves import Move
-from seaborn._core.scales import Scale
+from seaborn._core.scales imp... | diff --git a/tests/_core/test_plot.py b/tests/_core/test_plot.py
--- a/tests/_core/test_plot.py
+++ b/tests/_core/test_plot.py
@@ -645,6 +645,28 @@ def test_undefined_variable_raises(self):
with pytest.raises(RuntimeError, match=err):
p.plot()
+ def test_nominal_x_axis_tweaks(self):
+
+ ... | ["tests/_core/test_plot.py::TestScaling::test_nominal_x_axis_tweaks", "tests/_core/test_plot.py::TestScaling::test_nominal_y_axis_tweaks"] | ["tests/_core/test_plot.py::TestInit::test_empty", "tests/_core/test_plot.py::TestInit::test_data_only", "tests/_core/test_plot.py::TestInit::test_df_and_named_variables", "tests/_core/test_plot.py::TestInit::test_df_and_mixed_variables", "tests/_core/test_plot.py::TestInit::test_vector_variables_only", "tests/_core/te... | null | true | 2022-10-09T23:31:20Z | 1 | 15 | 2 | 1,175 | 0 | 1 | 1 | 0.55 | 1 | 0.245833 | 82.9125 | ||
1,211 | swe_gym::train::2151 | swe_gym | train | 2,151 | Project-MONAI__MONAI-2356 | Project-MONAI/MONAI | project-monai/monai | python | e6aa268e093434688907324cfe5d885c4d6ad9b4 | paramer group format error
**Describe the bug**
`generate_param_groups` doesn't return the correct format for `match_type 'filter'`
```py
import torch
from monai.networks.nets import Unet
from monai.optimizers import generate_param_groups
net = Unet(dimensions=3, in_channels=1, out_channels=3, channels=[2, 2, 2], str... | diff --git a/monai/optimizers/utils.py b/monai/optimizers/utils.py
--- a/monai/optimizers/utils.py
+++ b/monai/optimizers/utils.py
@@ -34,6 +34,10 @@ def generate_param_groups(
layer_matches: a list of callable functions to select or filter out network layer groups,
for "select" type, the input wi... | diff --git a/tests/test_generate_param_groups.py b/tests/test_generate_param_groups.py
--- a/tests/test_generate_param_groups.py
+++ b/tests/test_generate_param_groups.py
@@ -25,6 +25,7 @@
"lr_values": [1],
},
(1, 100),
+ [5, 21],
]
TEST_CASE_2 = [
@@ -34,6 +35,7 @@
"lr_values": [1, 2... | ["tests/test_generate_param_groups.py::TestGenerateParamGroups::test_lr_values_3", "tests/test_generate_param_groups.py::TestGenerateParamGroups::test_lr_values_5"] | ["tests/test_generate_param_groups.py::TestGenerateParamGroups::test_lr_values_2", "tests/test_generate_param_groups.py::TestGenerateParamGroups::test_wrong", "tests/test_generate_param_groups.py::TestGenerateParamGroups::test_lr_values_1", "tests/test_generate_param_groups.py::TestGenerateParamGroups::test_lr_values_4... | null | true | 2021-06-10T20:15:25Z | 1 | 9 | 2 | 3,856 | 0 | 0.85 | 1 | 0.62 | 1 | 0.53 | 82.91 | ||
1,212 | swe_gym::train::483 | swe_gym | train | 483 | python__mypy-16053 | python/mypy | python/mypy | python | d77310ae61e8e784aae46b2011f35900b9392e15 | Invalid type inferred when overloading __call__ with generic self-type
Seems like mypy uses the first overloaded `__call__` signature when using self-type. There is no problem with overloading another dunder method (I tried `__get__`) or with regular overload (`__call__` but without self-type). If use another method n... | Yeah, this looks like a bug.
@ilevkivskyi Any idea if this would be hard to fix?
`__call__` is special-cased in `checkmember.py`, it may be not easy to fix. I don't remember why, but last time I tried it, I didn't find a quick solution.
Just confirming that this is still an issue as I lost a lot of time to it today... | diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py
--- a/mypy/checkexpr.py
+++ b/mypy/checkexpr.py
@@ -1476,6 +1476,7 @@ def check_call(
callable_node: Expression | None = None,
callable_name: str | None = None,
object_type: Type | None = None,
+ original_type: Type | None = None,
... | diff --git a/test-data/unit/check-overloading.test b/test-data/unit/check-overloading.test
--- a/test-data/unit/check-overloading.test
+++ b/test-data/unit/check-overloading.test
@@ -6650,3 +6650,27 @@ def d(x: int) -> int: ...
def d(f: int, *, x: int) -> str: ...
def d(*args, **kwargs): ...
[builtins fixtures/tuple... | ["mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadCallableGenericSelf"] | ["mypy/test/testcheck.py::TypeCheckSuite::check-tuples.test::testTypeTupleGenericCall", "mypy/test/testcheck.py::TypeCheckSuite::check-tuples.test::testTupleCompatibleWithSequence"] | null | true | 2023-09-05T21:37:20Z | 3 | 68 | 1 | 1,798 | 0 | 0.85 | 1 | 0.55 | 1 | 0.526333 | 82.904 | |
1,213 | swe_gym::train::72 | swe_gym | train | 72 | getmoto__moto-7580 | getmoto/moto | getmoto/moto | python | 74a59a665a3ffcd6c5c3ff15a6e9759b29a86547 | Using LastEvaluatedKey to page through an index
### Description
Paging using LastEvaluatedKey and ExclusiveStartKey has stopped working properly in moto 5.0.4 and 5.0.5. It was working fine up till 5.0.3.
This seems similar to this closed issue: https://github.com/getmoto/moto/issues/7531
### Code snippet
~~~
from... | 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
@@ -692,7 +692,11 @@ def query(
key for key in index.schema if key["KeyType"] == "RANGE"
][0]
except IndexError:
- ... | diff --git a/tests/test_dynamodb/test_dynamodb_query.py b/tests/test_dynamodb/test_dynamodb_query.py
--- a/tests/test_dynamodb/test_dynamodb_query.py
+++ b/tests/test_dynamodb/test_dynamodb_query.py
@@ -191,11 +191,61 @@ def test_query_pagination(table_name=None):
@pytest.mark.aws_verified
-@dynamodb_aws_verified(... | ["tests/test_dynamodb/test_dynamodb_query.py::test_query_gsi_pagination"] | ["tests/test_dynamodb/test_dynamodb_query.py::test_query_pagination", "tests/test_dynamodb/test_dynamodb_query.py::test_sorted_query_with_numerical_sort_key", "tests/test_dynamodb/test_dynamodb_query.py::test_query_lsi_pagination", "tests/test_dynamodb/test_dynamodb_query.py::TestFilterExpression::test_query_filter_ove... | null | true | 2024-04-08 20:11:46 | 1 | 8 | 1 | 3,436 | 0 | 0.85 | 1 | 0.62 | 1 | 0.526667 | 82.9 | ||
1,214 | swe_bench_pro::test::502 | swe_bench_pro | test | 502 | instance_navidrome__navidrome-d613b1930688422122796b43acb3caf2538c8fd1 | navidrome/navidrome | navidrome/navidrome | go | a2d9aaeff8774115cd1d911c23a74e319d72ce62 | ## Title:
Singleton helper requires generic instance retrieval
### Description:
The current `singleton.Get` function requires passing a dummy zero-value of a type and performing a type assertion to use the instance. This introduces unnecessary boilerplate and can result in runtime panics when the cast does not match.
... | ## Requirements
- Implement a generic function `GetInstance` that allows retrieving a singleton of the concrete type `T` directly, without requiring placeholder objects or type assertions.
- Ensure that the first call to `GetInstance` for a given type executes the constructor exactly once, stores the result, and retur... | diff --git a/core/scrobbler/play_tracker.go b/core/scrobbler/play_tracker.go
index 465fa17b131..aff1621a85a 100644
--- a/core/scrobbler/play_tracker.go
+++ b/core/scrobbler/play_tracker.go
@@ -45,7 +45,7 @@ type playTracker struct {
}
func GetPlayTracker(ds model.DataStore, broker events.Broker) PlayTracker {
- ins... | diff --git a/utils/singleton/singleton_test.go b/utils/singleton/singleton_test.go
index 9014e4ef7e9..576676950e1 100644
--- a/utils/singleton/singleton_test.go
+++ b/utils/singleton/singleton_test.go
@@ -17,38 +17,43 @@ func TestSingleton(t *testing.T) {
RunSpecs(t, "Singleton Suite")
}
-var _ = Describe("Get", f... | ["TestSingleton"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-d613b1930688422122796b43acb3caf2538c8fd1 | true | null | 5 | 48 | 1 | 953 | 0 | 0.95 | 1 | 0.7 | 0.85 | 0.318833 | 82.894 | |
1,215 | swe_gym::train::2110 | swe_gym | train | 2,110 | Project-MONAI__MONAI-2228 | Project-MONAI/MONAI | project-monai/monai | python | ebfd550539478d9519e9110a902bb3b3b0b5acb8 | Cache grid info of `RandAffined` transform
**Is your feature request related to a problem? Please describe.**
Feature from internal user:
Hello. I'm working with generative models for 3D scans (size ~200^3). Due to the cost of performing the RandAffine transform on cpu, the gpus are often waiting for the data loader.
`... | Hi @wyli ,
I would suggest to develop another transform `CreateGridd`, then we can use `CacheDataset` to cache the grid.
What do you think?
Thanks.
I feel we should address this issue https://github.com/Project-MONAI/MONAI/issues/1871
Hi @wyli ,
Could you please help share more comments about this feature ... | diff --git a/monai/transforms/spatial/array.py b/monai/transforms/spatial/array.py
--- a/monai/transforms/spatial/array.py
+++ b/monai/transforms/spatial/array.py
@@ -1351,6 +1351,7 @@ def __init__(
spatial_size: Optional[Union[Sequence[int], int]] = None,
mode: Union[GridSampleMode, str] = GridSample... | diff --git a/tests/test_rand_affine.py b/tests/test_rand_affine.py
--- a/tests/test_rand_affine.py
+++ b/tests/test_rand_affine.py
@@ -38,6 +38,25 @@
{"img": torch.ones((1, 3, 3, 3)), "spatial_size": (2, 2, 2)},
torch.ones((1, 2, 2, 2)),
],
+ [
+ dict(as_tensor_output=True, device=None,... | ["tests/test_rand_affine.py::TestRandAffine::test_rand_affine_4", "tests/test_rand_affined.py::TestRandAffined::test_ill_cache", "tests/test_rand_affined.py::TestRandAffined::test_rand_affined_10", "tests/test_rand_affined.py::TestRandAffined::test_rand_affined_02", "tests/test_rand_affine.py::TestRandAffine::test_rand... | ["tests/test_rand_affine.py::TestRandAffine::test_skipped_transform_consistency_4", "tests/test_rand_affine.py::TestRandAffine::test_skipped_transform_consistency_1", "tests/test_rand_affined.py::TestRandAffined::test_rand_affined_08", "tests/test_rand_affined.py::TestRandAffined::test_rand_affined_04", "tests/test_ran... | null | true | 2021-05-21T10:02:31Z | 2 | 75 | 8 | 1,632 | 0 | 0.85 | 1 | 0.55 | 1 | 0.522 | 82.891 | |
1,216 | swe_gym::train::2050 | swe_gym | train | 2,050 | Project-MONAI__MONAI-5433 | Project-MONAI/MONAI | project-monai/monai | python | 8b1f0c35326d162d30ebb72827ba06b65065bf3e | itkreader metadict not compatible with data collate
**Describe the bug**
```py
meta_dict
{'aux_file': '', 'bitpix': '64', 'cal_max': '0', 'cal_min': '0', 'datatype': '64', 'descrip': '', 'dim[0]': '4', 'dim[1]': '3', 'dim[2]': '128', 'dim[3]': '128', 'dim[4]': '128', 'dim[5]': '1', 'dim[6]': '1', 'dim[7]': '1', 'dim_in... | diff --git a/monai/data/image_reader.py b/monai/data/image_reader.py
--- a/monai/data/image_reader.py
+++ b/monai/data/image_reader.py
@@ -318,7 +318,12 @@ def _get_meta_dict(self, img) -> Dict:
"""
img_meta_dict = img.GetMetaDataDictionary()
- meta_dict = {key: img_meta_dict[key] for key in ... | diff --git a/tests/test_load_image.py b/tests/test_load_image.py
--- a/tests/test_load_image.py
+++ b/tests/test_load_image.py
@@ -315,7 +315,7 @@ def test_channel_dim(self, input_param, filename, expected_shape):
with tempfile.TemporaryDirectory() as tempdir:
filename = os.path.join(tempdir, file... | ["tests/test_load_image.py::TestLoadImage::test_itk_reader_4", "tests/test_load_image.py::TestLoadImageMeta::test_correct_1", "tests/test_load_image.py::TestLoadImage::test_load_nifti_multichannel", "tests/test_load_image.py::TestLoadImage::test_channel_dim_5", "tests/test_load_image.py::TestLoadImage::test_itk_reader_... | ["tests/test_load_image.py::TestLoadImage::test_itk_dicom_series_reader_4", "tests/test_load_image.py::TestLoadImage::test_channel_dim_2", "tests/test_load_image.py::TestLoadImage::test_my_reader", "tests/test_load_image.py::TestLoadImage::test_nibabel_reader_6", "tests/test_load_image.py::TestLoadImage::test_itk_dicom... | null | true | 2022-10-29T08:58:42Z | 1 | 7 | 13 | 3,113 | 0 | 0.85 | 1 | 0.62 | 1 | 0.523333 | 82.89 | ||
1,217 | swe_gym::train::963 | swe_gym | train | 963 | dask__dask-10009 | dask/dask | dask/dask | python | 216c7c9393d8df1014a911eceb797502999e8a51 | da.std and da.var handle complex values incorrectly
Contrary to what the documentation claims ( [std](https://docs.dask.org/en/latest/array-api.html#dask.array.std), [var](https://docs.dask.org/en/latest/array-api.html#dask.array.var) ), complex values are not handled correctly by taking the absolute values in std and ... | > Contrary to what the documentation claims ( std, var ), complex values are not handled correctly by taking the absolute values in std and var
Our docstrings are autogenerated from the numpy docstrings, small inconsistencies do occur (apologies). See #1815 for more info.
In this case this looks like a bug, the i... | diff --git a/dask/array/reductions.py b/dask/array/reductions.py
--- a/dask/array/reductions.py
+++ b/dask/array/reductions.py
@@ -385,7 +385,9 @@ def partial_reduce(
if np.isscalar(meta):
return Array(graph, name, out_chunks, dtype=dtype)
else:
- with contextlib.suppress(AttributeError):
+ ... | diff --git a/dask/array/tests/test_reductions.py b/dask/array/tests/test_reductions.py
--- a/dask/array/tests/test_reductions.py
+++ b/dask/array/tests/test_reductions.py
@@ -2,6 +2,7 @@
import os
import warnings
+from contextlib import nullcontext as does_not_warn
from itertools import permutations, zip_longest
... | ["dask/array/tests/test_reductions.py::test_reductions_1D[c8]"] | ["dask/array/tests/test_reductions.py::test_min_max_empty_chunks[max-amax]", "dask/array/tests/test_reductions.py::test_chunk_structure_independence[axes11-4-chunks0]", "dask/array/tests/test_reductions.py::test_array_cumreduction_axis[blelloch-None-True-nancumsum]", "dask/array/tests/test_reductions.py::test_array_red... | null | true | 2023-03-01T12:24:32Z | 1 | 64 | 1 | 1,847 | 0 | 0.85 | 1 | 0.55 | 1 | 0.521167 | 82.8885 | |
1,218 | swe_gym::train::40 | swe_gym | train | 40 | getmoto__moto-4934 | getmoto/moto | getmoto/moto | python | eed32a5f72fbdc0d33c4876d1b5439dfd1efd5d8 | wrong exception when trying to publish a version to non-existing lambda
Hello,
When trying to create a version for a non-exiting lambda the exception is different from the one received from AWS:
sample code:
```
import boto3
import moto
@moto.mock_lambda
def run_me():
lambda_function = boto3.client("lambda", "e... | Hi @baraksalomon, thanks for raising this - marking it as an enhancement to implement this validation | diff --git a/moto/awslambda/exceptions.py b/moto/awslambda/exceptions.py
--- a/moto/awslambda/exceptions.py
+++ b/moto/awslambda/exceptions.py
@@ -43,3 +43,10 @@ def __init__(self):
"ResourceNotFoundException",
"No policy is associated with the given resource.",
)
+
+
+class UnknownFu... | diff --git a/tests/test_awslambda/test_lambda.py b/tests/test_awslambda/test_lambda.py
--- a/tests/test_awslambda/test_lambda.py
+++ b/tests/test_awslambda/test_lambda.py
@@ -486,6 +486,25 @@ def test_delete_unknown_function():
).should.throw(botocore.client.ClientError)
+@mock_lambda
+@pytest.mark.parametrize... | ["tests/test_awslambda/test_lambda.py::test_publish_version_unknown_function[bad_function_name]", "tests/test_awslambda/test_lambda.py::test_publish_version_unknown_function[arn:aws:lambda:eu-west-1:123456789012:function:bad_function_name]"] | ["tests/test_awslambda/test_lambda.py::test_create_function_from_zipfile", "tests/test_awslambda/test_lambda.py::test_create_function_with_already_exists", "tests/test_awslambda/test_lambda.py::test_get_function_configuration[FunctionArn]", "tests/test_awslambda/test_lambda.py::test_update_configuration[FunctionArn]", ... | null | true | 2022-03-11 21:54:10 | 4 | 24 | 2 | 1,217 | 0 | 0.85 | 1 | 0.7 | 0.85 | 0.282833 | 82.886 | |
1,219 | swe_gym::train::1985 | swe_gym | train | 1,985 | Project-MONAI__MONAI-3882 | Project-MONAI/MONAI | project-monai/monai | python | 775935da263f55f8269bb5a42676d18cba4b9a08 | inconsistent output s/qform code for SaveImage
**Describe the bug**
```py
import numpy as np
import nibabel as nib
from monai.transforms import SaveImaged, LoadImaged
from monai.data import ITKWriter, NibabelWriter
# create a testing volume
img = nib.Nifti1Image(np.ones((3, 4, 5, 1, 1)), np.eye(4))
img.header.set_qfor... | diff --git a/monai/data/image_writer.py b/monai/data/image_writer.py
--- a/monai/data/image_writer.py
+++ b/monai/data/image_writer.py
@@ -601,6 +601,12 @@ def write(self, filename: PathLike, verbose: bool = False, **obj_kwargs):
self.data_obj = self.create_backend_obj(
self.data_obj, affine=self.... | diff --git a/tests/test_image_rw.py b/tests/test_image_rw.py
--- a/tests/test_image_rw.py
+++ b/tests/test_image_rw.py
@@ -65,6 +65,8 @@ def nifti_rw(self, test_data, reader, writer, dtype, resample=True):
_test_data = test_data[0]
if resample:
_test_data = moveaxis(_test_... | ["tests/test_image_rw.py::TestLoadSaveNifti::test_2d_2", "tests/test_image_rw.py::TestLoadSaveNifti::test_3d_2", "tests/test_image_rw.py::TestLoadSaveNifti::test_2d_0", "tests/test_image_rw.py::TestLoadSaveNifti::test_4d_0", "tests/test_image_rw.py::TestLoadSaveNifti::test_4d_2", "tests/test_image_rw.py::TestLoadSaveNi... | ["tests/test_image_rw.py::TestLoadSavePNG::test_2d_1", "tests/test_image_rw.py::TestLoadSaveNrrd::test_3d_0", "tests/test_image_rw.py::TestLoadSavePNG::test_rgb_0", "tests/test_image_rw.py::TestLoadSaveNifti::test_4d_3", "tests/test_image_rw.py::TestLoadSavePNG::test_rgb_3", "tests/test_image_rw.py::TestLoadSavePNG::te... | null | true | 2022-03-02T11:52:24Z | 1 | 6 | 6 | 3,280 | 0 | 0.85 | 1 | 0.62 | 1 | 0.52 | 82.88 | ||
1,220 | swe_gym::train::1082 | swe_gym | train | 1,082 | pydantic__pydantic-8525 | pydantic/pydantic | pydantic/pydantic | python | 54d1185fc09ce3514a702239f034832bca523268 | Some properties do not remain private after constructing a serialised model
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
After constructing a model from the same serialised model, some properties do not remain private.
`SecurityGroupRequest.model_construct(**group_req.model_serializ... | diff --git a/pydantic/main.py b/pydantic/main.py
--- a/pydantic/main.py
+++ b/pydantic/main.py
@@ -237,6 +237,12 @@ def model_construct(cls: type[Model], _fields_set: set[str] | None = None, **val
if cls.__pydantic_post_init__:
m.model_post_init(None)
+ # update private attributes wit... | diff --git a/tests/test_construction.py b/tests/test_construction.py
--- a/tests/test_construction.py
+++ b/tests/test_construction.py
@@ -519,3 +519,13 @@ class MyModel(BaseModel):
m = MyModel.model_construct(b='b')
assert m.model_dump_json() == '{"a":"a","b":"b"}'
+
+
+def test_initialize_with_private_att... | ["tests/test_construction.py::test_initialize_with_private_attr"] | ["tests/test_construction.py::test_copy_deep_extra[copy]", "tests/test_construction.py::test_construct_default_factory", "tests/test_construction.py::test_construct_misuse", "tests/test_construction.py::test_simple_copy[model_copy]", "tests/test_construction.py::test_immutable_copy_with_frozen[copy]", "tests/test_const... | null | true | 2024-01-09T15:56:51Z | 1 | 6 | 1 | 4,946 | 0 | 0.85 | 1 | 0.62 | 1 | 0.52 | 82.88 | ||
1,221 | swe_gym::train::534 | swe_gym | train | 534 | python__mypy-15355 | python/mypy | python/mypy | python | 1200d1d956e589a0a33c86ef8a7cb3f5a9b64f1f | stubgen drops default values for function arguments
**Bug Report**
I have a file with _some_ types defined (that I can't modify), and want to create a stub for this file so that I can fill out the remainder of the types.
So I run stubgen, and it creates draft stubs, but all the default parameter values that had been ... | The title of the issue should probably be something like "stubgen drops default values for function arguments". Saying it "drops types" seems a bit misleading.
@thomkeh agreed, fixed. | diff --git a/mypy/stubdoc.py b/mypy/stubdoc.py
--- a/mypy/stubdoc.py
+++ b/mypy/stubdoc.py
@@ -36,11 +36,19 @@ def is_valid_type(s: str) -> bool:
class ArgSig:
"""Signature info for a single argument."""
- def __init__(self, name: str, type: str | None = None, default: bool = False):
+ def __init__(
+ ... | diff --git a/test-data/unit/stubgen.test b/test-data/unit/stubgen.test
--- a/test-data/unit/stubgen.test
+++ b/test-data/unit/stubgen.test
@@ -27,20 +27,20 @@ def g(arg) -> None: ...
def f(a, b=2): ...
def g(b=-1, c=0): ...
[out]
-def f(a, b: int = ...) -> None: ...
-def g(b: int = ..., c: int = ...) -> None: ...
+d... | ["mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testDefaultArgNone", "mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testDefaultArgFloat", "mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testNonDefaultKeywordOnlyArgAfterAsterisk", "mypy/test/teststubgen.py::StubgenPythonSuite::st... | ["mypy/test/testcheck.py::TypeCheckSuite::check-dataclass-transform.test::testDataclassTransformParametersMustBeBoolLiterals", "mypy/test/testfinegrained.py::FineGrainedSuite::fine-grained-cycles.test::testClassSelfReferenceThroughImportCycle", "mypy/test/testcheck.py::TypeCheckSuite::check-dataclass-transform.test::te... | null | true | 2023-06-02T19:20:25Z | 2 | 88 | 8 | 1,337 | 0 | 0.85 | 1 | 0.55 | 1 | 0.516167 | 82.8735 | |
1,222 | swe_bench_pro::test::196 | swe_bench_pro | test | 196 | instance_flipt-io__flipt-5c7037ececb0bead0a8eb56054e224bcd7ac5922 | flipt-io/flipt | flipt-io/flipt | go | 4914fdf32b09e3a9ffffab9a7f4f007561cc13d0 | # Title: Configurable log encoding (console / json)
## Describe the bug:
Flipt's configuration does not model the log output format. There is no configuration option in `config.yml` or via environment variables that lets an operator declare whether logs should use the human-readable `console` format or a structured `... | ## Requirements
- The application must define an exported `LogEncoding` type in the configuration package that maps the valid encoding strings ("console" and "json") to internal constants, providing type safety for the log encoding configuration value.
- The package must expose the exported constants `LogEncodingConso... | diff --git a/Taskfile.yml b/Taskfile.yml
index b4a6c86636..e9e41e6db0 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -150,5 +150,4 @@ tasks:
vars:
COVERAGE_FILE: coverage.txt
TEST_PATTERN: .
- TEST_FLAGS: -v
TEST_OPTS: -race
diff --git a/cmd/flipt/main.go b/cmd/flipt/main.go
index d32ee0... | diff --git a/config/config_test.go b/config/config_test.go
index 85ca2faa39..f30442cbf9 100644
--- a/config/config_test.go
+++ b/config/config_test.go
@@ -106,6 +106,36 @@ func TestDatabaseProtocol(t *testing.T) {
}
}
+func TestLogEncoding(t *testing.T) {
+ tests := []struct {
+ name string
+ encoding LogEnc... | ["TestLogEncoding", "TestLoad"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-5c7037ececb0bead0a8eb56054e224bcd7ac5922 | true | null | 3 | 90 | 2 | 1,490 | 0 | 0.95 | 1 | 0.55 | 1 | 0.548333 | 82.87 | |
1,223 | swe_bench_pro::test::441 | swe_bench_pro | test | 441 | instance_internetarchive__openlibrary-c4eebe6677acc4629cb541a98d5e91311444f5d4-v13642507b4fc1f8d234172bf8129942da2c2ca26 | internetarchive/openlibrary | internetarchive/openlibrary | python | 84cc4ed5697b83a849e9106a09bfed501169cc20 | # Improve ISBN Import Logic by Using Local Staged Records
### Feature Request
The current ISBN resolution process relies on external API calls, even in cases where import data may already exist locally in a staged or pending state. This approach introduces unnecessary latency and increases dependency on upstream serv... | ## Requirements
- There should be a method to find staged or pending items. It accepts a list of identifiers and a collection of sources, constructs `ia_id` values by combining each identifier with each source, and returns, as a `ResultSet`, all matching entries from the `import_item` table whose status is either `'sta... | diff --git a/openlibrary/core/imports.py b/openlibrary/core/imports.py
index fc96a03fc3d..dcb498ff0cb 100644
--- a/openlibrary/core/imports.py
+++ b/openlibrary/core/imports.py
@@ -1,7 +1,8 @@
"""Interface to import queue.
"""
from collections import defaultdict
-from typing import Any
+from collections.abc import I... | diff --git a/openlibrary/tests/core/test_imports.py b/openlibrary/tests/core/test_imports.py
index dc9724ec751..f634e00adac 100644
--- a/openlibrary/tests/core/test_imports.py
+++ b/openlibrary/tests/core/test_imports.py
@@ -71,6 +71,27 @@
},
]
+IMPORT_ITEM_DATA_STAGED_AND_PENDING: Final = [
+ {
+ 'id... | ["openlibrary/tests/core/test_imports.py::TestImportItem::test_find_staged_or_pending[unique_id_1-expected0]", "openlibrary/tests/core/test_imports.py::TestImportItem::test_find_staged_or_pending[unique_id_2-expected1]", "openlibrary/tests/core/test_imports.py::TestImportItem::test_find_staged_or_pending[unique_id_4-ex... | ["openlibrary/tests/core/test_imports.py::TestImportItem::test_delete", "openlibrary/tests/core/test_imports.py::TestImportItem::test_delete_with_batch_id", "openlibrary/tests/core/test_imports.py::TestImportItem::test_find_pending_returns_none_with_no_results", "openlibrary/tests/core/test_imports.py::TestImportItem::... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-c4eebe6677acc4629cb541a98d5e91311444f5d4-v13642507b4fc1f8d234172bf8129942da2c2ca26 | true | null | 2 | 119 | 3 | 909 | 0 | 0.95 | 1 | 0.55 | 1 | 0.548167 | 82.8695 | |
1,224 | swe_bench_verified::test::378 | swe_bench_verified | test | 378 | scikit-learn__scikit-learn-26194 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | e886ce4e1444c61b865e7839c9cff5464ee20ace | Thresholds can exceed 1 in `roc_curve` while providing probability estimate
While working on https://github.com/scikit-learn/scikit-learn/pull/26120, I found out that something was odd with `roc_curve` that returns a threshold greater than 1. A non-regression test (that could be part of `sklearn/metrics/tests/test_rank... | diff --git a/sklearn/metrics/_ranking.py b/sklearn/metrics/_ranking.py
--- a/sklearn/metrics/_ranking.py
+++ b/sklearn/metrics/_ranking.py
@@ -1016,10 +1016,10 @@ def roc_curve(
Increasing true positive rates such that element `i` is the true
positive rate of predictions with score >= `thresholds[i]`.... | diff --git a/sklearn/metrics/tests/test_ranking.py b/sklearn/metrics/tests/test_ranking.py
--- a/sklearn/metrics/tests/test_ranking.py
+++ b/sklearn/metrics/tests/test_ranking.py
@@ -418,13 +418,13 @@ def test_roc_curve_drop_intermediate():
y_true = [0, 0, 0, 0, 1, 1]
y_score = [0.0, 0.2, 0.5, 0.6, 0.7, 1.0]
... | ["sklearn/metrics/tests/test_ranking.py::test_roc_curve_drop_intermediate", "sklearn/metrics/tests/test_ranking.py::test_roc_curve_with_probablity_estimates[42]"] | ["sklearn/metrics/tests/test_ranking.py::test_roc_curve[True]", "sklearn/metrics/tests/test_ranking.py::test_roc_curve[False]", "sklearn/metrics/tests/test_ranking.py::test_roc_curve_end_points", "sklearn/metrics/tests/test_ranking.py::test_roc_returns_consistency", "sklearn/metrics/tests/test_ranking.py::test_roc_curv... | null | true | 2023-04-17T16:33:08Z | 1 | 13 | 2 | 1,119 | 0 | 1 | 1 | 0.55 | 1 | 0.229833 | 82.8645 | ||
1,225 | swe_bench_pro::test::533 | swe_bench_pro | test | 533 | instance_protonmail__webclients-708ed4a299711f0fa79a907cc5847cfd39c0fc71 | protonmail/webclients | protonmail/webclients | javascript | 3f9771dd682247118e66e9e27bc6ef677ef5214d | ## Title:
Incorrect eligibility logic for users with recent subscription cancellations
### Description:
The current eligibility logic for the summer-2023 offer incorrectly treats users who have canceled a paid subscription less than one month ago as eligible for the promotion. The system does not properly enforce th... | ## Requirements
- In the function `isEligible` must assess eligibility for the `summer-2023` operation using the inputs `{ user, protonConfig, subscription, lastSubscriptionEnd }`.
- The parameter `lastSubscriptionEnd` represents the timestamp of the user's most recent paid subscription end and must be interpreted as ... | diff --git a/packages/components/containers/offers/components/shared/deal/DealsWithCycleSelector.tsx b/packages/components/containers/offers/components/shared/deal/DealsWithCycleSelector.tsx
index 3a0e52d3920..b5550a27ce5 100644
--- a/packages/components/containers/offers/components/shared/deal/DealsWithCycleSelector.t... | diff --git a/packages/components/containers/offers/operations/summer2023/eligibility.test.ts b/packages/components/containers/offers/operations/summer2023/eligibility.test.ts
index 1edccbf9e84..c49a6034eaf 100644
--- a/packages/components/containers/offers/operations/summer2023/eligibility.test.ts
+++ b/packages/compon... | ["containers/offers/operations/summer2023/eligibility.test.ts | should be available in Proton Mail", "containers/offers/operations/summer2023/eligibility.test.ts | should be available in Proton Calendar", "containers/offers/operations/summer2023/eligibility.test.ts | should not be available for users who have a subscri... | ["containers/offers/operations/summer2023/eligibility.test.ts | should not be available in Proton VPN settings", "containers/offers/operations/summer2023/eligibility.test.ts | should be available for Mail Plus Trial users", "containers/offers/operations/summer2023/eligibility.test.ts | should not be available for subsc... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_protonmail__webclients-708ed4a299711f0fa79a907cc5847cfd39c0fc71 | true | null | 4 | 39 | 3 | 1,070 | 0 | 0.95 | 1 | 0.7 | 0.85 | 0.308333 | 82.8625 | |
1,226 | swe_bench_pro::test::384 | swe_bench_pro | test | 384 | instance_internetarchive__openlibrary-123e6e5e1c85b9c07d1e98f70bfc480bc8016890-v2733ff199fb72f0d033a30dc62cb0a4742e3a7f4 | internetarchive/openlibrary | internetarchive/openlibrary | python | 115079a6a07b6341bb487f954e50384273b56a98 | # PrioritizedISBN Class Limited to ISBN Values and Lacks Proper Equality/Serialization
## Description
The current PrioritizedISBN class is designed only for ISBN values and cannot handle Amazon ASIN identifiers, limiting the affiliate server's ability to work with diverse product identifiers. Additionally, the class ... | ## Requirements
- The PrioritizedISBN class should be renamed to PrioritizedIdentifier to reflect its expanded support for multiple identifier types including both ISBN and ASIN values.
- The class should use a generic identifier attribute instead of the isbn-specific attribute so it can be constructed by passing an i... | diff --git a/openlibrary/core/vendors.py b/openlibrary/core/vendors.py
index e5e198a73f8..743900108fb 100644
--- a/openlibrary/core/vendors.py
+++ b/openlibrary/core/vendors.py
@@ -300,6 +300,7 @@ def get_amazon_metadata(
id_type: Literal['asin', 'isbn'] = 'isbn',
resources: Any = None,
high_priority: bo... | diff --git a/scripts/tests/test_affiliate_server.py b/scripts/tests/test_affiliate_server.py
index c3366db96b3..21244bf8362 100644
--- a/scripts/tests/test_affiliate_server.py
+++ b/scripts/tests/test_affiliate_server.py
@@ -14,10 +14,9 @@
# TODO: Can we remove _init_path someday :(
sys.modules['_init_path'] = Magi... | ["scripts/tests/test_affiliate_server.py::test_get_isbns_from_book", "scripts/tests/test_affiliate_server.py::test_get_isbns_from_books", "scripts/tests/test_affiliate_server.py::test_prioritized_identifier_equality_set_uniqueness", "scripts/tests/test_affiliate_server.py::test_prioritized_identifier_serialize_to_json"... | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-123e6e5e1c85b9c07d1e98f70bfc480bc8016890-v2733ff199fb72f0d033a30dc62cb0a4742e3a7f4 | true | null | 2 | 106 | 14 | 1,152 | 0 | 0.95 | 1 | 0.55 | 1 | 0.545333 | 82.861 | |
1,227 | swe_gym::train::341 | swe_gym | train | 341 | getmoto__moto-5511 | getmoto/moto | getmoto/moto | python | 3679521d76c54f0ca5fe635956bea2d8fc3192a9 | Lambda Permission does not support PrincipalOrgID condition
## Reporting Bugs
### Moto Version
3.1.17
### Issue:
Unable to create Lambda policy with PrincipalOrgID condition.
### Current behavior
1. Create a lambda function with custom policy via add_permission API (ref: [test_add_function_permission](https://githu... | Thanks for raising this @groverlalit - marking it as an enhancement to process this field properly | diff --git a/moto/awslambda/models.py b/moto/awslambda/models.py
--- a/moto/awslambda/models.py
+++ b/moto/awslambda/models.py
@@ -1730,7 +1730,7 @@ def untag_resource(self, resource, tagKeys):
def add_permission(self, function_name, qualifier, raw):
fn = self.get_function(function_name, qualifier)
- ... | diff --git a/tests/test_awslambda/test_lambda_policy.py b/tests/test_awslambda/test_lambda_policy.py
--- a/tests/test_awslambda/test_lambda_policy.py
+++ b/tests/test_awslambda/test_lambda_policy.py
@@ -41,6 +41,45 @@ def test_add_function_permission(key):
assert "Statement" in response
res = json.loads(respo... | ["tests/test_awslambda/test_lambda_policy.py::test_add_function_permission[FunctionName]", "tests/test_awslambda/test_lambda_policy.py::test_add_function_permission[FunctionArn]", "tests/test_awslambda/test_lambda_policy.py::test_add_permission_with_principalorgid"] | ["tests/test_awslambda/test_lambda_policy.py::test_get_function_policy[FunctionArn]", "tests/test_awslambda/test_lambda_policy.py::test_get_function_policy[FunctionName]", "tests/test_awslambda/test_lambda_policy.py::test_get_unknown_policy", "tests/test_awslambda/test_lambda_policy.py::test_get_policy_with_qualifier",... | null | true | 2022-10-01 19:30:00 | 3 | 13 | 3 | 2,811 | 0 | 0.85 | 1 | 0.55 | 1 | 0.511833 | 82.8605 | |
1,228 | swe_bench_pro::test::101 | swe_bench_pro | test | 101 | instance_ansible__ansible-d58e69c82d7edd0583dd8e78d76b075c33c3151e-v173091e2e36d38c978002990795f66cfc0af30ad | ansible/ansible | ansible/ansible | python | a6e671db25381ed111bbad0ab3e7d97366395d05 | # Title
Gzip encoded HTTP responses are not handled
## Description
When a server answers with `Content-Encoding: gzip`, the URL request utilities in `ansible.module_utils.urls` hand the compressed payload back to the caller unchanged, so callers receive raw gzip bytes instead of the content they requested. Callers als... | ## Requirements
- When `Request.open` receives a response whose `Content-Encoding` header is `gzip` and decompression is enabled, the returned response's `fp` attribute must be a `GzipDecodedReader` that decodes the original stream, and reading the returned response must yield the complete decoded body even when the `C... | diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py
index 7e7ba225a39347..3e0965af6d4262 100644
--- a/lib/ansible/module_utils/urls.py
+++ b/lib/ansible/module_utils/urls.py
@@ -43,6 +43,7 @@
import email.parser
import email.utils
import functools
+import io
import mimetypes
import net... | diff --git a/test/integration/targets/get_url/tasks/main.yml b/test/integration/targets/get_url/tasks/main.yml
index cf2ffacdd6..b804221168 100644
--- a/test/integration/targets/get_url/tasks/main.yml
+++ b/test/integration/targets/get_url/tasks/main.yml
@@ -579,6 +579,36 @@
- (result.content | b64decode | from_... | ["test/units/module_utils/urls/test_gzip.py::test_Request_open_gzip", "test/units/module_utils/urls/test_gzip.py::test_Request_open_decompress_false", "test/units/module_utils/urls/test_gzip.py::test_Request_open_not_gzip", "test/units/module_utils/urls/test_gzip.py::test_Request_open_not_gzip_decompress_false", "test/... | ["test/units/module_utils/urls/test_fetch_url.py::test_fetch_url_no_urlparse", "test/units/module_utils/urls/test_fetch_url.py::test_fetch_url_cookies", "test/units/module_utils/urls/test_fetch_url.py::test_fetch_url_nossl", "test/units/module_utils/urls/test_fetch_url.py::test_fetch_url_connectionerror", "test/units/m... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-d58e69c82d7edd0583dd8e78d76b075c33c3151e-v173091e2e36d38c978002990795f66cfc0af30ad | true | null | 3 | 136 | 10 | 533 | 0 | 0.95 | 1 | 0.55 | 1 | 0.542167 | 82.8515 | |
1,229 | swe_gym::train::908 | swe_gym | train | 908 | dask__dask-7073 | dask/dask | dask/dask | python | 14ea01be6ed52ef215e2932607902e6c7fdaf41f | DataFrameGroupBy.value_counts method raises an error when at least a partition is empty.
**What happened**:
`DataFrameGroupBy.value_counts` gives an error if there is at least one empty partition.
**What you expected to happen**:
I expect that no error is raised and that the result matches the respective Pandas DataF... | Well that is interesting. I think this might be a pandas bug. You can't do a `groupby.value_counts` on an empty array.
```python
import pandas as pd
pd.DataFrame(columns=["A", "B"]).groupby("A")["B"].value_counts()
```
Thank you, @jsignell.
Yes, Pandas does not allow that, but I am not sure if this behaviou... | diff --git a/dask/dataframe/groupby.py b/dask/dataframe/groupby.py
--- a/dask/dataframe/groupby.py
+++ b/dask/dataframe/groupby.py
@@ -1931,7 +1931,7 @@ def agg(self, arg, split_every=None, split_out=1):
def value_counts(self, split_every=None, split_out=1):
return self._aca_agg(
token="value... | diff --git a/dask/dataframe/tests/test_groupby.py b/dask/dataframe/tests/test_groupby.py
--- a/dask/dataframe/tests/test_groupby.py
+++ b/dask/dataframe/tests/test_groupby.py
@@ -2475,3 +2475,26 @@ def agg(grp, **kwargs):
agg(pdf.groupby(groupby, observed=observed)),
agg(ddf.groupby(groupby, observed=... | ["dask/dataframe/tests/test_groupby.py::test_empty_partitions_with_value_counts"] | ["dask/dataframe/tests/test_groupby.py::test_groupby_multilevel_getitem[var-<lambda>1]", "dask/dataframe/tests/test_groupby.py::test_groupby_multilevel_getitem[first-<lambda>4]", "dask/dataframe/tests/test_groupby.py::test_series_aggregations_multilevel[mean-<lambda>0]", "dask/dataframe/tests/test_groupby.py::test_aggr... | null | true | 2021-01-15T13:38:01Z | 1 | 9 | 1 | 2,862 | 0 | 0.85 | 1 | 0.55 | 1 | 0.507 | 82.846 | |
1,230 | swe_gym::train::512 | swe_gym | train | 512 | python__mypy-14021 | python/mypy | python/mypy | python | 807da2675bfdc7ec434f8d5677c13722a555e8da | INTERNAL ERROR RuntimeError visiting partial-type of imported variable with follow_imports=skip
**Crash Report**
mypy 0.931 crashes while checking sources when using follow_imports=skip. Issue not reproduced on mypy 0.910 or with follow_imports=normal.
**Traceback**
```
$ PYTHONPATH="./mypyMain/" python.exe -m mypy... | Similar traceback to #11981 and #11686 | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -159,6 +159,7 @@
erase_to_bound,
erase_to_union_or_bound,
false_only,
+ fixup_partial_type,
function_type,
get_type_vars,
is_literal_type_like,
@@ -2738,8 +2739,8 @@ def check_assignment(
... | 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
@@ -2100,3 +2100,30 @@ class Some:
class A(Some, Enum):
__labels__ = {1: "1"}
[builtins fixtures/dict.pyi]
+
+[case testEnumWithPartialTypes]
+from enum import En... | ["mypy/test/testcheck.py::TypeCheckSuite::check-enum.test::testEnumWithPartialTypes"] | [] | null | true | 2022-11-06T22:22:03Z | 4 | 71 | 1 | 6,980 | 0 | 0.85 | 1 | 0.65 | 0.85 | 0.736667 | 82.8225 | |
1,231 | swe_bench_pro::test::156 | swe_bench_pro | test | 156 | instance_element-hq__element-web-b007ea81b2ccd001b00f332bee65070aa7fc00f9-vnan | element-hq/element-web | element-hq/element-web | javascript | c2ae6c279b8c80ea5bd58f3354e5949a9fa5ee41 | ## Title
Add smoothing resample and linear rescale utilities for numeric arrays
## Description
The current array utilities lack a deterministic smoothing resample and a general linear rescale. This limits our ability to transform numeric arrays to a target length while preserving overall shape, and to map values into ... | ## Requirements
- `arraySmoothingResample` must deterministically transform a numeric array to a requested length; the same input and target always produce the same output.
- When the input length equals the requested length, `arraySmoothingResample` must return the input unchanged.
- When downsampling, `arraySmoothi... | diff --git a/src/utils/arrays.ts b/src/utils/arrays.ts
index 1e130bd6052..1efa462c019 100644
--- a/src/utils/arrays.ts
+++ b/src/utils/arrays.ts
@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
+import {percentageOf, percentageWithin} from "./nu... | diff --git a/test/utils/arrays-test.ts b/test/utils/arrays-test.ts
index c5be59ab43f..b55de3b73bf 100644
--- a/test/utils/arrays-test.ts
+++ b/test/utils/arrays-test.ts
@@ -21,7 +21,9 @@ import {
arrayHasDiff,
arrayHasOrderChange,
arrayMerge,
+ arrayRescale,
arraySeed,
+ arraySmoothingResample... | ["test/utils/arrays-test.ts | arrayFastResample | should downsample", "test/utils/arrays-test.ts | arrayFastResample | should upsample", "test/utils/arrays-test.ts | arrayFastResample | should maintain sample", "test/utils/arrays-test.ts | arraySmoothingResample | should downsample", "test/utils/arrays-test.ts | arrayS... | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_element-hq__element-web-b007ea81b2ccd001b00f332bee65070aa7fc00f9-vnan | true | null | 2 | 82 | 7 | 1,546 | 0 | 0.95 | 1 | 0.55 | 1 | 0.531 | 82.818 | |
1,232 | swe_bench_verified::test::481 | swe_bench_verified | test | 481 | sympy__sympy-21596 | sympy/sympy | sympy/sympy | python | 110997fe18b9f7d5ba7d22f624d156a29bf40759 | bug in is_subset(Reals)
Solving issue #19513 has given rise to another bug.
Now:
```
In [8]: S1 = imageset(Lambda(n, n + (n - 1)*(n + 1)*I), S.Integers)
In [9]: S1
Out[9]: {n + ⅈ⋅(n - 1)⋅(n + 1) │ n ∊ ℤ}
In [10]: 2 in S1
Out[10]: False
In [11]: 2 in S1.intersect(Reals)
Out[11]: True
```
This output is incorrect.
Co... | diff --git a/sympy/sets/handlers/intersection.py b/sympy/sets/handlers/intersection.py
--- a/sympy/sets/handlers/intersection.py
+++ b/sympy/sets/handlers/intersection.py
@@ -5,7 +5,7 @@
from sympy.sets.fancysets import (Integers, Naturals, Reals, Range,
ImageSet, Rationals)
from sympy.sets.sets import Universal... | diff --git a/sympy/sets/tests/test_fancysets.py b/sympy/sets/tests/test_fancysets.py
--- a/sympy/sets/tests/test_fancysets.py
+++ b/sympy/sets/tests/test_fancysets.py
@@ -2,8 +2,9 @@
from sympy.core.expr import unchanged
from sympy.sets.fancysets import (ImageSet, Range, normalize_theta_set,
... | ["test_imageset_intersect_real"] | ["test_naturals", "test_naturals0", "test_integers", "test_ImageSet", "test_image_is_ImageSet", "test_halfcircle", "test_ImageSet_iterator_not_injective", "test_inf_Range_len", "test_Range_set", "test_Range_symbolic", "test_range_range_intersection", "test_range_interval_intersection", "test_range_is_finite_set", "test... | null | true | 2021-06-10T15:35:08Z | 1 | 37 | 1 | 536 | 0 | 1 | 1 | 0.55 | 1 | 0.212667 | 82.813 | ||
1,233 | swe_gym::train::156 | swe_gym | train | 156 | getmoto__moto-5837 | getmoto/moto | getmoto/moto | python | 6da12892a3c18248a2cfe55bc7d2cb3039817684 | Calls to list_attached_policies fail with ARN targets
Hi,
there's a slight issue with ARN targets when calling `list_attached_policies`.
Versions:
```
boto3==1.26.33
botocore==1.29.33
moto==4.0.12
```
Python 3.11
Fixtures I'm using:
```python
@pytest.fixture(scope="session")
def aws_credentials():
os.environ["A... | Hi @ygerg, as far as I can tell, our existing test already uses an ARN target: https://github.com/spulec/moto/blob/master/tests/test_iot/test_iot_policies.py#L25
So I'm not sure what's going wrong, or whether something is missing from our tests.
PR's are always welcome, if we've missed a scenario!
Hi, thanks for th... | diff --git a/moto/core/botocore_stubber.py b/moto/core/botocore_stubber.py
--- a/moto/core/botocore_stubber.py
+++ b/moto/core/botocore_stubber.py
@@ -43,18 +43,13 @@ def __call__(self, event_name: str, request: Any, **kwargs: Any) -> AWSResponse:
response = None
response_callback = None
- fo... | diff --git a/tests/test_iot/test_iot_policies.py b/tests/test_iot/test_iot_policies.py
--- a/tests/test_iot/test_iot_policies.py
+++ b/tests/test_iot/test_iot_policies.py
@@ -33,6 +33,10 @@ def test_attach_policy(iot_client, policy):
res.should.have.key("policies").which.should.have.length_of(1)
res["policies... | ["tests/test_iot/test_iot_policies.py::test_attach_policy"] | ["tests/test_iot/test_iot_policies.py::test_delete_policy_validation", "tests/test_iot/test_iot_policies.py::test_detach_policy", "tests/test_iot/test_iot_policies.py::test_list_targets_for_policy_one_attached_certificate", "tests/test_iot/test_iot_policies.py::test_policy_delete_fails_when_versions_exist", "tests/test... | null | true | 2023-01-12 10:18:34 | 1 | 13 | 1 | 2,708 | 0 | 0.85 | 1 | 0.55 | 1 | 0.494667 | 82.809 | |
1,234 | swe_bench_pro::test::235 | swe_bench_pro | test | 235 | instance_flipt-io__flipt-db1c3b100e231c62f0c90c2ab037614f20a2a63b | flipt-io/flipt | flipt-io/flipt | go | 6c91b1ad50c452d90c484888690eb6257ee2c20a | ## Title
Missing support for \""contains\"" and \""notcontains\"" operators in constraint evaluation
## Problem Description
The evaluation engine lacks support for checking whether a given string contains or does not contain a specific substring when evaluating constraints. This prevents the use of substring-based lo... | ## Requirements
- Evaluation constraints using the operator `\""contains\""` should match when the evaluated string value includes the constraint value as a substring.
- Evaluation constraints using the operator `\""notcontains\""` should match when the evaluated string value does not include the constraint value as a... | diff --git a/internal/server/evaluation/legacy_evaluator.go b/internal/server/evaluation/legacy_evaluator.go
index 68c279d80c..2fbe2a2b6a 100644
--- a/internal/server/evaluation/legacy_evaluator.go
+++ b/internal/server/evaluation/legacy_evaluator.go
@@ -357,6 +357,10 @@ func matchesString(c storage.EvaluationConstrain... | diff --git a/internal/server/evaluation/legacy_evaluator_test.go b/internal/server/evaluation/legacy_evaluator_test.go
index e0fec51f..de55806d 100644
--- a/internal/server/evaluation/legacy_evaluator_test.go
+++ b/internal/server/evaluation/legacy_evaluator_test.go
@@ -198,6 +198,44 @@ func Test_matchesString(t *testi... | ["Test_matchesString", "Test_ContainsOperatorRegistration"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-db1c3b100e231c62f0c90c2ab037614f20a2a63b | true | null | 3 | 108 | 2 | 968 | 0 | 0.95 | 1 | 0.55 | 1 | 0.521333 | 82.789 | |
1,235 | swe_gym::train::279 | swe_gym | train | 279 | getmoto__moto-6317 | getmoto/moto | getmoto/moto | python | a39be74273b2422df807f083d059c7a2ddfe0ffd | S3 Put Object results in empty object
I'm using `moto==4.1.9`, `boto3==1.12.130`, `botocore==1.29.130`, installing using `pip3` and used locally with `pytest`. When I use the `mock_s3` decorator on my test function, and I use the `put_object` method, it returns a `200` response and has the correct `content-length`. How... | Hi @tiger-at-cranius, are you able to create a small (stand-alone) test that shows this bug?
@bblommers
I have a file `s3.py`:
```
session = boto3.session.Session()
client = session.client(
service_name='s3',
region_name=os.getenv("AWS_REGION", "us-east-1")
)
def put_object(bucket_name:str, object_... | diff --git a/moto/core/models.py b/moto/core/models.py
--- a/moto/core/models.py
+++ b/moto/core/models.py
@@ -265,6 +265,22 @@ def patch_client(client: botocore.client.BaseClient) -> None:
:return:
"""
if isinstance(client, botocore.client.BaseClient):
+ # Check if our event handler was already r... | diff --git a/tests/test_core/test_importorder.py b/tests/test_core/test_importorder.py
--- a/tests/test_core/test_importorder.py
+++ b/tests/test_core/test_importorder.py
@@ -59,7 +59,7 @@ def test_mock_works_with_resource_created_outside(
m = mock_s3()
m.start()
- # So remind us to mock this client
+ ... | ["tests/test_core/test_importorder.py::test_patch_can_be_called_on_a_mocked_client"] | ["tests/test_core/test_importorder.py::test_mock_works_with_client_created_outside", "tests/test_core/test_importorder.py::test_mock_works_when_replacing_client", "tests/test_core/test_importorder.py::test_patch_client_does_not_work_for_random_parameters", "tests/test_core/test_importorder.py::test_mock_works_with_clie... | null | true | 2023-05-12 10:07:35 | 1 | 16 | 1 | 2,600 | 0 | 0.85 | 1 | 0.55 | 1 | 0.486667 | 82.785 | |
1,236 | swe_bench_pro::test::71 | swe_bench_pro | test | 71 | instance_ansible__ansible-748f534312f2073a25a87871f5bd05882891b8c4-v0f01c69f1e2528b935359cfe578530722bca2c59 | ansible/ansible | ansible/ansible | python | 68e270d4cc2579e4659ed53aecbc5a3358b85985 | ### Title
Package manager discovery incorrectly assigns defaults on Fedora and Amazon Linux
### Description
The package manager fact collector does not consistently determine the correct default package manager across Fedora and Amazon Linux distributions.
- On Fedora 38 minimal containers, where `microdnf` points ... | ## Requirements
- The `collect` method of `PkgMgrFactCollector` must always return a dictionary that includes the key 'pkg_mgr'; when no valid manager can be inferred, the value must be 'unknown'.
- On Fedora systems (where 'ansible_distribution' equals 'Fedora') in which `/usr/bin/dnf` exists, the result of `os.path.... | diff --git a/changelogs/fragments/pkg_mgr-default-dnf.yml b/changelogs/fragments/pkg_mgr-default-dnf.yml
new file mode 100644
index 00000000000000..a6269485b7d26d
--- /dev/null
+++ b/changelogs/fragments/pkg_mgr-default-dnf.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - "``pkg_mgr`` - fix the default dnf version detection"
diff -... | diff --git a/test/units/module_utils/facts/system/test_pkg_mgr.py b/test/units/module_utils/facts/system/test_pkg_mgr.py
new file mode 100644
index 00000000000000..a10677e5bea4e7
--- /dev/null
+++ b/test/units/module_utils/facts/system/test_pkg_mgr.py
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+# Copyright: (c) 2023, An... | ["test/units/module_utils/facts/system/test_pkg_mgr.py::test_default_dnf_version_detection_fedora_dnf5", "test/units/module_utils/facts/system/test_pkg_mgr.py::test_default_dnf_version_detection_fedora_dnf4_microdnf", "test/units/module_utils/facts/system/test_pkg_mgr.py::test_default_dnf_version_detection_fedora_dnf5_... | ["test/units/module_utils/facts/system/test_pkg_mgr.py::test_default_dnf_version_detection_fedora_dnf4", "test/units/module_utils/facts/system/test_pkg_mgr.py::test_default_dnf_version_detection_fedora_dnf4_both_installed", "test/units/module_utils/facts/system/test_pkg_mgr.py::test_default_dnf_version_detection_fedora... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-748f534312f2073a25a87871f5bd05882891b8c4-v0f01c69f1e2528b935359cfe578530722bca2c59 | true | null | 2 | 88 | 3 | 1,355 | 0 | 0.95 | 1 | 0.55 | 1 | 0.519167 | 82.7825 | |
1,237 | swe_bench_pro::test::70 | swe_bench_pro | test | 70 | instance_ansible__ansible-709484969c8a4ffd74b839a673431a8c5caa6457-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | ansible/ansible | ansible/ansible | python | 35809806d3ab5d66fbb9696dc6a0009383e50673 | ### Title: get_sysctl dies silently on multiline values and unparseable lines
#### SUMMARY
The shared sysctl fact-collection helper used by the fact-gathering subsystem does not robustly parse the output of the `sysctl` command across platforms. It fails on multiline values (such as the `kern.version` value on OpenBS... | ## Requirements
- The `get_sysctl` helper in `lib/ansible/module_utils/facts/sysctl.py` must run the `sysctl` command (the binary resolved via the module's `get_bin_path`, with the requested prefixes appended as arguments) and parse its standard output into a dictionary mapping each sysctl key to its string value.
- P... | diff --git a/changelogs/fragments/facts_fixes.yml b/changelogs/fragments/facts_fixes.yml
new file mode 100644
index 00000000000000..f99edbe512bf31
--- /dev/null
+++ b/changelogs/fragments/facts_fixes.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - get_sysctl now handles multiline values and does not die silently anymore.
diff --gi... | diff --git a/test/units/module_utils/facts/test_sysctl.py b/test/units/module_utils/facts/test_sysctl.py
new file mode 100644
index 00000000000000..c369b610806336
--- /dev/null
+++ b/test/units/module_utils/facts/test_sysctl.py
@@ -0,0 +1,251 @@
+# This file is part of Ansible
+# -*- coding: utf-8 -*-
+#
+#
+# Ansible ... | ["test/units/module_utils/facts/test_sysctl.py::TestSysctlParsingInFacts::test_get_sysctl_all_invalid_output", "test/units/module_utils/facts/test_sysctl.py::TestSysctlParsingInFacts::test_get_sysctl_openbsd_kern", "test/units/module_utils/facts/test_sysctl.py::TestSysctlParsingInFacts::test_get_sysctl_command_error", ... | ["test/units/module_utils/facts/test_sysctl.py::TestSysctlParsingInFacts::test_get_sysctl_macos_vm", "test/units/module_utils/facts/test_sysctl.py::TestSysctlParsingInFacts::test_get_sysctl_linux_vm", "test/units/module_utils/facts/test_sysctl.py::TestSysctlParsingInFacts::test_get_sysctl_missing_binary", "test/units/m... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-709484969c8a4ffd74b839a673431a8c5caa6457-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | true | null | 3 | 88 | 4 | 1,345 | 0 | 0.95 | 1 | 0.55 | 1 | 0.5175 | 82.7775 | |
1,238 | swe_bench_pro::test::491 | swe_bench_pro | test | 491 | instance_navidrome__navidrome-89b12b34bea5687c70e4de2109fd1e7330bb2ba2 | navidrome/navidrome | navidrome/navidrome | go | 4e0177ee5340b888126092d1146c1c7b6a92fed8 | ## Title: Last.fm artist information is empty or wrong for some artists
### Description
Artist information served from Last.fm is missing or incorrect for a subset of the artists in a library, while the rest of the collection behaves normally. For an affected artist the biography comes back as unavailable, the similar... | ## Requirements
- The Last.fm agent must implement an MBID fallback for its `GetBiography`, `GetSimilar`, and `GetTopSongs` operations. When the artist is requested with a non-empty `mbid`, the agent must first query Last.fm using that `mbid`. If that first response indicates the MBID could not be resolved, either beca... | diff --git a/core/agents/lastfm.go b/core/agents/lastfm.go
index 908e4189110..4b7a3b3fa54 100644
--- a/core/agents/lastfm.go
+++ b/core/agents/lastfm.go
@@ -113,6 +113,12 @@ func (l *lastfmAgent) GetTopSongs(id, artistName, mbid string, count int) ([]Son
func (l *lastfmAgent) callArtistGetInfo(name string, mbid stri... | diff --git a/core/agents/lastfm_test.go b/core/agents/lastfm_test.go
index 25635b92dcb..eddeef79466 100644
--- a/core/agents/lastfm_test.go
+++ b/core/agents/lastfm_test.go
@@ -2,6 +2,12 @@ package agents
import (
"context"
+ "errors"
+ "net/http"
+ "os"
+
+ "github.com/navidrome/navidrome/tests"
+ "github.com/nav... | ["TestAgents", "TestLastFM"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-89b12b34bea5687c70e4de2109fd1e7330bb2ba2 | true | null | 3 | 77 | 2 | 1,532 | 0 | 0.95 | 1 | 0.55 | 1 | 0.512 | 82.761 | |
1,239 | swe_gym::train::78 | swe_gym | train | 78 | getmoto__moto-6986 | getmoto/moto | getmoto/moto | python | bd71374c96329ba9c9b148069aaf808a2537924e | KeyError in _lookup_expression_attribute_value
Moto version: `4.2.8.dev`
The following command
```
aws --endpoint-url http://localhost:5000 dynamodb scan --table-name tsh-ip-bans scan --filter-expression "location1 = :loc" --expression-attribute-values '{"loc": {"S": "mgmt"}}'
```
Results in the following error:
```
1... | Thanks for raising this and for providing the repro @tomers - that's really useful.
I'll do some testing against AWS, but I presume that they would throw an error here because `:loc` is not defined as part of the `expression-attribute-values`.
Marking it as an enhancement to add the same validation, and to throw th... | diff --git a/moto/dynamodb/comparisons.py b/moto/dynamodb/comparisons.py
--- a/moto/dynamodb/comparisons.py
+++ b/moto/dynamodb/comparisons.py
@@ -10,7 +10,7 @@
def get_filter_expression(
expr: Optional[str],
names: Optional[Dict[str, str]],
- values: Optional[Dict[str, str]],
+ values: Optional[Dict[s... | diff --git a/tests/test_dynamodb/__init__.py b/tests/test_dynamodb/__init__.py
--- a/tests/test_dynamodb/__init__.py
+++ b/tests/test_dynamodb/__init__.py
@@ -5,7 +5,7 @@
from uuid import uuid4
-def dynamodb_aws_verified(func):
+def dynamodb_aws_verified(create_table: bool = True):
"""
Function that is v... | ["tests/test_dynamodb/test_dynamodb_create_table.py::test_create_table__specify_non_key_column"] | ["tests/test_dynamodb/test_dynamodb.py::test_remove_list_index__remove_existing_nested_index", "tests/test_dynamodb/test_dynamodb.py::test_list_table_tags_paginated", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_hash_key_can_only_use_equals_operations[<]", "tests/test_dynamodb/test_dynamodb.py::tes... | null | true | 2023-11-03 20:44:05 | 5 | 63 | 1 | 6,367 | 0 | 0.85 | 1 | 0.65 | 0.85 | 0.71 | 82.7425 | |
1,240 | swe_gym::train::510 | swe_gym | train | 510 | python__mypy-9881 | python/mypy | python/mypy | python | abb0bbb5c70912dd6cbb91638073cc88d4c45caf | get_attribute_hook does not trigger for class attributes, get_base_class_hook cannot resolve class attr types
**Bug Report**
I wasn't sure how to best phrase title and/or description for this, so edits/suggestions/renames are welcomed.
The `get_attribute_hook` plugin hook is not triggered for attributes/variables on ... | diff --git a/mypy/checkmember.py b/mypy/checkmember.py
--- a/mypy/checkmember.py
+++ b/mypy/checkmember.py
@@ -703,10 +703,13 @@ def analyze_class_attribute_access(itype: Instance,
if override_info:
info = override_info
+ fullname = '{}.{}'.format(info.fullname, name)
+ hook = mx.chk.plugin.get_cl... | diff --git a/test-data/unit/check-custom-plugin.test b/test-data/unit/check-custom-plugin.test
--- a/test-data/unit/check-custom-plugin.test
+++ b/test-data/unit/check-custom-plugin.test
@@ -902,3 +902,92 @@ reveal_type(f()) # N: Revealed type is "builtins.str"
[file mypy.ini]
\[mypy]
plugins=<ROOT>/test-data/unit/... | ["mypy/test/testcheck.py::TypeCheckSuite::testClassAttrPluginMetaclassRegularBase", "mypy/test/testcheck.py::TypeCheckSuite::testClassAttrPluginMethod", "mypy/test/testcheck.py::TypeCheckSuite::testClassAttrPluginClassVar", "mypy/test/testcheck.py::TypeCheckSuite::testClassAttrPluginPartialType", "mypy/test/testcheck.p... | [] | null | true | 2021-01-05T21:54:55Z | 3 | 77 | 6 | 3,963 | 0.085714 | 0.85 | 1 | 0.77 | 1 | 0.756667 | 82.7293 | ||
1,241 | swe_gym::train::898 | swe_gym | train | 898 | iterative__dvc-5188 | iterative/dvc | iterative/dvc | python | 948633782e79f7c7af29a36f010c57b439c95f16 | config: add support for --show-origin
Same as `git config`:
```
$ git config --list --show-origin
file:/home/efiop/.gitconfig user.email=ruslan@iterative.ai
file:/home/efiop/.gitconfig user.name=Ruslan Kuprieiev
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=true
fi... | I'll pick this up and submit a PR soon.
> i'm not personally sold on `file:` prefix in path (just because I don't really know why git does that, maybe there is a good reason), but the rest looks pretty good. We now have `dvc config --list`, so now we need `dvc config --list --show-origin` as the next step.
For refer... | diff --git a/dvc/command/config.py b/dvc/command/config.py
--- a/dvc/command/config.py
+++ b/dvc/command/config.py
@@ -43,27 +43,9 @@ def run(self):
"options: -u/--unset, value"
)
return 1
- if not self.args.level:
- logger.error(
- ... | diff --git a/tests/func/test_config.py b/tests/func/test_config.py
--- a/tests/func/test_config.py
+++ b/tests/func/test_config.py
@@ -253,7 +253,7 @@ def test_config_remote(tmp_dir, dvc, caplog):
assert "myregion" in caplog.text
-def test_config_show_origin(tmp_dir, dvc, caplog):
+def test_config_show_origin_... | ["tests/func/test_config.py::test_config_show_origin_merged"] | ["tests/func/test_config.py::test_list_bad_args[args2]", "tests/func/test_config.py::test_list_bad_args[args1]", "tests/func/test_config.py::test_config_get[args3-0-iterative]", "tests/func/test_config.py::test_load_relative_paths[cert_path-webdavs://example.com/files/USERNAME/]", "tests/func/test_config.py::test_set_i... | null | true | 2020-12-31T09:30:34Z | 1 | 65 | 1 | 1,486 | 0 | 0.85 | 1 | 0.55 | 1 | 0.464333 | 82.718 | |
1,242 | swe_bench_pro::test::133 | swe_bench_pro | test | 133 | instance_element-hq__element-web-53a9b6447bd7e6110ee4a63e2ec0322c250f08d1-vnan | element-hq/element-web | element-hq/element-web | javascript | 97f6431d60ff5e3f9168948a306036402c316fa1 | ## Title: Edit history fails to render the changes of messages with complex content
### Description
The edit history of a message shows what changed between the original body and the edited body by comparing the two as HTML and applying the reported differences to the rendered original. For messages whose content carr... | ## Requirements
- Rendering the difference between an original message body and an edited body must not raise an error for any pair of message contents, including contents that carry nested markup, emoji rendered as spans that hold their own attributes, or markup kept inside an attribute.
- When a reported difference a... | diff --git a/src/utils/MessageDiffUtils.tsx b/src/utils/MessageDiffUtils.tsx
index f01ece03696..f8b638617a9 100644
--- a/src/utils/MessageDiffUtils.tsx
+++ b/src/utils/MessageDiffUtils.tsx
@@ -1,5 +1,5 @@
/*
-Copyright 2019 - 2021 The Matrix.org Foundation C.I.C.
+Copyright 2019 - 2021, 2023 The Matrix.org Foundation ... | diff --git a/test/utils/MessageDiffUtils-test.tsx b/test/utils/MessageDiffUtils-test.tsx
new file mode 100644
index 00000000000..aec4f6cfaed
--- /dev/null
+++ b/test/utils/MessageDiffUtils-test.tsx
@@ -0,0 +1,90 @@
+/*
+Copyright 2023 The Matrix.org Foundation C.I.C.
+
+Licensed under the Apache License, Version 2.0 (t... | ["test/utils/MessageDiffUtils-test.tsx | editBodyDiffToHtml | renders simple word changes", "test/utils/MessageDiffUtils-test.tsx | editBodyDiffToHtml | renders central word changes", "test/utils/MessageDiffUtils-test.tsx | editBodyDiffToHtml | renders text deletions", "test/utils/MessageDiffUtils-test.tsx | editBodyDi... | ["test/Markdown-test.ts | fixing HTML links | tests that links with markdown empasis in them are getting properly HTML formatted", "test/Markdown-test.ts | fixing HTML links | tests that links with autolinks are not touched at all and are still properly formatted", "test/Markdown-test.ts | fixing HTML links | expects t... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_element-hq__element-web-53a9b6447bd7e6110ee4a63e2ec0322c250f08d1-vnan | true | null | 1 | 114 | 15 | 696 | 0 | 0.95 | 1 | 0.55 | 1 | 0.496 | 82.713 | |
1,243 | swe_gym::train::515 | swe_gym | train | 515 | python__mypy-9629 | python/mypy | python/mypy | python | af3c8be98f9a3fad3fd9c7a9839278c8c1d74455 | mypy fails to consider the case where *args or **kwds contains zero elements
Minimum repro:
```python
object(*[])
object(**{})
```
This gives the following errors:
```
Too many arguments for "object"
Too many arguments for "object"
```
I think this is valid code and should pass the type check.
Context: I encounter... | While your minimal repro indeed gives those errors (and probably shouldn't), in your actual example things are not so simple -- mypy only looks at your source code, it doesn't execute your code, so when it type-checks the line `super().__init__(**kwds)` in your full example it can't actually assume that the argument li... | diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py
--- a/mypy/checkexpr.py
+++ b/mypy/checkexpr.py
@@ -1401,11 +1401,13 @@ def check_for_extra_actual_arguments(self,
ok = True # False if we've found any error
for i, kind in enumerate(actual_kinds):
- if i not in all_actuals and (
- ... | diff --git a/test-data/unit/check-ctypes.test b/test-data/unit/check-ctypes.test
--- a/test-data/unit/check-ctypes.test
+++ b/test-data/unit/check-ctypes.test
@@ -182,6 +182,6 @@ import ctypes
intarr4 = ctypes.c_int * 4
x = {"a": 1, "b": 2}
-intarr4(**x) # E: Too many arguments for "Array"
+intarr4(**x)
[built... | ["mypy/test/testcheck.py::TypeCheckSuite::testPassingEmptyDictWithStars"] | ["mypy/test/testcheck.py::TypeCheckSuite::testTypedDictNonMappingMethods_python2", "mypy/test/testcheck.py::TypeCheckSuite::testTypedDictNonMappingMethods"] | null | true | 2020-10-23T08:44:33Z | 1 | 32 | 1 | 2,109 | 0 | 0.85 | 1 | 0.55 | 1 | 0.458167 | 82.6995 | |
1,244 | swe_gym::train::2233 | swe_gym | train | 2,233 | Project-MONAI__MONAI-5950 | Project-MONAI/MONAI | project-monai/monai | python | 58c256eae2f1d21436a0b9c0dab5d989b8665e55 | Why the data shape are different through transform "spacingd.
### Discussed in https://github.com/Project-MONAI/MONAI/discussions/5934
<div type='discussions-op-text'>
<sup>Originally posted by **xxsxxsxxs666** February 3, 2023</sup>
:
self.assertEqual(img_out.shape, img_t.shape)
self.assertLess(((affine - img_out.affine) ** 2).su... | ["tests/test_spacing.py::TestSpacingCase::test_property_no_change"] | ["tests/test_spacing.py::TestSpacingCase::test_inverse_mn_mx_7", "tests/test_spacing.py::TestSpacingCase::test_spacing_torch_2", "tests/test_spacing.py::TestSpacingCase::test_spacing_10", "tests/test_spacing.py::TestSpacingCase::test_inverse_2", "tests/test_spacing.py::TestSpacingCase::test_spacing_17", "tests/test_spa... | null | true | 2023-02-07T21:28:39Z | 2 | 9 | 1 | 2,553 | 0 | 0.85 | 1 | 0.55 | 1 | 0.4555 | 82.6915 | |
1,245 | swe_bench_verified::test::35 | swe_bench_verified | test | 35 | django__django-11141 | django/django | django/django | python | 5d9cf79baf07fc4aed7ad1b06990532a65378155 | Allow migrations directories without __init__.py files
Description
(last modified by Tim Graham)
Background: In python 3 a package with no __init__.py is implicitly a namespace package, so it has no __file__ attribute.
The migrate command currently checks for existence of a __file__ attribute on the migrations pack... | diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -84,11 +84,6 @@ def load_disk(self):
continue
raise
else:
- # Empty directories are namespaces.
- ... | diff --git a/tests/migrations/test_loader.py b/tests/migrations/test_loader.py
--- a/tests/migrations/test_loader.py
+++ b/tests/migrations/test_loader.py
@@ -508,6 +508,17 @@ def test_ignore_files(self):
migrations = [name for app, name in loader.disk_migrations if app == 'migrations']
self.assertEqu... | ["Migration directories without an __init__.py file are loaded."] | ["test_apply (migrations.test_loader.RecorderTests)", "test_invalid (migrations.test_loader.PycLoaderTests)", "test_valid (migrations.test_loader.PycLoaderTests)", "test_check_consistent_history (migrations.test_loader.LoaderTests)", "test_check_consistent_history_squashed (migrations.test_loader.LoaderTests)", "test_e... | null | true | 2019-03-28T20:49:53Z | 1 | 10 | 1 | 821 | 0 | 1 | 1 | 0.55 | 1 | 0.170167 | 82.6855 | ||
1,246 | swe_gym::train::506 | swe_gym | train | 506 | python__mypy-10284 | python/mypy | python/mypy | python | e46aa6df6126cf47bea97bf9f94d7cba093d0103 | "if type(x) == T" not being used for type narrowing
Given this code:
```
import random
x = random.randint(1, 4)
if x == 0:
y = None
elif x == 1:
y = MyType()
elif x == 2:
y = MyType2()
elif x == 3:
y = MyType3()
else:
assert x == 4
y = None
if isinstance(y, MyType2):
reveal_type(y)
y.... | Yes, this is something mypy could support better. Typically the test is written using `is` instead of `==`, but we could support both.
As `isinstance` is usually a better way to perform a runtime type check, and there is a simple enough workaround, this is not high priority.
May I try this? @JukkaL
Should I start ... | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -3954,6 +3954,81 @@ def conditional_callable_type_map(self, expr: Expression,
return None, {}
+ def find_type_equals_check(self, node: ComparisonExpr, expr_indices: List[int]
+ ) -... | diff --git a/test-data/unit/check-isinstance.test b/test-data/unit/check-isinstance.test
--- a/test-data/unit/check-isinstance.test
+++ b/test-data/unit/check-isinstance.test
@@ -2573,3 +2573,101 @@ if issubclass(x, B):
else:
reveal_type(x) # N: Revealed type is "Type[__main__.A]"
[builtins fixtures/isins... | ["mypy/test/testcheck.py::TypeCheckSuite::testNarrowInElseCaseIfFinal", "mypy/test/testcheck.py::TypeCheckSuite::testTypeEqualsCheck", "mypy/test/testcheck.py::TypeCheckSuite::testTypeNotEqualsCheck", "mypy/test/testcheck.py::TypeCheckSuite::testTypeNotEqualsCheckUsingIsNot", "mypy/test/testcheck.py::TypeCheckSuite::te... | ["mypy/test/testcheck.py::TypeCheckSuite::testTypeEqualsMultipleTypesShouldntNarrow"] | null | true | 2021-04-06T06:12:37Z | 1 | 80 | 8 | 1,106 | 0 | 0.85 | 1 | 0.55 | 1 | 0.451 | 82.678 | |
1,247 | swe_bench_pro::test::510 | swe_bench_pro | test | 510 | instance_protonmail__webclients-01b519cd49e6a24d9a05d2eb97f54e420740072e | protonmail/webclients | protonmail/webclients | javascript | a118161e912592cc084945157b713050ca7ea4ba | # Simplify MIME type detection and add JXL extension support
## Description
The MIME type detection used when uploading files is unnecessarily complex: it reads a chunk of the file's contents and performs additional validation before deciding on a type. This content-based analysis is not needed to determine the corre... | ## Requirements
- The `mimeTypeFromFile` function should determine a file's MIME type from its metadata (the file's reported type and, when absent, its extension) rather than by inspecting the file's contents.
- When the provided file already reports a type, `mimeTypeFromFile` should return that reported type directly... | diff --git a/applications/drive/src/app/store/_uploads/mimeTypeParser/mimeTypeParser.ts b/applications/drive/src/app/store/_uploads/mimeTypeParser/mimeTypeParser.ts
index 659ecba12d5..9d942df02c0 100644
--- a/applications/drive/src/app/store/_uploads/mimeTypeParser/mimeTypeParser.ts
+++ b/applications/drive/src/app/sto... | diff --git a/applications/drive/src/app/store/_uploads/mimeTypeParser/mimeTypeParser.test.ts b/applications/drive/src/app/store/_uploads/mimeTypeParser/mimeTypeParser.test.ts
new file mode 100644
index 0000000000..7581efd88d
--- /dev/null
+++ b/applications/drive/src/app/store/_uploads/mimeTypeParser/mimeTypeParser.tes... | ["src/app/store/_uploads/mimeTypeParser/mimeTypeParser.test.ts | mimeTypeFromFile Based on mimetypeFromExtension()", "src/app/store/_uploads/mimeTypeParser/mimeTypeParser.test.ts | isSupportedImage treats HEIC and JXL as supported images on Safari 17 on macOS"] | ["src/app/store/_uploads/mimeTypeParser/mimeTypeParser.test.ts | mimeTypeFromFile Based on File.type", "src/app/store/_uploads/mimeTypeParser/mimeTypeParser.test.ts | mimeTypeFromFile Fallback to application/octet-stream", "src/app/store/_uploads/mimeTypeParser/mimeTypeParser.test.ts | isSupportedImage does not treat H... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_protonmail__webclients-01b519cd49e6a24d9a05d2eb97f54e420740072e | true | null | 3 | 41 | 2 | 2,083 | 0 | 0.95 | 1 | 0.55 | 1 | 0.483833 | 82.6765 | |
1,248 | swe_bench_verified::test::122 | swe_bench_verified | test | 122 | django__django-13590 | django/django | django/django | python | 755dbf39fcdc491fe9b588358303e259c7750be4 | Upgrading 2.2>3.0 causes named tuples used as arguments to __range to error.
Description
I noticed this while upgrading a project from 2.2 to 3.0.
This project passes named 2-tuples as arguments to range queryset filters. This works fine on 2.2. On 3.0 it causes the following error: TypeError: __new__() missing 1 requ... | 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
@@ -1077,10 +1077,14 @@ def resolve_lookup_value(self, value, can_reuse, allow_joins):
elif isinstance(value, (list, tuple)):
# The items of the iterab... | diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py
--- a/tests/expressions/tests.py
+++ b/tests/expressions/tests.py
@@ -2,6 +2,7 @@
import pickle
import unittest
import uuid
+from collections import namedtuple
from copy import deepcopy
from decimal import Decimal
from unittest import mock
@@ -8... | ["test_range_lookup_namedtuple (expressions.tests.IterableLookupInnerExpressionsTests)"] | ["test_empty_group_by (expressions.tests.ExpressionWrapperTests)", "test_non_empty_group_by (expressions.tests.ExpressionWrapperTests)", "test_deconstruct (expressions.tests.FTests)", "test_deepcopy (expressions.tests.FTests)", "test_equal (expressions.tests.FTests)", "test_hash (expressions.tests.FTests)", "test_not_e... | null | true | 2020-10-23T09:34:55Z | 1 | 6 | 1 | 857 | 0 | 1 | 1 | 0.55 | 1 | 0.162833 | 82.6635 | ||
1,249 | swe_bench_pro::test::636 | swe_bench_pro | test | 636 | instance_qutebrowser__qutebrowser-fec187c2cb53d769c2682b35ca77858a811414a8-v363c8a7e5ccdf6968fc7ab84a2053ac78036691d | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | a55f4db26b4b1caa304dd4b842a4103445fdccc7 | # Search URL construction mishandles multi-word searches whose trailing word names a search engine
## Description
The URL utility functions build a search URL from a user-entered string. The entered string may optionally begin with the name of a configured search engine, in which case the remainder of the string is t... | ## Requirements
- The search URL construction function should correctly separate an optional leading search-engine name from the remaining search term: only treat the first word as an engine when it matches a configured search engine, otherwise treat the whole entry as a search term for the default engine.
- When the ... | diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py
index 5b5d9330157..2fa530fa25e 100644
--- a/qutebrowser/utils/urlutils.py
+++ b/qutebrowser/utils/urlutils.py
@@ -67,7 +67,8 @@ def __init__(self, url: QUrl) -> None:
super().__init__(self.msg)
-def _parse_search_term(s: str) -> typ... | diff --git a/tests/unit/utils/test_urlutils.py b/tests/unit/utils/test_urlutils.py
index 060ccfc840e..edaaa7f2b2a 100644
--- a/tests/unit/utils/test_urlutils.py
+++ b/tests/unit/utils/test_urlutils.py
@@ -290,6 +290,7 @@ def test_special_urls(url, special):
('stripped ', 'www.example.com', 'q=stripped'),
('te... | ["tests/unit/utils/test_urlutils.py::test_get_search_url[test path-search-www.qutebrowser.org-q=path-search-True]"] | ["tests/unit/utils/test_urlutils.py::TestFuzzyUrl::test_file_relative_cwd", "tests/unit/utils/test_urlutils.py::TestFuzzyUrl::test_file_relative", "tests/unit/utils/test_urlutils.py::TestFuzzyUrl::test_file_relative_os_error", "tests/unit/utils/test_urlutils.py::TestFuzzyUrl::test_file_absolute[/foo-expected0]", "tests... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-fec187c2cb53d769c2682b35ca77858a811414a8-v363c8a7e5ccdf6968fc7ab84a2053ac78036691d | true | null | 1 | 40 | 1 | 2,062 | 0 | 0.95 | 1 | 0.55 | 1 | 0.477 | 82.656 | |
1,250 | swe_bench_pro::test::117 | swe_bench_pro | test | 117 | instance_ansible__ansible-f86c58e2d235d8b96029d102c71ee2dfafd57997-v0f01c69f1e2528b935359cfe578530722bca2c59 | ansible/ansible | ansible/ansible | python | 3398c102b5c41d48d0cbc2d81f9c004f07ac3fcb | # Title
SSH stderr from Windows hosts can expose raw CLIXML instead of readable errors
## Description
When running commands against Windows hosts over SSH, stderr may contain PowerShell CLIXML output instead of plain error text. The current handling only parses CLIXML when stderr starts with the CLIXML header, so embe... | ## Requirements
- The CLIXML replacement behavior must be exposed in the `ansible.plugins.shell.powershell` module as a module-level function named `_replace_stderr_clixml` that accepts the raw stderr as a single `bytes` argument and returns `bytes`.
- The stderr passed to `_replace_stderr_clixml` may contain one or m... | diff --git a/changelogs/fragments/ssh-clixml.yml b/changelogs/fragments/ssh-clixml.yml
new file mode 100644
index 00000000000000..05c7af4f8028ed
--- /dev/null
+++ b/changelogs/fragments/ssh-clixml.yml
@@ -0,0 +1,4 @@
+bugfixes:
+ - >-
+ ssh - Improve the logic for parsing CLIXML data in stderr when working with Win... | diff --git a/test/units/plugins/shell/test_powershell.py b/test/units/plugins/shell/test_powershell.py
index b7affce2fad564..40208695496ce5 100644
--- a/test/units/plugins/shell/test_powershell.py
+++ b/test/units/plugins/shell/test_powershell.py
@@ -2,7 +2,75 @@
import pytest
-from ansible.plugins.shell.powershel... | ["test/units/plugins/shell/test_powershell.py::test_replace_stderr_clixml_by_itself", "test/units/plugins/shell/test_powershell.py::test_replace_stderr_clixml_with_pre_and_post_lines", "test/units/plugins/shell/test_powershell.py::test_replace_stderr_clixml_with_remaining_data_on_line", "test/units/plugins/shell/test_p... | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-f86c58e2d235d8b96029d102c71ee2dfafd57997-v0f01c69f1e2528b935359cfe578530722bca2c59 | true | null | 3 | 88 | 15 | 1,094 | 0 | 0.95 | 1 | 0.55 | 1 | 0.475667 | 82.652 | |
1,251 | swe_gym::train::159 | swe_gym | train | 159 | getmoto__moto-5020 | getmoto/moto | getmoto/moto | python | f8f6f6f1eeacd3fae37dd98982c6572cd9151fda | Search Transit Gateway Returns Cached Routes
Searching for transit gateway routes seems to cache routes. The first search will work, but subsequent searches only return the first value you searched for.
```
def late_boto_initialization(self):
import boto3
self.mock_client = boto3.client("ec2", se... | Hi @bearrito, thanks for raising this! Looks like the root cause is that we do not support searching by `route-search.exact-match` yet. Will raise a PR shortly to fix this. | diff --git a/moto/ec2/_models/transit_gateway_route_tables.py b/moto/ec2/_models/transit_gateway_route_tables.py
--- a/moto/ec2/_models/transit_gateway_route_tables.py
+++ b/moto/ec2/_models/transit_gateway_route_tables.py
@@ -138,13 +138,20 @@ def delete_transit_gateway_route(
def search_transit_gateway_routes(
... | diff --git a/tests/test_ec2/test_transit_gateway.py b/tests/test_ec2/test_transit_gateway.py
--- a/tests/test_ec2/test_transit_gateway.py
+++ b/tests/test_ec2/test_transit_gateway.py
@@ -446,6 +446,43 @@ def test_search_transit_gateway_routes_by_state():
routes.should.equal([])
+@mock_ec2
+def test_search_tran... | ["tests/test_ec2/test_transit_gateway.py::test_search_transit_gateway_routes_by_routesearch"] | ["tests/test_ec2/test_transit_gateway.py::test_search_transit_gateway_routes_by_state", "tests/test_ec2/test_transit_gateway.py::test_describe_transit_gateway_by_id", "tests/test_ec2/test_transit_gateway.py::test_create_transit_gateway_route", "tests/test_ec2/test_transit_gateway.py::test_create_transit_gateway", "test... | null | true | 2022-04-11 19:00:42 | 1 | 9 | 1 | 2,468 | 0 | 0.85 | 1 | 0.55 | 1 | 0.441333 | 82.649 | |
1,252 | swe_bench_verified::test::318 | swe_bench_verified | test | 318 | pydata__xarray-7233 | pydata/xarray | pydata/xarray | python | 51d37d1be95547059251076b3fadaa317750aab3 | ds.Coarsen.construct demotes non-dimensional coordinates to variables
### What happened?
`ds.Coarsen.construct` demotes non-dimensional coordinates to variables
### What did you expect to happen?
All variables that were coordinates before the coarsen.construct stay as coordinates afterwards.
### Minimal Complete Ve... | diff --git a/xarray/core/rolling.py b/xarray/core/rolling.py
--- a/xarray/core/rolling.py
+++ b/xarray/core/rolling.py
@@ -973,7 +973,10 @@ def construct(
else:
reshaped[key] = var
- should_be_coords = set(window_dim) & set(self.obj.coords)
+ # should handle window_dim bein... | diff --git a/xarray/tests/test_coarsen.py b/xarray/tests/test_coarsen.py
--- a/xarray/tests/test_coarsen.py
+++ b/xarray/tests/test_coarsen.py
@@ -250,71 +250,91 @@ def test_coarsen_da_reduce(da, window, name) -> None:
assert_allclose(actual, expected)
-@pytest.mark.parametrize("dask", [True, False])
-def test... | ["xarray/tests/test_coarsen.py::TestCoarsenConstruct::test_coarsen_construct_keeps_all_coords"] | ["xarray/tests/test_coarsen.py::test_coarsen_absent_dims_error[1-numpy]", "xarray/tests/test_coarsen.py::test_coarsen_absent_dims_error[1-dask]", "xarray/tests/test_coarsen.py::test_coarsen_dataset[1-numpy-trim-left-True]", "xarray/tests/test_coarsen.py::test_coarsen_dataset[1-numpy-trim-left-False]", "xarray/tests/tes... | null | true | 2022-10-27T23:46:49Z | 1 | 5 | 1 | 1,788 | 0 | 1 | 1 | 0.7 | 0.8 | 0.314667 | 82.644 | ||
1,253 | swe_bench_pro::test::401 | swe_bench_pro | test | 401 | instance_internetarchive__openlibrary-4a5d2a7d24c9e4c11d3069220c0685b736d5ecde-v13642507b4fc1f8d234172bf8129942da2c2ca26 | internetarchive/openlibrary | internetarchive/openlibrary | python | 90475fb6c168e8317e22bd5fbe057d98e570a715 | ## Title:
Incomplete Retrieval of Property Statement Values in Wikidata Entities.
### Description
Wikidata entities currently store property statements, but the code does not provide a mechanism to access all the values associated with a specific property. As a result, values may be difficult to retrieve, inconsisten... | ## Requirements
- The `WikidataEntity` class should provide a method named `get_statement_values` that takes a property identifier as input and returns a list of string values.
- The `get_statement_values` method should iterate over the statement objects of the requested property and collect the string found at `value... | diff --git a/openlibrary/core/wikidata.py b/openlibrary/core/wikidata.py
index c20e101b725..c202d37f992 100644
--- a/openlibrary/core/wikidata.py
+++ b/openlibrary/core/wikidata.py
@@ -19,6 +19,39 @@
WIKIDATA_API_URL = 'https://www.wikidata.org/w/rest.php/wikibase/v0/entities/items/'
WIKIDATA_CACHE_TTL_DAYS = 30
+S... | diff --git a/openlibrary/tests/core/test_wikidata.py b/openlibrary/tests/core/test_wikidata.py
index e448c7d8518..589ce08c47f 100644
--- a/openlibrary/tests/core/test_wikidata.py
+++ b/openlibrary/tests/core/test_wikidata.py
@@ -118,3 +118,34 @@ def test_get_wikipedia_link() -> None:
'es',
)
assert e... | ["openlibrary/tests/core/test_wikidata.py::test_get_statement_values"] | ["openlibrary/tests/core/test_wikidata.py::test_get_wikidata_entity[True-True--True-False]", "openlibrary/tests/core/test_wikidata.py::test_get_wikidata_entity[True-False--True-False]", "openlibrary/tests/core/test_wikidata.py::test_get_wikidata_entity[False-False--False-True]", "openlibrary/tests/core/test_wikidata.py... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-4a5d2a7d24c9e4c11d3069220c0685b736d5ecde-v13642507b4fc1f8d234172bf8129942da2c2ca26 | true | null | 3 | 92 | 1 | 985 | 0 | 0.95 | 1 | 0.55 | 1 | 0.470833 | 82.6375 | |
1,254 | swe_bench_pro::test::58 | swe_bench_pro | test | 58 | instance_ansible__ansible-415e08c2970757472314e515cb63a51ad825c45e-v7eee2454f617569fd6889f2211f75bc02a35f9f8 | ansible/ansible | ansible/ansible | python | f05bcf569367904985c0e5796a4c14ce0b7d4be9 | # Title: Add a helper to select the best available locale for parsing command output
## Description:
Ansible modules frequently invoke external tools and must parse their human-readable output. The correctness of that parsing depends on the active locale: the `'C'` locale often lacks proper Unicode handling, which ca... | ## Requirements
- A helper named `get_best_parsable_locale` must exist at `ansible/module_utils/common/locale.py` and return a locale name (`str`) suitable for parsing command output when Unicode parameters are involved.
- Its signature must be `get_best_parsable_locale(module, preferences=None)`, where `module` is an... | diff --git a/changelogs/fragments/parseable_locale.yml b/changelogs/fragments/parseable_locale.yml
new file mode 100644
index 00000000000000..b90b0db2f35c90
--- /dev/null
+++ b/changelogs/fragments/parseable_locale.yml
@@ -0,0 +1,2 @@
+minor_changes:
+ - added new function to module utils to choose best possible local... | diff --git a/test/units/executor/module_common/test_recursive_finder.py b/test/units/executor/module_common/test_recursive_finder.py
index 074dfb2f1954f1..8136a006498d74 100644
--- a/test/units/executor/module_common/test_recursive_finder.py
+++ b/test/units/executor/module_common/test_recursive_finder.py
@@ -50,6 +50,... | ["test/units/executor/module_common/test_recursive_finder.py::TestRecursiveFinder::test_no_module_utils", "test/units/executor/module_common/test_recursive_finder.py::TestRecursiveFinder::test_from_import_six", "test/units/executor/module_common/test_recursive_finder.py::TestRecursiveFinder::test_import_six", "test/uni... | ["test/units/executor/module_common/test_recursive_finder.py::TestRecursiveFinder::test_module_utils_with_syntax_error", "test/units/executor/module_common/test_recursive_finder.py::TestRecursiveFinder::test_module_utils_with_identation_error"] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-415e08c2970757472314e515cb63a51ad825c45e-v7eee2454f617569fd6889f2211f75bc02a35f9f8 | true | null | 3 | 72 | 9 | 1,376 | 0 | 0.95 | 1 | 0.55 | 1 | 0.469333 | 82.633 | |
1,255 | swe_bench_pro::test::492 | swe_bench_pro | test | 492 | instance_navidrome__navidrome-8d56ec898e776e7e53e352cb9b25677975787ffc | navidrome/navidrome | navidrome/navidrome | go | 5064cb2a46e4b7ca6a834b3c48a409eec8ca1830 | # Title:
Album Artist Resolution Is Inconsistent (Compilations vs Non-Compilations)
## Expected behavior
- Non-compilations: `AlbumArtist`/`AlbumArtistID` come from the tagged album-artist fields when present; otherwise they fall back to the track `Artist`/`ArtistID`.
- Compilations: If all `album_artist_id` values ... | ## Requirements
- A function `getAlbumArtist(al refreshAlbum)` must exist that returns two string values in the order `(id, name)`: the resolved album-artist ID first and the resolved album-artist display name second. The `refreshAlbum` value passed to it carries at least the fields `Compilation` (bool), `Artist`, `Art... | diff --git a/persistence/album_repository.go b/persistence/album_repository.go
index 94af9b9e269..d651d27a4bb 100644
--- a/persistence/album_repository.go
+++ b/persistence/album_repository.go
@@ -156,21 +156,24 @@ func (r *albumRepository) Refresh(ids ...string) error {
return nil
}
+const zwsp = string('\u200b')... | diff --git a/persistence/album_repository_test.go b/persistence/album_repository_test.go
index ec0f4344238..84f3019fad9 100644
--- a/persistence/album_repository_test.go
+++ b/persistence/album_repository_test.go
@@ -8,6 +8,7 @@ import (
"github.com/astaxie/beego/orm"
"github.com/navidrome/navidrome/conf"
+ "gith... | ["TestPersistence"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-8d56ec898e776e7e53e352cb9b25677975787ffc | true | null | 3 | 80 | 1 | 1,208 | 0 | 0.95 | 1 | 0.55 | 1 | 0.468 | 82.629 | |
1,256 | swe_gym::train::225 | swe_gym | train | 225 | getmoto__moto-7393 | getmoto/moto | getmoto/moto | python | dbfa456dda04f995479c995a361b60f521e1753e | No way to apply Configuration Options when using Server Mode
I am using moto in server mode (either by directly running it as a separate docker-compose service, or via `ThreadedMotoServer`), and as far as I can tell there is no way to specify the configuration options documented at https://docs.getmoto.org/en/latest/do... | Hi @jstockwin, welcome to Moto!
There isn't really a way to do this at the moment. I'll mark it as an enhancement to configure this somehow. | diff --git a/moto/moto_api/_internal/models.py b/moto/moto_api/_internal/models.py
--- a/moto/moto_api/_internal/models.py
+++ b/moto/moto_api/_internal/models.py
@@ -2,6 +2,7 @@
from moto.core import DEFAULT_ACCOUNT_ID
from moto.core.base_backend import BackendDict, BaseBackend
+from moto.core.config import defaul... | diff --git a/tests/test_core/test_config.py b/tests/test_core/test_config.py
new file mode 100644
--- /dev/null
+++ b/tests/test_core/test_config.py
@@ -0,0 +1,52 @@
+import requests
+
+from moto import mock_aws, settings
+from moto.awslambda.models import LambdaBackend
+from moto.awslambda.utils import get_backend
+fr... | ["tests/test_core/test_config.py::test_change_configuration_using_api"] | [] | null | true | 2024-02-25 22:56:32 | 3 | 31 | 1 | 1,944 | 0 | 0.85 | 1 | 0.55 | 1 | 0.427333 | 82.607 | |
1,257 | swe_bench_pro::test::39 | swe_bench_pro | test | 39 | instance_ansible__ansible-0fd88717c953b92ed8a50495d55e630eb5d59166-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | ansible/ansible | ansible/ansible | python | 016b7f71b10539c90ddbb3246f19f9cbf0e65428 | # Title: Password lookup fails on subsequent runs when an encryption identifier is stored in the password file
## Description
Currently, the lookup works correctly the first time it creates and stores a password, but on any subsequent run it fails whenever an encryption identifier was previously saved alongside the st... | ## Requirements
- When `_parse_content` is called on the stored content, it should yield three values in the order password, salt, and ident, so a single call provides the full breakdown of what was saved.
- The stored content given to `_parse_content` should rely on the literal slug `salt=` and then the literal slug ... | diff --git a/lib/ansible/plugins/lookup/password.py b/lib/ansible/plugins/lookup/password.py
index 4bc8e3dfb523d5..437dff6fa7ad19 100644
--- a/lib/ansible/plugins/lookup/password.py
+++ b/lib/ansible/plugins/lookup/password.py
@@ -197,18 +197,31 @@ def _parse_content(content):
'''
password = content
salt... | diff --git a/test/units/plugins/lookup/test_password.py b/test/units/plugins/lookup/test_password.py
index 39aa8b9a7bad54..1caec33e568b9c 100644
--- a/test/units/plugins/lookup/test_password.py
+++ b/test/units/plugins/lookup/test_password.py
@@ -330,23 +330,34 @@ def test_gen_password(self):
class TestParseContent(un... | ["test/units/plugins/lookup/test_password.py::TestParseContent::test", "test/units/plugins/lookup/test_password.py::TestParseContent::test_with_salt", "test/units/plugins/lookup/test_password.py::TestParseContent::test_empty_password_file", "test/units/plugins/lookup/test_password.py::TestParseContent::test_with_salt_a... | ["test/units/plugins/lookup/test_password.py::TestFormatContent::test_no_encrypt", "test/units/plugins/lookup/test_password.py::TestGenCandidateChars::test_gen_candidate_chars", "test/units/plugins/lookup/test_password.py::TestRandomPassword::test_gen_password", "test/units/plugins/lookup/test_password.py::TestReadPass... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-0fd88717c953b92ed8a50495d55e630eb5d59166-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | true | null | 2 | 108 | 4 | 576 | 0 | 0.95 | 1 | 0.55 | 1 | 0.456 | 82.593 | |
1,258 | swe_gym::train::551 | swe_gym | train | 551 | python__mypy-9909 | python/mypy | python/mypy | python | e9edcb957f341dcf7a14bb7b7acfd4186fb1248b | unreachable: false positive for isinstance
I have come across the problem when working with runtime checkable Protocols and overloading. Still, I can simplify it to the following example, where Mypy (version 0.79) reports a wrong "unreachable" error and thus misses the real bug in the last line:
```
from abc import ab... | Do you want to send us a PR with a fix?
Yes, I will try it at the weekend. | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -3725,7 +3725,7 @@ def make_fake_typeinfo(self,
return cdef, info
def intersect_instances(self,
- instances: Sequence[Instance],
+ instances: Tuple[Instance... | diff --git a/test-data/unit/check-isinstance.test b/test-data/unit/check-isinstance.test
--- a/test-data/unit/check-isinstance.test
+++ b/test-data/unit/check-isinstance.test
@@ -2348,6 +2348,53 @@ if isinstance(y, B):
reveal_type(y) # E: Statement is unreachable
[builtins fixtures/isinstance.pyi]
+[case... | ["mypy/test/testcheck.py::TypeCheckSuite::testIsInstanceAdHocIntersectionReversed"] | ["mypy/test/testcheck.py::TypeCheckSuite::testIsInstanceAdHocIntersectionGenericsWithValues", "mypy/test/testcheck.py::TypeCheckSuite::testIsInstanceAdHocIntersectionGenericsWithValuesDirectReturn", "mypy/test/testcheck.py::TypeCheckSuite::testIsInstanceAdHocIntersectionGenerics"] | null | true | 2021-01-13T23:55:05Z | 1 | 62 | 1 | 1,285 | 0 | 0.85 | 1 | 0.55 | 1 | 0.420833 | 82.5875 | |
1,259 | swe_bench_verified::test::497 | swe_bench_verified | test | 497 | sympy__sympy-24539 | sympy/sympy | sympy/sympy | python | 193e3825645d93c73e31cdceb6d742cc6919624d | `PolyElement.as_expr()` not accepting symbols
The method `PolyElement.as_expr()`
https://github.com/sympy/sympy/blob/193e3825645d93c73e31cdceb6d742cc6919624d/sympy/polys/rings.py#L618-L624
is supposed to let you set the symbols you want to use, but, as it stands, either you pass the wrong number of symbols, and get a... | diff --git a/sympy/polys/rings.py b/sympy/polys/rings.py
--- a/sympy/polys/rings.py
+++ b/sympy/polys/rings.py
@@ -616,10 +616,13 @@ def set_ring(self, new_ring):
return new_ring.from_dict(self, self.ring.domain)
def as_expr(self, *symbols):
- if symbols and len(symbols) != self.ring.ngens:
-... | diff --git a/sympy/polys/tests/test_rings.py b/sympy/polys/tests/test_rings.py
--- a/sympy/polys/tests/test_rings.py
+++ b/sympy/polys/tests/test_rings.py
@@ -259,11 +259,11 @@ def test_PolyElement_as_expr():
assert f != g
assert f.as_expr() == g
- X, Y, Z = symbols("x,y,z")
- g = 3*X**2*Y - X*Y*Z + 7... | ["test_PolyElement_as_expr"] | ["test_PolyRing___init__", "test_PolyRing___hash__", "test_PolyRing___eq__", "test_PolyRing_ring_new", "test_PolyRing_drop", "test_PolyRing___getitem__", "test_PolyRing_is_", "test_PolyRing_add", "test_PolyRing_mul", "test_sring", "test_PolyElement___hash__", "test_PolyElement___eq__", "test_PolyElement__lt_le_gt_ge__"... | null | true | 2023-01-17T17:26:42Z | 1 | 9 | 1 | 645 | 0 | 1 | 1 | 0.55 | 1 | 0.1375 | 82.5875 | ||
1,260 | swe_gym::train::785 | swe_gym | train | 785 | iterative__dvc-4517 | iterative/dvc | iterative/dvc | python | 4901765cd47d1e742ebe4ea3051d0c93c4239713 | http remote: url query is ignored
## Bug Report
In the .dvc/config file, I provide a query for the http remote
```py
['remote "http"']
url = http://localhost:8080/?param1=value1¶m2=value2
```
When I receive the download/upload request in the server, the query is not received, I only get the file path
```
# ... | Hi @MetalBlueberry, this is expected behavior in DVC. We do not currently support passing query parameters into the requests made to an HTTP remote.
Could you give some explanation of your use case here? I'm guessing your server is expecting some auth related information in the query parameters?
Implementation-wi... | diff --git a/dvc/path_info.py b/dvc/path_info.py
--- a/dvc/path_info.py
+++ b/dvc/path_info.py
@@ -253,6 +253,15 @@ def __init__(self, url):
self.query = p.query
self.fragment = p.fragment
+ def replace(self, path=None):
+ return self.from_parts(
+ *self._base_parts,
+ ... | diff --git a/tests/unit/test_path_info.py b/tests/unit/test_path_info.py
--- a/tests/unit/test_path_info.py
+++ b/tests/unit/test_path_info.py
@@ -85,3 +85,20 @@ def test_https_url_info_str():
def test_path_info_as_posix(mocker, path, as_posix, osname):
mocker.patch("os.name", osname)
assert PathInfo(path).a... | ["tests/unit/test_path_info.py::test_url_replace_path"] | ["tests/unit/test_path_info.py::test_path_info_as_posix[/some/abs/path-/some/abs/path-posix]", "tests/unit/test_path_info.py::test_https_url_info_str", "tests/unit/test_path_info.py::test_url_info_parent[URLInfo]", "tests/unit/test_path_info.py::test_url_info_eq[CloudURLInfo]", "tests/unit/test_path_info.py::test_url_i... | null | true | 2020-09-02T06:29:56Z | 1 | 9 | 1 | 2,326 | 0 | 0.85 | 1 | 0.55 | 1 | 0.417667 | 82.578 | |
1,261 | swe_bench_verified::test::306 | swe_bench_verified | test | 306 | pydata__xarray-4356 | pydata/xarray | pydata/xarray | python | e05fddea852d08fc0845f954b79deb9e9f9ff883 | sum: min_count is not available for reduction with more than one dimensions
**Is your feature request related to a problem? Please describe.**
`sum` with `min_count` errors when passing more than one dim:
```python
import xarray as xr
da = xr.DataArray([[1., 2, 3], [4, 5, 6]])
da.sum(["dim_0", "dim_1"], min_count=1)
... | diff --git a/xarray/core/nanops.py b/xarray/core/nanops.py
--- a/xarray/core/nanops.py
+++ b/xarray/core/nanops.py
@@ -26,13 +26,9 @@ def _maybe_null_out(result, axis, mask, min_count=1):
"""
xarray version of pandas.core.nanops._maybe_null_out
"""
- if hasattr(axis, "__len__"): # if tuple or list
- ... | diff --git a/xarray/tests/test_duck_array_ops.py b/xarray/tests/test_duck_array_ops.py
--- a/xarray/tests/test_duck_array_ops.py
+++ b/xarray/tests/test_duck_array_ops.py
@@ -595,6 +595,24 @@ def test_min_count(dim_num, dtype, dask, func, aggdim):
assert_dask_array(actual, dask)
+@pytest.mark.parametrize("dtyp... | ["xarray/tests/test_duck_array_ops.py::test_min_count_nd[sum-False-float]", "xarray/tests/test_duck_array_ops.py::test_min_count_nd[sum-False-int]", "xarray/tests/test_duck_array_ops.py::test_min_count_nd[sum-False-float32]", "xarray/tests/test_duck_array_ops.py::test_min_count_nd[sum-False-bool_]", "xarray/tests/test_... | ["xarray/tests/test_duck_array_ops.py::TestOps::test_first", "xarray/tests/test_duck_array_ops.py::TestOps::test_last", "xarray/tests/test_duck_array_ops.py::TestOps::test_count", "xarray/tests/test_duck_array_ops.py::TestOps::test_where_type_promotion", "xarray/tests/test_duck_array_ops.py::TestOps::test_stack_type_pr... | null | true | 2020-08-19T23:48:49Z | 1 | 6 | 8 | 681 | 0 | 1 | 1 | 0.55 | 1 | 0.1335 | 82.5755 | ||
1,262 | swe_bench_verified::test::119 | swe_bench_verified | test | 119 | django__django-13551 | django/django | django/django | python | 7f9e4524d6b23424cf44fbe1bf1f4e70f6bb066e | Changing user's email could invalidate password reset tokens
Description
Sequence:
Have account with email address foo@…
Password reset request for that email (unused)
foo@… account changes their email address
Password reset email is used
The password reset email's token should be rejected at that point, but in fact i... | diff --git a/django/contrib/auth/tokens.py b/django/contrib/auth/tokens.py
--- a/django/contrib/auth/tokens.py
+++ b/django/contrib/auth/tokens.py
@@ -78,9 +78,9 @@ def _make_token_with_timestamp(self, user, timestamp, legacy=False):
def _make_hash_value(self, user, timestamp):
"""
- Hash the use... | diff --git a/tests/auth_tests/models/__init__.py b/tests/auth_tests/models/__init__.py
--- a/tests/auth_tests/models/__init__.py
+++ b/tests/auth_tests/models/__init__.py
@@ -8,6 +8,7 @@
from .no_password import NoPasswordUser
from .proxy import Proxy, UserProxy
from .uuid_pk import UUIDUser
+from .with_custom_email... | ["Updating the user email address invalidates the token.", "test_token_with_different_secret (auth_tests.test_tokens.TokenGeneratorTest)"] | ["test_str (auth_tests.test_models.GroupTests)", "test_group_natural_key (auth_tests.test_models.NaturalKeysTestCase)", "test_user_natural_key (auth_tests.test_models.NaturalKeysTestCase)", "test_check_password (auth_tests.test_models.AnonymousUserTests)", "test_delete (auth_tests.test_models.AnonymousUserTests)", "tes... | null | true | 2020-10-17T17:22:01Z | 1 | 10 | 2 | 601 | 0 | 1 | 1 | 0.55 | 1 | 0.1335 | 82.5755 | ||
1,263 | swe_bench_verified::test::446 | swe_bench_verified | test | 446 | sympy__sympy-14976 | sympy/sympy | sympy/sympy | python | 9cbea134220b0b951587e11b63e2c832c7246cbc | lambdify(modules='mpmath') doesn't wrap rationals
```py
>>> eqn = Eq(rf(18,x), 77 + S(1)/3)
>>> f = lambdify(x, eqn.lhs - eqn.rhs, 'mpmath')
>>> print(inspect.getsource(f))
def _lambdifygenerated(x):
return ( # Not supported in Python:
# RisingFactorial
RisingFactorial(18, x) - 232/3)
```
This results in reduce... | diff --git a/sympy/printing/pycode.py b/sympy/printing/pycode.py
--- a/sympy/printing/pycode.py
+++ b/sympy/printing/pycode.py
@@ -332,6 +332,13 @@ def _print_Float(self, e):
return '{func}({args})'.format(func=self._module_format('mpmath.mpf'), args=args)
+ def _print_Rational(self, e):
+ return... | diff --git a/sympy/printing/tests/test_pycode.py b/sympy/printing/tests/test_pycode.py
--- a/sympy/printing/tests/test_pycode.py
+++ b/sympy/printing/tests/test_pycode.py
@@ -2,7 +2,7 @@
from __future__ import (absolute_import, division, print_function)
from sympy.codegen import Assignment
-from sympy.core import E... | ["test_MpmathPrinter"] | ["test_PythonCodePrinter", "test_NumPyPrinter", "test_SciPyPrinter", "test_pycode_reserved_words", "test_printmethod", "test_codegen_ast_nodes", "test_nsolve_denominator", "test_nsolve", "test_issue_6408", "test_increased_dps", "test_nsolve_precision", "test_nsolve_complex", "test_nsolve_dict_kwarg"] | null | true | 2018-07-25T17:38:07Z | 1 | 7 | 1 | 659 | 0 | 1 | 1 | 0.55 | 1 | 0.133167 | 82.5745 | ||
1,264 | swe_gym::train::2181 | swe_gym | train | 2,181 | Project-MONAI__MONAI-648 | Project-MONAI/MONAI | project-monai/monai | python | cd1e7f3fb4a77a9958d71de7b326323c2f33336b | Rand2DElastic implicitly scales images based on spacing
**Describe the bug**
Applying Rand2DElastic with large spacing values appears to have the effect of padding the image and then resampling to the original size (easiest to understand from the screenshot below). This means that the pixel resolution has been increase... | Hey, Im going to take a look at this. I'll read the code and try to fix it :)
@wyli Can i have some assist with docker to reproduce this?
@hjmjohnson Is the docker image has NVIDA installed or do i need to have it on my computer?
Hi @fabrizzioalco ,
You can install env by MONAI docker and then git clone your repo to... | diff --git a/monai/transforms/spatial/array.py b/monai/transforms/spatial/array.py
--- a/monai/transforms/spatial/array.py
+++ b/monai/transforms/spatial/array.py
@@ -23,6 +23,7 @@
from monai.data.utils import compute_shape_offset, to_affine_nd, zoom_affine
from monai.networks.layers import AffineTransform, GaussianF... | diff --git a/tests/test_rand_elastic_2d.py b/tests/test_rand_elastic_2d.py
--- a/tests/test_rand_elastic_2d.py
+++ b/tests/test_rand_elastic_2d.py
@@ -53,9 +53,9 @@
{"img": torch.arange(27).reshape((3, 3, 3))},
torch.tensor(
[
- [[2.1070, 2.0056], [5.6450, 5.8149]],
- ... | ["tests/test_rand_elasticd_2d.py::TestRand2DElasticd::test_rand_2d_elasticd_3", "tests/test_rand_elastic_2d.py::TestRand2DElastic::test_rand_2d_elastic_3"] | ["tests/test_rand_elasticd_2d.py::TestRand2DElasticd::test_rand_2d_elasticd_2", "tests/test_rand_elastic_2d.py::TestRand2DElastic::test_rand_2d_elastic_2", "tests/test_rand_elasticd_2d.py::TestRand2DElasticd::test_rand_2d_elasticd_0", "tests/test_rand_elastic_2d.py::TestRand2DElastic::test_rand_2d_elastic_1", "tests/te... | null | true | 2020-06-29T14:50:03Z | 2 | 21 | 2 | 2,046 | 0 | 0.85 | 1 | 0.55 | 1 | 0.411 | 82.558 | |
1,265 | swe_gym::train::580 | swe_gym | train | 580 | python__mypy-11244 | python/mypy | python/mypy | python | e80da8cbf305c7fd2555dcb8443726eea69fa7d7 | Unsupported target for indexed assignment for TypedDict union
```python
from typing_extensions import TypedDict
from typing import Union
class Foo1(TypedDict):
z: str
a: int
class Foo2(TypedDict):
z: str
b: int
def func(foo: Union[Foo1, Foo2]):
foo["z"] = "z"
```
The error `Unsupported target fo... | it's working with `dataclasses`: mypy does not report error (and correctly reports error if the key do not exists).
Generally speaking, is static typing better supported for `dataclasses` than `TypedDict`?
```python
from dataclasses import dataclass
from typing import Union
@dataclass
class Foo1:
z: st... | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -3236,25 +3236,9 @@ def check_indexed_assignment(self, lvalue: IndexExpr,
"""
self.try_infer_partial_type_from_indexed_assignment(lvalue, rvalue)
basetype = get_proper_type(self.expr_checker.accept(l... | diff --git a/test-data/unit/check-inference.test b/test-data/unit/check-inference.test
--- a/test-data/unit/check-inference.test
+++ b/test-data/unit/check-inference.test
@@ -1975,7 +1975,7 @@ T = TypeVar('T')
class A:
def f(self) -> None:
- self.g() # E: Too few arguments for "g" of "A"
+ self... | ["mypy/test/testcheck.py::TypeCheckSuite::testTypedDictUnionSetItem", "mypy/test/testcheck.py::TypeCheckSuite::testTypedDictUnionDelItem", "mypy/test/testcheck.py::TypeCheckSuite::testTypedDictTypeVarUnionSetItem"] | ["mypy/test/testcheck.py::TypeCheckSuite::testPluginUnionsOfTypedDictsNonTotal", "mypy/test/testcheck.py::TypeCheckSuite::testPluginUnionsOfTypedDicts", "mypy/test/testcheck.py::TypeCheckSuite::testTypedDictUnionGetItem"] | null | true | 2021-10-01T19:26:52Z | 3 | 70 | 3 | 1,029 | 0 | 0.85 | 1 | 0.55 | 1 | 0.404833 | 82.5395 | |
1,266 | swe_gym::train::1073 | swe_gym | train | 1,073 | pydantic__pydantic-8027 | pydantic/pydantic | pydantic/pydantic | python | cde3779c602406ef6c41d33fce44092bb8c5b315 | Using `pydantic.dataclasses` after only importing `pydantic` gives the stdlib `dataclasses` module
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
Code like this is wrong in a confusing way:
```python
import pydantic
@pydantic.dataclasses.dataclass
class ...
```
I ran into this while... | Running
```py
import pydantic
print(pydantic.__version__)
print(pydantic.dataclasses.__name__) # dataclasses
import pydantic.dataclasses
print(pydantic.dataclasses.__name__) # pydantic.dataclasses
```
Gives me:
```
2.4.2
pydantic.dataclasses
pydantic.dataclasses
```
???
Are you using the release... | diff --git a/pydantic/__init__.py b/pydantic/__init__.py
--- a/pydantic/__init__.py
+++ b/pydantic/__init__.py
@@ -365,7 +365,7 @@ def __getattr__(attr_name: str) -> object:
from importlib import import_module
if module_name == '__module__':
- return import_module(attr_name, package=package)
+ ... | diff --git a/tests/conftest.py b/tests/conftest.py
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -3,9 +3,11 @@
import os
import re
import secrets
+import subprocess
import sys
import textwrap
from dataclasses import dataclass
+from pathlib import Path
from types import FunctionType
from typing import Any, ... | ["tests/test_exports.py::test_dataclass_import", "tests/test_migration.py::test_getattr_migration"] | ["tests/test_migration.py::test_removed_on_v2[pydantic.typing:is_union]", "tests/test_migration.py::test_moved_on_v2[pydantic.utils:to_lower_camel]", "tests/test_migration.py::test_moved_but_not_warn_on_v2[pydantic.class_validators:validator]", "tests/test_exports.py::test_public_api_dynamic_imports[model_serializer-va... | null | true | 2023-11-06T18:04:05Z | 2 | 6 | 2 | 2,302 | 0 | 0.85 | 1 | 0.55 | 1 | 0.403667 | 82.536 | |
1,267 | swe_gym::train::971 | swe_gym | train | 971 | dask__dask-6632 | dask/dask | dask/dask | python | f0b2ac29d0127aac7d29a1675772816bb8b54424 | String/object dunder/operator methods do not delegate to the right backend in 2.26.0
```
import dask.array as da
a = da.from_array(["a", "b", ".", "e"])
print(a == ".")
# 2.26.0: False
# 2.25.0: dask.array<eq, shape=(4,), dtype=bool, chunksize=(4,), chunktype=numpy.ndarray>
```
Is this expected in `2.26.0`? I can't ... |
Thanks for the report. 0ca1607aa14cb81520ca9526f871b631fe6706fa looks to be the culprit (cc @jthielen if you have time to look)
If I had to guess...
1. dask.array.Array doesn't implement `__contains__`, so Python falls back to `__getitem__` and `__eq__`
2. This looks fishy
```python
In [2]: import dask.array a... | diff --git a/dask/array/chunk_types.py b/dask/array/chunk_types.py
--- a/dask/array/chunk_types.py
+++ b/dask/array/chunk_types.py
@@ -1,5 +1,3 @@
-from numbers import Number
-
import numpy as np
@@ -148,8 +146,4 @@ def is_valid_chunk_type(type):
def is_valid_array_chunk(array):
""" Check if given array is... | diff --git a/dask/array/tests/test_dispatch.py b/dask/array/tests/test_dispatch.py
--- a/dask/array/tests/test_dispatch.py
+++ b/dask/array/tests/test_dispatch.py
@@ -4,6 +4,7 @@
import numpy as np
import dask.array as da
+from dask.array import Array
from dask.array.chunk_types import is_valid_array_chunk, is_val... | ["dask/array/tests/test_dispatch.py::test_is_valid_array_chunk[0-False]", "dask/array/tests/test_dispatch.py::test_is_valid_array_chunk[0.0-False]", "dask/array/tests/test_dispatch.py::test_delegation_specific_cases"] | ["dask/array/tests/test_dispatch.py::test_binary_operation_type_precedence[arr_upcast1-arr_downcast1-lt]", "dask/array/tests/test_dispatch.py::test_binary_operation_type_precedence[arr_upcast0-arr_downcast0-floordiv]", "dask/array/tests/test_dispatch.py::test_binary_operation_type_precedence[arr_upcast2-arr_downcast2-f... | null | true | 2020-09-12T23:11:31Z | 2 | 37 | 3 | 1,676 | 0 | 0.85 | 1 | 0.55 | 1 | 0.402667 | 82.533 | |
1,268 | swe_bench_pro::test::222 | swe_bench_pro | test | 222 | instance_flipt-io__flipt-b6cef5cdc0daff3ee99e5974ed60a1dc6b4b0d67 | flipt-io/flipt | flipt-io/flipt | go | 1bd9924b177927fa51d016a71a4353ab9c0d32e7 | **Title:**
Authentication cookies are not cleared after unauthenticated responses caused by expired or invalid tokens.
**Bug Description:**
When using cookie-based authentication, if the authentication token becomes invalid or expires, the server returns an \"unauthenticated\" error but does not clear the correspond... | ## Requirements
- When an HTTP request fails with an unauthenticated error and the request included authentication cookies, `Middleware.ErrorHandler` must clear all relevant authentication cookies in the response to prevent the client from reusing invalid credentials.
- Cookie clearing must set HTTP `Set-Cookie` heade... | diff --git a/internal/cmd/auth.go b/internal/cmd/auth.go
index b432381a13..7cb8ff4b0f 100644
--- a/internal/cmd/auth.go
+++ b/internal/cmd/auth.go
@@ -116,12 +116,13 @@ func authenticationHTTPMount(
conn *grpc.ClientConn,
) {
var (
- muxOpts = []runtime.ServeMuxOption{
+ authmiddleware = auth.NewHTTPMiddleware(c... | diff --git a/internal/server/auth/http_test.go b/internal/server/auth/http_test.go
index 8a558c5cc8..0b4611b5aa 100644
--- a/internal/server/auth/http_test.go
+++ b/internal/server/auth/http_test.go
@@ -1,12 +1,18 @@
package auth
import (
+ "context"
+ "io"
"net/http"
"net/http/httptest"
"testing"
+ "github... | ["TestHandler", "TestErrorHandler"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-b6cef5cdc0daff3ee99e5974ed60a1dc6b4b0d67 | true | null | 2 | 60 | 2 | 1,397 | 0 | 0.95 | 1 | 0.55 | 1 | 0.432833 | 82.5235 | |
1,269 | swe_bench_pro::test::437 | swe_bench_pro | test | 437 | instance_internetarchive__openlibrary-ba3abfb6af6e722185d3715929ab0f3e5a134eed-v76304ecdb3a5954fcf13feb710e8c40fcf24b73c | internetarchive/openlibrary | internetarchive/openlibrary | python | 2edaf7283cf5d934e0d60aac0cc89eff7ceb6e43 | ## Title: Allow Record Validation Checks to Be Bypassed via an Override Flag
## Description
Label: Feature Request
Problem / Opportunity
The current book import process fails when validation rules are triggered, such as for books published too far in the past or future, those without ISBNs when required, or those ma... | ## Requirements
- The `validate_record` function must accept a second positional boolean argument named `override_validation` with a default value of `False`.
- When a record passes all checks, `validate_record` must complete without raising and implicitly return `None`.
- When `override_validation` is `False` (or om... | diff --git a/openlibrary/catalog/add_book/__init__.py b/openlibrary/catalog/add_book/__init__.py
index b3fa94583ca..35d3153a630 100644
--- a/openlibrary/catalog/add_book/__init__.py
+++ b/openlibrary/catalog/add_book/__init__.py
@@ -30,6 +30,7 @@
from collections import defaultdict
from copy import copy
from time im... | diff --git a/openlibrary/catalog/add_book/tests/test_add_book.py b/openlibrary/catalog/add_book/tests/test_add_book.py
index 2c1d3862b..e81e2da4b 100644
--- a/openlibrary/catalog/add_book/tests/test_add_book.py
+++ b/openlibrary/catalog/add_book/tests/test_add_book.py
@@ -4,12 +4,16 @@ import pytest
from copy import d... | ["openlibrary/tests/catalog/test_utils.py::test_author_dates_match", "openlibrary/tests/catalog/test_utils.py::test_flip_name", "openlibrary/tests/catalog/test_utils.py::test_pick_first_date", "openlibrary/tests/catalog/test_utils.py::test_pick_best_name", "openlibrary/tests/catalog/test_utils.py::test_pick_best_author... | ["openlibrary/catalog/add_book/tests/test_add_book.py::test_isbns_from_record", "openlibrary/catalog/add_book/tests/test_add_book.py::test_editions_matched_no_results", "openlibrary/catalog/add_book/tests/test_add_book.py::test_editions_matched", "openlibrary/catalog/add_book/tests/test_add_book.py::test_load_without_r... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-ba3abfb6af6e722185d3715929ab0f3e5a134eed-v76304ecdb3a5954fcf13feb710e8c40fcf24b73c | true | null | 3 | 48 | 52 | 1,627 | 0 | 0.95 | 1 | 0.55 | 1 | 0.431167 | 82.5185 | |
1,270 | swe_gym::train::1124 | swe_gym | train | 1,124 | pydantic__pydantic-8734 | pydantic/pydantic | pydantic/pydantic | python | 3fda9d65ee69dd1ba97d1fdf08caa9dcc5e58e2b | __pydantic_config__ ignored in `TypeAdapter` for `TypedDicts`
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
When generating json schema with pydantic, `__pydantic_config__` is ignored in the outputted json, [contrary to what the docs explain](https://docs.pydantic.dev/2.6/errors/usage... | @evalott100,
Thanks for reporting this issue. Could you please confirm whether this issue was introduced in 2.6, or if it has been a problem for a while?
> @evalott100,
>
> Thanks for reporting this issue. Could you please confirm whether this issue was introduced in 2.6, or if it has been a problem for a while?
@... | diff --git a/pydantic/json_schema.py b/pydantic/json_schema.py
--- a/pydantic/json_schema.py
+++ b/pydantic/json_schema.py
@@ -1214,18 +1214,24 @@ def typed_dict_schema(self, schema: core_schema.TypedDictSchema) -> JsonSchemaVa
]
if self.mode == 'serialization':
named_required_fields.exte... | diff --git a/tests/test_json_schema.py b/tests/test_json_schema.py
--- a/tests/test_json_schema.py
+++ b/tests/test_json_schema.py
@@ -2545,6 +2545,46 @@ def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHa
}
+def test_typeddict_with_title():
+ class Model(TypedDict):
+ __... | ["tests/test_json_schema.py::test_typeddict_with_title", "tests/test_json_schema.py::test_typeddict_with__callable_json_schema_extra", "tests/test_json_schema.py::test_typeddict_with_json_schema_extra"] | ["tests/test_json_schema.py::test_ipv6network_type", "tests/test_json_schema.py::test_schema_attributes", "tests/test_json_schema.py::test_secrets_schema[min-max-constraints-SecretStr]", "tests/test_json_schema.py::test_dataclass_with_extra_ignore", "tests/test_json_schema.py::test_constraints_schema_serialization[kwar... | null | true | 2024-02-06T04:30:54Z | 1 | 24 | 3 | 1,900 | 0 | 0.85 | 1 | 0.55 | 1 | 0.396667 | 82.515 | |
1,271 | swe_bench_verified::test::469 | swe_bench_verified | test | 469 | sympy__sympy-19346 | sympy/sympy | sympy/sympy | python | 94fb720696f5f5d12bad8bc813699fd696afd2fb | srepr not printing dict and set properly
`srepr` prints the element in `list` and `tuple` correctly.
```python
>>> from sympy import srepr
>>> from sympy.abc import x,y
>>> srepr([x,y])
[Symbol('x'), Symbol('y')]
>>> srepr((x,y))
(Symbol('x'), Symbol('y'))
```
However, `srepr` prints the elements in `dict` and `set` w... | diff --git a/sympy/printing/repr.py b/sympy/printing/repr.py
--- a/sympy/printing/repr.py
+++ b/sympy/printing/repr.py
@@ -144,6 +144,16 @@ def _print_EmptySequence(self, expr):
def _print_list(self, expr):
return "[%s]" % self.reprify(expr, ", ")
+ def _print_dict(self, expr):
+ sep = ", "
+ ... | diff --git a/sympy/printing/tests/test_repr.py b/sympy/printing/tests/test_repr.py
--- a/sympy/printing/tests/test_repr.py
+++ b/sympy/printing/tests/test_repr.py
@@ -318,3 +318,26 @@ def test_diffgeom():
assert srepr(rect) == "CoordSystem('rect', Patch('P', Manifold('M', 2)), ('rect_0', 'rect_1'))"
b = BaseS... | ["test_dict"] | ["test_printmethod", "test_more_than_255_args_issue_10259", "test_Function", "test_Geometry", "test_Singletons", "test_Integer", "test_list", "test_Matrix", "test_empty_Matrix", "test_Rational", "test_Float", "test_Symbol", "test_Symbol_two_assumptions", "test_Symbol_no_special_commutative_treatment", "test_Wild", "tes... | null | true | 2020-05-17T12:23:33Z | 1 | 10 | 1 | 461 | 0 | 1 | 1 | 0.55 | 1 | 0.110167 | 82.5055 | ||
1,272 | swe_bench_pro::test::486 | swe_bench_pro | test | 486 | instance_navidrome__navidrome-6c6223f2f9db2c8c253e0d40a192e3519c9037d1 | navidrome/navidrome | navidrome/navidrome | go | 6ff7ab52f4a62e65d59b6c6eb9b9f47eb976c43b | **Issue Title:** Player `MaxBitRate` configuration not overriding transcoding `DefaultBitRate`
**Description:**
When a player has `MaxBitRate` configured, the server does not properly override the transcoding configuration's `DefaultBitRate` with the player's `MaxBitRate` setting. This results in the server using the... | ## Requirements
* The `selectTranscodingOptions` function should return format `"raw"` with bitrate `0` when the requested format is `"raw"`.
* The `selectTranscodingOptions` function should return format `"raw"` with the media file’s original bitrate when the requested format matches the media file’s suffix and no bi... | diff --git a/core/media_streamer.go b/core/media_streamer.go
index 6cfff6f174b..40326c34aea 100644
--- a/core/media_streamer.go
+++ b/core/media_streamer.go
@@ -1,7 +1,6 @@
package core
import (
- "cmp"
"context"
"fmt"
"io"
@@ -128,64 +127,56 @@ func (s *Stream) EstimatedContentLength() int {
return int(s.m... | diff --git a/core/media_streamer_Internal_test.go b/core/media_streamer_Internal_test.go
index 00103716721..44fbf701c21 100644
--- a/core/media_streamer_Internal_test.go
+++ b/core/media_streamer_Internal_test.go
@@ -122,10 +122,11 @@ var _ = Describe("MediaStreamer", func() {
Expect(bitRate).To(Equal(0))
})
... | ["TestCore"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-6c6223f2f9db2c8c253e0d40a192e3519c9037d1 | true | null | 1 | 95 | 1 | 655 | 0 | 0.95 | 1 | 0.55 | 1 | 0.425833 | 82.5025 | |
1,273 | swe_gym::train::1007 | swe_gym | train | 1,007 | dask__dask-10159 | dask/dask | dask/dask | python | e3aa15e54600659ddc1b7139143a70ef1c1c05c6 | `config.update_defaults` doesn't replace previous default values
The `update_defaults` function doesn't quite do what the name implies, because it doesn't actually override values that were previously set as defaults:
```python
In [1]: import dask.config
In [2]: len(dask.config.defaults)
Out[2]: 1
In [3]: dask.config... | > There could be a whole debate here about whether libraries should even be changing default config, what if two libraries try to change the same config, e
I think it should be OK for packages to overwrite defaults. The backend example you provided is a great example. I'm sure this was intended to be overwritten, cc... | diff --git a/dask/config.py b/dask/config.py
--- a/dask/config.py
+++ b/dask/config.py
@@ -79,7 +79,12 @@ def canonical_name(k: str, config: dict) -> str:
return k
-def update(old: dict, new: Mapping, priority: Literal["old", "new"] = "new") -> dict:
+def update(
+ old: dict,
+ new: Mapping,
+ priorit... | diff --git a/dask/tests/test_config.py b/dask/tests/test_config.py
--- a/dask/tests/test_config.py
+++ b/dask/tests/test_config.py
@@ -52,6 +52,42 @@ def test_update():
assert b == {"x": 2, "y": {"a": 3, "b": 2}, "z": 3}
+def test_update_new_defaults():
+ d = {"x": 1, "y": 1, "z": {"a": 1, "b": 1}}
+ o =... | ["dask/tests/test_config.py::test_update_new_defaults", "dask/tests/test_config.py::test_update_defaults"] | ["dask/tests/test_config.py::test_schema", "dask/tests/test_config.py::test_collect_yaml_paths", "dask/tests/test_config.py::test_get_set_canonical_name", "dask/tests/test_config.py::test_set_hard_to_copyables", "dask/tests/test_config.py::test_get_override_with", "dask/tests/test_config.py::test_collect", "dask/tests/... | null | true | 2023-04-06T20:38:04Z | 1 | 44 | 2 | 1,448 | 0 | 0.85 | 1 | 0.55 | 1 | 0.388 | 82.489 | |
1,274 | swe_bench_pro::test::549 | swe_bench_pro | test | 549 | instance_protonmail__webclients-c8117f446c3d1d7e117adc6e0e46b0ece9b0b90e | protonmail/webclients | protonmail/webclients | javascript | fc4c6e035e04f1bb44d57b3094f074b16ef2a0b2 | # Title: Public session is not reliably resumed when accessing shared or public bookmarks in Proton Drive
## Description
When accessing a shared or public bookmark in Proton Drive, the application does not always resume the previously persisted public session as expected. The session restoration logic incorrectly int... | ## Requirements
- `getLastPersistedLocalID` should be implemented as a synchronous utility that returns either a number or `null`.
- When `localStorage` is empty, `getLastPersistedLocalID` should return `null`.
- `getLastPersistedLocalID` should only evaluate keys that start with `STORAGE_PREFIX` and have a numeric s... | diff --git a/applications/drive/src/app/store/_api/usePublicSession.tsx b/applications/drive/src/app/store/_api/usePublicSession.tsx
index 98d19f43f69..57ff274ca00 100644
--- a/applications/drive/src/app/store/_api/usePublicSession.tsx
+++ b/applications/drive/src/app/store/_api/usePublicSession.tsx
@@ -1,15 +1,19 @@
... | diff --git a/applications/drive/src/app/utils/lastActivePersistedUserSession.test.ts b/applications/drive/src/app/utils/lastActivePersistedUserSession.test.ts
index 4eaf26e69ca..0a8c080916d 100644
--- a/applications/drive/src/app/utils/lastActivePersistedUserSession.test.ts
+++ b/applications/drive/src/app/utils/lastAc... | ["src/app/utils/lastActivePersistedUserSession.test.ts | getLastPersistedLocalID returns null when localStorage is empty", "src/app/utils/lastActivePersistedUserSession.test.ts | getLastPersistedLocalID handles non-numeric IDs correctly"] | ["src/app/utils/lastActivePersistedUserSession.test.ts | getLastActivePersistedUserSessionUID returns UID if valid session data exists", "src/app/utils/lastActivePersistedUserSession.test.ts | getLastActivePersistedUserSessionUID returns null when there are no active sessions", "src/app/utils/lastActivePersistedUserSes... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_protonmail__webclients-c8117f446c3d1d7e117adc6e0e46b0ece9b0b90e | true | null | 3 | 38 | 2 | 1,768 | 0 | 0.95 | 1 | 0.55 | 1 | 0.421333 | 82.489 | |
1,275 | swe_bench_pro::test::165 | swe_bench_pro | test | 165 | instance_element-hq__element-web-ecfd1736e5dd9808e87911fc264e6c816653e1a9-vnan | element-hq/element-web | element-hq/element-web | javascript | f34c1609c3c42f095b59bc068620f342894f94ed | ## Title: Combine search results when the query is present in multiple successive messages
## Description
When searching for a term in a room on Friday, September 05, 2025, at 11:10 PM -03, the search results are displayed as separate messages even if the search term appears in multiple consecutive messages. This mak... | ## Requirements
- Search results must be merged into a single timeline when two consecutive SearchResult objects, on Friday, September 05, 2025, at 11:10 PM -03, meet both conditions: (1) the last event in the first result’s timeline equals the first event in the next result’s timeline (same event_id), and (2) each res... | diff --git a/src/components/structures/RoomSearchView.tsx b/src/components/structures/RoomSearchView.tsx
index 81e76ddfb9e..269980c6a33 100644
--- a/src/components/structures/RoomSearchView.tsx
+++ b/src/components/structures/RoomSearchView.tsx
@@ -19,6 +19,7 @@ import { ISearchResults } from "matrix-js-sdk/src/@types/... | diff --git a/test/components/structures/RoomSearchView-test.tsx b/test/components/structures/RoomSearchView-test.tsx
index e63bb3ddb21..26786956b5e 100644
--- a/test/components/structures/RoomSearchView-test.tsx
+++ b/test/components/structures/RoomSearchView-test.tsx
@@ -326,4 +326,115 @@ describe("<RoomSearchView/>",... | ["test/components/views/rooms/SearchResultTile-test.tsx | SearchResultTile | Sets up appropriate callEventGrouper for m.call. events", "test/components/structures/RoomSearchView-test.tsx | <RoomSearchView/> | should show a spinner before the promise resolves", "test/components/structures/RoomSearchView-test.tsx | <Room... | ["test/utils/sets-test.ts | setHasDiff | should flag true on A length > B length", "test/utils/sets-test.ts | setHasDiff | should flag true on A length < B length", "test/utils/sets-test.ts | setHasDiff | should flag true on element differences", "test/utils/sets-test.ts | setHasDiff | should flag false if same but ord... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_element-hq__element-web-ecfd1736e5dd9808e87911fc264e6c816653e1a9-vnan | true | null | 2 | 61 | 9 | 1,306 | 0 | 0.95 | 1 | 0.55 | 1 | 0.421 | 82.488 | |
1,276 | swe_bench_pro::test::446 | swe_bench_pro | test | 446 | instance_internetarchive__openlibrary-d8162c226a9d576f094dc1830c4c1ffd0be2dd17-v76304ecdb3a5954fcf13feb710e8c40fcf24b73c | internetarchive/openlibrary | internetarchive/openlibrary | python | 5de7de19211e71b29b2f2ba3b1dff2fe065d660f | # Identification of non‑ISBN ASIN codes in import records.
## Description
Some imported items contain Amazon codes (ASINs) beginning with “B” and have no associated ISBN. Without explicit detection of these values, such records are treated as if they lacked relevant identifiers, causing them to be ignored in downstre... | ## Requirements
- A function shall examine a record dictionary and return the first non‑ISBN ASIN code (a string beginning with “B”) found in the identifiers.amazon list. If none is found there, it shall search the source_records list for entries starting with “amazon:B” and extract the code. If no valid ASIN exists, t... | diff --git a/openlibrary/catalog/add_book/__init__.py b/openlibrary/catalog/add_book/__init__.py
index d059f060ec9..6eda35dfa7a 100644
--- a/openlibrary/catalog/add_book/__init__.py
+++ b/openlibrary/catalog/add_book/__init__.py
@@ -24,6 +24,7 @@
"""
import itertools
+import json
import re
from typing import TYPE... | diff --git a/openlibrary/tests/catalog/test_utils.py b/openlibrary/tests/catalog/test_utils.py
index 318090546be..f5107d08f5e 100644
--- a/openlibrary/tests/catalog/test_utils.py
+++ b/openlibrary/tests/catalog/test_utils.py
@@ -5,7 +5,9 @@
author_dates_match,
flip_name,
get_missing_fields,
+ get_non_... | ["openlibrary/tests/catalog/test_utils.py::test_get_non_isbn_asin[rec0-B01234568]", "openlibrary/tests/catalog/test_utils.py::test_get_non_isbn_asin[rec1-None]", "openlibrary/tests/catalog/test_utils.py::test_get_non_isbn_asin[rec2-None]", "openlibrary/tests/catalog/test_utils.py::test_get_non_isbn_asin[rec3-None]", "o... | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-d8162c226a9d576f094dc1830c4c1ffd0be2dd17-v76304ecdb3a5954fcf13feb710e8c40fcf24b73c | true | null | 3 | 74 | 18 | 1,044 | 0 | 0.95 | 1 | 0.55 | 1 | 0.420667 | 82.487 | |
1,277 | swe_gym::train::188 | swe_gym | train | 188 | getmoto__moto-5515 | getmoto/moto | getmoto/moto | python | 37c5be725aef7b554a12cd53f249b2ed8a8b679f | Inconsistent `us-west-1` availability zones
`us-west-1` only has [2 availability zones accessible to customers](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/). The [mapping of availability zone name to availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) ... | Thanks for raising this @SeanBickle. The instance-type-offerings are a direct dump from AWS - strange that they are using `1b` and `1c`, but not `1a`. Marking it as a bug to fix our hardcoded zones to also use `1b` and `1c` though. | diff --git a/moto/ec2/models/availability_zones_and_regions.py b/moto/ec2/models/availability_zones_and_regions.py
--- a/moto/ec2/models/availability_zones_and_regions.py
+++ b/moto/ec2/models/availability_zones_and_regions.py
@@ -238,8 +238,8 @@ class RegionsAndZonesBackend:
Zone(region_name="us-east-2", ... | diff --git a/tests/test_autoscaling/test_autoscaling.py b/tests/test_autoscaling/test_autoscaling.py
--- a/tests/test_autoscaling/test_autoscaling.py
+++ b/tests/test_autoscaling/test_autoscaling.py
@@ -148,7 +148,7 @@ def test_create_auto_scaling_from_template_version__latest():
"LaunchTemplateName": laun... | ["tests/test_autoscaling/test_autoscaling.py::test_create_auto_scaling_from_template_version__latest", "tests/test_autoscaling/test_autoscaling.py::test_create_autoscaling_policy_with_policytype__targettrackingscaling", "tests/test_ec2/test_subnets.py::test_modify_subnet_attribute_validation", "tests/test_ec2/test_subn... | ["tests/test_ec2/test_subnets.py::test_describe_subnets_dryrun", "tests/test_ec2/test_ec2_cloudformation.py::test_multiple_security_group_ingress_separate_from_security_group_by_id", "tests/test_elbv2/test_elbv2.py::test_modify_listener_http_to_https", "tests/test_ec2/test_subnets.py::test_available_ip_addresses_in_sub... | null | true | 2022-10-02 11:18:20 | 3 | 23 | 24 | 1,856 | 0 | 0.85 | 1 | 0.55 | 1 | 0.386 | 82.483 | |
1,278 | swe_bench_pro::test::44 | swe_bench_pro | test | 44 | instance_ansible__ansible-185d41031660a676c43fbb781cd1335902024bfe-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | ansible/ansible | ansible/ansible | python | a7c8093ce49145966c3af21e40fad9ee8912d297 | # Title: Avoid duplicated host label rendering logic in default callback plugin
## Description
The default stdout callback plugin in Ansible contains repeated logic across several methods for displaying the host label, particularly when delegated hosts are involved. This includes checking for the presence of delegated... | ## Requirements
- A static method `host_label` must exist on `CallbackBase`.
- `CallbackBase.host_label(result)` must return the primary host name when no delegation metadata is present.
- When delegation metadata is present under `result._result['_ansible_delegated_vars']['ansible_host']`, it must return `\"primary ... | diff --git a/changelogs/fragments/73814-host_label.yaml b/changelogs/fragments/73814-host_label.yaml
new file mode 100644
index 00000000000000..66040f14f4669c
--- /dev/null
+++ b/changelogs/fragments/73814-host_label.yaml
@@ -0,0 +1,4 @@
+minor_changes:
+ - >-
+ `ansible.plugins.callback.CallbackBase.host_label()` ... | diff --git a/test/units/plugins/callback/test_callback.py b/test/units/plugins/callback/test_callback.py
index ac31998613cb2f..43b9274baf5e16 100644
--- a/test/units/plugins/callback/test_callback.py
+++ b/test/units/plugins/callback/test_callback.py
@@ -27,6 +27,8 @@
from units.compat import unittest
from units.comp... | ["test/units/plugins/callback/test_callback.py::TestCallback::test_host_label_delegated", "test/units/plugins/callback/test_callback.py::TestCallback::test_host_label"] | ["test/units/plugins/callback/test_callback.py::TestCallbackDumpResults::test_exception", "test/units/plugins/callback/test_callback.py::TestCallbackDiff::test_no_trailing_newline_both", "test/units/plugins/callback/test_callback.py::TestCallbackOnMethods::test_on_any", "test/units/plugins/callback/test_callback.py::Te... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-185d41031660a676c43fbb781cd1335902024bfe-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | true | null | 3 | 70 | 2 | 1,111 | 0 | 0.95 | 1 | 0.55 | 1 | 0.4185 | 82.4805 | |
1,279 | swe_bench_pro::test::278 | swe_bench_pro | test | 278 | instance_future-architect__vuls-999529a05b202b0fd29c6fca5039a4c47a3766bb | future-architect/vuls | future-architect/vuls | go | 847d820af7fb48131086afe43f79ce79f61122c7 | # Title: scanner host key validation is unreliable because SSH config and keys are not read correctly
## Description
The core problem is that the scanner should detect when the server host key does not match what the client has in `known_hosts`, but this validation is not reliable today. The scanner does not always r... | ## Requirements
- Must define a struct type named `sshConfiguration` with the fields: `user`, `hostname`, `port`, `hostKeyAlias`, `strictHostKeyChecking`, `hashKnownHosts`, `globalKnownHosts` (as a `[]string`), `userKnownHosts` (as a `[]string`), `proxyCommand`, `proxyJump`.
- Must implement a package-level function `... | diff --git a/scanner/scanner.go b/scanner/scanner.go
index 4161db9fb4..97ab532713 100644
--- a/scanner/scanner.go
+++ b/scanner/scanner.go
@@ -346,119 +346,201 @@ func validateSSHConfig(c *config.ServerInfo) error {
if err != nil {
return xerrors.Errorf("Failed to lookup ssh binary path. err: %w", err)
}
- sshKe... | diff --git a/scanner/scanner_test.go b/scanner/scanner_test.go
index c7c0edf7d8..f0bb9e5af0 100644
--- a/scanner/scanner_test.go
+++ b/scanner/scanner_test.go
@@ -2,6 +2,7 @@ package scanner
import (
"net/http"
+ "reflect"
"testing"
"github.com/future-architect/vuls/config"
@@ -145,3 +146,196 @@ func TestVia... | ["TestParseSSHConfiguration", "TestParseSSHScan", "TestParseSSHKeygen"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_future-architect__vuls-999529a05b202b0fd29c6fca5039a4c47a3766bb | true | null | 1 | 244 | 3 | 2,819 | 0 | 0.95 | 1 | 0.7 | 0.75 | 0.969833 | 82.472 | |
1,280 | swe_gym::train::1057 | swe_gym | train | 1,057 | pydantic__pydantic-8920 | pydantic/pydantic | pydantic/pydantic | python | 0eb31fce2c21fd8f93040caf3bbfce51e37421d5 | use_enum_values=True has no effect if another model with the same enum has use_enum_values=False
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
If two separate models with different `use_enum_values` settings both have fields with the same enum, pydantic v2 doesn't use that enum's valu... | @vaultah,
Yep, looks like a bug. Thanks for reporting the regression. You're welcome to submit a PR with a fix, if you'd like. I'll add this to the 2.7 milestone!
@sydney-runkle I can try and look into this if it's still available 😄
@NeevCohen,
For sure! Go for it!
Ok, I think I found the source of the problem.... | 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
@@ -81,8 +81,6 @@ def get_json_schema(_, handler: GetJsonSchemaHandler) -> JsonSchemaValue:
# so that we can still generate ... | diff --git a/tests/test_types.py b/tests/test_types.py
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -6410,3 +6410,22 @@ def test_on_error_omit_top_level() -> None:
# if it hits the top level, but this documents the current behavior at least
with pytest.raises(SchemaError, match='Uncaught Omit error'... | ["tests/test_types.py::test_diff_enums_diff_configs"] | ["tests/test_types.py::test_finite_float_validation_error[inf]", "tests/test_types.py::test_default_validators[date_check-value113-result113]", "tests/test_types.py::test_decimal_validation[condecimal-type_args46-value46-result46]", "tests/test_types.py::test_types_repr[PastDate-PastDate]", "tests/test_types.py::test_d... | null | true | 2024-02-29T19:14:18Z | 1 | 20 | 1 | 1,889 | 0 | 0.85 | 1 | 0.55 | 1 | 0.3815 | 82.4695 | |
1,281 | swe_gym::train::1097 | swe_gym | train | 1,097 | pydantic__pydantic-5834 | pydantic/pydantic | pydantic/pydantic | python | 5e81582e29bcee302b8ef27bd5fb84571d9e6c6f | Numpy type annotations result in ValidatorIterator fields
### Initial Checks
- [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent
### Description
Hi,
Im currently using pydantic==2.0a4 and something weird is going on when using numpy type annotations. I have the follow... | `ValidatorIterator` is a generator which will validate members of the input as it's iterated.
You probably want to customize validation using an argument to annotated. I'm afk but I'll make sure to reply with an example on Monday. Unless someone else can help sooner?
Something like this seems indeed to work, but I'm... | diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py
--- a/pydantic/_internal/_generate_schema.py
+++ b/pydantic/_internal/_generate_schema.py
@@ -439,18 +439,9 @@ def _generate_schema(self, obj: Any) -> core_schema.CoreSchema: # noqa: C901
if std_schema is not None:
... | diff --git a/tests/test_edge_cases.py b/tests/test_edge_cases.py
--- a/tests/test_edge_cases.py
+++ b/tests/test_edge_cases.py
@@ -2040,7 +2040,7 @@ def __init__(self, t1: T1, t2: T2):
match = (
r'Unable to generate pydantic-core schema for (.*)MyGen\[str, bool\](.*). '
- r'Set `arbitrary_types_a... | ["tests/test_generics.py::test_custom_sequence_behavior", "tests/test_edge_cases.py::test_custom_generic_disallowed"] | ["tests/test_types.py::test_finite_float_validation_error[inf]", "tests/test_types.py::test_default_validators[date_check-value113-result113]", "tests/test_types.py::test_default_validators[date_check-value106-result106]", "tests/test_types.py::test_default_validators[datetime_check-value120-result120]", "tests/test_ty... | null | true | 2023-05-23T19:44:43Z | 1 | 34 | 2 | 1,593 | 0 | 0.85 | 1 | 0.55 | 1 | 0.378833 | 82.4615 | |
1,282 | swe_bench_pro::test::309 | swe_bench_pro | test | 309 | instance_gravitational__teleport-007235446f85b1cbaef92664c3b3867517250f21 | gravitational/teleport | gravitational/teleport | go | 2e7b253d55a1b6da5673ea5846503c43fa53cf37 | # Title: scp regression on 6.0.0-rc.1.
## Expected behavior:
- When copying a file in sink mode to a destination whose directory does not exist, SCP fails with a deterministic, path-qualified error of the form `no such file or directory <path>`, where `<path>` identifies the missing parent directory.
- In sink mode ... | ## Requirements
- In sink mode, a destination `target` should always be provided and used for sink-side path resolution.
- The base directory used for sink-side path resolution should be derived from the provided `target`: when the `target` does not name an existing directory, the base directory should be taken from t... | diff --git a/lib/client/api.go b/lib/client/api.go
index cb10e5cca3222..b3dc0a81893a3 100644
--- a/lib/client/api.go
+++ b/lib/client/api.go
@@ -1521,6 +1521,7 @@ func (tc *TeleportClient) SCP(ctx context.Context, args []string, port int, flag
}
func (tc *TeleportClient) uploadConfig(ctx context.Context, tpl scp.Co... | diff --git a/lib/sshutils/scp/scp_test.go b/lib/sshutils/scp/scp_test.go
index 2db4b0c914434..e40e7f67c61c8 100644
--- a/lib/sshutils/scp/scp_test.go
+++ b/lib/sshutils/scp/scp_test.go
@@ -275,14 +275,46 @@ func TestReceiveIntoExistingDirectory(t *testing.T) {
validateSCPContents(t, expectedFS, config.FileSystem)
}
... | ["TestReceiveIntoNonExistingDirectoryFailsWithCorrectMessage"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-007235446f85b1cbaef92664c3b3867517250f21 | true | null | 2 | 33 | 1 | 1,810 | 0 | 0.95 | 1 | 0.55 | 1 | 0.411667 | 82.46 | |
1,283 | swe_gym::train::2291 | swe_gym | train | 2,291 | Project-MONAI__MONAI-5423 | Project-MONAI/MONAI | project-monai/monai | python | a209b06438343830e561a0afd41b1025516a8977 | RuntimeError with AttentionUNet
### Discussed in https://github.com/Project-MONAI/MONAI/discussions/5421
<div type='discussions-op-text'>
<sup>Originally posted by **njneeteson** October 27, 2022</sup>
I'm getting a RuntimeError when using the AttentionUnet in both 2D and 3D. This happens when training using a datase... | diff --git a/monai/networks/nets/attentionunet.py b/monai/networks/nets/attentionunet.py
--- a/monai/networks/nets/attentionunet.py
+++ b/monai/networks/nets/attentionunet.py
@@ -143,12 +143,27 @@ def forward(self, g: torch.Tensor, x: torch.Tensor) -> torch.Tensor:
class AttentionLayer(nn.Module):
- def __init_... | diff --git a/tests/test_attentionunet.py b/tests/test_attentionunet.py
--- a/tests/test_attentionunet.py
+++ b/tests/test_attentionunet.py
@@ -39,7 +39,7 @@ def test_attentionunet(self):
shape = (3, 1) + (92,) * dims
input = torch.rand(*shape)
model = att.AttentionUnet(
- ... | ["tests/test_attentionunet.py::TestAttentionUnet::test_attentionunet"] | ["tests/test_attentionunet.py::TestAttentionUnet::test_attention_block"] | null | true | 2022-10-27T21:55:46Z | 1 | 35 | 1 | 4,332 | 0.083333 | 0.85 | 1 | 0.77 | 1 | 0.616667 | 82.451958 | ||
1,284 | swe_bench_pro::test::37 | swe_bench_pro | test | 37 | instance_NodeBB__NodeBB-f9ce92df988db7c1ae55d9ef96d247d27478bc70-vf2cf3cbd463b7ad942381f1c6d077626485a1e9e | NodeBB/NodeBB | nodebb/nodebb | javascript | 61d17c95e573f91ab5c65d25218451e9afd07d77 | # Title
File upload fails to validate target directory existence
## Problem Description
The admin file upload endpoint accepts file uploads to any specified folder path without verifying if the destination directory actually exists on the filesystem.
## Actual Behavior
When uploading a file through the admin inter... | ## Requirements
- The system must validate the existence of the target directory before processing any file upload request.
- File upload requests with non-existent folder parameters must be rejected with an error response `[[error:invalid-path]]`.
- Error responses for invalid directory paths must use consistent err... | diff --git a/src/controllers/admin/uploads.js b/src/controllers/admin/uploads.js
index fc6ee9c1f1e3..ced7385983fc 100644
--- a/src/controllers/admin/uploads.js
+++ b/src/controllers/admin/uploads.js
@@ -3,6 +3,8 @@
const path = require('path');
const nconf = require('nconf');
const fs = require('fs');
+const winston... | diff --git a/test/uploads.js b/test/uploads.js
index a8e48afac584..76148d25d211 100644
--- a/test/uploads.js
+++ b/test/uploads.js
@@ -400,6 +400,17 @@ describe('Upload Controllers', () => {
assert.strictEqual(body.error, '[[error:invalid-path]]');
});
+ it('should fail to upload regular file if directory doe... | ["test/uploads.js | Upload Controllers admin uploads should fail to upload regular file if directory does not exist"] | ["test/uploads.js | Upload Controllers regular user uploads rate limits should fail if the user exceeds the upload rate limit threshold", "test/uploads.js | Upload Controllers regular user uploads should upload an image to a post", "test/uploads.js | Upload Controllers regular user uploads should upload an image to a p... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_NodeBB__NodeBB-f9ce92df988db7c1ae55d9ef96d247d27478bc70-vf2cf3cbd463b7ad942381f1c6d077626485a1e9e | true | null | 1 | 82 | 1 | 809 | 0 | 0.95 | 1 | 0.55 | 1 | 0.408167 | 82.4495 | |
1,285 | swe_gym::train::95 | swe_gym | train | 95 | getmoto__moto-7081 | getmoto/moto | getmoto/moto | python | 55c589072fc88363fdde9ae8656909f8f24dd13f | IoT - thingId not present after create_thing()
```
import boto3
from moto import mock_iot
@mock_iot
def test_create_thing():
client = boto3.client("iot", region_name="ap-northeast-1")
thing = client.create_thing(
thingName="IDontHaveAThingId"
)
assert thing["thingName"] == "IDontHaveAThingId"... | code above cobbled up from /tests/test_iot/test_iot_things.py
could add `assert "thingId" in thing` on L#15
Thanks for raising this @mikedambrogia - looks like we don't deal with `thing_id` at all at the moment. Marking it as an enhancement.
Out of interest, do you know the format that AWS uses for `thing_id`s? Ar... | diff --git a/moto/iot/models.py b/moto/iot/models.py
--- a/moto/iot/models.py
+++ b/moto/iot/models.py
@@ -43,6 +43,7 @@ def __init__(
region_name: str,
):
self.region_name = region_name
+ self.thing_id = str(random.uuid4())
self.thing_name = thing_name
self.thing_type = ... | diff --git a/tests/test_iot/test_iot_things.py b/tests/test_iot/test_iot_things.py
--- a/tests/test_iot/test_iot_things.py
+++ b/tests/test_iot/test_iot_things.py
@@ -11,12 +11,13 @@ def test_create_thing():
thing = client.create_thing(thingName=name)
assert thing["thingName"] == name
- assert "thingArn"... | ["tests/test_iot/test_iot_things.py::test_describe_thing", "tests/test_iot/test_iot_things.py::test_create_thing"] | ["tests/test_iot/test_iot_things.py::test_create_thing_with_type", "tests/test_iot/test_iot_things.py::test_delete_thing", "tests/test_iot/test_iot_things.py::test_list_things_with_next_token", "tests/test_iot/test_iot_things.py::test_list_things_with_attribute_and_thing_type_filter_and_next_token", "tests/test_iot/tes... | null | true | 2023-11-30 19:31:29 | 2 | 63 | 2 | 986 | 0 | 0.85 | 1 | 0.55 | 1 | 0.374333 | 82.448 | |
1,286 | swe_bench_pro::test::461 | swe_bench_pro | test | 461 | instance_navidrome__navidrome-0a650de357babdcc8ce910fe37fee84acf4ed2fe | navidrome/navidrome | navidrome/navidrome | go | 9c3b4561652a15846993d477003e111f0df0c585 | # Title
Subsonic artist response lacks proper structures and consistent field serialization.
## Description
The Subsonic response model uses the `*Indexes` type for the `Artist` field, and it does not define specific structures to represent artist groups in ID3 format. The `MusicBrainzId` and `SortName` fields in `Art... | ## Requirements
- In the `Subsonic` struct, the field `Artist` should change its type from `*Indexes` to `*Artists`.
- A new struct `IndexID3` should be added with the fields `Name` with XML tag `xml:\"name,attr\"` and JSON tag `json:\"name\"`, and `Artists` with XML tag `xml:\"artist\"` and JSON tag `json:\"artist\"`... | diff --git a/server/subsonic/browsing.go b/server/subsonic/browsing.go
index 954ca1ffcfb..c0814410d31 100644
--- a/server/subsonic/browsing.go
+++ b/server/subsonic/browsing.go
@@ -27,12 +27,12 @@ func (api *Router) GetMusicFolders(r *http.Request) (*responses.Subsonic, error)
return response, nil
}
-func (api *Ro... | diff --git a/server/subsonic/responses/responses_test.go b/server/subsonic/responses/responses_test.go
index 88fb7405054..13eb1f9ba8c 100644
--- a/server/subsonic/responses/responses_test.go
+++ b/server/subsonic/responses/responses_test.go
@@ -120,6 +120,73 @@ var _ = Describe("Responses", func() {
})
})
+ Desc... | ["TestSubsonicApiResponses"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-0a650de357babdcc8ce910fe37fee84acf4ed2fe | true | null | 3 | 63 | 1 | 1,182 | 0 | 0.95 | 1 | 0.55 | 1 | 0.407 | 82.446 | |
1,287 | swe_bench_pro::test::369 | swe_bench_pro | test | 369 | instance_gravitational__teleport-e6895d8934f6e484341034869901145fbc025e72-vce94f93ad1030e3136852817f2423c1b3ac37bc4 | gravitational/teleport | gravitational/teleport | go | 19081df863165c67a8570dde690dd92c38c8926e | # Title
Support additional database configuration flags in `teleport db configure create`
## Problem Description
The current implementation of `teleport db configure create` does not allow users to specify important metadata required by certain database deployments. Parameters such as TLS CA certificate file, AWS re... | ## Requirements
- In `lib/config/database.go`, the YAML configuration block for each `db_service` entry must support the conditional inclusion of a `tls` section with a `ca_cert_file` field when the `DatabaseCACertFile` value is present, enabling database configurations to optionally declare a TLS CA certificate path.
... | diff --git a/lib/config/database.go b/lib/config/database.go
index 25e9f085e4911..1ecd11bfe3a08 100644
--- a/lib/config/database.go
+++ b/lib/config/database.go
@@ -120,6 +120,41 @@ db_service:
- name: {{ .StaticDatabaseName }}
protocol: {{ .StaticDatabaseProtocol }}
uri: {{ .StaticDatabaseURI }}
+ {{- ... | diff --git a/lib/config/database_test.go b/lib/config/database_test.go
index 74a76d173f992..25e5cfa54a0d1 100644
--- a/lib/config/database_test.go
+++ b/lib/config/database_test.go
@@ -69,10 +69,18 @@ func TestMakeDatabaseConfig(t *testing.T) {
t.Run("StaticDatabase", func(t *testing.T) {
flags := DatabaseSample... | ["TestDatabaseConfig", "TestDatabaseCLIFlags", "TestMakeDatabaseConfig"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-e6895d8934f6e484341034869901145fbc025e72-vce94f93ad1030e3136852817f2423c1b3ac37bc4 | true | null | 2 | 61 | 3 | 1,189 | 0 | 0.95 | 1 | 0.55 | 1 | 0.4015 | 82.4295 | |
1,288 | swe_gym::train::749 | swe_gym | train | 749 | iterative__dvc-4706 | iterative/dvc | iterative/dvc | python | 176a23e29180461f3504dda1a569687490be8a92 | Tabular view for multiple metrics
`dvc metrics show -a` currently gives
```
workspace:
eval.json:
AUC: 0.66729
error: 0.16982
TP: 516
master:
eval.json:
AUC: 0.65115
error: 0.17304
TP: 528
increase_bow:
... | Discord context: https://discordapp.com/channels/485586884165107732/485596304961962003/759036937813753887
@efiop @grighi Can I work on this issue?
@indhupriya Sure! Thank you so much for looking into it! :pray:
The flattened dictionary method can be used. Please let me know if the repo is open.
Hi @efiop @grighi
Is... | diff --git a/dvc/command/metrics.py b/dvc/command/metrics.py
--- a/dvc/command/metrics.py
+++ b/dvc/command/metrics.py
@@ -12,33 +12,60 @@
def _show_metrics(
- metrics, all_branches=False, all_tags=False, all_commits=False
+ metrics,
+ all_branches=False,
+ all_tags=False,
+ all_commits=False,
+ ... | diff --git a/tests/func/test_repro.py b/tests/func/test_repro.py
--- a/tests/func/test_repro.py
+++ b/tests/func/test_repro.py
@@ -982,7 +982,7 @@ def test(self):
)
self.assertEqual(0, ret)
- expected_metrics_display = f"{metrics_file}: {metrics_value}"
+ expected_metrics_display = f"P... | ["tests/unit/command/test_metrics.py::test_metrics_show_precision", "tests/unit/command/test_metrics.py::test_metrics_show_with_different_metrics_header", "tests/unit/command/test_metrics.py::test_metrics_show_with_multiple_revision", "tests/unit/command/test_metrics.py::test_metrics_show_with_no_revision", "tests/unit... | ["tests/unit/command/test_metrics.py::test_metrics_show_json_diff", "tests/unit/command/test_metrics.py::test_metrics_diff_precision", "tests/unit/command/test_metrics.py::test_metrics_show_raw_diff", "tests/unit/command/test_metrics.py::test_metrics_diff_markdown_empty", "tests/unit/command/test_metrics.py::test_metri... | null | true | 2020-10-13T00:15:48Z | 1 | 60 | 7 | 1,002 | 0 | 0.85 | 1 | 0.55 | 1 | 0.367 | 82.426 | |
1,289 | swe_bench_promax::test::36 | swe_bench_promax | test | 36 | radare2__radareorg-24332 | radareorg/radare2 | radareorg/radare2 | c | dfaaa0afccd0844493345c6ab22c7be9ab2c4912 | The codemeta printing functions—`r_codemeta_print`, `r_codemeta_print_disasm`, and `r_codemeta_print_comment_cmds`—currently exhibit critical instability and integration limitations due to an unintended hard dependency on the global console subsystem. These functions are designed to generate formatted representations o... | diff --git a/libr/anal/codemeta.c b/libr/anal/codemeta.c
--- a/libr/anal/codemeta.c
+++ b/libr/anal/codemeta.c
@@ -224,17 +224,17 @@ R_API RVector *r_codemeta_line_offsets(RCodeMeta *code) {
}
#define PALETTE(x) (cons && cons->context->pal.x) ? cons->context->pal.x
-#define PRINT_COLOR(x) ... | diff --git a/test/unit/test_codemeta.c b/test/unit/test_codemeta.c
--- a/test/unit/test_codemeta.c
+++ b/test/unit/test_codemeta.c
@@ -323,13 +323,10 @@ static bool test_r_codemeta_print(void) {
" sym.imp.puts(\"Hello, World!\");\n"
" return;\n"
"}\n";
- RCons *cons = r_cons_new (... | null | null | key4127/refactor-dockerhub:radare2__radareorg-24332 | true | 1750452305 | 2 | 116 | null | 1,981 | 0 | 0.9 | 1 | 0.55 | 1 | 0.716833 | 82.4255 | ||
1,290 | swe_bench_pro::test::60 | swe_bench_pro | test | 60 | instance_ansible__ansible-489156378c8e97374a75a544c7c9c2c0dd8146d1-v390e508d27db7a51eece36bb6d9698b63a5b638a | ansible/ansible | ansible/ansible | python | 5ee81338fcf7adbc1a8eda26dd8105a07825cb08 | ## Title: Requests fail immediately when the service rate limits or returns a non-rate-limit HTTP error
### Description
Currently, requests stop and fail right away when the remote service responds, even for conditions that should be surfaced as distinct exceptions to the caller. A rate-limit response of `429` should ... | ## Requirements
- When the request operation receives an HTTP error response that is not a rate-limit condition (any status `>= 400` other than `429`), such as a `404`, it must raise `HTTPError` and let that exception propagate to the caller instead of suppressing it or failing the module in place.
- When the request ... | diff --git a/changelogs/fragments/meraki-rate-limit.yml b/changelogs/fragments/meraki-rate-limit.yml
new file mode 100644
index 00000000000000..4905e9c426e02a
--- /dev/null
+++ b/changelogs/fragments/meraki-rate-limit.yml
@@ -0,0 +1,2 @@
+minor_changes:
+ - meraki_* - Modules now respect 429 (rate limit) and 500/502 e... | diff --git a/test/units/module_utils/network/meraki/test_meraki.py b/test/units/module_utils/network/meraki/test_meraki.py
index acd7510b08a208..62d0d42fb338fe 100644
--- a/test/units/module_utils/network/meraki/test_meraki.py
+++ b/test/units/module_utils/network/meraki/test_meraki.py
@@ -26,7 +26,7 @@
from units.c... | ["test/units/module_utils/network/meraki/test_meraki.py::test_fetch_url_404", "test/units/module_utils/network/meraki/test_meraki.py::test_fetch_url_429"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-489156378c8e97374a75a544c7c9c2c0dd8146d1-v390e508d27db7a51eece36bb6d9698b63a5b638a | true | null | 3 | 90 | 2 | 583 | 0 | 0.95 | 1 | 0.55 | 1 | 0.397167 | 82.4165 | |
1,291 | swe_bench_pro::test::599 | swe_bench_pro | test | 599 | instance_qutebrowser__qutebrowser-70248f256f93ed9b1984494d0a1a919ddd774892-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | bf65a1db0f3f49977de77d7d61eeaaecd022185c | # Add units to :later command
## Affected Component
Command-line interface — specifically, the `:later` command in qutebrowser.
## Current Behavior
The `:later` command only accepts a single numeric argument interpreted as a delay in **milliseconds**. For example, `:later 5000` schedules the action to occur after 5... | ## Requirements
- A function `parse_duration` in `qutebrowser/utils/utils.py` should be provided with the signature `parse_duration(duration: str) -> int`.
- `parse_duration` should accept duration strings composed of unit components for hours (`h`), minutes (`m`), and seconds (`s`). Each component is a non-negative n... | diff --git a/qutebrowser/misc/utilcmds.py b/qutebrowser/misc/utilcmds.py
index 56138c798f4..fa327b772e8 100644
--- a/qutebrowser/misc/utilcmds.py
+++ b/qutebrowser/misc/utilcmds.py
@@ -42,15 +42,17 @@
@cmdutils.register(maxsplit=1, no_cmd_split=True, no_replace_variables=True)
@cmdutils.argument('win_id', value=cmd... | diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py
index ac7ed5ce731..4041855486d 100644
--- a/tests/unit/utils/test_utils.py
+++ b/tests/unit/utils/test_utils.py
@@ -818,3 +818,52 @@ def test_libgl_workaround(monkeypatch, skip):
if skip:
monkeypatch.setenv('QUTE_SKIP_LIBGL_WORKA... | ["tests/unit/utils/test_utils.py::test_parse_duration[0-0]", "tests/unit/utils/test_utils.py::test_parse_duration[0s-0]", "tests/unit/utils/test_utils.py::test_parse_duration[0.5s-500]", "tests/unit/utils/test_utils.py::test_parse_duration[59s-59000]", "tests/unit/utils/test_utils.py::test_parse_duration[60-60]", "test... | ["tests/unit/utils/test_utils.py::TestCompactText::test_compact_text['foo\\\\nbar'-'foobar']", "tests/unit/utils/test_utils.py::TestCompactText::test_compact_text['\\\\nfoo\\\\n'-'foo']", "tests/unit/utils/test_utils.py::TestCompactText::test_eliding[None-'xxxxxxxxxxxxxxxxxxx-'xxxxxxxxxxxxxxxxxxx]", "tests/unit/utils/t... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-70248f256f93ed9b1984494d0a1a919ddd774892-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | true | null | 2 | 37 | 28 | 1,643 | 0 | 0.95 | 1 | 0.55 | 1 | 0.397167 | 82.4165 | |
1,292 | swe_bench_pro::test::333 | swe_bench_pro | test | 333 | instance_gravitational__teleport-47530e1fd8bfb84ec096ebcbbc29990f30829655-vee9b09fb20c43af7e520f57e9239bbcf46b7113d | gravitational/teleport | gravitational/teleport | go | 883cf1aeda25ae67262a9cb255db170937100987 | # Title: Kubernetes RBAC: Namespace rules do not grant expected resource access or visibility
## Description
## Expected behavior:
- A role rule with `kind: namespace` should grant access to all resources within that namespace.
- Users with access to resources inside a namespace should be able to perform read-only o... | ## Requirements
- The `KubeResourceMatchesRegex` function must allow access to a resource inside a namespace when a rule with `kind: namespace` matches that namespace and the requested verb is permitted by that rule.
- The `KubeResourceMatchesRegex` function must grant read-only access to a namespace when the user has... | diff --git a/lib/utils/replace.go b/lib/utils/replace.go
index bba17378dd141..fcd4ffdc81751 100644
--- a/lib/utils/replace.go
+++ b/lib/utils/replace.go
@@ -134,38 +134,76 @@ func KubeResourceMatchesRegexWithVerbsCollector(input types.KubernetesResource,
// This function supports regex expressions in the Name and Name... | diff --git a/lib/utils/replace_test.go b/lib/utils/replace_test.go
index ab555119bb33c..2943502d0d4a8 100644
--- a/lib/utils/replace_test.go
+++ b/lib/utils/replace_test.go
@@ -357,6 +357,80 @@ func TestKubeResourceMatchesRegex(t *testing.T) {
},
assert: require.NoError,
},
+ {
+ name: "list namespace wit... | ["TestKubeResourceMatchesRegex/list_namespace_with_resource_giving_read_access_to_namespace", "TestKubeResourceMatchesRegex/namespace_granting_read_access_to_pod", "TestKubeResourceMatchesRegex"] | ["TestKubeResourceMatchesRegex/input_misses_verb", "TestKubeResourceMatchesRegex/input_matches_single_resource_with_wildcard_verb", "TestKubeResourceMatchesRegex/input_matches_single_resource_with_matching_verb", "TestKubeResourceMatchesRegex/input_matches_single_resource_with_unmatching_verb", "TestKubeResourceMatches... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-47530e1fd8bfb84ec096ebcbbc29990f30829655-vee9b09fb20c43af7e520f57e9239bbcf46b7113d | true | null | 1 | 62 | 3 | 1,141 | 0 | 0.95 | 1 | 0.55 | 1 | 0.396833 | 82.4155 | |
1,293 | swe_bench_verified::test::173 | swe_bench_verified | test | 173 | django__django-14999 | django/django | django/django | python | a754b82dac511475b6276039471ccd17cc64aeb8 | RenameModel with db_table should be a noop.
Description
A RenameModel operation that already has db_table defined must be a noop.
In Postgres, it drops and recreates foreign key constraints. In sqlite it recreates the table (as expected for a table renaming). | diff --git a/django/db/migrations/operations/models.py b/django/db/migrations/operations/models.py
--- a/django/db/migrations/operations/models.py
+++ b/django/db/migrations/operations/models.py
@@ -320,12 +320,13 @@ def database_forwards(self, app_label, schema_editor, from_state, to_state):
new_model = to_st... | diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py
--- a/tests/migrations/test_operations.py
+++ b/tests/migrations/test_operations.py
@@ -793,6 +793,28 @@ def test_rename_model_with_m2m(self):
self.assertEqual(Rider.objects.count(), 2)
self.assertEqual(Pony._meta.g... | ["test_rename_model_with_db_table_noop (migrations.test_operations.OperationTests)"] | ["test_references_model_mixin (migrations.test_operations.TestCreateModel)", "test_reference_field_by_through_fields (migrations.test_operations.FieldOperationTests)", "test_references_field_by_from_fields (migrations.test_operations.FieldOperationTests)", "test_references_field_by_name (migrations.test_operations.Fiel... | null | true | 2021-10-16T09:31:21Z | 1 | 11 | 1 | 260 | 0 | 1 | 1 | 0.55 | 1 | 0.08 | 82.415 | ||
1,294 | swe_bench_pro::test::601 | swe_bench_pro | test | 601 | instance_qutebrowser__qutebrowser-7b603dd6bf195e3e723ce08ff64a82b406e3f6b6-v9f8e9d96c85c85a605e382f1510bd08563afc566 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | a67832ba311fdb0e9d57190d1671241a369b5b0a | Problem statement:
# Move method to module level
## What
Improve MIME-suffix resolution by moving the logic out of a class/static context into a small, pure module-level helper. The file-selection code should consume this helper rather than implementing the logic inline.
## Why
Keeping the MIME-suffix workaround i... | ## Requirements
- Ensure that logic previously embedded within a static context is decoupled and elevated to module scope, allowing it to be reused without requiring an instance.
- Introduce a new compatibility layer that determines extra file suffixes for MIME types under specific Qt version conditions, based on the ... | diff --git a/qutebrowser/browser/webengine/webview.py b/qutebrowser/browser/webengine/webview.py
index a55fb5c9c77..1ef8ca9bdf4 100644
--- a/qutebrowser/browser/webengine/webview.py
+++ b/qutebrowser/browser/webengine/webview.py
@@ -130,6 +130,35 @@ def contextMenuEvent(self, ev):
super().contextMenuEvent(ev)
... | diff --git a/tests/unit/browser/webengine/test_webview.py b/tests/unit/browser/webengine/test_webview.py
index 2789dcc9f27..0bc5a8706e8 100644
--- a/tests/unit/browser/webengine/test_webview.py
+++ b/tests/unit/browser/webengine/test_webview.py
@@ -110,7 +110,7 @@ def version(string):
@pytest.mark.parametrize("befor... | ["tests/unit/browser/webengine/test_webview.py::test_suffixes_workaround_extras_returned[before0-extra0]", "tests/unit/browser/webengine/test_webview.py::test_suffixes_workaround_extras_returned[before1-extra1]", "tests/unit/browser/webengine/test_webview.py::test_suffixes_workaround_extras_returned[before2-extra2]", "... | ["tests/unit/browser/webengine/test_webview.py::test_camel_to_snake[naming0-NavigationTypeLinkClicked-link_clicked]", "tests/unit/browser/webengine/test_webview.py::test_camel_to_snake[naming1-NavigationTypeTyped-typed]", "tests/unit/browser/webengine/test_webview.py::test_camel_to_snake[naming2-NavigationTypeBackForwa... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-7b603dd6bf195e3e723ce08ff64a82b406e3f6b6-v9f8e9d96c85c85a605e382f1510bd08563afc566 | true | null | 1 | 60 | 14 | 1,166 | 0 | 0.95 | 1 | 0.55 | 1 | 0.394333 | 82.408 | |
1,295 | swe_gym::train::2142 | swe_gym | train | 2,142 | Project-MONAI__MONAI-1645 | Project-MONAI/MONAI | project-monai/monai | python | b2f1cf4cdfa712546d3db2a31f13d3e9b330f9cf | DiceLoss can't support TorchScript
The `DiceLoss` reports error when `torch.jit.script()`:
```
Traceback (most recent call last):
File "/home/hroth/Code2/pytorch-pipeline_covid-fl/baseline_supernet/supernet_fitter.py", line 50, in __init__
self.criterion = torch.jit.script(criterion)
File "/opt/conda/lib/python... | Hi @ericspod ,
Could you please help update the `DiceLoss` for TorchScript?
Thanks in advance.
Hi @ericspod ,
Could you please help take a look at this ticket? I am not sure whether it's possible to fix it soon.
Thanks.
Hi @ericspod ,
The purpose of TorchScript support for loss function is to optimiz... | diff --git a/monai/losses/dice.py b/monai/losses/dice.py
--- a/monai/losses/dice.py
+++ b/monai/losses/dice.py
@@ -10,7 +10,7 @@
# limitations under the License.
import warnings
-from typing import Callable, Optional, Union
+from typing import Callable, List, Optional, Union
import numpy as np
import torch
@@ -... | diff --git a/tests/test_dice_ce_loss.py b/tests/test_dice_ce_loss.py
--- a/tests/test_dice_ce_loss.py
+++ b/tests/test_dice_ce_loss.py
@@ -16,6 +16,7 @@
from parameterized import parameterized
from monai.losses import DiceCELoss
+from tests.utils import SkipIfBeforePyTorchVersion, test_script_save
TEST_CASES = [... | ["tests/test_focal_loss.py::TestFocalLoss::test_script", "tests/test_multi_scale.py::TestMultiScale::test_script", "tests/test_dice_ce_loss.py::TestDiceCELoss::test_script", "tests/test_dice_loss.py::TestDiceLoss::test_script", "tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_script", "tests/test_tve... | ["tests/test_local_normalized_cross_correlation_loss.py::TestLocalNormalizedCrossCorrelationLoss::test_shape_1", "tests/test_multi_scale.py::TestMultiScale::test_shape_0", "tests/test_focal_loss.py::TestFocalLoss::test_bin_seg_3d", "tests/test_local_normalized_cross_correlation_loss.py::TestLocalNormalizedCrossCorrelat... | null | true | 2021-02-25T13:26:11Z | 5 | 115 | 6 | 3,223 | 0 | 0.85 | 1 | 0.62 | 0.85 | 0.883333 | 82.4075 | |
1,296 | swe_gym::train::941 | swe_gym | train | 941 | dask__dask-6683 | dask/dask | dask/dask | python | 1d4064d0ef5794f7dc61bf3e29b5ae234d04ed4d | Size of dask repr_html for large arrays
**What happened**:
I saved a notebook with numerous large dask arrays displayed using `_repr_html_`. The size of the notebook on disk was 50 MB. This is completely dominated by the size of the dask-generated SVG. Notebooks this big are inconvenient to work with and store.
**Wh... | Agreed that we should avoid this. I wonder if it's OK to just not draw any chunk lines in this case, since the table still has the chunking information.
> I wonder if it's OK to just not draw any chunk lines in this case, since the table still has the chunking information.
Yes, that is basically what I call my **bes... | diff --git a/dask/array/svg.py b/dask/array/svg.py
--- a/dask/array/svg.py
+++ b/dask/array/svg.py
@@ -45,7 +45,9 @@ def svg_2d(chunks, offset=(0, 0), skew=(0, 0), size=200, sizes=None):
sizes = sizes or draw_sizes(shape, size=size)
y, x = grid_points(chunks, sizes)
- lines, (min_x, max_x, min_y, max_y) ... | diff --git a/dask/array/tests/test_svg.py b/dask/array/tests/test_svg.py
--- a/dask/array/tests/test_svg.py
+++ b/dask/array/tests/test_svg.py
@@ -79,6 +79,13 @@ def test_draw_sizes():
assert b < c * 5
+def test_too_many_lines_fills_sides_darker():
+ data = da.ones((16000, 2400, 3600), chunks=(1, 2400, 3600... | ["dask/array/tests/test_svg.py::test_too_many_lines_fills_sides_darker"] | ["dask/array/tests/test_svg.py::test_errors", "dask/array/tests/test_svg.py::test_draw_sizes", "dask/array/tests/test_svg.py::test_basic", "dask/array/tests/test_svg.py::test_repr_html", "dask/array/tests/test_svg.py::test_3d", "dask/array/tests/test_svg.py::test_repr_html_size_units"] | null | true | 2020-09-28T21:40:11Z | 1 | 34 | 1 | 1,473 | 0 | 0.85 | 1 | 0.55 | 1 | 0.358833 | 82.4015 | |
1,297 | swe_gym::train::1980 | swe_gym | train | 1,980 | Project-MONAI__MONAI-5405 | Project-MONAI/MONAI | project-monai/monai | python | 3f1eac82c5a17520a49b93d557df3fd7ef9304ec | Inconsistent places of HoverNet
When I compared our implementation of HoverNet and the [referred version](https://github.com/vqdang/hover_net/blob/master/models/hovernet/net_desc.py), I found a different place:
for each residual block, the kernel size of the second conv layer is 3 (see [here](https://github.com/vqdang/... | Hi @JHancox and @drbeh , could you please help to confirm these places? Thanks!
Thanks @yiheng-wang-nv. I think that you are right - well spotted. I will fix and expand the unit test to check for this.
Hi @JHancox ,
Thanks very much for your confirmation!
As @yiheng-wang-nv is working on adding the pretrained weigh... | diff --git a/monai/networks/nets/hovernet.py b/monai/networks/nets/hovernet.py
--- a/monai/networks/nets/hovernet.py
+++ b/monai/networks/nets/hovernet.py
@@ -27,12 +27,16 @@
# }
# =========================================================================
+import os
+import re
+import warnings
from collections impo... | diff --git a/tests/test_hovernet.py b/tests/test_hovernet.py
--- a/tests/test_hovernet.py
+++ b/tests/test_hovernet.py
@@ -20,37 +20,31 @@
device = "cuda" if torch.cuda.is_available() else "cpu"
-TEST_CASE_0 = [ # fast mode, batch 16
+TEST_CASE_0 = [ # fast mode
{"out_classes": 5, "mode": HoVerNet.Mode.FAST... | ["tests/test_hovernet.py::TestHoverNet::test_shape_0", "tests/test_hovernet.py::TestHoverNet::test_script", "tests/test_hovernet.py::TestHoverNet::test_decoder_padding_shape_3", "tests/test_hovernet.py::TestHoverNet::test_decoder_padding_shape_2", "tests/test_hovernet.py::TestHoverNet::test_shape_2", "tests/test_hovern... | ["tests/test_hovernet.py::TestHoverNet::test_ill_input_shape", "tests/test_hovernet.py::TestHoverNet::test_ill_input_hyper_params_4", "tests/test_hovernet.py::TestHoverNet::test_ill_input_hyper_params_0", "tests/test_hovernet.py::TestHoverNet::test_ill_input_hyper_params_1", "tests/test_hovernet.py::TestHoverNet::test_... | null | true | 2022-10-26T06:32:21Z | 1 | 146 | 8 | 672 | 0.012987 | 0.85 | 1 | 0.55 | 1 | 0.598667 | 82.399864 | |
1,298 | swe_gym::train::575 | swe_gym | train | 575 | python__mypy-11361 | python/mypy | python/mypy | python | 4d0ab445514e0f9795306c0bc88a202be209df6b | The `[unreachable]` check fails for module scope code and allows unreachable raising of Exceptions
**Bug Report**
There are seemingly trivial cases of unreachable code not being detected at module level, or when the code consists of `raise` statements.
**To Reproduce**
```py
from typing import Final
from typing imp... | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -307,6 +307,11 @@ def check_first_pass(self) -> None:
with self.tscope.module_scope(self.tree.fullname):
with self.enter_partial_types(), self.binder.top_frame_context():
for ... | 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
@@ -754,35 +754,46 @@ if sys.version_info[0] >= 2:
reveal_type('') # N: Revealed type is "Literal['']?"
[builtins fixt... | ["mypy/test/testcheck.py::TypeCheckSuite::testUnreachableModuleBody1", "mypy/test/testcheck.py::TypeCheckSuite::testUnreachableModuleBody2"] | ["mypy/test/testcheck.py::TypeCheckSuite::testUnreachableFlagWithBadControlFlow4", "mypy/test/testcheck.py::TypeCheckSuite::testUnreachableFlagWithBadControlFlow3", "mypy/test/testcheck.py::TypeCheckSuite::testUnreachableFlagWithBadControlFlow2", "mypy/test/testcheck.py::TypeCheckSuite::testUnreachableFlagStatementAfte... | null | true | 2021-10-19T17:01:51Z | 1 | 5 | 2 | 4,212 | 0 | 0.85 | 1 | 0.77 | 0.8 | 0.516667 | 82.395 | ||
1,299 | swe_gym::train::811 | swe_gym | train | 811 | iterative__dvc-4778 | iterative/dvc | iterative/dvc | python | f8ba5daae23ffc5c2135f86670bd562d6ce654d7 | Cannot dvc add an already tracked file that lies in a folder
## Bug Report
**dvc version:** 1.8.0
----**Use case problem**----
So I have folder that looks like that:
```
.
├── Annotations.json -> /media/newhdd/data/ki67_er_pr/data/dvc_cache/44/7b62afed38955cb2a2f4ca35c5133c
├── Annotations.json.dvc
└── annotator
... | Hi @lefos99 !
Could you show the contents of `annotator/Annotation_0_hotspot_0.json.dvc`, please?
Hi @efiop
Which file do you mean? I don't have such a file in this directory.
**Update:**
Sorry now I saw the confusion, I fixed my initial comment. (Sorry I had to hide some sensitive information)
@lefos99 Tha... | diff --git a/dvc/utils/__init__.py b/dvc/utils/__init__.py
--- a/dvc/utils/__init__.py
+++ b/dvc/utils/__init__.py
@@ -353,7 +353,9 @@ def resolve_paths(repo, out):
from urllib.parse import urlparse
from ..dvcfile import DVC_FILE_SUFFIX
+ from ..exceptions import DvcException
from ..path_info import... | diff --git a/tests/func/test_add.py b/tests/func/test_add.py
--- a/tests/func/test_add.py
+++ b/tests/func/test_add.py
@@ -1,7 +1,6 @@
import filecmp
import logging
import os
-import posixpath
import shutil
import time
@@ -422,52 +421,6 @@ def test_should_collect_dir_cache_only_once(mocker, tmp_dir, dvc):
a... | ["tests/func/test_add.py::test_add_symlink_dir[True]", "tests/func/test_add.py::test_add_file_in_symlink_dir[False]", "tests/func/test_add.py::test_add_symlink_dir[False]", "tests/func/test_add.py::test_add_file_in_symlink_dir[True]"] | [] | null | true | 2020-10-23T09:40:04Z | 1 | 23 | 4 | 1,676 | 0 | 0.85 | 1 | 0.55 | 1 | 0.356 | 82.393 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.