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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
800 | swe_gym::train::400 | swe_gym | train | 400 | python__mypy-13678 | python/mypy | python/mypy | python | d619c783d4713a13083a1a6e8020075948baceb2 | Mixin class factory crash
**Crash Report**
I run mypy against a file and it crashes.
**Traceback**
```
(pyle) danielsank@danielsank1:~/Desktop/test$ mypy --show-traceback code.py
code.py:14: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.readthedocs.io/en/stable/common_issues.html#usin... | Thanks, I will take a look today!
Same assertion is hit in https://github.com/python/mypy/issues/12252, #12113, #11728 and https://github.com/python/mypy/issues/10140
A smaller example from https://github.com/python/mypy/issues/10140#issuecomment-791289461 :
```
from typing import TypeVar
def test() -> None:
... | diff --git a/mypy/semanal.py b/mypy/semanal.py
--- a/mypy/semanal.py
+++ b/mypy/semanal.py
@@ -2738,30 +2738,32 @@ def analyze_namedtuple_assign(self, s: AssignmentStmt) -> bool:
return False
lvalue = s.lvalues[0]
name = lvalue.name
- internal_name, info, tvar_defs = self.named_tup... | diff --git a/test-data/unit/check-classes.test b/test-data/unit/check-classes.test
--- a/test-data/unit/check-classes.test
+++ b/test-data/unit/check-classes.test
@@ -1060,6 +1060,35 @@ def f() -> None:
a.g(a) # E: Too many arguments for "g" of "A"
[targets __main__, __main__.f]
+[case testGenericClassWithinFun... | ["mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testGenericClassWithInvalidTypevarUseWithinFunction", "mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testGenericClassWithinFunction"] | ["mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testConstructNestedClassWithCustomInit", "mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testConstructNestedClass"] | null | true | 2022-09-18T22:46:07Z | 3 | 95 | 2 | 7,209 | 0 | 0.85 | 1 | 0.65 | 1 | 0.816667 | 86.625 | |
801 | swe_gym::train::1872 | swe_gym | train | 1,872 | facebookresearch__hydra-1404 | facebookresearch/hydra | facebookresearch/hydra | python | 5198be6ab1fa7496dfbe879b7e41237e18c10a06 | [Bug] (bash) autocomplete crashes with ??? in defaults
# 🐛 Bug
## Description
When having a configuration that uses ??? in the defaults (to make specifying it mandatory), autocomplete crashes because it looks for that argument first.
## Checklist
- [x] I checked on the latest version of Hydra
- [x] I created a minima... | Thanks for reporting. we will take a look at this for Hydra 1.1. | diff --git a/hydra/plugins/completion_plugin.py b/hydra/plugins/completion_plugin.py
--- a/hydra/plugins/completion_plugin.py
+++ b/hydra/plugins/completion_plugin.py
@@ -9,6 +9,8 @@
import re
import sys
from abc import abstractmethod
+
+from hydra.errors import ConfigCompositionException
from omegaconf import (
... | diff --git a/hydra/test_utils/configs/completion_test/missing_default.yaml b/hydra/test_utils/configs/completion_test/missing_default.yaml
new file mode 100644
--- /dev/null
+++ b/hydra/test_utils/configs/completion_test/missing_default.yaml
@@ -0,0 +1,2 @@
+defaults:
+ - group: ???
diff --git a/tests/test_completion.... | ["tests/test_completion.py::test_file_completion[abc=-foo-files3-expected3-dict.key1=val1", "tests/test_completion.py::test_file_completion[abc=-foo.txt-files2-expected2--True]", "tests/test_completion.py::TestRunCompletion::test_completion_plugin[test_hydra/lau-2-expected10-no_prefix]", "tests/test_completion.py::Test... | ["tests/test_completion.py::test_strip[dict.-5-foo.par-]", "tests/test_completion.py::test_strip[-0-hydra_app", "tests/test_completion.py::test_strip[foo=bar-None-hy1-_=ra_app-/foo/bar]", "tests/test_completion.py::test_strip[dict.-5-hy1-_=ra_app-", "tests/test_completion.py::test_strip[foo=bar-None-hydra_app-]", "test... | null | true | 2021-02-18T21:18:38Z | 1 | 24 | 41 | 3,974 | 0.111111 | 0.85 | 1 | 0.92 | 1 | 0.58 | 86.620111 | |
802 | swe_gym::train::480 | swe_gym | train | 480 | python__mypy-10582 | python/mypy | python/mypy | python | 159f382fe39f96098f92b12ef6241a44c45f3804 | --ignore-missing-imports not working for modularized typeshed types
**Bug Report**
Mypy does not respect the `--ignore-missing-imports` flag/`ignore_missing_imports = True` config for types that are now modularized out of typeshed (eg the [`legacy_bundled_packages`](http://github.com/FuegoFro/mypy/blob/98edc4148ac9fb3... | Digging into it a bit more this seems to be intentional:
https://github.com/python/mypy/blob/e46aa6df6126cf47bea97bf9f94d7cba093d0103/mypy/build.py#L2446-L2452
However even putting the more specific, non-global ignore in config (eg `[mypy-redis.*] ignore_missing_imports = True`) fails to suppress the error as long as... | diff --git a/mypy/build.py b/mypy/build.py
--- a/mypy/build.py
+++ b/mypy/build.py
@@ -2449,7 +2449,9 @@ def find_module_and_diagnose(manager: BuildManager,
# otherwise updating mypy can silently result in new false
# negatives.
global_ignore_missing_imports = manager.options.ignore_missing_i... | diff --git a/test-data/unit/check-modules.test b/test-data/unit/check-modules.test
--- a/test-data/unit/check-modules.test
+++ b/test-data/unit/check-modules.test
@@ -3011,7 +3011,6 @@ certifi.x # E: Expression has type "Any"
certifi.x # E: Expression has type "Any"
1() # E: "int" not callable
-
[case testDoNot... | ["mypy/test/testcheck.py::TypeCheckSuite::testIgnoreErrorFromMissingStubs1"] | ["mypy/test/testcheck.py::TypeCheckSuite::testDoNotLimitImportErrorVolume", "mypy/test/testcheck.py::TypeCheckSuite::testIgnoreErrorFromMissingStubs2"] | null | true | 2021-06-04T16:21:09Z | 2 | 10 | 1 | 1,838 | 0 | 0.85 | 1 | 0.7 | 1 | 0.339667 | 86.619 | |
803 | swe_bench_pro::test::561 | swe_bench_pro | test | 561 | instance_protonmail__webclients-e9677f6c46d5ea7d277a4532a4bf90074f125f31 | protonmail/webclients | protonmail/webclients | javascript | 078178de4df1ffb606f1fc5a46bebe6c31d06b4a | # JSDOM incompatibility with `<dialog>` breaks `ModalTwo` accessibility
## Description
When `ModalTwo` is rendered in a JSDOM environment, the platform’s incomplete support for `HTMLDialogElement` prevents the dialog from behaving like a proper modal container: the `<dialog>` does not render in a way JSDOM can traver... | ## Requirements
- When `ModalTwo` is rendered with the `open` prop in a JSDOM-based environment, its children should be exposed in the accessible tree so that role-based queries such as `getByRole('button', { name: 'Hello' })` reliably find and report them as visible.
- The interactive children passed to `ModalTwo` sh... | diff --git a/packages/components/components/dialog/Dialog.tsx b/packages/components/components/dialog/Dialog.tsx
new file mode 100644
index 00000000000..539e49db366
--- /dev/null
+++ b/packages/components/components/dialog/Dialog.tsx
@@ -0,0 +1,7 @@
+import { HTMLAttributes, Ref, forwardRef } from 'react';
+
+type Prop... | diff --git a/packages/components/components/modalTwo/ModalTwo.test.tsx b/packages/components/components/modalTwo/ModalTwo.test.tsx
index 026b8b39f75..cbe779bccd9 100644
--- a/packages/components/components/modalTwo/ModalTwo.test.tsx
+++ b/packages/components/components/modalTwo/ModalTwo.test.tsx
@@ -1,6 +1,6 @@
import... | ["components/modalTwo/ModalTwo.test.tsx | ModalTwo GetByRole issue Content should be selectable by role"] | ["components/modalTwo/ModalTwo.test.tsx | ModalTwo rendering should not render children when closed", "components/modalTwo/ModalTwo.test.tsx | ModalTwo rendering should render children when open", "components/modalTwo/ModalTwo.test.tsx | ModalTwo rendering should render children when going from closed to open", "compon... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_protonmail__webclients-e9677f6c46d5ea7d277a4532a4bf90074f125f31 | true | null | 3 | 32 | 1 | 1,583 | 0 | 0.95 | 1 | 0.7 | 1 | 0.3705 | 86.6115 | |
804 | swe_gym::train::1928 | swe_gym | train | 1,928 | facebookresearch__hydra-1458 | facebookresearch/hydra | facebookresearch/hydra | python | 3b5aa5d7d7e98acce42f29dbd8d70cdb4ccf30ec | CLI override of hydra/conf does not require `+` prefix
Not sure if this is a bug or a feature request.
Normally adding a new key using CLI override requires a `+` prefix:
```bash
$ python my_app.py new_key=new_value
Could not override 'new_key'.
To append to your config use +new_key=new_value
Key 'new_key' is not in s... | This is by design.
Actually - the Hydra node is always a part of your config as it's composed. It is removed at the end to avoid cluttering your own config with the massive config of Hydra.
You can see the combined config with [`--cfg all`](https://hydra.cc/docs/advanced/hydra-command-line-flags/#--cfg-c).
```
I r... | diff --git a/hydra/_internal/config_loader_impl.py b/hydra/_internal/config_loader_impl.py
--- a/hydra/_internal/config_loader_impl.py
+++ b/hydra/_internal/config_loader_impl.py
@@ -1,5 +1,4 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
-
import copy
import os
import re
@@ -215,6 +214,8... | diff --git a/tests/test_compose.py b/tests/test_compose.py
--- a/tests/test_compose.py
+++ b/tests/test_compose.py
@@ -322,9 +322,8 @@ def test_initialization_root_module(monkeypatch: Any) -> None:
@mark.parametrize(
("overrides", "expected"),
[
- param([], {"map": {}}, id="default"),
- param([... | ["tests/test_compose.py::test_hydra_node_validated[hydra.foo=bar]", "tests/test_compose.py::test_adding_to_sc_dict[add_no_plus]", "tests/test_compose.py::test_hydra_node_validated[hydra.job_logging.foo=bar]"] | ["tests/test_hydra.py::test_hydra_main_rerun[None-tests.test_apps.hydra_main_rerun.my_app]", "tests/test_compose.py::TestCompose::test_strict_failure_global_strict[compose-overrides3-expected3-../hydra/test_utils/configs]", "tests/test_compose.py::TestComposeInits::test_initialize_config_dir_ctx_with_relative_dir[None-... | null | true | 2021-03-07T00:43:25Z | 1 | 48 | 3 | 1,042 | 0 | 0.85 | 1 | 0.7 | 1 | 0.333667 | 86.601 | |
805 | swe_bench_pro::test::6 | swe_bench_pro | test | 6 | instance_NodeBB__NodeBB-0f788b8eaa4bba3c142d171fd941d015c53b65fc-v0ec6d6c2baf3cb4797482ce4829bc25cd5716649 | NodeBB/NodeBB | nodebb/nodebb | javascript | 606808760edd7f0bf73715ae71a3d365a9c6ae95 | ## Title: Topic Thumbnails Not Removed on Topic Deletion
#### Description
When a topic is deleted in NodeBB, its associated thumbnail images are not fully cleaned up. This causes leftover files on disk and database records that should no longer exist, leading to an inconsistent state and wasted storage.
### Step to ... | ## Requirements
- When a topic is deleted or purged, all thumbnails linked to that topic must be removed from the database (the `topic:{tid}:thumbs` sorted set) and from persistent storage on disk.
- The delete operation must accept either a single relative path (string) or an array of relative paths.
- Deleting thumbn... | diff --git a/src/topics/delete.js b/src/topics/delete.js
index 553a8acb8e1b..b30889ace887 100644
--- a/src/topics/delete.js
+++ b/src/topics/delete.js
@@ -94,6 +94,7 @@ module.exports = function (Topics) {
deleteTopicFromCategoryAndUser(tid),
Topics.deleteTopicTags(tid),
Topics.events.purge(tid),
+ Topics... | diff --git a/test/topics/thumbs.js b/test/topics/thumbs.js
index a03ad058f6f5..9526e35c5dee 100644
--- a/test/topics/thumbs.js
+++ b/test/topics/thumbs.js
@@ -260,6 +260,63 @@ describe('Topic thumbs', () => {
await topics.thumbs.delete(uuid, thumbPaths[0]);
assert.strictEqual(await file.exists(thumbPaths[0]), t... | ["test/topics/thumbs.js | Topic thumbs .delete() should handle an array of relative paths", "test/topics/thumbs.js | Topic thumbs .delete() should have no more thumbs left", "test/topics/thumbs.js | Topic thumbs .delete() should decrement numThumbs if dissociated one by one", "test/topics/thumbs.js | Topic thumbs .dele... | ["test/topics/thumbs.js | Topic thumbs should return bool for whether a thumb exists", "test/topics/thumbs.js | Topic thumbs .get() should return an array of thumbs", "test/topics/thumbs.js | Topic thumbs .get() should return an array of an array of thumbs if multiple tids are passed in", "test/topics/thumbs.js | Topic... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_NodeBB__NodeBB-0f788b8eaa4bba3c142d171fd941d015c53b65fc-v0ec6d6c2baf3cb4797482ce4829bc25cd5716649 | true | null | 2 | 61 | 8 | 977 | 0 | 0.95 | 1 | 0.7 | 1 | 0.366167 | 86.5985 | |
806 | swe_gym::train::1897 | swe_gym | train | 1,897 | facebookresearch__hydra-2124 | facebookresearch/hydra | facebookresearch/hydra | python | a257e87b573d16f0cf9d84706d7c922a92c3f389 | [Bug?] hydra.runtime.choices seems not to reflect current choice during multi-run
# 🐛 Bug
## Description
config value `${hydra:runtime.choices}` seems not to reflect current choice under multi-run settings.
## Checklist
- [x] I checked on the latest version of Hydra
- [x] I created a minimal repro (See [this](https:... | Hi @kanada0727,
Thank you for the report! I was able to reproduce your example on the `main` branch.
I agree with you that the current behavior is undesirable. | diff --git a/hydra/_internal/config_loader_impl.py b/hydra/_internal/config_loader_impl.py
--- a/hydra/_internal/config_loader_impl.py
+++ b/hydra/_internal/config_loader_impl.py
@@ -311,9 +311,6 @@ def load_sweep_config(
run_mode=RunMode.RUN,
)
- with open_dict(sweep_config):
- ... | diff --git a/tests/test_apps/app_with_cfg_groups/conf/config_with_runtime_option.yaml b/tests/test_apps/app_with_cfg_groups/conf/config_with_runtime_option.yaml
new file mode 100644
--- /dev/null
+++ b/tests/test_apps/app_with_cfg_groups/conf/config_with_runtime_option.yaml
@@ -0,0 +1,5 @@
+defaults:
+ - optimizer: ne... | ["tests/test_hydra.py::test_hydra_runtime_choice_1882"] | ["tests/test_hydra.py::test_hydra_main_rerun[None-tests.test_apps.hydra_main_rerun.my_app]", "tests/test_hydra.py::test_module_env_override[FB_PAR_MAIN_MODULE]", "tests/test_hydra.py::test_hydra_main_rerun[tests/test_apps/hydra_main_rerun/my_app.py-None]", "tests/test_hydra.py::test_config_name_and_path_overrides[cfg2-... | null | true | 2022-04-02T01:57:45Z | 1 | 3 | 1 | 2,887 | 0 | 0.85 | 1 | 0.85 | 0.8 | 0.491167 | 86.5985 | |
807 | swe_gym::train::1869 | swe_gym | train | 1,869 | facebookresearch__hydra-2189 | facebookresearch/hydra | facebookresearch/hydra | python | 277ff54b71e31531923a51459b328391d76bb5b3 | [Feature Request] Partial object instantiation does not fail with missings
# 🚀 Feature Request
If a config group has a missing value, it cannot be partially instantiated. I would like that instead of throwing an exception, a partial object is returned where that missing value is a required argument of the partial obj... | Thanks for reporting @jzazo , I will take a look at this. | diff --git a/hydra/_internal/instantiate/_instantiate2.py b/hydra/_internal/instantiate/_instantiate2.py
--- a/hydra/_internal/instantiate/_instantiate2.py
+++ b/hydra/_internal/instantiate/_instantiate2.py
@@ -324,8 +324,12 @@ def instantiate_node(
if _is_target(node):
_target_ = _resolve_target(... | diff --git a/tests/instantiate/test_instantiate.py b/tests/instantiate/test_instantiate.py
--- a/tests/instantiate/test_instantiate.py
+++ b/tests/instantiate/test_instantiate.py
@@ -7,7 +7,7 @@
from textwrap import dedent
from typing import Any, Callable, Dict, List, Optional, Tuple
-from omegaconf import MISSING,... | ["tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict-static_method+partial+missing-recursive]", "tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict_config-list_of_partial_class+missing-not_recursive]", "tests/instantiate/test_instantiate.py::test_class_instantia... | ["tests/instantiate/test_instantiate.py::test_override_target[instantiate2-dict-type:override_same_args]", "tests/instantiate/test_instantiate.py::test_convert_params_override[instantiate2-interpolation-all]", "tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict-class_method_on_an_object_nes... | null | true | 2022-05-03T22:04:43Z | 1 | 6 | 17 | 1,869 | 0 | 0.85 | 1 | 0.7 | 1 | 0.3315 | 86.5945 | |
808 | swe_bench_pro::test::478 | swe_bench_pro | test | 478 | instance_navidrome__navidrome-56303cde23a4122d2447cbb266f942601a78d7e4 | navidrome/navidrome | navidrome/navidrome | go | e434ca937255be6e12f11300648b3486de0aa9c2 | # Title
Scanner does not support R128 gain tags for track and album
## Description
The metadata scanner only reads `ReplayGain `tags for gain values. It ignores R128 gain tags (`r128_track_gain`, `r128_album_gain`), which are common in OPUS files. Because of this, files that provide only R128 tags show missing or in... | ## Requirements
- The scanner must continue to support reading track and album gain from ReplayGain tags (`replaygain_album_gain`, `replaygain_track_gain`).
- The scanner must also support reading track gain from the R128 gain tag (`r128_track_gain`) when a corresponding ReplayGain track gain tag is not present.
- Re... | diff --git a/scanner/metadata/metadata.go b/scanner/metadata/metadata.go
index 2d4315f9876..768add04217 100644
--- a/scanner/metadata/metadata.go
+++ b/scanner/metadata/metadata.go
@@ -172,11 +172,15 @@ func (t Tags) MbzAlbumComment() string {
return t.getFirstTagValue("musicbrainz_albumcomment", "musicbrainz album c... | diff --git a/scanner/metadata/metadata_internal_test.go b/scanner/metadata/metadata_internal_test.go
index 3b2b198be23..ef32da56477 100644
--- a/scanner/metadata/metadata_internal_test.go
+++ b/scanner/metadata/metadata_internal_test.go
@@ -128,5 +128,17 @@ var _ = Describe("Tags", func() {
Entry("Infinity", "Infin... | ["TestMetadata"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-56303cde23a4122d2447cbb266f942601a78d7e4 | true | null | 1 | 46 | 1 | 1,269 | 0 | 0.95 | 1 | 0.7 | 1 | 0.364833 | 86.5945 | |
809 | swe_bench_pro::test::364 | swe_bench_pro | test | 364 | instance_gravitational__teleport-cb712e3f0b06dadc679f895daef8072cae400c26-vee9b09fb20c43af7e520f57e9239bbcf46b7113d | gravitational/teleport | gravitational/teleport | go | 8bca6e20c6c7374080180f7a5b5ea62bb15c136c | ## Title: Direct Dial nodes report wildcard address `[::]:3022` and are unreachable
### Description
### Expected behavior
Direct Dial nodes should report a routable, reachable address and be accessible via `tsh` and the web UI.
### Current behavior
Direct Dial nodes report a wildcard address (`[::]:3022`) and cann... | ## Requirements
- The interface `UpstreamInventoryControlStream` must include a method `PeerAddr() string` that returns the peer address string previously associated with the stream.
- `InventoryControlStreamPipe` must accept variadic options of type `ICSPipeOption`. When passed `ICSPipePeerAddr(addr string)`, the upst... | diff --git a/api/client/inventory.go b/api/client/inventory.go
index f34e5bae00ff6..0ad75469423fb 100644
--- a/api/client/inventory.go
+++ b/api/client/inventory.go
@@ -56,6 +56,8 @@ type UpstreamInventoryControlStream interface {
Send(ctx context.Context, msg proto.DownstreamInventoryMessage) error
// Recv access ... | diff --git a/lib/inventory/controller_test.go b/lib/inventory/controller_test.go
index 7f18ceec814a0..92f991a0dc395 100644
--- a/lib/inventory/controller_test.go
+++ b/lib/inventory/controller_test.go
@@ -39,12 +39,20 @@ type fakeAuth struct {
upserts int
keepalives int
err error
+
+ expectAddr str... | ["TestControllerBasics"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-cb712e3f0b06dadc679f895daef8072cae400c26-vee9b09fb20c43af7e520f57e9239bbcf46b7113d | true | null | 3 | 79 | 1 | 601 | 0 | 0.95 | 1 | 0.7 | 1 | 0.3635 | 86.5905 | |
810 | swe_gym::train::514 | swe_gym | train | 514 | python__mypy-16061 | python/mypy | python/mypy | python | ed9b8990025a81a12e32bec59f2f3bfab3d7c71b | Introduce error category [unsafe-overload].
**Feature**
Specifically, consider this [example from the documentation](https://mypy.readthedocs.io/en/stable/more_types.html#type-checking-the-variants) [[mypy-play]](https://mypy-play.net/?mypy=latest&python=3.11&gist=e3ef44b3191567e27dc1b2887c4e722e):
```python
from typ... | Seems fine to me, please submit a PR. In general we should minimize use of the "misc" error code.
One concern is about backward incompatibility: users who use `# type: ignore[misc]` will have to change their code. Not sure if we have a stance about that. | diff --git a/mypy/errorcodes.py b/mypy/errorcodes.py
--- a/mypy/errorcodes.py
+++ b/mypy/errorcodes.py
@@ -261,3 +261,10 @@ def __hash__(self) -> int:
# This is a catch-all for remaining uncategorized errors.
MISC: Final = ErrorCode("misc", "Miscellaneous other checks", "General")
+
+UNSAFE_OVERLOAD: Final[ErrorCod... | diff --git a/test-data/unit/check-errorcodes.test b/test-data/unit/check-errorcodes.test
--- a/test-data/unit/check-errorcodes.test
+++ b/test-data/unit/check-errorcodes.test
@@ -1072,3 +1072,17 @@ A.f = h # type: ignore[assignment] # E: Unused "type: ignore" comment, use nar
[case testUnusedIgnoreEnableCode]
# fla... | ["mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeUnsafeOverloadError"] | ["mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testUnusedIgnoreEnableCode"] | null | true | 2023-09-06T20:15:07Z | 3 | 10 | 1 | 1,781 | 0 | 0.85 | 1 | 0.7 | 1 | 0.330167 | 86.5905 | |
811 | swe_gym::train::1866 | swe_gym | train | 1,866 | facebookresearch__hydra-2014 | facebookresearch/hydra | facebookresearch/hydra | python | 513d20011bc25c538b34a946bfab0fdbf0662379 | [Feature Request] `instantiate` support for ListConfig at top level
The below text is copied directly from a post by a user of the internal Meta Hydra users group:
---
It seems that Hydra doesn't support recursive instantiation for list objects yet. For example, I would expect the following code to work, but it's rai... | ### Workaround 1: wrapping in a toplevel dict:
A workaround is to wrap the top-level list in a dictionary before calling `instantiate`:
```python
>>> cfg = OmegaConf.create([
... {"_target_": "torch.nn.Linear", "in_features": 3, "out_features": 4},
... {"_target_": "torch.nn.Linear", "in_features": 4, "out... | diff --git a/hydra/_internal/instantiate/_instantiate2.py b/hydra/_internal/instantiate/_instantiate2.py
--- a/hydra/_internal/instantiate/_instantiate2.py
+++ b/hydra/_internal/instantiate/_instantiate2.py
@@ -4,7 +4,7 @@
import functools
import sys
from enum import Enum
-from typing import Any, Callable, Sequence,... | diff --git a/tests/instantiate/test_instantiate.py b/tests/instantiate/test_instantiate.py
--- a/tests/instantiate/test_instantiate.py
+++ b/tests/instantiate/test_instantiate.py
@@ -112,6 +112,26 @@ def config(request: Any, src: Any) -> Any:
partial(AClass, a=10, b=20, c=30),
id="class+partia... | ["tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict_config-list_as_toplevel2-not_recursive]", "tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict-list_as_toplevel2-recursive]", "tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict-lis... | ["tests/instantiate/test_instantiate.py::test_override_target[instantiate2-dict-type:override_same_args]", "tests/instantiate/test_instantiate.py::test_convert_params_override[instantiate2-interpolation-all]", "tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict-class_method_on_an_object_nes... | null | true | 2022-02-04T08:26:56Z | 1 | 42 | 13 | 1,136 | 0 | 0.85 | 1 | 0.7 | 1 | 0.329333 | 86.588 | |
812 | swe_gym::train::1112 | swe_gym | train | 1,112 | pydantic__pydantic-9303 | pydantic/pydantic | pydantic/pydantic | python | 26129479a06960af9d02d3a948e51985fe59ed4b | When using min_length on Sequence field, outputted JSON schema is `minLength` instead of `minItems` for array type
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
```python
class Example(BaseModel):
array: Sequence[int] = Field(default_factory=list, min_length=1)
Example.model_json_s... | @skylander86,
Thanks for reporting this! We can fix in a 2.7 patch release soon. Adding to the corresponding milestone!
Ok I don't think this is actually a 2.7 issue (can reproduce in 2.6.4).
Removing this from the 2.7 milestone, great first issue if someone wants to pick this up!
Hi, I can take this. | 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
@@ -1442,6 +1442,7 @@ def _sequence_schema(self, sequence_type: Any) -> core_schema.CoreSchema:
item_type = self._get_first_arg_... | 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
@@ -4942,6 +4942,36 @@ class Model(BaseModel):
}
+@pytest.mark.parametrize(('sequence_type',), [pytest.param(List), pytest.param(Sequence)])
+def test_sequence_schema_with_max_leng... | ["tests/test_json_schema.py::test_sequence_schema_with_min_length[sequence_type1]", "tests/test_json_schema.py::test_sequence_schema_with_max_length[sequence_type1]"] | ["tests/test_json_schema.py::test_ipv6network_type", "tests/test_json_schema.py::test_typeddict_with__callable_json_schema_extra", "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_i... | null | true | 2024-04-23T09:18:46Z | 2 | 25 | 2 | 1,468 | 0 | 0.85 | 1 | 0.7 | 1 | 0.328 | 86.584 | |
813 | swe_gym::train::2379 | swe_gym | train | 2,379 | modin-project__modin-5507 | modin-project/modin | modin-project/modin | python | e1d42410c3900f93be420303e745de29c1e6bda1 | Different from pandas index at `read_csv` in case of specified `names`
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Any
- **Modin version** (`modin.__version__`): 0.8.0
- **Python version**: 3.7.5
- **Code we can use to reproduce**:
```python
if __name__ == "__main__":
impor... | This might be a similar issue to #2239.
This is quite an old issue, so we need to figure out whether it still applies.
I was able to create the dataset used: [test.csv](https://github.com/modin-project/modin/files/9570090/test.csv)
Unfortunately, it looks like both `df_equals` statements are now failing. For the fi... | diff --git a/modin/core/io/text/text_file_dispatcher.py b/modin/core/io/text/text_file_dispatcher.py
--- a/modin/core/io/text/text_file_dispatcher.py
+++ b/modin/core/io/text/text_file_dispatcher.py
@@ -1105,6 +1105,14 @@ def _read(cls, filepath_or_buffer, **kwargs):
if can_compute_metadata_while_skipping_... | diff --git a/modin/pandas/test/data/issue_1930.csv b/modin/pandas/test/data/issue_1930.csv
new file mode 100644
--- /dev/null
+++ b/modin/pandas/test/data/issue_1930.csv
@@ -0,0 +1,5 @@
+,col1,col2,col3,col4,col5
+0,0,4,8,12,0
+1,1,5,9,13,0
+2,2,6,10,14,0
+3,3,7,11,15,0
diff --git a/modin/pandas/test/test_io.py b/modin... | ["modin/pandas/test/test_io.py::TestCsv::test_read_csv_1930[None]", "modin/pandas/test/test_io.py::TestCsv::test_read_csv_1930[usecols1]"] | ["modin/pandas/test/test_io.py::TestCsv::test_read_csv_parsing_2[latin1-None-None-skiprows5-infer]", "modin/pandas/test/test_io.py::TestParquet::test_read_parquet_directory[rows_per_file0-1000-columns1-pyarrow]", "modin/pandas/test/test_io.py::TestCsv::test_read_csv_parse_dates[None-infer-5-nonexistent_string_column-st... | null | true | 2022-12-25T16:40:26Z | 2 | 12 | 2 | 1,724 | 0 | 0.85 | 1 | 0.7 | 1 | 0.327333 | 86.582 | |
814 | swe_gym::train::2056 | swe_gym | train | 2,056 | Project-MONAI__MONAI-4249 | Project-MONAI/MONAI | project-monai/monai | python | 5536cc31fd8a820487e0de6ea79450624deb7b00 | Resize transform produces aliasing artifacts
**Describe the bug**
The Resize transform produces aliasing artifacts. It uses the `F.interpolate` function from PyTorch, which has an antialiasing option, but that does not support 3D downsampling of volumes (5D tensors). The Resize transforms does not use the antialiasing ... | Hi @lemairecarl ,
Thanks for your finding and feedback!
@wyli , I think maybe it's necessary to add the `antialias` arg to `Resize`, `Zoom`, `RandZoom` transforms based on:
https://github.com/pytorch/pytorch/blob/v1.11.0/torch/nn/functional.py#L3780
What do you think?
Thanks.
Yes there's also a related p1 mi... | 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
@@ -26,6 +26,7 @@
from monai.networks.layers import AffineTransform, GaussianFilter, grid_pull
from monai.networks.utils import meshgrid_ij, normalize_tran... | diff --git a/tests/test_resize.py b/tests/test_resize.py
--- a/tests/test_resize.py
+++ b/tests/test_resize.py
@@ -13,6 +13,7 @@
import numpy as np
import skimage.transform
+import torch
from parameterized import parameterized
from monai.transforms import Resize
@@ -24,6 +25,10 @@
TEST_CASE_2 = [{"spatial_si... | ["tests/test_resize.py::TestResize::test_correct_results_0", "tests/test_resize.py::TestResize::test_correct_results_3", "tests/test_resize.py::TestResize::test_longest_shape_3", "tests/test_resize.py::TestResize::test_correct_results_2", "tests/test_resize.py::TestResize::test_correct_results_1", "tests/test_resize.py... | ["tests/test_resize.py::TestResize::test_invalid_inputs", "tests/test_resize.py::TestResize::test_longest_shape_1", "tests/test_resize.py::TestResize::test_longest_shape_2", "tests/test_resize.py::TestResize::test_longest_infinite_decimals", "tests/test_resize.py::TestResize::test_longest_shape_0"] | null | true | 2022-05-10T09:29:27Z | 1 | 42 | 6 | 1,110 | 0 | 0.85 | 1 | 0.7 | 1 | 0.325 | 86.575 | |
815 | swe_gym::train::2038 | swe_gym | train | 2,038 | Project-MONAI__MONAI-4676 | Project-MONAI/MONAI | project-monai/monai | python | fedff1d414e4a35f2753eb6b73ace9821024c754 | Interoperability numpy functions <> MetaTensor
**Is your feature request related to a problem? Please describe.**
would be nice if `MetaTensor` could have basic compatibility with numpy functions,
perhaps returning the primary array results as `np.ndarray` is a good starting point.
but currently it is
```py
>>> impor... | Hi @wyli ,
Thanks for raising the discussion.
I don't quite understand this feature request, I suggested to keep supporting both numpy and tensor at the beginning of development for `MetaTensor`, but later I think @ericspod @rijobro and we two aligned to drop numpy support to make the code base clear and let's make... | diff --git a/monai/data/meta_tensor.py b/monai/data/meta_tensor.py
--- a/monai/data/meta_tensor.py
+++ b/monai/data/meta_tensor.py
@@ -280,6 +280,44 @@ def __torch_function__(cls, func, types, args=(), kwargs=None) -> Any:
ret = MetaTensor.update_meta(ret, func, args, kwargs)
return ret[0] if unpack e... | diff --git a/tests/test_meta_tensor.py b/tests/test_meta_tensor.py
--- a/tests/test_meta_tensor.py
+++ b/tests/test_meta_tensor.py
@@ -520,6 +520,22 @@ def test_multiprocessing(self, device=None, dtype=None):
self.assertIsInstance(obj, MetaTensor)
assert_allclose(obj.as_tensor(), t)
+ @parameteri... | ["tests/test_meta_tensor.py::TestMetaTensor::test_array_function_4", "tests/test_meta_tensor.py::TestMetaTensor::test_array_function_2", "tests/test_meta_tensor.py::TestMetaTensor::test_array_function_5", "tests/test_meta_tensor.py::TestMetaTensor::test_array_function_3", "tests/test_meta_tensor.py::TestMetaTensor::tes... | ["tests/test_meta_tensor.py::TestMetaTensor::test_construct_with_pre_applied_transforms", "tests/test_meta_tensor.py::TestMetaTensor::test_add_4", "tests/test_meta_tensor.py::TestMetaTensor::test_decollate_2", "tests/test_meta_tensor.py::TestMetaTensor::test_decollate_5", "tests/test_meta_tensor.py::TestMetaTensor::tes... | null | true | 2022-07-11T21:45:20Z | 1 | 38 | 6 | 1,186 | 0 | 0.85 | 1 | 0.7 | 1 | 0.324333 | 86.573 | |
816 | swe_gym::train::1084 | swe_gym | train | 1,084 | pydantic__pydantic-8793 | pydantic/pydantic | pydantic/pydantic | python | 832225b90672c68e2d4067bd0ffecf834d62b48b | model_json_schema export with Annotated types misses 'required' parameters
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
It seems that using `model_json_schema` on type annotations combining `typing.Annotated` and `pydantic.Field` result in the `Annotated` not being marked as `require... | Indeed, a related issue is here: https://github.com/pydantic/pydantic/issues/8534.
I'll mark this as a bug, though I suppose it could also be a feature request attached to #8534 relating to general support for `Annotated` types with `create_model`.
Thanks for reporting this! PRs welcome with a fix / support! | diff --git a/pydantic/fields.py b/pydantic/fields.py
--- a/pydantic/fields.py
+++ b/pydantic/fields.py
@@ -402,6 +402,13 @@ def merge_field_infos(*field_infos: FieldInfo, **overrides: Any) -> FieldInfo:
# No merging necessary, but we still need to make a copy and apply the overrides
field_info... | 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
@@ -6,14 +6,7 @@
from datetime import date, datetime, time, timedelta
from decimal import Decimal
from enum import Enum, IntEnum
-from ipaddress import (
- IPv4Address,
- IPv4Inter... | ["tests/test_json_schema.py::test_required_fields_in_annotated_with_create_model", "tests/test_json_schema.py::test_json_schema_annotated_with_field", "tests/test_json_schema.py::test_required_fields_in_annotated_with_basemodel"] | ["tests/test_json_schema.py::test_ipv6network_type", "tests/test_json_schema.py::test_typeddict_with__callable_json_schema_extra", "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_i... | null | true | 2024-02-13T04:52:44Z | 1 | 7 | 3 | 1,790 | 0 | 0.85 | 1 | 0.7 | 1 | 0.321667 | 86.565 | |
817 | swe_gym::train::1923 | swe_gym | train | 1,923 | facebookresearch__hydra-1824 | facebookresearch/hydra | facebookresearch/hydra | python | 7435e573988da956c5df79d9810483955892be73 | Improve error message for merging from defaults list
When composing a config from a defaults list, merge errors can occur if the source config (the selected default) does not fit the schema of the target.
When such an error happens, it would be nice if the error message would say **which** entry in the defaults list i... | Sounds good, except you should just catch OmegaConfBaseException instead of adding another catch clause. | diff --git a/hydra/_internal/config_loader_impl.py b/hydra/_internal/config_loader_impl.py
--- a/hydra/_internal/config_loader_impl.py
+++ b/hydra/_internal/config_loader_impl.py
@@ -13,7 +13,6 @@
ConfigAttributeError,
ConfigKeyError,
OmegaConfBaseException,
- ValidationError,
)
from hydra._intern... | diff --git a/hydra/test_utils/configs/schema_key_error.yaml b/hydra/test_utils/configs/schema_key_error.yaml
new file mode 100644
--- /dev/null
+++ b/hydra/test_utils/configs/schema_key_error.yaml
@@ -0,0 +1,5 @@
+defaults:
+ - base_mysql
+ - _self_
+
+foo: not_in_schema
diff --git a/hydra/test_utils/configs/schema_v... | ["tests/test_config_loader.py::TestConfigLoader::test_load_config_with_validation_error[file]", "tests/test_config_loader.py::TestConfigLoader::test_load_config_with_validation_error[pkg]", "tests/test_config_loader.py::TestConfigLoader::test_load_config_with_key_error[file]", "tests/test_config_loader.py::TestConfigLo... | ["tests/test_config_loader.py::TestConfigLoader::test_load_with_missing_default[pkg]", "tests/test_config_loader.py::test_complex_defaults[overrides0-expected0]", "tests/test_config_loader.py::TestConfigLoader::test_assign_null[pkg]", "tests/test_config_loader.py::TestConfigLoader::test_load_yml_file[pkg]", "tests/test... | null | true | 2021-09-15T08:29:18Z | 1 | 5 | 4 | 2,762 | 0 | 0.85 | 1 | 0.85 | 0.8 | 0.477 | 86.556 | |
818 | swe_bench_pro::test::504 | swe_bench_pro | test | 504 | instance_navidrome__navidrome-de90152a7173039677ac808f5bfb1e644d761336 | navidrome/navidrome | navidrome/navidrome | go | 27875ba2dd1673ddf8affca526b0664c12c3b98b | ## Title:
Album mapping inconsistencies between database values and model fields
#### Description:
The album mapping layer does not consistently handle discs data and play count values, leading to mismatches between stored values and the resulting `model.Album`.
### Steps to Reproduce:
- Map an album with `Discs` ... | ## Requirements
- `PostMapArgs()` on `dbAlbum` must serialize `Album.Discs` into the resulting argument map under the key `discs` as a JSON string. An empty `model.Discs` must serialize to the literal string `{}`, and a populated `model.Discs` such as `{1: "disc1", 2: "disc2"}` must serialize to `{"1":"disc1","2":"disc... | diff --git a/persistence/album_repository.go b/persistence/album_repository.go
index 3b9b49a1dc9..840ad16ccf5 100644
--- a/persistence/album_repository.go
+++ b/persistence/album_repository.go
@@ -27,11 +27,13 @@ type dbAlbum struct {
}
func (a *dbAlbum) PostScan() error {
- if a.Discs == "" {
- a.Album.Discs = mo... | diff --git a/persistence/album_repository_test.go b/persistence/album_repository_test.go
index 6c31233f..4493f05e 100644
--- a/persistence/album_repository_test.go
+++ b/persistence/album_repository_test.go
@@ -60,91 +60,92 @@ var _ = Describe("AlbumRepository", func() {
})
Describe("dbAlbum mapping", func() {
- ... | ["TestPersistence"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-de90152a7173039677ac808f5bfb1e644d761336 | true | null | 1 | 51 | 1 | 1,086 | 0 | 0.95 | 1 | 0.7 | 1 | 0.351 | 86.553 | |
819 | swe_bench_pro::test::12 | swe_bench_pro | test | 12 | instance_NodeBB__NodeBB-445b70deda20201b7d9a68f7224da751b3db728c-v4fbcfae8b15e4ce5d132c408bca69ebb9cf146ed | NodeBB/NodeBB | nodebb/nodebb | javascript | 565ca3cc3b78d6e5177b7834d496927b96b6c88c | ## Title:
Invalid input handling and response consistency in chats and users API
#### Description:
Some API endpoints related to chats and users do not consistently validate missing or malformed input data, leading to unexpected or misleading responses. These endpoints must fail fast with a clear error message when re... | ## Requirements
- Maintain consistent validation across chat message retrieval endpoints so that a call in which the request payload is omitted entirely, or in which either the message identifier (`mid`) or the room identifier (`roomId`) is missing or falsy, must fail with `[[error:invalid-data]]` — never with a runtim... | diff --git a/src/api/chats.js b/src/api/chats.js
index 964bfdc07133..db07ac32f060 100644
--- a/src/api/chats.js
+++ b/src/api/chats.js
@@ -36,7 +36,11 @@ async function rateLimitExceeded(caller, field) {
return false;
}
-chatsAPI.list = async (caller, { uid, start, stop, page, perPage }) => {
+chatsAPI.list = asyn... | diff --git a/test/messaging.js b/test/messaging.js
index 9ea17cf40222..4709aff35111 100644
--- a/test/messaging.js
+++ b/test/messaging.js
@@ -374,8 +374,9 @@ describe('Messaging Library', () => {
assert.equal(messageData.content, 'first chat message');
assert(messageData.fromUser);
assert(messageData.roomI... | ["test/messaging.js | Messaging Library rooms should return invalid-data error", "test/messaging.js | Messaging Library rooms should return not allowed error if user is not in room", "test/messaging.js | Messaging Library rooms should fail to load recent chats with invalid data", "test/messaging.js | Messaging Library ... | ["test/messaging.js | Messaging Library .canMessageUser() should allow messages to be sent to an unrestricted user", "test/messaging.js | Messaging Library .canMessageUser() should NOT allow messages to be sent to a restricted user", "test/messaging.js | Messaging Library .canMessageUser() should always allow admins th... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_NodeBB__NodeBB-445b70deda20201b7d9a68f7224da751b3db728c-v4fbcfae8b15e4ce5d132c408bca69ebb9cf146ed | true | null | 2 | 30 | 4 | 1,505 | 0 | 0.95 | 1 | 0.7 | 1 | 0.350833 | 86.5525 | |
820 | swe_bench_pro::test::184 | swe_bench_pro | test | 184 | instance_flipt-io__flipt-2eac0df47b5ecc8bb05002d80383ceb08ab3620a | flipt-io/flipt | flipt-io/flipt | go | 01f583bb025dbd60e4210eb9a31a6f859ed150e8 | # Telemetry payload doesn't reflect analytics state or backend and carries an outdated payload version identifier
# Description
The 'flipt.ping' telemetry payload doesn't indicate whether analytics is enabled nor which analytics storage backend is configured (for example, ClickHouse) when analytics is turned on. This... | ## Requirements
- Telemetry must emit event 'flipt.ping' and include 'properties.version = \"1.5\"' for this payload revision.
- Telemetry must include 'properties.uuid' equal to the event 'AnonymousId', and the identifier must persist across runs by honoring the configured telemetry state directory (reuse when presen... | diff --git a/internal/config/analytics.go b/internal/config/analytics.go
index baba99fc2c..7fdb2d9a2c 100644
--- a/internal/config/analytics.go
+++ b/internal/config/analytics.go
@@ -20,6 +20,14 @@ type AnalyticsStorageConfig struct {
Clickhouse ClickhouseConfig `json:"clickhouse,omitempty" mapstructure:"clickhouse" ... | diff --git a/internal/telemetry/telemetry_test.go b/internal/telemetry/telemetry_test.go
index 265c047bb0..ab934aa62b 100644
--- a/internal/telemetry/telemetry_test.go
+++ b/internal/telemetry/telemetry_test.go
@@ -14,18 +14,18 @@ import (
"go.flipt.io/flipt/internal/info"
"go.uber.org/zap/zaptest"
- "gopkg.in/se... | ["TestPing", "TestPing_Existing", "TestPing_SpecifyStateDir"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-2eac0df47b5ecc8bb05002d80383ceb08ab3620a | true | null | 2 | 36 | 3 | 1,382 | 0 | 0.95 | 1 | 0.7 | 1 | 0.350333 | 86.551 | |
821 | swe_gym::train::2209 | swe_gym | train | 2,209 | Project-MONAI__MONAI-4163 | Project-MONAI/MONAI | project-monai/monai | python | 05b9d3110ca68d6550e7ecf4553b4adeae997305 | Enhance `DiceMetric` to support counting negative samples
I think the `DiceMetric` may has an error when there is no foreground for `y` but has foreground for `y_pred`. According to the formula, the result should be 0, but so far the class will return `nan`:
```
torch.where(y_o > 0, (2.0 * intersection) / denominator,... | Hi @dongyang0122 @holgerroth ,
Could you please help also share some comments on this Dice computation question?
Thanks in advance.
There are currently two ways to handle the empty ground truth case:
1. (Ours) Skip calculation and set dice score to NaN;
2. Return one when the prediction is empty, zero other... | diff --git a/monai/metrics/meandice.py b/monai/metrics/meandice.py
--- a/monai/metrics/meandice.py
+++ b/monai/metrics/meandice.py
@@ -40,6 +40,9 @@ class DiceMetric(CumulativeIterationMetric):
``"mean_channel"``, ``"sum_channel"``}, default to ``"mean"``. if "none", will not do reduction.
get_not... | diff --git a/tests/test_compute_meandice.py b/tests/test_compute_meandice.py
--- a/tests/test_compute_meandice.py
+++ b/tests/test_compute_meandice.py
@@ -172,9 +172,19 @@
[[1.0000, 1.0000], [1.0000, 1.0000]],
]
+TEST_CASE_11 = [
+ {"y": torch.zeros((2, 2, 3, 3)), "y_pred": torch.zeros((2, 2, 3, 3)), "ignore... | ["tests/test_compute_meandice.py::TestComputeMeanDice::test_value_3", "tests/test_compute_meandice.py::TestComputeMeanDice::test_value_4"] | ["tests/test_compute_meandice.py::TestComputeMeanDice::test_value_0", "tests/test_compute_meandice.py::TestComputeMeanDice::test_value_class_1", "tests/test_compute_meandice.py::TestComputeMeanDice::test_value_class_0", "tests/test_compute_meandice.py::TestComputeMeanDice::test_nans_class_2", "tests/test_compute_meandi... | null | true | 2022-04-24T06:37:59Z | 1 | 20 | 2 | 1,461 | 0 | 0.85 | 1 | 0.7 | 1 | 0.310167 | 86.5305 | |
822 | swe_bench_pro::test::106 | swe_bench_pro | test | 106 | instance_ansible__ansible-de01db08d00c8d2438e1ba5989c313ba16a145b0-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | ansible/ansible | ansible/ansible | python | fc8197e32675dd0343939f107b5f017993e36f62 | # Title:
pip module fails when `executable` and `virtualenv` are unset and no `pip` binary is found
### Description
When the pip module runs without `executable` or `virtualenv`, it only attempts to locate a `pip` executable on `PATH`. On systems where the `pip` package is installed for the current Python interprete... | ## Requirements
- The `pip.py` module should update its package-listing routine to accept the pip launcher as an argv list. It must first run the modern listing subcommand `list --format=freeze` (appended to the launcher argv); if that command returns a non-zero exit code it must fall back to the legacy `freeze` subcom... | diff --git a/changelogs/fragments/pip-entry-point.yml b/changelogs/fragments/pip-entry-point.yml
new file mode 100644
index 00000000000000..9fe4bc2148bbc1
--- /dev/null
+++ b/changelogs/fragments/pip-entry-point.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - "``pip`` now uses the ``pip`` Python module installed for the Ansible mo... | diff --git a/test/units/modules/test_pip.py b/test/units/modules/test_pip.py
index 7f0f8b079a..3df4226b82 100644
--- a/test/units/modules/test_pip.py
+++ b/test/units/modules/test_pip.py
@@ -4,6 +4,8 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
+import os
+i... | ["test/units/modules/test_pip.py::test_failure_when_pip_absent[patch_ansible_module0]", "test/units/modules/test_pip.py::test_get_packages_legacy_freeze_fallback_returns_string[None]", "test/units/modules/test_pip.py::test_get_packages_modern_list_command_returns_string[None]", "test/units/modules/test_pip.py::test_get... | ["test/units/modules/test_pip.py::test_recover_package_name[None-test_input0-expected0]", "test/units/modules/test_pip.py::test_recover_package_name[None-test_input1-expected1]", "test/units/modules/test_pip.py::test_recover_package_name[None-test_input2-expected2]"] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-de01db08d00c8d2438e1ba5989c313ba16a145b0-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | true | null | 3 | 51 | 7 | 1,040 | 0 | 0.95 | 1 | 0.7 | 1 | 0.343333 | 86.53 | |
823 | swe_bench_pro::test::14 | swe_bench_pro | test | 14 | instance_NodeBB__NodeBB-6ea3b51f128dd270281db576a1b59270d5e45db0-vnan | NodeBB/NodeBB | nodebb/nodebb | javascript | d9c42c000cd6c624794722fd55a741aff9d18823 | ## Title: Lack of unified bulk increment support for sorted sets across databases
## Description of the problem:
The lack of bulk incrementation of sorted records in supported database backends results in inefficient updates when changing the scores of multiple items. Without a common bulk increment interface, each b... | ## Requirements
- A bulk increment method for sorted sets must be provided that accepts a single array of operations, where each operation is a tuple specifying a key, a numeric score increment amount, and a member identifier.
- The bulk increment method must return an array of the resulting scores in the same order a... | diff --git a/src/database/mongo/sorted.js b/src/database/mongo/sorted.js
index 7b59828e4966..16bc5f2154a3 100644
--- a/src/database/mongo/sorted.js
+++ b/src/database/mongo/sorted.js
@@ -1,5 +1,6 @@
'use strict';
+const _ = require('lodash');
const utils = require('../../utils');
module.exports = function (modul... | diff --git a/test/database/sorted.js b/test/database/sorted.js
index 8a25818017fa..9084723477ed 100644
--- a/test/database/sorted.js
+++ b/test/database/sorted.js
@@ -1024,6 +1024,47 @@ describe('Sorted Set methods', () => {
});
});
});
+
+ it('should increment fields of sorted sets with a single call', as... | ["test/database/sorted.js | Sorted Set methods | sortedSetIncrBy() | should increment fields of sorted sets with a single call", "test/database/sorted.js | Sorted Set methods | sortedSetIncrBy() | should increment the same field"] | ["test/database/sorted.js | Sorted Set methods | sortedSetScan | should find matches in sorted set containing substring", "test/database/sorted.js | Sorted Set methods | sortedSetScan | should find matches in sorted set with scores", "test/database/sorted.js | Sorted Set methods | sortedSetScan | should find matches in... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_NodeBB__NodeBB-6ea3b51f128dd270281db576a1b59270d5e45db0-vnan | true | null | 3 | 37 | 2 | 1,319 | 0 | 0.95 | 1 | 0.7 | 1 | 0.343167 | 86.5295 | |
824 | swe_bench_verified::test::320 | swe_bench_verified | test | 320 | pylint-dev__pylint-4551 | pylint-dev/pylint | pylint-dev/pylint | python | 99589b08de8c5a2c6cc61e13a37420a868c80599 | Use Python type hints for UML generation
It seems that pyreverse does not read python type hints (as defined by [PEP 484](https://www.python.org/dev/peps/pep-0484/)), and this does not help when you use `None` as a default value :
### Code example
```
class C(object):
def __init__(self, a: str = None):
sel... | Is this something that's in the pipeline (or going to make it)? Type hinting is becoming more and more common, and this will be a huge benefit towards working with `pyreverse`. Especially as it's considered Python idiomatic (and sensible) to use `None` as a default parameter for mutable data structures.
@pohutukawa We... | diff --git a/pylint/pyreverse/diagrams.py b/pylint/pyreverse/diagrams.py
--- a/pylint/pyreverse/diagrams.py
+++ b/pylint/pyreverse/diagrams.py
@@ -122,7 +122,7 @@ def class_names(self, nodes):
if isinstance(node, astroid.Instance):
node = node._proxied
if (
- is... | diff --git a/tests/unittest_pyreverse_writer.py b/tests/unittest_pyreverse_writer.py
--- a/tests/unittest_pyreverse_writer.py
+++ b/tests/unittest_pyreverse_writer.py
@@ -22,12 +22,14 @@
import codecs
import os
from difflib import unified_diff
+from unittest.mock import patch
+import astroid
import pytest
from... | ["tests/unittest_pyreverse_writer.py::test_dot_files[packages_No_Name.dot]", "tests/unittest_pyreverse_writer.py::test_dot_files[classes_No_Name.dot]", "tests/unittest_pyreverse_writer.py::test_get_visibility[names0-special]", "tests/unittest_pyreverse_writer.py::test_get_visibility[names1-private]", "tests/unittest_py... | [] | null | true | 2021-06-07T15:14:31Z | 4 | 126 | 10 | 752 | 0 | 1 | 1 | 0.7 | 0.85 | 0.545333 | 86.5235 | |
825 | swe_bench_pro::test::143 | swe_bench_pro | test | 143 | instance_element-hq__element-web-72a8f8f03b1a01bb70ef8a5bb61759416991b32c-vnan | element-hq/element-web | element-hq/element-web | javascript | 650b9cb0cf9bb10674057e232f4792acf83f2e46 | # Title: Provide a way to read current window width from UI state
## Description
There is no simple way for components to know the current width of the window using the existing UI state system. Components that need to react to viewport size changes cannot easily get this value or be notified when it updates. This ma... | ## Requirements
- A new file must be created at `src/hooks/useWindowWidth.ts` exporting a React hook named `useWindowWidth`.
- The `useWindowWidth` hook must return the numeric value of `UIStore.instance.windowWidth` on first render.
- The hook must update its return value when `UIStore.instance.windowWidth` is chang... | diff --git a/src/components/structures/TabbedView.tsx b/src/components/structures/TabbedView.tsx
index c745d9cf5d9..ecbe7fa1813 100644
--- a/src/components/structures/TabbedView.tsx
+++ b/src/components/structures/TabbedView.tsx
@@ -24,6 +24,7 @@ import AutoHideScrollbar from "./AutoHideScrollbar";
import { PosthogScr... | diff --git a/test/hooks/useWindowWidth-test.ts b/test/hooks/useWindowWidth-test.ts
new file mode 100644
index 00000000000..bde91c2acb7
--- /dev/null
+++ b/test/hooks/useWindowWidth-test.ts
@@ -0,0 +1,44 @@
+/*
+Copyright 2024 The Matrix.org Foundation C.I.C.
+
+Licensed under the Apache License, Version 2.0 (the "Licen... | ["test/hooks/useWindowWidth-test.ts | useWindowWidth | should return the current width of window, according to UIStore", "test/hooks/useWindowWidth-test.ts | useWindowWidth | should update the value when UIStore's value changes"] | ["test/notifications/PushRuleVectorState-test.ts | contentRuleVectorStateKind | should understand normal notifications", "test/notifications/PushRuleVectorState-test.ts | contentRuleVectorStateKind | should handle loud notifications", "test/notifications/PushRuleVectorState-test.ts | contentRuleVectorStateKind | should... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_element-hq__element-web-72a8f8f03b1a01bb70ef8a5bb61759416991b32c-vnan | true | null | 2 | 51 | 2 | 1,010 | 0 | 0.95 | 1 | 0.7 | 1 | 0.338333 | 86.515 | |
826 | swe_gym::train::309 | swe_gym | train | 309 | getmoto__moto-6720 | getmoto/moto | getmoto/moto | python | 8ff53ff4178cb99d375b8844cf44c5ab44b140b1 | Secrets Manager: UpdateSecret without secret value breaks GetSecretValue
When `UpdateSecret` is called without `SecretBinary` and `SecretString`, it should only update secret metadata, but Moto incorrectly creates new version without any value in it:
```
$ aws --endpoint-url=http://127.0.0.1:5000 --region us-west-2 sec... | And looks like `CreateSecret` has the same issue. I don't know why you will need to create a secret without a value, but in AWS you can, and the result is secret without any version, where Moto creates version with no value.
Thanks for raising this @matshch, and welcome to Moto! | diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py
--- a/moto/secretsmanager/models.py
+++ b/moto/secretsmanager/models.py
@@ -61,12 +61,13 @@ def __init__(
account_id: str,
region_name: str,
secret_id: str,
+ secret_version: Dict[str, Any],
+ version_id:... | diff --git a/tests/test_secretsmanager/test_secretsmanager.py b/tests/test_secretsmanager/test_secretsmanager.py
--- a/tests/test_secretsmanager/test_secretsmanager.py
+++ b/tests/test_secretsmanager/test_secretsmanager.py
@@ -14,7 +14,7 @@
from moto import mock_secretsmanager, mock_lambda, settings
from moto.core im... | ["tests/test_secretsmanager/test_secretsmanager.py::test_update_secret_without_value", "tests/test_secretsmanager/test_secretsmanager.py::test_get_secret_version_that_does_not_exist", "tests/test_secretsmanager/test_secretsmanager.py::test_create_secret_without_value", "tests/test_secretsmanager/test_secretsmanager.py:... | ["tests/test_secretsmanager/test_secretsmanager.py::test_get_secret_that_has_no_value", "tests/test_secretsmanager/test_secretsmanager.py::test_get_secret_value_by_arn", "tests/test_secretsmanager/test_secretsmanager.py::test_update_secret_with_KmsKeyId", "tests/test_secretsmanager/test_secretsmanager.py::test_get_secr... | null | true | 2023-08-24 08:05:21 | 1 | 166 | 4 | 2,136 | 0 | 0.85 | 1 | 0.85 | 0.75 | 0.856 | 86.5055 | |
827 | swe_gym::train::1110 | swe_gym | train | 1,110 | pydantic__pydantic-8537 | pydantic/pydantic | pydantic/pydantic | python | 2e459bb563dbc296c2bcffbfd1a3caf21241b8e0 | JSON schema generation fails for `ByteSize` type and raises `core_schema.PlainValidatorFunctionSchema` error
### Discussed in https://github.com/pydantic/pydantic/discussions/8176
Using the latest Pydantic 2 version from git, this minimal example fails to generate a JSON schema:
```python
from pydantic import BaseMod... | @morian,
Thanks for bringing up this issue! This is a great first issue. We'll want to support a validation schema as a union of `int` and `str` types. I think we'll probably want to reference the bytes string regex constraint: `byte_string_re = re.compile(r'^\s*(\d*\.?\d+)\s*(\w+)?', re.IGNORECASE)` found in `types... | diff --git a/pydantic/types.py b/pydantic/types.py
--- a/pydantic/types.py
+++ b/pydantic/types.py
@@ -1710,37 +1710,6 @@ def validate_brand(card_number: str) -> PaymentCardBrand:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ BYTE SIZE TYPE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-BYTE_SIZES = {
- 'b': 1,
- 'kb': 10**3,
- 'mb... | 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
@@ -6,7 +6,14 @@
from datetime import date, datetime, time, timedelta
from decimal import Decimal
from enum import Enum, IntEnum
-from ipaddress import IPv4Address, IPv4Interface, IPv4Ne... | ["tests/test_types.py::test_bytesize_raises", "tests/test_json_schema.py::test_byte_size_type"] | ["tests/test_json_schema.py::test_ipv6network_type", "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_re... | null | true | 2024-01-11T20:12:01Z | 1 | 83 | 2 | 7,468 | 0 | 0.85 | 1 | 0.65 | 1 | 0.776667 | 86.505 | |
828 | swe_gym::train::281 | swe_gym | train | 281 | getmoto__moto-5701 | getmoto/moto | getmoto/moto | python | d6c438400eaf3e2c94eac0ea2043d230518fe50b | S3 access via spark shows "Path does not exist" after update
I've been using Spark to read data from S3 for a while and it always worked with the following (pyspark) configuration:
```
spark.read. \
.option('pathGlobFilter', f'*.json') \
.option('mode', 'FAILFAST') \
.format('json')
.read('s3://moto-bucket-79b... | My tests without changing code, just moto versions:
- moto 2.2.9 -> works fine
- moto 2.3.2 -> works fine
- moto 3.0.7 -> works fine
- moto 3.1.0 -> works fine
- moto 3.1.18 -> Fail: Path does not exist
- moto 4.0.9 -> Fail: Path does not exist
I will try checking versions from 3.1.1 to 3.1.18. Being a minor v... | diff --git a/moto/s3/responses.py b/moto/s3/responses.py
--- a/moto/s3/responses.py
+++ b/moto/s3/responses.py
@@ -261,7 +261,7 @@ def _send_response(response):
return status_code, headers, response_content
def _bucket_response(self, request, full_url):
- querystring = self._get_querystring(f... | diff --git a/tests/test_s3/test_s3.py b/tests/test_s3/test_s3.py
--- a/tests/test_s3/test_s3.py
+++ b/tests/test_s3/test_s3.py
@@ -3285,7 +3285,9 @@ def test_upload_data_without_content_type():
@mock_s3
-@pytest.mark.parametrize("prefix", ["file", "file+else", "file&another"])
+@pytest.mark.parametrize(
+ "pref... | ["tests/test_s3/test_server.py::test_s3_server_bucket_create[baz"] | ["tests/test_s3/test_s3.py::test_head_object_if_modified_since_refresh", "tests/test_s3/test_s3.py::test_put_bucket_notification", "tests/test_s3/test_s3.py::test_get_bucket_cors", "tests/test_s3/test_s3.py::test_get_object", "tests/test_s3/test_s3.py::test_create_bucket_duplicate", "tests/test_s3/test_server.py::test_... | null | true | 2022-11-22 21:11:48 | 1 | 14 | 1 | 1,514 | 0 | 0.85 | 1 | 0.7 | 1 | 0.299 | 86.497 | |
829 | swe_gym::train::633 | swe_gym | train | 633 | conan-io__conan-14254 | conan-io/conan | conan-io/conan | python | 64ab9e767c24a96847b3c180b0b0308a553c5032 | [bug] conan upload --list errors on empty recipe list
### Environment details
* Operating System+version:
Manjaro Linux 23.0.0
* Compiler+version:
N/A
* Conan version:
Conan version 2.0.7
* Python version:
Python 3.11.3
### Steps to reproduce
1. Create a list file as follows (can be generated from something like ... | Hi @n-morales, thanks a lot for your report and taking the time to diagnose the error!
What you describe seems like a valid use case to me, if you would like to contribute a PR now that you have checked the code, we can discuss it there, but no worries if not :)
(I can't promise it would get merged if the team thin... | diff --git a/conan/cli/commands/upload.py b/conan/cli/commands/upload.py
--- a/conan/cli/commands/upload.py
+++ b/conan/cli/commands/upload.py
@@ -1,6 +1,6 @@
from conan.api.conan_api import ConanAPI
from conan.api.model import ListPattern, MultiPackagesList
-from conan.api.output import cli_out_write
+from conan.api... | diff --git a/conans/test/integration/command/upload/upload_test.py b/conans/test/integration/command/upload/upload_test.py
--- a/conans/test/integration/command/upload/upload_test.py
+++ b/conans/test/integration/command/upload/upload_test.py
@@ -99,6 +99,12 @@ def test_pattern_upload(self):
assert "Uploading ... | ["conans/test/integration/command_v2/test_combined_pkglist_flows.py::TestListUpload::test_list_upload_empty_list"] | ["conans/test/integration/command_v2/test_combined_pkglist_flows.py::TestDownloadUpload::test_download_upload_only_recipes[True]", "conans/test/integration/command/upload/upload_test.py::UploadTest::test_upload_login_prompt_disabled_user_authenticated", "conans/test/integration/command/upload/upload_test.py::UploadTest... | null | true | 2023-07-08T20:56:47Z | 1 | 38 | 1 | 1,020 | 0 | 0.85 | 1 | 0.7 | 1 | 0.296667 | 86.49 | |
830 | swe_gym::train::370 | swe_gym | train | 370 | python__mypy-14038 | python/mypy | python/mypy | python | 7465abd3d2fe4211a8aaa9453b402fea60071561 | mypy 0.990 crashes with segmentation fault on `hydra_zen` due to recursive types
**Crash Report**
Upgrading from mypy 0.982 to 0.990 leads to a segmentation fault when I run on a file that merely imports [hydra_zen](https://github.com/mit-ll-responsible-ai/hydra-zen):
```python
import hydra_zen
```
This appears to ... | cc @ilevkivskyi
Hm, I have a possible fix for this
```diff
--- a/mypy/constraints.py
+++ b/mypy/constraints.py
@@ -177,7 +177,7 @@ def infer_constraints(template: Type, actual: Type, direction: int) -> list[Cons
for (t, a) in reversed(TypeState.inferring)
):
return []
- if has_recursi... | diff --git a/mypy/constraints.py b/mypy/constraints.py
--- a/mypy/constraints.py
+++ b/mypy/constraints.py
@@ -177,8 +177,9 @@ def infer_constraints(template: Type, actual: Type, direction: int) -> list[Cons
for (t, a) in reversed(TypeState.inferring)
):
return []
- if has_recursive_types(temp... | diff --git a/test-data/unit/check-recursive-types.test b/test-data/unit/check-recursive-types.test
--- a/test-data/unit/check-recursive-types.test
+++ b/test-data/unit/check-recursive-types.test
@@ -826,3 +826,14 @@ z = z
x = y # E: Incompatible types in assignment (expression has type "L", variable has type "K")
z ... | ["mypy/test/testcheck.py::TypeCheckSuite::check-recursive-types.test::testRecursiveInstanceInferenceNoCrash"] | [] | null | true | 2022-11-08T14:04:16Z | 2 | 9 | 1 | 1,594 | 0 | 0.85 | 1 | 0.7 | 1 | 0.295667 | 86.487 | |
831 | swe_gym::train::330 | swe_gym | train | 330 | getmoto__moto-5997 | getmoto/moto | getmoto/moto | python | 0f93cd24c878b98f9beb5c4f76d094d3e4f6b8bf | [DynamoDb] All Errors are deserialized as DynamoDbException in JAVA SDK
Using MotoServer to test Java based services. This Service creates the DynamoDb table if it doesn't exist, ie, on ResourceNotFoundException, table is created.
When using the MotoServer, We get response
```json
{"__type": "com.amazonaws.dynamodb.v2... | Thanks for raising this @munendrasn - marking it as a bug.
#5012 was an attempt to streamline all error messages - but because we only fully test against the Python SDK, which is more forgiving, we never realized it was broken. Will raise a PR shortly. | diff --git a/moto/dynamodb/exceptions.py b/moto/dynamodb/exceptions.py
--- a/moto/dynamodb/exceptions.py
+++ b/moto/dynamodb/exceptions.py
@@ -4,12 +4,15 @@
from moto.dynamodb.limits import HASH_KEY_MAX_LENGTH, RANGE_KEY_MAX_LENGTH
+ERROR_TYPE_PREFIX = "com.amazonaws.dynamodb.v20120810#"
+
+
class DynamodbExcepti... | diff --git a/tests/test_dynamodb/test_dynamodb.py b/tests/test_dynamodb/test_dynamodb.py
--- a/tests/test_dynamodb/test_dynamodb.py
+++ b/tests/test_dynamodb/test_dynamodb.py
@@ -66,7 +66,9 @@ def test_describe_missing_table_boto3():
conn.describe_table(TableName="messages")
ex.value.response["Error"]["Co... | ["tests/test_dynamodb/test_server.py::test_table_list", "tests/test_dynamodb/test_dynamodb.py::test_describe_missing_table_boto3"] | ["tests/test_dynamodb/test_dynamodb.py::test_remove_list_index__remove_existing_nested_index", "tests/test_dynamodb/test_dynamodb.py::test_basic_projection_expressions_using_query_with_attr_expression_names", "tests/test_dynamodb/test_dynamodb.py::test_transact_write_items_put_conditional_expressions_return_values_on_c... | null | true | 2023-02-27 21:26:02 | 2 | 34 | 2 | 1,093 | 0 | 0.85 | 1 | 0.7 | 1 | 0.2955 | 86.4865 | |
832 | swe_gym::train::619 | swe_gym | train | 619 | conan-io__conan-14164 | conan-io/conan | conan-io/conan | python | 2dedf0e3238f96da41680b44fbf80e5054cf047d | [bug] Conan mishandles cache path in symlinked homedir
### Environment details
* Operating System+version: Red Hat Enterprise Linux 7
* Conan version: 2.0.6
* Python version: 3.8.3
### Steps to reproduce
At my site, home directories are mounted on a typical Unix system using a combination of an automounter and symli... | Hi @iskunk
Thanks for your report.
I have been having a look to the relevant source code and comparing it with Conan 1.X implementation, and it seems that the proposed fix might be ok, so feel free to submit it (please also test it thoroughly in your setup if possible). Thanks for offering to contribute!
| diff --git a/conan/internal/cache/cache.py b/conan/internal/cache/cache.py
--- a/conan/internal/cache/cache.py
+++ b/conan/internal/cache/cache.py
@@ -17,7 +17,7 @@
class DataCache:
def __init__(self, base_folder, db_filename):
- self._base_folder = os.path.realpath(base_folder)
+ self._base_folde... | diff --git a/conans/test/integration/configuration/test_custom_symlinked_home.py b/conans/test/integration/configuration/test_custom_symlinked_home.py
new file mode 100644
--- /dev/null
+++ b/conans/test/integration/configuration/test_custom_symlinked_home.py
@@ -0,0 +1,28 @@
+import os
+import platform
+
+import pytes... | ["conans/test/integration/configuration/test_custom_symlinked_home.py::test_custom_symlinked_home"] | [] | null | true | 2023-06-23T19:40:10Z | 1 | 20 | 1 | 1,369 | 0 | 0.85 | 1 | 0.7 | 1 | 0.294833 | 86.4845 | |
833 | swe_bench_pro::test::377 | swe_bench_pro | test | 377 | instance_internetarchive__openlibrary-03095f2680f7516fca35a58e665bf2a41f006273-v8717e18970bcdc4e0d2cea3b1527752b21e74866 | internetarchive/openlibrary | internetarchive/openlibrary | python | 46bcf7c30178f53ef427a5840c4b24717ed79fb0 | # Fix source work not reindexed in `Solr` when moving editions.
## Problem
When moving an edition from a source work to another, the source work is not reindexed in `Solr`, causing the moved edition to continue appearing in search results and on the original work’s page.
## Reproducing the bug
1. Move an edition fr... | ## Requirements
- `find_keys(d)` must yield, in traversal order, every string value stored under a `'key'` field at any nesting depth within a `dict` or `list`, and must not recurse into or emit values for other data types.
- For both `'save'` and `'save_many'` actions, `parse_log` must yield exactly one key per docume... | diff --git a/scripts/new-solr-updater.py b/scripts/new-solr-updater.py
index 6c6b5a41ff8..14c446719a6 100755
--- a/scripts/new-solr-updater.py
+++ b/scripts/new-solr-updater.py
@@ -6,6 +6,7 @@
2013-02-25: First version
2018-02-11: Use newer config method
"""
+from typing import Iterator, Union
import _init_path
... | diff --git a/scripts/tests/test_new_solr_updater.py b/scripts/tests/test_new_solr_updater.py
new file mode 100644
index 00000000000..d5ca14b26f0
--- /dev/null
+++ b/scripts/tests/test_new_solr_updater.py
@@ -0,0 +1,277 @@
+from importlib import import_module
+import sys
+from unittest.mock import MagicMock
+
+# TODO: C... | ["scripts/tests/test_new_solr_updater.py::TestParseLog::test_action_save", "scripts/tests/test_new_solr_updater.py::TestParseLog::test_move_edition"] | ["scripts/tests/test_new_solr_updater.py::TestParseLog::test_new_account"] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-03095f2680f7516fca35a58e665bf2a41f006273-v8717e18970bcdc4e0d2cea3b1527752b21e74866 | true | null | 1 | 53 | 2 | 906 | 0 | 0.95 | 1 | 0.7 | 1 | 0.327667 | 86.483 | |
834 | swe_bench_pro::test::239 | swe_bench_pro | test | 239 | instance_flipt-io__flipt-e594593dae52badf80ffd27878d2275c7f0b20e9 | flipt-io/flipt | flipt-io/flipt | go | f9855c1e6110ab7ff24d3d278229a45776e891ae | # **Validator errors do not report accurate line numbers when using extended CUE schemas**
### Bug Description
When using schema extensions with Flipt's CUE-based validator, error messages do not include accurate line-level information within the source YAML. In cases such as missing `description` fields, the validat... | ## Requirements
- The `FeaturesValidator` must support applying additional CUE schema extensions to validate optional fields and constraints beyond the base feature schema.
- When validation errors occur, each returned `cue.Error.Location.Line` must correspond to the actual location of the problematic field or value i... | diff --git a/internal/cue/extended.cue b/internal/cue/extended.cue
new file mode 100644
index 0000000000..abf668a048
--- /dev/null
+++ b/internal/cue/extended.cue
@@ -0,0 +1,3 @@
+#Flag: {
+ description: =~"^.+$"
+}
\ No newline at end of file
diff --git a/internal/cue/validate.go b/internal/cue/validate.go
index 70214... | diff --git a/internal/cue/validate_fuzz_test.go b/internal/cue/validate_fuzz_test.go
index 59ede7b96c..32ea75121a 100644
--- a/internal/cue/validate_fuzz_test.go
+++ b/internal/cue/validate_fuzz_test.go
@@ -10,7 +10,7 @@ import (
)
func FuzzValidate(f *testing.F) {
- testcases := []string{"testdata/valid.yml", "tes... | ["TestValidate_Extended"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_flipt-io__flipt-e594593dae52badf80ffd27878d2275c7f0b20e9 | true | null | 2 | 34 | 1 | 1,280 | 0 | 0.95 | 1 | 0.7 | 1 | 0.326667 | 86.48 | |
835 | swe_bench_pro::test::435 | swe_bench_pro | test | 435 | instance_internetarchive__openlibrary-b4f7c185ae5f1824ac7f3a18e8adf6a4b468459c-v08d8e8889ec945ab821fb156c04c7d2e2810debb | internetarchive/openlibrary | internetarchive/openlibrary | python | 0b2e93f2d150770f6ecbfd1931ef56ad876d2c4c | #Title: Inconsistent return type of `update_key` in Solr updaters
# Description:
The methods `update_key` in the Solr updaters do not consistently return the expected structure. Instead of providing both the update object and the list of new keys, they return only a `SolrUpdateRequest`. This inconsistency causes a `T... | ## Requirements
- The `update_key` method of the `AuthorSolrUpdater` class should return a tuple `(SolrUpdateRequest, list[str])`, where the first element is a `SolrUpdateRequest` object and the second is a list of new keys.
- The `update_key` method of the `WorkSolrUpdater` class should return a tuple `(SolrUpdateReq... | diff --git a/openlibrary/solr/update_work.py b/openlibrary/solr/update_work.py
index f8cc5bba683..2de793f317e 100644
--- a/openlibrary/solr/update_work.py
+++ b/openlibrary/solr/update_work.py
@@ -1128,7 +1128,10 @@ def key_test(self, key: str) -> bool:
async def preload_keys(self, keys: Iterable[str]):
a... | diff --git a/openlibrary/tests/solr/test_update_work.py b/openlibrary/tests/solr/test_update_work.py
index 918e5d9592e..cca162a901b 100644
--- a/openlibrary/tests/solr/test_update_work.py
+++ b/openlibrary/tests/solr/test_update_work.py
@@ -551,7 +551,7 @@ async def get(self, url, params):
)
... | ["openlibrary/tests/solr/test_update_work.py::TestAuthorUpdater::test_workless_author", "openlibrary/tests/solr/test_update_work.py::TestWorkSolrUpdater::test_no_title", "openlibrary/tests/solr/test_update_work.py::TestWorkSolrUpdater::test_work_no_title"] | ["openlibrary/tests/solr/test_update_work.py::Test_build_data::test_simple_work", "openlibrary/tests/solr/test_update_work.py::Test_build_data::test_edition_count_when_editions_on_work", "openlibrary/tests/solr/test_update_work.py::Test_build_data::test_edition_count_when_editions_in_data_provider", "openlibrary/tests/... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-b4f7c185ae5f1824ac7f3a18e8adf6a4b468459c-v08d8e8889ec945ab821fb156c04c7d2e2810debb | true | null | 2 | 41 | 3 | 1,101 | 0 | 0.95 | 1 | 0.7 | 1 | 0.320167 | 86.4605 | |
836 | swe_gym::train::997 | swe_gym | train | 997 | dask__dask-10211 | dask/dask | dask/dask | python | e9845aadc7c32078e55354b61f5626ac759e8b28 | Error when computing a cloned graph from xarray.open_dataset
**Describe the issue**:
After opening a data array from xarray and cloning the underlying dask array, I receive a `TypeError: string indices must be integers` when running `compute()`.
**Minimal Complete Verifiable Example**:
```python
import dask.graph_ma... | Thanks for the reproducer. I see this locally with the more recent versions:
```
dask.__version__='2022.10.0'
np.__version__='1.23.4'
xr.__version__='2022.10.0'
```
<details><summary>Full trace back:</summary><pre>
2022-11-03 10:54:08,483 - distributed.worker - WARNING - Compute Failed
Key: ('open_dat... | diff --git a/dask/array/blockwise.py b/dask/array/blockwise.py
--- a/dask/array/blockwise.py
+++ b/dask/array/blockwise.py
@@ -38,7 +38,8 @@ def blockwise(
out_ind : iterable
Block pattern of the output, something like 'ijk' or (1, 2, 3)
*args : sequence of Array, index pairs
- Sequence like (... | diff --git a/dask/tests/test_graph_manipulation.py b/dask/tests/test_graph_manipulation.py
--- a/dask/tests/test_graph_manipulation.py
+++ b/dask/tests/test_graph_manipulation.py
@@ -17,6 +17,7 @@
da = import_or_none("dask.array")
dd = import_or_none("dask.dataframe")
pd = import_or_none("pandas")
+zarr = import_or_... | ["dask/tests/test_graph_manipulation.py::test_blockwise_clone_with_no_indices"] | ["dask/tests/test_graph_manipulation.py::test_bind[True]", "dask/tests/test_graph_manipulation.py::test_blockwise_clone_with_literals[1]", "dask/tests/test_graph_manipulation.py::test_split_every_invalid", "dask/tests/test_graph_manipulation.py::test_blockwise_clone_with_literals[literal2]", "dask/tests/test_graph_mani... | null | true | 2023-04-22T17:40:51Z | 2 | 12 | 1 | 1,480 | 0 | 0.85 | 1 | 0.7 | 1 | 0.286667 | 86.46 | |
837 | swe_bench_pro::test::432 | swe_bench_pro | test | 432 | instance_internetarchive__openlibrary-9cd47f4dc21e273320d9e30d889c864f8cb20ccf-v0f5aece3601a5b4419f7ccec1dbda2071be28ee4 | internetarchive/openlibrary | internetarchive/openlibrary | python | 7fab050b6a99923d9d2efcc2f79311580b88f8a9 | ## Title: Book import may hang or timeout when processing cover images from unsupported hosts
## Description
**Label:** Bug
**Problem**
When importing books using the `load()` function (such as through `/isbn` or `/api/import`), any 'cover' URLs from unsupported hosts may cause the import process to hang or timeout... | ## Requirements
- The import logic for book records must only process 'cover' URLs whose host matches an entry in the constant `ALLOWED_COVER_HOSTS`.
- Hostname comparison for 'cover' URLs must be case-insensitive and must accept both HTTP and HTTPS protocols.
- If the 'cover' field exists in an edition dictionary an... | diff --git a/openlibrary/catalog/add_book/__init__.py b/openlibrary/catalog/add_book/__init__.py
index 95b63fea16c..35eeebdfea1 100644
--- a/openlibrary/catalog/add_book/__init__.py
+++ b/openlibrary/catalog/add_book/__init__.py
@@ -26,9 +26,11 @@
import itertools
import re
from collections import defaultdict
+from ... | diff --git a/openlibrary/catalog/add_book/tests/test_add_book.py b/openlibrary/catalog/add_book/tests/test_add_book.py
index 41522712c48..8e37ba0bca6 100644
--- a/openlibrary/catalog/add_book/tests/test_add_book.py
+++ b/openlibrary/catalog/add_book/tests/test_add_book.py
@@ -7,6 +7,7 @@
from infogami.infobase.core im... | ["openlibrary/catalog/add_book/tests/test_add_book.py::test_process_cover_url[edition0-None-expected_edition0]", "openlibrary/catalog/add_book/tests/test_add_book.py::test_process_cover_url[edition1-None-expected_edition1]", "openlibrary/catalog/add_book/tests/test_add_book.py::test_process_cover_url[edition2-https://m... | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-9cd47f4dc21e273320d9e30d889c864f8cb20ccf-v0f5aece3601a5b4419f7ccec1dbda2071be28ee4 | true | null | 1 | 35 | 6 | 1,216 | 0 | 0.95 | 1 | 0.7 | 1 | 0.319333 | 86.458 | |
838 | swe_gym::train::329 | swe_gym | train | 329 | getmoto__moto-6408 | getmoto/moto | getmoto/moto | python | 1dfbeed5a72a4bd57361e44441d0d06af6a2e58a | Regression in 4.1.11 handling of image tags in ECR model
Version 4.1.11 introduced a regression in ECR image handling in the case where you are calling put_image with:
* A tag which already exists
* Pointing to an image with multiple tags
Reproduction code:
```python
@mock_ecr
def test_4111_move_image_tag_regression()... | Thanks for raising this @zellio - looks like this was introduced with #6342. When creating images, we don't correctly search if the tag exists in images with multiple tags, and we also do not re-assign/remove the tag if it exists in an existing manifest.
Will raise a PR shortly. | diff --git a/moto/ecr/models.py b/moto/ecr/models.py
--- a/moto/ecr/models.py
+++ b/moto/ecr/models.py
@@ -581,7 +581,7 @@ def put_image(
try:
existing_images_with_matching_tag = list(
filter(
- lambda x: x.response_object["imageTag"] == image_tag,
+ ... | diff --git a/tests/test_ecr/test_ecr_boto3.py b/tests/test_ecr/test_ecr_boto3.py
--- a/tests/test_ecr/test_ecr_boto3.py
+++ b/tests/test_ecr/test_ecr_boto3.py
@@ -581,6 +581,55 @@ def test_put_same_image_with_same_tag():
images.should.have.length_of(1)
+@mock_ecr
+def test_multiple_tags__ensure_tags_exist_only... | ["tests/test_ecr/test_ecr_boto3.py::test_multiple_tags__ensure_tags_exist_only_on_one_image"] | ["tests/test_ecr/test_ecr_boto3.py::test_delete_repository_with_force", "tests/test_ecr/test_ecr_boto3.py::test_start_image_scan_error_repo_not_exists", "tests/test_ecr/test_ecr_boto3.py::test_get_lifecycle_policy", "tests/test_ecr/test_ecr_boto3.py::test_create_repository_with_non_default_config", "tests/test_ecr/test... | null | true | 2023-06-14 19:16:03 | 1 | 7 | 1 | 1,574 | 0 | 0.85 | 1 | 0.7 | 1 | 0.285667 | 86.457 | |
839 | swe_gym::train::828 | swe_gym | train | 828 | iterative__dvc-5004 | iterative/dvc | iterative/dvc | python | 7c45711e34f565330be416621037f983d0034bef | Boolean value might get unnecessarily uppercased
## Bug Report
Python uses `True`/`False` as boolean values, while in other languages it might not be the case (Julia uses `true`/`false`).
It seems that the correct behavior is `dvc` faithfully stores the params as strings, and only does type conversion (str -> bool/in... | Here , the boolean value true and false should follow neither `python` nor `julia` but the `yaml` format or the `json` format, it is a bug I think.
The thing here is what boolean means on the shell context. So, the use of boolean is kind of undefined behaviour, though there's nothing wrong in making it return `false` o... | diff --git a/dvc/parsing/interpolate.py b/dvc/parsing/interpolate.py
--- a/dvc/parsing/interpolate.py
+++ b/dvc/parsing/interpolate.py
@@ -1,5 +1,6 @@
import re
import typing
+from functools import singledispatch
from pyparsing import (
CharsNotIn,
@@ -57,6 +58,16 @@ def format_and_raise_parse_error(exc):
... | diff --git a/tests/func/test_stage_resolver.py b/tests/func/test_stage_resolver.py
--- a/tests/func/test_stage_resolver.py
+++ b/tests/func/test_stage_resolver.py
@@ -337,12 +337,16 @@ def test_set(tmp_dir, dvc, value):
}
}
resolver = DataResolver(dvc, PathInfo(str(tmp_dir)), d)
+ if isinstance(va... | ["tests/func/test_stage_resolver.py::test_set[True]", "tests/func/test_stage_resolver.py::test_set[False]", "tests/unit/test_context.py::test_resolve_resolves_boolean_value"] | ["tests/unit/test_context.py::test_select", "tests/unit/test_context.py::test_context_list", "tests/unit/test_context.py::test_merge_list", "tests/func/test_stage_resolver.py::test_set[To", "tests/unit/test_context.py::test_track", "tests/func/test_stage_resolver.py::test_set[value]", "tests/func/test_stage_resolver.py... | null | true | 2020-12-01T09:44:12Z | 1 | 13 | 3 | 1,442 | 0 | 0.85 | 1 | 0.7 | 1 | 0.283667 | 86.451 | |
840 | swe_bench_pro::test::460 | swe_bench_pro | test | 460 | instance_navidrome__navidrome-09ae41a2da66264c60ef307882362d2e2d8d8b89 | navidrome/navidrome | navidrome/navidrome | go | 70487a09f4e202dce34b3d0253137f25402495d4 | # Title:
Authentication Bypass Vulnerability in Subsonic API
## Description:
A security vulnerability exists in the Subsonic API authentication system that allows requests with invalid credentials to bypass proper authentication validation.
## Current Behavior:
The Subsonic API authentication middleware does not cons... | ## Requirements
- The Subsonic API authentication system properly validates all authentication attempts and rejects invalid credentials.
- Failed authentication attempts return appropriate Subsonic error responses with code 40.
- The authentication middleware consistently blocks unauthorized requests from proceeding ... | diff --git a/persistence/user_repository.go b/persistence/user_repository.go
index cdd015c827c..073e3296363 100644
--- a/persistence/user_repository.go
+++ b/persistence/user_repository.go
@@ -50,14 +50,20 @@ func (r *userRepository) Get(id string) (*model.User, error) {
sel := r.newSelect().Columns("*").Where(Eq{"id... | diff --git a/server/subsonic/middlewares_test.go b/server/subsonic/middlewares_test.go
index ea5f75186f9..3fe577fad9a 100644
--- a/server/subsonic/middlewares_test.go
+++ b/server/subsonic/middlewares_test.go
@@ -2,13 +2,16 @@ package subsonic
import (
"context"
+ "crypto/md5"
"errors"
+ "fmt"
"net/http"
"ne... | ["TestSubsonicApi"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-09ae41a2da66264c60ef307882362d2e2d8d8b89 | true | null | 3 | 43 | 1 | 1,032 | 0 | 0.95 | 1 | 0.7 | 1 | 0.315333 | 86.446 | |
841 | swe_bench_pro::test::105 | swe_bench_pro | test | 105 | instance_ansible__ansible-d9f1866249756efc264b00ff7497e92c11a9885f-v0f01c69f1e2528b935359cfe578530722bca2c59 | ansible/ansible | ansible/ansible | python | 59ca05b70994b07a9507f61a0871146a4991b262 | ## Title: Make `check_type_dict` parse dictionary inputs deterministically without evaluation
#### Description:
In `module_utils / validation`, `check_type_dict` may fall back to evaluation behavior when JSON parsing of a string input fails. Relying on evaluation to turn user-provided strings into dictionaries introd... | ## Requirements
- The function `check_type_dict` in `ansible.module_utils.common.validation` should accept a value that is already a dictionary and return it unchanged.
- The function `check_type_dict` should parse string input deterministically: when the value looks like a JSON object it should first be parsed with `... | diff --git a/changelogs/fragments/deprecate-safe-evals.yml b/changelogs/fragments/deprecate-safe-evals.yml
new file mode 100644
index 00000000000000..9aea56f67b7473
--- /dev/null
+++ b/changelogs/fragments/deprecate-safe-evals.yml
@@ -0,0 +1,2 @@
+deprecated_features:
+ - Deprecate ``ansible.module_utils.basic.Ansible... | diff --git a/test/units/module_utils/common/validation/test_check_type_dict.py b/test/units/module_utils/common/validation/test_check_type_dict.py
index 665224e4efa052..ac965895d697bb 100644
--- a/test/units/module_utils/common/validation/test_check_type_dict.py
+++ b/test/units/module_utils/common/validation/test_chec... | ["test/units/module_utils/common/validation/test_check_type_dict.py::test_check_type_dict_fail"] | ["test/units/module_utils/common/validation/test_check_type_dict.py::test_check_type_dict"] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-d9f1866249756efc264b00ff7497e92c11a9885f-v0f01c69f1e2528b935359cfe578530722bca2c59 | true | null | 3 | 28 | 1 | 1,314 | 0 | 0.95 | 1 | 0.7 | 1 | 0.312333 | 86.437 | |
842 | swe_bench_verified::test::277 | swe_bench_verified | test | 277 | matplotlib__matplotlib-25311 | matplotlib/matplotlib | matplotlib/matplotlib | python | 430fb1db88843300fb4baae3edc499bbfe073b0c | [Bug]: Unable to pickle figure with draggable legend
### Bug summary
I am unable to pickle figure with draggable legend. Same error comes for draggable annotations.
### Code for reproduction
```python
import matplotlib.pyplot as plt
import pickle
fig = plt.figure()
ax = fig.add_subplot(111)
time=[0,1,2,3,4]
speed=... | diff --git a/lib/matplotlib/offsetbox.py b/lib/matplotlib/offsetbox.py
--- a/lib/matplotlib/offsetbox.py
+++ b/lib/matplotlib/offsetbox.py
@@ -1505,7 +1505,6 @@ def __init__(self, ref_artist, use_blit=False):
if not ref_artist.pickable():
ref_artist.set_picker(True)
self.got_artist = Fals... | diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py
--- a/lib/matplotlib/tests/test_pickle.py
+++ b/lib/matplotlib/tests/test_pickle.py
@@ -1,6 +1,7 @@
from io import BytesIO
import ast
import pickle
+import pickletools
import numpy as np
import pytest
@@ -88,6 +89,7 @@ def _ge... | ["lib/matplotlib/tests/test_pickle.py::test_complete[png]"] | ["lib/matplotlib/tests/test_pickle.py::test_simple", "lib/matplotlib/tests/test_pickle.py::test_gcf", "lib/matplotlib/tests/test_pickle.py::test_no_pyplot", "lib/matplotlib/tests/test_pickle.py::test_renderer", "lib/matplotlib/tests/test_pickle.py::test_image", "lib/matplotlib/tests/test_pickle.py::test_polar", "lib/ma... | null | true | 2023-02-23T21:04:12Z | 1 | 4 | 1 | 837 | 0 | 1 | 1 | 0.85 | 0.8 | 0.152833 | 86.4335 | ||
843 | swe_bench_pro::test::159 | swe_bench_pro | test | 159 | instance_element-hq__element-web-ce554276db97b9969073369fefa4950ca8e54f84-vnan | element-hq/element-web | element-hq/element-web | javascript | 16e92a4d8cb66c10c46eb9d94d9e2b82d612108a | ## Title:
"Go live" control and device selection not consistently validated in pre-recording view
#### Description:
In the voice broadcast pre-recording view, the interface provides a “Go live” action and the ability to select an input device. Current validations only ensure these controls appear and can be activate... | ## Requirements
- Maintain a React component `VoiceBroadcastPreRecordingPip` that renders a primary action control with accessible role `button` and visible label “Go live”, and a header area exposing a close control and a microphone/device line.
- Ensure that invoking the “Go live” control performs exactly one call t... | diff --git a/src/voice-broadcast/components/molecules/VoiceBroadcastPreRecordingPip.tsx b/src/voice-broadcast/components/molecules/VoiceBroadcastPreRecordingPip.tsx
index c722df8c5cc..9b8ed0529f8 100644
--- a/src/voice-broadcast/components/molecules/VoiceBroadcastPreRecordingPip.tsx
+++ b/src/voice-broadcast/components... | diff --git a/test/voice-broadcast/components/molecules/VoiceBroadcastPreRecordingPip-test.tsx b/test/voice-broadcast/components/molecules/VoiceBroadcastPreRecordingPip-test.tsx
index 8a8d57278bd..96b3c8c7747 100644
--- a/test/voice-broadcast/components/molecules/VoiceBroadcastPreRecordingPip-test.tsx
+++ b/test/voice-b... | ["test/voice-broadcast/components/molecules/VoiceBroadcastPreRecordingPip-test.tsx | and double clicking \u00bbGo live\u00ab | should call start once", "test/voice-broadcast/components/molecules/VoiceBroadcastPreRecordingPip-test.tsx | and clicking the room name | should show the broadcast room", "test/voice-broadcast/... | ["test/settings/controllers/IncompatibleController-test.ts | when incompatibleValue is not set | returns true when setting value is true", "test/settings/controllers/IncompatibleController-test.ts | when incompatibleValue is not set | returns false when setting value is not true", "test/settings/controllers/Incompatibl... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_element-hq__element-web-ce554276db97b9969073369fefa4950ca8e54f84-vnan | true | null | 1 | 33 | 6 | 1,204 | 0 | 0.95 | 1 | 0.7 | 1 | 0.310667 | 86.432 | |
844 | swe_bench_pro::test::331 | swe_bench_pro | test | 331 | instance_gravitational__teleport-46a13210519461c7cec8d643bfbe750265775b41 | gravitational/teleport | gravitational/teleport | go | 63da43245e2cf491cb48fb4ee3278395930d4d97 | **Title: `tctl auth sign --format=kubernetes` uses incorrect port from proxy public address**
**Description**
**Label:** Bug Report
When generating a kubeconfig with `tctl auth sign --format=kubernetes`, the tool selects the proxy’s public address and port directly. This can result in using the generic proxy port (s... | ## Requirements
- The `ProxyConfig` struct must provide a `KubeAddr()` method that returns the Kubernetes proxy address as a URL string in the format `https://<host>:<port>`, where `<port>` is the default Kubernetes proxy port (3026).
- The `KubeAddr()` method must return an error if the `Kube.Enabled` field in the co... | diff --git a/lib/service/cfg.go b/lib/service/cfg.go
index 7285e1ed6b8f3..7c2ca42b0b266 100644
--- a/lib/service/cfg.go
+++ b/lib/service/cfg.go
@@ -347,12 +347,27 @@ type ProxyConfig struct {
Kube KubeProxyConfig
}
+func (c ProxyConfig) KubeAddr() (string, error) {
+ if !c.Kube.Enabled {
+ return "", trace.NotFo... | diff --git a/tool/tctl/common/auth_command_test.go b/tool/tctl/common/auth_command_test.go
index 4e02a909aabf3..1b19c1bc92d70 100644
--- a/tool/tctl/common/auth_command_test.go
+++ b/tool/tctl/common/auth_command_test.go
@@ -12,10 +12,14 @@ import (
"github.com/gravitational/teleport/lib/auth/proto"
"github.com/gra... | ["TestAuthSignKubeconfig", "TestAuthSignKubeconfig/k8s_proxy_running_locally_with_public_addr", "TestAuthSignKubeconfig/k8s_proxy_running_locally_without_public_addr", "TestAuthSignKubeconfig/k8s_proxy_from_cluster_info"] | ["TestAuthSignKubeconfig/--proxy_specified"] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-46a13210519461c7cec8d643bfbe750265775b41 | true | null | 2 | 38 | 4 | 1,104 | 0 | 0.95 | 1 | 0.7 | 1 | 0.310667 | 86.432 | |
845 | swe_bench_pro::test::20 | swe_bench_pro | test | 20 | instance_NodeBB__NodeBB-82562bec444940608052f3e4149e0c61ec80bf3f-vd59a5728dfc977f44533186ace531248c2917516 | NodeBB/NodeBB | nodebb/nodebb | javascript | 779c73eadea5d4246a60ab60486d5e49164884db | ## Title: Upvoter list can be fetched without required read privileges
## Problem
The server method that returns a post’s upvoters (`getUpvoters`) exposes upvoter information even when the requesting user lacks permission to read the topic/category containing that post. This allows non-privileged users (e.g., guests)... | ## Requirements
- `SocketPosts.getUpvoters` must enforce read access control for non-administrator callers: the caller must have `topics:read` permission on the category associated with a supplied post ID in order to receive upvoter data.
- If the caller lacks `topics:read` on the relevant category for a supplied post... | diff --git a/public/src/client/topic/votes.js b/public/src/client/topic/votes.js
index 6f4c62449203..7a5920742b9f 100644
--- a/public/src/client/topic/votes.js
+++ b/public/src/client/topic/votes.js
@@ -50,6 +50,7 @@ define('forum/topic/votes', [
el.attr('title', title);
(new bootstrap.Tooltip(el, {
contai... | diff --git a/test/posts.js b/test/posts.js
index ef4069ec8179..8b3cc947e25f 100644
--- a/test/posts.js
+++ b/test/posts.js
@@ -216,6 +216,14 @@ describe('Post\'s', () => {
});
});
+ it('should fail to get upvoters if user does not have read privilege', async () => {
+ await privileges.categories.rescind(['g... | ["test/posts.js | Post's voting should fail to get upvoters if user does not have read privilege"] | ["test/posts.js | Post's should update category teaser properly", "test/posts.js | Post's should change owner of post and topic properly", "test/posts.js | Post's should fail to change owner if new owner does not exist", "test/posts.js | Post's should fail to change owner if user is not authorized", "test/posts.js | Po... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_NodeBB__NodeBB-82562bec444940608052f3e4149e0c61ec80bf3f-vd59a5728dfc977f44533186ace531248c2917516 | true | null | 2 | 49 | 1 | 868 | 0 | 0.95 | 1 | 0.7 | 1 | 0.308 | 86.424 | |
846 | swe_gym::train::399 | swe_gym | train | 399 | python__mypy-11151 | python/mypy | python/mypy | python | 68047f90bc4f140a717a4dd64ba762003122b20d | typecheck failure with parameterized iterator
`mypy-bug.py`
```python
from typing import *
import asyncio
T = TypeVar('T')
class Foo(Generic[T]):
def __iter__(self) -> Iterator[Awaitable[T]]:
return iter([])
async def bar(foo:Foo[T]):
# No error
await asyncio.gather(*iter(foo))
# mypy says:... | diff --git a/mypy/argmap.py b/mypy/argmap.py
--- a/mypy/argmap.py
+++ b/mypy/argmap.py
@@ -1,12 +1,16 @@
"""Utilities for mapping between actual and formal arguments (and their types)."""
-from typing import List, Optional, Sequence, Callable, Set
+from typing import TYPE_CHECKING, List, Optional, Sequence, Callable... | diff --git a/test-data/unit/check-expressions.test b/test-data/unit/check-expressions.test
--- a/test-data/unit/check-expressions.test
+++ b/test-data/unit/check-expressions.test
@@ -63,13 +63,7 @@ if str():
a = 1.1
class A:
pass
-[file builtins.py]
-class object:
- def __init__(self): pass
-class type: p... | ["mypy/test/testcheck.py::TypeCheckSuite::testKeywordUnpackWithDifferentTypes", "mypy/test/testcheck.py::TypeCheckSuite::testSubtypingIterableUnpacking1", "mypy/test/testcheck.py::TypeCheckSuite::testSubtypingIterableUnpacking2"] | ["mypy/test/testcheck.py::TypeCheckSuite::testInvariantTypeConfusingNames", "mypy/test/testparse.py::ParserSuite::testUnicodeLiteralInPython3", "mypy/test/testcheck.py::TypeCheckSuite::testBytesLiteral", "mypy/test/testcheck.py::TypeCheckSuite::testPassingEmptyDictWithStars", "mypy/test/testcheck.py::TypeCheckSuite::te... | null | true | 2021-09-20T18:31:53Z | 4 | 97 | 3 | 2,277 | 0 | 0.85 | 1 | 0.85 | 0.85 | 0.702833 | 86.421 | ||
847 | swe_bench_pro::test::330 | swe_bench_pro | test | 330 | instance_gravitational__teleport-3ff75e29fb2153a2637fe7f83e49dc04b1c99c9f | gravitational/teleport | gravitational/teleport | go | 4b11dc4a8e02ec5620b27f9ecb28f3180a5e67f7 | ## Title: Users can delete their only MFA device when multi factor authentication is required
## Bug Report
Currently when multi factor authentication (MFA) is enforced, a user can remove their only registered MFA device, this action creates a critical vulnerability because once the user´s current session expires, the... | ## Requirements
- In `DeleteMFADevice`, retrieve the user's MFA devices using `GetMFADevices` and obtain the cluster authentication preference via `GetAuthPreference`, converting any retrieval errors to gRPC with `trail.ToGRPC`.
- When `authPref.GetSecondFactor()` is `SecondFactorOff` or `SecondFactorOptional`, allow ... | diff --git a/lib/auth/grpcserver.go b/lib/auth/grpcserver.go
index f46e83bb02478..8d8bf9149f998 100644
--- a/lib/auth/grpcserver.go
+++ b/lib/auth/grpcserver.go
@@ -1723,13 +1723,49 @@ func (g *GRPCServer) DeleteMFADevice(stream proto.AuthService_DeleteMFADeviceSer
// Find the device and delete it from backend.
dev... | diff --git a/lib/auth/grpcserver_test.go b/lib/auth/grpcserver_test.go
index 36b0c197bc74d..71bf0e0d8e023 100644
--- a/lib/auth/grpcserver_test.go
+++ b/lib/auth/grpcserver_test.go
@@ -52,7 +52,7 @@ func TestMFADeviceManagement(t *testing.T) {
// Enable U2F support.
authPref, err := services.NewAuthPreference(types... | ["TestDeleteLastMFADevice"] | ["TestMFADeviceManagement"] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_gravitational__teleport-3ff75e29fb2153a2637fe7f83e49dc04b1c99c9f | true | null | 1 | 38 | 1 | 1,067 | 0 | 0.95 | 1 | 0.7 | 1 | 0.3045 | 86.4135 | |
848 | swe_gym::train::429 | swe_gym | train | 429 | python__mypy-16519 | python/mypy | python/mypy | python | 706389d3d551dc8f18ce5e5f48584f351a7a07a1 | stubgen: use `X | Y` / `X | None` instead of `Union[X, Y]` / `Union[X, None]`
**Feature**
I would like to let stubgen use `X | Y` / `X | None` instead of `Union[X, Y]` / `Union[X, None]`.
**Pitch**
Now:
```shellsession
# Python 3.10.4, mypy 0.960
$ cat test.py
import random
def a() -> int | str:
if random.rand... | Anyway, it is weird that `from typing import Union` is not inserted by stubgen...
@eggplants if stubgen doesn't import Union when it should, please open a separate issue with a reproducer. We should definitely fix that, and I suspect it'll be easy.
I'm a little more uncertain about this issue, since mypy still has a... | diff --git a/mypy/stubgen.py b/mypy/stubgen.py
--- a/mypy/stubgen.py
+++ b/mypy/stubgen.py
@@ -22,7 +22,7 @@
=> Generate out/urllib/parse.pyi.
$ stubgen -p urllib
- => Generate stubs for whole urlib package (recursively).
+ => Generate stubs for whole urllib package (recursively).
For C modules, you can ge... | 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
@@ -4090,3 +4090,33 @@ from dataclasses import dataclass
class X(missing.Base):
a: int
def __init__(self, *selfa_, a, **selfa__) -> None: ...
+
+[case testAlwaysUsePEP604... | ["mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testAlwaysUsePEP604Union"] | [] | null | true | 2023-11-18T20:45:48Z | 2 | 47 | 1 | 684 | 0 | 0.85 | 1 | 0.7 | 1 | 0.270667 | 86.412 | |
849 | swe_bench_pro::test::581 | swe_bench_pro | test | 581 | instance_qutebrowser__qutebrowser-36ade4bba504eb96f05d32ceab9972df7eb17bcc-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | 73f93008f6c8104dcb317b10bae2c6d156674b33 | # Missing support for disabling features with --disable-features in Qt arguments.
## Description
When launching qutebrowser today, only activation flags (--enable-features) are recognized and there is no equivalent mechanism to disable features. If a user specifies --disable-features=SomeFeature, it is ignored and th... | ## Requirements
- `qt_args` must simultaneously accept enabled and disabled feature flags, recognizing both `--enable-features` and `--disable-features` and allowing comma-separated lists of feature names.
- The final argument array returned by `qt_args` must include exactly one `--enable-features=` entry whenever the... | diff --git a/qutebrowser/config/qtargs.py b/qutebrowser/config/qtargs.py
index d6375f331d9..b263de5410e 100644
--- a/qutebrowser/config/qtargs.py
+++ b/qutebrowser/config/qtargs.py
@@ -22,13 +22,17 @@
import os
import sys
import argparse
-from typing import Any, Dict, Iterator, List, Optional, Sequence
+from typing ... | diff --git a/tests/unit/config/test_qtargs.py b/tests/unit/config/test_qtargs.py
index b38fab41da8..d8546fe30f6 100644
--- a/tests/unit/config/test_qtargs.py
+++ b/tests/unit/config/test_qtargs.py
@@ -341,6 +341,18 @@ def test_overlay_scrollbar(self, config_stub, monkeypatch, parser,
assert ('--enable-featur... | ["tests/unit/config/test_qtargs.py::TestQtArgs::test_overlay_features_flag[True-CustomFeature-CustomFeature,OverlayScrollbar-True]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_overlay_features_flag[True-CustomFeature-CustomFeature,OverlayScrollbar-False]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_ov... | ["tests/unit/config/test_qtargs.py::TestQtArgs::test_qt_args[args0-expected0]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_qt_args[args1-expected1]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_qt_args[args2-expected2]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_qt_args[args3-expected3]", "te... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-36ade4bba504eb96f05d32ceab9972df7eb17bcc-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | true | null | 1 | 47 | 10 | 883 | 0 | 0.95 | 1 | 0.7 | 1 | 0.303833 | 86.4115 | |
850 | swe_gym::train::379 | swe_gym | train | 379 | python__mypy-11204 | python/mypy | python/mypy | python | 8e82171a3e68a5180fab267cad4d2b7cfa1f5cdc | tagged union of unions
**Report Type:** Bug
**Example:** https://mypy-play.net/?mypy=latest&python=3.8&gist=529e99849ebe65749d8568b743f21050
I saw https://github.com/python/mypy/issues/8925.
It could be seen as a duplicate, not sure about it, but this one looks slightly different and more general as the one linked a... | Likely a bug in the narrowing code that doesn't take into account type alias types (or just a missing `get_proper_type()` there). If I inline `Event` in the second alias, then everything works as expected. | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -4676,8 +4676,7 @@ def replay_lookup(new_parent_type: ProperType) -> Optional[Type]:
# Take each element in the parent union and replay the original lookup procedure
# to figure out which parents are ... | diff --git a/test-data/unit/check-narrowing.test b/test-data/unit/check-narrowing.test
--- a/test-data/unit/check-narrowing.test
+++ b/test-data/unit/check-narrowing.test
@@ -1093,3 +1093,32 @@ def f(t: Type[T], a: A, b: B) -> None:
reveal_type(b) # N: Revealed type is "<nothing>"
else:
reveal_t... | ["mypy/test/testcheck.py::TypeCheckSuite::testNarrowingNestedUnionOfTypedDicts"] | [] | null | true | 2021-09-27T09:57:13Z | 1 | 3 | 1 | 2,504 | 0 | 0.85 | 1 | 0.85 | 0.8 | 0.427333 | 86.407 | |
851 | swe_bench_pro::test::299 | swe_bench_pro | test | 299 | instance_future-architect__vuls-e52fa8d6ed1d23e36f2a86e5d3efe9aa057a1b0d | future-architect/vuls | future-architect/vuls | go | 854821eb5489ac7448551f213f49bcf8159a110a | # Title:
Schema version mismatches in the Vuls2 database are not handled explicitly.
## Description:
The Vuls2 database connection logic does not explicitly handle cases where the schema version of the existing database differs from the expected version (`db.SchemaVersion`). This can lead to incorrect behavior, such... | ## Requirements
- In `shouldDownload` (in `detector/vuls2/db.go`), when `metadata.SchemaVersion` differs from the expected `db.SchemaVersion`, the function must return an error if `SkipUpdate` is enabled, and must return `true` (forcing a new download) if `SkipUpdate` is not enabled.
- The `shouldDownload` function sh... | diff --git a/detector/vuls2/db.go b/detector/vuls2/db.go
index 2d6b04e040..c7ab8e41fa 100644
--- a/detector/vuls2/db.go
+++ b/detector/vuls2/db.go
@@ -47,7 +47,18 @@ func newDBConnection(vuls2Conf config.Vuls2Conf, noProgress bool) (db.DB, error)
Options: db.DBOptions{BoltDB: &bolt.Options{ReadOnly: true}},
}).New... | diff --git a/detector/vuls2/db_test.go b/detector/vuls2/db_test.go
index d253a30bd3..9b6da37ba3 100644
--- a/detector/vuls2/db_test.go
+++ b/detector/vuls2/db_test.go
@@ -98,6 +98,34 @@ func Test_shouldDownload(t *testing.T) {
},
want: false,
},
+ {
+ name: "schema version mismatch",
+ args: args{
+ ... | ["Test_shouldDownload", "Test_shouldDownload/schema_version_mismatch", "Test_shouldDownload/schema_version_mismatch,_but_skip_update"] | ["Test_shouldDownload/no_db_file", "Test_shouldDownload/no_db_file,_but_skip_update", "Test_shouldDownload/just_created", "Test_shouldDownload/8_hours_old", "Test_shouldDownload/8_hours_old,_but_skip_update", "Test_shouldDownload/8_hours_old,_but_download_recently"] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_future-architect__vuls-e52fa8d6ed1d23e36f2a86e5d3efe9aa057a1b0d | true | null | 1 | 30 | 3 | 1,196 | 0 | 0.95 | 1 | 0.7 | 1 | 0.299333 | 86.398 | |
852 | swe_gym::train::346 | swe_gym | train | 346 | python__mypy-9380 | python/mypy | python/mypy | python | a79f1aaade9fe150a4bc9bb1d5ad287824298f74 | dataclass does not properly support generics
Please provide more information to help us understand the issue:
* Are you reporting a bug, or opening a feature request?
I believe this is a bug.
* Please insert below the code you are checking with mypy,
or a mock-up repro if the source is private. We would appreciate... | Yes, this is a bug. The fix is to map/expand variable types in the supertype along the MRO instead of "blindly" copying them to the subtype. Should be not too hard to implement.
It looks like this is still a problem with the latest release. I think I know how to solve this. I can send a pull request.
Also, looks lik... | diff --git a/mypy/plugins/dataclasses.py b/mypy/plugins/dataclasses.py
--- a/mypy/plugins/dataclasses.py
+++ b/mypy/plugins/dataclasses.py
@@ -12,6 +12,7 @@
from mypy.plugins.common import (
add_method, _get_decorator_bool_argument, deserialize_and_fixup_type,
)
+from mypy.typeops import map_type_from_supertype
... | diff --git a/test-data/unit/check-dataclasses.test b/test-data/unit/check-dataclasses.test
--- a/test-data/unit/check-dataclasses.test
+++ b/test-data/unit/check-dataclasses.test
@@ -480,6 +480,102 @@ s: str = a.bar() # E: Incompatible types in assignment (expression has type "in
[builtins fixtures/list.pyi]
+
+[... | ["mypy/test/testcheck.py::TypeCheckSuite::testDataclassUntypedGenericInheritance", "mypy/test/testcheck.py::TypeCheckSuite::testDataclassMultiGenericInheritance", "mypy/test/testcheck.py::TypeCheckSuite::testDataclassGenericInheritance"] | ["mypy/test/testcheck.py::TypeCheckSuite::testDataclassGenericSubtype", "mypy/test/testcheck.py::TypeCheckSuite::testDataclassGenericsClassmethod"] | null | true | 2020-08-30T19:44:05Z | 1 | 15 | 3 | 1,283 | 0 | 0.85 | 1 | 0.7 | 1 | 0.263833 | 86.3915 | |
853 | swe_gym::train::492 | swe_gym | train | 492 | python__mypy-16315 | python/mypy | python/mypy | python | 7c33e7c03444ae748b82163e7b4e1666dfaf94c7 | can't narrow a union of type[None]
**Bug Report**
There's something about `type[None]` that (understandably) confuses mypy and makes it start producing nonsense results.
While defining a function that takes arguments of `type[None | A | B]`, mypy is able to narrow to `type[None|A]` (or `type[None|B]`) but any attempt... | I agree this is a bug in mypy, but there were a few bugs in the sample code. Here's an updated sample that should pass type checking.
```python
import types
import typing_extensions as t
NoneType = type(None)
def type_map(cls: type[None | int | str]) -> None:
if issubclass(cls, int):
t.assert_t... | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -7120,9 +7120,10 @@ def conditional_types_with_intersection(
possible_target_types = []
for tr in type_ranges:
item = get_proper_type(tr.item)
- if not isinstance(item, Instance) or tr... | diff --git a/test-data/unit/check-narrowing.test b/test-data/unit/check-narrowing.test
--- a/test-data/unit/check-narrowing.test
+++ b/test-data/unit/check-narrowing.test
@@ -2022,3 +2022,73 @@ def f(x: Union[int, Sequence[int]]) -> None:
):
reveal_type(x) # N: Revealed type is "Tuple[builtins.int, built... | ["mypy/test/testcheck.py::TypeCheckSuite::check-narrowing.test::testNarrowingIsSubclassNoneType3", "mypy/test/testcheck.py::TypeCheckSuite::check-narrowing.test::testNarrowingIsSubclassNoneType4", "mypy/test/testcheck.py::TypeCheckSuite::check-narrowing.test::testNarrowingIsSubclassNoneType2", "mypy/test/testcheck.py::... | [] | null | true | 2023-10-23T06:58:11Z | 2 | 37 | 5 | 838 | 0 | 0.85 | 1 | 0.7 | 1 | 0.263 | 86.389 | |
854 | swe_gym::train::852 | swe_gym | train | 852 | iterative__dvc-4125 | iterative/dvc | iterative/dvc | python | e4dafb8552d52f8e9d2dd20976de079e891851e4 | PermissionError on file which should be in .dvcignore.
## Bug Report
Getting a permission denied when I try to DVC add a file that is in my dvc ignore.
This is the `.dvcignore` file:
```
*/*/.thumbnail/
*/*/.exports/
```
Last few errors in traceback:
```
File "/home/andrea/projects/myproject/.venv/lib/python3.6/site-pa... | So, seems like we introduced a bug in 652f5ab439d2d72f3b3ddabd4f38f117762348d6.
Following script:
```
#!/bin/bash
rm -rf repo
mkdir repo
pushd repo
git init --quiet && dvc init --quiet
set -ex
mkdir -p data/.ignore_dir
echo some_content >> data/1
echo ignored >> data/.ignore_dir/file
echo '**/.ignor... | diff --git a/dvc/output/local.py b/dvc/output/local.py
--- a/dvc/output/local.py
+++ b/dvc/output/local.py
@@ -5,6 +5,7 @@
from dvc.exceptions import DvcException
from dvc.istextfile import istextfile
from dvc.output.base import BaseOutput
+from dvc.scm.tree import is_working_tree
from dvc.utils import relpath
fro... | diff --git a/tests/func/test_ignore.py b/tests/func/test_ignore.py
--- a/tests/func/test_ignore.py
+++ b/tests/func/test_ignore.py
@@ -364,3 +364,28 @@ def test_pattern_trie_tree(tmp_dir, dvc):
)
== ignore_pattern_bottom
)
+
+
+def test_ignore_in_added_dir(tmp_dir, dvc):
+ tmp_dir.gen(
+ ... | ["tests/func/test_ignore.py::test_ignore_in_added_dir"] | ["tests/func/test_ignore.py::test_ignore_file_in_parent_path[data_struct1-pattern_list1-result_set1]", "tests/func/test_ignore.py::test_ignore_on_branch", "tests/func/test_ignore.py::test_dvcignore_in_out_dir", "tests/func/test_ignore.py::test_rename_file", "tests/func/test_ignore.py::test_ignore", "tests/func/test_ign... | null | true | 2020-06-26T21:18:06Z | 1 | 3 | 1 | 2,462 | 0 | 0.85 | 1 | 0.85 | 0.8 | 0.420333 | 86.386 | |
855 | swe_gym::train::766 | swe_gym | train | 766 | iterative__dvc-3940 | iterative/dvc | iterative/dvc | python | ac4f351daf18b3e1ea89a9d6602acf8770a00d6c | plots show: targets are required but help output indicates otherwise [qa]
## Bug Report
Help output indicates `targets` are optional, but an error is thrown if not provided:
```console
λ dvc plots show -h
usage: dvc plots show [-h] [-q | -v] [-t [TEMPLATE]] [-o OUT] [-x X] [-y Y] [--no-csv-header] [--show-json] [--ti... | Without targets it should collect and show all plots. Might be caused by https://github.com/iterative/dvc/pull/3911 CC @Suor
OK. Well I don't have any plots when I run it. How do you register plots? Did we end up adding an option for `dvc run`? I'm still a bit lost in the 1.0 changes, sorry!
@jorgeorpinel, we have `--... | diff --git a/dvc/exceptions.py b/dvc/exceptions.py
--- a/dvc/exceptions.py
+++ b/dvc/exceptions.py
@@ -178,6 +178,14 @@ def __init__(self):
)
+class NoPlotsError(DvcException):
+ def __init__(self):
+ super().__init__(
+ "no plots in this repository. Use `--plots/--plots-no-cache` "
+ ... | diff --git a/tests/func/plots/test_plots.py b/tests/func/plots/test_plots.py
--- a/tests/func/plots/test_plots.py
+++ b/tests/func/plots/test_plots.py
@@ -14,7 +14,6 @@
PlotData,
PlotMetricTypeError,
)
-from dvc.repo.plots.show import NoDataOrTemplateProvided
from dvc.repo.plots.template import (
NoDat... | ["tests/func/plots/test_plots.py::test_no_plots"] | ["tests/func/plots/test_plots.py::test_plot_no_data", "tests/func/plots/test_plots.py::test_throw_on_no_metric_at_all"] | null | true | 2020-06-02T22:42:43Z | 2 | 19 | 1 | 1,185 | 0 | 0.85 | 1 | 0.7 | 1 | 0.260833 | 86.3825 | |
856 | swe_gym::train::740 | swe_gym | train | 740 | iterative__dvc-1829 | iterative/dvc | iterative/dvc | python | 5d4176306658d739af2ba75f8d892a2b1bc4b727 | dvc status regression after 0.33.1 release
I'm using OSX/Darwin.
All the checksums in my pipelines have changed starting from version 0.33.1.
Bug very similar to https://github.com/iterative/dvc/issues/1680
E.g: With a single file added with `dvc add helico_val.h5.dvc`:
###### dvc 0.32.1: OK ✅
```
$ pip install dvc... | Hi @qchenevier !
Could you show `helico_val.h5.dvc` please?
@qchenevier Also, mind showing `dvc status helico_val.h5.dvc -v` logs for those versions?
Ok, was able to reproduce
```
#!/bin/bash
set -e
set -x
rm -rf myrepo
mkdir myrepo
cd myrepo
git init
pip uninstall -y dvc
pip install dvc==0.32.1
d... | diff --git a/dvc/stage.py b/dvc/stage.py
--- a/dvc/stage.py
+++ b/dvc/stage.py
@@ -621,7 +621,7 @@ def dump(self):
self.repo.scm.track_file(os.path.relpath(fname))
def _compute_md5(self):
- from dvc.output.local import OutputLOCAL
+ from dvc.output.base import OutputBase
d = sel... | diff --git a/tests/test_add.py b/tests/test_add.py
--- a/tests/test_add.py
+++ b/tests/test_add.py
@@ -39,6 +39,7 @@ def test(self):
self.assertEqual(len(stage.deps), 0)
self.assertEqual(stage.cmd, None)
self.assertEqual(stage.outs[0].info["md5"], md5)
+ self.assertEqual(stage.md5, "ee... | ["tests/test_add.py::TestAdd::test"] | ["tests/test_add.py::TestShouldAddDataFromInternalSymlink::test", "tests/test_add.py::TestAddDirectory::test", "tests/test_add.py::TestShouldUpdateStateEntryForDirectoryAfterAdd::test", "tests/test_add.py::TestShouldCleanUpAfterFailedAdd::test", "tests/test_add.py::TestAddExternalLocalFile::test", "tests/test_add.py::T... | null | true | 2019-04-04T14:13:11Z | 1 | 7 | 1 | 1,412 | 0 | 0.85 | 1 | 0.7 | 1 | 0.258667 | 86.376 | |
857 | swe_gym::train::513 | swe_gym | train | 513 | python__mypy-14586 | python/mypy | python/mypy | python | 61d6cadf2f104a8100ec05c44d8fccb0636aacf8 | New "Must not defer during final iteration" crash
**Crash Report**
It looks like mypy has started crashing on one of the mypy_primer projects, https://github.com/FasterSpeeding/Tanjun (after the latest commit to that project). I noticed this in https://github.com/python/mypy/pull/14238#issuecomment-1409828838
mypy 0.... | Okay, here's a minimised repro:
```
from typing import Any, Callable, Coroutine, Generic, Optional, TypeVar, Union
from typing_extensions import Concatenate, ParamSpec, Self
_P = ParamSpec("_P")
_T = TypeVar("_T")
_ContextT_contra = TypeVar("_ContextT_contra", bound="Context", contravariant=True)
_CoroT = Coro... | diff --git a/mypy/types.py b/mypy/types.py
--- a/mypy/types.py
+++ b/mypy/types.py
@@ -713,13 +713,13 @@ def name_with_suffix(self) -> str:
return n
def __hash__(self) -> int:
- return hash((self.id, self.flavor))
+ return hash((self.id, self.flavor, self.prefix))
def __eq__(self, o... | diff --git a/test-data/unit/check-parameter-specification.test b/test-data/unit/check-parameter-specification.test
--- a/test-data/unit/check-parameter-specification.test
+++ b/test-data/unit/check-parameter-specification.test
@@ -1456,3 +1456,18 @@ class C(Generic[T]): ...
C[Callable[P, int]]() # E: The first argume... | ["mypy/test/testcheck.py::TypeCheckSuite::check-parameter-specification.test::testConcatDeferralNoCrash"] | [] | null | true | 2023-02-02T05:23:27Z | 1 | 4 | 1 | 2,419 | 0 | 0.85 | 1 | 0.85 | 0.8 | 0.4165 | 86.3745 | |
858 | swe_gym::train::1899 | swe_gym | train | 1,899 | facebookresearch__hydra-2062 | facebookresearch/hydra | facebookresearch/hydra | python | 3043a42df4e01ed25bb2f5f1b551a02cef52e825 | [Bug] Regression in `hydra._internal.utils._locate`
# 🐛 Bug
## Description
[hydra-zen's torch tests](https://github.com/mit-ll-responsible-ai/hydra-zen/blob/main/tests/test_third_party/test_against_torch.py) caught a regression that was introduced in 043ec9b: `hydra._internal.utils._locate` is no longer able to "locat... | I am not able to reproduce this issue using the latest Hydra commit on the `main` branch.
```python
# repro.py
from hydra.utils import get_method
from hydra.utils import _locate
print(get_method("torch.tensor"))
print(_locate("torch.tensor"))
```
```text
$ python repro.py
<built-in method tensor of type obj... | diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py
--- a/hydra/_internal/utils.py
+++ b/hydra/_internal/utils.py
@@ -570,16 +570,11 @@ def _locate(path: str) -> Union[type, Callable[..., Any]]:
from types import ModuleType
parts = [part for part in path.split(".") if part]
- for n in revers... | diff --git a/tests/instantiate/__init__.py b/tests/instantiate/__init__.py
--- a/tests/instantiate/__init__.py
+++ b/tests/instantiate/__init__.py
@@ -8,6 +8,9 @@
from omegaconf import MISSING, DictConfig, ListConfig
from hydra.types import TargetConf
+from tests.instantiate.module_shadowed_by_function import a_fun... | ["tests/instantiate/test_helpers.py::test_locate[tests.instantiate.module_shadowed_by_function-a_function]"] | ["tests/instantiate/test_helpers.py::test_locate[method_of_builtin]", "tests/instantiate/test_helpers.py::test_locate[tests.instantiate.Adam-Adam]", "tests/instantiate/test_helpers.py::test_locate[tests.instantiate.ASubclass-ASubclass]", "tests/instantiate/test_helpers.py::test_locate[tests.instantiate.AClass-AClass]",... | null | true | 2022-02-27T06:51:37Z | 1 | 18 | 1 | 1,186 | 0 | 0.85 | 1 | 0.7 | 1 | 0.257667 | 86.373 | |
859 | swe_gym::train::25 | swe_gym | train | 25 | getmoto__moto-6641 | getmoto/moto | getmoto/moto | python | c8b5470e25012477f817a619e88f9ad1bea08bbe | Scheduler not raising ConflictException when duplicate schedules created
Boto3 will raise a `ConflictException` when an Eventbridge schedule is created with the same name as an existing schedule. While mocking with moto, this exception is not raised. The response returns a success status and the second schedule is simp... | Hi @JAChez, thanks for raising this, and welcome to Moto! Marking it as an an enhancement to add this validation. | diff --git a/moto/scheduler/exceptions.py b/moto/scheduler/exceptions.py
--- a/moto/scheduler/exceptions.py
+++ b/moto/scheduler/exceptions.py
@@ -2,6 +2,11 @@
from moto.core.exceptions import JsonRESTError
+class ScheduleExists(JsonRESTError):
+ def __init__(self, name: str) -> None:
+ super().__init__(... | diff --git a/tests/test_scheduler/test_scheduler.py b/tests/test_scheduler/test_scheduler.py
--- a/tests/test_scheduler/test_scheduler.py
+++ b/tests/test_scheduler/test_scheduler.py
@@ -144,6 +144,26 @@ def test_update_schedule(extra_kwargs):
assert schedule["CreationDate"] != schedule["LastModificationDate"]
... | ["tests/test_scheduler/test_scheduler.py::test_create_duplicate_schedule"] | ["tests/test_scheduler/test_scheduler.py::test_list_schedules", "tests/test_scheduler/test_scheduler.py::test_create_get_schedule", "tests/test_scheduler/test_scheduler.py::test_create_get_delete__in_different_group", "tests/test_scheduler/test_scheduler.py::test_update_schedule[with_group]", "tests/test_scheduler/test... | null | true | 2023-08-12 18:48:17 | 2 | 8 | 1 | 1,381 | 0 | 0.85 | 1 | 0.7 | 1 | 0.256833 | 86.3705 | |
860 | swe_bench_pro::test::24 | swe_bench_pro | test | 24 | instance_NodeBB__NodeBB-97c8569a798075c50e93e585ac741ab55cb7c28b-vf2cf3cbd463b7ad942381f1c6d077626485a1e9e | NodeBB/NodeBB | nodebb/nodebb | javascript | d9e2190a6b4b6bef2d8d2558524dd124be33760f | ## Title: User API Returns Private Fields Without Proper Filtering
## Current behavior
The `/api/v3/users/[uid]` endpoint returns private fields (e.g., email, full name) even to regular authenticated users when requesting another user's profile, regardless of the target user's privacy settings.
## Expected behavior
... | ## Requirements
- When the global `meta.config.hideEmail` setting is enabled, the `/api/v3/users/[uid]` endpoint must return an empty `email` field for a regular authenticated user requesting another user's data.
- When the global `meta.config.hideFullname` setting is enabled, the `/api/v3/users/[uid]` endpoint must r... | diff --git a/src/controllers/write/users.js b/src/controllers/write/users.js
index 8b7e483ba25c..222d66403247 100644
--- a/src/controllers/write/users.js
+++ b/src/controllers/write/users.js
@@ -44,7 +44,9 @@ Users.exists = async (req, res) => {
};
Users.get = async (req, res) => {
- helpers.formatApiResponse(200, ... | diff --git a/test/user.js b/test/user.js
index 537b06bca124..6c6bf85a3408 100644
--- a/test/user.js
+++ b/test/user.js
@@ -2509,32 +2509,48 @@ describe('User', () => {
});
describe('hideEmail/hideFullname', () => {
+ const COMMON_PW = '123456';
let uid;
+ let jar;
+ let regularUserUid;
+
+ before(async () ... | ["test/user.js | User hideEmail/hideFullname should hide email and fullname"] | ["test/user.js | User should get admins and mods", "test/user.js | User should allow user to login even if password is weak", "test/user.js | User .create(), when created should be created properly", "test/user.js | User .create(), when created should have a valid email, if using an email", "test/user.js | User .create... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_NodeBB__NodeBB-97c8569a798075c50e93e585ac741ab55cb7c28b-vf2cf3cbd463b7ad942381f1c6d077626485a1e9e | true | null | 2 | 25 | 1 | 1,234 | 0 | 0.95 | 1 | 0.7 | 1 | 0.289 | 86.367 | |
861 | swe_gym::train::325 | swe_gym | train | 325 | getmoto__moto-6701 | getmoto/moto | getmoto/moto | python | 5e1b166f2521eacd737f2ccb241fbc0b2e8bb931 | iot: actions where ids are sent in the body won't work when they have URL reserved characters
The root cause is when we use characters that need to be url-encoded on ids (e.g. `thingGroupName`). When those are created the id is part of the URL so moto creates them url-encoded in its backend (e.g. `foo:bar` -> `foo%3Aba... | I think the fix should be to unquote the values when they are obtained from the URL but that's a change that will affect everything (`moto.core.BaseResponse._get_param`)
```
$ git diff
diff --git a/moto/core/responses.py b/moto/core/responses.py
index bfdbac1e8..bb6652af3 100644
--- a/moto/core/responses.py
+++... | diff --git a/moto/iot/responses.py b/moto/iot/responses.py
--- a/moto/iot/responses.py
+++ b/moto/iot/responses.py
@@ -581,14 +581,14 @@ def list_thing_principals(self) -> str:
return json.dumps(dict(principals=principals))
def describe_thing_group(self) -> str:
- thing_group_name = self._get_par... | diff --git a/tests/test_iot/test_iot_thing_groups.py b/tests/test_iot/test_iot_thing_groups.py
--- a/tests/test_iot/test_iot_thing_groups.py
+++ b/tests/test_iot/test_iot_thing_groups.py
@@ -38,8 +38,8 @@ def generate_thing_group_tree(iot_client, tree_dict, _parent=None):
class TestListThingGroup:
- group_name_... | ["tests/test_iot/test_iot_thing_groups.py::TestListThingGroup::test_should_list_all_groups_non_recursively", "tests/test_iot/test_iot_thing_groups.py::test_describe_thing_group_metadata_hierarchy", "tests/test_iot/test_iot_thing_groups.py::TestListThingGroup::test_should_list_all_groups_filtered_by_parent", "tests/test... | ["tests/test_iot/test_iot_thing_groups.py::test_thing_group_update_with_no_previous_attributes_with_merge", "tests/test_iot/test_iot_thing_groups.py::test_thing_group_updated_with_empty_attributes_no_merge_no_attributes_added", "tests/test_iot/test_iot_thing_groups.py::test_thing_group_updates_description", "tests/test... | null | true | 2023-08-19 22:22:21 | 1 | 8 | 10 | 1,345 | 0 | 0.85 | 1 | 0.7 | 1 | 0.250833 | 86.3525 | |
862 | swe_gym::train::443 | swe_gym | train | 443 | python__mypy-15926 | python/mypy | python/mypy | python | 7141d6bcff9e26e774e88712015ca6bbe8307c9e | lru_cache annotation doesn't work as a property
So I originally reported it in [typeshed/#2659](https://github.com/python/typeshed/issues/2569) but was told this can't be fixed there and it is mypy limitation so repporting it here.
----
I have following code:
```python
#! /usr/bin/env python
import time
from functo... | Duplicates https://github.com/python/mypy/issues/1362 and https://github.com/python/mypy/issues/1608
@probablyodd well its a bit different. If you set `# type: ignore` to `@property` in this case,
mypy will completely ignore existence of this decorator and treat such methods as common callable methods. Mypy will just... | diff --git a/mypy/checkmember.py b/mypy/checkmember.py
--- a/mypy/checkmember.py
+++ b/mypy/checkmember.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import TYPE_CHECKING, Callable, Sequence, cast
+from typing import TYPE_CHECKING, Callable, Optional, Sequence, cast
from mypy import meet, m... | diff --git a/test-data/unit/check-functions.test b/test-data/unit/check-functions.test
--- a/test-data/unit/check-functions.test
+++ b/test-data/unit/check-functions.test
@@ -3158,3 +3158,20 @@ class C(A, B):
class D(A, B):
def f(self, z: int) -> str: pass # E: Method "f" is not using @override but is overriding... | ["mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testCallableProperty"] | [] | null | true | 2023-08-22T08:27:46Z | 1 | 21 | 1 | 1,082 | 0 | 0.85 | 1 | 0.7 | 1 | 0.250333 | 86.351 | |
863 | swe_bench_pro::test::7 | swe_bench_pro | test | 7 | instance_NodeBB__NodeBB-1ea9481af6125ffd6da0592ed439aa62af0bca11-vd59a5728dfc977f44533186ace531248c2917516 | NodeBB/NodeBB | nodebb/nodebb | javascript | bbaf26cedc3462ef928906dc90db5cb98a3ec22e | ## Title:
Duplicate topics created when multiple concurrent create requests are issued by the same user
#### Description:
When an authenticated user sends multiple topic creation requests at the same time, the system processes more than one of them successfully. This results in duplicate topics being created.
### S... | ## Requirements
- Maintain consistent behavior so that when the same authenticated user issues multiple concurrent requests to create a topic via POST /api/v3/topics, only one request is accepted as successful.
- Ensure that concurrent overlapping requests from the same authenticated user to POST /api/v3/topics are re... | diff --git a/public/language/en-GB/error.json b/public/language/en-GB/error.json
index 56d7f71f3b11..6cfc003e009b 100644
--- a/public/language/en-GB/error.json
+++ b/public/language/en-GB/error.json
@@ -101,6 +101,7 @@
"category-not-selected": "Category not selected.",
"too-many-posts": "You can only post once ever... | diff --git a/test/user.js b/test/user.js
index d05f81778b28..990122796a0a 100644
--- a/test/user.js
+++ b/test/user.js
@@ -349,6 +349,28 @@ describe('User', () => {
});
});
});
+
+ it('should only post 1 topic out of 10', async () => {
+ await User.create({ username: 'flooder', password: '123456' });
+ ... | ["test/user.js | User .isReadyToPost() should only post 1 topic out of 10", "test/user.js | User socket methods should get unread count for user", "test/user.js | User socket methods should get unread counts for user"] | ["test/user.js | User should get admins and mods", "test/user.js | User should allow user to login even if password is weak", "test/user.js | User .create(), when created should be created properly", "test/user.js | User .create(), when created should have a valid email, if using an email", "test/user.js | User .create... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_NodeBB__NodeBB-1ea9481af6125ffd6da0592ed439aa62af0bca11-vd59a5728dfc977f44533186ace531248c2917516 | true | null | 2 | 36 | 3 | 961 | 0 | 0.95 | 1 | 0.7 | 1 | 0.280167 | 86.3405 | |
864 | swe_bench_pro::test::590 | swe_bench_pro | test | 590 | instance_qutebrowser__qutebrowser-50efac08f623644a85441bbe02ab9347d2b71a9d-v9f8e9d96c85c85a605e382f1510bd08563afc566 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | 434f6906f9088172494fa7e219a856d893ed55ba | # Incorrect dark mode threshold key emitted for `colors.webpage.darkmode.threshold.text` on Qt 6.4
# Description
When `colors.webpage.darkmode.threshold.text` is configured and the detected Qt version is 6.4, the generated dark mode configuration includes an incorrect key name.
# Actual Behavior
The configuration... | ## Requirements
- When colors.webpage.darkmode.threshold.text is configured with a numeric value and the Qt version is detected as 6.4, the dark mode configuration should generate an entry with the key "ForegroundBrightnessThreshold" and the numeric value converted to string format.
- The dark mode threshold key mappi... | diff --git a/qutebrowser/browser/webengine/darkmode.py b/qutebrowser/browser/webengine/darkmode.py
index 99bf5878928..d4b7493ab53 100644
--- a/qutebrowser/browser/webengine/darkmode.py
+++ b/qutebrowser/browser/webengine/darkmode.py
@@ -86,6 +86,17 @@
- New IncreaseTextContrast:
https://chromium-review.googlesource... | diff --git a/tests/unit/browser/webengine/test_darkmode.py b/tests/unit/browser/webengine/test_darkmode.py
index 53d3246d66e..f587d42c4f7 100644
--- a/tests/unit/browser/webengine/test_darkmode.py
+++ b/tests/unit/browser/webengine/test_darkmode.py
@@ -104,6 +104,7 @@ def test_basics(config_stub, settings, expected):
... | ["tests/unit/browser/webengine/test_darkmode.py::test_qt_version_differences[6.4-expected2]"] | ["tests/unit/browser/webengine/test_darkmode.py::test_colorscheme[auto-5.15.2-expected0]", "tests/unit/browser/webengine/test_darkmode.py::test_colorscheme[auto-5.15.3-expected1]", "tests/unit/browser/webengine/test_darkmode.py::test_colorscheme[auto-6.2.0-expected2]", "tests/unit/browser/webengine/test_darkmode.py::te... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-50efac08f623644a85441bbe02ab9347d2b71a9d-v9f8e9d96c85c85a605e382f1510bd08563afc566 | true | null | 1 | 38 | 1 | 914 | 0 | 0.95 | 1 | 0.7 | 1 | 0.279 | 86.337 | |
865 | swe_bench_pro::test::607 | swe_bench_pro | test | 607 | instance_qutebrowser__qutebrowser-96b997802e942937e81d2b8a32d08f00d3f4bc4e-v5fc38aaf22415ab0b70567368332beee7955b367 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | 2e65f731b1b615b5cd60417c00b6993c2295e9f8 | # Title: Bug Report: `parse_duration` accepts invalid formats and miscalculates durations
## Description
The helper responsible for parsing duration strings does not properly validate input or return consistent millisecond values. Inputs such as negative values (`-1s`), duplicate units (`34ss`), or fractional seconds... | ## Requirements
- The function `parse_duration` must accept a plain integer string, interpret it as seconds, and return the corresponding duration in milliseconds.
- The function must accept duration strings with unit suffixes `h`, `m`, and `s`, where each unit is a non-negative integer, and return the total duration i... | diff --git a/qutebrowser/misc/utilcmds.py b/qutebrowser/misc/utilcmds.py
index 56138c798f4..95302488af9 100644
--- a/qutebrowser/misc/utilcmds.py
+++ b/qutebrowser/misc/utilcmds.py
@@ -42,15 +42,16 @@
@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..48e66003dea 100644
--- a/tests/unit/utils/test_utils.py
+++ b/tests/unit/utils/test_utils.py
@@ -818,3 +818,26 @@ def test_libgl_workaround(monkeypatch, skip):
if skip:
monkeypatch.setenv('QUTE_SKIP_LIBGL_WORKA... | ["tests/unit/utils/test_utils.py::test_parse_duration[-1s--1]", "tests/unit/utils/test_utils.py::test_parse_duration[-1--1]", "tests/unit/utils/test_utils.py::test_parse_duration[34ss--1]", "tests/unit/utils/test_utils.py::test_parse_duration[0-0]", "tests/unit/utils/test_utils.py::test_parse_duration[0s-0]", "tests/un... | ["tests/unit/utils/test_utils.py::TestCompactText::test_compact_text['foo\\\\nbar'-'foobar']", "tests/unit/utils/test_utils.py::TestCompactText::test_compact_text[' foo \\\\n bar '-'foobar']", "tests/unit/utils/test_utils.py::TestCompactText::test_compact_text['\\\\nfoo\\\\n'-'foo']", "tests/unit/utils/test_utils.p... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-96b997802e942937e81d2b8a32d08f00d3f4bc4e-v5fc38aaf22415ab0b70567368332beee7955b367 | true | null | 2 | 24 | 17 | 1,180 | 0 | 0.95 | 1 | 0.7 | 1 | 0.276667 | 86.33 | |
866 | swe_gym::train::914 | swe_gym | train | 914 | dask__dask-9272 | dask/dask | dask/dask | python | 7b054f1d8f4a2343268f5182d47996a5469b10dc | `dask.bag.random.sample` throws various errors
**What happened**: I want to undersample items in a Bag using `dask.bag.random.sample`
**What you expected to happen**: Receive a Bag with specified amount of items.
**Minimal Complete Verifiable Example**:
```python
import dask.bag
from dask.bag import random
def main... | @MaximLippeveld Thanks for reporting. That does look like a bug.
@mesejo I know [you did some work on Bag Sampling](https://github.com/dask/dask/pull/7636) recently, do you have thoughts on this?
I'm able to reproduce this even with dask=2022.02.1, which suggested this was happening even before your refactor. :/
I t... | diff --git a/dask/bag/random.py b/dask/bag/random.py
--- a/dask/bag/random.py
+++ b/dask/bag/random.py
@@ -4,10 +4,12 @@
from functools import partial
from itertools import islice
+from tlz import first
+
from dask.bag.core import Bag
-def sample(population, k):
+def sample(population, k, split_every=None):
... | diff --git a/dask/bag/tests/test_random.py b/dask/bag/tests/test_random.py
--- a/dask/bag/tests/test_random.py
+++ b/dask/bag/tests/test_random.py
@@ -51,6 +51,27 @@ def test_choices_k_equal_bag_size_with_unbalanced_partitions():
assert all(i in seq for i in li)
+def test_choices_with_more_bag_partitons():
+ ... | ["dask/bag/tests/test_random.py::test_choices_with_more_bag_partitons", "dask/bag/tests/test_random.py::test_sample_with_more_bag_partitons"] | ["dask/bag/tests/test_random.py::test_choices_empty_partition", "dask/bag/tests/test_random.py::test_sample_size_exactly_k", "dask/bag/tests/test_random.py::test_choices_size_exactly_k", "dask/bag/tests/test_random.py::test_sample_k_bigger_than_bag_size", "dask/bag/tests/test_random.py::test_sample_empty_partition", "d... | null | true | 2022-07-14T12:13:29Z | 1 | 28 | 2 | 877 | 0 | 0.85 | 1 | 0.7 | 1 | 0.2395 | 86.3185 | |
867 | swe_bench_pro::test::592 | swe_bench_pro | test | 592 | instance_qutebrowser__qutebrowser-54bcdc1eefa86cc20790973d6997b60c3bba884c-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | 0df0985292b79e54c062b7fd8b3f5220b444b429 | # Fix resource globbing with Python .egg installs
**Description**
When qutebrowser is installed as a `.egg` package (via certain `setup.py` install flows), `importlib.resources.files(...)` may return a `zipfile.Path` instead of a `pathlib.Path`. `zipfile.Path` does not provide a compatible `glob()` implementation, but... | ## Requirements
- The `_glob_resources(resource_path, subdir, ext)` function must return an iterable of file paths under the given `subdir` that match the file extension `ext`, expressed as POSIX-style relative strings (e.g., `html/test1.html`). The `ext` argument must start with a dot (e.g., `.html`) and must not cont... | diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py
index beb6e257812..5e4c418ffae 100644
--- a/qutebrowser/utils/utils.py
+++ b/qutebrowser/utils/utils.py
@@ -37,7 +37,7 @@
import ctypes
import ctypes.util
from typing import (Any, Callable, IO, Iterator, Optional, Sequence, Tuple, Type, Union,
- ... | diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py
index ee4cfe1e5f9..415d04bd088 100644
--- a/tests/unit/utils/test_utils.py
+++ b/tests/unit/utils/test_utils.py
@@ -28,6 +28,7 @@
import re
import shlex
import math
+import zipfile
from PyQt5.QtCore import QUrl
from PyQt5.QtGui import Q... | ["tests/unit/utils/test_utils.py::TestReadFile::test_glob_resources_pathlib[True]", "tests/unit/utils/test_utils.py::TestReadFile::test_glob_resources_pathlib[False]", "tests/unit/utils/test_utils.py::TestReadFile::test_glob_resources_zipfile[True]", "tests/unit/utils/test_utils.py::TestReadFile::test_glob_resources_zi... | ["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-54bcdc1eefa86cc20790973d6997b60c3bba884c-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | true | null | 1 | 38 | 4 | 868 | 0 | 0.95 | 1 | 0.7 | 1 | 0.271333 | 86.314 | |
868 | swe_bench_promax::test::7 | swe_bench_promax | test | 7 | nasa__fprime-4340 | nasa/fprime | nasa/fprime | cpp | 6bdd79f29071408c455c07e5b8fb53d5b197e100 | The FrameAccumulator service processes incoming data streams by accumulating frames within a fixed-capacity ring buffer, relying on an external FrameDetector component to identify frame boundaries and report the expected frame size via the `size_out` parameter. Under normal conditions, this workflow operates robustly a... | diff --git a/Svc/FrameAccumulator/FrameAccumulator.cpp b/Svc/FrameAccumulator/FrameAccumulator.cpp
--- a/Svc/FrameAccumulator/FrameAccumulator.cpp
+++ b/Svc/FrameAccumulator/FrameAccumulator.cpp
@@ -116,19 +116,31 @@ void FrameAccumulator ::processRing() {
// Detect must not consume data in the ring buffer
... | diff --git a/Svc/FrameAccumulator/test/ut/FrameAccumulatorTestMain.cpp b/Svc/FrameAccumulator/test/ut/FrameAccumulatorTestMain.cpp
--- a/Svc/FrameAccumulator/test/ut/FrameAccumulatorTestMain.cpp
+++ b/Svc/FrameAccumulator/test/ut/FrameAccumulatorTestMain.cpp
@@ -47,6 +47,11 @@ TEST(FrameAccumulator, testBufferReturnDea... | null | null | key4127/refactor-dockerhub:nasa__fprime-4340 | true | 1761171447 | 3 | 41 | null | 2,700 | 0 | 0.9 | 1 | 0.7 | 1 | 0.586667 | 86.31 | ||
869 | swe_bench_pro::test::573 | swe_bench_pro | test | 573 | instance_qutebrowser__qutebrowser-1a9e74bfaf9a9db2a510dc14572d33ded6040a57-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | qutebrowser/qutebrowser | qutebrowser/qutebrowser | python | ebf4b987ecb6c239af91bb44235567c30e288d71 | ## Title: Qt args don’t combine existing `--enable-features` flags
### Description:
When qutebrowser is started with an existing `--enable-features` flag and qutebrowser also adds its own feature flags for QtWebEngine, the flags are not combined into a single `--enable-features` argument.
### Expected Behavior:
All... | ## Requirements
- When `objects.backend` is not `usertypes.Backend.QtWebEngine` the returned arguments must remain unchanged, and when it is `usertypes.Backend.QtWebEngine` the returned arguments must contain at most one `--enable-features=` entry only if features are present, and that single entry must represent the c... | diff --git a/qutebrowser/config/qtargs.py b/qutebrowser/config/qtargs.py
index 2a8f5226908..6e70ab70ace 100644
--- a/qutebrowser/config/qtargs.py
+++ b/qutebrowser/config/qtargs.py
@@ -49,8 +49,13 @@ def qt_args(namespace: argparse.Namespace) -> typing.List[str]:
argv += ['--' + arg for arg in config.val.qt.args... | diff --git a/tests/unit/config/test_qtargs.py b/tests/unit/config/test_qtargs.py
index b38158fe00e..0a42dbf4f15 100644
--- a/tests/unit/config/test_qtargs.py
+++ b/tests/unit/config/test_qtargs.py
@@ -335,6 +335,46 @@ def test_overlay_scrollbar(self, config_stub, monkeypatch, parser,
assert ('--enable-featur... | ["tests/unit/config/test_qtargs.py::TestQtArgs::test_overlay_features_flag[True-CustomFeature-CustomFeature,OverlayScrollbar-True]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_overlay_features_flag[True-CustomFeature-CustomFeature,OverlayScrollbar-False]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_ov... | ["tests/unit/config/test_qtargs.py::TestQtArgs::test_qt_args[args0-expected0]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_qt_args[args1-expected1]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_qt_args[args2-expected2]", "tests/unit/config/test_qtargs.py::TestQtArgs::test_qt_args[args3-expected3]", "te... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-1a9e74bfaf9a9db2a510dc14572d33ded6040a57-v2ef375ac784985212b1805e1d0431dc8f1b3c171 | true | null | 1 | 32 | 4 | 968 | 0 | 0.95 | 1 | 0.7 | 1 | 0.268 | 86.304 | |
870 | swe_gym::train::392 | swe_gym | train | 392 | python__mypy-11632 | python/mypy | python/mypy | python | e557ec242b719e386a804766b0db8646f86ef0e3 | Crash with alembic 1.7.0
**Crash Report**
Running `mypy` in a simple file which uses type annotations from [`alembic`](https://github.com/sqlalchemy/alembic) `1.7.0` gives a crash. Works fine with `1.6.5 .
**Traceback**
```
Traceback (most recent call last):
File "C:\Python39\lib\runpy.py", line 197, in _run_modu... | Having the same issue on my code, I really don't understand where and why, can someone shed some light?
mentioned in alembics repo: https://github.com/sqlalchemy/alembic/issues/897
I've tried to debug this a bit on alembic side: https://github.com/sqlalchemy/alembic/issues/897#issuecomment-913855198
It seems a cir... | diff --git a/mypy/semanal.py b/mypy/semanal.py
--- a/mypy/semanal.py
+++ b/mypy/semanal.py
@@ -1933,7 +1933,9 @@ def report_missing_module_attribute(
if self.is_incomplete_namespace(import_id):
# We don't know whether the name will be there, since the namespace
# is incomplete. Defer ... | diff --git a/test-data/unit/check-incremental.test b/test-data/unit/check-incremental.test
--- a/test-data/unit/check-incremental.test
+++ b/test-data/unit/check-incremental.test
@@ -5585,3 +5585,28 @@ bar.x + 0
x = 0
[rechecked]
[stale]
+
+[case testExplicitReexportImportCycleWildcard]
+# flags: --no-implicit-reexp... | ["mypy/test/testcheck.py::TypeCheckSuite::testExplicitReexportImportCycleWildcard"] | [] | null | true | 2021-11-28T11:13:18Z | 1 | 4 | 1 | 2,277 | 0 | 0.85 | 1 | 0.85 | 0.8 | 0.392833 | 86.3035 | |
871 | swe_bench_pro::test::127 | swe_bench_pro | test | 127 | instance_element-hq__element-web-41dfec20bfe9b62cddbbbf621bef2e9aa9685157-vnan | element-hq/element-web | element-hq/element-web | javascript | d5d1ec775caf2d3c9132122c1243898e99fdb2da | # Discovery omits delegated authentication metadata advertised under m.authentication.
## Description
During homeserver discovery, the app builds a validated configuration from the discovery result. When the result includes an m.authentication block and its state is successful, that delegated‑authentication metadata ... | ## Requirements
- `AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, syntaxOnly)` must return a `ValidatedServerConfig` that exposes an optional property named `delegatedAuthentication`.
- When the discovery result entry for `m.authentication` has a successful state, `delegatedAuthentic... | diff --git a/src/utils/AutoDiscoveryUtils.tsx b/src/utils/AutoDiscoveryUtils.tsx
index aaa602abb40..5f1a0448477 100644
--- a/src/utils/AutoDiscoveryUtils.tsx
+++ b/src/utils/AutoDiscoveryUtils.tsx
@@ -16,8 +16,10 @@ limitations under the License.
import React, { ReactNode } from "react";
import { AutoDiscovery, Cli... | diff --git a/test/utils/AutoDiscoveryUtils-test.tsx b/test/utils/AutoDiscoveryUtils-test.tsx
index 7282f9a824..ce56fd47ac 100644
--- a/test/utils/AutoDiscoveryUtils-test.tsx
+++ b/test/utils/AutoDiscoveryUtils-test.tsx
@@ -16,6 +16,7 @@ limitations under the License.
import { AutoDiscovery, AutoDiscoveryAction, Clie... | ["test/utils/AutoDiscoveryUtils-test.tsx | buildValidatedConfigFromDiscovery() | sets delegated auth config when discovery was successful", "test/utils/AutoDiscoveryUtils-test.tsx | buildValidatedConfigFromDiscovery() | sets delegated auth config when syntaxOnly is false", "test/utils/AutoDiscoveryUtils-test.tsx | buil... | ["test/components/views/beacon/BeaconMarker-test.tsx | <BeaconMarker /> | renders marker when beacon has location", "test/components/views/beacon/BeaconMarker-test.tsx | <BeaconMarker /> | renders nothing when beacon has no location", "test/components/views/beacon/BeaconMarker-test.tsx | <BeaconMarker /> | renders noth... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_element-hq__element-web-41dfec20bfe9b62cddbbbf621bef2e9aa9685157-vnan | true | null | 2 | 22 | 3 | 1,137 | 0 | 0.95 | 1 | 0.7 | 1 | 0.262833 | 86.2885 | |
872 | swe_bench_verified::test::411 | swe_bench_verified | test | 411 | sphinx-doc__sphinx-8721 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 82ef497a8c88f0f6e50d84520e7276bfbf65025d | viewcode creates pages for epub even if `viewcode_enable_epub=False` on `make html epub`
**Describe the bug**
viewcode creates pages for epub even if `viewcode_enable_epub=False` on `make html epub`
**To Reproduce**
```
$ make html epub
```
**Expected behavior**
module pages should not be created for epub by default.... | diff --git a/sphinx/ext/viewcode.py b/sphinx/ext/viewcode.py
--- a/sphinx/ext/viewcode.py
+++ b/sphinx/ext/viewcode.py
@@ -182,6 +182,10 @@ def collect_pages(app: Sphinx) -> Generator[Tuple[str, Dict[str, Any], str], Non
env = app.builder.env
if not hasattr(env, '_viewcode_modules'):
return
+ if a... | diff --git a/tests/test_ext_viewcode.py b/tests/test_ext_viewcode.py
--- a/tests/test_ext_viewcode.py
+++ b/tests/test_ext_viewcode.py
@@ -49,6 +49,21 @@ def test_viewcode(app, status, warning):
'<span> """</span></div>\n') in result
+@pytest.mark.sphinx('epub', testroot='ext-viewcode... | ["tests/test_ext_viewcode.py::test_viewcode_epub_default"] | ["tests/test_ext_viewcode.py::test_viewcode_epub_enabled", "tests/test_ext_viewcode.py::test_linkcode", "tests/test_ext_viewcode.py::test_local_source_files"] | null | true | 2021-01-21T15:36:24Z | 1 | 4 | 1 | 534 | 0 | 1 | 1 | 0.85 | 0.8 | 0.102333 | 86.282 | ||
873 | swe_gym::train::816 | swe_gym | train | 816 | iterative__dvc-1681 | iterative/dvc | iterative/dvc | python | 9175c45b1472070e02521380e4db8315d7c910c4 | dvc status regression after 0.30 release
**Please provide information about your setup**
Platform: Arch linux
Method of installation: pip
Python version: 3.6.8
After upgrade to 0.3.0 all my files show `changed checksum` at `dvc status`. As a sanity check I chose one file created via `dvc add`(by one of earlier versio... | `git bisect` pointed me at this commit: https://github.com/iterative/dvc/commit/38536903e101b7449e65fc668c4b19519e61869c
@mflis I can confirm the regression. Taking a look now. | diff --git a/dvc/stage.py b/dvc/stage.py
--- a/dvc/stage.py
+++ b/dvc/stage.py
@@ -527,7 +527,9 @@ def dumpd(self):
for key, value in {
Stage.PARAM_MD5: self.md5,
Stage.PARAM_CMD: self.cmd,
- Stage.PARAM_WDIR: self.wdir,
+ Stage.PARAM_WDIR: os... | diff --git a/tests/test_stage.py b/tests/test_stage.py
--- a/tests/test_stage.py
+++ b/tests/test_stage.py
@@ -103,6 +103,9 @@ def test_ignored_in_checksum(self):
outs=[self.FOO],
)
+ d = stage.dumpd()
+ self.assertEqual(d[stage.PARAM_WDIR], ".")
+
with open(stage.relpath,... | ["tests/test_stage.py::TestDefaultWorkingDirectory::test_ignored_in_checksum"] | ["tests/test_stage.py::TestSchemaDepsOuts::test_empty_list", "tests/unit/stage.py::TestStageChecksum::test_wdir_default_ignored", "tests/test_stage.py::TestReload::test", "tests/unit/stage.py::TestStageChecksum::test", "tests/test_stage.py::TestSchemaCmd::test_cmd_str", "tests/test_stage.py::TestSchemaCmd::test_cmd_obj... | null | true | 2019-03-03T00:37:54Z | 1 | 11 | 1 | 1,122 | 0 | 0.85 | 1 | 0.7 | 1 | 0.223667 | 86.271 | |
874 | swe_gym::train::541 | swe_gym | train | 541 | python__mypy-17276 | python/mypy | python/mypy | python | f5afdcd01adfe2b082d9f61f467920845f9d1176 | `@final` decorator is not honored on override with --check-untyped-defs
**Bug Report**
Overriding class methods marked with `@final` [(pep-0591)](https://www.python.org/dev/peps/pep-0591/) are not reported as errors. The example script will not produce an error with `mypy` even though it probably should.
#9612 is pot... | Hi, just wanted to note that when I tried this example, mypy gives the expected error about `final` as soon as any annotation is [added](https://mypy-play.net/?mypy=0.790&python=3.8&gist=7750b13ddcf5af035beac318d3528c51) to `Derived`'s `foo` method. It's possible that the design was intentionally not to check `final` f... | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -1004,7 +1004,7 @@ def _visit_func_def(self, defn: FuncDef) -> None:
"""Type check a function definition."""
self.check_func_item(defn, name=defn.name)
if defn.info:
- if not defn.is_dynam... | diff --git a/test-data/unit/check-dynamic-typing.test b/test-data/unit/check-dynamic-typing.test
--- a/test-data/unit/check-dynamic-typing.test
+++ b/test-data/unit/check-dynamic-typing.test
@@ -756,6 +756,21 @@ main:5: note: def f(self, x: A) -> None
main:5: note: Subclass:
main:5: note: def f... | ["mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testFinalOverrideOnUntypedDef", "mypy/test/testcheck.py::TypeCheckSuite::check-dynamic-typing.test::testInvalidOverrideArgumentCountWithImplicitSignature4"] | ["mypy/test/testcheck.py::TypeCheckSuite::check-dynamic-typing.test::testInvalidOverrideWithImplicitSignatureAndClassMethod1"] | null | true | 2024-05-21T20:13:24Z | 2 | 29 | 2 | 743 | 0 | 0.85 | 1 | 0.7 | 1 | 0.2205 | 86.2615 | |
875 | swe_gym::train::2336 | swe_gym | train | 2,336 | modin-project__modin-6488 | modin-project/modin | modin-project/modin | python | 781fed8152a6e0a6fcae9cab5604644577103a5f | query and eval: accessing column data by position raises errors
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: macOS 12.2.1
- **Modin version** (`modin.__version__`): 0.15.0+7.g4ec7f634
- **Python version**: 3.9.12
- **Code we can use to reproduce**:
```
import pandas as pd
df = ... | r.e. 2), it looks like we can't parallelize `eval` expressions, like the one in the script above, that access column items. The expression can span arbitrary columns, but it can also require access to particular positional items in a column. Should we try parsing the expression and defaulting to pandas if there's a `__... | diff --git a/modin/core/storage_formats/base/query_compiler.py b/modin/core/storage_formats/base/query_compiler.py
--- a/modin/core/storage_formats/base/query_compiler.py
+++ b/modin/core/storage_formats/base/query_compiler.py
@@ -2343,25 +2343,6 @@ def fillna(df, value, **kwargs):
return DataFrameDefault.re... | diff --git a/modin/pandas/test/dataframe/test_udf.py b/modin/pandas/test/dataframe/test_udf.py
--- a/modin/pandas/test/dataframe/test_udf.py
+++ b/modin/pandas/test/dataframe/test_udf.py
@@ -344,11 +344,15 @@ def test_eval_df_arithmetic_subexpression():
@pytest.mark.parametrize("method", ["query", "eval"])
@pytest.ma... | ["modin/pandas/test/dataframe/test_udf.py::test_query_with_element_access_issue_4580[numexpr]", "modin/pandas/test/dataframe/test_udf.py::test_query_with_element_access_issue_4580[python]"] | ["modin/pandas/test/test_series.py::test_str_find[-5-1-comma", "modin/pandas/test/test_series.py::test_cat_as_ordered[ordered]", "modin/pandas/test/test_series.py::test_str_find[1--5-empty", "modin/pandas/test/test_series.py::test_str_index[-1--1-None", "modin/pandas/test/dataframe/test_udf.py::test_apply_text_func_wit... | null | true | 2023-08-18T15:51:46Z | 4 | 259 | 2 | 3,534 | 0 | 0.85 | 1 | 0.92 | 0.6375 | 1 | 86.260625 | |
876 | swe_gym::train::1049 | swe_gym | train | 1,049 | pydantic__pydantic-8500 | pydantic/pydantic | pydantic/pydantic | python | 069d0205424f98912f8b670b1bc5cfc7df37b2f3 | Model order not maintained when serializing after using model_construct with default values
### Initial Checks
- [X] I confirm that I'm using Pydantic V2
### Description
When using `model_construct()` with default values, any fields with defaults are "moved" the top of the output when using `model_dump()`
### Examp... | @piercsi,
Thanks for bringing this to our attention. We'll roll out a fix for this with `2.6.0` :). | diff --git a/pydantic/main.py b/pydantic/main.py
--- a/pydantic/main.py
+++ b/pydantic/main.py
@@ -212,17 +212,19 @@ def model_construct(cls: type[Model], _fields_set: set[str] | None = None, **val
"""
m = cls.__new__(cls)
fields_values: dict[str, Any] = {}
- defaults: dict[str, Any] =... | diff --git a/tests/test_construction.py b/tests/test_construction.py
--- a/tests/test_construction.py
+++ b/tests/test_construction.py
@@ -509,3 +509,13 @@ class Model(BaseModel):
m = Model.model_construct(x=1, y=2)
assert m.__pydantic_extra__ == {'y': 2}
+
+
+def test_retain_order_of_fields():
+ class M... | ["tests/test_construction.py::test_retain_order_of_fields"] | ["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-05T15:53:28Z | 1 | 10 | 1 | 1,116 | 0 | 0.85 | 1 | 0.7 | 1 | 0.219333 | 86.258 | |
877 | swe_bench_pro::test::400 | swe_bench_pro | test | 400 | instance_internetarchive__openlibrary-43f9e7e0d56a4f1d487533543c17040a029ac501-v0f5aece3601a5b4419f7ccec1dbda2071be28ee4 | internetarchive/openlibrary | internetarchive/openlibrary | python | de903b9535d53122d655590f238a78e217a6c770 | **Bug Report:** Mismatching of Editions for Wikisource Imports
**Issue Description:**
When importing books from Wikisource, the system tends to match the imported edition with an existing edition in Open Library (OL) based on shared bibliographic details like titles and ISBNs. However, this approach may lead to incor... | ## Requirements
- When a record contains a Wikisource source record (format: `wikisource:` followed by an identifier), the edition matching process must extract the Wikisource identifier and only match against existing editions that have the same identifier in their `identifiers.wikisource` field.
- If no existing edi... | diff --git a/openlibrary/catalog/add_book/__init__.py b/openlibrary/catalog/add_book/__init__.py
index fac5d4a3087..6502fc27b18 100644
--- a/openlibrary/catalog/add_book/__init__.py
+++ b/openlibrary/catalog/add_book/__init__.py
@@ -422,6 +422,18 @@ def isbns_from_record(rec: dict) -> list[str]:
return isbns
+... | diff --git a/openlibrary/catalog/add_book/tests/test_add_book.py b/openlibrary/catalog/add_book/tests/test_add_book.py
index 3683931fc23..64997c1aa9f 100644
--- a/openlibrary/catalog/add_book/tests/test_add_book.py
+++ b/openlibrary/catalog/add_book/tests/test_add_book.py
@@ -130,6 +130,48 @@ def test_editions_matched(... | ["openlibrary/catalog/add_book/tests/test_add_book.py::test_force_new_wikisource_edition"] | ["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_match_wikisour... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_internetarchive__openlibrary-43f9e7e0d56a4f1d487533543c17040a029ac501-v0f5aece3601a5b4419f7ccec1dbda2071be28ee4 | true | null | 1 | 29 | 1 | 927 | 0 | 0.95 | 1 | 0.7 | 1 | 0.251167 | 86.2535 | |
878 | swe_bench_pro::test::96 | swe_bench_pro | test | 96 | instance_ansible__ansible-cd473dfb2fdbc97acf3293c134b21cbbcfa89ec3-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | ansible/ansible | ansible/ansible | python | e8ae7211dabbd07093f50d6dfb383da3bb14f13d | # Title
Unexpected exception when specifying an invalid hosts field for a play
## Description
When a play declares a `hosts` value that is not a valid hosts specification, for example a mapping where a host name or a list of host names is expected, `ansible-playbook` aborts with an unexpected exception (`TypeError: se... | ## Requirements
- When a play is loaded from data that contains a `hosts` key whose value evaluates as false in a Python boolean context, loading must raise `AnsibleParserError` with a message that contains `Hosts list cannot be empty`, before any check of the value's type.
- When `hosts` is a truthy sequence (a list ... | diff --git a/changelogs/fragments/65386-validate-hosts.yml b/changelogs/fragments/65386-validate-hosts.yml
new file mode 100644
index 00000000000000..611b10ae03beb5
--- /dev/null
+++ b/changelogs/fragments/65386-validate-hosts.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - play - validate the ``hosts`` entry in a play (https://gi... | diff --git a/test/integration/targets/playbook/runme.sh b/test/integration/targets/playbook/runme.sh
index 8af4e8b4beb4e6..cc8d4957332138 100755
--- a/test/integration/targets/playbook/runme.sh
+++ b/test/integration/targets/playbook/runme.sh
@@ -35,7 +35,7 @@ echo "EXPECTED ERROR: Ensure we fail properly if a play has... | ["test/units/playbook/test_play.py::test_play_empty_hosts[False]", "test/units/playbook/test_play.py::test_play_invalid_hosts_sequence[1]", "test/units/playbook/test_play.py::test_play_invalid_hosts_sequence[value0]", "test/units/playbook/test_play.py::test_play_empty_hosts[0]", "test/units/playbook/test_play.py::test_... | ["test/units/playbook/test_play.py::test_empty_play", "test/units/playbook/test_play.py::test_basic_play", "test/units/playbook/test_play.py::test_play_empty_hosts[value1]", "test/units/playbook/test_play.py::test_play_with_remote_user", "test/units/playbook/test_play.py::test_play_with_roles", "test/units/playbook/tes... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-cd473dfb2fdbc97acf3293c134b21cbbcfa89ec3-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5 | true | null | 2 | 37 | 17 | 759 | 0 | 0.95 | 1 | 0.7 | 1 | 0.249833 | 86.2495 | |
879 | swe_gym::train::238 | swe_gym | train | 238 | getmoto__moto-5899 | getmoto/moto | getmoto/moto | python | c1d85a005d4a258dba98a98f875301d1a6da2d83 | [IAM] Adding user the same IAM group twice causes the group to become "sticky"
Hi team.
Discovered an interesting behavior of mock_s3: if I add an IAM user to an IAM group and then remove the user from the group, everything works as expected, i.e. as a result the user is not a member of any group. However, if I add the... | Thanks for raising this @demosito! Looks like we're indeed always appending users to a group, and we don't check for duplicates. Marking it as a bug.
https://github.com/getmoto/moto/blob/c1d85a005d4a258dba98a98f875301d1a6da2d83/moto/iam/models.py#L2473
Fantastic! Thank you for the lightning-fast response! | diff --git a/moto/iam/models.py b/moto/iam/models.py
--- a/moto/iam/models.py
+++ b/moto/iam/models.py
@@ -2470,7 +2470,8 @@ def delete_login_profile(self, user_name):
def add_user_to_group(self, group_name, user_name):
user = self.get_user(user_name)
group = self.get_group(group_name)
- g... | diff --git a/tests/test_iam/test_iam_groups.py b/tests/test_iam/test_iam_groups.py
--- a/tests/test_iam/test_iam_groups.py
+++ b/tests/test_iam/test_iam_groups.py
@@ -23,7 +23,7 @@
@mock_iam
-def test_create_group_boto3():
+def test_create_group():
conn = boto3.client("iam", region_name="us-east-1")
conn... | ["tests/test_iam/test_iam_groups.py::test_add_user_should_be_idempotent"] | ["tests/test_iam/test_iam_groups.py::test_get_group_policy", "tests/test_iam/test_iam_groups.py::test_delete_unknown_group", "tests/test_iam/test_iam_groups.py::test_update_group_name", "tests/test_iam/test_iam_groups.py::test_get_groups_for_user", "tests/test_iam/test_iam_groups.py::test_get_group_current", "tests/tes... | null | true | 2023-02-02 23:07:23 | 1 | 3 | 1 | 2,164 | 0 | 0.85 | 1 | 0.85 | 0.8 | 0.370667 | 86.237 | |
880 | swe_gym::train::921 | swe_gym | train | 921 | dask__dask-9350 | dask/dask | dask/dask | python | ef0e84abd722484b234688167f1ab487dd21ff9b | SciPy 1.9.0 compatibility
SciPy 1.9.0 was released last week, and we have a related test failure.
[`dask/array/tests/test_linalg.py::test_solve_sym_pos`](https://github.com/dask/dask/runs/7617507756?check_suite_focus=true#step:6:22380) fails with:
```
DeprecationWarning: The 'sym_pos' keyword is deprecated and should ... | Thanks for flagging this @pavithraes! Do you have bandwidth to look into this?
@jrbourbeau Yes, I'm looking into it. :)
Woo, thank you! | diff --git a/dask/array/linalg.py b/dask/array/linalg.py
--- a/dask/array/linalg.py
+++ b/dask/array/linalg.py
@@ -1,4 +1,5 @@
import operator
+import warnings
from functools import partial
from numbers import Number
@@ -1200,11 +1201,11 @@ def _key(i, j):
return Array(graph, name, shape=b.shape, chunks=b.chu... | diff --git a/dask/array/tests/test_linalg.py b/dask/array/tests/test_linalg.py
--- a/dask/array/tests/test_linalg.py
+++ b/dask/array/tests/test_linalg.py
@@ -760,12 +760,19 @@ def _get_symmat(size):
return lA.dot(lA.T)
-@pytest.mark.xfail(
- parse_version(scipy.__version__) >= parse_version("1.9.0"),
- ... | ["dask/array/tests/test_linalg.py::test_solve_assume_a[20-10]", "dask/array/tests/test_linalg.py::test_solve_assume_a[30-6]"] | ["dask/array/tests/test_linalg.py::test_svd_compressed_shapes[chunks0-5-10-10]", "dask/array/tests/test_linalg.py::test_lstsq[20-10-5-True]", "dask/array/tests/test_linalg.py::test_tsqr_uncertain[300-10-chunks14-True-True-None]", "dask/array/tests/test_linalg.py::test_svd_compressed_shapes[chunks0-5-10-20]", "dask/arra... | null | true | 2022-08-04T12:54:07Z | 2 | 43 | 2 | 407 | 0 | 0.85 | 1 | 0.7 | 1 | 0.211167 | 86.2335 | |
881 | swe_bench_pro::test::97 | swe_bench_pro | test | 97 | instance_ansible__ansible-cd9c4eb5a6b2bfaf4a6709f001ce3d0c92c1eed2-v0f01c69f1e2528b935359cfe578530722bca2c59 | ansible/ansible | ansible/ansible | python | 585ef6c55e87c10c1ce7d59ebe9c33dd6dbe5afb | # Changes to linux.py for setup module to return more relevant information for s390
## Summary
On IBM Z / s390 systems, running `gather_facts` via the `setup` module returns `\"NA\"` for relevant hardware facts because `dmidecode` isn't available and `/proc/sys/*` entries aren't present on this platform.
## Issue Ty... | ## Requirements
- `LinuxHardware.get_sysinfo_facts` returns an empty dict (`{}`) when `/proc/sysinfo` does not exist on the host. When `/proc/sysinfo` exists, the method obtains the file contents with the `get_file_content` helper and returns a dict containing exactly these five string keys: `system_vendor`, `product_n... | diff --git a/changelogs/fragments/gather-s390-sysinfo.yml b/changelogs/fragments/gather-s390-sysinfo.yml
new file mode 100644
index 00000000000000..7a9a60d0ff8b2b
--- /dev/null
+++ b/changelogs/fragments/gather-s390-sysinfo.yml
@@ -0,0 +1,2 @@
+minor_changes:
+- fact gathering - Gather /proc/sysinfo facts on s390 Linux... | diff --git a/test/units/module_utils/facts/hardware/linux/fixtures/sysinfo b/test/units/module_utils/facts/hardware/linux/fixtures/sysinfo
new file mode 100644
index 0000000000..b8353582c5
--- /dev/null
+++ b/test/units/module_utils/facts/hardware/linux/fixtures/sysinfo
@@ -0,0 +1,236 @@
+Manufacturer: IBM
+Typ... | ["test/units/module_utils/facts/hardware/linux/test_get_sysinfo_facts.py::test_get_sysinfo_facts", "test/units/module_utils/facts/hardware/linux/test_get_sysinfo_facts.py::test_get_sysinfo_facts_missing"] | [] | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-cd9c4eb5a6b2bfaf4a6709f001ce3d0c92c1eed2-v0f01c69f1e2528b935359cfe578530722bca2c59 | true | null | 2 | 28 | 2 | 906 | 0 | 0.95 | 1 | 0.7 | 1 | 0.244333 | 86.233 | |
882 | swe_gym::train::934 | swe_gym | train | 934 | dask__dask-10556 | dask/dask | dask/dask | python | fdfde02fd84223b60e6aa55e3315e02e7108a81b | Frobenius norm promotes float32 matrix to float64 norm
When applying a Frobenius norm on a float32 matrix, a float64 outcome is generated. A float32 should be expected (similar to numpy). I will try to have a look at this problem next week. Not sure whether the same is true for int-type and complex-type matrices. It mi... | `da.linalg.norm` always hits a `np.promote_types` call:
https://github.com/dask/dask/blob/94dae165dfa30f1fdf76eef28e24414ff246d0f4/dask/array/linalg.py#L1461-L1462
Perhaps if `x.dtype` is `np.float32` the `np.promote_types` call should be avoided in order to stay consistent with NumPy.
The array is always copi... | diff --git a/dask/array/linalg.py b/dask/array/linalg.py
--- a/dask/array/linalg.py
+++ b/dask/array/linalg.py
@@ -1482,11 +1482,10 @@ def norm(x, ord=None, axis=None, keepdims=False):
if len(axis) == 1:
raise ValueError("Invalid norm order for vectors.")
- # Coerce to double precision.
- ... | diff --git a/dask/array/tests/test_linalg.py b/dask/array/tests/test_linalg.py
--- a/dask/array/tests/test_linalg.py
+++ b/dask/array/tests/test_linalg.py
@@ -1011,6 +1011,32 @@ def test_norm_any_ndim(shape, chunks, axis, norm, keepdims):
assert_eq(a_r, d_r)
+@pytest.mark.xfail(
+ _np_version < parse_versio... | ["dask/array/tests/test_linalg.py::test_norm_any_prec[-1-False-True-single]", "dask/array/tests/test_linalg.py::test_norm_any_prec[inf-False-False-single]", "dask/array/tests/test_linalg.py::test_norm_any_prec[-1-True-False-single]", "dask/array/tests/test_linalg.py::test_norm_any_prec[inf-False-True-single]", "dask/ar... | ["dask/array/tests/test_linalg.py::test_norm_2dim[True--2-shape1-chunks1-axis1]", "dask/array/tests/test_linalg.py::test_svd_supported_array_shapes[shape0-chunks2]", "dask/array/tests/test_linalg.py::test_svd_flip_sign[False-c8]", "dask/array/tests/test_linalg.py::test_svd_flip_correction[f4-chunks0-shape0]", "dask/arr... | null | true | 2023-10-12T11:26:21Z | 1 | 12 | 20 | 1,015 | 0 | 0.85 | 1 | 0.7 | 1 | 0.209167 | 86.2275 | |
883 | swe_gym::train::829 | swe_gym | train | 829 | iterative__dvc-1950 | iterative/dvc | iterative/dvc | python | 2cba71123778ba89b5e0780d4eb74d151bf01b5c | pull hangs even if all the files needed exist in cache
I've noticed that `dvc pull` hangs for a few seconds every time you run it. Even if all the files needed exist in cache.
```
(.env) [ivan@ivan ~/Projects/example-get-started]$ dvc pull
Preparing to download data from 'https://remote.dvc.org/get-started'
Preparing ... | Lack of optimization. Here https://github.com/iterative/dvc/blob/0.34.2/dvc/remote/local.py#L684 we collect full-blown status even for an already present cache on `dvc pull`, which is causing that delay. Need to fix that by skipping collecting status for already present cache files on `pull/fetch`. Thanks for reporting... | diff --git a/dvc/data_cloud.py b/dvc/data_cloud.py
--- a/dvc/data_cloud.py
+++ b/dvc/data_cloud.py
@@ -48,8 +48,10 @@ def __init__(self, repo, config=None):
@property
def _cloud(self):
+ """Returns a Remote instance using the `core.remote` config"""
remote = self._core.get(Config.SECTION_COR... | diff --git a/tests/unit/remote/test_local.py b/tests/unit/remote/test_local.py
new file mode 100644
--- /dev/null
+++ b/tests/unit/remote/test_local.py
@@ -0,0 +1,41 @@
+from dvc.remote.local import RemoteLOCAL
+
+
+def test_status_download_optimization(mocker):
+ """When comparing the status to pull a remote cache,... | ["tests/unit/remote/test_local.py::test_status_download_optimization"] | [] | null | true | 2019-04-30T18:18:02Z | 2 | 34 | 1 | 573 | 0 | 0.85 | 1 | 0.7 | 1 | 0.208833 | 86.2265 | |
884 | swe_gym::train::473 | swe_gym | train | 473 | python__mypy-11810 | python/mypy | python/mypy | python | 6de254ef00f99ce5284ab947f2dd1179db6d28f6 | 0.920: Calling function named "_" is not allowed
The following code:
```python3
#from gettext import translation
#from typing import TYPE_CHECKING
#if TYPE_CHECKING:
def _(s: str) -> str: # stub for gettext string wrapper
return s
#translation('Test').install()
print(_("test"))
```
produces the following output:... | Note: the problem didn't occur until v0.920.
I'm using an `_` function to attach metadata to attributes of classes (with metaclasses) and dataclasses for clarity and conciseness while providing proper type checking. While the function could be named `field()` or something else, it adds another name that the user must p... | diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py
--- a/mypy/checkexpr.py
+++ b/mypy/checkexpr.py
@@ -1,6 +1,5 @@
"""Expression type checker. This file is conceptually part of TypeChecker."""
-from mypy.util import unnamed_function
from mypy.backports import OrderedDict, nullcontext
from contextlib import context... | diff --git a/test-data/unit/check-functions.test b/test-data/unit/check-functions.test
--- a/test-data/unit/check-functions.test
+++ b/test-data/unit/check-functions.test
@@ -2230,6 +2230,12 @@ reveal_type(h) # N: Revealed type is "builtins.function"
h(7) # E: Cannot call function of unknown type
[builtins fixtures/b... | ["mypy/test/testcheck.py::TypeCheckSuite::check-functions.test::testFunctionWithNameUnderscore"] | [] | null | true | 2021-12-21T11:52:31Z | 1 | 7 | 1 | 1,097 | 0 | 0.85 | 1 | 0.7 | 1 | 0.206167 | 86.2185 | |
885 | swe_gym::train::1005 | swe_gym | train | 1,005 | dask__dask-6749 | dask/dask | dask/dask | python | e85942f8e1499488fec4a11efd137014e5f4fa27 | Missing 2D case for residuals in dask.array.linalg.lstsq
In numpy's version of the least squares computation, passing ordinate values (`b`) in a two-dimensional array `(M, K)` results in a 2D array `(N, K)` for the coefficients and a 1D array `(K,)` for the residuals, one for each column.
Dask seems to be missing th... | Thank you for raising this issue @aulemahal . Is this something that you would like to help resolve?
I think I can suggest a PR this week!
Great!
On Mon, Aug 17, 2020 at 7:31 AM Pascal Bourgault <notifications@github.com>
wrote:
> I think I can suggest a PR this week!
>
> —
> You are receiving this because you comme... | diff --git a/dask/array/linalg.py b/dask/array/linalg.py
--- a/dask/array/linalg.py
+++ b/dask/array/linalg.py
@@ -1309,17 +1309,21 @@ def lstsq(a, b):
----------
a : (M, N) array_like
"Coefficient" matrix.
- b : (M,) array_like
- Ordinate or "dependent variable" values.
+ b : {(M,), (M,... | diff --git a/dask/array/tests/test_linalg.py b/dask/array/tests/test_linalg.py
--- a/dask/array/tests/test_linalg.py
+++ b/dask/array/tests/test_linalg.py
@@ -818,6 +818,19 @@ def test_lstsq(nrow, ncol, chunk):
dx, dr, drank, ds = da.linalg.lstsq(dA, db)
assert drank.compute() == rank
+ # 2D case
+ A ... | ["dask/array/tests/test_linalg.py::test_lstsq[100-10-10]", "dask/array/tests/test_linalg.py::test_lstsq[20-10-5]"] | ["dask/array/tests/test_linalg.py::test_svd_compressed_shapes[chunks0-5-10-10]", "dask/array/tests/test_linalg.py::test_tsqr_uncertain[300-10-chunks14-True-True-None]", "dask/array/tests/test_linalg.py::test_svd_compressed_shapes[chunks0-5-10-20]", "dask/array/tests/test_linalg.py::test_svd_compressed_shapes[chunks1-5-... | null | true | 2020-10-19T20:57:38Z | 1 | 14 | 2 | 955 | 0 | 0.85 | 1 | 0.7 | 1 | 0.205833 | 86.2175 | |
886 | swe_gym::train::1898 | swe_gym | train | 1,898 | facebookresearch__hydra-1916 | facebookresearch/hydra | facebookresearch/hydra | python | ea9974f36c1b9fc6c16ea1d2db71655cccfa6ec5 | Instantiation exception also raises an exception sometimes
# 🐛 Bug
## Description
When there's an instantiation exception, raising a chained exception sometimes also fails because it doesn't take an argument:
https://github.com/facebookresearch/hydra/blob/9759f87673be1d41fe33279e1b7980f8efb38b19/hydra/_internal/inst... | Hi @bryant1410, thanks for reporting this.
Here is a minimal repro:
```python
# module.py
class MyException(Exception):
def __init__(self):
"""Init method taking no argument"""
pass
def foo():
raise MyException()
```
```python
# run.py
from hydra.utils import instantiate
inst... | diff --git a/hydra/_internal/instantiate/_instantiate2.py b/hydra/_internal/instantiate/_instantiate2.py
--- a/hydra/_internal/instantiate/_instantiate2.py
+++ b/hydra/_internal/instantiate/_instantiate2.py
@@ -60,14 +60,20 @@ def _call_target(_target_: Callable, _partial_: bool, *args, **kwargs) -> Any:
for v... | diff --git a/tests/instantiate/__init__.py b/tests/instantiate/__init__.py
--- a/tests/instantiate/__init__.py
+++ b/tests/instantiate/__init__.py
@@ -3,7 +3,7 @@
import collections.abc
from dataclasses import dataclass
from functools import partial
-from typing import Any, Dict, List, Optional, Tuple
+from typing i... | ["tests/instantiate/test_instantiate.py::test_instantiate_adam_conf[instantiate2-True-expected_params0]", "tests/instantiate/test_instantiate.py::test_instantiate_with_missing_module[instantiate2]", "tests/instantiate/test_instantiate.py::test_instantiate_adam[instantiate2-dict_config-src0]", "tests/instantiate/test_in... | ["tests/instantiate/test_instantiate.py::test_override_target[instantiate2-dict-type:override_same_args]", "tests/instantiate/test_instantiate.py::test_convert_params_override[instantiate2-interpolation-all]", "tests/instantiate/test_instantiate.py::test_class_instantiate[instantiate2-dict-class_method_on_an_object_nes... | null | true | 2021-12-05T20:09:51Z | 1 | 12 | 6 | 990 | 0 | 0.85 | 1 | 0.7 | 1 | 0.205 | 86.215 | |
887 | swe_gym::train::337 | swe_gym | train | 337 | getmoto__moto-5582 | getmoto/moto | getmoto/moto | python | 2c0adaa9326745319c561a16bb090df609460acc | {AttributeError}type object 'FakeTrainingJob' has no attribute 'arn_formatter'
I've encountered what I think is a bug.
Whenever I try to call describe_training_job on a sagemaker client, and I give a training job name that doesn't exist, like so:
```
@mock_sagemaker
def test_fail_describe(self):
boto3.client('... | Thanks for raising this @vittoema96! Marking it as a bug. | diff --git a/moto/sagemaker/models.py b/moto/sagemaker/models.py
--- a/moto/sagemaker/models.py
+++ b/moto/sagemaker/models.py
@@ -165,8 +165,8 @@ def __init__(
self.debug_rule_configurations = debug_rule_configurations
self.tensor_board_output_config = tensor_board_output_config
self.experim... | diff --git a/tests/test_sagemaker/test_sagemaker_training.py b/tests/test_sagemaker/test_sagemaker_training.py
--- a/tests/test_sagemaker/test_sagemaker_training.py
+++ b/tests/test_sagemaker/test_sagemaker_training.py
@@ -441,3 +441,15 @@ def test_delete_tags_from_training_job():
response = client.list_tags(Res... | ["tests/test_sagemaker/test_sagemaker_training.py::test_describe_unknown_training_job"] | ["tests/test_sagemaker/test_sagemaker_training.py::test_list_training_jobs_paginated_with_fragmented_targets", "tests/test_sagemaker/test_sagemaker_training.py::test_list_training_jobs_none", "tests/test_sagemaker/test_sagemaker_training.py::test_list_training_jobs_multiple", "tests/test_sagemaker/test_sagemaker_traini... | null | true | 2022-10-19 20:48:26 | 2 | 30 | 1 | 607 | 0 | 0.85 | 1 | 0.7 | 1 | 0.201167 | 86.2035 | |
888 | swe_gym::train::978 | swe_gym | train | 978 | dask__dask-8601 | dask/dask | dask/dask | python | e148cd62828c7f12189842b59ddd6045c82ca361 | ValueError of shape mismatch when assigning vector to a slice of matrix
**What happened**: ValueError of shape mismatch when assigning a column vector to a slice of matrix.
**What you expected to happen**: the assignment should work without error
**Minimal Complete Verifiable Example**:
```python
import dask.array ... | Hi, this is another index parsing bug (sorry!) - I can make a PR for this. | diff --git a/dask/array/slicing.py b/dask/array/slicing.py
--- a/dask/array/slicing.py
+++ b/dask/array/slicing.py
@@ -1402,6 +1402,12 @@ def parse_assignment_indices(indices, shape):
>>> parse_assignment_indices((slice(-1, 2, -1), 3, [1, 2]), (7, 8, 9))
([slice(3, 7, 1), 3, array([1, 2])], [4, 2], [0], [0, 2... | diff --git a/dask/array/tests/test_array_core.py b/dask/array/tests/test_array_core.py
--- a/dask/array/tests/test_array_core.py
+++ b/dask/array/tests/test_array_core.py
@@ -3542,11 +3542,7 @@ def test_from_array_names():
@pytest.mark.parametrize(
- "array",
- [
- da.arange(100, chunks=25),
- ... | ["dask/array/tests/test_array_core.py::test_setitem_extended_API_1d[index5-value5]", "dask/array/tests/test_array_core.py::test_setitem_extended_API_2d[index20-value20]", "dask/array/tests/test_array_core.py::test_setitem_extended_API_2d[index22-value22]"] | ["dask/array/tests/test_array_core.py::test_normalize_chunks_nan", "dask/array/tests/test_array_core.py::test_stack_scalars", "dask/array/tests/test_array_core.py::test_astype", "dask/array/tests/test_array_core.py::test_meta[dtype1]", "dask/array/tests/test_array_core.py::test_vindex_basic", "dask/array/tests/test_arr... | null | true | 2022-01-21T09:24:39Z | 1 | 23 | 3 | 741 | 0 | 0.85 | 1 | 0.7 | 1 | 0.200167 | 86.2005 | |
889 | swe_gym::train::495 | swe_gym | train | 495 | python__mypy-13963 | python/mypy | python/mypy | python | 40d04a5af0b658ae5ef6181c7f3d89a984fe3547 | (🐞) `classmethod` on `TypedDict` leads to "AssertionError: fallback can't be filled out until semanal" with `--disallow-any-expr`
```py
from typing import TypedDict
class Foo(TypedDict):
@classmethod # E: AssertionError: fallback can't be filled out until semanal
def baz(cls) -> "Foo": ...
```
This happens d... | Oops, I was supposed to raise this as crash
To be clear, this snippet only causes mypy to crash if the `--disallow-any-expr` option is enabled. If the option is not enabled, everything's fine.
Yes, but who in their right mind would ever not have that enabled. Also it's enabled by default in basedmypy.
It's a legitimat... | diff --git a/mypy/semanal_typeddict.py b/mypy/semanal_typeddict.py
--- a/mypy/semanal_typeddict.py
+++ b/mypy/semanal_typeddict.py
@@ -23,6 +23,7 @@
NameExpr,
PassStmt,
RefExpr,
+ Statement,
StrExpr,
TempNode,
TupleExpr,
@@ -93,7 +94,7 @@ def analyze_typeddict_classdef(self, defn: Class... | diff --git a/test-data/unit/check-typeddict.test b/test-data/unit/check-typeddict.test
--- a/test-data/unit/check-typeddict.test
+++ b/test-data/unit/check-typeddict.test
@@ -221,6 +221,19 @@ reveal_type(d) # N: Revealed type is "TypedDict('__main__.D', {'y': builtins.in
[builtins fixtures/dict.pyi]
[typing fixtures... | ["mypy/test/testcheck.py::TypeCheckSuite::check-typeddict.test::testCannotCreateTypedDictWithDecoratedFunction"] | ["mypy/test/testcheck.py::TypeCheckSuite::check-typeddict.test::testTypedDictWithClassmethodAlternativeConstructorDoesNotCrash"] | null | true | 2022-10-29T21:42:34Z | 1 | 32 | 1 | 555 | 0 | 0.85 | 1 | 0.7 | 1 | 0.199167 | 86.1975 | |
890 | swe_gym::train::187 | swe_gym | train | 187 | getmoto__moto-5562 | getmoto/moto | getmoto/moto | python | 121e3eadb821955c74b5ab61b8cfbef7328e7592 | Problem with list_object_versions
I'm having some trouble using the function `list_object_versions` using the mock of S3. I create a versioned bucket, put an object and its created with the version id, what is expected, but when I try to list the versions, the dict returned by the `list_object_versions` does not come w... | Hi @JecaTatu, thanks for raising this! Looks like our delimiter is not quite working as it should, as it matches every key that contains the delimiter.
Looking at the docs it should only match keys that `contain the same string between the prefix and the first occurrence of the delimiter`. Marking this as a bug. :+1:... | diff --git a/moto/s3/models.py b/moto/s3/models.py
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -1601,10 +1601,12 @@ def list_object_versions(
# Filter for keys that start with prefix
if not name.startswith(prefix):
continue
- # separate out all keys that cont... | diff --git a/tests/test_s3/test_s3.py b/tests/test_s3/test_s3.py
--- a/tests/test_s3/test_s3.py
+++ b/tests/test_s3/test_s3.py
@@ -2463,6 +2463,20 @@ def test_list_object_versions_with_delimiter():
{"key11-without-data", "key12-without-data", "key13-without-data"}
)
+ # Delimiter with Prefix being th... | ["tests/test_s3/test_s3.py::test_list_object_versions_with_delimiter"] | ["tests/test_s3/test_s3.py::test_put_bucket_notification", "tests/test_s3/test_s3.py::test_get_bucket_cors", "tests/test_s3/test_s3.py::test_get_object", "tests/test_s3/test_s3.py::test_create_bucket_duplicate", "tests/test_s3/test_s3.py::test_list_objects_with_pagesize_0", "tests/test_s3/test_s3.py::test_list_object_v... | null | true | 2022-10-13 21:53:42 | 1 | 10 | 1 | 993 | 0 | 0.85 | 1 | 0.7 | 1 | 0.198833 | 86.1965 | |
891 | swe_gym::train::1025 | swe_gym | train | 1,025 | dask__dask-6608 | dask/dask | dask/dask | python | 06947129999ee480a6a977b081631723e7233ce9 | Dask DF opposite of fillna()
Hi, I want to fill non-na values to `1`. Suppose this is not directly available on Pandas either.
I tried with this approach (which is I often use with Pandas):
```python
import pandas as pd
import dask.dataframe as dd
ddf = dd.from_pandas(pd.DataFrame([[np.nan, 2, 5], [2, 5, np.nan], [2,... | When I tried without any assignment like:
```python
ddf[ddf.notnull()]
```
This shows an error:
```
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-105-6d1470a33e83> in <module>
----> 1 ddf[... | diff --git a/dask/dataframe/core.py b/dask/dataframe/core.py
--- a/dask/dataframe/core.py
+++ b/dask/dataframe/core.py
@@ -3573,6 +3573,9 @@ def __getitem__(self, key):
dsk = partitionwise_graph(operator.getitem, name, self, key)
graph = HighLevelGraph.from_collections(name, dsk, dependencies=... | diff --git a/dask/dataframe/tests/test_dataframe.py b/dask/dataframe/tests/test_dataframe.py
--- a/dask/dataframe/tests/test_dataframe.py
+++ b/dask/dataframe/tests/test_dataframe.py
@@ -3517,6 +3517,12 @@ def test_getitem_column_types(col_type):
assert_eq(df[cols], ddf[cols])
+def test_getitem_with_bool_dataf... | ["dask/dataframe/tests/test_dataframe.py::test_getitem_with_bool_dataframe_as_key", "dask/dataframe/tests/test_dataframe.py::test_setitem_with_numeric_column_name_raises_not_implemented", "dask/dataframe/tests/test_dataframe.py::test_setitem_with_bool_dataframe_as_key"] | ["dask/dataframe/tests/test_dataframe.py::test_repartition_npartitions[<lambda>1-float-2-5-False]", "dask/dataframe/tests/test_dataframe.py::test_repartition_npartitions[<lambda>1-M8[ns]-2-2-False]", "dask/dataframe/tests/test_dataframe.py::test_getitem_column_types[list]", "dask/dataframe/tests/test_dataframe.py::test... | null | true | 2020-09-08T14:40:47Z | 1 | 7 | 3 | 1,037 | 0 | 0.85 | 1 | 0.7 | 1 | 0.196167 | 86.1885 | |
892 | swe_bench_pro::test::9 | swe_bench_pro | test | 9 | instance_NodeBB__NodeBB-397835a05a8e2897324e566b41c5e616e172b4af-v89631a1cdb318276acb48860c5d78077211397c6 | NodeBB/NodeBB | nodebb/nodebb | javascript | 7f48edc02aa68c547d96ad7d6432ff8c1e359742 | ## Title:
List operations do not support removing multiple distinct elements in a single call
#### Description:
Currently, the list removal method only handles removing one element at a time. When providing an array of elements to remove, the method does not process them correctly.
### Step to Reproduce:
1. Create... | ## Requirements
- Maintain a list removal operation that accepts an input value that can be an array of distinct string elements to remove in a single call.
- Ensure that, when provided with multiple distinct string elements, the operation removes each specified element if it is present in the targeted list and leaves... | diff --git a/src/database/mongo/list.js b/src/database/mongo/list.js
index 740d9ffd5e59..e23b86bee420 100644
--- a/src/database/mongo/list.js
+++ b/src/database/mongo/list.js
@@ -54,9 +54,18 @@ module.exports = function (module) {
if (!key) {
return;
}
- value = helpers.valueToString(value);
+ const isArray... | diff --git a/test/database/list.js b/test/database/list.js
index 2d4c3ac4540d..f6f500f2f7e1 100644
--- a/test/database/list.js
+++ b/test/database/list.js
@@ -188,6 +188,15 @@ describe('List methods', () => {
done();
});
});
+
+ it('should remove multiple elements from list', async () => {
+ await db.lis... | ["test/database.js | Test database List methods listRemoveAll() should remove multiple elements from list"] | ["test/database.js | Test database should work", "test/database.js | Test database info should return info about database", "test/database.js | Test database info should not error and return info if client is falsy", "test/database.js | Test database checkCompatibility should not throw", "test/database.js | Test databa... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_NodeBB__NodeBB-397835a05a8e2897324e566b41c5e616e172b4af-v89631a1cdb318276acb48860c5d78077211397c6 | true | null | 3 | 29 | 1 | 795 | 0 | 0.95 | 1 | 0.7 | 1 | 0.229167 | 86.1875 | |
893 | swe_bench_verified::test::99 | swe_bench_verified | test | 99 | django__django-13121 | django/django | django/django | python | ec5aa2161d8015a3fe57dcbbfe14200cd18f0a16 | durations-only expressions doesn't work on SQLite and MySQL
Description
class Experiment(models.Model):
estimated_time = models.DurationField()
list(Experiment.objects.annotate(duration=F('estimated_time') + datime.timedelta(1)))
Traceback (most recent call last):
File "/home/sergey/dev/django/tests/expressions/test... | PR
There are test failures on the PR.
PR | diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py
--- a/django/db/backends/base/operations.py
+++ b/django/db/backends/base/operations.py
@@ -99,12 +99,6 @@ def date_extract_sql(self, lookup_type, field_name):
"""
raise NotImplementedError('subclasses of BaseDa... | diff --git a/tests/backends/base/test_operations.py b/tests/backends/base/test_operations.py
--- a/tests/backends/base/test_operations.py
+++ b/tests/backends/base/test_operations.py
@@ -93,10 +93,6 @@ def test_time_extract_sql(self):
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'd... | ["test_duration_expressions (expressions.tests.FTimeDeltaTests)"] | ["test_deconstruct (expressions.tests.FTests)", "test_deepcopy (expressions.tests.FTests)", "test_equal (expressions.tests.FTests)", "test_hash (expressions.tests.FTests)", "test_not_equal_Value (expressions.tests.FTests)", "test_empty_group_by (expressions.tests.ExpressionWrapperTests)", "test_non_empty_group_by (expr... | null | true | 2020-06-29T09:04:15Z | 4 | 70 | 1 | 1,187 | 0 | 1 | 1 | 0.7 | 0.85 | 0.431167 | 86.181 | |
894 | swe_bench_pro::test::42 | swe_bench_pro | test | 42 | instance_ansible__ansible-12734fa21c08a0ce8c84e533abdc560db2eb1955-v7eee2454f617569fd6889f2211f75bc02a35f9f8 | ansible/ansible | ansible/ansible | python | de01db08d00c8d2438e1ba5989c313ba16a145b0 | ## Title: Dumping an undefined value raises a YAML representation error instead of an undefined variable error
### Description
Dumping a value of type `AnsibleUndefined` through `AnsibleDumper` fails with `yaml.representer.RepresenterError: ('cannot represent an object', AnsibleUndefined)`.
The condition appears whene... | ## Requirements
- When a value of type `AnsibleUndefined` is dumped through `AnsibleDumper`, the dump must propagate the templating engine's own undefined-variable error, `UndefinedError` from `jinja2.exceptions`, rather than being converted into this project's own templating error, `AnsibleUndefinedVariable`, or repor... | diff --git a/changelogs/fragments/75072_undefined_yaml.yml b/changelogs/fragments/75072_undefined_yaml.yml
new file mode 100644
index 00000000000000..227c24de1bc3a7
--- /dev/null
+++ b/changelogs/fragments/75072_undefined_yaml.yml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+- yaml dumper - YAML representer for AnsibleUndefin... | diff --git a/test/units/parsing/yaml/test_dumper.py b/test/units/parsing/yaml/test_dumper.py
index 6578a6d1bfcdeb..5fbc139ba003ff 100644
--- a/test/units/parsing/yaml/test_dumper.py
+++ b/test/units/parsing/yaml/test_dumper.py
@@ -21,11 +21,14 @@
import io
import yaml
+from jinja2.exceptions import UndefinedError
+... | ["test/units/parsing/yaml/test_dumper.py::TestAnsibleDumper::test_undefined"] | ["test/units/parsing/yaml/test_dumper.py::TestAnsibleDumper::test_ansible_vault_encrypted_unicode", "test/units/parsing/yaml/test_dumper.py::TestAnsibleDumper::test_bytes", "test/units/parsing/yaml/test_dumper.py::TestAnsibleDumper::test_unicode", "test/units/parsing/yaml/test_dumper.py::TestAnsibleDumper::test_vars_wi... | ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-12734fa21c08a0ce8c84e533abdc560db2eb1955-v7eee2454f617569fd6889f2211f75bc02a35f9f8 | true | null | 3 | 26 | 1 | 820 | 0 | 0.95 | 1 | 0.7 | 1 | 0.223333 | 86.17 | |
895 | swe_gym::train::1101 | swe_gym | train | 1,101 | pydantic__pydantic-6212 | pydantic/pydantic | pydantic/pydantic | python | 83302a9c747153364d18ffd8a092b13951dc2d35 | Properties order v1 -> v2
related https://github.com/tiangolo/fastapi/discussions/9709#discussioncomment-6239747
```Python
class Payload(BaseModel):
username: Optional[str] = None
password: Optional[str] = None
```
when I generate schema the order of the fields changes:
```
{
"properties": {
"password"... | I don't think it's a bug per say, since it was introduced on purpose on #6043, but since we don't provide a way to customize it, I think we should revert it.
What do you think @adriangb ?
> I don't think it's a bug per say
Yeah, technically it is not , but from UI perspective it's a nightmare :D
I think that the ... | diff --git a/pydantic/json_schema.py b/pydantic/json_schema.py
--- a/pydantic/json_schema.py
+++ b/pydantic/json_schema.py
@@ -1656,11 +1656,14 @@ def _make_json_hashable(value: _Json) -> _HashableJson:
return value
-def _sort_json_schema(value: JsonSchemaValue) -> JsonSchemaValue:
+def _sort_json_schema(v... | 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
@@ -116,7 +116,7 @@ class ApplePie(BaseModel):
},
'required': ['Snap'],
}
- assert list(ApplePie.model_json_schema(by_alias=True)['properties'].keys()) == ['Crackl... | ["tests/test_json_schema.py::test_json_schema_keys_sorting", "tests/test_json_schema.py::test_by_alias"] | ["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 | 2023-06-21T13:46:43Z | 1 | 9 | 2 | 952 | 0 | 0.85 | 1 | 0.7 | 1 | 0.188667 | 86.166 | |
896 | swe_gym::train::996 | swe_gym | train | 996 | dask__dask-9235 | dask/dask | dask/dask | python | 3456d42e5642700f4cb2948f5b0d0e3f37306a82 | wrong calculation of `warnsize` in slicing?
**What happened**:
```
PerformanceWarning: Slicing is producing a large chunk.
```
**What you expected to happen**:
No performance warning. Resulting chunks are each below 10MiB.
**Minimal Complete Verifiable Example**:
```python
import numpy as np
import dask.array as da... | cc @TomAugspurger
I haven't looked at this in a while. It does look like a bug and your suggested fix seems right. But we should make sure that there isn't an intermediate chunk created that exceeds the warning threshold.
@jakirkham when you are back from PTO can you take a look at this ?
I looked at this with @ian-r-... | diff --git a/dask/array/slicing.py b/dask/array/slicing.py
--- a/dask/array/slicing.py
+++ b/dask/array/slicing.py
@@ -615,10 +615,10 @@ def take(outname, inname, chunks, index, itemsize, axis=0):
>>> import dask
>>> with dask.config.set({"array.slicing.split-large-chunks": True}):
- ... chunks, dsk... | diff --git a/dask/array/tests/test_slicing.py b/dask/array/tests/test_slicing.py
--- a/dask/array/tests/test_slicing.py
+++ b/dask/array/tests/test_slicing.py
@@ -874,8 +874,15 @@ def test_slicing_plan(chunks, index, expected):
def test_getitem_avoids_large_chunks():
with dask.config.set({"array.chunk-size": "0.1... | ["dask/array/tests/test_slicing.py::test_getitem_avoids_large_chunks"] | ["dask/array/tests/test_slicing.py::test_slicing_with_Nones[index1-shape0]", "dask/array/tests/test_slicing.py::test_negative_n_slicing", "dask/array/tests/test_slicing.py::test_gh4043[True-True-True]", "dask/array/tests/test_slicing.py::test_take_sorted", "dask/array/tests/test_slicing.py::test_index_with_int_dask_arr... | null | true | 2022-07-01T19:51:35Z | 1 | 6 | 1 | 972 | 0 | 0.85 | 1 | 0.7 | 1 | 0.182 | 86.146 | |
897 | swe_gym::train::439 | swe_gym | train | 439 | python__mypy-11215 | python/mypy | python/mypy | python | 8e82171a3e68a5180fab267cad4d2b7cfa1f5cdc | "Cannot determine type of ..." when using decorators
**Bug Report**
**To Reproduce**
Content of `tmp.py`
```python
from typing import Callable, TypeVar
C = TypeVar('C', bound=Callable)
def dec(val: None) -> Callable[[C], C]:
def wrapper(f):
return f
return wrapper
# E: Cannot determine type of "fo... | Surprisingly, with a regular identity as a decorator it works fine:
```python
from typing import Callable, TypeVar
C = TypeVar('C', bound=Callable)
def dec(f: C) -> C:
return f
lambda: foo() == 2
@dec
def foo() -> int:
return 2
```
Another surprising discovery: it also works fine when bot... | diff --git a/mypy/checker.py b/mypy/checker.py
--- a/mypy/checker.py
+++ b/mypy/checker.py
@@ -389,8 +389,8 @@ def defer_node(self, node: DeferredNodeType, enclosing_class: Optional[TypeInfo]
self.deferred_nodes.append(DeferredNode(node, enclosing_class))
def handle_cannot_determine_type(self, name: str... | diff --git a/test-data/unit/check-callable.test b/test-data/unit/check-callable.test
--- a/test-data/unit/check-callable.test
+++ b/test-data/unit/check-callable.test
@@ -301,6 +301,28 @@ def f(t: T) -> A:
[builtins fixtures/callable.pyi]
+[case testCallableTypeVarBoundAndLambdaDefer]
+# See https://github.com/pyt... | ["mypy/test/testcheck.py::TypeCheckSuite::testCallableTypeVarBoundAndLambdaDefer"] | ["mypy/test/testcheck.py::TypeCheckSuite::testCallableTypeUnion", "mypy/test/testcheck.py::TypeCheckSuite::testDeferredAndOptionalInferenceSpecialCase"] | null | true | 2021-09-28T11:42:28Z | 2 | 12 | 1 | 852 | 0 | 0.85 | 1 | 0.7 | 1 | 0.182 | 86.146 | |
898 | swe_gym::train::809 | swe_gym | train | 809 | iterative__dvc-1942 | iterative/dvc | iterative/dvc | python | 8bb21261e34c9632453e09090de7ebe50e38d341 | init: the welcome message appears even when --quiet is used
version: `0.35.7`
To reproduce: `dvc init --quiet`
Expected: No message at all
Current: Displays the following
```
+---------------------------------------------------------------------+
| |
... | I am not sure that should be hidden on 'quiet'. This is quite important information for some users, and might be treated as lack of transparency from our side if implemented. Maybe we should consider adding manual config option to turn this message off?
EDIT I am talking about usage analytics
I think if someone spec... | diff --git a/dvc/config.py b/dvc/config.py
--- a/dvc/config.py
+++ b/dvc/config.py
@@ -179,7 +179,7 @@ class Config(object): # pylint: disable=too-many-instance-attributes
SECTION_CORE_STORAGEPATH = "storagepath"
SECTION_CORE_SCHEMA = {
- Optional(SECTION_CORE_LOGLEVEL, default="info"): And(
+ ... | diff --git a/tests/func/test_init.py b/tests/func/test_init.py
--- a/tests/func/test_init.py
+++ b/tests/func/test_init.py
@@ -64,3 +64,10 @@ def test_cli(self):
self.assertEqual(ret, 0)
self._test_init()
+
+
+def test_init_quiet_should_not_display_welcome_screen(git, caplog):
+ ret = main(["init... | ["tests/func/test_init.py::test_init_quiet_should_not_display_welcome_screen"] | ["tests/func/test_init.py::TestInit::test_api", "tests/func/test_init.py::TestDoubleInit::test", "tests/func/test_init.py::TestInit::test_cli", "tests/func/test_init.py::TestDoubleInit::test_api", "tests/func/test_init.py::TestDoubleInit::test_cli", "tests/func/test_init.py::TestInitNoSCMFail::test_api", "tests/func/te... | null | true | 2019-04-27T02:03:12Z | 2 | 10 | 1 | 864 | 0 | 0.85 | 1 | 0.7 | 1 | 0.177333 | 86.132 | |
899 | swe_gym::train::774 | swe_gym | train | 774 | iterative__dvc-3998 | iterative/dvc | iterative/dvc | python | 5efc3bbee2aeaf9f1e624c583228bc034333fa25 | Machine readable format of DVC status
Hi guys, can we have machine readable output format option for `dvc status`, for example:
```
dvc status --json
{
"stages": [
{
"name": "path/to/a.txt.dvc",
"deps_changed": ["path/to/b.txt.dvc"],
"outs_changed": [],
"... | Great point! Our internal API function dvc/project.py:Project.status() actually returns a dict, which then gets printed in dvc/command/status.py, so it should be pretty easy to implement.
Just need to add `--json` option in the dvc/cli.py for `dvc status` and then process it in `dvc/command/status.py` and json.dump() ... | diff --git a/dvc/command/data_sync.py b/dvc/command/data_sync.py
--- a/dvc/command/data_sync.py
+++ b/dvc/command/data_sync.py
@@ -363,5 +363,11 @@ def add_parser(subparsers, _parent_parser):
default=False,
help="Show status of all stages in the specified directory.",
)
+ status_parser.add_arg... | diff --git a/tests/unit/command/test_status.py b/tests/unit/command/test_status.py
--- a/tests/unit/command/test_status.py
+++ b/tests/unit/command/test_status.py
@@ -1,3 +1,7 @@
+import json
+
+import pytest
+
from dvc.cli import parse_args
from dvc.command.status import CmdDataStatus
@@ -38,3 +42,34 @@ def test_c... | ["tests/unit/command/test_status.py::test_status_quiet[status0-0]", "tests/unit/command/test_status.py::test_status_show_json[status1]", "tests/unit/command/test_status.py::test_status_show_json[status0]", "tests/unit/command/test_status.py::test_status_show_json[status2]"] | ["tests/unit/command/test_status.py::test_status_quiet[status2-1]", "tests/unit/command/test_status.py::test_cloud_status", "tests/unit/command/test_status.py::test_status_quiet[status1-1]"] | null | true | 2020-06-09T20:49:37Z | 2 | 21 | 4 | 629 | 0 | 0.85 | 1 | 0.7 | 1 | 0.174833 | 86.1245 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.