selection_rank int64 0 10k | uid stringlengths 17 29 | source stringclasses 7
values | split stringclasses 3
values | row_idx int64 0 58.9k | instance_id stringlengths 14 120 | repo stringclasses 246
values | repo_canon stringclasses 232
values | language stringclasses 8
values | base_commit stringlengths 40 40 ⌀ | problem_statement stringlengths 84 23.6k | extra_context stringclasses 626
values | hints stringlengths 0 59.3k | patch stringlengths 252 175k | test_patch stringlengths 0 358k | f2p stringlengths 10 155k ⌀ | p2p stringlengths 2 1.75M ⌀ | env_image stringlengths 41 154 ⌀ | env_available bool 1
class | created_at stringlengths 10 20 ⌀ | n_src_files int64 1 15 | src_lines int64 1 1.48k | n_f2p float64 1 1.87k ⌀ | ps_chars int64 84 23.6k | leak_ratio float64 0 0.6 | s_prior float64 0.6 1 | s_verif float64 0.75 1 | s_ps float64 0.04 1 | s_patch float64 0.07 1 | s_tiebreak float64 0.02 1 | score float64 47.9 98.6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,400 | swe_smith::train::23918 | swe_smith | train | 23,918 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__1y1lpd0h | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | HGC to HGS coordinate transformation broken due to variable ordering
#### Description
The coordinate transformation from Heliographic Carrington (HGC) to Heliographic Stonyhurst (HGS) is currently broken and raises `UnboundLocalError` when attempting to transform coordinates.
#### Steps/Code to Reproduce
```python
... | diff --git a/sunpy/coordinates/_transformations.py b/sunpy/coordinates/_transformations.py
index 5b18d02..d6d830c 100644
--- a/sunpy/coordinates/_transformations.py
+++ b/sunpy/coordinates/_transformations.py
@@ -398,28 +398,27 @@ def hgs_to_hgc(hgscoord, hgcframe):
HeliographicCarring... | ["sunpy/coordinates/tests/test_transformations.py::test_hgs_hgc_roundtrip", "sunpy/coordinates/tests/test_transformations.py::test_hgc_hgc", "sunpy/coordinates/tests/test_transformations.py::test_hgc_hgc_different_observers", "sunpy/coordinates/tests/test_transformations.py::test_hgc_self_observer", "sunpy/coordinates/... | ["sunpy/coordinates/tests/test_transformations.py::test_hcc_to_hgs", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_sc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_null", "sunpy/coordinates/tests/test_transformations.py... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 19 | 11 | 1,169 | 0 | 0.6 | 1 | 0.75 | 1 | 0.258167 | 81.0495 | |||
6,401 | swe_smith::train::30004 | swe_smith | train | 30,004 | getnikola__nikola.0f4c230e.func_pm_remove_assign__dlo7o677 | swesmith/getnikola__nikola.0f4c230e | getnikola/nikola | python | null | WordPress import command fails with NameError on missing variables
#### Description
The WordPress import command is broken and throws NameError exceptions when trying to access several variables that were accidentally removed during code cleanup.
#### Steps/Code to Reproduce
```python
from nikola.plugins.command.im... | diff --git a/nikola/plugins/command/import_wordpress.py b/nikola/plugins/command/import_wordpress.py
index 9a8b130..567958c 100644
--- a/nikola/plugins/command/import_wordpress.py
+++ b/nikola/plugins/command/import_wordpress.py
@@ -285,35 +285,23 @@ to
self.wordpress_export_file = options['filename']
... | ["tests/test_command_import_wordpress.py::test_create_import[options1-None]", "tests/test_command_import_wordpress.py::test_create_import[None-additional_args2]", "tests/test_command_import_wordpress.py::test_ignoring_drafts_during_import[options0]", "tests/test_command_import_wordpress.py::test_ignoring_drafts_during_... | ["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o... | jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e | true | null | 1 | 13 | 4 | 1,289 | 0 | 0.6 | 1 | 0.75 | 1 | 0.258167 | 81.0495 | |||
6,402 | swe_smith::train::42167 | swe_smith | train | 42,167 | scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__mztn0sav | swesmith/scanny__python-pptx.278b47b1 | scanny/python-pptx | python | null | Group shape recalculation fails with NameError for undefined variables
#### Description
When working with group shapes in PowerPoint presentations, the `recalculate_extents()` method fails with a NameError due to undefined variables being referenced.
#### Steps/Code to Reproduce
```python
from pptx import Presentat... | diff --git a/src/pptx/oxml/shapes/groupshape.py b/src/pptx/oxml/shapes/groupshape.py
index f62bc66..d062e23 100644
--- a/src/pptx/oxml/shapes/groupshape.py
+++ b/src/pptx/oxml/shapes/groupshape.py
@@ -186,6 +186,10 @@ class CT_GroupShape(BaseShapeElement):
return grpSp
def recalculate_extents(self) -> N... | ["tests/oxml/shapes/test_groupshape.py::DescribeCT_GroupShape::it_can_recalculate_its_pos_and_size[recalc_fixture0]", "tests/oxml/shapes/test_groupshape.py::DescribeCT_GroupShape::it_can_recalculate_its_pos_and_size[recalc_fixture1]"] | ["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr... | jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1 | true | null | 1 | 15 | 2 | 1,249 | 0 | 0.6 | 1 | 0.75 | 1 | 0.258167 | 81.0495 | |||
6,403 | swe_smith::train::28709 | swe_smith | train | 28,709 | encode__starlette.db5063c2.func_basic__wkannc9i | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | Middleware stack order reversed causing incorrect exception handling
#### Description
The middleware stack is being built in the wrong order, causing exception handlers to not work properly. Custom exception handlers are not being triggered and the debug mode is inverted.
#### Steps/Code to Reproduce
```python
from... | diff --git a/starlette/applications.py b/starlette/applications.py
index 0a717bb..1dafcf5 100644
--- a/starlette/applications.py
+++ b/starlette/applications.py
@@ -77,24 +77,24 @@ class Starlette:
self.middleware_stack: ASGIApp | None = None
def build_middleware_stack(self) -> ASGIApp:
- debug =... | ["tests/middleware/test_base.py::test_multiple_middlewares_stacked_client_disconnected[asyncio]", "tests/middleware/test_base.py::test_multiple_middlewares_stacked_client_disconnected[trio]", "tests/middleware/test_errors.py::test_background_task[asyncio]", "tests/middleware/test_errors.py::test_background_task[trio]",... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 14 | 22 | 1,269 | 0 | 0.6 | 1 | 0.75 | 1 | 0.258167 | 81.0495 | |||
6,404 | swe_smith::train::10076 | swe_smith | train | 10,076 | paramiko__paramiko.23f92003.combine_file__8ji179tx | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | SSH key exchange fails with SSHException during GEX negotiation
#### Description
When establishing SSH connections using Diffie-Hellman Group Exchange (GEX), the key exchange process fails with an SSHException. This affects both regular and old-style GEX clients.
#### Steps/Code to Reproduce
```python
import parami... | diff --git a/paramiko/kex_gex.py b/paramiko/kex_gex.py
index baa0803..c14baab 100644
--- a/paramiko/kex_gex.py
+++ b/paramiko/kex_gex.py
@@ -162,14 +162,12 @@ class KexGex:
self.transport._expect_packet(_MSG_KEXDH_GEX_INIT)
def _parse_kexdh_gex_request_old(self, m):
- # same as above, but without... | ["tests/pkey.py::PKey_::fingerprint[ed25519]", "tests/test_kex.py::KexTest::test_gex_client", "tests/test_kex.py::KexTest::test_gex_old_client", "tests/test_kex.py::KexTest::test_gex_server_with_old_client", "tests/test_kex.py::KexTest::test_gex_sha256_client", "tests/test_kex.py::KexTest::test_gex_sha256_old_client", ... | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 23 | 7 | 1,089 | 0 | 0.6 | 1 | 0.75 | 1 | 0.258167 | 81.0495 | |||
6,405 | swe_bench::test::1574 | swe_bench | test | 1,574 | scikit-learn__scikit-learn-13013 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 28728f5c793f73f92d6c56c83b06fb001395d400 | Make use of check_is_fitted instead of manual checks
#### Description
In some places, a manual check is performed to check whether an estimator has been fitted, instead of using the `check_is_fitted` method. Due to this, the NotFittedError messages are often inconsistent.
Some examples include:
https://github.com/scik... | Please do submit a PR. `check_is_fitted` is relatively new, and we may have missed places. | diff --git a/sklearn/base.py b/sklearn/base.py
--- a/sklearn/base.py
+++ b/sklearn/base.py
@@ -26,7 +26,8 @@
'stateless': False,
'multilabel': False,
'_skip_test': False,
- 'multioutput_only': False}
+ 'multioutput_only': False,
+ 'requires_fit': True}
def clone(estimator, safe=True):
diff ... | diff --git a/sklearn/decomposition/tests/test_online_lda.py b/sklearn/decomposition/tests/test_online_lda.py
--- a/sklearn/decomposition/tests/test_online_lda.py
+++ b/sklearn/decomposition/tests/test_online_lda.py
@@ -180,12 +180,12 @@ def test_lda_negative_input():
def test_lda_no_component_error():
- # test ... | ["sklearn/decomposition/tests/test_online_lda.py::test_lda_no_component_error", "sklearn/utils/tests/test_estimator_checks.py::test_check_estimators_unfitted"] | ["sklearn/decomposition/tests/test_online_lda.py::test_lda_default_prior_params", "sklearn/decomposition/tests/test_online_lda.py::test_lda_fit_batch", "sklearn/decomposition/tests/test_online_lda.py::test_lda_fit_online", "sklearn/decomposition/tests/test_online_lda.py::test_lda_partial_fit", "sklearn/decomposition/te... | null | true | 2019-01-18T10:56:58Z | 9 | 108 | 2 | 1,088 | 0 | 0.8 | 1 | 0.85 | 0.6 | 0.541333 | 81.049 | |
6,406 | swe_smith::train::22230 | swe_smith | train | 22,230 | tweepy__tweepy.91a41c6e.combine_file__2sd58d3b | swesmith/tweepy__tweepy.91a41c6e | tweepy/tweepy | python | null | [Bug]: DirectMessage and List parsing issues in Tweepy
### Bug summary
I've encountered issues with the DirectMessage and List models in Tweepy. Several API methods related to direct messages and lists are failing.
### Code for reproduction
```python
import tweepy
# Set up your API credentials
auth = tweepy.OAuth1... | diff --git a/tweepy/models.py b/tweepy/models.py
index f29361e..5cbce71 100644
--- a/tweepy/models.py
+++ b/tweepy/models.py
@@ -126,14 +126,14 @@ class DirectMessage(Model):
@classmethod
def parse_list(cls, api, json_list):
- if isinstance(json_list, list):
+ if isinstance(json_list, dict):
... | ["tests/test_api.py::TweepyAPITests::testgetdirectmessages", "tests/test_api.py::TweepyAPITests::testgetlistmemberships", "tests/test_api.py::TweepyAPITests::testgetlistownerships", "tests/test_api.py::TweepyAPITests::testgetlistsubscriptions"] | ["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre... | jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e | true | null | 1 | 8 | 4 | 1,388 | 0 | 0.6 | 1 | 0.75 | 1 | 0.258 | 81.049 | |||
6,407 | swe_smith::train::3434 | swe_smith | train | 3,434 | pygments__pygments.27649ebb.combine_file__mhc5je87 | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | Wikitext lexer broken after recent changes
I'm getting a `KeyError: 'name'` when trying to use the WikitextLexer on any wikitext content. This seems to have broken basic functionality.
#### Steps to Reproduce
```python
from pygments import highlight
from pygments.lexers import WikitextLexer
from pygments.formatters ... | diff --git a/pygments/lexers/markup.py b/pygments/lexers/markup.py
index 5d5ff2c..ded88be 100644
--- a/pygments/lexers/markup.py
+++ b/pygments/lexers/markup.py
@@ -134,28 +134,28 @@ class RstLexer(RegexLexer):
from pygments.lexers import get_lexer_by_name
# section header
- yield match.start... | ["tests/test_basic_api.py::test_random_input[WikitextLexer]", "tests/test_basic_api.py::test_lexer_options[WikitextLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_classes[WikitextLexer]", "tests/snippets/wikitext/only-highlight-first-redirect.txt::", "tests/examplefiles/rst/jin... | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 38 | 25 | 788 | 0 | 0.6 | 1 | 0.75 | 1 | 0.258 | 81.049 | |||
6,408 | swe_smith::train::3499 | swe_smith | train | 3,499 | pygments__pygments.27649ebb.combine_file__sli42ngl | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | SnowballLexer constructor fails with TypeError on keyword arguments
#### Description
The SnowballLexer class is throwing a TypeError when initialized with keyword arguments. This affects basic lexer functionality and prevents the lexer from being used properly.
#### Steps/Code to Reproduce
```python
from pygments.l... | diff --git a/pygments/lexers/dsls.py b/pygments/lexers/dsls.py
index 35dfda9..cb3aa5b 100644
--- a/pygments/lexers/dsls.py
+++ b/pygments/lexers/dsls.py
@@ -875,7 +875,7 @@ class SnowballLexer(ExtendedRegexLexer):
def __init__(self, **options):
self._reset_stringescapes()
- ExtendedRegexLexer.__i... | ["tests/test_basic_api.py::test_lexer_options[SnowballLexer]", "tests/test_basic_api.py::test_lexer_classes[SnowballLexer]", "tests/test_basic_api.py::test_random_input[SnowballLexer]", "tests/examplefiles/snowball/example.sbl::"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 30 | 4 | 948 | 0 | 0.6 | 1 | 0.75 | 1 | 0.258 | 81.049 | |||
6,409 | swe_smith::train::9913 | swe_smith | train | 9,913 | matthewwithanm__python-markdownify.6258f5c3.func_pm_ctrl_shuffle__4la43w29 | swesmith/matthewwithanm__python-markdownify.6258f5c3 | matthewwithanm/python-markdownify | python | null | # Heading conversion broken in markdownify
### Describe the bug
The heading conversion in markdownify is broken. When trying to convert HTML headings (h1, h2, h3, etc.) to markdown, it throws an UnboundLocalError.
### How to Reproduce
Here's a simple script to reproduce the issue:
```python
from markdownify import... | diff --git a/markdownify/__init__.py b/markdownify/__init__.py
index 3272ce5..bb71748 100644
--- a/markdownify/__init__.py
+++ b/markdownify/__init__.py
@@ -313,23 +313,22 @@ class MarkdownConverter(object):
def _convert_hn(self, n, el, text, convert_as_inline):
""" Method name prefixed with _ to preven... | ["tests/test_conversions.py::test_header_with_space", "tests/test_conversions.py::test_h1", "tests/test_conversions.py::test_h2", "tests/test_conversions.py::test_hn", "tests/test_conversions.py::test_hn_chained", "tests/test_conversions.py::test_hn_nested_tag_heading_style", "tests/test_conversions.py::test_hn_nested_... | ["tests/test_advanced.py::test_chomp", "tests/test_advanced.py::test_nested", "tests/test_advanced.py::test_ignore_comments", "tests/test_advanced.py::test_ignore_comments_with_other_tags", "tests/test_advanced.py::test_code_with_tricky_content", "tests/test_advanced.py::test_special_tags", "tests/test_args.py::test_st... | jyangballin/swesmith.x86_64.matthewwithanm_1776_python-markdownify.6258f5c3 | true | null | 1 | 17 | 10 | 1,208 | 0 | 0.6 | 1 | 0.75 | 1 | 0.258 | 81.049 | |||
6,410 | swe_smith::train::12654 | swe_smith | train | 12,654 | lepture__mistune.bf54ef67.lm_rewrite__7utqejh5 | swesmith/lepture__mistune.bf54ef67 | lepture/mistune | python | null | # TOC directive silently ignores invalid level options instead of raising ValueError
I found an issue with the Table of Contents (TOC) directive where it silently ignores invalid level options instead of raising a ValueError as expected.
## Reproduction
When using the TOC directive with invalid level options (non-in... | diff --git a/src/mistune/directives/toc.py b/src/mistune/directives/toc.py
index 45a13d7..5497999 100644
--- a/src/mistune/directives/toc.py
+++ b/src/mistune/directives/toc.py
@@ -106,10 +106,16 @@ def render_html_toc(
def _normalize_level(options: Dict[str, Any], name: str, default: Any) -> Any:
- level = opt... | ["tests/test_directives.py::TestDirective_rst_toc::test_invalid_option_001", "tests/test_directives.py::TestDirective_fenced_toc::test_invalid_option_001"] | ["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx... | jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67 | true | null | 1 | 14 | 2 | 1,267 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257833 | 81.0485 | |||
6,411 | swe_smith::train::18368 | swe_smith | train | 18,368 | msiemens__tinydb.10644a0e.func_pm_remove_assign__n0bmzz7c | swesmith/msiemens__tinydb.10644a0e | msiemens/tinydb | python | null | [Bug]: `get` method with `doc_ids` parameter doesn't work
### Bug summary
The `get` method in TinyDB doesn't work correctly when passing multiple document IDs using the `doc_ids` parameter. It seems the functionality to retrieve multiple documents by their IDs is broken.
### Code for reproduction
```python
from tin... | diff --git a/tinydb/table.py b/tinydb/table.py
index c562d02..df43d1f 100644
--- a/tinydb/table.py
+++ b/tinydb/table.py
@@ -290,7 +290,7 @@ class Table:
Get exactly one document specified by a query or a document ID.
However, if multiple document IDs are given then returns all
documents in a... | ["tests/test_tinydb.py::test_get_multiple_ids[memory]", "tests/test_tinydb.py::test_get_multiple_ids[json]"] | ["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle... | jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e | true | null | 1 | 9 | 2 | 1,367 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257833 | 81.0485 | |||
6,412 | swe_smith::train::26407 | swe_smith | train | 26,407 | pylint-dev__astroid.b114f6b5.func_pm_remove_cond__841m8t6o | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Loop variable assignment inference broken after recent changes
#### Description
Loop variable assignment inference is not working correctly, causing `TypeError: 'NoneType' object is not iterable` errors when trying to infer values assigned in for loops.
#### Steps/Code to Reproduce
```python
import astroid
# Simpl... | diff --git a/astroid/protocols.py b/astroid/protocols.py
index 8a837b8..272ce7a 100644
--- a/astroid/protocols.py
+++ b/astroid/protocols.py
@@ -250,10 +250,6 @@ def _resolve_looppart(parts, assign_path, context):
assign_path = assign_path[:]
index = assign_path.pop(0)
for part in parts:
- if isin... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-True]", "tests/brain/numpy/test_ma.py::TestBrainNumpyMa::test_numpy_ma_returns_maskedarray[masked_invalid-False]", "tests/brain/n... | ["tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 20 | 22 | 1,147 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257833 | 81.0485 | |||
6,413 | swe_smith::train::27763 | swe_smith | train | 27,763 | arrow-py__arrow.1d70d009.func_pm_remove_assign__ttflwjll | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | dehumanize method throws UnboundLocalError when processing relative time strings
#### Description
The `dehumanize` method is throwing an `UnboundLocalError` when trying to parse relative time strings. The error occurs when the method attempts to reference the `strings_to_search` variable which is not properly initial... | diff --git a/arrow/arrow.py b/arrow/arrow.py
index 9d1f5e3..64ce980 100644
--- a/arrow/arrow.py
+++ b/arrow/arrow.py
@@ -1348,8 +1348,6 @@ class Arrow:
f"Dehumanize does not currently support the {locale} locale, please consider making a contribution to add support for this locale."
)
- ... | ["tests/test_arrow.py::TestArrowDehumanize::test_now", "tests/test_arrow.py::TestArrowDehumanize::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_minute", "tests/test_arrow.py::TestArrowDehumanize::test_minutes", "tests/test_arrow.py::TestArrowDehumanize::test_hour", "tests/test_arrow.py::TestArrowDehuma... | ["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te... | jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009 | true | null | 1 | 14 | 21 | 1,267 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257833 | 81.0485 | |||
6,414 | swe_smith::train::18965 | swe_smith | train | 18,965 | seperman__deepdiff.ed252022.func_basic__z62l66mh | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | Delta verification not working when verify_changes is disabled
#### Description
When applying a Delta with `verify_changes=False`, the verification logic is incorrectly inverted, causing verification to run when it should be disabled and vice versa.
#### Steps/Code to Reproduce
```python
from deepdiff import DeepDi... | diff --git a/deepdiff/delta.py b/deepdiff/delta.py
index 8bafc9a..8ead629 100644
--- a/deepdiff/delta.py
+++ b/deepdiff/delta.py
@@ -531,34 +531,31 @@ class Delta:
if elem_and_details:
elements, parent, parent_to_obj_elem, parent_to_obj_action, obj, elem, action = elem_and_details
... | ["tests/test_delta.py::TestBasicsOfDelta::test_list_difference_delta_raises_error_if_prev_value_does_not_match", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case6]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case7]", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case8]", "tests/test_... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 17 | 10 | 1,206 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257667 | 81.048 | |||
6,415 | swe_smith::train::52679 | swe_smith | train | 52,679 | pydicom__pydicom.7d361b3d.lm_rewrite__d4xq8tsw | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | Bug in add_new_private method in pydicom Dataset class
Description
The `add_new_private` method in the Dataset class has a bug when trying to add a private tag with an unknown private creator. When a private tag is not found in the private tag dictionary, the error message is incorrect.
When trying to add a new priv... | diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py
index e7abffd..baf34f3 100644
--- a/src/pydicom/dataset.py
+++ b/src/pydicom/dataset.py
@@ -478,14 +478,8 @@ class Dataset:
"""
self.add(DataElement(tag, VR, value))
- def add_new_private(
- self,
- private_creator: str,
-... | ["tests/test_dataset.py::TestDataset::test_add_unknown_private_tag"] | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 28 | 1 | 986 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257667 | 81.048 | |||
6,416 | swe_smith::train::18758 | swe_smith | train | 18,758 | seperman__deepdiff.ed252022.func_basic__6sihoud5 | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | DeepHash object preprocessing broken for custom objects and namedtuples
#### Description
DeepHash is not correctly processing custom objects and namedtuples, causing hash generation to fail or produce incorrect results. The issue affects object attribute extraction and type identification.
#### Steps/Code to Reprodu... | diff --git a/deepdiff/deephash.py b/deepdiff/deephash.py
index 1f293bd..53615c9 100644
--- a/deepdiff/deephash.py
+++ b/deepdiff/deephash.py
@@ -333,26 +333,29 @@ class DeepHash(Base):
def _prep_obj(self, obj, parent, parents_ids=EMPTY_FROZENSET, is_namedtuple=False, is_pydantic_object=False):
"""preppi... | ["tests/test_diff_other.py::TestDiffOther::test_multi_processing3_deephash", "tests/test_hash.py::TestDeepHash::test_bad_attribute", "tests/test_hash.py::TestDeepHash::test_re", "tests/test_hash.py::TestDeepHashPrep::test_named_tuples", "tests/test_hash.py::TestDeepHashPrep::test_hash_enum", "tests/test_hash.py::TestDe... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 14 | 9 | 1,265 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2575 | 81.0475 | |||
6,417 | swe_smith::train::5502 | swe_smith | train | 5,502 | PyCQA__flake8.cf1542ce.func_basic__wy1ciez7 | swesmith/PyCQA__flake8.cf1542ce | pycqa/flake8 | python | null | Required plugins check incorrectly validates installed vs expected plugins
#### Description
When using the `--require-plugins` option, flake8 incorrectly compares installed plugins against expected plugins, causing it to fail even when all required plugins are properly installed.
#### Steps/Code to Reproduce
```pyt... | diff --git a/src/flake8/plugins/finder.py b/src/flake8/plugins/finder.py
index 380ec3a..435be92 100644
--- a/src/flake8/plugins/finder.py
+++ b/src/flake8/plugins/finder.py
@@ -233,15 +233,17 @@ def _check_required_plugins(
utils.normalize_pypi_name(plugin.package) for plugin in plugins
}
expected_na... | ["tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_main.py::test_form_feed_line_split", "tests/integration/test_main.py::test_e101_indent_char_does_not_reset", "tests/integration/test_main.py::test_statistics_option", "tests/integration/test_main.py::test_show_source_option", "tests/integ... | ["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_gen]", "tests/in... | jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce | true | null | 1 | 20 | 33 | 1,143 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257167 | 81.0465 | |||
6,418 | swe_smith::train::48398 | swe_smith | train | 48,398 | sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__qpyu86wd | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | OutputStreamFormatter.format_violation raises UnboundLocalError for out_buff
#### Description
When calling `format_violation` on `OutputStreamFormatter`, an `UnboundLocalError` is raised for the variable `out_buff`.
#### Steps/Code to Reproduce
```python
from sqlfluff.core.parser import RawSegment, PositionMarker
f... | diff --git a/src/sqlfluff/cli/formatters.py b/src/sqlfluff/cli/formatters.py
index 4aa668f..ab2f85f 100644
--- a/src/sqlfluff/cli/formatters.py
+++ b/src/sqlfluff/cli/formatters.py
@@ -450,8 +450,6 @@ class OutputStreamFormatter(FormatterInterface):
desc += f" [{self.colorize(name, Color.light)}]"
... | ["test/cli/formatters_test.py::test__cli__formatters__violation"] | ["test/cli/formatters_test.py::test__cli__formatters__filename_nocol", "test/cli/formatters_test.py::test__cli__helpers__colorize", "test/cli/formatters_test.py::test__cli__helpers__cli_table"] | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 15 | 1 | 1,243 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257167 | 81.0465 | |||
6,419 | swe_smith::train::29660 | swe_smith | train | 29,660 | cookiecutter__cookiecutter.b4451231.func_pm_remove_cond__ymiga60q | swesmith/cookiecutter__cookiecutter.b4451231 | cookiecutter/cookiecutter | python | null | NameError: name 'context' is not defined when running cookiecutter
#### Description
When trying to use cookiecutter, I'm getting a `NameError: name 'context' is not defined` error. This happens with both the CLI and programmatic usage.
#### Steps/Code to Reproduce
```python
from cookiecutter import main
# This fai... | diff --git a/cookiecutter/main.py b/cookiecutter/main.py
index 347e5d6..c67b469 100644
--- a/cookiecutter/main.py
+++ b/cookiecutter/main.py
@@ -69,12 +69,6 @@ def cookiecutter(
:param keep_project_on_failure: If `True` keep generated project directory even when
generation fails
"""
- if replay an... | ["tests/replay/test_replay.py::test_raise_on_invalid_mode[invalid_kwargs0]", "tests/replay/test_replay.py::test_raise_on_invalid_mode[invalid_kwargs1]", "tests/replay/test_replay.py::test_raise_on_invalid_mode[invalid_kwargs2]", "tests/replay/test_replay.py::test_main_does_not_invoke_dump_but_load", "tests/replay/test_... | ["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl... | jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231 | true | null | 1 | 31 | 50 | 923 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257167 | 81.0465 | |||
6,420 | swe_smith::train::29881 | swe_smith | train | 29,881 | getnikola__nikola.0f4c230e.func_pm_ctrl_shuffle__dfprti6x | swesmith/getnikola__nikola.0f4c230e | getnikola/nikola | python | null | Markdown metadata extraction broken after recent changes
#### Description
The markdown compiler's `read_metadata` method is returning metadata before properly reading it from the file. This causes metadata extraction to fail completely when processing markdown files.
#### Steps/Code to Reproduce
Create a simple mar... | diff --git a/nikola/plugins/compile/markdown/__init__.py b/nikola/plugins/compile/markdown/__init__.py
index d6f137e..a48312a 100644
--- a/nikola/plugins/compile/markdown/__init__.py
+++ b/nikola/plugins/compile/markdown/__init__.py
@@ -155,14 +155,17 @@ class CompileMarkdown(PageCompiler):
fd.write(conten... | ["tests/test_metadata_extractors.py::test_compiler_metadata[CompileMarkdown-md-markdown-Markdown]"] | ["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o... | jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e | true | null | 1 | 14 | 1 | 1,263 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257167 | 81.0465 | |||
6,421 | swe_smith::train::46793 | swe_smith | train | 46,793 | python-trio__trio.cfbbe2c1.func_basic__2ixvpkyc | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | #### Description
When using `from_thread_run` during trio shutdown, the function returns `None` instead of raising `RunFinishedError` in certain scenarios.
#### Steps/Code to Reproduce
```python
import trio
from trio import from_thread_run, to_thread_run_sync
from functools import partial
async def test_shutdown_be... | diff --git a/src/trio/_threads.py b/src/trio/_threads.py
index 7afd7b6..2834f96 100644
--- a/src/trio/_threads.py
+++ b/src/trio/_threads.py
@@ -195,11 +195,11 @@ class Run(Generic[RetT]): # type: ignore[misc]
trio.lowlevel.spawn_system_task(
self.run_system,
... | ["src/trio/_tests/test_threads.py::test_from_thread_run_during_shutdown"] | ["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 1 | 6 | 1 | 1,422 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257 | 81.046 | |||
6,422 | swe_smith::train::2938 | swe_smith | train | 2,938 | madzak__python-json-logger.5f85723f.func_basic__smhs97ze | swesmith/madzak__python-json-logger.5f85723f | madzak/python-json-logger | python | null | JsonFormatter produces invalid JSON output
#### Description
The JsonFormatter is producing invalid JSON output that cannot be parsed. When trying to log messages, the formatter returns malformed JSON strings that cause `json.decoder.JSONDecodeError` when attempting to parse them.
#### Steps/Code to Reproduce
```pyt... | diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py
index 519a64d..bbbee30 100644
--- a/src/pythonjsonlogger/jsonlogger.py
+++ b/src/pythonjsonlogger/jsonlogger.py
@@ -256,8 +256,6 @@ class JsonFormatter(logging.Formatter):
def format(self, record: logging.LogRecord) -> str:
... | ["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg... | ["tests/test_jsonlogger.py::TestJsonLogger::test_merge_record_extra", "tests/test_jsonlogger.py::TestJsonLogger::test_rename_nonexistent_field", "tests/test_jsonlogger.py::TestJsonLogger::test_unknown_format_key"] | jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f | true | null | 1 | 10 | 17 | 1,342 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257 | 81.046 | |||
6,423 | swe_smith::train::4240 | swe_smith | train | 4,240 | pygments__pygments.27649ebb.func_pm_class_rm_funcs__1wl5qmr1 | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | GroffFormatter crashes with AttributeError when trying to format code
#### Description
The GroffFormatter is throwing an AttributeError when attempting to format code. This appears to be related to missing style information that should be generated during initialization.
#### Steps/Code to Reproduce
```python
from ... | diff --git a/pygments/formatters/groff.py b/pygments/formatters/groff.py
index a9e0711..de38703 100644
--- a/pygments/formatters/groff.py
+++ b/pygments/formatters/groff.py
@@ -55,29 +55,6 @@ class GroffFormatter(Formatter):
self._make_styles()
- def _make_styles(self):
- regular = '\\f[CR]' if s... | ["tests/test_groff_formatter.py::test_inheritance_custom_tokens", "tests/test_groff_formatter.py::test_basic", "tests/test_basic_api.py::test_formatter_unicode_handling[GroffFormatter]", "tests/test_basic_api.py::test_formatter_public_api[GroffFormatter]"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 25 | 4 | 1,042 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257 | 81.046 | |||
6,424 | swe_smith::train::52590 | swe_smith | train | 52,590 | pydicom__pydicom.7d361b3d.func_pm_remove_cond__lbe55ve8 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | NameError in codify utility when generating save_as filename
#### Description
The codify utility is throwing a `NameError: name 'save_as_filename' is not defined` when trying to generate code from DICOM files. This appears to happen when the save_as logic is executed.
#### Steps/Code to Reproduce
```python
from pyd... | diff --git a/src/pydicom/util/codify.py b/src/pydicom/util/codify.py
index 5cc9f4b..fb582a7 100644
--- a/src/pydicom/util/codify.py
+++ b/src/pydicom/util/codify.py
@@ -466,9 +466,6 @@ def set_parser_arguments(
def do_codify(args: argparse.Namespace) -> None:
- # Convert the requested dataset to python/pydicom ... | ["tests/test_cli.py::TestCLIcall::test_codify_command", "tests/test_cli.py::TestCLIcall::test_codify_UTF8", "tests/test_util.py::TestCodify::test_code_file", "tests/test_util.py::TestCodify::test_code_file_save_as", "tests/test_util.py::TestCodify::test_code_file_deflated"] | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 14 | 5 | 1,262 | 0 | 0.6 | 1 | 0.75 | 1 | 0.257 | 81.046 | |||
6,425 | swe_smith::train::28956 | swe_smith | train | 28,956 | encode__starlette.db5063c2.pr_2181 | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | HTTPException and WebSocketException no longer have string representation
Description
I'm using Starlette in my application and I noticed that HTTPException and WebSocketException no longer have a proper string representation.
When I try to print or log these exceptions, I get an unhelpful representation instead of ... | diff --git a/starlette/exceptions.py b/starlette/exceptions.py
index c48f083..4761225 100644
--- a/starlette/exceptions.py
+++ b/starlette/exceptions.py
@@ -20,9 +20,6 @@ class HTTPException(Exception):
self.detail = detail
self.headers = headers
- def __str__(self) -> str:
- return f"{sel... | ["tests/test_exceptions.py::test_http_str", "tests/test_exceptions.py::test_websocket_str"] | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 8 | 2 | 1,381 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256833 | 81.0455 | |||
6,426 | swe_smith::train::10488 | swe_smith | train | 10,488 | paramiko__paramiko.23f92003.func_basic__jnkflq07 | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | # SFTP symlink creation not working correctly
**Describe the bug**
When creating a symlink using the `symlink` method in the SFTP client, the link cannot be read properly. Attempting to read the symlink results in a "No such file" error.
**To Reproduce**
Steps to reproduce the behavior:
```python
import paramiko
# ... | diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py
index 066cd83..bc93297 100644
--- a/paramiko/sftp_client.py
+++ b/paramiko/sftp_client.py
@@ -520,10 +520,10 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
:param str source: path of the original file
:param str dest: path of the ne... | ["tests/test_sftp.py::TestSFTP::test_symlink"] | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 8 | 1 | 1,381 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256833 | 81.0455 | |||
6,427 | swe_smith::train::10103 | swe_smith | train | 10,103 | paramiko__paramiko.23f92003.combine_file__ed520qdv | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | BufferedPipe read_ready() method broken after recent changes
#### Description
The `read_ready()` method in `BufferedPipe` is not working correctly. It appears to be releasing a lock that was never acquired, causing runtime errors when trying to use channels and pipes.
#### Steps/Code to Reproduce
```python
import p... | diff --git a/paramiko/buffered_pipe.py b/paramiko/buffered_pipe.py
index c19279c..5e50818 100644
--- a/paramiko/buffered_pipe.py
+++ b/paramiko/buffered_pipe.py
@@ -67,15 +67,10 @@ class BufferedPipe:
self._lock.acquire()
try:
self._event = event
- # Make sure the event starts ... | ["tests/test_buffered_pipe.py::BufferedPipeTest::test_buffered_pipe", "tests/test_buffered_pipe.py::BufferedPipeTest::test_delay", "tests/test_client.py::SSHClientTest::test_auth_trickledown", "tests/test_client.py::SSHClientTest::test_certs_allowed_as_key_filename_values", "tests/test_client.py::SSHClientTest::test_ce... | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 26 | 40 | 1,021 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256833 | 81.0455 | |||
6,428 | swe_smith::train::38035 | swe_smith | train | 38,035 | weaveworks__grafanalib.5c3b17ed.combine_file__qxdunfb1 | swesmith/weaveworks__grafanalib.5c3b17ed | weaveworks/grafanalib | python | null | # Validators in grafanalib are not working correctly
## Bug summary
I've discovered that the validators in grafanalib are not working as expected. The `is_in` validator and `is_list_of` validator are both broken, causing unexpected behavior when validating inputs.
## Code for reproduction
```python
from grafanalib ... | diff --git a/grafanalib/validators.py b/grafanalib/validators.py
index e7c69a2..18349ff 100644
--- a/grafanalib/validators.py
+++ b/grafanalib/validators.py
@@ -7,7 +7,7 @@ class _IsInValidator(object):
choices = attr.attr()
def __call__(self, inst, attr, value):
- if value not in self.choices:
+ ... | ["grafanalib/tests/test_opentsdb.py::test_serialization_opentsdb_target", "grafanalib/tests/test_validators.py::test_is_in", "grafanalib/tests/test_validators.py::test_is_in_raises", "grafanalib/tests/test_validators.py::test_list_of", "grafanalib/tests/test_validators.py::test_list_of_raises"] | ["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_... | jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed | true | null | 1 | 8 | 5 | 1,381 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256833 | 81.0455 | |||
6,429 | swe_smith::train::23433 | swe_smith | train | 23,433 | pyparsing__pyparsing.533adf47.func_basic__1j284bob | swesmith/pyparsing__pyparsing.533adf47 | pyparsing/pyparsing | python | null | And.streamline() returns None instead of self
#### Description
The `And.streamline()` method is returning `None` instead of `self`, which breaks method chaining and causes various parsing operations to fail.
#### Steps/Code to Reproduce
```python
import pyparsing as pp
# Simple example that should work
word = pp.W... | diff --git a/pyparsing/core.py b/pyparsing/core.py
index 777165c..6690549 100644
--- a/pyparsing/core.py
+++ b/pyparsing/core.py
@@ -4070,11 +4070,10 @@ class And(ParseExpression):
self.callPreparse = True
def streamline(self) -> ParserElement:
- # collapse any _PendingSkip's
if self.exp... | ["tests/test_unit.py::Test02_WithoutPackrat::testDelimitedListName", "tests/test_unit.py::Test02_WithoutPackrat::testParseEBNF", "tests/test_unit.py::Test02_WithoutPackrat::testSkipToParserTests", "tests/test_unit.py::Test04_WithPackrat::testDelimitedListName", "tests/test_unit.py::Test04_WithPackrat::testParseEBNF", "... | ["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse... | jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47 | true | null | 1 | 22 | 18 | 1,101 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256833 | 81.0455 | |||
6,430 | swe_smith::train::12138 | swe_smith | train | 12,138 | lepture__mistune.bf54ef67.combine_file__y5zaf3o0 | swesmith/lepture__mistune.bf54ef67 | lepture/mistune | python | null | Table parsing broken with nptable format
#### Description
When parsing tables using the nptable format, the parser is producing incorrect output and throwing errors. The table headers and alignment information appear to be getting mixed up, causing the rendered tables to have wrong structure.
#### Steps/Code to Repr... | diff --git a/src/mistune/plugins/table.py b/src/mistune/plugins/table.py
index 39e81f9..f05c82e 100644
--- a/src/mistune/plugins/table.py
+++ b/src/mistune/plugins/table.py
@@ -70,11 +70,11 @@ def parse_table(
def parse_nptable(
block: "BlockParser", m: Match[str], state: "BlockState"
) -> Optional[int]:
- he... | ["tests/test_plugins.py::TestPlugin1_table::test_align_table_001", "tests/test_plugins.py::TestPlugin1_table::test_align_table_002", "tests/test_plugins.py::TestPlugin1_table::test_misc_table_001", "tests/test_plugins.py::TestPlugin1_table::test_misc_table_002", "tests/test_plugins.py::TestPlugin1_table::test_misc_tabl... | ["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx... | jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67 | true | null | 1 | 15 | 22 | 1,241 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256833 | 81.0455 | |||
6,431 | swe_smith::train::24601 | swe_smith | train | 24,601 | marshmallow-code__marshmallow.9716fc62.combine_module__ojvyn1at | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | Validation decorators and hooks not working correctly
I'm having issues with field validation and schema processing hooks. The `@validates` decorator seems to be looking for the wrong field name, and the `pass_many` parameter in processing hooks is behaving unexpectedly.
#### Steps/Code to Reproduce
```python
from m... | diff --git a/src/marshmallow/decorators.py b/src/marshmallow/decorators.py
index 965edb6..c439744 100644
--- a/src/marshmallow/decorators.py
+++ b/src/marshmallow/decorators.py
@@ -88,7 +88,7 @@ def validates(field_name: str) -> Callable[..., Any]:
:param str field_name: Name of the field that the method validat... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_many", "tests/test_decorators.py::TestValidatesDecorator::test_validates_decorator", "tests/test_decorators.py::TestValidatesDecorat... | ["tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorated_processor_returning_none[raise]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_single", "tests/test_de... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 2 | 12 | 16 | 1,301 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256833 | 81.0455 | |||
6,432 | swe_smith::train::219 | swe_smith | train | 219 | oauthlib__oauthlib.1fd52536.combine_module__5re4fog1 | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OpenID Connect grant type attribute access broken after recent changes
#### Description
After some recent changes, OpenID Connect grant types are failing to properly access attributes from their proxy targets. The `__getattr__` method seems to be appending an underscore to attribute names and the attribute proxying l... | diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py
index 29d583e..381e130 100644
--- a/oauthlib/openid/connect/core/grant_types/base.py
+++ b/oauthlib/openid/connect/core/grant_types/base.py
@@ -17,11 +17,14 @@ class GrantTypeBase:
# proxy_target grant ... | ["tests/oauth2/rfc6749/endpoints/test_metadata.py::MetadataEndpointTest::test_openid_oauth2_preconfigured", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_claims_stored_on_code_creation", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_inval... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 2 | 16 | 172 | 1,221 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256833 | 81.0455 | |||
6,433 | swe_smith::train::48260 | swe_smith | train | 48,260 | sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__tbhi2nry | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | TOML config loading broken due to code structure corruption
#### Description
When loading SQLFluff configuration from pyproject.toml files, the function fails with UnboundLocalError due to corrupted code structure in the TOML loading function.
#### Steps/Code to Reproduce
```python
from sqlfluff.core.config.loader ... | diff --git a/src/sqlfluff/core/config/toml.py b/src/sqlfluff/core/config/toml.py
index b814e0b..67e88cb 100644
--- a/src/sqlfluff/core/config/toml.py
+++ b/src/sqlfluff/core/config/toml.py
@@ -49,14 +49,20 @@ def _validate_structure(raw_config: Dict[str, Any]) -> ConfigMappingType:
def load_toml_file_config(filepa... | ["test/core/config/fluffconfig_test.py::test__config__nested_config_tests", "test/core/config/fluffconfig_test.py::test__config__glob_exclude_config_tests", "test/core/config/fluffconfig_test.py::test__config__glob_include_config_tests", "test/core/config/fluffconfig_test.py::test__config__rules_set_to_none", "test/cor... | ["test/core/config/fluffconfig_test.py::test__config__from_strings", "test/core/config/fluffconfig_test.py::test__config__templater_selection[raw-RawTemplater-False]", "test/core/config/fluffconfig_test.py::test__config__templater_selection[jinja-JinjaTemplater-False]", "test/core/config/fluffconfig_test.py::test__conf... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 32 | 10 | 900 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256667 | 81.045 | |||
6,434 | swe_smith::train::24844 | swe_smith | train | 24,844 | marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_invert_if__rsy6s6k2 | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | Nested field with callable schema breaks after recent changes
#### Description
When using a `Nested` field with a callable schema (like a lambda or function that returns a schema class), the field now raises a `TypeError` saying the schema object is not callable. This appears to be a regression that breaks existing c... | diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py
index e83ba19..f52a112 100644
--- a/src/marshmallow/fields.py
+++ b/src/marshmallow/fields.py
@@ -585,9 +585,9 @@ class Nested(Field):
# Inherit context from parent.
context = getattr(self.parent, "context", {})
if... | ["tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_invalid_data", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_schema_error", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_field_error", "tests/test_decorators.... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 9 | 71 | 1,360 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256667 | 81.045 | |||
6,435 | swe_smith::train::17242 | swe_smith | train | 17,242 | prettytable__prettytable.ca90b055.lm_rewrite__yapr3key | swesmith/prettytable__prettytable.ca90b055 | prettytable/prettytable | python | null | # custom_format property doesn't raise TypeError when set to invalid type
## Description
When setting the `custom_format` property to an invalid type (like a string), the code doesn't raise a TypeError as expected. This is a regression in the error handling for the `custom_format` property.
## Steps to reproduce
``... | diff --git a/src/prettytable/prettytable.py b/src/prettytable/prettytable.py
index 818a520..1fdf264 100644
--- a/src/prettytable/prettytable.py
+++ b/src/prettytable/prettytable.py
@@ -1102,20 +1102,20 @@ class PrettyTable:
@custom_format.setter
def custom_format(self, val):
- if val is None:
+ ... | ["tests/test_prettytable.py::TestCustomFormatter::test_set_custom_format_invalid_type_throw_error"] | ["tests/test_colortable.py::TestColorTable::test_themeless", "tests/test_colortable.py::TestColorTable::test_theme_setter", "tests/test_colortable.py::TestFormatCode::test_basic", "tests/test_colortable.py::TestFormatCode::test_prefix", "tests/test_colortable.py::TestFormatCode::test_escapes", "tests/test_colortable.py... | jyangballin/swesmith.x86_64.prettytable_1776_prettytable.ca90b055 | true | null | 1 | 20 | 1 | 1,140 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256667 | 81.045 | |||
6,436 | swe_smith::train::11041 | swe_smith | train | 11,041 | rsalmei__alive-progress.35853799.combine_module__bdijs6rq | swesmith/rsalmei__alive-progress.35853799 | rsalmei/alive-progress | python | null | # Boolean conversion in alive_progress breaks with non-integer values
### Steps to reproduce
```python
from alive_progress.core.configuration import _bool_input_factory
# Create a boolean input function
bool_func = _bool_input_factory()
# Try with different values
print(bool_func(False)) # Should be False
print(bo... | diff --git a/alive_progress/core/configuration.py b/alive_progress/core/configuration.py
index b36d671..d08a31f 100644
--- a/alive_progress/core/configuration.py
+++ b/alive_progress/core/configuration.py
@@ -81,7 +81,7 @@ def _float_input_factory(lower, upper):
def _bool_input_factory():
def _input(x):
- ... | ["tests/core/test_configuration.py::test_bool_input_factory[-False]", "tests/core/test_configuration.py::test_bool_input_factory[None-False]", "tests/core/test_configuration.py::test_bool_input_factory[asd-True]", "tests/core/test_configuration.py::test_config_global[config_params10]", "tests/core/test_configuration.py... | ["tests/animations/test_bars.py::test_bar_tip_background[--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[_-=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[-0.0-Fa... | jyangballin/swesmith.x86_64.rsalmei_1776_alive-progress.35853799 | true | null | 2 | 6 | 7 | 1,420 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256667 | 81.045 | |||
6,437 | swe_smith::train::5548 | swe_smith | train | 5,548 | PyCQA__flake8.cf1542ce.func_pm_ctrl_shuffle__fmdk45c3 | swesmith/PyCQA__flake8.cf1542ce | pycqa/flake8 | python | null | FileChecker initialization order causes AttributeError when processor is None
#### Description
When initializing a FileChecker instance, if the processor creation fails and returns None, accessing `self.processor` attributes before the processor is properly set causes an AttributeError.
#### Steps/Code to Reproduce
... | diff --git a/src/flake8/checker.py b/src/flake8/checker.py
index 329a2cc..ee80711 100644
--- a/src/flake8/checker.py
+++ b/src/flake8/checker.py
@@ -272,24 +272,23 @@ class FileChecker:
plugins: Checkers,
options: argparse.Namespace,
) -> None:
- """Initialize our file checker."""
- ... | ["tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_gen]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_list]", "tests/integration/test_c... | ["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_checker.py::test_report_order[results0-expected_order0]", "tests/integration/test_checker.py::test_report_order[results1-expected_order1]", "... | jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce | true | null | 1 | 17 | 38 | 1,200 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256667 | 81.045 | |||
6,438 | swe_smith::train::6587 | swe_smith | train | 6,587 | joke2k__faker.8b401a7d.combine_module__l4ifkoed | swesmith/joke2k__faker.8b401a7d | joke2k/faker | python | null | # Missing functionality in Latvian VAT ID and Norwegian SSN providers
## Description
I've discovered two issues with the Faker library:
1. The Latvian SSN provider is missing the `vat_id()` method implementation. The format is defined but the actual method is not available.
2. The Norwegian SSN provider has several... | diff --git a/faker/providers/ssn/lv_LV/__init__.py b/faker/providers/ssn/lv_LV/__init__.py
index 49e7d4a..c3e9822 100644
--- a/faker/providers/ssn/lv_LV/__init__.py
+++ b/faker/providers/ssn/lv_LV/__init__.py
@@ -55,12 +55,4 @@ class Provider(SsnProvider):
A Faker provider for the Latvian VAT IDs
"""
- v... | ["tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn", "tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn_dob_passed", "tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn_gender_passed", "tests/providers/test_ssn.py::TestNoNO::test_no_NO_ssn_invalid_gender_passed", "tests/providers/test_ssn.py::TestLvLV::test... | ["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi... | jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d | true | null | 2 | 17 | 5 | 1,200 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256667 | 81.045 | |||
6,439 | swe_smith::train::44355 | swe_smith | train | 44,355 | pydata__patsy.a5d16484.func_pm_ctrl_shuffle__xrf8dn3j | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | UnboundLocalError in cubic spline functionality when using variables before assignment
#### Description
When using cubic spline functions like `cr()`, `cc()`, or `te()`, an `UnboundLocalError` is raised due to variables being used before they are assigned in the `_get_natural_f` function.
#### Steps/Code to Reproduc... | diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py
index 5f93680..601ab70 100644
--- a/patsy/mgcv_cubic_splines.py
+++ b/patsy/mgcv_cubic_splines.py
@@ -35,25 +35,24 @@ def _get_natural_f(knots):
:raise ImportError: if scipy is not found, required for
``linalg.solve_banded()``
"""
- ... | ["patsy/mgcv_cubic_splines.py::test_crs_compat", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_1smooth", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths"] | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 19 | 5 | 1,160 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256667 | 81.045 | |||
6,440 | swe_smith::train::5189 | swe_smith | train | 5,189 | agronholm__exceptiongroup.0b4f4937.func_pm_remove_cond__yu4l8oy0 | swesmith/agronholm__exceptiongroup.0b4f4937 | agronholm/exceptiongroup | python | null | ExceptionGroup formatting breaks with AttributeError on __cause__ access
#### Description
When formatting exception tracebacks that involve ExceptionGroups, the code attempts to access the `__cause__` attribute on `PatchedTracebackException` objects, but this attribute doesn't exist, causing an `AttributeError`.
###... | diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py
index 4c52d77..d143b44 100644
--- a/src/exceptiongroup/_formatting.py
+++ b/src/exceptiongroup/_formatting.py
@@ -126,14 +126,6 @@ class PatchedTracebackException(traceback.TracebackException):
end_lno = exc_value.end_li... | ["tests/test_formatting.py::test_exceptionhook", "tests/test_formatting.py::test_exceptiongroup_as_cause", "tests/test_formatting.py::test_exceptiongroup_loop", "tests/test_formatting.py::test_exceptionhook_format_exception_only", "tests/test_formatting.py::test_formatting_syntax_error", "tests/test_formatting.py::test... | ["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio... | jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937 | true | null | 1 | 11 | 28 | 1,320 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256667 | 81.045 | |||
6,441 | swe_smith::train::2792 | swe_smith | train | 2,792 | pudo__dataset.5c2dc8d3.combine_file__emn854d9 | swesmith/pudo__dataset.5c2dc8d3 | pudo/dataset | python | null | # ChunkedInsert and ChunkedUpdate not working properly
## Description
After recent changes, the chunked insert and update functionality is broken. When using ChunkedInsert, no data is being inserted into the database, and when using ChunkedUpdate, it throws a TypeError.
## Steps to Reproduce
```python
import dataset... | diff --git a/dataset/chunked.py b/dataset/chunked.py
index a5ca158..6b4f886 100644
--- a/dataset/chunked.py
+++ b/dataset/chunked.py
@@ -26,6 +26,8 @@ class _Chunker(object):
return self
def __exit__(self, exc_type, exc_val, exc_tb):
+ if exc_type is None:
+ return
self.flush(... | ["test/test_dataset.py::TableTestCase::test_chunked_insert", "test/test_dataset.py::TableTestCase::test_chunked_insert_callback", "test/test_dataset.py::TableTestCase::test_chunked_update"] | ["test/test_dataset.py::DatabaseTestCase::test_contains", "test/test_dataset.py::DatabaseTestCase::test_create_table", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id1", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id2", "test/test_dataset.py::DatabaseTestCase::test_create_tabl... | jyangballin/swesmith.x86_64.pudo_1776_dataset.5c2dc8d3 | true | null | 1 | 8 | 3 | 1,379 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2565 | 81.0445 | |||
6,442 | swe_smith::train::4257 | swe_smith | train | 4,257 | pygments__pygments.27649ebb.func_pm_class_rm_funcs__bwiajnsq | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | LatexFormatter crashes with AttributeError when instantiated
#### Description
The LatexFormatter class fails to initialize properly, causing an AttributeError when trying to access formatter attributes.
#### Steps/Code to Reproduce
```python
from pygments.formatters import LatexFormatter
from pygments.lexers import... | diff --git a/pygments/formatters/latex.py b/pygments/formatters/latex.py
index 2f7971e..e8d202e 100644
--- a/pygments/formatters/latex.py
+++ b/pygments/formatters/latex.py
@@ -253,29 +253,6 @@ class LatexFormatter(Formatter):
aliases = ['latex', 'tex']
filenames = ['*.tex']
- def __init__(self, **option... | ["tests/test_cmdline.py::test_outfile", "tests/test_basic_api.py::test_formatter_public_api[LatexFormatter]", "tests/test_basic_api.py::test_formatter_unicode_handling[LatexFormatter]", "tests/test_terminal_formatter.py::test_others_work", "tests/test_latex_formatter.py::test_correct_output"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 24 | 5 | 1,059 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2565 | 81.0445 | |||
6,443 | swe_smith::train::7813 | swe_smith | train | 7,813 | cantools__cantools.0c6a7871.func_basic__xeatt347 | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | ARXML: "Cannot retrieve a child element of a non-existing node!" error when loading AUTOSAR 4.x files
#### Description
When loading AUTOSAR 4.x ARXML files, the system loader fails with the error `ARXML: "Cannot retrieve a child element of a non-existing node!"`. This appears to affect multiple AUTOSAR 4.x files and ... | diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py
index f7aa786..47f6395 100644
--- a/src/cantools/database/can/formats/arxml/system_loader.py
+++ b/src/cantools/database/can/formats/arxml/system_loader.py
@@ -1596,7 +1596,7 @@ class SystemL... | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_database.py::CanToolsDataba... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 22 | 10 | 1,099 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2565 | 81.0445 | |||
6,444 | swe_smith::train::42455 | swe_smith | train | 42,455 | vi3k6i5__flashtext.b316c7e9.func_pm_ctrl_shuffle__ath4kd3o | swesmith/vi3k6i5__flashtext.b316c7e9 | vi3k6i5/flashtext | python | null | # `get_all_keywords` method is broken and returns undefined variable
When trying to use the `get_all_keywords` method of the `KeywordProcessor` class, it fails with an undefined variable error.
## Steps to reproduce
```python
from flashtext import KeywordProcessor
keyword_processor = KeywordProcessor()
keyword_proc... | diff --git a/flashtext/keyword.py b/flashtext/keyword.py
index b5cb1d1..673248d 100644
--- a/flashtext/keyword.py
+++ b/flashtext/keyword.py
@@ -411,6 +411,18 @@ class KeywordProcessor(object):
self.remove_keyword(keyword)
def get_all_keywords(self, term_so_far='', current_dict=None):
+ for k... | ["test/test_kp_exceptions.py::TestKPExceptions::test_iterator_NotImplementedError", "test/test_kp_get_all_keywords.py::TestKPGetAllKeywords::test_get_all_keywords"] | ["test/test_dictionary_loading.py::TestDictionaryLoad::test_dictionary_loading", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_addition", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_deletion", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_subs... | jyangballin/swesmith.x86_64.vi3k6i5_1776_flashtext.b316c7e9 | true | null | 1 | 25 | 2 | 1,039 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2565 | 81.0445 | |||
6,445 | swe_smith::train::24961 | swe_smith | train | 24,961 | pylint-dev__astroid.b114f6b5.combine_file__1o8p7d23 | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Method call inference broken after recent changes
#### Description
After some recent changes, method calls are failing to infer properly. When trying to infer the result of method calls, I'm getting `AttributeError` exceptions instead of the expected inference results.
#### Steps/Code to Reproduce
```python
import ... | diff --git a/astroid/bases.py b/astroid/bases.py
index d91a4c9..4815f96 100644
--- a/astroid/bases.py
+++ b/astroid/bases.py
@@ -477,15 +477,12 @@ class UnboundMethod(Proxy):
to determine which class the method was called from
"""
- # If we're unbound method __new__ of a builtin, the result i... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_numerictypes.py::NumpyBrainCoreNumericTypesTest::test_datetime_astype_return", "tests/brain/numpy/test_core_umath.py::NumpyBrainCoreUmathTest::test_numpy_core_umath_functions_return_type", "tests/br... | ["tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 17 | 117 | 1,198 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256333 | 81.044 | |||
6,446 | swe_smith::train::9921 | swe_smith | train | 9,921 | matthewwithanm__python-markdownify.6258f5c3.func_pm_ctrl_shuffle__u8j5kocu | swesmith/matthewwithanm__python-markdownify.6258f5c3 | matthewwithanm/python-markdownify | python | null | # Code blocks in pre tags not working correctly
I'm having an issue with the `convert_pre` method in the `MarkdownConverter` class. It seems like the code is not executing in the correct order, causing errors when trying to convert HTML `<pre>` tags to markdown code blocks.
## Steps to Reproduce
Here's a simple exam... | diff --git a/markdownify/__init__.py b/markdownify/__init__.py
index 3272ce5..cbd1e71 100644
--- a/markdownify/__init__.py
+++ b/markdownify/__init__.py
@@ -413,15 +413,14 @@ class MarkdownConverter(object):
return '\n\n%s\n\n' % text if text else ''
def convert_pre(self, el, text, convert_as_inline):
-... | ["tests/test_conversions.py::test_pre", "tests/test_conversions.py::test_lang", "tests/test_conversions.py::test_lang_callback", "tests/test_conversions.py::test_spaces"] | ["tests/test_advanced.py::test_chomp", "tests/test_advanced.py::test_nested", "tests/test_advanced.py::test_ignore_comments", "tests/test_advanced.py::test_ignore_comments_with_other_tags", "tests/test_advanced.py::test_code_with_tricky_content", "tests/test_advanced.py::test_special_tags", "tests/test_args.py::test_st... | jyangballin/swesmith.x86_64.matthewwithanm_1776_python-markdownify.6258f5c3 | true | null | 1 | 11 | 4 | 1,318 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256333 | 81.044 | |||
6,447 | swe_smith::train::23846 | swe_smith | train | 23,846 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__c0owoj6j | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | Solar radius calculation causes infinite recursion when rsun_obs metadata is missing
#### Description
When a Map object is missing the `rsun_obs` metadata but has `_rsun_obs_no_default` set, accessing properties that depend on the solar radius causes infinite recursion. The code enters an endless loop between the `rs... | diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py
index bdcac77..086a58e 100644
--- a/sunpy/map/mapbase.py
+++ b/sunpy/map/mapbase.py
@@ -1209,14 +1209,13 @@ class GenericMap(NDData):
if rsun is not None:
return rsun * u.m
elif self._rsun_obs_no_default is not None:
- if... | ["sunpy/map/tests/test_mapbase.py::test_wcs_pv", "sunpy/map/tests/test_mapbase.py::test_dsun", "sunpy/map/tests/test_mapbase.py::test_rsun_meters", "sunpy/map/tests/test_mapbase.py::test_rsun_obs_without_rsun_ref", "sunpy/map/tests/test_mapbase.py::test_carrington_longitude", "sunpy/map/tests/test_mapbase.py::test_heli... | ["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 9 | 24 | 1,358 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256333 | 81.044 | |||
6,448 | swe_smith::train::24355 | swe_smith | train | 24,355 | sunpy__sunpy.f8edfd5c.func_pm_remove_loop__7z6makk4 | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | SRS reader fails with "no values provided to stack" error
#### Description
When trying to read SRS files using the SRS reader, it fails with a `ValueError: no values provided to stack.` error. This appears to affect multiple SRS files in the test suite.
#### Steps/Code to Reproduce
```python
from sunpy.io.special i... | diff --git a/sunpy/io/special/srs.py b/sunpy/io/special/srs.py
index bde7f94..34e0d48 100644
--- a/sunpy/io/special/srs.py
+++ b/sunpy/io/special/srs.py
@@ -45,38 +45,6 @@ def make_table(header, section_lines, supplementary_lines):
meta_data = get_meta_data(header, supplementary_lines)
tables = []
- for ... | ["sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150906SRS.txt-5]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150306SRS.txt-4]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150101SRS.txt-9]", "sunpy/io/tests/test_s... | ["sunpy/io/tests/test_srs.py::test_parse_longitude[N10W05-5]", "sunpy/io/tests/test_srs.py::test_parse_longitude[N89E00-0]", "sunpy/io/tests/test_srs.py::test_parse_longitude[S33E02--2]", "sunpy/io/tests/test_srs.py::test_parse_longitude[S01-None]", "sunpy/io/tests/test_srs.py::test_parse_latitude[N10W05-10]", "sunpy/i... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 33 | 12 | 877 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256167 | 81.0435 | |||
6,449 | swe_smith::train::17410 | swe_smith | train | 17,410 | pyasn1__pyasn1.0f07d724.combine_module__ahdm3ylh | swesmith/pyasn1__pyasn1.0f07d724 | pyasn1/pyasn1 | python | null | BER decoder and encoder parameter order swapped causing incorrect behavior
#### Description
The BER decoder and encoder are not working correctly due to parameter order issues. When using custom substrate functions with the decoder, the function receives parameters in the wrong order, and the encoder is returning err... | diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py
index 7e69ca1..e89cfb9 100644
--- a/pyasn1/codec/ber/decoder.py
+++ b/pyasn1/codec/ber/decoder.py
@@ -2119,11 +2119,11 @@ class Decoder(object):
substrate_bytes = substrate.read()
if length == -1:
length = len(substrat... | ["tests/codec/ber/test_decoder.py::BitStringDecoderTestCase::testDefModeChunkedSubstV04", "tests/codec/ber/test_decoder.py::BitStringDecoderTestCase::testIndefModeChunkedSubstV04", "tests/codec/ber/test_decoder.py::OctetStringDecoderTestCase::testDefModeChunkedSubstV04", "tests/codec/ber/test_decoder.py::OctetStringDec... | ["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d... | jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724 | true | null | 2 | 14 | 27 | 1,257 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256167 | 81.0435 | |||
6,450 | swe_smith::train::23899 | swe_smith | train | 23,899 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__ypzrcvxp | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | TimeSeries truncate method fails when passed TimeRange objects
#### Description
The `truncate` method in `GenericTimeSeries` is not working correctly when passed `TimeRange` objects. It appears the logic for handling `TimeRange` vs string/datetime arguments has been reversed, causing `TimeRange` objects to be treated... | diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py
index 80e5d20..9ee4c33 100644
--- a/sunpy/timeseries/timeseriesbase.py
+++ b/sunpy/timeseries/timeseriesbase.py
@@ -536,13 +536,13 @@ class GenericTimeSeries:
if isinstance(a, str) and isinstance(b, str):
a = Time... | ["sunpy/timeseries/tests/test_timeseriesbase.py::test_truncation_timerange", "sunpy/timeseries/tests/test_timeseriesbase.py::test_truncation_dates", "sunpy/timeseries/tests/test_timeseriesbase.py::test_truncated_none_ts", "sunpy/timeseries/tests/test_timeseriesbase.py::test_truncated_start_ts", "sunpy/timeseries/tests/... | ["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 9 | 7 | 1,357 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256167 | 81.0435 | |||
6,451 | swe_smith::train::31209 | swe_smith | train | 31,209 | scrapy__scrapy.35212ec5.combine_module__zug59u3f | swesmith/scrapy__scrapy.35212ec5 | scrapy/scrapy | python | null | genspider command fails with NameError when creating spiders
#### Description
The `scrapy genspider` command is broken and throws a `NameError` when trying to create new spiders. This affects all spider generation functionality.
#### Steps/Code to Reproduce
```bash
scrapy genspider myspider example.com
```
This sh... | diff --git a/scrapy/commands/__init__.py b/scrapy/commands/__init__.py
index 56199cc..2df3b67 100644
--- a/scrapy/commands/__init__.py
+++ b/scrapy/commands/__init__.py
@@ -202,18 +202,20 @@ class ScrapyHelpFormatter(argparse.HelpFormatter):
parts = self.format_part_strings(builtins.list(part_strings))
... | ["tests/test_commands.py::CommandSettings::test_help_formatter", "tests/test_commands.py::GenspiderCommandTest::test_arguments", "tests/test_commands.py::GenspiderCommandTest::test_genspider_basic_start_urls", "tests/test_commands.py::GenspiderCommandTest::test_genspider_crawl_start_urls", "tests/test_commands.py::Gens... | ["tests/test_commands.py::CommandSettings::test_settings_json_string", "tests/test_commands.py::StartprojectTest::test_existing_project_dir", "tests/test_commands.py::StartprojectTest::test_startproject", "tests/test_commands.py::StartprojectTest::test_startproject_with_project_dir", "tests/test_commands.py::Startproje... | jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5 | true | null | 2 | 32 | 19 | 897 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256167 | 81.0435 | |||
6,452 | swe_smith::train::38595 | swe_smith | train | 38,595 | erikrose__parsimonious.0d3f5f93.combine_file__k32iijif | swesmith/erikrose__parsimonious.0d3f5f93 | erikrose/parsimonious | python | null | # Grammar.match() and TokenGrammar parsing broken in latest version
## Description
After updating to the latest version, I'm experiencing issues with the `Grammar.match()` method and `TokenGrammar` parsing functionality. The code that was working fine before is now failing.
## Steps to Reproduce
### Grammar.match() ... | diff --git a/parsimonious/grammar.py b/parsimonious/grammar.py
index 367f27e..fa8f60c 100644
--- a/parsimonious/grammar.py
+++ b/parsimonious/grammar.py
@@ -119,7 +119,7 @@ class Grammar(OrderedDict):
"""
self._check_default_rule()
- return self.default_rule.match(text, pos=pos)
+ retu... | ["parsimonious/tests/test_grammar.py::GrammarTests::test_match", "parsimonious/tests/test_grammar.py::TokenGrammarTests::test_parse_failure", "parsimonious/tests/test_grammar.py::TokenGrammarTests::test_parse_success", "parsimonious/tests/test_grammar.py::TokenGrammarTests::test_token_star_plus_expressions", "parsimoni... | ["parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_call_vs_inline", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_lists_vs_dicts", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_startswith_vs_regex", "parsimonious/tests/test_expressions.py::LengthTests::test_not", "parsimonious/t... | jyangballin/swesmith.x86_64.erikrose_1776_parsimonious.0d3f5f93 | true | null | 1 | 6 | 5 | 1,417 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256167 | 81.0435 | |||
6,453 | swe_smith::train::24111 | swe_smith | train | 24,111 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__y899yv8q | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | XRSTimeSeries.observatory property returns None due to UnboundLocalError
#### Description
The `observatory` property in `XRSTimeSeries` is throwing an `UnboundLocalError` when trying to access the `id` variable. This happens because the code tries to check if `id` is None before the variable is actually defined.
###... | diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py
index 08e2a6a..7f9f6eb 100644
--- a/sunpy/timeseries/sources/goes.py
+++ b/sunpy/timeseries/sources/goes.py
@@ -106,16 +106,12 @@ class XRSTimeSeries(GenericTimeSeries):
@property
def observatory(self):
- """
- Re... | ["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc-GOES-13]", "sunpy/timeseries/sources/tests/test_go... | ["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/t... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 35 | 12 | 836 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256 | 81.043 | |||
6,454 | swe_smith::train::18185 | swe_smith | train | 18,185 | msiemens__tinydb.10644a0e.combine_file__agzvnwno | swesmith/msiemens__tinydb.10644a0e | msiemens/tinydb | python | null | Document operations not working correctly
I'm having issues with the document operations in TinyDB. The `delete`, `subtract`, `increment`, and `decrement` operations are not behaving as expected.
#### Steps/Code to Reproduce
```python
from tinydb import TinyDB
from tinydb.operations import delete, subtract, incremen... | diff --git a/tinydb/operations.py b/tinydb/operations.py
index 47c3492..92d8837 100644
--- a/tinydb/operations.py
+++ b/tinydb/operations.py
@@ -14,7 +14,7 @@ def delete(field):
Delete a given field from the document.
"""
def transform(doc):
- del doc[field]
+ del doc[0]
return trans... | ["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_subtract[memory]", "tests/test_operations.py::test_subtract[json]", "tests/test_operations.py::test_increment[memory]", "tests/test_operations.py::test_increment[json]", "tests/test_operation... | ["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle... | jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e | true | null | 1 | 8 | 8 | 1,376 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256 | 81.043 | |||
6,455 | swe_smith::train::24593 | swe_smith | train | 24,593 | marshmallow-code__marshmallow.9716fc62.combine_module__k2trt9uc | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | URL validation logic inverted - valid URLs rejected, invalid URLs accepted
#### Description
The URL validator is behaving in reverse - it's accepting invalid URLs and rejecting valid ones. When trying to validate URLs, the validator raises ValidationError for valid URLs and passes invalid ones through without error.
... | diff --git a/src/marshmallow/decorators.py b/src/marshmallow/decorators.py
index 965edb6..9f34615 100644
--- a/src/marshmallow/decorators.py
+++ b/src/marshmallow/decorators.py
@@ -138,7 +138,7 @@ def pre_dump(
.. versionchanged:: 3.0.0
``many`` is always passed as a keyword arguments to the decorated met... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_deserialization.py::TestFieldDeserialization::test_url_field_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_relative_url_field_deserialization", "test... | ["tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorated_processor_returning_none[raise]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_single", "tests/test_de... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 2 | 16 | 73 | 1,216 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256 | 81.043 | |||
6,456 | swe_smith::train::2015 | swe_smith | train | 2,015 | pdfminer__pdfminer.six.1a8bd2f7.combine_file__u0ldx57c | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | PSStackParser.pop() returns incorrect number of elements
When calling `pop(n)` on PSStackParser, the method returns `n+1` elements instead of the expected `n` elements due to an off-by-one error in the slicing operation.
#### Steps/Code to Reproduce
```python
from pdfminer.psparser import PSStackParser
# Create a p... | diff --git a/pdfminer/psparser.py b/pdfminer/psparser.py
index b486956..76d2355 100755
--- a/pdfminer/psparser.py
+++ b/pdfminer/psparser.py
@@ -449,25 +449,9 @@ class PSBaseParser:
self.oct += c
return i + 1
- elif self.oct:
- chrcode = int(self.oct, 8)
- assert... | ["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t... | ["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 26 | 77 | 1,016 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256 | 81.043 | |||
6,457 | swe_smith::train::27873 | swe_smith | train | 27,873 | jsvine__pdfplumber.02ff4313.func_pm_ctrl_shuffle__7soweniq | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | join_edge_group function broken due to code reordering
#### Description
The `join_edge_group` function in `pdfplumber/table.py` is not working properly. When trying to extract tables or perform edge operations, I'm getting `UnboundLocalError: local variable 'min_prop' referenced before assignment`.
#### Steps/Code t... | diff --git a/pdfplumber/table.py b/pdfplumber/table.py
index 0ba4445..aaa638f 100644
--- a/pdfplumber/table.py
+++ b/pdfplumber/table.py
@@ -39,19 +39,6 @@ def snap_edges(
def join_edge_group(
edges: T_obj_iter, orientation: str, tolerance: T_num = DEFAULT_JOIN_TOLERANCE
) -> T_obj_list:
- """
- Given a li... | ["tests/test_basics.py::Test::test_outside_bbox", "tests/test_ca_warn_report.py::Test::test_edge_merging", "tests/test_ca_warn_report.py::Test::test_parse", "tests/test_ca_warn_report.py::Test::test_vertices", "tests/test_dedupe_chars.py::Test::test_extract_table", "tests/test_display.py::Test::test_debug_tablefinder",... | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 27 | 22 | 996 | 0 | 0.6 | 1 | 0.75 | 1 | 0.256 | 81.043 | |||
6,458 | swe_smith::train::6860 | swe_smith | train | 6,860 | joke2k__faker.8b401a7d.lm_rewrite__hokp5dxp | swesmith/joke2k__faker.8b401a7d | joke2k/faker | python | null | ### Issue with License Plate Generation in de_AT Locale
#### Description
It seems there's an issue with generating license plates for the `de_AT` locale. The function responsible for creating these plates is encountering a problem when replacing placeholders in the license plate pattern. This results in a `TypeError`... | diff --git a/faker/providers/automotive/de_AT/__init__.py b/faker/providers/automotive/de_AT/__init__.py
index 184bc14..c7fe52e 100644
--- a/faker/providers/automotive/de_AT/__init__.py
+++ b/faker/providers/automotive/de_AT/__init__.py
@@ -159,19 +159,25 @@ class Provider(AutomotiveProvider):
"-%### ?",
... | ["tests/providers/test_automotive.py::TestDeAt::test_license_plate"] | ["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi... | jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d | true | null | 1 | 32 | 1 | 895 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255833 | 81.0425 | |||
6,459 | swe_smith::train::49031 | swe_smith | train | 49,031 | facebookresearch__hydra.0f03eb60.lm_rewrite__zohhhurh | swesmith/facebookresearch__hydra.0f03eb60 | facebookresearch/hydra | python | null | ### Description
The `cast_int` function in the Hydra grammar functions seems to be misbehaving when handling certain string inputs. Specifically, it appears to be incorrectly converting some string representations of numbers, leading to unexpected results.
### Expected behavior
The `cast_int` function should accurat... | diff --git a/hydra/_internal/grammar/grammar_functions.py b/hydra/_internal/grammar/grammar_functions.py
index 879b06b..c9cce68 100644
--- a/hydra/_internal/grammar/grammar_functions.py
+++ b/hydra/_internal/grammar/grammar_functions.py
@@ -82,7 +82,8 @@ def _normalize_cast_value(*args: CastType, value: Optional[CastTy... | ["tests/test_overrides_parser.py::test_cast_conversions['']", "tests/test_overrides_parser.py::test_cast_conversions['10.0']", "tests/test_overrides_parser.py::test_cast_conversions['true']", "tests/test_overrides_parser.py::test_cast_conversions['false']", "tests/test_overrides_parser.py::test_cast_conversions['[1,2,3... | ["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[... | jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60 | true | null | 1 | 6 | 12 | 1,415 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255833 | 81.0425 | |||
6,460 | swe_smith::train::20150 | swe_smith | train | 20,150 | kurtmckee__feedparser.cad965a3.lm_rewrite__ah1phjn6 | swesmith/kurtmckee__feedparser.cad965a3 | kurtmckee/feedparser | python | null | Namespace Handling Regression in StrictXMLParser
Hello,
I've encountered an issue with the latest changes in the `StrictXMLParser` class. It seems that the handling of XML namespaces has been altered, leading to unexpected behavior during parsing.
Here's a minimal example to reproduce the issue:
```python
from feed... | diff --git a/feedparser/parsers/strict.py b/feedparser/parsers/strict.py
index f00718f..73863d6 100644
--- a/feedparser/parsers/strict.py
+++ b/feedparser/parsers/strict.py
@@ -46,14 +46,12 @@ class StrictXMLParser:
return k, v
def startPrefixMapping(self, prefix, uri):
- if not uri:
- ... | ["tests/test_well_formed.py::test_strict_parser[info178]", "tests/test_well_formed.py::test_strict_parser[info95]", "tests/test_well_formed.py::test_strict_parser[info1297]", "tests/test_well_formed.py::test_strict_parser[info94]", "tests/test_well_formed.py::test_strict_parser[info223]", "tests/test_well_formed.py::te... | ["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te... | jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3 | true | null | 1 | 14 | 44 | 1,255 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255833 | 81.0425 | |||
6,461 | swe_smith::train::26841 | swe_smith | train | 26,841 | tkrajina__gpxpy.09fc46b3.func_basic__2pt38jdh | swesmith/tkrajina__gpxpy.09fc46b3 | tkrajina/gpxpy | python | null | GPX parsing fails with UTF-16 encoding when using lxml
#### Description
When parsing GPX files with lxml backend, the parser incorrectly uses UTF-16 encoding instead of UTF-8, causing parsing failures and data corruption.
#### Steps/Code to Reproduce
```python
import gpxpy
# Simple GPX content that should parse co... | diff --git a/gpxpy/parser.py b/gpxpy/parser.py
index ea3b31a..6e5aa3d 100644
--- a/gpxpy/parser.py
+++ b/gpxpy/parser.py
@@ -106,7 +106,7 @@ class GPXParser:
prefix, _, URI = namespace[6:].partition('=')
prefix = prefix.lstrip(':')
if prefix == '':
- prefix = 'defau... | ["test.py::GPXTests::test_simple_parse_function_invalid_root_tag", "test.py::GPXTests::test_speed"] | ["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a... | jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3 | true | null | 1 | 26 | 2 | 1,015 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255833 | 81.0425 | |||
6,462 | swe_smith::train::36487 | swe_smith | train | 36,487 | lincolnloop__python-qrcode.456b01d4.combine_file__u7crt5qd | swesmith/lincolnloop__python-qrcode.456b01d4 | lincolnloop/python-qrcode | python | null | QR code generation broken - wrong version selection and fit logic inverted
When creating QR codes, the version selection and fit logic appears to be completely broken. Simple QR codes that should work with version 1 are now requiring version 27, and the fit parameter behavior is inverted.
#### Steps to Reproduce
```... | diff --git a/qrcode/main.py b/qrcode/main.py
index 46116b5..81e7d32 100644
--- a/qrcode/main.py
+++ b/qrcode/main.py
@@ -155,12 +155,12 @@ class QRCode(Generic[GenericImage]):
:param fit: If ``True`` (or if a size has not been provided), find the
best fit for the data to avoid data overflow errors... | ["qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qrcode/tests/test_qrcode.py::test_mode_alpha", "qrcode/tests/test_qrcode.py::test_mode_8bit", "qrcode/tests/test_qrcode.py::test_optimize",... | ["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_add_qrdata", "qrcode/tests/test_qrcode.py::test_regression_mode_comma", "qrcode/tests/test... | jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4 | true | null | 1 | 22 | 9 | 1,094 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255667 | 81.042 | |||
6,463 | swe_bench::test::12 | swe_bench | test | 12 | astropy__astropy-13068 | astropy/astropy | astropy/astropy | python | 2288ecd4e9c4d3722d72b7f4a6555a34f4f04fc7 | Time from astropy.time not precise
Hello,
I encounter difficulties with Time. I'm working on a package to perform photometry and occultation.
For this last case, data need times values accurately estimated. Of course, data coming from different camera will will have different time format in the header.
to manage thi... | Welcome to Astropy 👋 and thank you for your first issue!
A project member will respond to you as soon as possible; in the meantime, please double-check the [guidelines for submitting issues](https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md#reporting-issues) and make sure you've provided the requested deta... | diff --git a/astropy/time/core.py b/astropy/time/core.py
--- a/astropy/time/core.py
+++ b/astropy/time/core.py
@@ -655,9 +655,6 @@ def precision(self):
@precision.setter
def precision(self, val):
del self.cache
- if not isinstance(val, int) or val < 0 or val > 9:
- raise ValueError(... | diff --git a/astropy/time/tests/test_basic.py b/astropy/time/tests/test_basic.py
--- a/astropy/time/tests/test_basic.py
+++ b/astropy/time/tests/test_basic.py
@@ -259,6 +259,20 @@ def test_precision(self):
assert t.iso == '2010-01-01 00:00:00.000000000'
assert t.tai.utc.iso == '2010-01-01 00:00:00.000... | ["astropy/time/tests/test_basic.py::TestBasic::test_precision_input"] | ["astropy/time/tests/test_basic.py::TestBasic::test_different_dimensions", "astropy/time/tests/test_basic.py::TestBasic::test_empty_value[jd]", "astropy/time/tests/test_basic.py::TestBasic::test_empty_value[mjd]", "astropy/time/tests/test_basic.py::TestBasic::test_empty_value[decimalyear]", "astropy/time/tests/test_bas... | null | true | 2022-04-05T19:35:35Z | 2 | 15 | 1 | 1,033 | 0 | 0.8 | 1 | 0.55 | 1 | 0.222167 | 81.0415 | |
6,464 | swe_smith::train::35112 | swe_smith | train | 35,112 | django__daphne.32ac73e1.func_basic__kgpebllj | swesmith/django__daphne.32ac73e1 | django/daphne | python | null | # Exception objects are being converted to strings in TestApplication.store_exception
## Description
When an exception is raised in the TestApplication, it's being converted to a string before being stored in the result file. This breaks functionality that depends on the actual exception object.
I found this issue w... | diff --git a/daphne/testing.py b/daphne/testing.py
index 785edf9..0ff8fda 100644
--- a/daphne/testing.py
+++ b/daphne/testing.py
@@ -256,8 +256,11 @@ class TestApplication:
Saves details of what happened to the result storage.
We could use pickle here, but that seems wrong, still, somehow.
""... | ["tests/test_http_response.py::TestHTTPResponse::test_headers_type", "tests/test_http_response.py::TestHTTPResponse::test_status_code_required"] | ["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding... | jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1 | true | null | 1 | 7 | 2 | 1,393 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2555 | 81.0415 | |||
6,465 | swe_smith::train::38883 | swe_smith | train | 38,883 | pallets__jinja.ada0a9a6.func_basic__7duhf8bc | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | Template debug_info property returns incorrect format after recent changes
#### Description
The `debug_info` property on Template objects is returning data in an unexpected format. When accessing `template.debug_info`, it now returns `[(-1, -1)]` instead of an empty list when no debug information is available, and wh... | diff --git a/src/jinja2/environment.py b/src/jinja2/environment.py
index 0b303d5..7edb279 100644
--- a/src/jinja2/environment.py
+++ b/src/jinja2/environment.py
@@ -1499,11 +1499,11 @@ class Template:
"""The debug info mapping."""
if self._debug_info:
return [
- tuple(map(i... | ["tests/test_api.py::TestExtendedAPI::test_sandbox_max_range", "tests/test_api.py::TestUndefined::test_stopiteration_is_undefined", "tests/test_api.py::TestUndefined::test_logging_undefined", "tests/test_api.py::TestUndefined::test_default_undefined", "tests/test_api.py::TestUndefined::test_chainable_undefined", "tests... | ["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",... | jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6 | true | null | 1 | 6 | 48 | 1,412 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255333 | 81.041 | |||
6,466 | swe_smith::train::21838 | swe_smith | train | 21,838 | life4__textdistance.c3aca916.combine_module__lgb9ntaq | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | Cosine similarity returns incorrect results due to variable reference error
#### Description
The Cosine similarity algorithm is producing incorrect results and throwing errors. When calculating cosine similarity between strings, the function references an undefined variable `intersection` and attempts operations on v... | diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py
index 5ce8cc7..9ef3104 100644
--- a/textdistance/algorithms/base.py
+++ b/textdistance/algorithms/base.py
@@ -145,9 +145,9 @@ class Base:
return intersection
def _union_counters(self, *sequences: Counter[T]) -> Counter[T]:
- ... | ["tests/test_common.py::test_normalization_range[alg10]", "tests/test_common.py::test_normalization_range[alg14]", "tests/test_common.py::test_normalization_by_one[alg10]", "tests/test_common.py::test_normalization_by_one[alg14]", "tests/test_common.py::test_normalization_same[alg14]", "tests/test_common.py::test_norma... | ["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati... | jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916 | true | null | 2 | 17 | 18 | 1,192 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255333 | 81.041 | |||
6,467 | swe_smith::train::49116 | swe_smith | train | 49,116 | mozilla__bleach.73871d76.combine_file__fas0m1kq | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | URL parsing fails with TypeError when mixing str and non-str arguments
#### Description
When using bleach's URL parsing functionality, certain URL inputs cause a `TypeError: Cannot mix str and non-str arguments` error. This affects URL cleaning and validation operations.
#### Steps/Code to Reproduce
```python
impor... | diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py
index ac6e7a9..cccc25e 100644
--- a/bleach/_vendor/parse.py
+++ b/bleach/_vendor/parse.py
@@ -110,18 +110,11 @@ def _decode_args(args, encoding=_implicit_encoding,
return tuple(x.decode(encoding, errors) if x else '' for x in args)
def _coerce_args(... | ["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::test_attributes_wildcard", "tests/test_clean.p... | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 21 | 25 | 1,112 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255333 | 81.041 | |||
6,468 | swe_smith::train::23892 | swe_smith | train | 23,892 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__w4b7lu2f | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | Header helper function incorrectly handles unit and observer logic
#### Description
When using `make_fitswcs_header` with data that has units or coordinates with observers, the function is incorrectly handling the conditional logic for unit assignment and observer distance calculation. This causes `AttributeError` wh... | diff --git a/sunpy/map/header_helper.py b/sunpy/map/header_helper.py
index 4b12bc6..7b23ae7 100644
--- a/sunpy/map/header_helper.py
+++ b/sunpy/map/header_helper.py
@@ -109,9 +109,9 @@ def make_fitswcs_header(data,
if hasattr(data, "unit"):
if unit is None:
- unit = data.unit
- else:
... | ["sunpy/map/tests/test_header_helper.py::test_scale_conversion", "sunpy/map/tests/test_header_helper.py::test_default_rotation", "sunpy/map/tests/test_header_helper.py::test_rotation_angle", "sunpy/map/tests/test_header_helper.py::test_rotation_angle_rectangular_pixels", "sunpy/map/tests/test_header_helper.py::test_rot... | ["sunpy/map/tests/test_header_helper.py::test_hgs_header", "sunpy/map/tests/test_header_helper.py::test_make_heliographic_header[CAR-shape0-stonyhurst]", "sunpy/map/tests/test_header_helper.py::test_make_heliographic_header[CAR-shape1-stonyhurst]", "sunpy/map/tests/test_header_helper.py::test_make_heliographic_header[C... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 9 | 16 | 1,352 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255333 | 81.041 | |||
6,469 | swe_smith::train::12853 | swe_smith | train | 12,853 | python-openxml__python-docx.0cf6d71f.combine_file__hpmutdfq | swesmith/python-openxml__python-docx.0cf6d71f | python-openxml/python-docx | python | null | InlineShapes indexing and type detection broken
#### Description
The InlineShapes collection has several issues with indexing and shape type detection that break basic functionality.
#### Steps/Code to Reproduce
```python
from docx import Document
# Create a document with inline shapes
doc = Document()
paragraph =... | diff --git a/src/docx/shape.py b/src/docx/shape.py
index cd35deb..2e4e5d5 100644
--- a/src/docx/shape.py
+++ b/src/docx/shape.py
@@ -28,18 +28,18 @@ class InlineShapes(Parented):
def __getitem__(self, idx: int):
"""Provide indexed access, e.g. 'inline_shapes[idx]'."""
try:
- inline = s... | ["tests/test_shape.py::DescribeInlineShapes::it_knows_how_many_inline_shapes_it_contains", "tests/test_shape.py::DescribeInlineShapes::it_provides_indexed_access_to_inline_shapes", "tests/test_shape.py::DescribeInlineShapes::it_raises_on_indexed_access_out_of_range", "tests/test_shape.py::DescribeInlineShape::it_knows_... | ["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows... | jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f | true | null | 1 | 16 | 4 | 1,212 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255333 | 81.041 | |||
6,470 | swe_smith::train::28753 | swe_smith | train | 28,753 | encode__starlette.db5063c2.func_pm_class_rm_funcs__9xv1fd5b | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | StaticFiles with packages parameter raises AttributeError
#### Description
When trying to use StaticFiles with the `packages` parameter, an AttributeError is raised because the `get_directories` method has been removed but is still being called internally.
#### Steps/Code to Reproduce
```python
from starlette.stati... | diff --git a/starlette/staticfiles.py b/starlette/staticfiles.py
index 746e740..68ea6b9 100644
--- a/starlette/staticfiles.py
+++ b/starlette/staticfiles.py
@@ -55,35 +55,6 @@ class StaticFiles:
if check_dir and directory is not None and not os.path.isdir(directory):
raise RuntimeError(f"Directory... | ["tests/test_applications.py::test_app_mount[asyncio]", "tests/test_applications.py::test_app_mount[trio]", "tests/test_staticfiles.py::test_staticfiles[asyncio]", "tests/test_staticfiles.py::test_staticfiles_with_pathlib[asyncio]", "tests/test_staticfiles.py::test_staticfiles_head_with_middleware[asyncio]", "tests/tes... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 31 | 56 | 912 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255333 | 81.041 | |||
6,471 | r2e_gym::train::4310 | r2e_gym | train | 4,310 | numpy__a87168023f0e99e2481c62855f2e14f4653a1a46 | numpy | numpy/numpy | python | a87168023f0e99e2481c62855f2e14f4653a1a46 | **Analysis:**
- **Key Changes:** The commit modifies the `isposinf` and `isneginf` functions to raise a `TypeError` instead of a `ValueError` when complex values are passed.
- **Test Results:** Previously, passing complex values caused a `ValueError`, leading to test failures. After the commit, the tests pass because ... | diff --git a/numpy/lib/ufunclike.py b/numpy/lib/ufunclike.py
--- a/numpy/lib/ufunclike.py
+++ b/numpy/lib/ufunclike.py
@@ -141,8 +141,8 @@
"""
x = nx.asanyarray(x)
if nx.issubdtype(x.dtype, nx.complexfloating):
- raise ValueError('This operation is not supported for complex values'
- ... | diff --git a/numpy/lib/tests/test_ufunclike.py b/numpy/lib/tests/test_ufunclike.py
--- a/numpy/lib/tests/test_ufunclike.py
+++ b/numpy/lib/tests/test_ufunclike.py
@@ -22,7 +22,7 @@
assert_equal(out, tgt)
a = a.astype(np.complex)
- with assert_raises(ValueError):
+ with assert_raises(Ty... | null | null | namanjain12/numpy_final:a87168023f0e99e2481c62855f2e14f4653a1a46 | true | null | 1 | 8 | null | 2,084 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.374 | 81.04075 | ||
6,472 | swe_smith::train::1792 | swe_smith | train | 1,792 | agronholm__typeguard.b6a7e438.func_basic__mukkptnn | swesmith/agronholm__typeguard.b6a7e438 | agronholm/typeguard | python | null | Assignment statements not being type checked properly
#### Description
When using typeguard with assignment statements, the type checking appears to be broken. Simple variable assignments and tuple unpacking assignments are not working as expected.
#### Steps/Code to Reproduce
```python
from typeguard import typech... | diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py
index 25696a5..24ea41c 100644
--- a/src/typeguard/_transformer.py
+++ b/src/typeguard/_transformer.py
@@ -1048,9 +1048,9 @@ class TypeguardTransformer(NodeTransformer):
check_required = False
for target in node.targets:... | ["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_transformer.py::test_avoid_global_names", "tests/test_transformer.py::test_avoid_local_names", "tests/test_transformer.py::test_avoid_nonlocal_names", "tests/test_transformer.py::TestAssign::test_vararg... | ["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v... | jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438 | true | null | 1 | 16 | 49 | 1,211 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255167 | 81.0405 | |||
6,473 | swe_smith::train::35762 | swe_smith | train | 35,762 | stanfordnlp__dspy.651a4c71.func_pm_remove_cond__gq7jki4j | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | Python Interpreter doesn't handle errors properly when executing code
Description
I found an issue with the PythonInterpreter class where it doesn't properly handle errors that occur during code execution. When an error occurs in the sandbox, the error information is not being processed correctly.
Here's a simple re... | diff --git a/dspy/primitives/python_interpreter.py b/dspy/primitives/python_interpreter.py
index 7cb63bf..57cf0b5 100644
--- a/dspy/primitives/python_interpreter.py
+++ b/dspy/primitives/python_interpreter.py
@@ -117,18 +117,9 @@ class PythonInterpreter:
if "error" in result:
error_msg = result["e... | ["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"] | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 9 | 4 | 1,351 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255167 | 81.0405 | |||
6,474 | swe_smith::train::26339 | swe_smith | train | 26,339 | pylint-dev__astroid.b114f6b5.func_pm_remove_assign__325mlgot | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Dataclass __init__ generation broken with UnboundLocalError
#### Description
When using dataclasses, the generated `__init__` method fails with `UnboundLocalError` for various local variables that are referenced before assignment.
#### Steps/Code to Reproduce
```python
from dataclasses import dataclass
@dataclass
... | diff --git a/astroid/brain/brain_dataclasses.py b/astroid/brain/brain_dataclasses.py
index 92d983e..2f28650 100644
--- a/astroid/brain/brain_dataclasses.py
+++ b/astroid/brain/brain_dataclasses.py
@@ -248,8 +248,6 @@ def _generate_dataclass_init(
kw_only_params: list[str] = []
assignments: list[str] = []
- ... | ["tests/brain/test_builtin.py::TestStringNodes::test_string_format_in_dataclass_pylint8109", "tests/brain/test_dataclasses.py::test_inference_attribute_no_default[dataclasses]", "tests/brain/test_dataclasses.py::test_inference_attribute_no_default[pydantic.dataclasses]", "tests/brain/test_dataclasses.py::test_inference... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 24 | 79 | 1,050 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255 | 81.04 | |||
6,475 | swe_smith::train::29684 | swe_smith | train | 29,684 | cookiecutter__cookiecutter.b4451231.lm_rewrite__eu4vqp7f | swesmith/cookiecutter__cookiecutter.b4451231 | cookiecutter/cookiecutter | python | null | ### Issue: Context Manager Not Functioning as Expected
#### Problem
It seems that the `work_in` context manager is not behaving as expected. When attempting to use it, a `TypeError` is raised, indicating that the object is not an iterator. This issue is causing several functionalities to fail, particularly those that... | diff --git a/cookiecutter/utils.py b/cookiecutter/utils.py
index 989b0c9..da2fb3f 100644
--- a/cookiecutter/utils.py
+++ b/cookiecutter/utils.py
@@ -53,19 +53,19 @@ def make_sure_path_exists(path: Path | str) -> None:
@contextlib.contextmanager
-def work_in(dirname: Path | str | None = None) -> Iterator[None]:
+@c... | ["tests/replay/test_replay.py::test_main_does_not_invoke_dump_but_load", "tests/replay/test_replay.py::test_main_does_not_invoke_load_but_dump", "tests/test_abort_generate_on_hook_error.py::test_hooks_raises_errors[pre_gen_hook_raises_error]", "tests/test_abort_generate_on_hook_error.py::test_hooks_raises_errors[post_g... | ["tests/replay/test_dump.py::test_value_error_if_key_missing_in_context", "tests/replay/test_dump.py::test_ioerror_if_replay_dir_creation_fails", "tests/replay/test_dump.py::test_run_json_dump", "tests/replay/test_load.py::test_value_error_if_key_missing_in_context", "tests/replay/test_load.py::test_io_error_if_no_repl... | jyangballin/swesmith.x86_64.cookiecutter_1776_cookiecutter.b4451231 | true | null | 1 | 8 | 89 | 1,370 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255 | 81.04 | |||
6,476 | swe_smith::train::42292 | swe_smith | train | 42,292 | scanny__python-pptx.278b47b1.lm_rewrite__4jscd9mu | swesmith/scanny__python-pptx.278b47b1 | scanny/python-pptx | python | null | # Slides.index() method fails to find slides with same content but different instances
### Steps to reproduce
```python
from pptx import Presentation
# Create a presentation with a slide
prs = Presentation()
slide1 = prs.slides.add_slide(prs.slide_layouts[0])
# Create a copy of the slide (same content, different in... | diff --git a/src/pptx/slide.py b/src/pptx/slide.py
index 3b1b65d..2f86481 100644
--- a/src/pptx/slide.py
+++ b/src/pptx/slide.py
@@ -282,16 +282,15 @@ class Slides(ParentedElementProxy):
return default
return slide
- def index(self, slide: Slide) -> int:
+ def index(self, slide: Slide) ->i... | ["tests/test_slide.py::DescribeSlides::it_knows_the_index_of_a_slide_it_contains[0]", "tests/test_slide.py::DescribeSlides::it_knows_the_index_of_a_slide_it_contains[1]"] | ["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr... | jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1 | true | null | 1 | 7 | 2 | 1,390 | 0 | 0.6 | 1 | 0.75 | 1 | 0.255 | 81.04 | |||
6,477 | swe_smith::train::19092 | swe_smith | train | 19,092 | seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__ei6g5xfw | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | DeepDiff crashes with UnboundLocalError when using ignore_order
#### Description
When using DeepDiff with `ignore_order=True`, the comparison fails with an `UnboundLocalError: local variable 'other' referenced before assignment`. This appears to affect various scenarios involving list comparisons with ignore_order en... | diff --git a/deepdiff/diff.py b/deepdiff/diff.py
index 76f186b..337307c 100755
--- a/deepdiff/diff.py
+++ b/deepdiff/diff.py
@@ -1302,17 +1302,7 @@ class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base):
pairs = dict_()
def get_other_pair(hash_value, in_t1=True):
- """
- ... | ["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_do_not_overlap", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_comm... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_command.py::TestCommands::test... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 25 | 88 | 1,029 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254833 | 81.0395 | |||
6,478 | swe_smith::train::38211 | swe_smith | train | 38,211 | john-kurkowski__tldextract.3d1bf184.func_basic__hxyk7xwx | swesmith/john-kurkowski__tldextract.3d1bf184 | john-kurkowski/tldextract | python | null | # FileNotFoundError when clearing cache in parallel processes
## Description
When running tldextract in parallel processes, I'm encountering a `FileNotFoundError` when one process tries to clear the cache while another process has already deleted the cache files.
## Steps to Reproduce
```python
import os
import mul... | diff --git a/tldextract/cache.py b/tldextract/cache.py
index 83a87f0..f6d627e 100644
--- a/tldextract/cache.py
+++ b/tldextract/cache.py
@@ -143,11 +143,9 @@ class DiskCache:
try:
os.unlink(str(Path(root, filename)))
except FileNotFoundError:
- ... | ["tests/test_parallel.py::test_cache_cleared_by_other_process"] | ["tests/cli_test.py::test_cli_no_input", "tests/cli_test.py::test_cli_parses_args", "tests/cli_test.py::test_cli_posargs", "tests/cli_test.py::test_cli_namedargs", "tests/cli_test.py::test_cli_json_output", "tests/custom_suffix_test.py::test_private_extraction", "tests/custom_suffix_test.py::test_suffix_which_is_not_in... | jyangballin/swesmith.x86_64.john-kurkowski_1776_tldextract.3d1bf184 | true | null | 1 | 6 | 1 | 1,409 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254833 | 81.0395 | |||
6,479 | swe_smith::train::5100 | swe_smith | train | 5,100 | agronholm__exceptiongroup.0b4f4937.combine_module__fi1lrok7 | swesmith/agronholm__exceptiongroup.0b4f4937 | agronholm/exceptiongroup | python | null | Exception formatting broken with generator objects
#### Description
When using the exceptiongroup library, exception formatting fails with a `TypeError: 'generator' object is not reversible` error. This happens during exception handling and prevents proper error reporting.
#### Steps/Code to Reproduce
```python
fro... | diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py
index a4a7ace..bc6110a 100644
--- a/src/exceptiongroup/_exceptions.py
+++ b/src/exceptiongroup/_exceptions.py
@@ -98,15 +98,15 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]):
return instance
def a... | ["tests/test_exceptions.py::ExceptionGroupFields::test_derive_doesn_copy_notes", "tests/test_exceptions.py::ExceptionGroupFields::test_notes_is_list_of_strings_if_it_exists", "tests/test_exceptions.py::NestedExceptionGroupSplitTest::test_split_by_type", "tests/test_exceptions.py::NestedExceptionGroupSubclassSplitTest::... | ["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio... | jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937 | true | null | 2 | 18 | 35 | 1,169 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254833 | 81.0395 | |||
6,480 | swe_smith::train::39609 | swe_smith | train | 39,609 | pallets__jinja.ada0a9a6.lm_rewrite__mmlsizj4 | swesmith/pallets__jinja.ada0a9a6 | pallets/jinja | python | null | ### RecursionError when accessing undefined attributes
#### Description
Encountering a `RecursionError` when trying to access undefined attributes in templates. This seems to occur when using the `Undefined` class in Jinja2, particularly when dealing with attributes that are not explicitly defined.
#### Steps to Rep... | diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py
index 9dcc9d4..a226e72 100644
--- a/src/jinja2/runtime.py
+++ b/src/jinja2/runtime.py
@@ -858,11 +858,14 @@ class Undefined:
@internalcode
def __getattr__(self, name: str) -> t.Any:
- if name[:2] == "__":
+ if name[:2] == "__" and name... | ["tests/test_api.py::TestUndefined::test_stopiteration_is_undefined", "tests/test_api.py::TestUndefined::test_undefined_attribute_error", "tests/test_api.py::TestUndefined::test_logging_undefined", "tests/test_api.py::TestUndefined::test_default_undefined", "tests/test_api.py::TestUndefined::test_debug_undefined", "tes... | ["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",... | jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6 | true | null | 1 | 11 | 15 | 1,309 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254833 | 81.0395 | |||
6,481 | r2e_gym::train::5002 | r2e_gym | train | 5,002 | datalad__20de96ceb109c218d97a86af8aa026ccc6dc1117 | datalad | datalad/datalad | python | 20de96ceb109c218d97a86af8aa026ccc6dc1117 | **Analysis:**
- **Key Parts:**
- **Commit Purpose:** Exposes `action_summary` to custom summary methods to avoid redundancy and improve efficiency.
- **Test Results:** Previously, the `test_custom_result_summary_renderer` failed with an `IndexError` because the custom renderer didn't receive the expected second ar... | diff --git a/datalad/interface/utils.py b/datalad/interface/utils.py
--- a/datalad/interface/utils.py
+++ b/datalad/interface/utils.py
@@ -388,6 +388,9 @@
results = []
do_custom_result_summary = result_renderer in ('tailored', 'default') \
and hasattr(wrapped_class, 'custom_re... | diff --git a/datalad/interface/tests/test_utils.py b/datalad/interface/tests/test_utils.py
--- a/datalad/interface/tests/test_utils.py
+++ b/datalad/interface/tests/test_utils.py
@@ -528,12 +528,23 @@
message="message", x=x, logger=lgr)
@staticmethod
- def custom_result_summ... | null | null | namanjain12/datalad_final:20de96ceb109c218d97a86af8aa026ccc6dc1117 | true | null | 1 | 9 | null | 2,061 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3735 | 81.03925 | ||
6,482 | swe_smith::train::2960 | swe_smith | train | 2,960 | madzak__python-json-logger.5f85723f.pr_164 | swesmith/madzak__python-json-logger.5f85723f | madzak/python-json-logger | python | null | ### [Bug]: NameError when using JsonFormatter with optional parameters
#### Bug summary
Encountering a `NameError` when attempting to use the `JsonFormatter` with optional parameters in the `merge_record_extra` function. This issue arises when the `rename_fields` parameter is not explicitly provided.
#### Steps to r... | diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py
index 519a64d..cadac25 100644
--- a/src/pythonjsonlogger/jsonlogger.py
+++ b/src/pythonjsonlogger/jsonlogger.py
@@ -8,7 +8,7 @@ import re
import traceback
import importlib
from datetime import date, datetime, time, timezone
-from ty... | ["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg... | [] | jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f | true | null | 1 | 14 | 20 | 1,248 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254667 | 81.039 | |||
6,483 | swe_smith::train::2991 | swe_smith | train | 2,991 | Suor__funcy.207a7810.combine_file__hrj9q0oi | swesmith/Suor__funcy.207a7810 | suor/funcy | python | null | Debug decorators broken after recent changes
#### Description
The debug decorators in `funcy.debug` are not working correctly. When using `log_errors`, `print_errors`, and `log_durations`, they produce unexpected behavior including wrong error message formats, incorrect duration calculations, and broken parameter han... | diff --git a/funcy/debug.py b/funcy/debug.py
index 62ef1bc..5de6e8e 100644
--- a/funcy/debug.py
+++ b/funcy/debug.py
@@ -100,10 +100,10 @@ class LabeledContextDecorator(object):
self.repr_len = repr_len
def __call__(self, label=None, **kwargs):
- if callable(label):
+ if not callable(label... | ["tests/test_debug.py::test_log_errors", "tests/test_debug.py::test_log_errors_manager", "tests/test_debug.py::test_print_errors", "tests/test_debug.py::test_print_errors_manager", "tests/test_debug.py::test_print_errors_recursion", "tests/test_debug.py::test_log_durations", "tests/test_debug.py::test_log_durations_ex"... | ["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_cal... | jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810 | true | null | 1 | 16 | 7 | 1,208 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254667 | 81.039 | |||
6,484 | swe_smith::train::24636 | swe_smith | train | 24,636 | marshmallow-code__marshmallow.9716fc62.func_basic__48efxezd | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | # Incorrect behavior when accessing version attributes
When accessing the version attributes of marshmallow, there are several issues:
1. The `__version__` attribute now returns a `Version` object instead of a string, which breaks compatibility with code expecting a string.
2. The `__parsed_version__` attribute now ... | diff --git a/src/marshmallow/__init__.py b/src/marshmallow/__init__.py
index be32c09..11c226a 100644
--- a/src/marshmallow/__init__.py
+++ b/src/marshmallow/__init__.py
@@ -31,7 +31,7 @@ def __getattr__(name: str) -> typing.Any:
DeprecationWarning,
stacklevel=2,
)
- return impo... | ["tests/test_version_attributes.py::test_version_attributes_deprecated"] | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 12 | 1 | 1,288 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254667 | 81.039 | |||
6,485 | swe_smith::train::20553 | swe_smith | train | 20,553 | tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__1zjopaqv | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | REGEXP_EXTRACT function fails with UnboundLocalError when using invalid regex patterns
#### Description
When using `REGEXP_EXTRACT` with an invalid regex pattern, the function raises an `UnboundLocalError` instead of handling the regex compilation error properly. This happens because the `group` variable is reference... | diff --git a/sqlglot/dialects/bigquery.py b/sqlglot/dialects/bigquery.py
index 6d39231..b0c38bf 100644
--- a/sqlglot/dialects/bigquery.py
+++ b/sqlglot/dialects/bigquery.py
@@ -229,10 +229,6 @@ def _build_regexp_extract(
expr_type: t.Type[E], default_group: t.Optional[exp.Expression] = None
) -> t.Callable[[t.Lis... | ["tests/dialects/test_bigquery.py::TestBigQuery::test_regexp_extract", "tests/dialects/test_duckdb.py::TestDuckDB::test_duckdb", "tests/dialects/test_snowflake.py::TestSnowflake::test_regexp_substr"] | ["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 9 | 3 | 1,348 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254667 | 81.039 | |||
6,486 | swe_smith::train::42447 | swe_smith | train | 42,447 | vi3k6i5__flashtext.b316c7e9.func_basic__y0pwbutq | swesmith/vi3k6i5__flashtext.b316c7e9 | vi3k6i5/flashtext | python | null | add_keywords_from_list silently fails and reverses keywords
When using the `add_keywords_from_list` method in the KeywordProcessor class, there appears to be a bug that causes keywords to be added incorrectly. The method has two issues:
1. It silently exits when the input is not a list instead of raising an Attribute... | diff --git a/flashtext/keyword.py b/flashtext/keyword.py
index b5cb1d1..cbefaf8 100644
--- a/flashtext/keyword.py
+++ b/flashtext/keyword.py
@@ -387,10 +387,12 @@ class KeywordProcessor(object):
"""
if not isinstance(keyword_list, list):
- raise AttributeError("keyword_list should be a li... | ["test/test_kp_exceptions.py::TestKPExceptions::test_add_keyword_from_list", "test/test_loading_keyword_list.py::TestListLoad::test_list_loading"] | ["test/test_dictionary_loading.py::TestDictionaryLoad::test_dictionary_loading", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_addition", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_deletion", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_subs... | jyangballin/swesmith.x86_64.vi3k6i5_1776_flashtext.b316c7e9 | true | null | 1 | 6 | 2 | 1,407 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2545 | 81.0385 | |||
6,487 | r2e_gym::train::5397 | r2e_gym | train | 5,397 | aiohttp__5f699bbbf98d3700921ec9a7d646d5f21e82e8c1 | aiohttp | aio-libs/aiohttp | python | 5f699bbbf98d3700921ec9a7d646d5f21e82e8c1 | **Issue Title:**
FileResponse Blocks Event Loop When Gzipped File Is Unavailable
**Description:**
When a client request includes the `gzip` encoding in the `Accept-Encoding` header, `FileResponse` attempts to serve the gzipped version of the requested file. If the gzipped file does not exist, the current implementatio... | diff --git a/CHANGES/8012.bugfix b/CHANGES/8012.bugfix
--- a/CHANGES/8012.bugfix
+++ b/CHANGES/8012.bugfix
@@ -0,0 +1 @@
+Fix :py:class:`~aiohttp.web.FileResponse`. doing blocking I/O in the event loop
diff --git a/aiohttp/web_fileresponse.py b/aiohttp/web_fileresponse.py
--- a/aiohttp/web_fileresponse.py
+++ b/aiohttp... | diff --git a/tests/test_web_sendfile.py b/tests/test_web_sendfile.py
--- a/tests/test_web_sendfile.py
+++ b/tests/test_web_sendfile.py
@@ -13,7 +13,6 @@
)
gz_filepath = mock.create_autospec(Path, spec_set=True)
- gz_filepath.is_file.return_value = True
gz_filepath.stat.return_value.st_size = 1024
... | null | null | namanjain12/aiohttp_final:5f699bbbf98d3700921ec9a7d646d5f21e82e8c1 | true | null | 2 | 35 | null | 1,539 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.373167 | 81.03825 | ||
6,488 | swe_smith::train::47986 | swe_smith | train | 47,986 | sqlfluff__sqlfluff.50a1c4b6.func_basic__oyuzxn0o | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | Lexer fails with TypeError when using set instead of list for element_buffer
#### Description
The lexer is throwing a TypeError when trying to lex SQL strings. This appears to be related to using a set data structure where a list is expected.
#### Steps/Code to Reproduce
```python
from sqlfluff.core.parser.lexer im... | diff --git a/src/sqlfluff/core/parser/lexer.py b/src/sqlfluff/core/parser/lexer.py
index 1fbf312..9533fc0 100644
--- a/src/sqlfluff/core/parser/lexer.py
+++ b/src/sqlfluff/core/parser/lexer.py
@@ -755,8 +755,6 @@ class Lexer:
found something that we cannot lex. If that happens we should
package it up ... | ["test/core/parser/lexer_test.py::test__parser__lexer_obj[b.c-res1]", "test/core/parser/lexer_test.py::test__parser__lexer_obj[*-+bd/-res8]", "test/core/parser/lexer_test.py::test__parser__lexer_fail", "test/core/parser/lexer_test.py::test__parser__lexer_fail_via_parse"] | ["test/core/parser/lexer_test.py::test__parser__lexer_string[.fsaljk-.]", "test/core/parser/lexer_test.py::test__parser__lexer_string[fsaljk-None]", "test/core/parser/lexer_test.py::test__parser__lexer_regex[fsaljk-f-f0]", "test/core/parser/lexer_test.py::test__parser__lexer_regex[fsaljk-f-f1]", "test/core/parser/lexer... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 26 | 4 | 1,006 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254333 | 81.038 | |||
6,489 | swe_smith::train::3272 | swe_smith | train | 3,272 | pygments__pygments.27649ebb.combine_file__0jqqr58z | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | GroffFormatter options swapped and incorrect initialization
Description
The GroffFormatter has several initialization issues that cause incorrect behavior. The `monospaced` and `linenos` options are swapped, and several instance variables are initialized with wrong values. Additionally, the styles dictionary is incor... | diff --git a/pygments/formatters/groff.py b/pygments/formatters/groff.py
index a9e0711..7f8b87f 100644
--- a/pygments/formatters/groff.py
+++ b/pygments/formatters/groff.py
@@ -45,34 +45,34 @@ class GroffFormatter(Formatter):
def __init__(self, **options):
Formatter.__init__(self, **options)
- se... | ["tests/test_groff_formatter.py::test_inheritance_custom_tokens", "tests/test_groff_formatter.py::test_basic", "tests/test_basic_api.py::test_formatter_unicode_handling[GroffFormatter]", "tests/test_basic_api.py::test_formatter_public_api[GroffFormatter]"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 26 | 4 | 1,006 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254333 | 81.038 | |||
6,490 | swe_smith::train::17533 | swe_smith | train | 17,533 | pyasn1__pyasn1.0f07d724.func_basic__6c1u8klt | swesmith/pyasn1__pyasn1.0f07d724 | pyasn1/pyasn1 | python | null | InnerTypeConstraint validation logic broken for PRESENT/ABSENT status
#### Description
The InnerTypeConstraint class is not properly validating values when constraints have PRESENT/ABSENT status flags. Values that should be rejected are being accepted, and the constraint validation logic appears to be inverted.
####... | diff --git a/pyasn1/type/constraint.py b/pyasn1/type/constraint.py
index 02368d0..1377160 100644
--- a/pyasn1/type/constraint.py
+++ b/pyasn1/type/constraint.py
@@ -552,12 +552,10 @@ class InnerTypeConstraint(AbstractConstraint):
if self.__singleTypeConstraint:
self.__singleTypeConstraint(value)
... | ["tests/type/test_constraint.py::InnerTypeConstraintTestCase::testConst2"] | ["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d... | jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724 | true | null | 1 | 10 | 1 | 1,326 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254333 | 81.038 | |||
6,491 | swe_smith::train::96 | swe_smith | train | 96 | oauthlib__oauthlib.1fd52536.combine_file__jhev9jho | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OAuth2Error headers property returns empty dict when request is provided
#### Description
When creating an OAuth2Error with a request object, the `headers` property always returns an empty dictionary instead of the expected WWW-Authenticate header for 401 status codes.
#### Steps/Code to Reproduce
```python
from oa... | diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py
index 3b41574..8f1d524 100644
--- a/oauthlib/oauth2/rfc6749/errors.py
+++ b/oauthlib/oauth2/rfc6749/errors.py
@@ -54,6 +54,13 @@ class OAuth2Error(Exception):
self.status_code = status_code
if request:
+ ... | ["tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_add_bearer_token", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_add_mac_token", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_prepare_authorization_request", "tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_prepare_... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 30 | 28 | 926 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254333 | 81.038 | |||
6,492 | swe_smith::train::11279 | swe_smith | train | 11,279 | rsalmei__alive-progress.35853799.func_pm_remove_cond__wwi9cj8j | swesmith/rsalmei__alive-progress.35853799 | rsalmei/alive-progress | python | null | Progress bar function not defined after context manager initialization
#### Description
When using alive_progress, the progress bar function is not available within the context manager, causing a `NameError` when trying to call it.
#### Steps/Code to Reproduce
```python
from alive_progress import alive_bar
with al... | diff --git a/alive_progress/core/progress.py b/alive_progress/core/progress.py
index a0e266a..d618033 100644
--- a/alive_progress/core/progress.py
+++ b/alive_progress/core/progress.py
@@ -178,28 +178,6 @@ def __alive_bar(config, total=None, *, calibrate=None,
if run.title:
run.title += (' ',) # ... | ["tests/core/test_progress.py::test_progress_bar[True-True-True-True]", "tests/core/test_progress.py::test_progress_bar[True-True-True-False]", "tests/core/test_progress.py::test_progress_bar[True-True-False-True]", "tests/core/test_progress.py::test_progress_bar[True-True-False-False]", "tests/core/test_progress.py::t... | ["tests/animations/test_bars.py::test_bar_tip_background[--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[_-=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[-0.0-Fa... | jyangballin/swesmith.x86_64.rsalmei_1776_alive-progress.35853799 | true | null | 1 | 31 | 24 | 905 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254167 | 81.0375 | |||
6,493 | swe_smith::train::1157 | swe_smith | train | 1,157 | jd__tenacity.0d40e76f.func_pm_ctrl_shuffle__6vzkm0lh | swesmith/jd__tenacity.0d40e76f | jd/tenacity | python | null | # Bug in retry_if_not_exception_message class
**Describe the bug**
I've found a bug in the `retry_if_not_exception_message` class where it's not correctly checking exceptions. The code is trying to access the exception before it's defined, causing the retry logic to fail.
**To Reproduce**
Here's a simple example that... | diff --git a/tenacity/retry.py b/tenacity/retry.py
index 9211631..44168dd 100644
--- a/tenacity/retry.py
+++ b/tenacity/retry.py
@@ -250,17 +250,16 @@ class retry_if_not_exception_message(retry_if_exception_message):
self.predicate = lambda *args_, **kwargs_: not if_predicate(*args_, **kwargs_)
def __ca... | ["tests/test_tenacity.py::TestDecoratorWrapper::test_retry_if_not_exception_message", "tests/test_tenacity.py::TestDecoratorWrapper::test_retry_if_not_exception_message_delay", "tests/test_tenacity.py::TestDecoratorWrapper::test_retry_if_not_exception_message_match"] | ["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test... | jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f | true | null | 1 | 7 | 3 | 1,384 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254 | 81.037 | |||
6,494 | swe_smith::train::19102 | swe_smith | train | 19,102 | seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__hl1wz084 | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | NameError in distance calculation when comparing objects
#### Description
When using DeepDiff to compare objects, a NameError is raised due to undefined variables in the distance calculation method. The error occurs when trying to access variables that are referenced before being defined.
#### Steps/Code to Reproduc... | diff --git a/deepdiff/distance.py b/deepdiff/distance.py
index d2dc2fe..2886ed7 100644
--- a/deepdiff/distance.py
+++ b/deepdiff/distance.py
@@ -14,6 +14,15 @@ DISTANCE_CALCS_NEEDS_CACHE = "Distance calculation can not happen once the cache
class DistanceMixin:
def _get_rough_distance(self):
+
+ if _dist... | ["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.csv-t2.csv-args4-0]", "tests/test_delta.py::TestBasicsOfDelta::test_raise_error", "tests/test_delta.py::TestIgnoreOrd... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 21 | 73 | 1,104 | 0 | 0.6 | 1 | 0.75 | 1 | 0.254 | 81.037 | |||
6,495 | swe_smith::train::27827 | swe_smith | train | 27,827 | jsvine__pdfplumber.02ff4313.func_pm_class_rm_funcs__dzs11myp | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | Missing properties in Container class causing AttributeError
#### Description
Several properties have been removed from the Container class, causing AttributeError when trying to access `lines`, `chars`, and `textlinehorizontals` attributes on PDF pages and other container objects.
#### Steps/Code to Reproduce
```p... | diff --git a/pdfplumber/container.py b/pdfplumber/container.py
index 2589a4a..c7d0490 100644
--- a/pdfplumber/container.py
+++ b/pdfplumber/container.py
@@ -35,10 +35,6 @@ class Container(object):
def rects(self) -> T_obj_list:
return self.objects.get("rect", [])
- @property
- def lines(self) -> T... | ["tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::test_load_with_custom_laparams", "tests/test_basics.py::Test::test_objects", "tests/test_basics.py::Test::test_outside_bbox", "tests/test_basics.py::Test::test_password", "tests/test_basics.py::Test::test_relative_crop", "tests/test_basic... | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_invalid_crops", "tests/test_basics.py::Test::test... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 14 | 96 | 1,243 | 0 | 0.6 | 1 | 0.75 | 1 | 0.253833 | 81.0365 | |||
6,496 | swe_smith::train::45209 | swe_smith | train | 45,209 | dask__dask.5f61e423.combine_file__un468l6j | swesmith/dask__dask.5f61e423 | dask/dask | python | null | `from_dask_array` fails with NameError and UnboundLocalError after recent changes
#### Description
Converting dask arrays to dataframes is broken. Getting `NameError: name 'kwargs' is not defined` and `UnboundLocalError: local variable 'dtypes' referenced before assignment` errors when using `from_dask_array`.
#### ... | diff --git a/dask/dataframe/io/io.py b/dask/dataframe/io/io.py
index 10e5429..a39e7ac 100644
--- a/dask/dataframe/io/io.py
+++ b/dask/dataframe/io/io.py
@@ -50,7 +50,6 @@ def _meta_from_array(x, columns=None, index=None, meta=None):
extra = sorted(set(columns).difference(x.dtype.names))
raise ... | ["dask/dataframe/io/tests/test_io.py::test_meta_from_recarray", "dask/dataframe/io/tests/test_io.py::test_from_array_with_record_dtype", "dask/dataframe/io/tests/test_io.py::test_DataFrame_from_dask_array", "dask/dataframe/io/tests/test_io.py::test_DataFrame_from_dask_array_with_blockwise_ops", "dask/dataframe/io/tests... | ["dask/dataframe/io/tests/test_io.py::test_meta_from_array", "dask/dataframe/io/tests/test_io.py::test_meta_from_1darray", "dask/dataframe/io/tests/test_io.py::test_from_array", "dask/dataframe/io/tests/test_io.py::test_from_pandas_dataframe", "dask/dataframe/io/tests/test_io.py::test_from_pandas_small", "dask/datafram... | jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423 | true | null | 1 | 17 | 20 | 1,183 | 0 | 0.6 | 1 | 0.75 | 1 | 0.253833 | 81.0365 | |||
6,497 | swe_smith::train::28408 | swe_smith | train | 28,408 | encode__starlette.db5063c2.combine_module__6emvmoil | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | ServerErrorMiddleware ignores Accept header and always returns plain text
When using the ServerErrorMiddleware with debug=True, the middleware is supposed to check the Accept header and return HTML responses for browsers and plain text for other clients.
However, it seems that the Accept header is being ignored and p... | diff --git a/starlette/middleware/errors.py b/starlette/middleware/errors.py
index 76ad776..7f36a6a 100644
--- a/starlette/middleware/errors.py
+++ b/starlette/middleware/errors.py
@@ -248,13 +248,12 @@ class ServerErrorMiddleware:
return "".join(traceback.format_exception(type(exc), exc, exc.__traceback__))
... | ["tests/middleware/test_errors.py::test_debug_text[asyncio]", "tests/middleware/test_errors.py::test_debug_html[asyncio]", "tests/middleware/test_errors.py::test_debug_after_response_sent[asyncio]", "tests/middleware/test_errors.py::test_debug_text[trio]", "tests/middleware/test_errors.py::test_debug_html[trio]", "test... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 2 | 12 | 14 | 1,283 | 0 | 0.6 | 1 | 0.75 | 1 | 0.253833 | 81.0365 | |||
6,498 | swe_smith::train::28652 | swe_smith | train | 28,652 | encode__starlette.db5063c2.func_basic__p9k6tdod | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | TemplateResponse constructor swaps template and context parameters
#### Description
When creating a TemplateResponse, the template and context parameters are being swapped internally, causing template rendering to fail with AttributeError.
#### Steps/Code to Reproduce
```python
from starlette.templating import Jinj... | diff --git a/starlette/templating.py b/starlette/templating.py
index 17e7fa4..f82985d 100644
--- a/starlette/templating.py
+++ b/starlette/templating.py
@@ -30,15 +30,15 @@ class _TemplateResponse(HTMLResponse):
self,
template: typing.Any,
context: dict[str, typing.Any],
- status_code:... | ["tests/test_templates.py::test_templates[asyncio]", "tests/test_templates.py::test_calls_context_processors[asyncio]", "tests/test_templates.py::test_template_with_middleware[asyncio]", "tests/test_templates.py::test_templates_with_directories[asyncio]", "tests/test_templates.py::test_templates_with_environment[asynci... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 8 | 18 | 1,363 | 0 | 0.6 | 1 | 0.75 | 1 | 0.253833 | 81.0365 | |||
6,499 | r2e_gym::train::236 | r2e_gym | train | 236 | orange3__838b237d6d5f68470ef1c593165693551655d375 | orange3 | biolab/orange3 | python | 838b237d6d5f68470ef1c593165693551655d375 | **Title:** OWPivot Widget Missing `aggregation_checkboxes` Attribute Causing AttributeError
**Description:**
After recent updates, the `OWPivot` widget no longer includes the `aggregation_checkboxes` attribute. This attribute is essential for accessing and interacting with the aggregation control checkboxes within the... | diff --git a/Orange/widgets/data/owpivot.py b/Orange/widgets/data/owpivot.py
--- a/Orange/widgets/data/owpivot.py
+++ b/Orange/widgets/data/owpivot.py
@@ -10,7 +10,8 @@
pyqtSignal)
from AnyQt.QtGui import QStandardItem, QColor, QStandardItemModel
from AnyQt.QtWidgets import (QTableView, QSi... | diff --git a/Orange/widgets/data/tests/test_owpivot.py b/Orange/widgets/data/tests/test_owpivot.py
--- a/Orange/widgets/data/tests/test_owpivot.py
+++ b/Orange/widgets/data/tests/test_owpivot.py
@@ -18,12 +18,11 @@
from Orange.widgets.tests.utils import simulate
from Orange.widgets.utils.state_summary import format_s... | null | null | namanjain12/orange3_final:838b237d6d5f68470ef1c593165693551655d375 | true | null | 1 | 49 | null | 1,255 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3725 | 81.03625 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.