base_commit stringlengths 40 40 | created_at stringdate 2015-01-23 22:30:09 2025-07-21 08:49:06 | image_name stringlengths 44 86 | instance_id stringlengths 14 56 | interface stringlengths 33 15.4k | language stringclasses 1
value | license stringclasses 9
values | patch stringlengths 231 32k | pr_description stringlengths 8 8.53k | problem_statement stringlengths 15 29.5k | repo stringclasses 408
values | test_patch stringlengths 246 31.6k | FAIL_TO_PASS listlengths 1 3.87k | PASS_TO_PASS listlengths 0 10.7k | install_config dict | meta dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0b472374af1ab91000ea244a0da44d49c04c7cce | 2024-03-09 22:17:18 | docker.io/swerebenchv2/pallets-werkzeug:2864-0b47237 | pallets__werkzeug-2864 | Function: parse_converter_args(argstr: str) -> tuple[tuple[Any, ...], dict[str, Any]]
Location: werkzeug.routing.rules
Inputs:
- **argstr** (str): Converter argument string expected to be a comma‑separated list of Python‑style arguments (e.g., `"min=0, max=500"`). Any segment that cannot be matched by the internal reg... | python | BSD-3-Clause | diff --git a/CHANGES.rst b/CHANGES.rst
index c7f5aeba..b2f2a08f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -12,6 +12,8 @@ Unreleased
- Fix response_wrapper type check in test client. :issue:`2831`
- Make the return type of ``MultiPartParser.parse`` more
precise. :issue:`2840`
+- Raise an error if conver... | Raise an error if the converter arguments cannot be parsed
This could happen for example with `min=0;max=500` as the `;` is not a word character everything before it is ignored in the regex during the finditer call. This then lefts the user confused as the `min=0;` was silently ignored.
fixes #2822
Checklist:
... | Built-in converters do not check syntax of the parameters
Hey, everybody.
I noticed that default Converters do not check correct syntax of parameters such as:
- minlength
- maxlength
- e.t.c
when using the ";" delimiter instead of "," (there is no clear and exhaustive description of this in the documentation, ... | pallets/werkzeug | diff --git a/tests/test_routing.py b/tests/test_routing.py
index 5291348c..02db898d 100644
--- a/tests/test_routing.py
+++ b/tests/test_routing.py
@@ -1076,6 +1076,9 @@ def test_converter_parser():
args, kwargs = r.parse_converter_args('"foo", "bar"')
assert args == ("foo", "bar")
+ with pytest.raises(Va... | [
"tests/test_routing.py::test_converter_parser"
] | [
"tests/test_routing.py::test_basic_routing",
"tests/test_routing.py::test_merge_slashes_match",
"tests/test_routing.py::test_merge_slash_encoding[/merge/%//path-/merge/%25/path]",
"tests/test_routing.py::test_merge_slash_encoding[/merge//st/path-/merge/st/path]",
"tests/test_routing.py::test_merge_slashes_b... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.98,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://werkzeug.palletsprojects.com/en/3.0.x/routing/... |
87bf5464db78af17375802d5354b96e98398ca6e | 2024-09-09 12:38:41 | docker.io/swerebenchv2/pallets-werkzeug:2949-87bf546 | pallets__werkzeug-2949 | Method: ResponseCacheControl.stale_while_revalidate(self)
Location: src/werkzeug/datastructures/cache_control.py – defined via ``cache_control_property("stale-while-revalidate", None, int)``.
Inputs: None (property getter). Returns: ``int`` if the ``stale-while-revalidate`` directive is present in the header, other... | python | BSD-3-Clause | diff --git a/CHANGES.rst b/CHANGES.rst
index 3fcd0ae4..4c21d209 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -9,6 +9,8 @@ Unreleased
- ``CacheControl.no_transform`` is a boolean when present. ``min_fresh`` is
``None`` when not present. Added the ``must_understand`` attribute. Fixed
some typing issues on c... | Add support for RFC5861 Cache-Control headers
This PR adds the RFC5861 headers (`stale-while-revalidate` and `stale-if-error`) to the werkzeug `ResponseCacheControl` class. This is done by just adding more properties.
fixes #2948
(Haven't yet added all the right docs and so on, but will do so)
<!--
Ensure each... | Add support for RFC5861 Cache-Control headers
[RFC5861](https://datatracker.ietf.org/doc/html/rfc5861) standardised two Cache-Control extensions:
1. `stale-while-revalidate`
2. `stale-if-error`
Please add support for these in the standard werkzerg `ResponseCacheControl`.
One use case of these extensions is to a... | pallets/werkzeug | diff --git a/tests/test_datastructures.py b/tests/test_datastructures.py
index 830dfefd..a681c022 100644
--- a/tests/test_datastructures.py
+++ b/tests/test_datastructures.py
@@ -973,6 +973,18 @@ class TestCacheControl:
cc = ds.ResponseCacheControl()
assert cc.must_understand is False
+ def test_... | [
"tests/test_datastructures.py::TestCacheControl::test_stale_while_revalidate",
"tests/test_datastructures.py::TestCacheControl::test_stale_if_error"
] | [
"tests/test_datastructures.py::TestNativeItermethods::test_basic",
"tests/test_datastructures.py::TestImmutableTypeConversionDict::test_follows_dict_interface",
"tests/test_datastructures.py::TestImmutableTypeConversionDict::test_copies_are_mutable",
"tests/test_datastructures.py::TestImmutableTypeConversionD... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.98,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://datatracker.ietf.org/doc/html/rfc5861"
],
... |
3c0dbfaff23d7bdf4b0972c92cc51a85820ff5ec | 2024-10-24 16:49:03 | docker.io/swerebenchv2/neurodatawithoutborders-pynwb:1975-3c0dbfa | neurodatawithoutborders__pynwb-1975 | Method: PatchClampSeries.__init__(self, name: str, data, unit: str, electrode, gain: float = None, **kwargs)
Location: src/pynwb/icephys.py (class PatchClampSeries, inherits TimeSeries)
Inputs:
- **name** (str): identifier for the series.
- **data** (array‑like): recorded values.
- **unit** (str): physical unit of the ... | python | custom-check-github | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 971c9d79..d0989e10 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,7 +12,8 @@
- Fixed bug in how `ElectrodeGroup.__init__` validates its `position` argument. @oruebel [#1770](https://github.com/NeurodataWithoutBorders/pynwb/pull/1770)
- Changed `SpatialSeries.referen... | make PatchClampSeries gain optional to match the schema
## Motivation
Fix #1971. `PatchClampSeries.gain` is an optional dataset in the schema but required by pynwb. This PR makes it optional in pynwb as well.
## How to test the behavior?
Follow the icephys tutorial but remove gain as an argument from the `Voltag... | [Bug]: PatchClampSeries gain is optional in the schema but required in pynwb
### What happened?
I believe the schema indicates that `PatchClampSeries.gain` is an optional dataset with a quantity of 0 or 1:
https://github.com/NeurodataWithoutBorders/nwb-schema/blob/35889d36dfa088ec4a3614fa0350c02ced4a068c/core/nwb.i... | NeurodataWithoutBorders/pynwb | diff --git a/tests/integration/hdf5/test_icephys.py b/tests/integration/hdf5/test_icephys.py
index 4fba6d28..b50e5d9f 100644
--- a/tests/integration/hdf5/test_icephys.py
+++ b/tests/integration/hdf5/test_icephys.py
@@ -66,6 +66,27 @@ class TestPatchClampSeries(AcquisitionH5IOMixin, TestCase):
nwbfile.add_devic... | [
"tests/integration/hdf5/test_icephys.py::TestPatchClampSeriesMin::test_roundtrip",
"tests/integration/hdf5/test_icephys.py::TestPatchClampSeriesMin::test_roundtrip_export",
"tests/unit/test_icephys.py::PatchClampSeriesConstructor::test_gain_optional"
] | [
"tests/integration/hdf5/test_icephys.py::TestIntracellularElectrode::test_roundtrip",
"tests/integration/hdf5/test_icephys.py::TestIntracellularElectrode::test_roundtrip_export",
"tests/integration/hdf5/test_icephys.py::TestPatchClampSeries::test_roundtrip",
"tests/integration/hdf5/test_icephys.py::TestPatchC... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.95,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/NeurodataWithoutBorders/nwb-schema/... |
91376829c2fcf1ecc2376255c1faa055e5f769fe | 2023-12-21 10:09:25 | docker.io/swerebenchv2/researchobject-ro-crate-py:168-9137682 | researchobject__ro-crate-py-168 | Function: is_url(string)
Location: rocrate.utils.is_url
Inputs:
- **string** (str): The text to evaluate. Must be a non‑empty string; on Windows a single‑character scheme (e.g., “C”) is not considered a URL.
Outputs:
- **bool**: Returns `True` if the string contains a URL scheme component (e.g., “http”, “https”, “ftp... | python | Apache-2.0 | diff --git a/rocrate/utils.py b/rocrate/utils.py
index 18aa6f2..434fb41 100644
--- a/rocrate/utils.py
+++ b/rocrate/utils.py
@@ -33,7 +33,7 @@ def is_url(string):
parts = urlsplit(string)
if os.name == "nt" and len(parts.scheme) == 1:
return False
- return all((parts.scheme, parts.path))
+ retu... | Fix is_url
Fixes #167.
The `is_url` utility failed to recognize URLs that don't have a path part, e.g. `http://example.com`. | BUG: If Root Data Entity has an arcp:// ID the arcp:// part gets stripped off it
Here's some code to reproduce the error:
```python
from rocrate.rocrate import ROCrate
import json
import os
test_crate = {
"@context": [
"https://w3id.org/ro/crate/1.1/context",
{
"@vocab": "http://schema.org/"
... | ResearchObject/ro-crate-py | diff --git a/test/test_utils.py b/test/test_utils.py
index 7b0607b..20a8504 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -18,7 +18,7 @@
import pytest
-from rocrate.utils import subclasses, get_norm_value
+from rocrate.utils import subclasses, get_norm_value, is_url
class Pet:
@@ -53,3 +53,12 @@... | [
"test/test_utils.py::test_is_url"
] | [
"test/test_utils.py::test_subclasses",
"test/test_utils.py::test_get_norm_value"
] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.92,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": [
... |
246defd63f4ea1f911d31a9c203e4c15876a15a0 | 2018-05-17 18:47:31 | docker.io/swerebenchv2/maniacallabs-bibliopixel:807-246defd | maniacallabs__bibliopixel-807 | Method: OffsetRange.__init__(self, offset=0, begin=None, end=None)
Location: bibliopixel/util/offset_range.py
Inputs:
- offset (int, optional) – channel offset applied to indices.
- begin (int or None) – start of the inclusive range; defaults to class‑specific BEGIN.
- end (int or None) – end of the inclusive rang... | python | MIT | diff --git a/bibliopixel/control/artnet.py b/bibliopixel/control/artnet.py
index 164f48a..d277ac8 100644
--- a/bibliopixel/control/artnet.py
+++ b/bibliopixel/control/artnet.py
@@ -1,6 +1,6 @@
import collections, copy, queue
from . import control
-from .. util import artnet_message, log, server_cache, udp
+from .. ut... | New OffsetRange handles begin, end, offset ranges (fix #795) | Better handling of DMX offsets
DMX is 1-based - BP is 0-based.
Our current model is confusing, because we use an offset - that requires an extra +1 which confuses users. If the lighting designer "sets their board to channel 100", then the offset is -99...
We could easily flip the sign. But if we tweaked the co... | ManiacalLabs/BiblioPixel | diff --git a/test/bibliopixel/project/bad_project_test.py b/test/bibliopixel/project/bad_project_test.py
index b70e6a4..6cefa8b 100644
--- a/test/bibliopixel/project/bad_project_test.py
+++ b/test/bibliopixel/project/bad_project_test.py
@@ -6,10 +6,8 @@ from . make import make
PYTHON_FILE = 'driver = {"a": "b"}'
MI... | [
"test/bibliopixel/project/bad_project_test.py::BadProjectTest::test_bad_animation_attribute",
"test/bibliopixel/project/bad_project_test.py::BadProjectTest::test_bad_driver_attribute",
"test/bibliopixel/project/bad_project_test.py::BadProjectTest::test_bad_json",
"test/bibliopixel/project/bad_project_test.py:... | [] | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
73e62469a3584f39f18e0faea12fc984f9742e64 | 2020-10-20 20:42:02 | docker.io/swerebenchv2/xknx-xknx:472-73e6246 | xknx__xknx-472 | Method: BinarySensor.__init__(self, xknx, name: str, group_address_state=None, invert: bool = False, sync_state: bool = True, ignore_internal_state: bool = True, device_class: str = None, context_timeout: float = None, reset_after: float = None)
Location: xknx/devices/binary_sensor.py
Inputs:
- **xknx** – XKNX instanc... | python | MIT | diff --git a/changelog.md b/changelog.md
index 3c14d7f5..2d972af4 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,16 @@
# Changelog
+## Unreleased Changes
+
+### Devices
+
+- BinarySensor: added option to invert payloads
+- Switch: added option to invert payloads
+
+### Bugfixes
+
+- HA Switch entity: keep s... | Invertable Switch and BinarySensor
<!--
You are awesome! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template!.
-->
## Description
<!--
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependen... | Switch: Add invert function
Sometimes it makes sense to invert a switch. So it would make sense to add an `invert` flag to Switch and pass it to the RemoteValue (that already supports this). | XKNX/xknx | diff --git a/test/devices_tests/binary_sensor_test.py b/test/devices_tests/binary_sensor_test.py
index c7bad9c8..853428cc 100644
--- a/test/devices_tests/binary_sensor_test.py
+++ b/test/devices_tests/binary_sensor_test.py
@@ -59,6 +59,26 @@ class TestBinarySensor(unittest.TestCase):
self.loop.run_until_comple... | [
"test/devices_tests/binary_sensor_test.py::TestBinarySensor::test_process_invert",
"test/devices_tests/switch_test.py::TestSwitch::test_process_invert",
"test/devices_tests/switch_test.py::TestSwitch::test_set_invert"
] | [
"test/devices_tests/binary_sensor_test.py::TestBinarySensor::test_counter",
"test/devices_tests/binary_sensor_test.py::TestBinarySensor::test_is_off",
"test/devices_tests/binary_sensor_test.py::TestBinarySensor::test_is_on",
"test/devices_tests/binary_sensor_test.py::TestBinarySensor::test_process",
"test/d... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.92,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
0866df05462ec13150bfe8253ec8884757f6a03f | 2020-12-22 22:19:14 | docker.io/swerebenchv2/oasis-open-cti-python-stix2:480-0866df0 | oasis-open__cti-python-stix2-480 | Method: Collection.get_objects(self, accept=MEDIA_TYPE_STIX_V20, start=0, per_request=0, **filter_kwargs)
Location: Called by TAXIICollectionSource when performing queries against a TAXII 2.x Collection; test code triggers it via TAXIICollectionSource methods (e.g., query(), relationships()).
Inputs:
- accept (str): m... | python | BSD-3-Clause | diff --git a/setup.py b/setup.py
index 2fc5d70..397b98f 100644
--- a/setup.py
+++ b/setup.py
@@ -60,7 +60,7 @@ setup(
'Bug Tracker': 'https://github.com/oasis-open/cti-python-stix2/issues/',
},
extras_require={
- 'taxii': ['taxii2-client>=2.2.1'],
+ 'taxii': ['taxii2-client>=2.3.0'],
... | Support Pagination in TAXII DataStore
Proposed solution to solve the pagination issues.
Closes #479 | TAXIICollectionSource.query() only returns the first page
I noticed that the TAXIICollectionSource methods query(), relationships(), ... only operates with the first page returned by the associated TAXII 2.0 server.
I did tests with a local Medallion server v1.1.0 which have a default max_page_size of 100.
By cal... | oasis-open/cti-python-stix2 | diff --git a/stix2/test/v20/test_datastore_taxii.py b/stix2/test/v20/test_datastore_taxii.py
index 0b21981..075f0a3 100644
--- a/stix2/test/v20/test_datastore_taxii.py
+++ b/stix2/test/v20/test_datastore_taxii.py
@@ -3,9 +3,8 @@ import json
from medallion.filters.basic_filter import BasicFilter
import pytest
from re... | [
"stix2/test/v20/test_datastore_taxii.py::test_get_object_found",
"stix2/test/v20/test_datastore_taxii.py::test_get_all_versions"
] | [
"stix2/test/v20/test_datastore_taxii.py::test_ds_taxii",
"stix2/test/v20/test_datastore_taxii.py::test_add_stix2_object",
"stix2/test/v20/test_datastore_taxii.py::test_add_stix2_with_custom_object",
"stix2/test/v20/test_datastore_taxii.py::test_add_list_object",
"stix2/test/v20/test_datastore_taxii.py::test... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
e532b0a0b2e466d5f9cc0df5c04551fe04c2cca8 | 2023-09-28 11:02:29 | docker.io/swerebenchv2/qutech-qupulse:797-e532b0a | qutech__qupulse-797 | Method: ConstantWaveform.__init__(self, duration: float, amplitude: float, channel: str)
Location: qupulse.program.waveforms
Inputs:
- **duration** – length of the waveform in seconds (must be > 0).
- **amplitude** – constant voltage (or normalized unit) applied during the whole duration.
- **channel** – iden... | python | null | diff --git a/qupulse/_program/tabor.py b/qupulse/_program/tabor.py
index b92c76f1..235cc945 100644
--- a/qupulse/_program/tabor.py
+++ b/qupulse/_program/tabor.py
@@ -1,3 +1,4 @@
+import dataclasses
import sys
from typing import NamedTuple, Optional, List, Generator, Tuple, Sequence, Mapping, Union, Dict, FrozenSet, ... | Tabor segment deduplication
Should fix #795
- [x] test with simulator | Tabor: redundant waveform upload
When uplading a program which for some reason has multiple segments of equal waveforms in a `TaborProgram`, the `_find_place_for_segments_in_memory`-function does not check for unique values but uploads all segments from this batch of segments regardless.
It seems to me thast this may... | qutech/qupulse | diff --git a/tests/_program/tabor_tests.py b/tests/_program/tabor_tests.py
index 919147ec..bb1b7386 100644
--- a/tests/_program/tabor_tests.py
+++ b/tests/_program/tabor_tests.py
@@ -19,6 +19,7 @@ except ImportError:
from qupulse._program.tabor import TaborException, TaborProgram, find_place_for_segments_in_memory,\
... | [
"tests/_program/tabor_tests.py::TaborProgramTests::test_calc_sampled_segments_deduplication"
] | [
"tests/_program/tabor_tests.py::LoopTests::test_cleanup",
"tests/_program/tabor_tests.py::LoopTests::test_cleanup_single_rep",
"tests/_program/tabor_tests.py::LoopTests::test_cleanup_warnings",
"tests/_program/tabor_tests.py::LoopTests::test_compare_key",
"tests/_program/tabor_tests.py::LoopTests::test_dept... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.98,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
1502ebdf74def3ff6909a3cf1856068b5b9ce586 | 2023-10-11 17:10:11 | docker.io/swerebenchv2/sdv-dev-rdt:717-1502ebd | sdv-dev__rdt-717 | No new interfaces are introduced. | python | custom-check-github | diff --git a/rdt/hyper_transformer.py b/rdt/hyper_transformer.py
index e6b94f7..214714e 100644
--- a/rdt/hyper_transformer.py
+++ b/rdt/hyper_transformer.py
@@ -593,6 +593,12 @@ class HyperTransformer:
if not self._fitted or self._modified_config:
raise NotFittedError(self._NOT_FIT_MESSAGE)
+ ... | Reset randomization after fitting
Resolves #716 | HyperTransformer transforms while fitting and messes up the random seed
### Environment Details
* RDT version: 1.7
* Python version: 3.x
* Operating System: MacOS
### Error Description
While working on #606 , I realized that the `HyperTransformer` transforms twice and moves the seed forward which causes you ... | sdv-dev/RDT | diff --git a/tests/integration/test_hyper_transformer.py b/tests/integration/test_hyper_transformer.py
index f773eb0..03768b6 100644
--- a/tests/integration/test_hyper_transformer.py
+++ b/tests/integration/test_hyper_transformer.py
@@ -87,23 +87,41 @@ def get_transformed_data():
1.262304e+18,
1.26498... | [
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_default_inputs",
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_field_transformers",
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_multiple_detects",
"tests/integration/test_hyper_tran... | [
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_single_category",
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_categorical_encoders_with_booleans",
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_dtype_category",
"tests/integration/... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.92,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
126ea5657db961435b3162a9115e02a5b0865d45 | 2023-01-19 16:14:52 | docker.io/swerebenchv2/openmdao-openmdao:2782-126ea56 | openmdao__openmdao-2782 | Method: System.set_output_solver_options(self, name, lower=_UNDEFINED, upper=_UNDEFINED, scaler=_UNDEFINED, adder=_UNDEFINED, ref=_UNDEFINED, ref0=_UNDEFINED)
Location: openmdao.core.system.System
Inputs:
- **name** (str): absolute name of the output variable whose solver‑related metadata is to be changed.
- **lower... | python | custom-check-github | diff --git a/openmdao/core/system.py b/openmdao/core/system.py
index 0ca90e9fb..56dd7ce52 100644
--- a/openmdao/core/system.py
+++ b/openmdao/core/system.py
@@ -59,13 +59,13 @@ _supported_methods = {
_DEFAULT_COLORING_META = {
'wrt_patterns': ('*',), # patterns used to match wrt variables
- 'method': 'fd', ... | Fix bug when setting solver options, desvars, and cons with vector values
### Summary
The methods `set_output_solver_options`, `set_design_var_options`, and `set_constraint_options` raise exceptions when given vector values. This PR fixes that.
### Related Issues
- Resolves #2775
### Backwards incompatibil... | set_design_var_options and set_constraint_options does not appear to work if vector valued limits are given
### Description
user reported the referenced methods don't work if indices is also given.
https://stackoverflow.com/questions/75129083/can-i-add-or-remove-design-variables-from-a-problem-after-setup-call
... | OpenMDAO/OpenMDAO | diff --git a/openmdao/core/tests/test_system_set_solver_bounds_scaling_options.py b/openmdao/core/tests/test_system_set_solver_bounds_scaling_options.py
index e2b47ffba..92feb19fd 100644
--- a/openmdao/core/tests/test_system_set_solver_bounds_scaling_options.py
+++ b/openmdao/core/tests/test_system_set_solver_bounds_sc... | [
"openmdao/core/tests/test_system_set_solver_bounds_scaling_options.py::TestSystemSetDesignVarOptions::test_set_design_var_options_vector_values",
"openmdao/core/tests/test_system_set_solver_bounds_scaling_options.py::TestSystemSetConstraintsOptions::test_set_constraint_options_vector_values"
] | [
"openmdao/core/tests/test_system_set_solver_bounds_scaling_options.py::TestSystemSetSolverDesvarConstraintObjectiveOutputOptions::test_set_options_called_with_nonexistant_var",
"openmdao/core/tests/test_system_set_solver_bounds_scaling_options.py::TestSystemSetSolverOutputOptions::test_set_output_solver_affect_on... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://stackoverflow.com/questions/75129083/can-i-add-o... |
3938c6f98f4c5fd387ff0f0678ac4c0122d1189f | 2017-05-09 00:04:09 | docker.io/swerebenchv2/brettcannon-gidgethub:35-3938c6f | brettcannon__gidgethub-35 | Method: Router.__init__(self, *other_routers: "Router") -> None
Location: gidgethub/routing.py, class Router
Inputs: *other_routers – zero or more existing Router objects whose routes are to be copied into the new router.
Outputs: None (initializes the Router instance). The new router contains shallow and deep route ta... | python | Apache-2.0 | diff --git a/.travis.yml b/.travis.yml
index dd10f8c..431c12d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,11 +12,10 @@ matrix:
before_install:
- pip install -U ".[dev]"
- - pip install -U pytest-cov sphinx
+ - pip install -U pytest-cov sphinx mypy
script:
- pytest --cov=gidgethub
- # As of mypy 0.501... | Add type hints
Closes #33 | Add type hints
The latest release of mypy now has the appropriate support to type hint gidgethub (as long as you pass `--ignore-missing-imports`). | brettcannon/gidgethub | diff --git a/gidgethub/test/test_routing.py b/gidgethub/test/test_routing.py
index a2a6a75..fdf70fc 100644
--- a/gidgethub/test/test_routing.py
+++ b/gidgethub/test/test_routing.py
@@ -104,12 +104,16 @@ async def test_dispatching():
@pytest.mark.asyncio
async def test_router_copy():
router = routing.Router()
- ... | [
"gidgethub/test/test_routing.py::test_router_copy"
] | [
"gidgethub/test/test_routing.py::test_shallow_callback",
"gidgethub/test/test_routing.py::test_deep_callback",
"gidgethub/test/test_routing.py::test_too_much_detail",
"gidgethub/test/test_routing.py::test_register",
"gidgethub/test/test_routing.py::test_dispatching"
] | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B4",
"confidence": 0.88,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": true,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": ... |
b9622875f5734088dbe213add3b06b19425b2f1b | 2024-02-18 21:06:40 | docker.io/swerebenchv2/getmoto-moto:7361-b962287 | getmoto__moto-7361 | Method: APIGatewayBackend.update_usage_plan(self, usage_plan_id: str, patch_operations: Any) -> UsagePlan
Location: moto/apigateway/models.py (class APIGatewayBackend)
Inputs:
- **usage_plan_id** (str): Identifier of an existing usage plan.
- **patch_operations** (list[dict]): List of patch dictionaries, each containin... | python | Apache-2.0 | diff --git a/docs/docs/services/apigateway.rst b/docs/docs/services/apigateway.rst
index 988edd6ab..4d3797589 100644
--- a/docs/docs/services/apigateway.rst
+++ b/docs/docs/services/apigateway.rst
@@ -151,5 +151,13 @@ apigateway
- [X] update_stage
- [ ] update_usage
- [X] update_usage_plan
+
+ The following... | ApiGateway: update_usage_plan() now supports adding apiStages
Fixes #7360 | Feature Request: Support apigateway patchOperations for 'path': '/apiStages'
When calling `client.update_usage_plan(usagePlanId=usage_plan_id, patchOperations=[{
'op': 'add',
'path': '/apiStages',
'value': f'{api_gw_id}:{api_gw_stage}',}])`
The api-gw should be attached to the usage plan but... | getmoto/moto | diff --git a/tests/test_apigateway/test_apigateway.py b/tests/test_apigateway/test_apigateway.py
index 88bfc2a2b..1abc572c8 100644
--- a/tests/test_apigateway/test_apigateway.py
+++ b/tests/test_apigateway/test_apigateway.py
@@ -1701,13 +1701,28 @@ def test_update_usage_plan():
payload = {
"name": "TEST-P... | [
"tests/test_apigateway/test_apigateway.py::test_update_usage_plan"
] | [
"tests/test_apigateway/test_apigateway.py::test_create_and_get_rest_api",
"tests/test_apigateway/test_apigateway.py::test_update_rest_api",
"tests/test_apigateway/test_apigateway.py::test_update_rest_api_invalid_api_id",
"tests/test_apigateway/test_apigateway.py::test_update_rest_api_operation_add_remove",
... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": [
... |
78dffcc819dede287b235299bd05694e6e30eb46 | 2017-09-06 03:23:53 | docker.io/swerebenchv2/pre-commit-pre-commit-hooks:233-78dffcc | pre-commit__pre-commit-hooks-233 | Function: main(argv=None)
Location: pre_commit_hooks/mixed_line_ending.py
Inputs: Optional sequence of command‑line arguments (e.g., `['--fix=lf', '/path/to/file']`). If omitted, defaults to `sys.argv[1:]`. Recognised arguments:
- `-f/--fix` with choices `auto`, `no`, `cr`, `crlf`, `lf` (default `auto`);
- one or more ... | python | MIT | diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml
index 69e316a..454f258 100644
--- a/.pre-commit-hooks.yaml
+++ b/.pre-commit-hooks.yaml
@@ -191,6 +191,15 @@
# for backward compatibility
files: ''
minimum_pre_commit_version: 0.15.0
+- id: mixed-line-ending
+ name: Mixed line ending
+ ... | Add mixed-line-ending hook
@nagromc - I squashed your commits, fixed the tests on windows, and applied my review feedback -- I managed to reimplement it in a (imo) much simpler way too!
This supersedes #218 and resolves #196 | Detect mixed line endings
It would be great if `pre-commit-hooks` could detect mixed line endings.
In Atom ("Mixed"):

Keywords for future searches: newline, new line, end of line, end-of-line, EOL, lin... | pre-commit/pre-commit-hooks | diff --git a/tests/mixed_line_ending_test.py b/tests/mixed_line_ending_test.py
new file mode 100644
index 0000000..808295b
--- /dev/null
+++ b/tests/mixed_line_ending_test.py
@@ -0,0 +1,103 @@
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
+import pytest
+
+from pre_commit_hooks.mixe... | [
"tests/mixed_line_ending_test.py::test_mixed_line_ending_fixes_auto[foo\\r\\nbar\\nbaz\\n-foo\\nbar\\nbaz\\n]",
"tests/mixed_line_ending_test.py::test_mixed_line_ending_fixes_auto[foo\\r\\nbar\\nbaz\\r\\n-foo\\r\\nbar\\r\\nbaz\\r\\n]",
"tests/mixed_line_ending_test.py::test_mixed_line_ending_fixes_auto[foo\\rba... | [] | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B4",
"confidence": 0.88,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": true,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": ... |
bd1beb43283f792a37aee87055c152e3aa69b702 | 2022-08-01 18:16:34 | docker.io/swerebenchv2/tdameritrade-stumpy:655-bd1beb4 | tdameritrade__stumpy-655 | Function: _find_matches(D, excl_zone, max_distance=None, max_matches=None, query_idx=None, atol=1e-8)
Location: stumpy/core.py
Inputs:
- D (numpy.ndarray): 1‑D distance profile of a query `Q` against a time series `T`; length = `len(T)‑len(Q)+1`.
- excl_zone (int): Size of the exclusion zone; after selecting a match at... | python | custom-check-github | diff --git a/stumpy/aamp_motifs.py b/stumpy/aamp_motifs.py
index 2c6def8..ddd94f4 100644
--- a/stumpy/aamp_motifs.py
+++ b/stumpy/aamp_motifs.py
@@ -97,7 +97,7 @@ def _aamp_motifs(
motif_distances = []
candidate_idx = np.argmin(P[-1])
- for i in range(l):
+ for _ in range(l):
if len(motif_ind... | Fixed #652 Improve Docstrings
This PR addresses issue #652 | Incorrect descriptions in Docstrings
I have been reading the module `mpdist` and I noticed:
* The description of the output of `_mpdist_vect` is missing from its docstring
* The description of `μ_Q` and `σ_Q` (in `_mpdist_vect`) are not correct. I think they should be `numpy.ndarrays` not `float`.
* The descriptio... | TDAmeritrade/stumpy | diff --git a/tests/naive.py b/tests/naive.py
index 3f68fcd..cc4b0cc 100644
--- a/tests/naive.py
+++ b/tests/naive.py
@@ -1757,3 +1757,25 @@ def _total_diagonal_ndists(tile_lower_diag, tile_upper_diag, tile_height, tile_w
)
return total_ndists
+
+
+def find_matches(D, excl_zone, max_distance, max_matches... | [
"tests/test_core.py::test_find_matches_all",
"tests/test_core.py::test_find_matches_maxmatch"
] | [
"tests/test_core.py::test_check_bad_dtype",
"tests/test_core.py::test_check_dtype_float64",
"tests/test_core.py::test_get_max_window_size",
"tests/test_core.py::test_check_window_size",
"tests/test_core.py::test_check_max_window_size",
"tests/test_core.py::test_njit_sliding_dot_product[Q0-T0]",
"tests/t... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B4",
"confidence": 0.78,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": true,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": ... |
a639f76b50ea307baa370fb08f415404d2e51a3b | 2023-07-07 15:23:49 | docker.io/swerebenchv2/sdv-dev-rdt:669-a639f76 | sdv-dev__rdt-669 | Method: AnonymizedFaker.__init__(self, provider_name=None, function_name=None, function_kwargs=None, locales=None, enforce_uniqueness=False, missing_value_generation='random')
Location: rdt/transformers/pii/anonymizer.py
Inputs:
- provider_name (str | None): optional faker provider name.
- function_name (str | None): o... | python | custom-check-github | diff --git a/rdt/__init__.py b/rdt/__init__.py
index 66a780f..5c83c55 100644
--- a/rdt/__init__.py
+++ b/rdt/__init__.py
@@ -5,7 +5,7 @@
__author__ = 'DataCebo, Inc.'
__email__ = 'info@sdv.dev'
-__version__ = '1.5.1.dev1'
+__version__ = '1.5.1.dev2'
import sys
diff --git a/rdt/transformers/pii/anonymizer.py b/... | `AnonymizedFaker` should be able to model and generate missing values
Resolve #660 | `AnonymizedFaker` should be able to model and generate missing values
### Problem Description
Sometimes I may have a PII column with missing values. For example a `secondary_address` represents the 2nd line of an address (such as an apartment # or suite #). It is not always needed so I expect it to be blank a lot of t... | sdv-dev/RDT | diff --git a/tests/integration/transformers/pii/test_anonymizer.py b/tests/integration/transformers/pii/test_anonymizer.py
index bd024ef..1ddf7d4 100644
--- a/tests/integration/transformers/pii/test_anonymizer.py
+++ b/tests/integration/transformers/pii/test_anonymizer.py
@@ -69,6 +69,26 @@ def test_anonymizedfaker_wit... | [
"tests/integration/transformers/pii/test_anonymizer.py::test_anonymizedfaker_with_nans",
"tests/integration/transformers/pii/test_anonymizer.py::test_anonymizedfaker_with_nans_missing_value_generation_none",
"tests/integration/transformers/pii/test_anonymizer.py::test_anonymizedfaker_custom_provider_with_nans",... | [
"tests/integration/transformers/pii/test_anonymizer.py::test_anonymizedfaker",
"tests/integration/transformers/pii/test_anonymizer.py::test_anonymizedfaker_custom_provider",
"tests/integration/transformers/pii/test_anonymizer.py::test_anonymizedfaker_enforce_uniqueness",
"tests/integration/transformers/pii/te... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://docs.sdv.dev/rdt/transformers-glossary/numeric... |
796b1f99bb2653df26abfc48d9f90441e9431dea | 2021-08-31 10:48:37 | docker.io/swerebenchv2/stfc-fparser:302-796b1f9 | stfc__fparser-302 | Method: Line.get_line(self, apply_map=False)
Location: src/fparser/common/readfortran.py – class <code>Line</code>
Inputs:
- <code>apply_map</code> (bool, optional, default =False): when True the method applies the reverse‑tokenisation map stored in the line object to restore the original source text.
Outputs:
- Return... | python | custom-check-github | diff --git a/doc/developers_guide.rst b/doc/developers_guide.rst
index 7b35e13..226c61b 100644
--- a/doc/developers_guide.rst
+++ b/doc/developers_guide.rst
@@ -827,6 +827,44 @@ a valid Fortran program.
# +++++++++++++
# TBD
+.. _tokenisation:
+
+Tokenisation
+++++++++++++
+
+In order to simplify the problem ... | (Closes #301 and towards #281) improve handling of exponential constants | Parse tree incorrect when literal includes exponent
When we have an expression involving a literal with an exponent then we get the following parse tree (fragment):
zw = zw - 3.14807E-10*zw6
child type = <class 'fparser.two.Fortran2003.Add_Operand'>
child type = <class 'fparser.two.Fortr... | stfc/fparser | diff --git a/src/fparser/common/tests/test_readfortran.py b/src/fparser/common/tests/test_readfortran.py
index ba04c08..6d40a1b 100644
--- a/src/fparser/common/tests/test_readfortran.py
+++ b/src/fparser/common/tests/test_readfortran.py
@@ -73,6 +73,32 @@ def test_empty_line_err():
assert "Got empty line: \' \'"... | [
"src/fparser/common/tests/test_readfortran.py::test_empty_line_err",
"src/fparser/common/tests/test_readfortran.py::test_line_map",
"src/fparser/common/tests/test_readfortran.py::test_111fortranreaderbase",
"src/fparser/common/tests/test_readfortran.py::test_include_not_found",
"src/fparser/common/tests/tes... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
d7fd58f1c379b1c1dbe820b1a48cf20ff9e17126 | 2020-08-13 21:43:17 | docker.io/swerebenchv2/jupyter-kernel-gateway:340-d7fd58f | jupyter__kernel_gateway-340 | Method: KernelGatewayApp._build_ssl_options(self)
Location: kernel_gateway/gatewayapp.py
Inputs: None (relies on instance attributes `certfile`, `keyfile`, `client_ca`, and `ssl_version` that may be set via environment variables or config)
Outputs: Returns `None` when no SSL configuration is present; otherwise returns ... | python | custom-check-github | diff --git a/kernel_gateway/gatewayapp.py b/kernel_gateway/gatewayapp.py
index 7d10be9..ba1e8e5 100644
--- a/kernel_gateway/gatewayapp.py
+++ b/kernel_gateway/gatewayapp.py
@@ -9,6 +9,7 @@ import os
import sys
import signal
import socket
+import ssl
from distutils.util import strtobool
import nbformat
@@ -52,7 +... | enable ssl_version as a JKG config option
Fixes #339
| Unable to connect to jupyter kernel gateway on Safari Version >= 13.1
Hey,
I am unable to connect to the jupyter kernel over the web socket on Safari.
I get this error: `WebSocket network error: OSStatus error - 9801: Cipher Suite negotiation failure`
Any idea how this can be fixed?
PS: Big fan of the proje... | jupyter/kernel_gateway | diff --git a/kernel_gateway/tests/test_gatewayapp.py b/kernel_gateway/tests/test_gatewayapp.py
index d4e1860..1abfffe 100644
--- a/kernel_gateway/tests/test_gatewayapp.py
+++ b/kernel_gateway/tests/test_gatewayapp.py
@@ -43,6 +43,7 @@ class TestGatewayAppConfig(unittest.TestCase):
os.environ['KG_KEYFILE'] = '/... | [
"kernel_gateway/tests/test_gatewayapp.py::TestGatewayAppConfig::test_config_env_vars",
"kernel_gateway/tests/test_gatewayapp.py::TestGatewayAppConfig::test_ssl_options"
] | [
"kernel_gateway/tests/test_gatewayapp.py::TestGatewayAppConfig::test_trust_xheaders"
] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": null,
"confidence": null,
"detected_issues": null,
"difficulty": null,
"external_urls": null,
"intent_completeness": null,
"pr_categories": null,
"reasoning": null,
"test_alignment_issues": null
},
"num_modified_files": 1,
"num_modified_lines": 16,... |
57b97a8668e7cded83601729660f4fbc5ddba5d8 | 2022-03-13 16:57:35 | docker.io/swerebenchv2/martinthoma-flake8-simplify:112-57b97a8 | martinthoma__flake8-simplify-112 | No new interfaces are introduced. | python | MIT | diff --git a/flake8_simplify/rules/ast_if.py b/flake8_simplify/rules/ast_if.py
index 1756458..4136a26 100644
--- a/flake8_simplify/rules/ast_if.py
+++ b/flake8_simplify/rules/ast_if.py
@@ -9,7 +9,7 @@ from flake8_simplify.utils import get_if_body_pairs, is_body_same, to_source
def get_sim102(node: ast.If) -> List[Tu... | SIM102: Ignore 'if __name__ == "__main__"'
Closes #48
| [Adjust Rule] SIM102: 'if __name__ == "__main__"' does not count
## Desired change
* **Rule(s)**: SIM102
* **Adjustment**: Ignore `if __name__ == "__main__"`
## Explanation
the check `if __name__ == "__main__"` is special. People recognize it as a special part of a script. Although one can combine things, I t... | MartinThoma/flake8-simplify | diff --git a/tests/test_100_rules.py b/tests/test_100_rules.py
index 44ed391..17f4cf7 100644
--- a/tests/test_100_rules.py
+++ b/tests/test_100_rules.py
@@ -54,13 +54,20 @@ def test_sim102_not_active1():
assert ret == set()
-def test_sim102_not_active2():
- ret = _results(
+@pytest.mark.parametrize(
+ "s... | [
"tests/test_100_rules.py::test_sim102_should_not_trigger[__main__]"
] | [
"tests/test_100_rules.py::test_sim102_pattern1",
"tests/test_100_rules.py::test_sim102_pattern2",
"tests/test_100_rules.py::test_sim102_not_active1",
"tests/test_100_rules.py::test_sim102_should_not_trigger[intermediate-statement]",
"tests/test_100_rules.py::test_sim103_true_false",
"tests/test_100_rules.... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
83c6b44c0c916aa98ade4435634baf1a1058007c | 2024-12-26 12:37:15 | docker.io/swerebenchv2/pymc-devs-pytensor:1139-83c6b44 | pymc-devs__pytensor-1139 | Function: argsort(a: Variable) → Variable
Location: pytensor.tensor.sort.argsort
Inputs: a – a tensor variable (any shape, numeric dtype). The function returns the indices that would sort the flattened version of a in ascending order. The output dtype is integer (matching the default integer dtype of the library).
Outp... | python | custom-check-github | diff --git a/pytensor/link/jax/dispatch/extra_ops.py b/pytensor/link/jax/dispatch/extra_ops.py
index a9e36667e..87e55f100 100644
--- a/pytensor/link/jax/dispatch/extra_ops.py
+++ b/pytensor/link/jax/dispatch/extra_ops.py
@@ -10,6 +10,7 @@ from pytensor.tensor.extra_ops import (
FillDiagonalOffset,
RavelMultiI... | More robust check for multiple integer indices in numba ravel_multidimensional_idx rewrites
Closes #1132
The rewrite is not supposed to apply in the case behind the described bug. It was not accounting for uint integer indices, only signed ones :)
Separately but importantly, to run in pure Numba mode in this mode... | BUG: sampling with Numba backend fails (BUG IN FGRAPH.REPLACE OR A LISTENER)
### Describe the issue:
Models that sample without error using the default backend fail when using Numba via `compile_kwargs`. Details below.
### Reproduceable code example:
Running any of the models in [this notebook](https://githu... | pymc-devs/pytensor | diff --git a/tests/link/jax/test_extra_ops.py b/tests/link/jax/test_extra_ops.py
index 142741337..0c8fb9281 100644
--- a/tests/link/jax/test_extra_ops.py
+++ b/tests/link/jax/test_extra_ops.py
@@ -6,6 +6,7 @@ from pytensor.configdefaults import config
from pytensor.graph.fg import FunctionGraph
from pytensor.graph.op... | [
"tests/tensor/test_interpolate.py::test_interp",
"tests/tensor/test_interpolate.py::test_interp_padded",
"tests/tensor/test_interpolate.py::test_interpolate_scalar_no_extrapolate[None-None-linear]",
"tests/tensor/test_interpolate.py::test_interpolate_scalar_no_extrapolate[None-None-nearest]",
"tests/tensor/... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B5",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": true,
"B6": false
},
"difficulty": "hard",
"external_urls": [
"https://github.com/dustinstansbury/statistical-rethinkin... |
760e28bb7f6934a4c1ee664eee2449c216c06d9b | 2023-10-12 19:03:28 | docker.io/swerebenchv2/getmoto-moto:6905-760e28b | getmoto__moto-6905 | Method: InstanceResponse.run_instances(self, ImageId, MinCount, MaxCount, IamInstanceProfile=None, TagSpecifications=None, **kwargs)
Location: moto/ec2/responses/instances.py
Inputs:
- ImageId (str): ID of the AMI to launch.
- MinCount (int), MaxCount (int): Number of instances to create.
- IamInstanceProfile (dict, op... | python | Apache-2.0 | diff --git a/moto/ec2/responses/instances.py b/moto/ec2/responses/instances.py
index c3bbf45ee..30785bf1c 100644
--- a/moto/ec2/responses/instances.py
+++ b/moto/ec2/responses/instances.py
@@ -5,6 +5,7 @@ from moto.ec2.exceptions import (
InvalidParameterCombination,
InvalidRequest,
)
+from moto.ec2.utils im... | EC2: create_instances() - Validate instance profile before creating Instances
Fixes #6902 | EC2 run instances with --iam-instance-profile strange error
I encounter strange behavior with `aws ec2 run-instances` which includes `--iam-instance-profile` flag.
With simple
```
aws ec2 run-instances --image-id ami-example1234567890
```
it works fine, instance is created. I get 200 response in log:
```
192.1... | getmoto/moto | diff --git a/tests/test_ec2/test_instances.py b/tests/test_ec2/test_instances.py
index 7122f75d7..d57fcfef5 100644
--- a/tests/test_ec2/test_instances.py
+++ b/tests/test_ec2/test_instances.py
@@ -2616,6 +2616,25 @@ def test_instance_iam_instance_profile():
assert "Id" in instance.iam_instance_profile
assert ... | [
"tests/test_ec2/test_instances.py::test_instance_iam_instance_profile"
] | [
"tests/test_ec2/test_instances.py::test_add_servers",
"tests/test_ec2/test_instances.py::test_instance_launch_and_terminate",
"tests/test_ec2/test_instances.py::test_instance_terminate_discard_volumes",
"tests/test_ec2/test_instances.py::test_instance_terminate_keep_volumes_explicit",
"tests/test_ec2/test_i... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
a6e17f7656854fc4bb2d77de4b076a0980a595d5 | 2022-05-08 00:53:08 | docker.io/swerebenchv2/jsonpickle-jsonpickle:385-a6e17f7 | jsonpickle__jsonpickle-385 | No new interfaces are introduced. | python | BSD-3-Clause | diff --git a/CHANGES.rst b/CHANGES.rst
index f5aa049..575c5d2 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,7 +6,7 @@
Users on older Python versions should pin requirements to ``jsonpickle<3.0.0``.
v2.2.0
-======
+=======
* Classes with a custom ``__getitem__()`` and ``append()``
now pickle prop... | Unmangle private __slots__ members
Closes #318.
Allows jsonpickle to encode private slots members by unmangling their names. If anyone thinks this should be optional, I can add that upon receipt of such feedback. | Private members of __slots__ are skipped
Issue
-------------
"private" members of `__slots__` are skipped, but not private members of `__dict__`.
Steps to reproduce
--------------------------
In the following code, the two classes are identical apart from that the first uses `__slots__` and the second uses `... | jsonpickle/jsonpickle | diff --git a/tests/jsonpickle_test.py b/tests/jsonpickle_test.py
index 5c9d4cf..4d7da9d 100644
--- a/tests/jsonpickle_test.py
+++ b/tests/jsonpickle_test.py
@@ -105,6 +105,14 @@ class Outer(object):
pass
+class MySlots:
+ __slots__ = ("alpha", "__beta")
+
+ def __init__(self):
+ self.alpha... | [
"tests/jsonpickle_test.py::PicklingTestCase::test_private_slot_members"
] | [
"tests/jsonpickle_test.py::flake-8::FLAKE8",
"tests/jsonpickle_test.py::black",
"tests/jsonpickle_test.py::PicklingTestCase::test_base85_override_py3",
"tests/jsonpickle_test.py::PicklingTestCase::test_base85_still_handles_base64",
"tests/jsonpickle_test.py::PicklingTestCase::test_boolean",
"tests/jsonpic... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
c6d44b62a180fcf8ddfd73d67e0274a77b9d30ae | 2024-06-04 21:39:04 | docker.io/swerebenchv2/vitalik-django-ninja:1185-c6d44b6 | vitalik__django-ninja-1185 | No new interfaces are introduced. | python | MIT | diff --git a/ninja/orm/fields.py b/ninja/orm/fields.py
index 444e827..bbdf2c5 100644
--- a/ninja/orm/fields.py
+++ b/ninja/orm/fields.py
@@ -65,6 +65,7 @@ TYPES = {
"PositiveIntegerField": int,
"PositiveSmallIntegerField": int,
"SlugField": str,
+ "SmallAutoField": int,
"SmallIntegerField": int,
... | Add ORM support for SmallAutoField
Fixes #1186: Adds support for a missing field and corresponding unit test. | [BUG] `SmallAutoField` missing from `ninja.orm.fields`
**Describe the bug**
`SmallAutoField` missing from `ninja.orm.fields`
If you try to use `create_schema` on a model that has a `SmallAutoField`, you will get:
```
File "/usr/local/lib/python3.12/site-packages/ninja/orm/fields.py", line 144, in get_schema_field
... | vitalik/django-ninja | diff --git a/tests/test_orm_schemas.py b/tests/test_orm_schemas.py
index 07df9fa..5897fba 100644
--- a/tests/test_orm_schemas.py
+++ b/tests/test_orm_schemas.py
@@ -191,24 +191,27 @@ def test_all_fields():
}
-def test_bigautofield():
- class ModelBigAuto(models.Model):
- bigautofiled = models.BigAuto... | [
"tests/test_orm_schemas.py::test_altautofield[SmallAutoField]"
] | [
"tests/test_orm_schemas.py::test_with_relations",
"tests/test_orm_schemas.py::test_inheritance",
"tests/test_orm_schemas.py::test_altautofield[BigAutoField]",
"tests/test_orm_schemas.py::test_django_31_fields",
"tests/test_orm_schemas.py::test_default",
"tests/test_orm_schemas.py::test_fields_exclude",
... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.99,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
68072198d34752c33a249b2835d1388ed37db832 | 2024-07-15 21:08:37 | docker.io/swerebenchv2/openmdao-openmdao:3295-6807219 | openmdao__openmdao-3295 | Method: InputResidsComp.__init__(self, **kwargs)
Location: openmdao/components/input_resids_comp.py
Inputs: **kwargs – optional keyword arguments forwarded to ImplicitComponent.__init__ (e.g., promotes, tags, etc.).
Outputs: Returns a new InputResidsComp instance.
Description: Constructs the component and initializes a... | python | custom-check-github | diff --git a/openmdao/api.py b/openmdao/api.py
index ab3138f6f..14fbb1dcd 100644
--- a/openmdao/api.py
+++ b/openmdao/api.py
@@ -19,6 +19,7 @@ from openmdao.components.eq_constraint_comp import EQConstraintComp
from openmdao.components.exec_comp import ExecComp
from openmdao.components.explicit_func_comp import Expli... | Added InputResidsComp to the list of components. Added `setup_residuals` method for compatibility with dynamic shaping.
### Summary
Adds `InputResidsComp` to the list of OpenMDAO components.
`InputResidsComp` reduces boilerplate necessary to implement a simple implicit system by treating the added inputs as residua... | InputResidsComp and dynamic-IO-compatible `add_residual`.
### Description
The `add_residual` method is sometimes useful for adding residuals associated with input variables. However, if those variables use dynamic shaping, the current implementation makes it impossible to automatically determine the correct size of th... | OpenMDAO/OpenMDAO | diff --git a/openmdao/components/tests/test_input_resids_comp.py b/openmdao/components/tests/test_input_resids_comp.py
new file mode 100644
index 000000000..c0949eea1
--- /dev/null
+++ b/openmdao/components/tests/test_input_resids_comp.py
@@ -0,0 +1,88 @@
+import unittest
+
+import openmdao.api as om
+
+from openmdao.u... | [
"openmdao/components/tests/test_input_resids_comp.py::TestInputResidsComp::test_input_resids_comp",
"openmdao/components/tests/test_input_resids_comp.py::TestInputResidsComp::test_input_resids_comp_copy_shape",
"openmdao/core/tests/test_component.py::TestExplicitComponent::test_setup_residuals_error"
] | [
"openmdao/core/tests/test_component.py::TestExplicitComponent::test___init___array",
"openmdao/core/tests/test_component.py::TestExplicitComponent::test___init___simple",
"openmdao/core/tests/test_component.py::TestExplicitComponent::test_add_input_output_dupes",
"openmdao/core/tests/test_component.py::TestEx... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.94,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
45f8e75834e6d7a649421cb19776ff4ea2dd5d1b | 2024-03-19 14:05:09 | docker.io/swerebenchv2/pennylaneai-pennylane:5407-45f8e75 | pennylaneai__pennylane-5407 | No new interfaces are introduced. | python | Apache-2.0 | diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index 0759bc717..2012081bb 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -264,9 +264,13 @@
* We no longer perform unwanted dtype promotion in the `pauli_rep` of `SProd` instances when using tensorflow.
[(#... | Pauli sentence bug
**Context:**
Earlier `PauliSentence.to_mat(wire_order)` failed with exception when it had `only empty PauliWords`.
This has been fixed under this PR.
**Description of the Change:**
Earlier when `PauliWord` didn't have wires the function `_pw_wires` defaulted to `PauliSentence` wires. Now rather... | [Bug] `PauliSentence.to_mat(wire_order)` cannot handle Identities with wires
```python
PauliSentence({PauliWord({}): 1.}).to_mat([0, 1])
```
```pycon
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[4]... | PennyLaneAI/pennylane | diff --git a/tests/pauli/test_pauli_arithmetic.py b/tests/pauli/test_pauli_arithmetic.py
index 210541cf8..79bb8297c 100644
--- a/tests/pauli/test_pauli_arithmetic.py
+++ b/tests/pauli/test_pauli_arithmetic.py
@@ -23,7 +23,6 @@ import pennylane as qml
from pennylane import numpy as np
from pennylane.pauli.pauli_arithm... | [
"tests/pauli/test_pauli_arithmetic.py::TestPauliSentence::test_empty_pauli_to_mat_with_wire_order"
] | [
"tests/pauli/test_pauli_arithmetic.py::test_pw_pw_multiplication_non_commutativity",
"tests/pauli/test_pauli_arithmetic.py::test_ps_ps_multiplication_non_commutativity",
"tests/pauli/test_pauli_arithmetic.py::TestPauliWord::test_identity_removed_on_init",
"tests/pauli/test_pauli_arithmetic.py::TestPauliWord::... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
08c7e1bba4179647a2e39b52ba593dcaf477d8bf | 2022-06-30 13:23:58 | docker.io/swerebenchv2/sanic-org-sanic-ext:102-08c7e1b | sanic-org__sanic-ext-102 | No new interfaces are introduced. | python | MIT | diff --git a/sanic_ext/extensions/openapi/types.py b/sanic_ext/extensions/openapi/types.py
index 191132d..76a9c70 100644
--- a/sanic_ext/extensions/openapi/types.py
+++ b/sanic_ext/extensions/openapi/types.py
@@ -2,7 +2,7 @@ import json
import uuid
from datetime import date, datetime, time
from enum import Enum
-fro... | Proper check of Pydantic properties on OAS
Closes #80 | [Bug] Static and Class methods are added to the example request bodies
**Describe the bug**
Class / static methods are included in the example request body.
**To Reproduce**
Create a dataclass add a class/static method to it and set it to a requestbody with `@openapi.body({"application/json": Class})`
**Expecte... | sanic-org/sanic-ext | diff --git a/tests/extensions/openapi/test_schema.py b/tests/extensions/openapi/test_schema.py
index c6033a7..079f86b 100644
--- a/tests/extensions/openapi/test_schema.py
+++ b/tests/extensions/openapi/test_schema.py
@@ -12,16 +12,26 @@ def test_schema_list():
list1: List[int]
list2: list[int]
- ... | [
"tests/extensions/openapi/test_schema.py::test_schema_list"
] | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.95,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
b52fd80cb1cfd8ecc02c3ec75f481001d33c194e | 2023-07-28 10:14:41 | docker.io/swerebenchv2/getmoto-moto:6567-b52fd80 | getmoto__moto-6567 | Method: RDSResponse.create_db_cluster(self, **kwargs)
Location: moto/rds/responses.py
Inputs:
- VpcSecurityGroupIds (list[str], optional) – list of VPC security‑group identifiers to associate with the newly created DB cluster. All other parameters remain as previously defined (e.g., DBClusterIdentifier, Engine, Availa... | python | Apache-2.0 | diff --git a/moto/rds/models.py b/moto/rds/models.py
index 4743bc0b2..7ff975661 100644
--- a/moto/rds/models.py
+++ b/moto/rds/models.py
@@ -182,7 +182,7 @@ class Cluster:
self.preferred_backup_window = "01:37-02:07"
self.preferred_maintenance_window = "wed:02:40-wed:03:10"
# This should defa... | RDS: create_db_cluster() now supports the VpcSecurityGroupIds-parameter
Fixes #6467 | Missing vpc security group name from rds.create_db_cluster response
## Reporting Bugs
When we provide a vpc security group id for rds.create_db_cluster, the response of this create returns an empty list for `'VpcSecurityGroups': []`. I am using boto3 & mocking this call using moto library's mock_rds method.
The r... | getmoto/moto | diff --git a/tests/test_rds/test_rds_clusters.py b/tests/test_rds/test_rds_clusters.py
index 60aa83dc5..2b83979ef 100644
--- a/tests/test_rds/test_rds_clusters.py
+++ b/tests/test_rds/test_rds_clusters.py
@@ -193,29 +193,13 @@ def test_create_db_cluster__verify_default_properties():
).should.be.greater_than_or_equ... | [
"tests/test_rds/test_rds_clusters.py::test_create_db_cluster_additional_parameters"
] | [
"tests/test_rds/test_rds_clusters.py::test_describe_db_cluster_initial",
"tests/test_rds/test_rds_clusters.py::test_describe_db_cluster_fails_for_non_existent_cluster",
"tests/test_rds/test_rds_clusters.py::test_create_db_cluster_needs_master_username",
"tests/test_rds/test_rds_clusters.py::test_create_db_clu... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://github.com/getmoto/moto/blob/master/moto/rds/res... |
e087f1037b067288e377d197d6b855cd481d6a47 | 2025-01-07 17:59:14 | docker.io/swerebenchv2/aws-cloudformation-cfn-lint:3898-e087f10 | aws-cloudformation__cfn-lint-3898 | UnexpectedRuleException
Location: cfnlint.exceptions.UnexpectedRuleException
Inputs: optional msg (str) – error message; optional exit_code (int) – exit status (default 1)
Outputs: raises an exception instance; attribute exit_code stores the provided exit code
Description: Exception raised when an unexpected error occu... | python | MIT-0 | diff --git a/src/cfnlint/config.py b/src/cfnlint/config.py
index 03846af54..a9f4aa5e4 100644
--- a/src/cfnlint/config.py
+++ b/src/cfnlint/config.py
@@ -313,7 +313,7 @@ class RuleConfigurationAction(argparse.Action):
setattr(namespace, self.dest, items)
except Exception: # pylint: disable=W0703
... | Allow for debug in .cfnlintrc file
*Issue #, if available:*
fix #3896
*Description of changes:*
- Allow for debug in .cfnlintrc file
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
| Debug flag not working on cfnlintrc file.
### CloudFormation Lint Version
cfn-lint 1.22.3
### What operating system are you using?
Mac 15.2
### Describe the bug
I'm using the file .cfnlintrc.yaml to configure the tool and when I put the option *debug* it fails with the error:
> Traceback (most recent call last)... | aws-cloudformation/cfn-lint | diff --git a/test/unit/module/config/test_config_file_args.py b/test/unit/module/config/test_config_file_args.py
index 86144086c..2541f599d 100644
--- a/test/unit/module/config/test_config_file_args.py
+++ b/test/unit/module/config/test_config_file_args.py
@@ -8,7 +8,7 @@ from pathlib import Path
from test.testlib.tes... | [
"test/unit/module/config/test_config_file_args.py::TestConfigFileArgs::test_config_parser_fail_on_bad_config",
"test/unit/module/config/test_config_file_args.py::TestConfigFileArgs::test_config_parser_fail_on_config_rules",
"test/unit/module/config/test_config_file_args.py::TestConfigFileArgs::test_config_parse... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
3d60762a9b9fe2a13904f5837babdc6a0c4bfd74 | 2023-10-09 08:21:29 | docker.io/swerebenchv2/aio-libs-aiohttp:7680-3d60762 | aio-libs__aiohttp-7680 | Method: ClientWebSocketResponse.close(self, *, code: int = WSCloseCode.OK, message: bytes = b"") -> bool
Location: aiohttp/client_ws.py
Inputs:
- `code` (int, optional): WebSocket close status code, default 1000 (OK).
- `message` (bytes, optional): Optional close reason payload.
Outputs: Returns ``True`` when the un... | python | custom-check-github | diff --git a/CHANGES/7306.bugfix b/CHANGES/7306.bugfix
new file mode 100644
index 000000000..173236d2f
--- /dev/null
+++ b/CHANGES/7306.bugfix
@@ -0,0 +1,1 @@
+Fixed ``ClientWebSocketResponse.close_code`` being erroneously set to ``None`` when there are concurrent async tasks receiving data and closing the connection.
... | Fix #7306 - Set ClientWebSocketResponse.close_code correctly in concurrent closing scenario
<!-- Thank you for your contribution! -->
## What do these changes do?
Fixes the issue when If one asyncio task is waiting on receiving data and another asyncio task is closing the connection. The ClientWebSocketResponse.c... | `ClientWebSocketResponse.close_code` will be `None` when there are concurrent async task receiving data and closing connection
### Describe the bug
If one asyncio task is waiting on receiving data and another asyncio task is closing the connection. The `ClientWebSocketResponse.close_code` will be `None` after connec... | aio-libs/aiohttp | diff --git a/requirements/test.txt b/requirements/test.txt
index 9219ae1f2..a5b99294a 100644
--- a/requirements/test.txt
+++ b/requirements/test.txt
@@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/test.txt --resolver=backtracking --strip-extras requirements/test.in
#
-aiodns==3.0.0 ; sys... | [
"tests/test_client_ws_functional.py::test_concurrent_task_close[pyloop]"
] | [
"tests/test_client_ws_functional.py::test_send_recv_text[pyloop]",
"tests/test_client_ws_functional.py::test_send_recv_bytes_bad_type[pyloop]",
"tests/test_client_ws_functional.py::test_send_recv_bytes[pyloop]",
"tests/test_client_ws_functional.py::test_send_recv_text_bad_type[pyloop]",
"tests/test_client_w... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B5",
"confidence": 0.86,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": true,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/aio-libs/aiohttp/blob/fde452da30f32... |
dba260545e74612fb9968c681a0ef1bff1f03cd4 | 2024-08-19 16:42:18 | docker.io/swerebenchv2/aio-libs-aiohttp:8745-dba2605 | aio-libs__aiohttp-8745 | Method: aiohttp.ContentTypeError.__init__(self, request_info, history, *, status: int = 0, message: str = "", headers: Optional[Mapping[str, str]] = None)
Location: aiohttp/client_exceptions.py
Inputs:
- request_info – the aiohttp.RequestInfo associated with the failed request.
- history – sequence of aiohttp.Client... | python | custom-check-github | diff --git a/CHANGES/8736.misc.rst b/CHANGES/8736.misc.rst
new file mode 100644
index 000000000..34ed19aeb
--- /dev/null
+++ b/CHANGES/8736.misc.rst
@@ -0,0 +1,1 @@
+Improved performance of the WebSocket reader -- by :user:`bdraco`.
diff --git a/CHANGES/8742.bugfix.rst b/CHANGES/8742.bugfix.rst
new file mode 100644
ind... | [PR #8742/b4f9cb35 backport][3.10] Fix status not being set when ClientResponse.json raises ContentTypeError
**This is a backport of PR #8742 as merged into master (b4f9cb35589db813bd449b9475ad039cc49ee9c1).**
<!-- Thank you for your contribution! -->
## What do these changes do?
Fix status not being set whe... | ClientResponse.json() doesn't set status code
### Describe the bug
When ClientResponse.json() raises a ContentTypeError it doesn't set the HTTP status code in that exception object. Presumably there is a status code available at that point otherwise the call to `read()` inside of `json()` would have thrown an exceptio... | aio-libs/aiohttp | diff --git a/tests/test_client_response.py b/tests/test_client_response.py
index 166089cc8..628e3d71b 100644
--- a/tests/test_client_response.py
+++ b/tests/test_client_response.py
@@ -659,11 +659,13 @@ async def test_json_invalid_content_type(loop, session) -> None:
)
response._headers = {"Content-Type": "da... | [
"tests/test_client_response.py::test_json_invalid_content_type[pyloop]"
] | [
"tests/test_client_response.py::test_http_processing_error",
"tests/test_client_response.py::test_del",
"tests/test_client_response.py::test_close[pyloop]",
"tests/test_client_response.py::test_wait_for_100_1[pyloop]",
"tests/test_client_response.py::test_wait_for_100_2[pyloop]",
"tests/test_client_respon... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.99,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
aca3ac6e2d0eacff962af7f5f53cdc050724fed3 | 2022-08-05 03:41:59 | docker.io/swerebenchv2/pycqa-docformatter:93-aca3ac6 | pycqa__docformatter-93 | Function: format_docstring(docstring, indentation, summary_wrap_length, description_wrap_length, make_summary_multi_line=False, post_description_blank=False, force_wrap=False, strict=True)
Location: docformatter.py
Inputs:
- docstring (str): the original docstring text to format.
- indentation (str): string used for in... | python | MIT | diff --git a/.gitignore b/.gitignore
index 7e1c99c..51246d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+*~
*.egg
*.egg-info/
*.eggs/
diff --git a/README.rst b/README.rst
index d206021..a926b88 100644
--- a/README.rst
+++ b/README.rst
@@ -2,6 +2,34 @@
docformatter
============
+.. |CI| image:: https... | fix: add argument to turn on/off many lines of short words being a list
The conditional in is_some_sort_of_list() function was identifying the README example
```
def launch_rocket():
"""Launch
the
rocket. Go colonize space."""
```
as a list because it was being processed as many lines of short words. This r... | Readme example does not produce the expected result
In the readme, an example using the syntax `docformatter --in-place example.py` is used, and suggests that
```
def launch_rocket():
"""Launch
the
rocket. Go colonize space."""
```
is autoformatted to
```
def launch_rocket():
"""Launch the rocket.
... | PyCQA/docformatter | diff --git a/test_docformatter.py b/test_docformatter.py
index 0e225e6..b841406 100755
--- a/test_docformatter.py
+++ b/test_docformatter.py
@@ -356,7 +356,7 @@ Hello.
"""'''
self.assertEqual(
docstring,
- docformatter.format_docstring(' ', docstring))
+ docformatter.... | [
"test_docformatter.py::TestUnits::test_format_docstring_should_leave_list_alone",
"tests/test_utility_functions.py::TestIsSomeSortdOfList::test_is_some_sort_of_list",
"tests/test_utility_functions.py::TestIsSomeSortdOfList::test_is_some_sort_of_list_with_dashes",
"tests/test_utility_functions.py::TestIsSomeSo... | [
"test_docformatter.py::TestUnits::test_force_wrap",
"test_docformatter.py::TestUnits::test_format_code",
"test_docformatter.py::TestUnits::test_format_code_docstring_length",
"test_docformatter.py::TestUnits::test_format_code_dominant_line_ending_style_preserved",
"test_docformatter.py::TestUnits::test_form... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B2",
"confidence": 0.88,
"detected_issues": {
"B1": false,
"B2": true,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "hard",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": [
... |
c4179c32f9d26387ce01862998f6a1f44e243bef | 2024-04-03 10:23:25 | docker.io/swerebenchv2/systemd-mkosi:2583-c4179c3 | systemd__mkosi-2583 | No new interfaces are introduced. | python | null | diff --git a/mkosi/config.py b/mkosi/config.py
index 54554e07..745ed0f7 100644
--- a/mkosi/config.py
+++ b/mkosi/config.py
@@ -1133,6 +1133,12 @@ class Match:
match: Callable[[str], bool]
+@dataclasses.dataclass(frozen=True)
+class Specifier:
+ char: str
+ callback: Callable[[argparse.Namespace, Path], s... | Add specifiers for various paths
Fixes #2579 | `ExtraTrees=` via `InitrdInclude=` incorrectly resolved
When using `ExtraTrees=` fom a *file* which is included via `InitrdInclude=` which itself was set in the config file of an image the paths are incorrectly resolved. More specifically they seem to be resolved relative to the project root instead of the config file ... | systemd/mkosi | diff --git a/tests/test_config.py b/tests/test_config.py
index 10e389b9..5fd9231d 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -920,6 +920,28 @@ def test_specifiers(tmp_path: Path) -> None:
ImageVersion=%v
OutputDirectory=%O
Output=%o
+ ... | [
"tests/test_config.py::test_specifiers"
] | [
"tests/test_config.py::test_compression_enum_creation",
"tests/test_config.py::test_compression_enum_bool",
"tests/test_config.py::test_compression_enum_str",
"tests/test_config.py::test_parse_ini",
"tests/test_config.py::test_parse_config",
"tests/test_config.py::test_parse_includes_once",
"tests/test_... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B2",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": true,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": ... |
b67f52bfd0b23baa3eae9f11bab1af14bd8b2798 | 2017-09-29 14:33:04 | docker.io/swerebenchv2/core-gatech-group-serpent-tools:21-b67f52b | core-gatech-group__serpent-tools-21 | Method: DepletedMaterial.getXY(self, xUnits, yUnits, timePoints=None, names=None)
Location: serpentTools/objects/materials.py
Inputs:
- xUnits (str): name of the independent variable (e.g., 'days' or 'burnup') to be used for the x‑axis.
- yUnits (str): name of the dependent variable (e.g., 'adens' or 'burnup') whose v... | python | MIT | diff --git a/serpentTools/__init__.py b/serpentTools/__init__.py
index 8e3f32c..3e8e8de 100644
--- a/serpentTools/__init__.py
+++ b/serpentTools/__init__.py
@@ -1,7 +1,7 @@
from serpentTools import settings
from serpentTools import parsers
-__version__ = '0.1.3'
+__version__ = '0.1.4'
# List TODOS/feature ... | Fix get xy
Fixes #19 and cleans up the objects directory | Days are still returned in time points are given for a vector quantity on materials, e.g. burnup
Fix in #2 did not take in to account quantities like `burnup` and `volume` that do not return arrays for isotope quantities.
If the user specifies one of these quantities from a depleted material, the time points are still... | CORE-GATECH-GROUP/serpent-tools | diff --git a/serpentTools/tests/test_depletion.py b/serpentTools/tests/test_depletion.py
index d7f6d52..6cb911d 100644
--- a/serpentTools/tests/test_depletion.py
+++ b/serpentTools/tests/test_depletion.py
@@ -124,13 +124,12 @@ class DepletedMaterialTester(_DepletionTestHelper):
"""
Verify the materia... | [
"serpentTools/tests/test_depletion.py::DepletedMaterialTester::test_getXY_burnup_full",
"serpentTools/tests/test_depletion.py::DepletedMaterialTester::test_getXY_burnup_slice"
] | [
"serpentTools/tests/test_depletion.py::DepletionTester::test_ReadMaterials",
"serpentTools/tests/test_depletion.py::DepletionTester::test_metadata",
"serpentTools/tests/test_depletion.py::DepletedMaterialTester::test_fetchData",
"serpentTools/tests/test_depletion.py::DepletedMaterialTester::test_getXY_adens",... | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
167d4afde82867614a4c7c8628a9d2a08a89d7ef | 2023-12-08 20:42:24 | docker.io/swerebenchv2/getmoto-moto:7102-167d4af | getmoto__moto-7102 | Method: KMSClient.encrypt(self, KeyId: str, Plaintext: bytes | str, EncryptionContext: dict = None, GrantTokens: list = None, DryRun: bool = False)
Location: moto/kms/utils.py (encrypt function)
Inputs:
- **KeyId** – identifier of the KMS key (string).
- **Plaintext** – data to encrypt; must be a non‑empty byte ... | python | Apache-2.0 | diff --git a/moto/kms/utils.py b/moto/kms/utils.py
index 4e7527611..0d63d052c 100644
--- a/moto/kms/utils.py
+++ b/moto/kms/utils.py
@@ -379,6 +379,10 @@ def encrypt(
raise ValidationException(
"1 validation error detected: Value at 'plaintext' failed to satisfy constraint: Member must have length... | KMS: encrypt() now validates payloads that are too large
Fixes #7100 | Add longer than 4k plaintext encryption test to `tests/test_kms/test_kms_encrypt.py`
## New feature request
Issue:
When run test against kms_encrypt, moto can pickup empty 'plaintext' correctly like below ...
The test code:
```
@mock_kms
def test_encrypt_void_text_with_kms(kms_client, caplog):
caplog.set... | getmoto/moto | diff --git a/tests/test_kms/__init__.py b/tests/test_kms/__init__.py
index 08a1c1568..b52dd9f4e 100644
--- a/tests/test_kms/__init__.py
+++ b/tests/test_kms/__init__.py
@@ -1,1 +1,28 @@
-# This file is intentionally left blank.
+import os
+from functools import wraps
+
+from moto import mock_kms
+
+
+def kms_aws_verifi... | [
"tests/test_kms/test_kms_encrypt.py::test_encrypt_key_with_large_content"
] | [
"tests/test_kms/test_kms_encrypt.py::test_encrypt_key_with_empty_content",
"tests/test_kms/test_kms_encrypt.py::test_encrypt[some",
"tests/test_kms/test_kms_encrypt.py::test_encrypt_using_alias_name",
"tests/test_kms/test_kms_encrypt.py::test_encrypt_using_alias_arn",
"tests/test_kms/test_kms_encrypt.py::te... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://docs.aws.amazon.com/kms/latest/APIReference/API_... |
ea213c48cf1e7bd9d750c4b0ff920d41e1b2f4e1 | 2025-03-09 22:45:38 | docker.io/swerebenchv2/narwhals-dev-narwhals:2178-ea213c4 | narwhals-dev__narwhals-2178 | Function: get_native_namespace(*obj: DataFrame[Any] | LazyFrame[Any] | Series[Any] | IntoFrame | IntoSeries) -> Any
Location: narwhals.translate
Inputs: one or more positional objects that are a Narwhals DataFrame, LazyFrame, Series, or any object accepted by the IntoFrame / IntoSeries protocols. All provided objects m... | python | MIT | diff --git a/narwhals/translate.py b/narwhals/translate.py
index e545c272..bac75b67 100644
--- a/narwhals/translate.py
+++ b/narwhals/translate.py
@@ -40,11 +40,6 @@ from narwhals.dependencies import is_sqlframe_dataframe
from narwhals.utils import Version
if TYPE_CHECKING:
- import pandas as pd
- import pola... | feat: support passing multiple arguments positionally to get_native_namespace
<!--
# Thanks for contributing a pull request!
## Please make sure you see our contribution guidelines: https://github.com/narwhals-dev/narwhals/blob/main/CONTRIBUTING.md
-->
## What type of PR is this? (check all applicable)
- ... | [Enh]: `get_native_namespace` could check several objects
When figuring out how to do support for narwhals in fairlearn, I was concerned with how to make sure that a user passes objects from the same dataframe library, which would then determine the namespace of returned objects.
I have seen there is `nw.get_native_na... | narwhals-dev/narwhals | diff --git a/tests/translate/get_native_namespace_test.py b/tests/translate/get_native_namespace_test.py
index be10e825..786cb645 100644
--- a/tests/translate/get_native_namespace_test.py
+++ b/tests/translate/get_native_namespace_test.py
@@ -19,16 +19,22 @@ def test_native_namespace() -> None:
assert nw.get_nativ... | [
"tests/translate/get_native_namespace_test.py::test_native_namespace",
"tests/translate/get_native_namespace_test.py::test_get_native_namespace_invalid"
] | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.88,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/scikit-learn/scikit-learn/blob/5f50... |
9691b412bd2ba0d9c4ca88e69428aaf44650778a | 2020-04-21 11:04:01 | docker.io/swerebenchv2/python-semver-python-semver:239-9691b41 | python-semver__python-semver-239 | No new interfaces are introduced. | python | BSD-3-Clause | diff --git a/semver.py b/semver.py
index de72f06..a5739b1 100644
--- a/semver.py
+++ b/semver.py
@@ -371,29 +371,80 @@ build='build.10')
build = cls._increment_string(self._build or (token or "build") + ".0")
return cls(self._major, self._minor, self._patch, self._prerelease, build)
+ def compare... | Fix #236: add missing deprecated functions
This PR fixes #236 and contains the following changes:
Deprecate:
* [x] `semver.compare` -> `semver.VersionInfo.compare`
* [x] `semver.match` -> `semver.VersionInfo.match`
Change:
* Implementation of `semver.max_ver` and `semver.min_ver`
----
~The implementa... | Deprecate missing module-level functions (like semver.compare, semver.match, ...)
# Situation
We deprecated most of our module-level functions, but it seems, I forgot `semver.match`.
# Proposal
I assume, this function should also be added to the list of deprecated function. It also should be moved to the `semv... | python-semver/python-semver | diff --git a/test_semver.py b/test_semver.py
index 4611d77..5daf3f1 100644
--- a/test_semver.py
+++ b/test_semver.py
@@ -855,8 +855,10 @@ def test_should_versioninfo_isvalid():
(bump_minor, ("1.2.3",), {}),
(bump_patch, ("1.2.3",), {}),
(bump_prerelease, ("1.2.3",), {}),
+ (compare, ("... | [
"test_semver.py::test_should_raise_deprecation_warnings[compare-args5-kwargs5]",
"test_semver.py::test_should_raise_deprecation_warnings[match-args8-kwargs8]"
] | [
"test_semver.py::test_should_private_increment_string[rc-rc]",
"test_semver.py::test_should_private_increment_string[rc.1-rc.2]",
"test_semver.py::test_should_private_increment_string[2x-3x]",
"test_semver.py::test_fordocstrings[compare]",
"test_semver.py::test_fordocstrings[createparser]",
"test_semver.p... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
d6c243fc60788a166eedcd5507a0f1ce71f2c89d | 2020-06-03 08:51:17 | docker.io/swerebenchv2/hypothesisworks-hypothesis:2457-d6c243f | hypothesisworks__hypothesis-2457 | Exception: MultipleFailures
Location: hypothesis.errors.MultipleFailures
Inputs: message (str) – a description of how many explicit examples failed.
Outputs: raises as an exception; when caught, its string representation contains the provided message.
Description: Raised by the @given decorator when `settings(report_mu... | python | custom-check-github | diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst
new file mode 100644
index 000000000..c85442fd1
--- /dev/null
+++ b/hypothesis-python/RELEASE.rst
@@ -0,0 +1,9 @@
+RELEASE_TYPE: minor
+
+This release teaches Hypothesis to :ref:`shorten tracebacks <v3.79.2>` for
+:ref:`explicit examples <provid... | Improve explicit example reporting
Closes #2456. | Multiple-error reporting for explicit `@example` phase
Thanks to #2455, I'm writing up a demo test case which has `@example(...)`s which trigger *three* distinct bugs.
Currently, Hypothesis will stop at the first failure. I'd like to instead report them all, at least when the `report_multiple_bugs` setting is `True... | HypothesisWorks/hypothesis | diff --git a/hypothesis-python/tests/cover/test_explicit_examples.py b/hypothesis-python/tests/cover/test_explicit_examples.py
index dd5f41aad..2f87ddecc 100644
--- a/hypothesis-python/tests/cover/test_explicit_examples.py
+++ b/hypothesis-python/tests/cover/test_explicit_examples.py
@@ -28,7 +28,7 @@ from hypothesis i... | [
"hypothesis-python/tests/cover/test_explicit_examples.py::test_multiple_example_reporting[MultipleFailures]"
] | [
"hypothesis-python/tests/cover/test_explicit_examples.py::TestInstanceMethods::test_hi_1",
"hypothesis-python/tests/cover/test_explicit_examples.py::TestInstanceMethods::test_hi_2",
"hypothesis-python/tests/cover/test_explicit_examples.py::TestInstanceMethods::test_hi_3",
"hypothesis-python/tests/cover/test_e... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B2",
"confidence": 0.85,
"detected_issues": {
"B1": false,
"B2": true,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": ... |
2f7b54c017600a67d80e858d25860ef231a57398 | 2023-09-12 16:44:27 | docker.io/swerebenchv2/aeye-lab-pymovements:542-2f7b54c | aeye-lab__pymovements-542 | Method: GazeDataFrame.pix2deg(self, **kwargs)
Location: src/pymovements/gaze/gaze_dataframe.py
Inputs: Optional keyword argument *pixel_column* (str) – name of the column that contains pixel coordinates when the dataframe does not already have a column named ``pixel``. All other arguments are passed through to the unde... | python | MIT | diff --git a/src/pymovements/gaze/gaze_dataframe.py b/src/pymovements/gaze/gaze_dataframe.py
index a95181e..5561b35 100644
--- a/src/pymovements/gaze/gaze_dataframe.py
+++ b/src/pymovements/gaze/gaze_dataframe.py
@@ -266,6 +266,33 @@ class GazeDataFrame:
_check_n_components(self.n_components)
... | raise helpful error message for transforms
resolves #499 and additionally covers both `pix2deg` and `pos2acc` | raise helpful error message if pos2vel() is applied without pix2deg()
## Description of the problem
```python
dataset = pm.Dataset('ToyDataset', path='data/ToyDataset')
dataset.download()
dataset.load()
dataset.pos2vel()
```
results in the cryptic error
```
Downloading http://github.com/aeye-lab/pymovements-... | aeye-lab/pymovements | diff --git a/tests/gaze/gaze_transform_test.py b/tests/gaze/gaze_transform_test.py
index 24fea7b..f92ee5c 100644
--- a/tests/gaze/gaze_transform_test.py
+++ b/tests/gaze/gaze_transform_test.py
@@ -528,8 +528,10 @@ def test_gaze_dataframe_pix2deg_creates_position_column(data, experiment, pixel_
},
... | [
"tests/gaze/gaze_transform_test.py::test_gaze_dataframe_pix2deg_exceptions[no_pixel_column]",
"tests/gaze/gaze_transform_test.py::test_gaze_dataframe_pos2acc_exceptions[no_position_column0]",
"tests/gaze/gaze_transform_test.py::test_gaze_dataframe_pos2acc_exceptions[no_position_column1]",
"tests/gaze/gaze_tra... | [
"tests/gaze/gaze_transform_test.py::test_gaze_transform_expected_frame[downsample_factor_1_method_pass]",
"tests/gaze/gaze_transform_test.py::test_gaze_transform_expected_frame[downsample_factor_1]",
"tests/gaze/gaze_transform_test.py::test_gaze_transform_expected_frame[downsample_factor_2]",
"tests/gaze/gaze... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B2",
"confidence": 0.87,
"detected_issues": {
"B1": false,
"B2": true,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": ... |
f22bea26ff268c26253e827b127be76b61a612cf | 2025-07-07 10:19:01 | docker.io/swerebenchv2/django-asgiref:523-f22bea2 | django__asgiref-523 | No new interfaces are introduced. | python | BSD-3-Clause | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index af34745..0157dde 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -15,6 +15,11 @@
* Fixes a deadlock in CurrentThreadExecutor with nested async_to_sync →
sync_to_async → async_to_sync → create_task calls. (#494)
+* The ApplicationCommunicator testing utility will ... | fix: prevent deletion of Local values from messing with other ctxs
https://github.com/django/asgiref/commit/85d2445021ff8e588fb2883a865d768b60bd0902#r161477713 changed the `ContextVar` to be a dict of `ContextVars`
While that does work in preventing the contexts to leak, removing a value with `del local.value` compl... | AttributeError: asgiref.local._CVar object has no attribute 'value'
Running the latest `main` (`abc69a054aa440ef42c939b5a197df05c3ad48d2`) in production to test a fix for https://github.com/django/asgiref/issues/467, I see this error somewhat frequently across a wide spread of our requests/endpoints. This error was fre... | django/asgiref | diff --git a/tests/test_local.py b/tests/test_local.py
index cdcbd28..77e57e8 100644
--- a/tests/test_local.py
+++ b/tests/test_local.py
@@ -375,3 +375,19 @@ async def test_visibility_task() -> None:
# Changes should not leak to the caller
assert test_local.value == 0
+
+
+@pytest.mark.asyncio
+async def te... | [
"tests/test_local.py::test_deletion"
] | [
"tests/test_local.py::test_local_task",
"tests/test_local.py::test_local_thread",
"tests/test_local.py::test_local_thread_nested",
"tests/test_local.py::test_local_cycle",
"tests/test_local.py::test_local_task_to_sync",
"tests/test_local.py::test_local_thread_to_async",
"tests/test_local.py::test_local_... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B4",
"confidence": 0.78,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": true,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/django/asgiref/issues/467"
],
... |
d14731f16c70b72263ee8f21de6639b01341c510 | 2020-09-19 10:21:10 | docker.io/swerebenchv2/samuelcolvin-pydantic:1935-d14731f | samuelcolvin__pydantic-1935 | No new interfaces are introduced. | python | MIT | diff --git a/changes/1747-noelevans.md b/changes/1747-noelevans.md
new file mode 100644
index 000000000..9d100acf3
--- /dev/null
+++ b/changes/1747-noelevans.md
@@ -0,0 +1,1 @@
+Properly represent `Literal` Enums when `use_enum_values` is True.
diff --git a/changes/1935-wozniakty.md b/changes/1935-wozniakty.md
new file... | Adding deque to valid field types
<!-- Thank you for your contribution! -->
<!-- Unless your change is trivial, please create an issue to discuss the change before creating a PR -->
<!-- See https://pydantic-docs.helpmanual.io/contributing/ for help on Contributing -->
## Change Summary
Got bored so I PR'd an i... | Accept deque as sequence-like input data type
### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this feature/change is needed... | samuelcolvin/pydantic | diff --git a/tests/test_main.py b/tests/test_main.py
index b19b6f914..2bed15fe4 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -17,6 +17,7 @@ from pydantic import (
constr,
validator,
)
+from pydantic.typing import Literal
def test_success():
@@ -609,6 +610,34 @@ def test_enum_values():
... | [
"tests/test_main.py::test_literal_enum_values",
"tests/test_types.py::test_list_success[value4-result4]",
"tests/test_types.py::test_tuple_success[value4-result4]",
"tests/test_types.py::test_sequence_success[int-value2-result2]",
"tests/test_types.py::test_frozenset_field_conversion[value3-result3]",
"te... | [
"tests/test_main.py::test_success",
"tests/test_main.py::test_ultra_simple_missing",
"tests/test_main.py::test_ultra_simple_failed",
"tests/test_main.py::test_default_factory_field",
"tests/test_main.py::test_default_factory_no_type_field",
"tests/test_main.py::test_comparing",
"tests/test_main.py::test... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://pydantic-docs.helpmanual.io/"
],
"inte... |
7321556060c61e08f87868063cd23c677990139d | 2025-03-30 20:41:13 | docker.io/swerebenchv2/zauberzeug-nicegui:4550-7321556 | zauberzeug__nicegui-4550 | Method: User.javascript_rules (property)
Location: Defined in `nicegui/testing/user.py` within the `User` class `__init__` method.
Inputs:
- **key** – `re.Pattern` (compiled regular expression) used to match JavaScript code.
- **value** – `Callable[[re.Match], Any]` a function that receives the regex match obj... | python | MIT | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 77dc5d5a..f1136157 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -5,7 +5,7 @@ default_stages: [commit]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.8.1
+ rev: v0.11.3
hooks:
- id... | Avoid RuntimeError while iterating over bindable properties
This PR tries to fix #4419 by disabling the GC while copying the dictionary of bindable properties. Calling `list()` iterates over the dictionary, which can case a "RuntimeError: dictionary changed size during iteration" if the garbage collector runs at the sa... | Bindable Properties: RuntimeError: dictionary changed size during iteration
### Description
Hello,
currently we observe the following exception in different parts of our code:
```python
Traceback (most recent call last):
[...]
File "/opt/conda/envs/.../lib/python3.10/site-packages/nicegui/element.py", line 489, ... | zauberzeug/nicegui | diff --git a/nicegui/testing/user.py b/nicegui/testing/user.py
index 5ae2a7f2..e046e042 100644
--- a/nicegui/testing/user.py
+++ b/nicegui/testing/user.py
@@ -2,7 +2,7 @@ from __future__ import annotations
import asyncio
import re
-from typing import Any, List, Optional, Set, Type, TypeVar, Union, overload
+from ty... | [
"tests/test_user_simulation.py::test_drawer"
] | [
"tests/test_user_simulation.py::test_auto_index_page",
"tests/test_user_simulation.py::test_multiple_pages",
"tests/test_user_simulation.py::test_source_element",
"tests/test_user_simulation.py::test_button_click",
"tests/test_user_simulation.py::test_assertion_raised_when_no_nicegui_page_is_returned",
"t... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B4",
"confidence": 0.92,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": true,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/zauberzeug/nicegui/pull/4122"
]... |
f762d27608dc83ed0a98f15cac5094b764b64dec | 2015-06-24 22:21:56 | docker.io/swerebenchv2/boto-botocore:590-f762d27 | boto__botocore-590 | No new interfaces are introduced. | python | Apache-2.0 | diff --git a/botocore/docs/utils.py b/botocore/docs/utils.py
index e0af0086b..3d79d1ce6 100644
--- a/botocore/docs/utils.py
+++ b/botocore/docs/utils.py
@@ -102,8 +102,8 @@ class AutoPopulatedParam(object):
self.param_description = param_description
if param_description is None:
self.para... | Making UserData docs more clear about base64
This commit updates the UserData docs to be more clear that you should not base64 encode the value when providing the parameter. The text is now bold to make it more pronounced.
Also added a minor typo fix for the default AutoPopulatedParam description.
Closes #585
... | UserData docs for EC2 should be updated
The docs currently say:

We should clarify this. We *always* encode the user data to base64 if it's provided. I think we should remove the append doc handler and ... | boto/botocore | diff --git a/tests/functional/docs/test_autoscaling.py b/tests/functional/docs/test_autoscaling.py
index d6e47db27..03c245575 100644
--- a/tests/functional/docs/test_autoscaling.py
+++ b/tests/functional/docs/test_autoscaling.py
@@ -17,4 +17,4 @@ class TestAutoscalingDocs(BaseDocsFunctionalTest):
def test_document... | [
"tests/functional/docs/test_autoscaling.py::TestAutoscalingDocs::test_documents_encoding_of_user_data",
"tests/functional/docs/test_ec2.py::TestEc2Docs::test_documents_encoding_of_user_data"
] | [
"tests/functional/docs/test_ec2.py::TestEc2Docs::test_copy_snapshot_destination_region_is_autopopulated",
"tests/functional/docs/test_ec2.py::TestEc2Docs::test_copy_snapshot_presigned_url_is_autopopulated"
] | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
464775a6d8c45e08f960c744dcc78baf2dc12a99 | 2023-07-13 10:27:48 | docker.io/swerebenchv2/laspy-laspy:281-464775a | laspy__laspy-281 | Method: LasHeader.__init__(self, version, point_format)
Location: laspy/header.py
Inputs:
- version: the LAS file version (e.g., a string or Version enum)
- point_format: a PointFormat instance describing the point layout
Outputs: a new LasHeader object; its creation_date attribute is initialized to date.today()... | python | custom-check-github | diff --git a/laspy/header.py b/laspy/header.py
index db5a43b..28fa3f6 100644
--- a/laspy/header.py
+++ b/laspy/header.py
@@ -217,7 +217,7 @@ class LasHeader:
#: Initialized to 'laspy'
self.generating_software: Union[str, bytes] = DEFAULT_GENERATING_SOFTWARE
self._point_format: PointFormat = p... | Fix: don't reset custom creation_date
LasHeader.partial_reset used to always reset the
creation_date to date.today(),
meaning users could not set a custom date.
This makes it so that if the header already has a date where becayse manually set by the user or because it is the value read from a file, it won't get re... | Allow for writing a custom creation date
Currently setting a custom creation date is not possible because it gets [reset](https://github.com/laspy/laspy/blob/464775a6d8c45e08f960c744dcc78baf2dc12a99/laspy/header.py#L469) to `date.today()` in a `partial_reset()` [call](https://github.com/laspy/laspy/blob/464775a6d8c45e0... | laspy/laspy | diff --git a/tests/test_header.py b/tests/test_header.py
index d64397a..f84692d 100644
--- a/tests/test_header.py
+++ b/tests/test_header.py
@@ -1,3 +1,4 @@
+import copy
import io
from datetime import date
@@ -52,8 +53,6 @@ def test_nb_points_return_1_4():
def test_header_copy():
- import copy
-
las = ... | [
"tests/test_header.py::test_writing_does_not_reset_customly_set_data"
] | [
"tests/test_header.py::test_header_copy",
"tests/test_header.py::test_set_uuid",
"tests/test_header.py::test_set_offsets",
"tests/test_header.py::test_set_scales",
"tests/test_header.py::test_set_maxs",
"tests/test_header.py::test_set_mins",
"tests/test_header.py::test_point_count_stays_synchronized",
... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://github.com/laspy/laspy/blob/464775a6d8c45e08f960... |
317033f90e17af0a9d314b78fba7941e968a5eeb | 2017-03-08 12:42:31 | docker.io/swerebenchv2/jupyter-kernel-gateway:234-317033f | jupyter__kernel_gateway-234 | Method: TokenAuthorizationMixin.prepare(self)
Location: kernel_gateway/mixins.py
Inputs:
- `self`: a Tornado request handler (or websocket handler) that includes the mixin.
- Expected attributes on `self`:
- `self.settings['kg_auth_token']` (optional str): the token the server expects.
- Optional query ... | python | custom-check-github | diff --git a/docs/source/devinstall.md b/docs/source/devinstall.md
index ff6949f..cd8071f 100644
--- a/docs/source/devinstall.md
+++ b/docs/source/devinstall.md
@@ -69,8 +69,8 @@ make docs
After modifying any of the APIs in `jupyter-websocket` mode, you must update the project's Swagger API specification.
1. Load t... | Websocket auth with token as query param
Fixes #233 for version 2.0:
- unit tests for auth mixin
- code changes to auth mixin
- updated swagger
- fixed swagger link in docs | Support token auth via query parameter
As discussed in #211, token auth for web sockets requires the token to be passed as a query parameter rather than an `Authorization` header. This is independent of the token generation logic mentioned in #211, and compatible with the 1.x API. | jupyter/kernel_gateway | diff --git a/kernel_gateway/tests/test_mixins.py b/kernel_gateway/tests/test_mixins.py
index 55be226..6a55170 100644
--- a/kernel_gateway/tests/test_mixins.py
+++ b/kernel_gateway/tests/test_mixins.py
@@ -4,10 +4,125 @@
import json
import unittest
+
+try:
+ from unittest.mock import Mock, MagicMock
+except Impor... | [
"kernel_gateway/tests/test_mixins.py::TestTokenAuthMixin::test_differing_tokens_valid_url",
"kernel_gateway/tests/test_mixins.py::TestTokenAuthMixin::test_differing_tokens_wrong_url",
"kernel_gateway/tests/test_mixins.py::TestTokenAuthMixin::test_valid_url_token"
] | [
"kernel_gateway/tests/test_mixins.py::TestTokenAuthMixin::test_missing_token",
"kernel_gateway/tests/test_mixins.py::TestTokenAuthMixin::test_no_token_required",
"kernel_gateway/tests/test_mixins.py::TestTokenAuthMixin::test_valid_header_token",
"kernel_gateway/tests/test_mixins.py::TestTokenAuthMixin::test_w... | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
d0ef10b1d3e53f04c9a6c6894de53adf2a9628a9 | 2021-03-16 09:42:39 | docker.io/swerebenchv2/pyccel-pyccel:805-d0ef10b | pyccel__pyccel-805 | Function: f(x: 'float[:]', y: 'float[:]')
Location: modules/Module_6.py
Inputs:
- **x** – a one‑dimensional NumPy‐compatible array of floats (intent inout). Its elements are overwritten with their indices and, for every third element, a subset of the array is modified via a sliced view.
- **y** – a one‑dimensional Num... | python | MIT | diff --git a/pyccel/ast/core.py b/pyccel/ast/core.py
index 22b1837d..9b7c7f63 100644
--- a/pyccel/ast/core.py
+++ b/pyccel/ast/core.py
@@ -90,7 +90,6 @@ __all__ = (
'With',
'create_variable',
'create_incremented_string',
- 'get_assigned_symbols',
'get_initial_value',
'get_iterable_ranges',
... | Fix bug in semantic parser when sliced array is modified in function call
Collect all `Variable` objects from assigned objects to fix #803
**Commit Summary**
- Add test in a module;
- Remove obsolete `get_assigned_symbols` function;
- Add `__str__` method to `IndexedElement`;
- Replace call to `get_assigned_s... | Bug in semantic parser when sliced array is modified in function call
**Describe the bug**
Pull request #716 introduced a regression bug at the semantic stage, which appears when these conditions are met:
- One function modifies an input array (which has `intent(inout)`);
- Another function calls the first functio... | pyccel/pyccel | diff --git a/tests/epyccel/modules/Module_6.py b/tests/epyccel/modules/Module_6.py
new file mode 100644
index 00000000..fccade2b
--- /dev/null
+++ b/tests/epyccel/modules/Module_6.py
@@ -0,0 +1,30 @@
+# pylint: disable=missing-function-docstring, missing-module-docstring/
+
+def set_i(x : 'float[:]', i : 'int', val : '... | [
"tests/epyccel/test_epyccel_modules.py::test_module_4[fortran]",
"tests/epyccel/test_epyccel_modules.py::test_module_4[c]",
"tests/epyccel/test_epyccel_modules.py::test_module_4[python]"
] | [
"tests/epyccel/recognised_functions/test_numpy_funcs.py::test_fabs_call_r[fortran]",
"tests/epyccel/recognised_functions/test_numpy_funcs.py::test_fabs_call_r[c]",
"tests/epyccel/recognised_functions/test_numpy_funcs.py::test_fabs_call_r[python]",
"tests/epyccel/recognised_functions/test_numpy_funcs.py::test_... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
4c65ee880c46388484979ece26be95a76ce84329 | 2024-04-15 20:16:45 | docker.io/swerebenchv2/aio-libs-aiohttp:8337-4c65ee8 | aio-libs__aiohttp-8337 | Method: MultipartWriter.append(self, value, *, content_type=None, headers=None)
Location: tests/test_multipart.py – called as `writer.append("some-data")` and `writer.append("foo")` to create a new multipart part.
Inputs:
- **value** – raw payload data (str, bytes, file‑like object, etc.).
- **content_type** (o... | python | custom-check-github | diff --git a/CHANGES/8335.bugfix.rst b/CHANGES/8335.bugfix.rst
new file mode 100644
index 000000000..cd93b864a
--- /dev/null
+++ b/CHANGES/8335.bugfix.rst
@@ -0,0 +1,1 @@
+Added default Content-Disposition in multipart/form-data responses -- by :user:`Dreamsorcerer`.
diff --git a/aiohttp/multipart.py b/aiohttp/multipar... | [PR #8335/5a6949da backport][3.10] Add Content-Disposition automatically
**This is a backport of PR #8335 as merged into master (5a6949da642d1db6cf414fd0d1f70e54c7b7be14).**
Fixes #8326. | Using MultipartWriter.append_json breaks in 3.9.4 with AssertionError "assert CONTENT_DISPOSITION in payload.headers"
### Describe the bug
After upgrading to 3.9.4 the following example code that used to work in 3.9.3 starts failing. I think the issue was introduced in https://github.com/aio-libs/aiohttp/commit/7d0be3... | aio-libs/aiohttp | diff --git a/tests/test_multipart.py b/tests/test_multipart.py
index 37ac54797..436b70957 100644
--- a/tests/test_multipart.py
+++ b/tests/test_multipart.py
@@ -1282,12 +1282,24 @@ class TestMultipartWriter:
part = writer._parts[0][0]
assert part.headers[CONTENT_TYPE] == "test/passed"
- async def... | [
"tests/test_multipart.py::TestMultipartWriter::test_automatic_content_disposition"
] | [
"tests/test_multipart.py::TestMultipartResponseWrapper::test_at_eof",
"tests/test_multipart.py::TestMultipartResponseWrapper::test_next",
"tests/test_multipart.py::TestMultipartResponseWrapper::test_release",
"tests/test_multipart.py::TestMultipartResponseWrapper::test_release_when_stream_at_eof",
"tests/te... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://github.com/aio-libs/aiohttp/commit/7d0be3fee540a... |
0a8708b9f65e6df554332106f42f9cc57de5a552 | 2024-03-15 05:40:44 | docker.io/swerebenchv2/cogent3-cogent3:1780-0a8708b | cogent3__cogent3-1780 | Method: _rename_column_if_exists(self, db: sqlite3.Connection, table_name: str, old_column: str, new_column: str)
Location: cogent3.core.annotation_db (module‑level function)
Inputs:
• db – open sqlite3.Connection to the annotation database.
• table_name – name of the table whose schema is to be examined. ... | python | BSD-3-Clause | diff --git a/src/cogent3/core/alignment.py b/src/cogent3/core/alignment.py
index 88072defa..4e8860f78 100644
--- a/src/cogent3/core/alignment.py
+++ b/src/cogent3/core/alignment.py
@@ -18,6 +18,7 @@
passed in a stream of two-item label, sequence pairs. However, this can
cause confusion when testing.
"""
+
f... | Refactor AnnotationDb to not use SQL keywords for column names, fixes #1750
Fixes #1750.
Replaces `end` as a column name with `stop` and deprecates related arguments.
On loading a database, columns named `end` are replaced with `stop` (though in conjunction with #1777 old databases would not be able to be loaded ... | Refactor AnnotationDb to not use SQL keywords for column names
`end` is a SQL keyword but has been embedded in the Sqlite3 based AnnotationDb classes, without raising any errors.
We should convert all methods on the `AnnotationDb` classes / subclasses to replace `end` with `stop`. If they method is public, the argum... | cogent3/cogent3 | diff --git a/tests/test_core/test_annotation_db.py b/tests/test_core/test_annotation_db.py
index 28e45da99..858aa0675 100644
--- a/tests/test_core/test_annotation_db.py
+++ b/tests/test_core/test_annotation_db.py
@@ -8,6 +8,7 @@ from cogent3.core.annotation_db import (
GffAnnotationDb,
SupportsFeatures,
... | [
"tests/test_core/test_annotation_db.py::test_assign_valid_db",
"tests/test_core/test_annotation_db.py::test_replace_annotation_db_check_invalid",
"tests/test_core/test_annotation_db.py::test_replace_annotation_db_nocheck_invalid",
"tests/test_core/test_annotation_db.py::test_constructor_db_fail[gff_db-Genbank... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "hard",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
df997acc205e79aaf85a62ee6c4e35e25377ca72 | 2021-09-23 09:39:02 | docker.io/swerebenchv2/astropenguin-xarray-dataclasses:84-df997ac | astropenguin__xarray-dataclasses-84 | Function: get_dims(hint: Any) -> Dims
Location: xarray_dataclasses.typing.get_dims
Inputs:
- **hint** – a type hint (typically a `Data[...]` generic alias or other typing construct) that can be parsed by the function.
Constraints: must represent a tuple of dimension names either directly or via literals.
Outputs:
-... | python | MIT | diff --git a/xarray_dataclasses/datamodel.py b/xarray_dataclasses/datamodel.py
index 70e08e7..ac65410 100644
--- a/xarray_dataclasses/datamodel.py
+++ b/xarray_dataclasses/datamodel.py
@@ -9,16 +9,18 @@ from typing import Any, Callable, cast, Generic, List, TypeVar, Union
# dependencies
import numpy as np
import xar... | Fix parsing dataclass under __future__.annotations enabled
This PR closes #65. | Fix parsing dataclass under __future__.annotations enabled
The current (v0.4.0) dataclass parser (`xarray_dataclasses.parse`) does not work when the postponed evaluation of annotations ([PEP 563](https://www.python.org/dev/peps/pep-0563)) is enabled by importing `from __future__ import annotations`. This is because the... | astropenguin/xarray-dataclasses | diff --git a/tests/test_typing.py b/tests/test_typing.py
index 497a2ce..53f2e88 100644
--- a/tests/test_typing.py
+++ b/tests/test_typing.py
@@ -1,60 +1,44 @@
# standard library
-from typing import Any, ForwardRef, Tuple, Union
+from typing import Any, Tuple
# third-party packages
from pytest import mark
-from t... | [
"tests/test_typing.py::test_get_dims[Annotated-dims0]",
"tests/test_typing.py::test_get_dims[Annotated-dims1]",
"tests/test_typing.py::test_get_dims[Annotated-dims2]",
"tests/test_typing.py::test_get_dims[Annotated-dims3]",
"tests/test_typing.py::test_get_dtype[Annotated-None0]",
"tests/test_typing.py::te... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://www.python.org/dev/peps/pep-0563"
],
"... |
e7d4f5a299a356ccf8988029796fe296db57536d | 2021-09-21 17:28:40 | docker.io/swerebenchv2/theacodes-nox:482-e7d4f5a | theacodes__nox-482 | Method: Session.warn(self, *args, **kwargs)
Location: nox.sessions.Session class
Inputs: Arbitrary positional arguments (typically a message string) and optional keyword arguments forwarded to the underlying logger; accepts any types accepted by `logging.Logger.warning`.
Outputs: None (returns None); causes a WARNIN... | python | Apache-2.0 | diff --git a/nox/sessions.py b/nox/sessions.py
index 5d1b35c..78a0286 100644
--- a/nox/sessions.py
+++ b/nox/sessions.py
@@ -516,6 +516,10 @@ class Session:
"""Outputs a log during the session."""
logger.info(*args, **kwargs)
+ def warn(self, *args: Any, **kwargs: Any) -> None:
+ """Output... | Add `session.warn` to output warnings
Closes #481. Create `session.warn` to show warnings during the session.
cc @theacodes @FollowTheProcess | Expose a `warn` log to the session
**How would this feature be useful?**
<!-- Describe any use cases this solves or frustrations it alleviates. -->
I often find myself using the `session.log` method in some of my more complex sessions to inform the user
what's going on.
I do use the `session.error` for failing ... | theacodes/nox | diff --git a/tests/test_sessions.py b/tests/test_sessions.py
index 3c949e6..2d66ba9 100644
--- a/tests/test_sessions.py
+++ b/tests/test_sessions.py
@@ -601,6 +601,14 @@ class TestSession:
assert "meep" in caplog.text
+ def test_warn(self, caplog):
+ caplog.set_level(logging.WARNING)
+ ses... | [
"tests/test_sessions.py::TestSession::test_warn"
] | [
"tests/test_sessions.py::test__normalize_path",
"tests/test_sessions.py::test__normalize_path_hash",
"tests/test_sessions.py::test__normalize_path_give_up",
"tests/test_sessions.py::TestSession::test_create_tmp",
"tests/test_sessions.py::TestSession::test_create_tmp_twice",
"tests/test_sessions.py::TestSe... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.99,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
dfda856838734dab577ea154699809f2bd767812 | 2024-04-08 13:22:08 | docker.io/swerebenchv2/getmoto-moto:7579-dfda856 | getmoto__moto-7579 | Method: TransitGatewayRouteTables.disable_transit_gateway_route_table_propagation(self, TransitGatewayAttachmentId: str, TransitGatewayRouteTableId: str)
Location: moto/ec2/responses/transit_gateway_route_tables.py (class TransitGatewayRouteTables)
Inputs:
- **TransitGatewayAttachmentId** – the identifier of the TGW a... | python | Apache-2.0 | diff --git a/moto/ec2/models/transit_gateway_attachments.py b/moto/ec2/models/transit_gateway_attachments.py
index 0b37d99d8..399de01dd 100644
--- a/moto/ec2/models/transit_gateway_attachments.py
+++ b/moto/ec2/models/transit_gateway_attachments.py
@@ -222,6 +222,18 @@ class TransitGatewayAttachmentBackend:
... | EC2: RouteTables: Allow multiple propagations
Fixes #7556
New test was validated against AWS | AWS TgwRT : Attachment Propagations should be a list of dicts
https://github.com/getmoto/moto/blob/a7ce969b260ac87604d7b87a171d8ce5d3c7b60c/moto/ec2/models/transit_gateway_route_tables.py#L31
FROM:
```
self.route_table_association: Dict[str, str] = {}
self.route_table_propagation: Dict[str, str] =... | getmoto/moto | diff --git a/tests/test_ec2/test_transit_gateway.py b/tests/test_ec2/test_transit_gateway.py
index 7687e2b8b..0a4b1a2e7 100644
--- a/tests/test_ec2/test_transit_gateway.py
+++ b/tests/test_ec2/test_transit_gateway.py
@@ -1,3 +1,4 @@
+from time import sleep
from unittest import SkipTest
import boto3
@@ -781,50 +782,... | [
"tests/test_ec2/test_transit_gateway.py::test_enable_transit_gateway_route_table_propagation",
"tests/test_ec2/test_transit_gateway.py::test_disable_transit_gateway_route_table_propagation_without_enabling_first",
"tests/test_ec2/test_transit_gateway.py::test_disable_transit_gateway_route_table_propagation"
] | [
"tests/test_ec2/test_transit_gateway.py::test_describe_transit_gateways",
"tests/test_ec2/test_transit_gateway.py::test_create_transit_gateway",
"tests/test_ec2/test_transit_gateway.py::test_create_transit_gateway_with_tags",
"tests/test_ec2/test_transit_gateway.py::test_delete_transit_gateway",
"tests/test... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.94,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/getmoto/moto/blob/a7ce969b260ac8760... |
421f1e88ff4661b4433b97ec57b040a2a74e5aed | 2024-03-06 20:37:21 | docker.io/swerebenchv2/python-markdown-markdown:1448-421f1e8 | python-markdown__markdown-1448 | No new interfaces are introduced. | python | BSD-3-Clause | diff --git a/docs/changelog.md b/docs/changelog.md
index 33f05ce..8deaefd 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Include `scripts/*.py` in the generated source tarballs (#1430).
* Ensure lines after he... | Explicitly omit carot and backslash from abbr
Fixes #1444. | "Unterminated character set" exception when using extra extension
Hi,
When using the "extra" extensions, some invalid markdowns (i think?) are causing exceptions rather than returning plaintext line.
Example:
```
txt = """
*[^1^]: This is going to crash if extra extension is enabled
"""
import markdown
... | Python-Markdown/markdown | diff --git a/tests/test_extensions.py b/tests/test_extensions.py
index a9e789f..c96772f 100644
--- a/tests/test_extensions.py
+++ b/tests/test_extensions.py
@@ -85,35 +85,6 @@ class TestExtensionClass(unittest.TestCase):
self.assertEqual(ext.getConfigs(), {'foo': 'baz', 'bar': 'blah'})
-class TestAbbr(unit... | [
"tests/test_syntax/extensions/test_abbr.py::TestAbbr::test_abbr_ignore_special_chars"
] | [
"tests/test_extensions.py::TestExtensionClass::testConfigAsKwargsOnInit",
"tests/test_extensions.py::TestExtensionClass::testGetConfig",
"tests/test_extensions.py::TestExtensionClass::testGetConfigDefault",
"tests/test_extensions.py::TestExtensionClass::testGetConfigInfo",
"tests/test_extensions.py::TestExt... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
0dea45f2e5d96d1501910dd33fc0b2700a4a33de | 2021-06-12 11:30:33 | docker.io/swerebenchv2/postlund-pyatv:1135-0dea45f | postlund__pyatv-1135 | Method: Audio.volume(self)
Location: Used in tests `raop_client.audio.volume` (tests/raop/test_raop_functional.py) and in facade volume getter (tests/support/test_facade.py).
Inputs: None.
Outputs: Returns a float representing the current volume level in percent (0 – 100). Raises `exceptions.ProtocolError` if the un... | python | MIT | diff --git a/docs/api/pyatv/interface.html b/docs/api/pyatv/interface.html
index 9f1f9bd3..8e8f5e2d 100644
--- a/docs/api/pyatv/interface.html
+++ b/docs/api/pyatv/interface.html
@@ -1129,7 +1129,10 @@ class Features:
class Audio:
- """Base class for audio functionality."""
+ "... | raop: Add support for volume controls
Fixes #1129
<a href="https://gitpod.io/#https://github.com/postlund/pyatv/pull/1135"><img src="https://gitpod.io/button/open-in-gitpod.svg"/></a>
| Support for the audio interface in RAOP
**Short feature/function description**
I added the audio interface a while back in #1074, but it has not been implemented for any protocol yet. It should be pretty easy to implement for RAOP, so I would like to do that before releasing 0.8.0. I should also implement `volume_up` ... | postlund/pyatv | diff --git a/tests/fake_device/raop.py b/tests/fake_device/raop.py
index 6bedbd36..b671f0ba 100644
--- a/tests/fake_device/raop.py
+++ b/tests/fake_device/raop.py
@@ -1,6 +1,8 @@
"""Fake RAOP device for tests."""
import asyncio
+from functools import wraps
import logging
+import plistlib
from types import SimpleNam... | [
"tests/support/test_facade.py::test_features_multi_instances",
"tests/support/test_facade.py::test_features_feature_overlap_uses_priority",
"tests/support/test_support.py::test_log_binary_no_log_if_not_debug",
"tests/support/test_support.py::test_log_binary_no_log_if_not_custom_level",
"tests/support/test_s... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.95,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
554a333476732459598eb71ef747115774ca99f2 | 2024-08-20 18:01:17 | docker.io/swerebenchv2/pallets-werkzeug:2938-554a333 | pallets__werkzeug-2938 | No new interfaces are introduced. | python | BSD-3-Clause | diff --git a/CHANGES.rst b/CHANGES.rst
index 41878b5d..600ec0b2 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -5,6 +5,10 @@ Version 3.0.4
Unreleased
+- Restore behavior where parsing `multipart/x-www-form-urlencoded` data with
+ invalid UTF-8 bytes in the body results in no form data parsed rather than a
+ ... | restore invalid bytes behavior for form parser
#2694 removed max part limit from `application/x-www-form-urlencoded` parsing, previously added in #2620. However, it left the `except ValueError: raise RequestEntityTooLarge`. If `body.decode()` raised a `UnicodeError`, it resulted in a 413 error rather than being silentl... | Unexpected 413 - RequestEntityTooLarge response
# Bug
When sending non utf-8 bytes into a form the flask server responds with `413 - RequestEntityTooLarge`. This does not seem like the appropriate http error to return in this case. This happens when using a flask app however it might be a bug in werkzeug.
# Repro... | pallets/werkzeug | diff --git a/tests/test_formparser.py b/tests/test_formparser.py
index 1ecb0120..ed63be68 100644
--- a/tests/test_formparser.py
+++ b/tests/test_formparser.py
@@ -122,13 +122,21 @@ class TestFormParser:
req.max_form_parts = 1
pytest.raises(RequestEntityTooLarge, lambda: req.form["foo"])
- def tes... | [
"tests/test_formparser.py::TestFormParser::test_urlencoded_silent_decode"
] | [
"tests/test_formparser.py::TestFormParser::test_limiting",
"tests/test_formparser.py::TestFormParser::test_urlencoded_no_max",
"tests/test_formparser.py::TestFormParser::test_missing_multipart_boundary",
"tests/test_formparser.py::TestFormParser::test_parse_form_data_put_without_content",
"tests/test_formpa... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
5dda5d662a6e1285bc030c24066819695dcbd903 | 2025-04-14 22:08:25 | docker.io/swerebenchv2/ethereum-web3.py:3663-5dda5d6 | ethereum__web3.py-3663 | No new interfaces are introduced. | python | MIT | diff --git a/newsfragments/3642.bugfix.rst b/newsfragments/3642.bugfix.rst
new file mode 100644
index 00000000..f742e55f
--- /dev/null
+++ b/newsfragments/3642.bugfix.rst
@@ -0,0 +1,1 @@
+Checks that ``PersistentConnectionProvider`` response cache value is a dict before attempting to access it like one. Also adds check... | check _request_information_cache value is a dict before .get-ing from it
### What was wrong?
Mixing batching and non-batching calls causing issues.
Closes #3642
### How was it fixed?
- Check that the value from cache is a `dict` before `get`ting from it.
- Add `try/finally` blocks (via a decorator) to all `... | 7.9.0: Can't make batch requests without `provider._is_batching`
### What happened?
in < 7.9.0 you could make both batch and single requests without any fuckery around `_is_batching`
### Code that produced the error
```python
def _raise_stray_errors_from_cache(self) -> None:
"""
Check the request res... | ethereum/web3.py | diff --git a/tests/core/providers/test_async_http_provider.py b/tests/core/providers/test_async_http_provider.py
index 4ae96224..21715d9e 100644
--- a/tests/core/providers/test_async_http_provider.py
+++ b/tests/core/providers/test_async_http_provider.py
@@ -130,3 +130,21 @@ async def test_async_http_empty_batch_respon... | [
"tests/core/providers/test_async_http_provider.py::test_async_provider_is_batching_when_make_batch_request",
"tests/core/providers/test_http_provider.py::test_sync_provider_is_batching_when_make_batch_request",
"tests/core/providers/test_ipc_provider.py::test_ipc_provider_is_batching_when_make_batch_request",
... | [
"tests/core/providers/test_async_http_provider.py::test_async_no_args",
"tests/core/providers/test_async_http_provider.py::test_init_kwargs",
"tests/core/providers/test_async_http_provider.py::test_web3_with_async_http_provider_has_default_middleware_and_modules",
"tests/core/providers/test_async_http_provide... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.92,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": ... |
dbfa456dda04f995479c995a361b60f521e1753e | 2024-02-25 22:56:32 | docker.io/swerebenchv2/getmoto-moto:7393-dbfa456 | getmoto__moto-7393 | Method: MotoAPIBackend.get_config(self)
Location: moto/moto_api/_internal/models.py
Inputs: None (uses the global `default_user_config` state).
Outputs: Dict[str, Any] containing the current configuration for the “batch” and “lambda” services, e.g. `{"batch": {"use_docker": …}, "lambda": {"use_docker": …}}.
Des... | python | Apache-2.0 | diff --git a/docs/docs/configuration/index.rst b/docs/docs/configuration/index.rst
index c2e8b7ad1..3a2e59d06 100644
--- a/docs/docs/configuration/index.rst
+++ b/docs/docs/configuration/index.rst
@@ -20,7 +20,8 @@ If you are using the decorators, some options are configurable within the decora
"servic... | Core: Add endpoint to configure Dockerless services in ServerMode
Fixes #7344 | No way to apply Configuration Options when using Server Mode
I am using moto in server mode (either by directly running it as a separate docker-compose service, or via `ThreadedMotoServer`), and as far as I can tell there is no way to specify the configuration options documented at https://docs.getmoto.org/en/latest/do... | getmoto/moto | diff --git a/tests/test_core/test_config.py b/tests/test_core/test_config.py
new file mode 100644
index 000000000..63ba387ff
--- /dev/null
+++ b/tests/test_core/test_config.py
@@ -0,0 +1,52 @@
+import requests
+
+from moto import mock_aws, settings
+from moto.awslambda.models import LambdaBackend
+from moto.awslambda.u... | [
"tests/test_core/test_config.py::test_change_configuration_using_api"
] | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://docs.getmoto.org/en/latest/docs/configuration/... |
6e817db9bdf564860b84ed84b9c3b25a50fceb9d | 2021-11-10 10:57:34 | docker.io/swerebenchv2/pennylaneai-pennylane:1884-6e817db | pennylaneai__pennylane-1884 | Function: param_shift_hessian(tape, f0=None, hybrid=True)
Location: pennylane/gradients/param_shift_hessian.py
Inputs:
- **tape** (QuantumTape or QNode): the quantum tape or QNode whose Hessian is to be computed.
- **f0** (tensor_like[float] or None, optional): pre‑evaluated result of the original tape; if supplied and... | python | Apache-2.0 | diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index f8d799a09..94016a23a 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -214,6 +214,39 @@
The adjoint method requires memory for 4 independent state vectors, which corresponds roughly
to storing a state... | Add a parameter-shift Hessian transformation
**Context:** Currently, it is possible to compute the parameter-shift Hessian of a QNode by using an autodifferentiation framework, and asking for the Jacobian of the gradient (or the Jacobian of the Jacobian, for a vector-valued QNode). However, this leads to redundant eval... | Add a parameter shift Hessian transform
### Feature details
Currently, it is possible to compute the parameter-shift Hessian of a QNode by using an autodifferentiation framework, and asking for the Jacobian of the gradient (or the Jacobian of the Jacobian, for a vector-valued QNode):
```python
dev = qml.device("de... | PennyLaneAI/pennylane | diff --git a/tests/gradients/test_param_shift_hessian.py b/tests/gradients/test_param_shift_hessian.py
new file mode 100644
index 000000000..14610311b
--- /dev/null
+++ b/tests/gradients/test_param_shift_hessian.py
@@ -0,0 +1,693 @@
+# Copyright 2018-2021 Xanadu Quantum Technologies Inc.
+
+# Licensed under the Apache ... | [
"tests/gradients/test_param_shift_hessian.py::TestParameterShiftHessian::test_single_two_term_gate",
"tests/gradients/test_param_shift_hessian.py::TestParameterShiftHessian::test_single_two_term_gate_vector_output",
"tests/gradients/test_param_shift_hessian.py::TestParameterShiftHessian::test_multiple_two_term_... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "hard",
"external_urls": [
"https://arxiv.org/abs/2008.06517",
"https://arxiv.... |
eff997d12eb55b0123468a6c8adfd5bf40a13c42 | 2020-03-08 16:15:23 | docker.io/swerebenchv2/joerick-cibuildwheel:295-eff997d | joerick__cibuildwheel-295 | Function: BuildOptions(project_dir: str, package_dir: str, output_dir: str, test_command: Optional[str], test_requires: List[str], test_extras: str, before_build: Optional[str], before_test: Optional[str], environment: Mapping[str, str], dependency_constraints: DependencyConstraint, manylinux_images: Mapping[str, str],... | python | custom-check-github | diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py
index ffb0b684..9d7331da 100644
--- a/cibuildwheel/__main__.py
+++ b/cibuildwheel/__main__.py
@@ -63,10 +63,10 @@ def main():
parser.add_argument('--output-dir',
default=os.environ.get('CIBW_OUTPUT_DIR', 'wheelhouse'),
... | Provide `package_dir` for setting subdirectory of project
This PR creates a way to provide `package_dir` for setting subdirectory of project and closes #294.
I added additional `package_dir` argument, which should be a subdirectory of `project_dir` (written as a normal relative path to cwd), which should contain the... | Building wheels for package in subdirectory of project
Is there any way to build wheels for a package in a subdirectory of the project?
Example of this is when GitHub project contains some C++ code, while Python bindings are located in some subdirectory of that project, like `bindings/python`. Then it's also not pos... | joerick/cibuildwheel | diff --git a/unit_test/main_tests/conftest.py b/unit_test/main_tests/conftest.py
index 227b8df7..cd896915 100644
--- a/unit_test/main_tests/conftest.py
+++ b/unit_test/main_tests/conftest.py
@@ -18,7 +18,7 @@ def __call__(self, *args, **kwargs):
self.kwargs = kwargs
-MOCK_PROJECT_DIR = 'some_project_dir'
+... | [
"unit_test/main_tests/main_platform_test.py::test_platform_argument[linux]",
"unit_test/main_tests/main_platform_test.py::test_platform_argument[macos]",
"unit_test/main_tests/main_platform_test.py::test_platform_argument[windows]",
"unit_test/main_tests/main_platform_test.py::test_platform_environment[linux]... | [
"unit_test/main_tests/main_platform_test.py::test_unknown_platform_non_ci",
"unit_test/main_tests/main_platform_test.py::test_unknown_platform_on_ci",
"unit_test/main_tests/main_platform_test.py::test_unknown_platform"
] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.99,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
8050a7194a52b2ebeb9d3981034a60a5e2a59d1a | 2022-07-11 11:29:59 | docker.io/swerebenchv2/pyomo-pyomo:2458-8050a71 | pyomo__pyomo-2458 | Function: quicksum(args, start=0, linear=None)
Location: pyomo.core.util.quicksum
Inputs:
- **args** – an iterable (e.g., list, tuple, generator) supplying the terms to be summed. Must support the iterator protocol; otherwise a **TypeError** is raised after logging an error.
- **start** – optional numeric value used... | python | custom-check-github | diff --git a/pyomo/core/util.py b/pyomo/core/util.py
index 78f3e8357..9d9adcff6 100644
--- a/pyomo/core/util.py
+++ b/pyomo/core/util.py
@@ -21,6 +21,8 @@ from pyomo.core.expr import current as EXPR
from pyomo.core.base.var import Var
from pyomo.core.base.expression import Expression
from pyomo.core.base.component i... | Fix exception handling logic bug in `quicksum`
## Fixes #2457 .
## Summary/Motivation:
If the generator passed to `quicksum` raises an exception at the first call to next, the exception handling logic of quicksum will hide the exception from the user and return an expression as 0. This behavior of quicksum may pr... | 'quicksum' hides exceptions raised in generator from the user, leading to a wrong model
## Summary
If the generator passed to `quicksum` raises an exception at the first call to __next__, the exception handling logic of `quicksum` will hide the exception from the user and return an expression as `0`. This behavior of... | Pyomo/pyomo | diff --git a/pyomo/core/tests/unit/test_numeric_expr.py b/pyomo/core/tests/unit/test_numeric_expr.py
index 3a74e0778..c55047318 100644
--- a/pyomo/core/tests/unit/test_numeric_expr.py
+++ b/pyomo/core/tests/unit/test_numeric_expr.py
@@ -3677,6 +3677,32 @@ class TestSumExpression(unittest.TestCase):
e = quicksu... | [
"pyomo/core/tests/unit/test_numeric_expr.py::TestSumExpression::test_quicksum_exception_exposure",
"pyomo/core/tests/unit/test_numeric_expr.py::TestSumExpression::test_quicksum_reject_noniterable"
] | [
"pyomo/core/tests/unit/test_numeric_expr.py::TestExpression_EvaluateNumericConstant::test_arithmetic",
"pyomo/core/tests/unit/test_numeric_expr.py::TestExpression_EvaluateNumericConstant::test_eq",
"pyomo/core/tests/unit/test_numeric_expr.py::TestExpression_EvaluateNumericConstant::test_gt",
"pyomo/core/tests... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
fd66843cf79c7b320af0caa319f6e4ecfd4b142c | 2023-02-26 22:48:03 | docker.io/swerebenchv2/getmoto-moto:5989-fd66843 | getmoto__moto-5989 | Method: KmsResponse.list_aliases(self)
Location: moto/kms/responses.py
Inputs: *KeyId* (optional str) – a KMS key identifier that may be a plain KeyId or an ARN. When supplied, the response is filtered to only include aliases whose **TargetKeyId** matches the resolved raw key ID.
Outputs: dict – JSON‑serialisable respo... | python | Apache-2.0 | diff --git a/moto/kms/models.py b/moto/kms/models.py
index 917407699..0ce417126 100644
--- a/moto/kms/models.py
+++ b/moto/kms/models.py
@@ -374,7 +374,8 @@ class KmsBackend(BaseBackend):
return False
def add_alias(self, target_key_id, alias_name):
- self.key_to_aliases[target_key_id].add(alias_n... | S3 - Add Glacier IR
Fixes #5971 | Missing s3 storage class
Hello, please add missing s3 storage class GLACIER_IR in https://github.com/getmoto/moto/blob/3a7f10fece9df37a72adc4c642f26cf208256322/moto/s3/models.py#L62 | getmoto/moto | diff --git a/tests/test_kms/test_kms_boto3.py b/tests/test_kms/test_kms_boto3.py
index f82d56309..d04cdc919 100644
--- a/tests/test_kms/test_kms_boto3.py
+++ b/tests/test_kms/test_kms_boto3.py
@@ -281,6 +281,45 @@ def test_list_aliases():
)
+@mock_kms
+def test_list_aliases_for_key_id():
+ region = "us-... | [
"tests/test_kms/test_kms_boto3.py::test_list_aliases_for_key_id",
"tests/test_kms/test_kms_boto3.py::test_list_aliases_for_key_arn"
] | [
"tests/test_kms/test_kms_boto3.py::test_create_key_without_description",
"tests/test_kms/test_kms_boto3.py::test_create_key",
"tests/test_kms/test_kms_boto3.py::test_create_multi_region_key",
"tests/test_kms/test_kms_boto3.py::test_non_multi_region_keys_should_not_have_multi_region_properties",
"tests/test_... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.88,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/getmoto/moto/blob/3a7f10fece9df37a7... |
aea3585a74a5f429c6d84ad2bf7f1881a6492761 | 2024-07-14 09:46:58 | docker.io/swerebenchv2/getmoto-moto:7850-aea3585 | getmoto__moto-7850 | Method: client.head_object(self, Bucket: str, Key: str, PartNumber: int | None = None) Location: Moto S3Response._key_response_get (used by boto3 S3 client)
Inputs:
- Bucket – name of the S3 bucket (string).
- Key – object key (string).
- PartNumber – optional integer indicating which part of the object to retriev... | python | Apache-2.0 | diff --git a/moto/s3/exceptions.py b/moto/s3/exceptions.py
index 7f12ae885..237096533 100644
--- a/moto/s3/exceptions.py
+++ b/moto/s3/exceptions.py
@@ -481,6 +481,13 @@ class InvalidRange(S3ClientError):
)
+class RangeNotSatisfiable(S3ClientError):
+ code = 416
+
+ def __init__(self) -> None:
+ ... | S3: head_object()/get_object() now support the PartNumber for regular keys
Fixes #7779
If we call `get_object(.., PartNumber=x)` on a multipart upload, we should probably return only that specific part - but that's not yet implemented.
For now, we only support `PartNumber=1` on an entire key, and treat it as a Ran... | S3: get/head with partNumber is returning 200 status code instead of 206
```
s3 = boto3.resource("s3")
s3.create_bucket(Bucket="bucket")
s3.Object("bucket", "some-key").put(Body="foo")
assert s3.meta.client.head_object(Bucket="bucket", Key="some-key", PartNumber=1)["ResponseMetadata"]["HTTPStatusCode"] == 206
``... | getmoto/moto | diff --git a/tests/test_s3/__init__.py b/tests/test_s3/__init__.py
index e89b1490c..55d0f0c7a 100644
--- a/tests/test_s3/__init__.py
+++ b/tests/test_s3/__init__.py
@@ -23,7 +23,7 @@ def s3_aws_verified(func):
"""
@wraps(func)
- def pagination_wrapper():
+ def pagination_wrapper(**kwargs):
bu... | [
"tests/test_s3/test_s3.py::test_head_object[10]",
"tests/test_s3/test_s3.py::test_head_object[10000000]",
"tests/test_s3/test_s3.py::test_get_object[10]",
"tests/test_s3/test_s3.py::test_get_object[10000000]"
] | [
"tests/test_s3/test_s3.py::test_keys_are_pickleable",
"tests/test_s3/test_s3.py::test_my_model_save[us-west-2-aws]",
"tests/test_s3/test_s3.py::test_my_model_save[cn-north-1-aws-cn]",
"tests/test_s3/test_s3.py::test_my_model_save[us-isob-east-1-aws-iso-b]",
"tests/test_s3/test_s3.py::test_object_metadata",
... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
bb951aa5f72aa4eeee0b34214ef029ca5f98ffb6 | 2017-08-05 18:41:28 | docker.io/swerebenchv2/axelrod-python-axelrod:1113-bb951aa | axelrod-python__axelrod-1113 | No new interfaces are introduced. | python | custom-check-github | diff --git a/axelrod/strategies/axelrod_second.py b/axelrod/strategies/axelrod_second.py
index 43a34a1e..315cd90e 100644
--- a/axelrod/strategies/axelrod_second.py
+++ b/axelrod/strategies/axelrod_second.py
@@ -197,7 +197,7 @@ class Gladstein(Player):
return C
# Cooperate as long as the co... | Fix a small bug in Gladstein.
I have tested this locally with axelrod_fortran and this strategy now
agrees with the fortran version against all basic strategies.
Closes #1112 | Newly implemented Gladstein isn't correct
Woops we should have checked this on @dmanc's #1110. Using `axelrod_fortran` (https://github.com/Axelrod-Python/axelrod-fortran):
```python
>>> import axelrod as axl
>>> import axelrod_fortran as axlf
>>> axl_gladstein = axl.Gladstein()
>>> gladstein = axlf.Player('k76r'... | Axelrod-Python/Axelrod | diff --git a/axelrod/tests/strategies/test_axelrod_second.py b/axelrod/tests/strategies/test_axelrod_second.py
index 5e27ed34..3e065b1b 100644
--- a/axelrod/tests/strategies/test_axelrod_second.py
+++ b/axelrod/tests/strategies/test_axelrod_second.py
@@ -138,8 +138,8 @@ class TestGladstein(TestPlayer):
self.ve... | [
"axelrod/tests/strategies/test_axelrod_second.py::TestGladstein::test_strategy"
] | [
"axelrod/tests/strategies/test_axelrod_second.py::TestPlayer::test_clone",
"axelrod/tests/strategies/test_axelrod_second.py::TestPlayer::test_initialisation",
"axelrod/tests/strategies/test_axelrod_second.py::TestPlayer::test_match_attributes",
"axelrod/tests/strategies/test_axelrod_second.py::TestPlayer::tes... | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://github.com/Axelrod-Python/axelrod-fortran",
... |
ae5b125a6f20fe6a6fb4e2cc376238490ae3a40d | 2023-12-16 00:08:00 | docker.io/swerebenchv2/meltano-sdk:2107-ae5b125 | meltano__sdk-2107 | Method: SimpleTestStream.with_replication_method(self, method: str | None)
Location: Defined in tests/core/conftest.py within the SimpleTestStream class.
Inputs:
- **method** (str | None): The replication method value to temporarily assign to the stream’s `forced_replication_method` attribute (e.g., `"FULL_TABLE"` o... | python | Apache-2.0 | diff --git a/poetry.lock b/poetry.lock
index 7ec03b9d..55c5a32c 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -3045,4 +3045,4 @@ testing = ["pytest", "pytest-durations"]
[metadata]
lock-version = "2.0"
python-versions = ">=3.7.1"
-content-hash = "0362cfe0889096a98e21a1233e31a2410cd5e68aeb4943f274135d0c3f7b7f53"
+con... | fix(taps): Respect forced replication method when retrieving state
Related:
* Closes #2067 | feat: Make `Stream.get_starting_*()` methods return `None` for full-table replication streams
### Feature scope
Taps (catalog, state, stream maps, tests, etc.)
### Description
If a user leverages the Singer catalog to change the default replication method of a stream from _incremental_ to _full-table_, the har... | meltano/sdk | diff --git a/tests/core/conftest.py b/tests/core/conftest.py
index 06355ccf..97eb76e7 100644
--- a/tests/core/conftest.py
+++ b/tests/core/conftest.py
@@ -3,9 +3,11 @@
from __future__ import annotations
import typing as t
+from contextlib import contextmanager
import pendulum
import pytest
+from typing_extensio... | [
"tests/core/test_streams.py::test_stream_starting_timestamp[datetime-forced-full-table]"
] | [
"tests/core/test_streams.py::test_stream_apply_catalog",
"tests/core/test_streams.py::test_stream_starting_timestamp[datetime-repl-key-no-state]",
"tests/core/test_streams.py::test_stream_starting_timestamp[datetime-repl-key-recent-bookmark]",
"tests/core/test_streams.py::test_stream_starting_timestamp[dateti... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://sdk.meltano.com/en/v0.33.1/classes/singer_sdk.... |
679191810fc962e282b606622c90355f2e6f58ad | 2025-05-20 14:39:55 | docker.io/swerebenchv2/networkx-networkx:8055-6791918 | networkx__networkx-8055 | No new interfaces are introduced. | python | custom-check-github | diff --git a/networkx/algorithms/flow/maxflow.py b/networkx/algorithms/flow/maxflow.py
index 8fb92905c..93497a473 100644
--- a/networkx/algorithms/flow/maxflow.py
+++ b/networkx/algorithms/flow/maxflow.py
@@ -116,6 +116,10 @@ def maximum_flow(flowG, _s, _t, capacity="capacity", flow_func=None, **kwargs):
True, it ... | Fix edge case in ISMAGS symmetry detection
Fixes #4915.
Paraphrasing the original issue (#4915): there is an error in the ISMAGS implementation. For some specific cases it trips an `AssertionError`. This happens for graphs of this shape, where all nodes and edges are equivalent.
```
5 - 4 \ / 12 - 13
0... | ISMAGS trips AssertionError for specific symmetry patterns
There is an error in the ISMAGS implementation. For some specific cases it trips an AssertionError.
This happens for graphs of this shape, where all nodes and edges are equivalent.
```
5 - 4 \ / 12 - 13
0 - 3
9 - 8 / \ 16 - 17
```
During... | networkx/networkx | diff --git a/networkx/algorithms/isomorphism/tests/test_ismags.py b/networkx/algorithms/isomorphism/tests/test_ismags.py
index bc4070ac5..46e5cea58 100644
--- a/networkx/algorithms/isomorphism/tests/test_ismags.py
+++ b/networkx/algorithms/isomorphism/tests/test_ismags.py
@@ -48,6 +48,30 @@ class TestSelfIsomorphism:
... | [
"networkx/algorithms/isomorphism/tests/test_ismags.py::TestSelfIsomorphism::test_self_isomorphism",
"networkx/algorithms/isomorphism/tests/test_ismags.py::TestSelfIsomorphism::test_directed_self_isomorphism"
] | [
"networkx/algorithms/isomorphism/tests/test_ismags.py::TestSelfIsomorphism::test_edgecase_self_isomorphism",
"networkx/algorithms/isomorphism/tests/test_ismags.py::TestSubgraphIsomorphism::test_isomorphism",
"networkx/algorithms/isomorphism/tests/test_ismags.py::TestSubgraphIsomorphism::test_isomorphism2",
"n... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://github.com/networkx/networkx/blob/main/networkx/... |
5fe0f068160f1e0bd8d33c7e982963f7d38e4aa3 | 2023-10-03 13:13:07 | docker.io/swerebenchv2/brazilian-utils-brutils-python:201-5fe0f06 | brazilian-utils__brutils-python-201 | No new interfaces are introduced. | python | MIT | diff --git a/README.md b/README.md
index 0f71ec6..6f9ee02 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,7 @@
[](https://codecov.io/gh/brazilian-utils/brutils-python)
[:
def test_is_valid(self):
# When CEP is not string, returns False
- self.assertFalse(is_valid(1))
+ self.assertIs(is_... | [
"tests/test_phone.py::TestPhone::test_is_valid_landline",
"tests/test_phone.py::TestPhone::test_is_valid_mobile"
] | [
"tests/test_cep.py::TestCEP::test_format_cep",
"tests/test_cep.py::TestCEP::test_generate",
"tests/test_cep.py::TestCEP::test_is_valid",
"tests/test_cep.py::TestCEP::test_remove_symbols",
"tests/test_cnpj.py::TestCNPJ::test__checksum",
"tests/test_cnpj.py::TestCNPJ::test__hashdigit",
"tests/test_cnpj.py... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B4",
"confidence": 0.84,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": true,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": [
... |
4a807d45f9dd47266c82035bf6e04508a77f0258 | 2019-07-08 13:12:49 | docker.io/swerebenchv2/pycqa-pyflakes:452-4a807d4 | pycqa__pyflakes-452 | No new interfaces are introduced. | python | MIT | diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index 83f92aa..86cfd11 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -1162,7 +1162,8 @@ class Checker(object):
self.scopeStack = [self.scopeStack[0]]
node_offset = self.offset or (0, 0)
self.pushScope(DoctestScope)
- ... | Fix NoneType has no attribute parent when handling doctests
Do not define a special `_` name in doctest scope when the global scope already has a `_`. This mirrors the way doctests actually work: the special `_` value is assigned only when a global of that name doesn't
already exist.
Fixes #421. | 2.1.0: PYFLAKES_DOCTEST=1 causes stacktrace: AttributeError: 'NoneType' object has no attribute 'parent'
From https://gitlab.com/pycqa/flake8/issues/492
```console
$ pyflakes --version
2.1.0 Python 3.6.7 on Linux
```
```python
import foo as _
def x():
"""doc
>>> x()
>>> x()
"""
```
... | PyCQA/pyflakes | diff --git a/pyflakes/test/test_doctests.py b/pyflakes/test/test_doctests.py
index 0825ffe..5565226 100644
--- a/pyflakes/test/test_doctests.py
+++ b/pyflakes/test/test_doctests.py
@@ -433,6 +433,16 @@ class Test(TestCase):
return 1
''')
+ def test_globalUnderscoreInDoctest(self):
+ se... | [
"pyflakes/test/test_doctests.py::Test::test_globalUnderscoreInDoctest"
] | [
"pyflakes/test/test_doctests.py::TestOther::test_attrAugmentedAssignment",
"pyflakes/test/test_doctests.py::TestOther::test_breakInsideLoop",
"pyflakes/test/test_doctests.py::TestOther::test_breakOutsideLoop",
"pyflakes/test/test_doctests.py::TestOther::test_classFunctionDecorator",
"pyflakes/test/test_doct... | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.99,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://gitlab.com/pycqa/flake8/issues/492"
],
... |
aae698b6ea9a8a1bdc0178d3c1a4fd6e96474fa2 | 2025-05-09 14:36:09 | docker.io/swerebenchv2/collective-icalendar:829-aae698b | collective__icalendar-829 | Method: vDDDLists.__eq__(self, other)
Location: src/icalendar/prop.py
Inputs: **other** – can be an instance of vDDDLists, a datetime or date object, or any object that is comparable to the internal list of datetimes.
Outputs: Returns True if the internal list of datetime values (`self.dts`) is equal to the other... | python | custom-check-github | diff --git a/CHANGES.rst b/CHANGES.rst
index 132e594..2252946 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -24,6 +24,7 @@ New features:
Bug fixes:
+- Fix component equality where timezones differ for the datetimes but the times are actually equal. See `Issue 828 <https://github.com/collective/icalendar/issues/828... | Fix equality of components and properties based on datetime value
This fixes #828
- we make the properties comparable with each other
- also, a list of one datetime will be equal to one datetime to aid in adding parameters in different ways. | [BUG] Events not equal although times are equal (only timezones differ, not actual time)
<!-- This template is there to guide you and help us. If you can not complete everything here, that is fine. -->
## Describe the bug
<!-- A clear and concise description of what the bug is. -->
If event times are equal but their t... | collective/icalendar | diff --git a/src/icalendar/tests/test_issue_828.py b/src/icalendar/tests/test_issue_828.py
new file mode 100644
index 0000000..5183a10
--- /dev/null
+++ b/src/icalendar/tests/test_issue_828.py
@@ -0,0 +1,162 @@
+"""Events differ although their times are equal."""
+
+import contextlib
+from datetime import date, datetim... | [
"src/icalendar/tests/test_issue_828.py::test_equality_of_equal_datetimes[to_dt-d10-d20]",
"src/icalendar/tests/test_issue_828.py::test_equality_of_equal_datetimes[to_dt-d11-d21]",
"src/icalendar/tests/test_issue_828.py::test_equality_of_equal_datetimes[to_dt-d12-d22]",
"src/icalendar/tests/test_issue_828.py::... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
5c5bef4a52ef72bdb4bc095210d15acdc1826ffd | 2021-11-18 14:42:19 | docker.io/swerebenchv2/virtuslab-git-machete:350-5c5bef4 | virtuslab__git-machete-350 | No new interfaces are introduced. | python | MIT | diff --git a/git_machete/exceptions.py b/git_machete/exceptions.py
index a1f9893..ae09ea3 100644
--- a/git_machete/exceptions.py
+++ b/git_machete/exceptions.py
@@ -21,7 +21,7 @@ class UnprocessableEntityHTTPError(MacheteException):
or creating a pull request for a branch that already has a PR.
"""
def _... | Remove check if pull requests is already created
closes #342 | Is the check for PR existence still needed now that we read the body of 422 response?
`git_machete.github.create_pull_request`:
```
prs: List[GitHubPullRequest] = derive_pull_requests(org, repo)
pr_found: Optional[GitHubPullRequest] = find_or_none(lambda pr: pr.base == base and pr.head == head, prs)
i... | VirtusLab/git-machete | diff --git a/git_machete/tests/functional/test_machete.py b/git_machete/tests/functional/test_machete.py
index 55749e7..24e5542 100644
--- a/git_machete/tests/functional/test_machete.py
+++ b/git_machete/tests/functional/test_machete.py
@@ -174,6 +174,9 @@ class MockGithubAPIRequest:
def update_pull_request(self) ... | [
"git_machete/tests/functional/test_machete.py::MacheteTester::test_github_create_pr"
] | [
"git_machete/tests/functional/test_machete.py::MacheteTester::test_add",
"git_machete/tests/functional/test_machete.py::MacheteTester::test_advance_with_few_possible_downstream_branches_and_yes_option",
"git_machete/tests/functional/test_machete.py::MacheteTester::test_advance_with_no_downstream_branches",
"g... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.92,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
fe6d9c1a608136b57d8d417e9deea3f1ce7f1f75 | 2023-10-10 13:29:18 | docker.io/swerebenchv2/e2niee-pandapower:2147-fe6d9c1 | e2niee__pandapower-2147 | Method: pandapower.run.runpp(net, algorithm='nr', calculate_voltage_angles=True, init='auto', max_iteration='auto', tolerance_mva=1e-8, trafo_model='t', trafo_loading='current', enforce_q_lims=False, check_connectivity=True, voltage_depend_loads=True, consider_line_temperature=False, **kwargs)
Location: pandapower/run.... | python | custom-check-github | diff --git a/pandapower/auxiliary.py b/pandapower/auxiliary.py
index 568aebd86..47dccd28b 100644
--- a/pandapower/auxiliary.py
+++ b/pandapower/auxiliary.py
@@ -1352,9 +1352,7 @@ def _init_runpp_options(net, algorithm, calculate_voltage_angles, init,
default_max_iteration = {"nr": 10, "iwamoto_nr": 10, "bfsw": 1... | change the default for calculate_voltage_angles to True
closes #2145 | calculate_voltage_angles set to True by default
### Feature Checklist
- [X] Searched the [issues page](https://github.com/e2nIEE/pandapower/issues) for similar reports
- [X] Read the relevant sections of the [documentation](https://pandapower.readthedocs.io/en/latest/about.html)
- [X] Browse the [tutorials](https://... | e2nIEE/pandapower | diff --git a/pandapower/test/converter/test_from_cim.py b/pandapower/test/converter/test_from_cim.py
index 332e6da7b..cb938f736 100644
--- a/pandapower/test/converter/test_from_cim.py
+++ b/pandapower/test/converter/test_from_cim.py
@@ -2,6 +2,8 @@ import os
import pytest
import math
import pandas as pd
+
+import pa... | [
"pandapower/test/estimation/test_wls_estimation.py::test_cigre_network",
"pandapower/test/estimation/test_wls_estimation.py::test_cigre_network_with_slack_init"
] | [
"pandapower/test/converter/test_from_cim.py::test_example_multivoltage_res_xward",
"pandapower/test/converter/test_from_cim.py::test_example_multivoltage_res_trafo3w",
"pandapower/test/converter/test_from_cim.py::test_example_multivoltage_xward",
"pandapower/test/converter/test_from_cim.py::test_Simbench_1_EH... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B1",
"confidence": 0.84,
"detected_issues": {
"B1": true,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/e2nIEE/pandapower/issues",
"h... |
f32eaa09e889a450aa9123bbf8ad5e324ca87753 | 2025-04-20 17:36:43 | docker.io/swerebenchv2/aeye-lab-pymovements:1106-f32eaa0 | aeye-lab__pymovements-1106 | Function: parse_eyelink(asc_text: str) -> dict[str, Any]
Location: src/pymovements/gaze/_utils/parsing.py
Inputs:
- **asc_text** – the raw contents of an ASC file as a single string. The text may contain `GAZE_COORDS` messages (e.g., “MSG 12345 GAZE_COORDS 0 0 1279 1023”) as well as optional legacy `DISPLAY_COORDS` me... | python | MIT | diff --git a/src/pymovements/gaze/_utils/parsing.py b/src/pymovements/gaze/_utils/parsing.py
index 4afbb45..009347b 100755
--- a/src/pymovements/gaze/_utils/parsing.py
+++ b/src/pymovements/gaze/_utils/parsing.py
@@ -18,6 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTW... | fix: Use GAZE_COORDS message to determine screen resolution
## Description
Follow-up on #887. Screen resolution should be parsed from the `GAZE_COORDS` messages instead of the optional `DIAPLAY_COORDS` message. `GAZE_COORDS` is logged before the start of a new recording block, after `RECCFG`, so adding it to the `re... | Use GAZE_COORDS instead of DISPLAY_COORDS for resolution detection
## Current Behavior
`parse_eyelink()` currently uses the `DISPLAY_COORDS` message to detect the screen resolution. This is an optional message to define the resolution for Data Viewer, and some ASC files may not contain such a message. `from_asc()` res... | aeye-lab/pymovements | diff --git a/tests/unit/gaze/_utils/_parsing_test.py b/tests/unit/gaze/_utils/_parsing_test.py
index 892c114..0aebf71 100644
--- a/tests/unit/gaze/_utils/_parsing_test.py
+++ b/tests/unit/gaze/_utils/_parsing_test.py
@@ -43,9 +43,10 @@ ASC_TEXT = r"""
some
lines
+MSG 2095865 DISPLAY_COORDS 0 0 1279 1023
MSG 215455... | [
"tests/unit/gaze/_utils/_parsing_test.py::test_parse_eyelink",
"tests/unit/gaze/_utils/_parsing_test.py::test_metadata_warnings[inconsistent_resolution]",
"tests/unit/gaze/io/asc_test.py::test_from_asc_detects_mismatches_in_experiment_metadata[screen_resolution]"
] | [
"tests/unit/gaze/_utils/_parsing_test.py::test_from_asc_metadata_patterns[eyelink_asc_metadata_patterns]",
"tests/unit/gaze/_utils/_parsing_test.py::test_from_asc_metadata_patterns[eyelink_asc_metadata_pattern_not_found]",
"tests/unit/gaze/_utils/_parsing_test.py::test_parse_eyelink_raises_value_error[patterns0... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.92,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
fdca35219255946ca8dd5dcd8a15d9fedbc5d034 | 2024-05-22 06:51:08 | docker.io/swerebenchv2/pennylaneai-pennylane:5725-fdca352 | pennylaneai__pennylane-5725 | Method: Controlled.__init__(self, base_op, control_wires, control_values=None, work_wires=None)
Location: pennylane.ops.op_math.controlled.Controlled
Inputs:
- **base_op** (Operator or Callable): the operation to be controlled.
- **control_wires** (int, sequence[int] or Wires): wire(s) that act as control.
- **control_... | python | Apache-2.0 | diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index 052a8975c..bd4e5f0ff 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -9,6 +9,9 @@
<h3>Improvements 🛠</h3>
+* `ctrl` now works with tuple-valued `control_values` when applied to any already controlled... | Allow tuple-valued `control_values` with `qml.ctrl` on a `Controlled` instance.
**Context:**
By default, `control_values` of `Controlled` instances are lists.
`qml.defer_measurements` passes a tuple as `control_values` to `ctrl`.
`create_controlled_op`, called by `ctrl`, tries to merge `control_values` of the base o... | [BUG] `defer_measurements` does not work with `qml.cond` applied to controlled gates
### Expected behavior
`qml.cond` can be applied to any valid `Operation` and `defer_measurements` can deal with the resulting operation as well.
### Actual behavior
Using `qml.cond` on a controlled operation and deferring measuremen... | PennyLaneAI/pennylane | diff --git a/tests/ops/op_math/test_controlled.py b/tests/ops/op_math/test_controlled.py
index b9630d206..2d4234a77 100644
--- a/tests/ops/op_math/test_controlled.py
+++ b/tests/ops/op_math/test_controlled.py
@@ -163,6 +163,17 @@ class TestControlledInit:
op = Controlled(self.temp_op, (0, 1), control_values=[0... | [
"tests/ops/op_math/test_controlled_ops.py::test_controlling_a_controlled_operation[base_op0-control1-control_values1]",
"tests/ops/op_math/test_controlled_ops.py::test_controlling_a_controlled_operation[base_op0-2-control_values3]",
"tests/ops/op_math/test_controlled_ops.py::test_controlling_a_controlled_operat... | [
"tests/ops/op_math/test_controlled.py::TestControlledInheritance::test_plain_operator",
"tests/ops/op_math/test_controlled.py::TestControlledInheritance::test_operation",
"tests/ops/op_math/test_controlled.py::TestControlledInheritance::test_controlledop_new",
"tests/ops/op_math/test_controlled.py::TestContro... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
d3eb7b5abf7e9c5af5c3304977597a47234c2ae6 | 2025-05-20 21:48:48 | docker.io/swerebenchv2/networkx-networkx:8057-d3eb7b5 | networkx__networkx-8057 | Method: tree_broadcast_center(G)
Location: networkx.algorithms.broadcasting.tree_broadcast_center
Inputs:
- G (networkx.Graph): an undirected tree. Must be a simple graph (no parallel edges) and connected.
Outputs:
- tuple (b_T, b_C):
* b_T (int) – minimum broadcast time of the tree.
* b_C (set[int]) – set o... | python | custom-check-github | diff --git a/doc/reference/algorithms/non_randomness.rst b/doc/reference/algorithms/non_randomness.rst
index 090707cdf..79ac8d1a9 100644
--- a/doc/reference/algorithms/non_randomness.rst
+++ b/doc/reference/algorithms/non_randomness.rst
@@ -1,5 +1,5 @@
**************
-non-randomness
+Non-randomness
**************
... | Add input validation to `non_randomness()` and clarify its behavior
Fixes #4115.
This PR does three related things:
1. It adds input validation for `k`, the number of communities, in `non_randomness()`. In particular, it raises a `ValueError` when `k` doesn't satisfy `1 <= k < n`. Tests for this scenario are also... | non_randomness fail with ValueError: math domain error on simple network
The calculation of non_randomness fails with a simple network.
```python
import networkx as nx
g = nx.Graph()
g.add_edges_from([
('A', 'B'),
('B', 'C'),
('B', 'D'),
('D', 'E')
])
print(nx.algorithms.non_randomness(g... | networkx/networkx | diff --git a/networkx/algorithms/tests/test_broadcasting.py b/networkx/algorithms/tests/test_broadcasting.py
index 73bf83c8c..64f484b3c 100644
--- a/networkx/algorithms/tests/test_broadcasting.py
+++ b/networkx/algorithms/tests/test_broadcasting.py
@@ -2,6 +2,8 @@
import math
+import pytest
+
import networkx as n... | [
"networkx/algorithms/tests/test_broadcasting.py::test_raises_not_tree[empty_graph-tree_broadcast_center]",
"networkx/algorithms/tests/test_broadcasting.py::test_raises_not_tree[empty_graph-tree_broadcast_time]",
"networkx/algorithms/tests/test_broadcasting.py::test_raises_not_tree[cycle_graph-tree_broadcast_cen... | [
"networkx/algorithms/tests/test_broadcasting.py::test_example_tree_broadcast",
"networkx/algorithms/tests/test_broadcasting.py::test_path_broadcast[2]",
"networkx/algorithms/tests/test_broadcasting.py::test_path_broadcast[3]",
"networkx/algorithms/tests/test_broadcasting.py::test_path_broadcast[4]",
"networ... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": [
... |
a95dd71c4bb36c7ec677c094a108028fbbb09b39 | 2022-03-21 04:44:11 | docker.io/swerebenchv2/pymc-devs-pymc:5634-a95dd71 | pymc-devs__pymc-5634 | Method: ModelGraph.get_parent_names(self, var: TensorVariable) -> Set[VarName>
Location: pymc/model_graph.py
Inputs:
- **self** – the ModelGraph instance holding a PyMC model.
- **var** – a tensor variable from the model whose direct parent variable names are to be retrieved. The variable may have an owner (apply no... | python | custom-check-github | diff --git a/pymc/distributions/censored.py b/pymc/distributions/censored.py
index a59965c85..57dde8621 100644
--- a/pymc/distributions/censored.py
+++ b/pymc/distributions/censored.py
@@ -53,6 +53,15 @@ class Censored(SymbolicDistribution):
upper: float or None
Upper (right) censoring point. If `None`, t... | Variable selection for graphviz visualization via kwarg
Fixes #5527. Some elements are hackish and currently need more work.
+ [x] Do not plot all descendants when specifying an intermediate rv unless the variable is observed (plot observed node)
+ [x] Add `var_names` as kwarg
+ [x] Rename previous `var_names` cla... | Variable selection for `pm.model_to_graphviz`
## Description of your problem
I have a big big model and would like to make `pm.model_to_graphviz` plots of only some of the variables inside.
For example after adding `gp.conditional`s and then only wanting to plot the nodes my new variable depends on.
My model als... | pymc-devs/pymc | diff --git a/pymc/tests/test_model_graph.py b/pymc/tests/test_model_graph.py
index 14e3e0ebe..2b85d181a 100644
--- a/pymc/tests/test_model_graph.py
+++ b/pymc/tests/test_model_graph.py
@@ -143,7 +143,7 @@ class BaseModelGraphTest(SeededTest):
def test_inputs(self):
for child, parents_in_plot in self.compu... | [
"pymc/tests/test_model_graph.py::TestRadonModel::test_inputs",
"pymc/tests/test_model_graph.py::TestRadonModel::test_compute_graph",
"pymc/tests/test_model_graph.py::TestParents::test_get_parent_names[L-parent_names0]",
"pymc/tests/test_model_graph.py::TestParents::test_get_parent_names[pred-parent_names1]",
... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.85,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/pymc-devs/pymc/blob/a3bab7ddc0f4612... |
db870f249e79075e9a1dcabcfd03b51c59d7179b | 2020-07-10 06:34:27 | docker.io/swerebenchv2/python-semver-python-semver:275-db870f2 | python-semver__python-semver-275 | Function: ensure_str(s, encoding="utf-8", errors="strict")
Location: semver.ensure_str in semver.py
Inputs:
- **s**: value to be coerced; must be an instance of the library’s `text_type` (unicode/str) or `binary_type` (bytes).
- **encoding** (optional): name of the character encoding to use when converting between t... | python | BSD-3-Clause | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c79012b..e5736f3 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -23,6 +23,7 @@ Bug Fixes
---------
* :gh:`276` (:pr:`277`): VersionInfo.parse should be a class method
+* :gh:`274` (:pr:`275`): Py2 vs. Py3 incompatibility TypeError
Additions
diff --git a/CONTR... | Fix #274: String Types Py2 vs. Py3 compatibility
This fixes #274 and contains:
fixes problems between different string types. In Python2 `str` vs. `unicode` and in Python3 `str` vs. `bytes`.
---
@eli-darkly I've tried to recycle some code from the six project. Maybe there is an easier way, maybe we can improv... | Py2 vs. Py3 incompatibility: TypeError
# Situation
I'm confused by the statement in the Readme that seems to say 2.10.0 _does_ still support Python 2.7. That's not what I'm seeing. I have a project that uses this package and runs in Py2, and as soon as it started using the 2.10 release, I started getting errors like... | python-semver/python-semver | diff --git a/test_typeerror-274.py b/test_typeerror-274.py
new file mode 100644
index 0000000..2ed03d6
--- /dev/null
+++ b/test_typeerror-274.py
@@ -0,0 +1,102 @@
+import pytest
+import sys
+
+import semver
+
+
+PY2 = sys.version_info[0] == 2
+PY3 = sys.version_info[0] == 3
+
+
+def ensure_binary(s, encoding="utf-8", e... | [
"test_typeerror-274.py::test_should_work_with_string_and_unicode",
"test_typeerror-274.py::TestEnsure::test_ensure_binary_raise_type_error",
"test_typeerror-274.py::TestEnsure::test_errors_and_encoding",
"test_typeerror-274.py::TestEnsure::test_ensure_binary_raise",
"test_typeerror-274.py::TestEnsure::test_... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.94,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/python-semver/python-semver/issues/... |
6aa0c44e61bb0812d2d18e9d47e56af48eda4480 | 2024-02-27 01:41:22 | docker.io/swerebenchv2/openmdao-openmdao:3137-6aa0c44 | openmdao__openmdao-3137 | Function: set_reports_dir(reports_dir)
Location: openmdao.api (exposed from openmdao.utils.reports_system)
Inputs:
- reports_dir (str or Path‑like): The top‑level directory where all OpenMDAO reports will be written. If the directory does not exist it will be created. Passing ``None`` restores the default behavior (us... | python | custom-check-github | diff --git a/openmdao/api.py b/openmdao/api.py
index 35daaa3b9..ab3138f6f 100644
--- a/openmdao/api.py
+++ b/openmdao/api.py
@@ -121,7 +121,7 @@ from openmdao.utils.jax_utils import register_jax_component
# Reports System
from openmdao.utils.reports_system import register_report, unregister_report, get_reports_dir,... | Added `set_reports_dir` to openmdao.api.
### Summary
The `set_reports_dir` function was in reports_dir but should be part of `openmdao.api`.
This PR adds it to the public facing API and explains its use in the documentation.
### Related Issues
- Resolves #3134
### Backwards incompatibilities
None
##... | Add `set_reports_dir` to `openmdao.api`
### Desired capability or behavior.
OpenMDAO allows the user to set a top-level reports dir using an environment variable `OPENMDAO_REPORTS_DIR`, and the docs discuss it, but this environment variable is read at import time and so the user doesn't have an obvious way to set the ... | OpenMDAO/OpenMDAO | diff --git a/openmdao/utils/tests/test_reports_system.py b/openmdao/utils/tests/test_reports_system.py
index a4501c108..7d97139ab 100644
--- a/openmdao/utils/tests/test_reports_system.py
+++ b/openmdao/utils/tests/test_reports_system.py
@@ -12,7 +12,7 @@ from openmdao.core.problem import _default_prob_name
import open... | [
"openmdao/utils/tests/test_reports_system.py::TestReportsSystem::test_report_generation_basic",
"openmdao/utils/tests/test_reports_system.py::TestReportsSystem::test_report_generation_basic_doedriver",
"openmdao/utils/tests/test_reports_system.py::TestReportsSystem::test_report_generation_basic_problem_reports_... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
4fd9a68c24a2a95fc471d0fc29a2a911b469f93f | 2024-03-21 20:08:41 | docker.io/swerebenchv2/jazzband-tablib:584-4fd9a68 | jazzband__tablib-584 | Method: Dataset.insert_col(self, index: int, col: Sequence, header: str | None = None)
Location: class Dataset in src/tablib/core.py
Inputs:
- **index** – integer position at which to insert the new column (0‑based). Must be within `[0, self.width]`.
- **col** – iterable of values for the new column. Can be empty if t... | python | MIT | diff --git a/src/tablib/core.py b/src/tablib/core.py
index 956458b..ad5ec8d 100644
--- a/src/tablib/core.py
+++ b/src/tablib/core.py
@@ -73,6 +73,9 @@ class Row:
def insert(self, index, value):
self._row.insert(index, value)
+ def copy(self):
+ return Row(self._row.copy(), self.tags.copy())
+
... | Fixes #583 - Allow inserting columns for dataset with headers and no values | Inserting column with insert_col fails if dataset contains 0 rows
I am trying to add additional column to a Dataset that is created from a dictionary. I have headers defined separately. However, when dictionary is empty (no rows to export because how data is filtered) `insert_col` method fails with error:
```
File "/... | jazzband/tablib | diff --git a/tests/test_tablib.py b/tests/test_tablib.py
index ee34186..fbb26f9 100755
--- a/tests/test_tablib.py
+++ b/tests/test_tablib.py
@@ -117,10 +117,19 @@ class TablibTestCase(BaseTestCase):
# With Headers
data.headers = ('fname', 'lname')
- new_col = [21, 22]
- data.append_col... | [
"tests/test_tablib.py::TablibTestCase::test_add_column_no_data_with_headers",
"tests/test_tablib.py::TablibTestCase::test_formatters",
"tests/test_tablib.py::TablibTestCase::test_formatters_all_cols"
] | [
"tests/test_tablib.py::TablibTestCase::test_add_callable_column",
"tests/test_tablib.py::TablibTestCase::test_add_column",
"tests/test_tablib.py::TablibTestCase::test_add_column_no_data_no_headers",
"tests/test_tablib.py::TablibTestCase::test_add_column_with_header_and_data_exists",
"tests/test_tablib.py::T... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/jazzband/tablib/blob/4fd9a68c24a2a9... |
1863011580c054a6bffa6b94bd0d876df393da35 | 2025-03-24 20:05:45 | docker.io/swerebenchv2/aws-cloudformation-cfn-lint:4051-1863011 | aws-cloudformation__cfn-lint-4051 | No new interfaces are introduced. | python | MIT-0 | diff --git a/src/cfnlint/data/schemas/other/step_functions/statemachine.json b/src/cfnlint/data/schemas/other/step_functions/statemachine.json
index f5ff16d0d..e3e2884eb 100644
--- a/src/cfnlint/data/schemas/other/step_functions/statemachine.json
+++ b/src/cfnlint/data/schemas/other/step_functions/statemachine.json
@@ ... | Deal with JSONata differences in choices
*Issue #, if available:*
fix #4050
*Description of changes:*
- Deal with JSONata differences in choices
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
| Step Functions JSONata isn't fully supported (E3601)
### CloudFormation Lint Version
1.32.0
### What operating system are you using?
Mac
### Describe the bug
The CF template was constructed from YAML export from Step Functions editor. Below E3601 errors shown:
```
E3601 Only one of ['And', 'BooleanEquals', 'Boole... | aws-cloudformation/cfn-lint | diff --git a/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py b/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py
index c9eea19f3..de7b49f13 100644
--- a/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py
+++ b/test/unit/rules/resources/stepfunctions/... | [
"test/unit/rules/resources/stepfunctions/test_state_machine_definition.py::test_validate[Invalid",
"test/unit/rules/resources/stepfunctions/test_state_machine_definition.py::test_validate[JSONAta"
] | [
"test/unit/rules/resources/stepfunctions/test_state_machine_definition.py::test_validate[Valid",
"test/unit/rules/resources/stepfunctions/test_state_machine_definition.py::test_validate[Fan",
"test/unit/rules/resources/stepfunctions/test_state_machine_definition.py::test_validate[Error",
"test/unit/rules/reso... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
c61c819b357c28c4b3b1c2e2985c248d86b3de7e | 2022-11-30 06:54:20 | docker.io/swerebenchv2/sanic-org-sanic-ext:154-c61c819 | sanic-org__sanic-ext-154 | Method: ExtensionManager.dependency(self, dependency: object)
Location: sanic_ext/extensions/injection/manager.py (or similar module where the extension manager is defined)
Inputs:
- **dependency**: an instantiated object whose type will be used as a key for injection. The object must be hashable and its class (or a s... | python | MIT | diff --git a/sanic_ext/extensions/http/methods.py b/sanic_ext/extensions/http/methods.py
index 7c9700e..756411d 100644
--- a/sanic_ext/extensions/http/methods.py
+++ b/sanic_ext/extensions/http/methods.py
@@ -84,6 +84,7 @@ def add_auto_handlers(
description="Retrieve HEAD details",
... | Injections for HEAD requests
Closes #151 | [Bug] Dependency injection not working for HEAD requests
**Describe the bug**
Sanic automatically creates `HEAD` endpoints, but dependencies are not injected into these endpoints, causing 500 errors when users HEAD these endpoints.
**Screenshots**
:
_, response = app.t... | [
"tests/extensions/injection/test_dependency.py::test_dependency_injection_head"
] | [
"tests/extensions/injection/test_dependency.py::test_dependency_added",
"tests/extensions/injection/test_dependency.py::test_dependency_injection"
] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://user-images.githubusercontent.com/6646473/202834... |
5874b42267369f6e07059782bd88ac0dec4f37c7 | 2024-03-11 05:34:04 | docker.io/swerebenchv2/sinaptik-ai-pandas-ai:1019-5874b42 | sinaptik-ai__pandas-ai-1019 | Method: LocalLLM.__init__(self, api_base: str, model: str, **kwargs)
Location: pandasai/llm/local_llm.py
Inputs:
- api_base (str): Base URL of the local OpenAI‑compatible server.
- model (str): Name of the model to query.
- **kwargs: Optional OpenAI client parameters forwarded to the completion call (e.g., tempera... | python | custom-check-github | diff --git a/pandasai/helpers/memory.py b/pandasai/helpers/memory.py
index 07834a29..a5a3e526 100644
--- a/pandasai/helpers/memory.py
+++ b/pandasai/helpers/memory.py
@@ -79,6 +79,25 @@ class Memory:
messages.append({"role": "assistant", "message": message["message"]})
return messages
+ d... | feat(llm): support local LLMs compatible with OpenAI API
- [x] Closes #155 , #187 , #341 , #799 , #996 .
- [x] Tests added and passed if fixing a bug or adding a new feature.
- [x] All [code checks passed](https://github.com/gventuri/pandas-ai/blob/main/CONTRIBUTING.md#-testing).
Similar to [CrewAI's approach](htt... | openai class as an argument
### 🚀 The feature
instead of passing openAI class you provided, it is limited to only api. If we want to use organizational api, we cannot use it. it would be nice to pass our openai class to PandasAI:
instead of having like this:
llm = OpenAI(api_token="YOUR_API_TOKEN")
pandas_ai = P... | Sinaptik-AI/pandas-ai | diff --git a/tests/unit_tests/llms/test_local_llm.py b/tests/unit_tests/llms/test_local_llm.py
new file mode 100644
index 00000000..37d35931
--- /dev/null
+++ b/tests/unit_tests/llms/test_local_llm.py
@@ -0,0 +1,84 @@
+"""Unit tests for the local LLM class"""
+
+from unittest.mock import MagicMock, patch
+
+import pyte... | [
"tests/unit_tests/llms/test_local_llm.py::TestLocalLLM::test_local_llm_type",
"tests/unit_tests/llms/test_local_llm.py::TestLocalLLM::test_chat_completion_no_memory",
"tests/unit_tests/llms/test_local_llm.py::TestLocalLLM::test_chat_completion_with_memory",
"tests/unit_tests/llms/test_local_llm.py::TestLocalL... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B2|B4",
"confidence": 0.78,
"detected_issues": {
"B1": false,
"B2": true,
"B3": false,
"B4": true,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories"... |
ee458799cdb8c95864a0331bd945b4bb11337db9 | 2025-05-12 14:16:56 | docker.io/swerebenchv2/networkx-networkx:8043-ee45879 | networkx__networkx-8043 | Method: GraphMatcher.__init__(self, G1, G2)
Location: networkx/algorithms/isomorphism/isomorphvf2.py
Inputs:
- G1: NetworkX graph (undirected or MultiGraph)
- G2: NetworkX graph (must have the same directedness as G1)
Outputs:
- Initializes a GraphMatcher instance for isomorphism/subgraph monomorphism checks.
Raises:
-... | python | custom-check-github | diff --git a/LICENSE.txt b/LICENSE.txt
index 100b4bffb..0bf9a8f3f 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -2,7 +2,7 @@ NetworkX is distributed with the 3-clause BSD license.
::
- Copyright (C) 2004-2024, NetworkX Developers
+ Copyright (c) 2004-2025, NetworkX Developers
Aric Hagberg <hagberg@lanl.gov... | Enforce correct graph types for graph matchers
Fixes #7964.
Check that both graphs have the correct directedness in `(Multi-)(Di-)GraphMatcher` initialization.
@dschult, you mentioned switching to a function-oriented interface in the linked issue. Is this something that has been discussed previously/is there some... | Directed edges in MultiDiGraph not handled correctly by subgraph monomorphism
### Current Behavior
A directed graph without edges should not have a subgraph monomorphic to a digraph with one edge.
However, current implementation says it is monomorphic.
### Expected Behavior
It should not be considered monomorphic.
... | networkx/networkx | diff --git a/networkx/algorithms/bipartite/tests/test_link_analysis.py b/networkx/algorithms/bipartite/tests/test_link_analysis.py
new file mode 100644
index 000000000..6e46056ee
--- /dev/null
+++ b/networkx/algorithms/bipartite/tests/test_link_analysis.py
@@ -0,0 +1,218 @@
+import itertools
+
+import pytest
+
+import ... | [
"networkx/algorithms/isomorphism/tests/test_isomorphvf2.py::test_matcher_raises[G20-G10]",
"networkx/algorithms/isomorphism/tests/test_isomorphvf2.py::test_matcher_raises[G20-G11]",
"networkx/algorithms/isomorphism/tests/test_isomorphvf2.py::test_matcher_raises[G21-G10]",
"networkx/algorithms/isomorphism/test... | [
"networkx/algorithms/isomorphism/tests/test_isomorphvf2.py::TestWikipediaExample::test_graph",
"networkx/algorithms/isomorphism/tests/test_isomorphvf2.py::TestWikipediaExample::test_subgraph",
"networkx/algorithms/isomorphism/tests/test_isomorphvf2.py::TestWikipediaExample::test_subgraph_mono",
"networkx/algo... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B3",
"confidence": 0.86,
"detected_issues": {
"B1": false,
"B2": false,
"B3": true,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
1cae5b54448e1c33c4a661d8f011aa957fb8eeaf | 2021-03-01 21:54:56 | docker.io/swerebenchv2/martinthoma-flake8-simplify:47-1cae5b5 | martinthoma__flake8-simplify-47 | Method: Visitor.visit_Call(self, node: ast.Call)
Location: flake8_simplify/__init__.py → class Visitor
Inputs: `node` – an `ast.Call` node representing a function call in the source code.
Outputs: Returns `Any` (the method itself returns nothing; it mutates `self.errors` by appending any errors produced by the ca... | python | MIT | diff --git a/README.md b/README.md
index 5703aa7..ff3bd22 100644
--- a/README.md
+++ b/README.md
@@ -51,6 +51,7 @@ Python-specific rules:
* `SIM124`: Reserved for [SIM904](#sim904) once it's stable
* `SIM125`: Reserved for [SIM905](#sim905) once it's stable
* `SIM126`: Reserved for [SIM906](#sim906) once it's stable... | Add SIM122/SIM123 to check for magic booleans/numbers
* SIM902
* SIM903
Closes #43 | [New Rule] Use keyword-arguments instead of positional arguments for boolean values
## Explanation
Positional boolean arguments are typically hard to understand, because they can represent so many things. Having a keyword-argument gives the reader the keyword name as context.
## Example
```python
import zipfi... | MartinThoma/flake8-simplify | diff --git a/tests/test_900_rules.py b/tests/test_900_rules.py
index f091ef7..074b22f 100644
--- a/tests/test_900_rules.py
+++ b/tests/test_900_rules.py
@@ -10,6 +10,92 @@ def test_sim901():
assert results == {"1:0 SIM901 Use 'a == b' instead of 'bool(a == b)'"}
+@pytest.mark.parametrize(
+ "s",
+ (
+ ... | [
"tests/test_900_rules.py::test_sim902[basic]",
"tests/test_900_rules.py::test_sim902[set_multiple]",
"tests/test_900_rules.py::test_sim903_true_positive_check[int]",
"tests/test_900_rules.py::test_sim903_true_positive_check[float]",
"tests/test_900_rules.py::test_sim907"
] | [
"tests/test_900_rules.py::test_sim901",
"tests/test_900_rules.py::test_sim902_false_positive_check[kw_arg_is_used]",
"tests/test_900_rules.py::test_sim902_false_positive_check[dict_get]",
"tests/test_900_rules.py::test_sim902_false_positive_check[boolean_setter_function]",
"tests/test_900_rules.py::test_sim... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B2",
"confidence": 0.86,
"detected_issues": {
"B1": false,
"B2": true,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": ... |
2f8b625855c86eece2219fe6910285611c7a4271 | 2018-02-28 16:44:03 | docker.io/swerebenchv2/pre-commit-pre-commit-hooks:271-2f8b625 | pre-commit__pre-commit-hooks-271 | Function: main(argv=None)
Location: pre_commit_hooks.trailing_whitespace_fixer.main
Inputs: *argv* – optional sequence (list/tuple) of command‑line arguments; each argument is either a file path to process or an option such as `--markdown-linebreak-ext=EXT`, `--no-markdown-linebreak-ext`, etc. If omitted, the function ... | python | MIT | diff --git a/pre_commit_hooks/trailing_whitespace_fixer.py b/pre_commit_hooks/trailing_whitespace_fixer.py
index 26f7b51..062f6e3 100644
--- a/pre_commit_hooks/trailing_whitespace_fixer.py
+++ b/pre_commit_hooks/trailing_whitespace_fixer.py
@@ -19,14 +19,19 @@ def _fix_file(filename, is_markdown):
def _process_lin... | Don't add end-of-file newline while trimming whitespace
Resolves #270
Seems some of the tests were testing the wrong behaviour -- oops! | trailing-whitespace fixer getting false positive
While bringing some Terraform files under pre-commit control, I've noticed an issue with files that do not have trailing whitespace but which are being flagged as needing fixing by the `trailing-whitespace` hook, which is causing a Travis CI build to fail unexpectedl... | pre-commit/pre-commit-hooks | diff --git a/tests/trailing_whitespace_fixer_test.py b/tests/trailing_whitespace_fixer_test.py
index a771e67..7ee9e63 100644
--- a/tests/trailing_whitespace_fixer_test.py
+++ b/tests/trailing_whitespace_fixer_test.py
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
import pytest
-from pre_commit_hooks.trail... | [
"tests/trailing_whitespace_fixer_test.py::test_fixes_trailing_whitespace[foo",
"tests/trailing_whitespace_fixer_test.py::test_fixes_trailing_whitespace[bar\\t\\nbaz\\t\\n-bar\\nbaz\\n]",
"tests/trailing_whitespace_fixer_test.py::test_ok_no_newline_end_of_file",
"tests/trailing_whitespace_fixer_test.py::test_o... | [] | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/digirati-co-uk/pre-commit-hooks-tes... |
41e2c4c1fdf34d800bb9e4247cd9ebfc6904d9d7 | 2023-07-18 19:23:45 | docker.io/swerebenchv2/aio-libs-aiohttp:7378-41e2c4c | aio-libs__aiohttp-7378 | No new interfaces are introduced. | python | custom-check-github | diff --git a/CHANGES/7237.bugfix b/CHANGES/7237.bugfix
new file mode 100644
index 000000000..26f85ea9c
--- /dev/null
+++ b/CHANGES/7237.bugfix
@@ -0,0 +1,1 @@
+Fixed ``PermissionError`` when .netrc is unreadable due to permissions.
diff --git a/CHANGES/7366.feature b/CHANGES/7366.feature
new file mode 100644
index 0000... | Fix PermissionError when loading .netrc (#7237)
## What do these changes do?
If no NETRC environment variable is provided and the .netrc path cannot be accessed due to missing permission, a PermissionError was raised instead of returning None. See issue #7237. This PR fixes the issue.
If the changes look good, I ... | Netrc file is accessed inside exception handler, trigger exception again
### Describe the bug
Sometimes, the `.netrc` file is unreadable due to permissions. This is handled in this code:
https://github.com/aio-libs/aiohttp/blob/6da04694fd87a39af9c3856048c9ff23ca815f88/aiohttp/helpers.py#L226
However, inside the ex... | aio-libs/aiohttp | diff --git a/tests/test_helpers.py b/tests/test_helpers.py
index aa1dcf6b2..0f37089d5 100644
--- a/tests/test_helpers.py
+++ b/tests/test_helpers.py
@@ -6,6 +6,7 @@ import gc
import platform
import weakref
from math import ceil, modf
+from pathlib import Path
from unittest import mock
from urllib.request import ge... | [
"tests/test_http_exceptions.py::TestHttpProcessingError::test_str",
"tests/test_http_exceptions.py::TestBadHttpMessage::test_str",
"tests/test_http_exceptions.py::TestLineTooLong::test_str",
"tests/test_http_exceptions.py::TestInvalidHeader::test_str",
"tests/test_http_exceptions.py::TestBadStatusLine::test... | [
"tests/test_helpers.py::test_parse_mimetype[-expected0]",
"tests/test_helpers.py::test_parse_mimetype[*-expected1]",
"tests/test_helpers.py::test_parse_mimetype[application/json-expected2]",
"tests/test_helpers.py::test_parse_mimetype[application/json;",
"tests/test_helpers.py::test_parse_mimetype[ApPlIcAtI... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B4",
"confidence": 0.78,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": true,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/aio-libs/aiohttp/blob/6da04694fd87a... |
e15fb596e5a007c2624b85a8c326b326bb27f806 | 2024-08-13 16:39:55 | docker.io/swerebenchv2/sdv-dev-rdt:867-e15fb59 | sdv-dev__rdt-867 | No new interfaces are introduced. | python | custom-check-github | diff --git a/rdt/hyper_transformer.py b/rdt/hyper_transformer.py
index 652597c..799a05a 100644
--- a/rdt/hyper_transformer.py
+++ b/rdt/hyper_transformer.py
@@ -62,6 +62,7 @@ class HyperTransformer:
# pylint: disable=too-many-instance-attributes
_DTYPES_TO_SDTYPES = {
+ 'u': 'numerical',
'i'... | `HyperTransformer` can’t detect `UInt` or `uint`
CU-86b1nptmq
Resolve #865 | `HyperTransformer` can’t detect `UInt` or `uint`
### Error Description
Currently `HyperTransformer` does not support `UInt` and `uint`. We should align the `HyperTransformer’s` detection with the metadata on sdv - https://github.com/sdv-dev/SDV/issues/2182
### Steps to reproduce
```python
import pandas as p... | sdv-dev/RDT | diff --git a/tests/integration/test_hyper_transformer.py b/tests/integration/test_hyper_transformer.py
index a87b48f..d999c32 100644
--- a/tests/integration/test_hyper_transformer.py
+++ b/tests/integration/test_hyper_transformer.py
@@ -2071,3 +2071,151 @@ class TestHyperTransformer:
expected_multi_columns = {... | [
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_detect_unsigned_integer_dtypes",
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_numerical_dtype_handling",
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_numerical_handling_with_nans",
... | [
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_default_inputs",
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_field_transformers",
"tests/integration/test_hyper_transformer.py::TestHyperTransformer::test_single_category",
"tests/integration/test_hyper_trans... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://github.com/sdv-dev/SDV/issues/2182"
],
"... |
4bb0e200a44b5423141be406d84d11773ce0dfed | 2025-04-26 17:06:10 | docker.io/swerebenchv2/yukinarit-pyserde:646-4bb0e20 | yukinarit__pyserde-646 | Function: to_json(obj, *, skip_none: bool = False, convert_sets: bool = False, reuse_instances: bool = False, cls: type | None = None, **opts)
Location: serde/json.py
Inputs:
- **obj**: the dataclass instance (or any `serde`‑decorated object) to be serialized.
- **skip_none** (bool, optional): when True, fields whose ... | python | MIT | diff --git a/serde/json.py b/serde/json.py
index a664e3b..52eadea 100644
--- a/serde/json.py
+++ b/serde/json.py
@@ -76,7 +76,14 @@ def to_json(
your own logic.
"""
return se.serialize(
- to_dict(obj, c=cls, reuse_instances=reuse_instances, convert_sets=convert_sets), **opts
+ to_dict(
+ ... | Fix skip_none parameter in several serialization modules
Fixes #645 by passing `skip_none` to YAML/JSON serializers. The changes are demonstrated by new tests that fail without my change and pass with my change.
~~For Pickle, the argument didn't seem to make a difference, so I marked it as deprecated. No tests are i... | `skip_none` is a no-op in JSON, YAML, and Pickle
`serde.json.to_json`, `serde.yaml.to_yaml`, and `serde.pickle.to_pickle` are all documented as – and accept – a `skip_none` argument. However, it's a no-op, as it's dropped on the floor instead of being passed to `as_dict`. It seems like only TOML fully implemented it. (... | yukinarit/pyserde | diff --git a/tests/test_json.py b/tests/test_json.py
new file mode 100644
index 0000000..20d1be6
--- /dev/null
+++ b/tests/test_json.py
@@ -0,0 +1,34 @@
+from serde import serde
+from serde.json import to_json, from_json
+from typing import Optional
+
+
+def test_json_basics() -> None:
+ @serde
+ class Foo:
+ ... | [
"tests/test_json.py::test_skip_none",
"tests/test_yaml.py::test_skip_none"
] | [
"tests/test_json.py::test_json_basics",
"tests/test_toml.py::test_toml_basics",
"tests/test_toml.py::test_skip_none",
"tests/test_toml.py::test_skip_none_container_not_supported_yet",
"tests/test_yaml.py::test_yaml_basics"
] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://github.com/yukinarit/pyserde/blob/1e3b0698e81b64... |
178f2b8c03d7bf45ac520b3c03576e6a17494b5c | 2023-09-26 17:21:36 | docker.io/swerebenchv2/getmoto-moto:6854-178f2b8 | getmoto__moto-6854 | Method: CognitoIdpClient.admin_set_user_mfa_preference(self, Username: str, UserPoolId: str, SoftwareTokenMfaSettings: dict = None, SMSMfaSettings: dict = None)
Location: boto3 client for “cognito-idp” (implemented in moto.cognitoidp.models.CognitoIdpBackend.admin_set_user_mfa_preference)
Inputs:
- Username – the Cogn... | python | Apache-2.0 | diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py
index 2cccdec56..1e9c82ec8 100644
--- a/moto/cognitoidp/models.py
+++ b/moto/cognitoidp/models.py
@@ -833,7 +833,7 @@ class CognitoIdpUser(BaseModel):
user_mfa_setting_list = []
if self.software_token_mfa_enabled:
user_mfa... | IAM: list_groups() now returns the CreateDate-attribute
Fixes #6843 | IAM list_groups method didn't return "CreateDate" field
It is very simple:
based on [iam_client.list_groups() AWS Document](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam/paginator/ListGroups.html), it should returns a field ``CreateDate``.
I think you already implemented this attr... | getmoto/moto | diff --git a/tests/test_cognitoidp/test_cognitoidp.py b/tests/test_cognitoidp/test_cognitoidp.py
index fa22ea810..b79464285 100644
--- a/tests/test_cognitoidp/test_cognitoidp.py
+++ b/tests/test_cognitoidp/test_cognitoidp.py
@@ -4235,6 +4235,8 @@ def test_setting_mfa():
for auth_flow in ["ADMIN_NO_SRP_AUTH", "AD... | [
"tests/test_cognitoidp/test_cognitoidp.py::test_setting_mfa",
"tests/test_cognitoidp/test_cognitoidp.py::test_admin_setting_single_mfa",
"tests/test_cognitoidp/test_cognitoidp.py::test_admin_setting_mfa_totp_and_sms",
"tests/test_iam/test_iam_groups.py::test_get_all_groups"
] | [
"tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool",
"tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool__overwrite_template_messages",
"tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_should_have_all_default_attributes_in_schema",
"tests/test_cognitoidp/test_cognito... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B1|B5",
"confidence": 0.92,
"detected_issues": {
"B1": true,
"B2": false,
"B3": false,
"B4": false,
"B5": true,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://boto3.amazonaws.com/v1/documentation/api/lates... |
835aeef937c270062b713ad47b39b1788d69b374 | 2020-03-17 07:29:52 | docker.io/swerebenchv2/codezonediitj-pydatastructs:165-835aeef | codezonediitj__pydatastructs-165 | Method: Graph.add_edge(self, source, target, cost=None) Location: pydatastructs/graphs/graph.py Inputs: source (hashable node identifier), target (hashable node identifier), cost (optional numeric edge weight, default None) Outputs: None (adds edge to internal structure; if cost is provided, edge weight is stored) Desc... | python | custom-check-github | diff --git a/.travis.yml b/.travis.yml
index 70dc769..3cdaff7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ sudo: false
language: python
python:
- - "3.5"
+ - "3.6"
install:
- pip install -r requirements.txt
diff --git a/pydatastructs/graphs/__init__.py b/pydatastructs/graphs/... | Removed unnecessary aliasing of OneDimensionalArray #161
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->
#### References to other Issues or PRs or Relevant literature
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exa... | Remove unnecessary aliasing of OneDimensionalArray
#### Description of the problem
<!--Please provide a clear and details information of the bug/data structure to be added.-->
See, https://github.com/codezonediitj/pydatastructs/blob/b0c3136dfaa6d8551adfa208bcdc76bb3f95dd4f/pydatastructs/linear_data_structures/arrays.... | codezonediitj/pydatastructs | diff --git a/pydatastructs/graphs/tests/test_adjacency_list.py b/pydatastructs/graphs/tests/test_adjacency_list.py
index 5581e14..d1635fc 100644
--- a/pydatastructs/graphs/tests/test_adjacency_list.py
+++ b/pydatastructs/graphs/tests/test_adjacency_list.py
@@ -21,12 +21,18 @@ def test_adjacency_list():
assert neig... | [
"pydatastructs/graphs/tests/test_adjacency_list.py::test_adjacency_list",
"pydatastructs/graphs/tests/test_adjacency_matrix.py::test_AdjacencyMatrix",
"pydatastructs/graphs/tests/test_algorithms.py::test_breadth_first_search",
"pydatastructs/graphs/tests/test_algorithms.py::test_breadth_first_search_parallel"... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B1",
"confidence": 0.92,
"detected_issues": {
"B1": true,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "hard",
"external_urls": [
"https://github.com/codezonediitj/pydatastructs/blob/b0c3... |
1400adb909c5cbe8623807ddd30ff3c5c6984e2f | 2023-09-15 07:06:08 | docker.io/swerebenchv2/omni-us-jsonargparse:383-1400adb | omni-us__jsonargparse-383 | Method: Optimizer.__init__(self, params: List[float], lr: float = 1e-3, momentum: float = 0.0)
Location: jsonargparse_tests.test_typehints (class Optimizer defined in test file)
Inputs:
- params – list of floats, required;
- lr – learning rate, optional float default 1e‑3;
- momentum – momentum coefficient, optional... | python | MIT | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index b3165af..94c24d4 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -29,6 +29,8 @@ Fixed
- ``--print_config`` fails when parser has shallow links.
- Argument links unnecessarily applied when ``--print_config`` used and parser
has subcommands (`#311 <https://github.co... | fix `parse_args` for `Callable` with multiple input arguments
<!--
Thank you very much for contributing! If you like this project, please ⭐ star it
https://github.com/omni-us/jsonargparse/
-->
## What does this PR do?
Fixes #372.
<!--
Concisely describe what this pull request does. If available, include li... | class instantiation with multiple parameters
Hello, I have a question on how I can instantiate a class that requires multiple parameters that determined during run time only?
I followed the example on [Optimizer](https://jsonargparse.readthedocs.io/en/v4.24.0/#callable-type) but can't figure out how I can expand it to... | omni-us/jsonargparse | diff --git a/jsonargparse_tests/test_typehints.py b/jsonargparse_tests/test_typehints.py
index d0cb136..00a5206 100644
--- a/jsonargparse_tests/test_typehints.py
+++ b/jsonargparse_tests/test_typehints.py
@@ -640,9 +640,10 @@ def test_callable_args_function_path(parser):
class Optimizer:
- def __init__(self, pa... | [
"jsonargparse_tests/test_typehints.py::test_callable_multiple_args_return_type_class"
] | [
"jsonargparse_tests/test_typehints.py::test_add_argument_failure_given_type_and_action",
"jsonargparse_tests/test_typehints.py::test_str_no_strip",
"jsonargparse_tests/test_typehints.py::test_str_not_timestamp[2022-04-12]",
"jsonargparse_tests/test_typehints.py::test_str_not_timestamp[2022-04-32]",
"jsonarg... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://jsonargparse.readthedocs.io/en/v4.24.0/#callab... |
963f9ef61500b5794006bc5029cfc89a84b8e76a | 2023-09-23 02:03:32 | docker.io/swerebenchv2/pypa-bandersnatch:1557-963f9ef | pypa__bandersnatch-1557 | Method: SimpleAPI.generate_json_simple_page(self, package: Package, pretty: bool = False) -> str
Location: src/bandersnatch/simple.py
Inputs:
- **package** – a `Package` instance whose `_metadata` contains release information.
- **pretty** – optional bool (default False); when True the JSON is pretty‑printed with in... | python | AFL-3.0 | diff --git a/CHANGES.md b/CHANGES.md
index 0776235..fb6e904 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,6 @@
# 6.4.0 (Unreleased)
+- Move JSON Simple API to version 1.1 (as per PEP700) `PR #1557`
- Move to >= 3.10 project `PR #1457`
## Bug Fixes
diff --git a/src/bandersnatch/default.conf b/src/bandersnat... | Add in PEP700 simple API v1.1 support
- Move simple module to generate API 1.1 (JSON changes only)
- Since there is only additions we don't really break 1.0 so just moving to 1.1
- Seems pypi did this too
- PEP700: https://peps.python.org/pep-0700/
Tests:
- Fix tests for v1.1 new fields based on our mocked... | Ensure bandersnatch implements pep700 fields
https://peps.python.org/pep-0700/
- The api-version must specify version 1.1 or later.
- A new versions key is added at the top level.
- Two new “file information” keys, size and upload-time, are added to the files data.
Keys (at any level) with a leading underscore are re... | pypa/bandersnatch | diff --git a/src/bandersnatch/tests/test_simple.py b/src/bandersnatch/tests/test_simple.py
index 9972530..039ee81 100644
--- a/src/bandersnatch/tests/test_simple.py
+++ b/src/bandersnatch/tests/test_simple.py
@@ -18,8 +18,8 @@ from bandersnatch.simple import (
from bandersnatch.storage import Storage
from bandersnatc... | [
"src/bandersnatch/tests/test_simple.py::test_json_package_page",
"src/bandersnatch/tests/test_simple.py::test_json_index_page"
] | [
"src/bandersnatch/tests/test_simple.py::test_format_invalid",
"src/bandersnatch/tests/test_simple.py::test_format_valid",
"src/bandersnatch/tests/test_simple.py::test_digest_invalid",
"src/bandersnatch/tests/test_simple.py::test_digest_valid",
"src/bandersnatch/tests/test_simple.py::test_digest_config_defau... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://peps.python.org/pep-0700/"
],
"intent_... |
249527ff981e7aa22cd714825c5637cc92df7761 | 2024-05-05 16:01:52 | docker.io/swerebenchv2/pallets-werkzeug:2894-249527f | pallets__werkzeug-2894 | Function: iri_to_uri(iri: str) -> str
Location: werkzeug.urls
Inputs:
- **iri**: a string containing an Internationalized Resource Identifier (IRI). May include schemes such as ``http``, ``https``, ``itms-services`` and may contain characters that need percent‑encoding (e.g., backslashes, brackets, non‑ASCII Unicode).... | python | BSD-3-Clause | diff --git a/CHANGES.rst b/CHANGES.rst
index 279fd3f7..367cfb66 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -7,6 +7,9 @@ Unreleased
- Make reloader more robust when ``""`` is in ``sys.path``. :pr:`2823`
- Better TLS cert format with ``adhoc`` dev certs. :pr:`2891`
+- Inform Python < 3.12 how to handle ``itm... | remove iri_to_uri redirect workaround
Tell Python < 3.12 to handle the `itms-services` scheme correctly, rather than using a workaround in Werkzeug. The workaround was too broad and would pass through other ASCII URIs that should have been percent encoded. See https://github.com/python/cpython/issues/104139#issuecommen... | Some relative redirect strings incorrectly bypass iri_to_uri normalization.
## Summary
It appears logic introduced in https://github.com/pallets/werkzeug/pull/2695 to work-around the `itms-services:` schema oddity has an overly broad assumption that is results in invalid URIs due to not percent-encoding relative IRI... | pallets/werkzeug | diff --git a/tests/test_urls.py b/tests/test_urls.py
index fdaa913a..101b886e 100644
--- a/tests/test_urls.py
+++ b/tests/test_urls.py
@@ -98,3 +98,9 @@ def test_iri_to_uri_dont_quote_valid_code_points():
# [] are not valid URL code points according to WhatWG URL Standard
# https://url.spec.whatwg.org/#url-co... | [
"tests/test_urls.py::test_itms_services",
"tests/test_wrappers.py::test_location_header_autocorrect[False-/\\\\\\\\test.example?q-/%5C%5Ctest.example?q]"
] | [
"tests/test_urls.py::test_iri_support",
"tests/test_urls.py::test_iri_safe_quoting",
"tests/test_urls.py::test_quoting_of_local_urls",
"tests/test_urls.py::test_iri_to_uri_idempotence_ascii_only",
"tests/test_urls.py::test_iri_to_uri_idempotence_non_ascii",
"tests/test_urls.py::test_uri_to_iri_idempotence... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [
"https://datatracker.ietf.org/doc/html/rfc3986#section-2.... |
3b2afd46f23be64cafdca80abcabaf3b0d0f97cd | 2016-09-01 19:34:04 | docker.io/swerebenchv2/timothycrosley-isort:465-3b2afd4 | timothycrosley__isort-465 | Function: exists_case_sensitive(path)
Location: isort.isort module
Inputs:
- **path** (str): File system path to a file or directory to check. Must be a valid string path; on Windows the case of the basename is examined.
Outputs:
- **bool** – Returns **True** if the path exists *and* the case of the final component mat... | python | MIT | diff --git a/isort/isort.py b/isort/isort.py
index 01d0f9cc..e81463fc 100644
--- a/isort/isort.py
+++ b/isort/isort.py
@@ -254,15 +254,20 @@ class SortImports(object):
paths += [path for path in glob('{0}/src/*'.format(virtual_env)) if os.path.isdir(path)]
virtual_env_src = '{0}/src/'.format(v... | Place modules found in sys.prefix/lib in stdlib section
This uses `sys.prefix` to decide if a file is from the stdlib instead of relying that `python2` or `python3` appear anywhere on the PATH.
This solves the problem of Python from official distribution installed in a non-standard location or other distributions (suc... | Some builtins not properly placed on non-standard Python installations (conda)
Consider this file:
``` python
import thirdparty
import os
import ftplib
import ABC
import numbers
import colorama
```
On Windows with a **conda** Python 2.7 installation, `isort` produces this:
``` python
import os
import colorama
impo... | timothycrosley/isort | diff --git a/test_isort.py b/test_isort.py
index 52f91a45..e962cc2e 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -28,7 +28,7 @@ import os
import shutil
import tempfile
-from isort.isort import SortImports
+from isort.isort import exists_case_sensitive, SortImports
from isort.pie_slice import *
from isort.set... | [
"test_isort.py::test_happy_path",
"test_isort.py::test_code_intermixed",
"test_isort.py::test_correct_space_between_imports",
"test_isort.py::test_sort_on_number",
"test_isort.py::test_line_length",
"test_isort.py::test_output_modes",
"test_isort.py::test_qa_comment_case",
"test_isort.py::test_length_... | [] | {
"base_image_name": "python_base_37",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
83eaf0b55be9e9079bf9ad64975b71c22523f5f0 | 2024-07-05 21:34:50 | docker.io/swerebenchv2/nipy-nibabel:1336-83eaf0b | nipy__nibabel-1336 | Method: Nifti1Extension.content(self)
Location: nibabel/nifti1.py → class NiftiExtension (base of Nifti1Extension)
Inputs: none (property getter)
Outputs: ``bytes`` – the raw bytes stored in the extension. The method synchronises any runtime object back to bytes before returning.
Description: Provides direct ac... | python | custom-check-github | diff --git a/nibabel/cifti2/cifti2.py b/nibabel/cifti2/cifti2.py
index cb2e0cfa..b2b67978 100644
--- a/nibabel/cifti2/cifti2.py
+++ b/nibabel/cifti2/cifti2.py
@@ -1570,7 +1570,7 @@ class Cifti2Image(DataobjImage, SerializableImage):
self.update_headers()
header = self._nifti_header
- extensio... | ENH: Add `.content`, `.text` and `.json` properties to NIfTI extensions
The NIfTI-MRS standard (https://github.com/wtclarke/mrs_nifti_standard/) includes a JSON extension. My initial attempt at this (in #1327) created a `NiftiJSONExtension` class, but this had the side-effect of breaking code that already loaded the ex... | NIfTI Extension redesign
Right now the definition of `Nifti1Extension` is (simplified):
```python
class Nifti1Extension:
def __init__(self, code, content):
self.code = code
self._content = self._unmangle(content)
def get_content():
return self._content
```
This means that ... | nipy/nibabel | diff --git a/nibabel/tests/test_nifti1.py b/nibabel/tests/test_nifti1.py
index 5ee4fb3c..23e71c83 100644
--- a/nibabel/tests/test_nifti1.py
+++ b/nibabel/tests/test_nifti1.py
@@ -1224,6 +1224,32 @@ def test_ext_eq():
assert not ext == ext2
+def test_extension_content_access():
+ ext = Nifti1Extension('comme... | [
"nibabel/tests/test_nifti1.py::test_extension_content_access"
] | [
"nibabel/tests/test_nifti1.py::TestNifti1PairHeader::test__eq__",
"nibabel/tests/test_nifti1.py::TestNifti1PairHeader::test_to_from_fileobj",
"nibabel/tests/test_nifti1.py::TestNifti1PairHeader::test_mappingness",
"nibabel/tests/test_nifti1.py::TestNifti1PairHeader::test_endianness_ro",
"nibabel/tests/test_... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
4dcd92e45efeb0615ba1c96d45241a037d30abe0 | 2021-12-25 18:12:24 | docker.io/swerebenchv2/pycqa-pyflakes:668-4dcd92e | pycqa__pyflakes-668 | Method: UnusedAnnotation.__init__(self, filename: str, loc: tuple, names: str)
Location: pyflakes/messages.py – class `UnusedAnnotation` (subclass of `Message`).
Inputs:
- **filename** – path of the source file being checked.
- **loc** – source location tuple `(line, column)` where the annotation occurs.
- **... | python | MIT | diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index 56fc3ca..89c9d0a 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -588,7 +588,7 @@ class FunctionScope(Scope):
self.returnValue = None # First non-empty return
self.isGenerator = False # Detect a generator
- def unus... | Detect unused annotations in functions
Closes #546 | Is an unused variable annotation able to be detected?
Given this sample file:
```python
def foo():
a = 10
b: str
return 1
foo()
```
It correctly gives an error about the variable `a`: `test.py:2:5 local variable 'a' is assigned to but never used`
It would be nice if an error could be give... | PyCQA/pyflakes | diff --git a/pyflakes/test/test_type_annotations.py b/pyflakes/test/test_type_annotations.py
index d881205..2ad9f45 100644
--- a/pyflakes/test/test_type_annotations.py
+++ b/pyflakes/test/test_type_annotations.py
@@ -174,7 +174,7 @@ class TestTypeAnnotations(TestCase):
def f():
name: str
... | [
"pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_unused_annotation",
"pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_variable_annotations"
] | [
"pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_TypeAlias_annotations",
"pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_aliased_import",
"pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_annotated_async_def",
"pyflakes/test/test_type_annotations.py::TestT... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
3ba405ba80a6da491bee13ed25aa416aa02e3428 | 2021-08-18 16:24:13 | docker.io/swerebenchv2/mie-lab-trackintel:311-3ba405b | mie-lab__trackintel-311 | No new interfaces are introduced. | python | MIT | diff --git a/docs/environment.yml b/docs/environment.yml
index 4750c75..1392606 100644
--- a/docs/environment.yml
+++ b/docs/environment.yml
@@ -3,19 +3,19 @@ channels:
- conda-forge
- defaults
dependencies:
-- python=3.8
-- numpy
-- matplotlib
-- pandas
+# - python=3.8
- geopandas
-- scikit-learn
-- networkx
-... | BUG: Explode function now only called on dataframes.
Closes #305
I solved the problem differently than we discussed.
The GeoDataFrame is only created in this `if add_geometry` block, so I moved the block after using the exploding, that way we only use the DataFrame variant.
Creating a test for this is a bit diff... | trips with geometries cause error in id assignment
The problem is that geopandas overrides the explode method of pandas (see issue [here](https://github.com/geopandas/geopandas/issues/2061)). This causes a problem [here](https://github.com/geopandas/geopandas/issues/2061) and [here](https://github.com/mie-lab/trackinte... | mie-lab/trackintel | diff --git a/tests/preprocessing/test_triplegs.py b/tests/preprocessing/test_triplegs.py
index 84f22b9..5ac1537 100644
--- a/tests/preprocessing/test_triplegs.py
+++ b/tests/preprocessing/test_triplegs.py
@@ -14,6 +14,29 @@ import trackintel as ti
from trackintel.preprocessing.triplegs import generate_trips
+@pyte... | [
"tests/preprocessing/test_triplegs.py::TestGenerate_trips::test_duplicate_columns",
"tests/preprocessing/test_triplegs.py::TestGenerate_trips::test_generate_trips",
"tests/preprocessing/test_triplegs.py::TestGenerate_trips::test_trip_wo_geom",
"tests/preprocessing/test_triplegs.py::TestGenerate_trips::test_ac... | [
"tests/preprocessing/test_triplegs.py::TestSmoothen_triplegs::test_smoothen_triplegs",
"tests/preprocessing/test_triplegs.py::TestGenerate_trips::test_only_staypoints_in_trip"
] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/geopandas/geopandas/issues/2061",
... |
99642cab3a93cf3b81da475bdf0b46538f65c539 | 2025-01-24 08:57:22 | docker.io/swerebenchv2/rhayes777-pyautofit:1096-99642ca | rhayes777__pyautofit-1096 | Method: SearchOutput.children(self)
Location: class `SearchOutput` in **autofit/aggregator/search_output.py**
Inputs: *(none)* – property access, no arguments required.
Outputs: `List[Fit]` – a list of child fit/search objects (each implements the `Fit` interface).
Description: Returns the collection of child a... | python | MIT | diff --git a/autofit/__init__.py b/autofit/__init__.py
index bfb40dbca..152fa6bf9 100644
--- a/autofit/__init__.py
+++ b/autofit/__init__.py
@@ -25,9 +25,8 @@ from .non_linear.samples import Sample
from .non_linear.samples import load_from_table
from .non_linear.samples import SamplesStored
from .database.aggregat... | feature/search children
Should resolve #1093
SearchOutput (i.e. from a directory) and Fit (i.e. from the database) had different names for this attribute/property
I've made the name consistent (children) but also added a common ABC which asserts some interface that should be shared. I've swapped Fit (from the databas... | Generalize Aggregator directory and scrape API
Two examples of database use on the `autolens_workspace` only work when a .sqlite database is built and used:
https://github.com/Jammy2211/autolens_workspace/blob/release/scripts/results/examples/data_fitting.py
https://github.com/Jammy2211/autolens_workspace/blob/release... | rhayes777/PyAutoFit | diff --git a/test_autofit/aggregator/test_child_analysis.py b/test_autofit/aggregator/test_child_analysis.py
index 3fa5ba9c2..e9e2a68b1 100644
--- a/test_autofit/aggregator/test_child_analysis.py
+++ b/test_autofit/aggregator/test_child_analysis.py
@@ -19,7 +19,7 @@ def make_search_output(directory):
@pytest.fixture... | [
"test_autofit/aggregator/test_child_analysis.py::test_child_analysis",
"test_autofit/aggregator/test_child_analysis.py::test_child_analysis_pickles"
] | [
"test_autofit/aggregator/test_child_analysis.py::test_child_analysis_values",
"test_autofit/aggregator/test_child_analysis.py::test_database_aggregator",
"test_autofit/aggregator/test_child_analysis.py::test_child_values",
"test_autofit/database/test_regression.py::test_instance_from_prior_medians",
"test_a... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.92,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/Jammy2211/autolens_workspace/blob/r... |
d782d4df3963f5be2313f38a6e0f2a14daa5cfd0 | 2022-07-03 20:46:29 | docker.io/swerebenchv2/cuthbertlab-music21:1337-d782d4d | cuthbertlab__music21-1337 | Method: ArpeggioMark.__init__(self, arpeggioType: t.Optional[str] = None)
Location: music21/expressions.py
Inputs:
- arpeggioType (optional str): one of 'normal', 'up', 'down', 'non-arpeggio'. If omitted defaults to 'normal'.
Outputs:
- Creates an ArpeggioMark instance, sets the public attribute type to the validated... | python | BSD-3-Clause | diff --git a/music21/expressions.py b/music21/expressions.py
index 80fc4d982..65a53443f 100644
--- a/music21/expressions.py
+++ b/music21/expressions.py
@@ -1426,6 +1426,93 @@ class TremoloSpanner(spanner.Spanner):
raise TremoloException('Number of marks must be a number from 0 to 8') from ve
+class Ar... | Fix for #547 : Initial proposal for ArpeggioMark and ArpeggioMarkSpanner classes.
Fixes #547 | Support <arpeggiate/> for xmlToM21.py
Is this planned?
If I could make a pull request to support this, what should I do, to be exact: In musicXML arpeggio lives in the `<notations/>` tag, but `music21` puts extra elements in `articulations`. So for the pull request I should make an `Arpeggiate` class inside `articulat... | cuthbertLab/music21 | diff --git a/music21/musicxml/testPrimitive.py b/music21/musicxml/testPrimitive.py
index 9e105adfc..34a6ba77c 100644
--- a/music21/musicxml/testPrimitive.py
+++ b/music21/musicxml/testPrimitive.py
@@ -3576,6 +3576,465 @@ restsDurations02a = '''<?xml version="1.0" encoding="UTF-8"?>
'''
+arpeggio32d = '''<?xml vers... | [
"music21/musicxml/test_m21ToXml.py::Test::testArpeggioMarkSpannersNonArpeggiate",
"music21/musicxml/test_xmlToM21.py::Test::testArpeggioMarkSpanners"
] | [
"music21/musicxml/testPrimitive.py::Test::testBasic",
"music21/musicxml/testPrimitive.py::Test::testMidMeasureClef1",
"music21/musicxml/testPrimitive.py::Test::testMidMeasureClefs2",
"music21/musicxml/testPrimitive.py::Test::testMidMeasureClefs3",
"music21/musicxml/test_m21ToXml.py::Test::testArpeggioMarkSp... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
38580b274ab75722d0a9abfc21d2c905fede198d | 2025-04-21 14:21:48 | docker.io/swerebenchv2/aristanetworks-anta:1176-38580b2 | aristanetworks__anta-1176 | Method: VerifyBGPAdvCommunities.__call__(self, bgp_peers: list[BgpPeer])
Location: anta/tests/routing/bgp.py
Inputs:
- **bgp_peers** – list of *BgpPeer* objects constructed from the test inputs. Each *BgpPeer* may contain an optional **advertised_communities** field that specifies which community types must be pr... | python | Apache-2.0 | diff --git a/anta/custom_types.py b/anta/custom_types.py
index bacb641d..9e5c085f 100644
--- a/anta/custom_types.py
+++ b/anta/custom_types.py
@@ -419,3 +419,4 @@ ReloadCause = Annotated[
Literal["System reloaded due to Zero Touch Provisioning", "Reload requested by the user.", "Reload requested after FPGA upgrade... | feat(anta_tests): VerifyBGPAdvCommunities support a combination of communities
# Description
Extend BgpPeer model to support an optional list of communities and check against those instead of all.
advertised_communities: list[Community] = Field(default=["standard', "extended', "large"
Fixes #1173
# Checkli... | feat(anta_tests): VerifyBGPAdvCommunities support a combination of communities
Extend `BgpPeer` model to support an optional list of communities and check against those instead of all.
```
advertised_communities: list[Community] = Field(default=["standard', "extended', "large"])
``` | aristanetworks/anta | diff --git a/anta/tests/routing/bgp.py b/anta/tests/routing/bgp.py
index da4d757c..1398fac2 100644
--- a/anta/tests/routing/bgp.py
+++ b/anta/tests/routing/bgp.py
@@ -923,24 +923,21 @@ class VerifyEVPNType2Route(AntaTest):
class VerifyBGPAdvCommunities(AntaTest):
- """Verifies that advertised communities are st... | [
"tests/units/anta_tests/routing/test_bgp.py::test[anta.tests.routing.bgp.VerifyBGPAdvCommunities-success]",
"tests/units/anta_tests/routing/test_bgp.py::test[anta.tests.routing.bgp.VerifyBGPAdvCommunities-success-specified-communities]",
"tests/units/anta_tests/routing/test_bgp.py::test[anta.tests.routing.bgp.V... | [
"tests/units/anta_tests/routing/test_bgp.py::test[anta.tests.routing.bgp.VerifyBGPPeerCount-success]",
"tests/units/anta_tests/routing/test_bgp.py::test[anta.tests.routing.bgp.VerifyBGPPeerCount-success-peer-state-check-true]",
"tests/units/anta_tests/routing/test_bgp.py::test[anta.tests.routing.bgp.VerifyBGPPe... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
b41fed025a48960bc085b14e034badbe858b2e48 | 2020-05-25 14:44:11 | docker.io/swerebenchv2/moggers87-salmon:140-b41fed0 | moggers87__salmon-140 | Method: bounce_to.__init__(self, soft, hard)
Location: salmon/bounce.py – class `bounce_to` constructor
Inputs: `soft` – callable used for soft bounces; `hard` – callable used for hard bounces. Both must be truthy callables.
Outputs: Creates a `bounce_to` instance storing the two callables in `self.soft` and `sel... | python | custom-check-github | diff --git a/salmon/bounce.py b/salmon/bounce.py
index bad803f..67df517 100644
--- a/salmon/bounce.py
+++ b/salmon/bounce.py
@@ -281,11 +281,14 @@ class bounce_to:
If you don't go back to start immediately then you will mess with the state
for this address, which can be bad.
"""
- def __init__(self, s... | Assertions should be errors
Fixes #138 | Misuse of `assert`
There are places in Salmon where assertions are used to protect against programming errors, e.g. https://github.com/moggers87/salmon/blob/6a0345aea423550fc9135ac2eafa84bb75f9aade/salmon/bounce.py#L284-L288
This is no good as assertions are dropped if optimisation is requested: https://docs.python.... | moggers87/salmon | diff --git a/tests/bounce_tests.py b/tests/bounce_tests.py
index fc4fae3..51a6105 100644
--- a/tests/bounce_tests.py
+++ b/tests/bounce_tests.py
@@ -1,4 +1,5 @@
from salmon import mail
+from salmon.bounce import bounce_to
from salmon.routing import Router
from .handlers import bounce_filtered_mod
@@ -103,3 +104,12... | [
"tests/bounce_tests.py::BounceTestCase::test_bounce_analyzer_on_bounce",
"tests/bounce_tests.py::BounceTestCase::test_bounce_analyzer_on_regular",
"tests/bounce_tests.py::BounceTestCase::test_bounce_getting_original",
"tests/bounce_tests.py::BounceTestCase::test_bounce_no_headers_error_message",
"tests/boun... | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://docs.python.org/3/reference/simple_stmts.html#... |
75410e89cbbff6fb0f1603dc53eaebdc40bef058 | 2024-06-20 13:26:08 | docker.io/swerebenchv2/aws-cloudformation-cfn-lint:3337-75410e8 | aws-cloudformation__cfn-lint-3337 | No new interfaces are introduced. | python | MIT-0 | diff --git a/src/cfnlint/rules/resources/iam/Permissions.py b/src/cfnlint/rules/resources/iam/Permissions.py
index 8be5cf81a..d988292a7 100644
--- a/src/cfnlint/rules/resources/iam/Permissions.py
+++ b/src/cfnlint/rules/resources/iam/Permissions.py
@@ -38,6 +38,15 @@ class Permissions(CfnLintKeyword):
for acti... | Skip empty strings in action validation
*Issue #, if available:*
fix #3323
*Description of changes:*
- Skip empty strings in action validation
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
| v1: E3510 Exception 'not enough values to unpack (expected 2, got 1)' raised while validating 'cfnLint' when 'Ref' is resolved
### CloudFormation Lint Version
v1.3.0
### What operating system are you using?
Ubuntu
### Describe the bug
cfn-lint get an internal error when handling serverless transformer CSV paramete... | aws-cloudformation/cfn-lint | diff --git a/test/unit/rules/resources/iam/test_iam_permissions.py b/test/unit/rules/resources/iam/test_iam_permissions.py
index 5e95e52be..f4b906897 100644
--- a/test/unit/rules/resources/iam/test_iam_permissions.py
+++ b/test/unit/rules/resources/iam/test_iam_permissions.py
@@ -29,6 +29,7 @@ def rule():
("In... | [
"test/unit/rules/resources/iam/test_iam_permissions.py::test_permissions[Empty"
] | [
"test/unit/rules/resources/iam/test_iam_permissions.py::test_permissions[Valid",
"test/unit/rules/resources/iam/test_iam_permissions.py::test_permissions[Invalid"
] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.93,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [... |
37d3a3ab03b4df5bd2524c8eef824b074b448212 | 2025-05-28 22:18:31 | docker.io/swerebenchv2/pydap-pydap:502-37d3a3a | pydap__pydap-502 | Method: BaseType.dimensions(self)
Location: src/pydap/model.py
Inputs: • self – instance of :class:`BaseType`
Outputs: • ``tuple[str]`` – names of the dimensions (axes) of the array. Accessing this property emits a ``DeprecationWarning`` warning that the attribute is deprecated and will be removed in a future release; ... | python | MIT | diff --git a/docs/en/_config.yml b/docs/en/_config.yml
index e731048..f5cd711 100644
--- a/docs/en/_config.yml
+++ b/docs/en/_config.yml
@@ -31,9 +31,6 @@ sphinx:
html_theme_options:
navigation_with_keys: false
-# Add a bibtex file so that we can create citations
-bibtex_bibfiles:
-- references.bib
# I... | Backwards compat
<!-- Thank you very much for your hard work and contribution! -->
The following Pull Request:
- [x] Provides backwards/forwards compatibility by adding a deprecation warning but enabling the use of dimensions/dims as described in #485 #497
- [x] Tests are added to demonstrate the new or fixed ... | set the documentation environment to use pydap installled from local branch
To improve documentation practices, I think the docs/en/environment.yml (and similarly the docs/es/environment.yml) file should install pydap in development mode (is this possible?), or not install pydap, making the user to install pydap manual... | pydap/pydap | diff --git a/conftest.py b/conftest.py
index e7a1135..06476f9 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,3 +1,13 @@
+import os
+
+import pytest
+
+
+@pytest.fixture(scope="session", autouse=True)
+def set_local_env():
+ os.environ["LOCAL_DEV"] = "1"
+
+
# Define which file to ignore in tests:
collect_ignore ... | [
"src/pydap/tests/test_model.py::test_BaseType_raiseWarning_dimensions"
] | [
"src/pydap/tests/test_client.py::test_open_url",
"src/pydap/tests/test_client.py::test_open_url_dap4",
"src/pydap/tests/test_client.py::test_open_url_dap4_shape",
"src/pydap/tests/test_client.py::test_open_url_seqCE",
"src/pydap/tests/test_client.py::test_output_grid[False]",
"src/pydap/tests/test_client.... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "B4",
"confidence": 0.87,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": true,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "partial",
"pr_categories": [
... |
ae50251eee8d9b6acbaf1ae174f84991db8c70ad | 2022-09-26 10:08:41 | docker.io/swerebenchv2/ntnu-ihb-pythonfmu:158-ae50251 | ntnu-ihb__pythonfmu-158 | Method: DefaultExperiment.__init__(self, start_time: float=None, stop_time: float=None, step_size: float=None, tolerance: float=None)
Location: pythonfmu/default_experiment.py
Inputs: Optional float values – `start_time` (initial simulation time), `stop_time` (final simulation time), `step_size` (default integration st... | python | MIT | diff --git a/pythonfmu/default_experiment.py b/pythonfmu/default_experiment.py
index 817cf08..c0aabb2 100644
--- a/pythonfmu/default_experiment.py
+++ b/pythonfmu/default_experiment.py
@@ -1,6 +1,7 @@
class DefaultExperiment:
- def __init__(self, start_time: float = None, stop_time: float = None, tolerance: float... | Fix default_experiment
Close #157 | Trouble using the `default_experiment`
I have ran into two issues trying to set the `default_experiment` using the `DefaultExperiment` class.
First, the xml parser is throwing an error regarding serializing the floats specified in the start/stop time fields, as such:
```
Traceback (most recent call last):
File ... | NTNU-IHB/PythonFMU | diff --git a/pythonfmu/tests/slaves/pythonslave_read_file.py b/pythonfmu/tests/slaves/pythonslave_read_file.py
index 7db110b..b07b8b9 100644
--- a/pythonfmu/tests/slaves/pythonslave_read_file.py
+++ b/pythonfmu/tests/slaves/pythonslave_read_file.py
@@ -1,8 +1,10 @@
-from pythonfmu.fmi2slave import Fmi2Slave, Fmi2Causal... | [
"pythonfmu/tests/test_default_experiment.py::test_default_experiment"
] | [] | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories":... |
33815fc722b7ddc4dbb77bb533d989e5ce11dc71 | 2023-02-03 08:05:13 | docker.io/swerebenchv2/apiflask-apiflask:400-33815fc | apiflask__apiflask-400 | Method: Schema.__init__(self, **kwargs)
Location: apiflask.Schema (base class for declarative schema definitions)
Inputs: optional keyword arguments passed to the underlying marshmallow.Schema constructor (e.g., `unknown`, `ordered`); typically none when subclassing.
Outputs: an initialized Schema subclass ready to be ... | python | MIT | diff --git a/CHANGES.md b/CHANGES.md
index 8367971..03df64b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -4,9 +4,12 @@ Released: -
- Remove the validation of input locations ([issue #259][issue_259]).
- Support passing `Function` type config to `SWAGGER_UI_CONFIG` ([issue #381][issue_381]).
+- Fix the base response ... | Fix the not-iterable exception occurred when directly returning a custom class
Fix the not-iterable exception occurred when a `@app.output()` decorated view function directly return a custom class.
<!--
For features and bug fixes, before opening a PR, please open an issue describing
the bug or feature the PR will ... | Cannot return non-dictlike object from handler if BASE_RESPONSE_SCHEMA is set
If BASE_RESPONSE_SCHEMA is set and a non-dict like object is returned from a route, an exception `TypeError: argument of type '<type of object>' is not iterable` is thrown from [scaffold.py](https://github.com/apiflask/apiflask/blob/71c821ae5... | apiflask/apiflask | diff --git a/tests/test_decorator_output.py b/tests/test_decorator_output.py
index d45ea66..6debf1a 100644
--- a/tests/test_decorator_output.py
+++ b/tests/test_decorator_output.py
@@ -1,10 +1,14 @@
+from dataclasses import dataclass
+
from flask import make_response
from openapi_spec_validator import validate_spec
... | [
"tests/test_decorator_output.py::test_output_with_object_schema"
] | [
"tests/test_decorator_output.py::test_output",
"tests/test_decorator_output.py::test_output_with_methodview",
"tests/test_decorator_output.py::test_output_body_example",
"tests/test_decorator_output.py::test_output_with_empty_dict_as_schema",
"tests/test_decorator_output.py::test_output_response_object_dire... | {
"base_image_name": "python_base_310",
"docker_specs": {
"_variant": null,
"bazel_version": null,
"bun_version": null,
"cargo_version": null,
"deno_version": null,
"docker_version": null,
"erlang_version": null,
"gcc_version": null,
"go_version": null,
"helm_version": null,
... | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [
"https://github.com/apiflask/apiflask/blob/71c821ae5949... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.