Dataset Viewer
Auto-converted to Parquet Duplicate
instance_id
string
hints_text
string
patch
string
test_patch
string
created_at
string
problem_statement
string
repo
string
base_commit
string
version
string
PASS_TO_PASS
list
FAIL_TO_PASS
list
eval_script
string
__index_level_0__
int64
getmoto__moto-5752
Here's the culprit: https://github.com/spulec/moto/blob/8f074b0799e4e5303f219549e177d52b016c2dfb/moto/ssm/models.py#L1612 That line returns True from the middle of the for loop. But that function is supposed to only return False from the for loop, and True at the end. A solution would be something like: ```...
diff --git a/moto/ssm/models.py b/moto/ssm/models.py --- a/moto/ssm/models.py +++ b/moto/ssm/models.py @@ -1606,22 +1606,26 @@ def _match_filters(self, parameter, filters=None): else: continue elif key.startswith("tag:"): - what = key[4:] or None - ...
diff --git a/tests/test_ssm/test_ssm_boto3.py b/tests/test_ssm/test_ssm_boto3.py --- a/tests/test_ssm/test_ssm_boto3.py +++ b/tests/test_ssm/test_ssm_boto3.py @@ -67,21 +67,14 @@ def test_delete_parameters(): def test_get_parameters_by_path(): client = boto3.client("ssm", region_name="us-east-1") - client.pu...
2022-12-10 20:23:01
describe_parameters depends on filter order, but shouldn't # Summary When calling `ssm` `describe_parameters`, you can pass in a list of filters. I have seen different behavior based on the order of my filters. With certain orders, the values returned do not match the filters. # MWE Let's create two paramete...
getmoto/moto
b2300f1eae1323e3e8bc45f97e530ce129dff12e
4.0
[ "tests/test_ssm/test_ssm_boto3.py::test_get_parameters_should_only_return_unique_requests", "tests/test_ssm/test_ssm_boto3.py::test_describe_parameters_attributes", "tests/test_ssm/test_ssm_boto3.py::test_describe_parameters_invalid_parameter_filters[filters6-The", "tests/test_ssm/test_ssm_boto3.py::test_desc...
[ "tests/test_ssm/test_ssm_boto3.py::test_describe_parameters__multiple_tags" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff b2300f1eae1323e3e8...
11
getmoto__moto-7646
diff --git a/moto/dynamodb/parsing/executors.py b/moto/dynamodb/parsing/executors.py --- a/moto/dynamodb/parsing/executors.py +++ b/moto/dynamodb/parsing/executors.py @@ -155,7 +155,11 @@ def execute(self, item: Item) -> None: DDBTypeConversion.get_human_type(string_set_to_remove.type), ) ...
diff --git a/tests/test_dynamodb/test_dynamodb_update_expressions.py b/tests/test_dynamodb/test_dynamodb_update_expressions.py --- a/tests/test_dynamodb/test_dynamodb_update_expressions.py +++ b/tests/test_dynamodb/test_dynamodb_update_expressions.py @@ -89,3 +89,54 @@ def test_update_item_add_float(table_name=None): ...
2024-04-30 18:49:24
DynamoDB: Using DELETE fails if attribute does not exist I believe there is a mismatch in behavior between moto and the real DynamoDB: - On the real DynamoDB, when using the DELETE operator in `update_item` to remove an item from an attribute that does not exist, it will just be ignored. - In moto, a cryptic error...
getmoto/moto
98ad497eb4de25943ceadabe7c2c5c73cc810e27
5.0
[ "tests/test_dynamodb/test_dynamodb_update_expressions.py::test_update_item_add_float", "tests/test_dynamodb/test_dynamodb_update_expressions.py::test_update_different_map_elements_in_single_request" ]
[ "tests/test_dynamodb/test_dynamodb_update_expressions.py::test_delete_non_existing_item" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 98ad497eb4de25943c...
63
getmoto__moto-7168
Hi @abrahamko, thanks for raising this. Marking it as an enhancement to add validation for this use case.
diff --git a/moto/scheduler/exceptions.py b/moto/scheduler/exceptions.py --- a/moto/scheduler/exceptions.py +++ b/moto/scheduler/exceptions.py @@ -8,8 +8,10 @@ def __init__(self, name: str) -> None: class ScheduleNotFound(JsonRESTError): - def __init__(self) -> None: - super().__init__("ResourceNotFoundE...
diff --git a/tests/test_scheduler/test_scheduler.py b/tests/test_scheduler/test_scheduler.py --- a/tests/test_scheduler/test_scheduler.py +++ b/tests/test_scheduler/test_scheduler.py @@ -175,6 +175,17 @@ def test_get_schedule_for_unknown_group(): assert err["Code"] == "ResourceNotFoundException" +@mock_schedul...
2023-12-29 06:22:47
Scheduler should raise ResourceNotFoundException for delete_schedule if not exists Calling delete_schedule for unknown schedule name raises KeyError instead of ResourceNotFoundException. ``` File "/Source/SH-service/.venv/lib/python3.8/site-packages/moto/scheduler/responses.py", line 60, in delete_schedule sel...
getmoto/moto
e5f962193cb12e696bd6ec641844c4d09b5fb87c
4.2
[ "tests/test_scheduler/test_scheduler.py::test_list_schedules", "tests/test_scheduler/test_scheduler.py::test_create_get_schedule", "tests/test_scheduler/test_scheduler.py::test_create_duplicate_schedule", "tests/test_scheduler/test_scheduler.py::test_create_get_delete__in_different_group", "tests/test_sched...
[ "tests/test_scheduler/test_scheduler.py::test_get_schedule_for_none_existing_schedule", "tests/test_scheduler/test_scheduler.py::test_delete_schedule_for_none_existing_schedule" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff e5f962193cb12e696b...
90
getmoto__moto-6308
diff --git a/moto/s3/responses.py b/moto/s3/responses.py --- a/moto/s3/responses.py +++ b/moto/s3/responses.py @@ -1627,7 +1627,7 @@ def _key_response_put( checksum_algorithm = request.headers.get("x-amz-checksum-algorithm") if checksum_algorithm: checksum_value = compute_chec...
diff --git a/tests/test_s3/test_s3_copyobject.py b/tests/test_s3/test_s3_copyobject.py --- a/tests/test_s3/test_s3_copyobject.py +++ b/tests/test_s3/test_s3_copyobject.py @@ -68,6 +68,18 @@ def test_copy_key_boto3_with_sha256_checksum(): assert "ChecksumSHA256" in resp["Checksum"] assert resp["Checksum"]["Che...
2023-05-10 09:29:21
S3 CopyObject in place with Checksum raises an exception Since adding the checksum to CopyObject, moto will raise an exception if you try to copy an object in place while requesting its checksum, because it tries to use the source key `.value`, but that key has been overwritten by the new one copied one in place. He...
getmoto/moto
52846c9555a3077b11a391fbfcd619d0d6e776f6
4.1
[ "tests/test_s3/test_s3_copyobject.py::test_copy_key_replace_metadata", "tests/test_s3/test_s3_copyobject.py::test_copy_object_from_unversioned_to_versioned_bucket", "tests/test_s3/test_s3_copyobject.py::test_copy_object_in_place_with_metadata", "tests/test_s3/test_s3_copyobject.py::test_copy_key_boto3[the-key...
[ "tests/test_s3/test_s3_copyobject.py::test_copy_key_boto3_with_sha256_checksum" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 52846c9555a3077b11...
102
getmoto__moto-5562
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...
2022-10-13 21:53:42
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...
getmoto/moto
121e3eadb821955c74b5ab61b8cfbef7328e7592
4.0
[ "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_...
[ "tests/test_s3/test_s3.py::test_list_object_versions_with_delimiter" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 121e3eadb821955c74...
187
python__mypy-10392
diff --git a/mypy/modulefinder.py b/mypy/modulefinder.py --- a/mypy/modulefinder.py +++ b/mypy/modulefinder.py @@ -627,6 +627,25 @@ def _make_abspath(path: str, root: str) -> str: return os.path.join(root, os.path.normpath(path)) +def add_py2_mypypath_entries(mypypath: List[str]) -> List[str]: + """Add ...
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 @@ -2843,3 +2843,41 @@ __all__ = ['C'] [file m4.pyi] class C: pass [builtins fixtures/list.pyi] + +[case testMypyPathAndPython2Dir_python2] +# flags: --co...
2021-04-30T15:58:20Z
Look into @python2 subdirectories of mypy search path entries in Python 2 mode Typeshed uses the `@python2` subdirectory for Python 2 variants of stubs. Mypy could also support this convention for custom search paths. This would make dealing with mixed Python 2/3 codebases a little easier. If there is a user-defined...
python/mypy
322ef60ba7231bbd4f735b273e88e67afb57ad17
0.820
[ "mypy/test/testcheck.py::TypeCheckSuite::testMypyPathAndPython2Dir" ]
[ "mypy/test/testcheck.py::TypeCheckSuite::testMypyPathAndPython2Dir_python2" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 322ef60ba7231bbd4f...
352
python__mypy-15366
diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py --- a/mypy/checkexpr.py +++ b/mypy/checkexpr.py @@ -2166,15 +2166,7 @@ def check_arg( if isinstance(caller_type, DeletedType): self.msg.deleted_as_rvalue(caller_type, context) # Only non-abstract non-protocol class can be given where Type...
diff --git a/test-data/unit/check-abstract.test b/test-data/unit/check-abstract.test --- a/test-data/unit/check-abstract.test +++ b/test-data/unit/check-abstract.test @@ -196,6 +196,24 @@ x: Type[B] f(x) # OK [out] +[case testAbstractTypeInADict] +from typing import Dict, Type +from abc import abstractmethod + +cl...
2023-06-04T07:41:59Z
False-negative `type-abstract` in dictionary initialization **Bug Report** `type-abstract` is falsely missing when initializing a dictionary. **To Reproduce** ```python """False-negative `type-abstract`.""" from abc import abstractmethod class Class: @abstractmethod def method(self) -> None: ...
python/mypy
21c5439dccfc6fc21f126200b95b0552f503d5da
1.4
[ "mypy/test/testcheck.py::TypeCheckSuite::check-abstract.test::testInstantiationAbstractsInTypeForAliases" ]
[ "mypy/test/testcheck.py::TypeCheckSuite::check-abstract.test::testAbstractTypeInADict" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 21c5439dccfc6fc21f...
373
python__mypy-14007
cc @ilevkivskyi
diff --git a/mypy/typeops.py b/mypy/typeops.py --- a/mypy/typeops.py +++ b/mypy/typeops.py @@ -71,13 +71,13 @@ def is_recursive_pair(s: Type, t: Type) -> bool: """ if isinstance(s, TypeAliasType) and s.is_recursive: return ( - isinstance(get_proper_type(t), Instance) + isinstanc...
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 @@ -808,3 +808,21 @@ def test2() -> Tree2: def test3() -> Tree3: return 42 # E: Incompatible return value type (got "i...
2022-11-04T15:16:13Z
Crash with recursive types I just notice #731 closed and I thought giving it a go. ``` git clone git@github.com:psycopg/psycopg.git cd psycopg git reset --hard 82b84e33 python3 -m venv .venv source .venv/bin/activate pip install ./psycopg[test,dev] # Install mypy at release-0.990 pip install "git+https://g...
python/mypy
796068d06a0ab171d22f7be555c28dfad57db433
1.0
[]
[ "mypy/test/testcheck.py::TypeCheckSuite::check-recursive-types.test::testRecursiveDoubleUnionNoCrash" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff 796068d06a0ab171d2...
425
python__mypy-15413
Thanks for posting your repro! The thing that's changed between 0.782 and 0.790 is the definition of `sorted`. `key` used to be a function that returned `Any`, but is now marked as a function that returns a `SupportsLessThan`. This makes it similar to #9590 where itertools.groupby takes a function that returns a typev...
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -4270,6 +4270,7 @@ def check_return_stmt(self, s: ReturnStmt) -> None: isinstance(return_type, Instance) and return_type.type.fullname == "builtins.object" ...
diff --git a/test-data/unit/check-flags.test b/test-data/unit/check-flags.test --- a/test-data/unit/check-flags.test +++ b/test-data/unit/check-flags.test @@ -2184,3 +2184,14 @@ def f(x: bytes, y: bytearray, z: memoryview) -> None: follow_imports = skip follow_imports_for_stubs = true [builtins fixtures/dict.pyi] + ...
2023-06-11T11:27:21Z
Warn Return Any now applies to small lambdas **Bug Report** Suppose we have the follow code: ```python from typing import Any x: Any = [1, 2, 3] sorted([0, 2, 1], key=lambda i: x[i]) ``` With `mypy 0.790`, I get an error: ``` $ mypy --warn-return-any scratch.py scratch.py:4: error: Returning Any from fu...
python/mypy
e7b917ec7532206b996542570f4b68a33c3ff771
1.4
[]
[ "mypy/test/testcheck.py::TypeCheckSuite::check-flags.test::testReturnAnyLambda" ]
#!/bin/bash set -exo pipefail # Activate conda environment source /opt/miniconda3/bin/activate conda activate testbed # Navigate to testbed cd /testbed # Set git safe directory git config --global --add safe.directory /testbed # Repository state inspection cd /testbed git status git show git diff e7b917ec7532206b99...
508
python__mypy-10572
"Protocols already do (1) for incompatible types (but not for incompatible override in an explicit s(...TRUNCATED)
"diff --git a/mypy/checker.py b/mypy/checker.py\n--- a/mypy/checker.py\n+++ b/mypy/checker.py\n@@ -1(...TRUNCATED)
"diff --git a/test-data/unit/check-abstract.test b/test-data/unit/check-abstract.test\n--- a/test-da(...TRUNCATED)
2021-06-01T16:58:47Z
"Better message if method incompatible with base class\nCurrently if a method is incompatible with a(...TRUNCATED)
python/mypy
e07ad3b3bad14ddde2e06982eab87db104a90add
0.920
["mypy/test/testcheck.py::TypeCheckSuite::testOverloadErrorMessageManyMatches","mypy/test/testcheck.(...TRUNCATED)
["mypy/test/testcheck.py::TypeCheckSuite::testInvalidOverrideArgumentCountWithImplicitSignature3","m(...TRUNCATED)
"#!/bin/bash\nset -exo pipefail\n\n# Activate conda environment\nsource /opt/miniconda3/bin/activate(...TRUNCATED)
529
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
12