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
5,200
swe_smith::train::1311
swe_smith
train
1,311
Cog-Creators__Red-DiscordBot.33e0eac7.combine_module__9p10bve9
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
# Multiple issues with bounded_gather and pagify functions ## Description I've found several issues with the `bounded_gather` and `pagify` functions in the utils module. ### bounded_gather issue: When trying to use `bounded_gather` with a limit of 0, it fails with a TypeError: ```python from redbot.core.utils impo...
diff --git a/redbot/core/utils/__init__.py b/redbot/core/utils/__init__.py index dc3687f..8ccc0f6 100644 --- a/redbot/core/utils/__init__.py +++ b/redbot/core/utils/__init__.py @@ -261,14 +261,14 @@ def bounded_gather( loop = asyncio.get_running_loop() if semaphore is None: - if not isinstance(limit,...
["tests/core/test_utils.py::test_bounded_gather", "tests/core/test_utils.py::test_pagify_length_hint"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
2
12
2
1,668
0
0.6
1
0.75
1
0.318
81.229
5,201
swe_smith::train::42317
swe_smith
train
42,317
scanny__python-pptx.278b47b1.lm_rewrite__pgmoo6wn
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
# Setting brightness on a color with None type doesn't raise an error ## Description When trying to set the brightness of a color that has a None color type, the operation should fail with a meaningful error message. However, the current implementation allows setting brightness on a None color type without any valida...
diff --git a/src/pptx/dml/color.py b/src/pptx/dml/color.py index 5415582..d2be917 100644 --- a/src/pptx/dml/color.py +++ b/src/pptx/dml/color.py @@ -97,15 +97,11 @@ class ColorFormat(object): return self._color.color_type def _validate_brightness_value(self, value): + """Validate brightness value...
["tests/dml/test_color.py::DescribeColorFormat::it_raises_on_attempt_to_set_brightness_on_None_color_type"]
["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
12
1
1,668
0
0.6
1
0.75
1
0.318
81.229
5,202
swe_smith::train::10534
swe_smith
train
10,534
paramiko__paramiko.23f92003.func_basic__mrm8yvih
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
# SSH key exchange fails with NIST P-256 curve When attempting to establish an SSH connection using the NIST P-256 elliptic curve for key exchange, the connection fails with an error message. ## Description The key exchange mechanism for NIST P-256 curve is not working correctly. When a client tries to connect to a ...
diff --git a/paramiko/kex_ecdh_nist.py b/paramiko/kex_ecdh_nist.py index 41fab46..bb4b737 100644 --- a/paramiko/kex_ecdh_nist.py +++ b/paramiko/kex_ecdh_nist.py @@ -47,12 +47,12 @@ class KexNistp256: self.transport._expect_packet(_MSG_KEXECDH_REPLY) def parse_next(self, ptype, m): - if self.trans...
["tests/test_kex.py::KexTest::test_kex_nistp256_client", "tests/test_kex.py::KexTest::test_kex_nistp256_server"]
["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
6
2
1,788
0
0.6
1
0.75
1
0.318
81.229
5,203
swe_smith::train::10372
swe_smith
train
10,372
paramiko__paramiko.23f92003.func_basic__99sgtxy1
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP file operations fail with incorrect flag conversion #### Description SFTP file operations are failing when trying to open files for reading, writing, or creating. The server appears to be converting SFTP flags incorrectly, causing file operations to fail with "No such file" errors even when the operations should...
diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index cd3910d..4384547 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -358,19 +358,19 @@ class SFTPServer(BaseSFTP, SubsystemHandler): def _convert_pflags(self, pflags): """convert SFTP-style open() flags to Python's os....
["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::testa_posix_rename", "tests/test...
["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
12
39
1,668
0
0.6
1
0.75
1
0.318
81.229
5,204
swe_smith::train::648
swe_smith
train
648
oauthlib__oauthlib.1fd52536.func_basic__w9lyza4e
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Hybrid grant nonce validation logic inverted #### Description The nonce validation in the OpenID Connect hybrid grant flow has incorrect logic. When using response types `code id_token` or `code id_token token`, requests that include a nonce parameter are being rejected with an "omits the required nonce parameter" er...
diff --git a/oauthlib/openid/connect/core/grant_types/hybrid.py b/oauthlib/openid/connect/core/grant_types/hybrid.py index 9c1fc70..18f158a 100644 --- a/oauthlib/openid/connect/core/grant_types/hybrid.py +++ b/oauthlib/openid/connect/core/grant_types/hybrid.py @@ -42,21 +42,12 @@ class HybridGrant(GrantTypeBase): ...
["tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridInterferenceTest::test_code_modifier_called", "tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridInterferenceTest::test_create_authorization_grant", "tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridInterferenceTest::te...
["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
19
14
1,528
0
0.6
1
0.75
1
0.318
81.229
5,205
swe_smith::train::24097
swe_smith
train
24,097
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__w7t7zw8y
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Scraper.range() method fails with UnboundLocalError when pattern contains no directory separators #### Description When using the Scraper class with patterns that don't contain forward slashes (directory separators), the `range()` method raises an `UnboundLocalError` because the `directorypattern` variable is referen...
diff --git a/sunpy/net/scraper.py b/sunpy/net/scraper.py index 202638e..fbb8742 100644 --- a/sunpy/net/scraper.py +++ b/sunpy/net/scraper.py @@ -174,6 +174,24 @@ class Scraper: return parse(date.strftime(self.datetime_pattern), filepath) is not None def range(self, timerange): + timestep = ex...
["sunpy/net/tests/test_scraper.py::test_directory_range", "sunpy/net/tests/test_scraper.py::test_directory_range_new_format", "sunpy/net/tests/test_scraper.py::test_directory_regex", "sunpy/net/tests/test_scraper.py::test_directory_regex_new_format", "sunpy/net/tests/test_scraper.py::test_directory_rangeFalse", "sunpy/...
["sunpy/net/tests/test_scraper.py::test_directory_date_pattern", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_new_format", "sunpy/net/tests/test_scraper.py::test_directory_date_pattern_false", "sunpy/net/tests/test_scraper.py::test_directory_date_patternFalse_new_format", "sunpy/net/tests/test_scraper....
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
37
20
1,168
0
0.6
1
0.75
1
0.318
81.229
5,206
swe_smith::train::46540
swe_smith
train
46,540
conan-io__conan.86f29e13.pr_17829
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Description Encountering `FileNotFoundError` when attempting to load CPS files after generating dependencies with `CPSDeps`. It seems like the expected directory structure for CPS files is not being created correctly. ### Steps/Code to Reproduce 1. Create a Conan package with the following structure: ```pytho...
diff --git a/conan/cps/cps.py b/conan/cps/cps.py index d8c9fb1..8c6c882 100644 --- a/conan/cps/cps.py +++ b/conan/cps/cps.py @@ -115,16 +115,12 @@ class CPS: self.description = None self.license = None self.website = None - self.prefix = None def serialize(self): - cps = ...
["test/integration/cps/test_cps.py::test_cps", "test/integration/cps/test_cps.py::test_cps_static_lib", "test/integration/cps/test_cps.py::test_cps_header", "test/integration/cps/test_cps.py::test_extended_cpp_info"]
["test/integration/cps/test_cps.py::test_cps_in_pkg", "test/integration/cps/test_cps.py::test_cps_merge"]
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
14
4
1,627
0
0.6
1
0.75
1
0.317833
81.2285
5,207
swe_smith::train::1947
swe_smith
train
1,947
agronholm__typeguard.b6a7e438.lm_rewrite__5f9fk6kc
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
@typechecked decorator not working on class methods I've discovered an issue with the `@typechecked` decorator when applied to a class. It seems that the decorator is not being properly processed when applied to a class, causing type checking to be skipped for methods within the class. Here's a simple reproduction ca...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..44805c3 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -618,6 +618,10 @@ class TypeguardTransformer(NodeTransformer): return node def visit_ClassDef(self, node: ClassDef) -> Class...
["tests/test_instrumentation.py::TestOptionsOverride::test_outer_class_typecheck_fail_callback[typechecked]", "tests/test_instrumentation.py::TestOptionsOverride::test_outer_class_typecheck_fail_callback[importhook]"]
["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
28
2
1,347
0
0.6
1
0.75
1
0.317833
81.2285
5,208
swe_smith::train::35864
swe_smith
train
35,864
stanfordnlp__dspy.651a4c71.lm_rewrite__15td42ye
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# JSONFilter fails to handle malformed JSON input I've encountered an issue with the `JSONFilter` class in the `dspy/retrieve/snowflake_rm.py` file. The class is unable to handle malformed JSON input properly. ## Description When providing malformed or partial JSON to the `model_validate_json` method, it fails to ex...
diff --git a/dspy/retrieve/snowflake_rm.py b/dspy/retrieve/snowflake_rm.py index 1404819..19453f5 100644 --- a/dspy/retrieve/snowflake_rm.py +++ b/dspy/retrieve/snowflake_rm.py @@ -212,22 +212,16 @@ class JSONFilter(BaseModel): answer: str = Field(description="The filter_query in valid JSON format") @classm...
["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
24
4
1,426
0
0.6
1
0.75
1
0.317667
81.228
5,209
swe_smith::train::38517
swe_smith
train
38,517
amueller__word_cloud.ec24191c.func_pm_remove_cond__03o561xt
swesmith/amueller__word_cloud.ec24191c
amueller/word_cloud
python
null
### Describe the bug When generating a word cloud with a small canvas size, the word cloud generation fails with an error message `font size must be greater than 0, not 0`. This happens when trying to generate word clouds with very small dimensions or when recoloring a word cloud with a color generator that's smaller ...
diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py index 1622c03..dbee719 100644 --- a/wordcloud/wordcloud.py +++ b/wordcloud/wordcloud.py @@ -439,10 +439,6 @@ class WordCloud(object): last_freq = 1. - if max_font_size is None: - # if not provided use default font_size - ...
["test/test_wordcloud.py::test_recolor_too_small", "test/test_wordcloud.py::test_recolor_too_small_set_default", "test/test_wordcloud.py::test_tiny_canvas", "test/test_wordcloud.py::test_coloring_black_works"]
["test/test_wordcloud.py::test_collocations", "test/test_wordcloud.py::test_collocation_stopwords", "test/test_wordcloud.py::test_collocation_stopwords_uppercase", "test/test_wordcloud.py::test_plurals_numbers", "test/test_wordcloud.py::test_multiple_s", "test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.p...
jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c
true
null
1
12
4
1,666
0
0.6
1
0.75
1
0.317667
81.228
5,210
swe_smith::train::19749
swe_smith
train
19,749
kurtmckee__feedparser.cad965a3.combine_module__ov1gebya
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
<START WRITING> # Bug in DC namespace description handling and media player parsing ## Description I found two issues in the feedparser library when parsing certain RSS feeds: 1. When parsing feeds with Dublin Core (DC) description elements, the parser crashes with a TypeError. 2. Media RSS player elements are not b...
diff --git a/feedparser/namespaces/dc.py b/feedparser/namespaces/dc.py index 37c1619..bb9df76 100644 --- a/feedparser/namespaces/dc.py +++ b/feedparser/namespaces/dc.py @@ -46,7 +46,7 @@ class Namespace: self._end_updated() def _end_dc_description(self): - self._end_description() + self._s...
["tests/test_well_formed.py::test_strict_parser[info1155]", "tests/test_well_formed.py::test_loose_parser[info1155]", "tests/test_well_formed.py::test_loose_parser[info1518]", "tests/test_well_formed.py::test_strict_parser[info1518]"]
["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
2
6
4
1,786
0
0.6
1
0.75
1
0.317667
81.228
5,211
swe_smith::train::43137
swe_smith
train
43,137
gawel__pyquery.811cd048.func_pm_class_rm_funcs__xpt2b4wv
swesmith/gawel__pyquery.811cd048
gawel/pyquery
python
null
`:checkbox` and `:has()` pseudo-selectors not working #### Description The `:checkbox` pseudo-selector and `:has()` function are not working and raise `ExpressionError` when used in CSS selectors. #### Steps/Code to Reproduce ```python from pyquery import PyQuery # Test :checkbox pseudo-selector html = '<div><inpu...
diff --git a/pyquery/cssselectpatch.py b/pyquery/cssselectpatch.py index 1af5716..f8bf3e7 100644 --- a/pyquery/cssselectpatch.py +++ b/pyquery/cssselectpatch.py @@ -245,19 +245,6 @@ class JQueryTranslator(cssselect_xpath.HTMLTranslator): xpath.add_condition("@type = 'text' and name(.) = 'input'") retu...
["docs/pseudo_classes.rst::pseudo_classes.rst", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTranslator.xpath_checkbox_pseudo", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTranslator.xpath_has_function", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.serialize", "pyquery/pyquery.py::pyquery.pyque...
["README.rst::README.rst", "docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/manipulating.rst::manipulating.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTranslator.xpath_button_pseudo", "...
jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048
true
null
1
42
24
1,066
0
0.6
1
0.75
1
0.317667
81.228
5,212
swe_smith::train::21143
swe_smith
train
21,143
tobymao__sqlglot.036601ba.lm_rewrite__mcp7jcaf
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
### Issue: Anonymous SQL Generation Fails with Non-String Identifiers #### Description It seems that generating SQL for `Anonymous` expressions is not handling non-string identifiers correctly. When attempting to generate SQL for an `Anonymous` expression where the identifier is not a string or a quoted identifier, t...
diff --git a/sqlglot/optimizer/simplify.py b/sqlglot/optimizer/simplify.py index 3f0f732..2a1dd9e 100644 --- a/sqlglot/optimizer/simplify.py +++ b/sqlglot/optimizer/simplify.py @@ -1400,26 +1400,8 @@ class Gen: self._binary(e, " AND ") def anonymous_sql(self, e: exp.Anonymous) -> None: - this = e...
["tests/test_optimizer.py::TestOptimizer::test_simplify"]
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
22
1
1,464
0
0.6
1
0.75
1
0.317333
81.227
5,213
swe_smith::train::26013
swe_smith
train
26,013
pylint-dev__astroid.b114f6b5.func_basic__ugfl3ol5
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Super attribute lookup returns None for special attributes when not found #### Description When looking up special attributes on super objects that don't exist in the MRO, the lookup incorrectly returns `None` instead of raising an `AttributeInferenceError`. #### Steps/Code to Reproduce ```python import astroid co...
diff --git a/astroid/objects.py b/astroid/objects.py index 9f638d4..72e3dbc 100644 --- a/astroid/objects.py +++ b/astroid/objects.py @@ -143,39 +143,36 @@ class Super(node_classes.NodeNG): self, name: str, context: InferenceContext | None = None ) -> Iterator[InferenceResult]: """Retrieve the inf...
["tests/test_inference.py::test_super_inference_of_abstract_property", "tests/test_objects.py::SuperTests::test_super_bound_model", "tests/test_objects.py::SuperTests::test_super_complex_mro", "tests/test_objects.py::SuperTests::test_super_data_model", "tests/test_objects.py::SuperTests::test_super_getattr_single_inher...
["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
52
8
864
0
0.6
1
0.75
1
0.317333
81.227
5,214
swe_smith::train::47657
swe_smith
train
47,657
sqlfluff__sqlfluff.50a1c4b6.combine_module__u72af2dl
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Plugin manager initialization broken after refactoring #### Description The plugin manager initialization is failing with an `UnboundLocalError` when trying to access the `plugin_manager` variable. This appears to be related to recent changes in the plugin loading logic. #### Steps/Code to Reproduce ```python from ...
diff --git a/src/sqlfluff/core/helpers/dict.py b/src/sqlfluff/core/helpers/dict.py index ae76dcd..021583e 100644 --- a/src/sqlfluff/core/helpers/dict.py +++ b/src/sqlfluff/core/helpers/dict.py @@ -123,31 +123,8 @@ def dict_diff( {} """ buff: NestedStringDict[T] = {} - for k in left: - if ignore...
["test/core/helpers/dict_test.py::test__helpers_dict__dict_diff", "test/core/plugin_test.py::test__plugin_handle_bad_load"]
["test/core/helpers/dict_test.py::test_helpers_dict_doctests", "test/core/helpers/dict_test.py::test__helpers_dict__nested_combine", "test/core/helpers/dict_test.py::test__helpers_dict__nested_combine_copy_effect", "test/core/helpers/dict_test.py::test__config__iter_records_from_nested_dict", "test/core/plugin_test.py:...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
2
48
2
944
0
0.6
1
0.75
1
0.317333
81.227
5,215
swe_smith::train::24962
swe_smith
train
24,962
pylint-dev__astroid.b114f6b5.combine_file__1pb29yq2
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Method call inference broken after recent changes #### Description After some recent changes, method calls on instances are not being inferred correctly. The inference system seems to be failing to resolve method calls and attribute access on class instances. #### Steps/Code to Reproduce ```python import astroid #...
diff --git a/astroid/bases.py b/astroid/bases.py index d91a4c9..aa1d2c7 100644 --- a/astroid/bases.py +++ b/astroid/bases.py @@ -321,23 +321,9 @@ class BaseInstance(Proxy): for res in self.igetattr(caller.func.attrname, context): inferred = True yield res - - # Othe...
["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/brain/numpy/test_core_umath.py::NumpyBrainCoreUmathTest::test_numpy_core_umath_functions_retur...
["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
31
116
1,284
0
0.6
1
0.75
1
0.317333
81.227
5,216
swe_smith::train::18554
swe_smith
train
18,554
HIPS__autograd.ac044f0d.lm_rewrite__rnwhb8ou
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Describe the bug There seems to be an issue with the `einsum` function when performing matrix multiplication with broadcasting. The function does not handle certain broadcasting scenarios correctly, leading to unexpected behavior. ### How to Reproduce Here's a minimal example to reproduce the issue: ```python i...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..3c3148f 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -894,15 +894,43 @@ def unbroadcast_f(target, f): def unbroadcast_einsum(x, target_meta, subscript): - if Ellipsis not in subscript: - ...
["tests/test_systematic.py::test_einsum2_matmult_broadcast"]
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
44
1
1,024
0
0.6
1
0.75
1
0.317333
81.227
5,217
swe_smith::train::4607
swe_smith
train
4,607
pygments__pygments.27649ebb.lm_rewrite__y0o5iz7w
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
### Bug Report: Incorrect Lexer Guess for Forth Files #### Description The lexer guessing mechanism seems to incorrectly identify Forth files, leading to unexpected behavior when processing `.frt` files. #### Steps/Code to Reproduce To reproduce the issue, you can use the following script: ```python from pygments.l...
diff --git a/pygments/lexers/basic.py b/pygments/lexers/basic.py index 9cfdf46..adc8098 100644 --- a/pygments/lexers/basic.py +++ b/pygments/lexers/basic.py @@ -489,9 +489,38 @@ class QBasicLexer(RegexLexer): } def analyse_text(text): - if '$DYNAMIC' in text or '$STATIC' in text: - return ...
["tests/test_guess.py::test_guess_lexer_forth"]
["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
35
1
1,202
0
0.6
1
0.75
1
0.317
81.226
5,218
swe_smith::train::22412
swe_smith
train
22,412
tweepy__tweepy.91a41c6e.func_basic__u8oay74s
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Issue: Incorrect Parsing of JSON Responses It seems there's an issue with how JSON responses are being parsed in the `ModelParser` class. After a recent change, the parsing logic appears to be reversed, causing unexpected behavior when handling API responses. ### Description When using the `ModelParser` to parse...
diff --git a/tweepy/parsers.py b/tweepy/parsers.py index 2aee1a5..023bd61 100644 --- a/tweepy/parsers.py +++ b/tweepy/parsers.py @@ -63,7 +63,7 @@ class ModelParser(JSONParser): payload_type=None, return_cursors=False): try: if payload_type is None: - return + ...
["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...
["tests/test_api.py::TweepyAPITests::testgetblocks", "tests/test_api.py::TweepyAPITests::testgetdirectmessages", "tests/test_api.py::TweepyAPITests::testgetfollowers", "tests/test_api.py::TweepyAPITests::testgetfriends", "tests/test_api.py::TweepyAPITests::testgetlistmembers", "tests/test_api.py::TweepyAPITests::testge...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
8
50
1,742
0
0.6
1
0.75
1
0.317
81.226
5,219
swe_smith::train::31819
swe_smith
train
31,819
davidhalter__parso.338a5760.combine_module__1wcn9cbi
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
DiffParser returns integer instead of node causing AttributeError When using the DiffParser, I'm getting AttributeError exceptions when trying to access attributes on what should be node objects. It seems like the parser is returning integers in some cases instead of the expected node objects. #### Steps/Code to Repr...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..bb615f4 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -390,19 +390,16 @@ class DiffParser: def _get_old_line_stmt(self, old_line): leaf = self._module.get_leaf_for_position((old_line, 0), include_prefixes=True) - ...
["test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_one_statement_func", "test/test_diff_parser.py::test_for_on_one_line", "test/test_diff_pa...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
2
36
105
1,182
0
0.6
1
0.75
1
0.317
81.226
5,220
swe_smith::train::43654
swe_smith
train
43,654
cloudpipe__cloudpickle.6220b0ce.func_pm_remove_loop__euja7oci
swesmith/cloudpipe__cloudpickle.6220b0ce
cloudpipe/cloudpickle
python
null
# Submodule imports not properly preserved when pickling functions ## Description When using cloudpickle to serialize functions that use submodules, the submodule references are not properly preserved. This causes errors when deserializing and executing the function in a new environment where the submodule hasn't bee...
diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 8c50ba1..2b56584 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -354,28 +354,8 @@ def _find_imported_submodules(code, top_level_dependencies): """ subimports = [] - # check if any known dependency is a...
["tests/cloudpickle_test.py::CloudPickleTest::test_multiprocess", "tests/cloudpickle_test.py::CloudPickleTest::test_submodule", "tests/cloudpickle_test.py::CloudPickleTest::test_submodule_closure", "tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_multiprocess", "tests/cloudpickle_test.py::Protocol2CloudPickle...
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/c...
jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce
true
null
1
20
6
1,501
0
0.6
1
0.75
1
0.316833
81.2255
5,221
swe_smith::train::24085
swe_smith
train
24,085
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__tza451p4
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
UnboundLocalError in format_comments_and_history function #### Description The `format_comments_and_history` function in `sunpy.io._fits` is raising an `UnboundLocalError` when trying to access the `header` variable. The function appears to be returning `header` before it's properly defined, causing issues when readi...
diff --git a/sunpy/io/_fits.py b/sunpy/io/_fits.py index 5513abe..5d27b48 100644 --- a/sunpy/io/_fits.py +++ b/sunpy/io/_fits.py @@ -126,6 +126,19 @@ def get_header(afile): def format_comments_and_history(input_header): + return header + try: + comment = "\n".join(input_header['COMMENT']).strip() + ...
["sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-None-4]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-1-1]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits...
["sunpy/io/tests/test_fits.py::test_write_with_metadict_header_astropy", "sunpy/io/tests/test_fits.py::test_fitsheader", "sunpy/io/tests/test_fits.py::test_warn_nonascii", "sunpy/io/tests/test_fits.py::test_warn_nan", "sunpy/io/tests/test_fits.py::test_warn_longkey", "sunpy/io/tests/test_fits.py::test_split_multiline_c...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
31
22
1,280
0
0.6
1
0.75
1
0.316667
81.225
5,222
swe_smith::train::17229
swe_smith
train
17,229
prettytable__prettytable.ca90b055.lm_rewrite__guvv0uzd
swesmith/prettytable__prettytable.ca90b055
prettytable/prettytable
python
null
Column Deletion Fails with ValueError Description Hello, I've encountered an issue with the `PrettyTable` class when attempting to delete columns. The problem arises when trying to remove a column that exists in the table. Instead of successfully deleting the column, a `ValueError` is raised unexpectedly. Here's a ...
diff --git a/src/prettytable/prettytable.py b/src/prettytable/prettytable.py index 818a520..50060d9 100644 --- a/src/prettytable/prettytable.py +++ b/src/prettytable/prettytable.py @@ -1604,13 +1604,7 @@ class PrettyTable: del self._rows[row_index] del self._dividers[row_index] - def add_column( ...
["tests/test_prettytable.py::TestDeleteColumn::test_delete_column", "tests/test_prettytable.py::TestDeleteColumn::test_delete_illegal_column_raises_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
38
2
1,140
0
0.6
1
0.75
1
0.316667
81.225
5,223
swe_smith::train::38438
swe_smith
train
38,438
dbader__schedule.82a43db1.lm_rewrite__gk0jwjih
swesmith/dbader__schedule.82a43db1
dbader/schedule
python
null
# Weekday validation error when using invalid day name ## Description When using an invalid weekday name in a schedule, the error message is not consistent with the rest of the library. The code now raises a generic `ValueError` instead of the expected `ScheduleValueError`. ## How to reproduce Create a job that run...
diff --git a/schedule/__init__.py b/schedule/__init__.py index 8e12eeb..0f7a393 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -929,17 +929,25 @@ def _move_to_next_weekday(moment: datetime.datetime, weekday: str): def _weekday_index(day: str) -> int: - weekdays = ( - "monday", - "...
["test_schedule.py::SchedulerTests::test_time_units"]
["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT...
jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1
true
null
1
36
1
1,180
0
0.6
1
0.75
1
0.316667
81.225
5,224
swe_smith::train::31667
swe_smith
train
31,667
benoitc__gunicorn.bacbf8aa.lm_rewrite__0645gans
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
### Issue: Non-ASCII Characters in HTTP Headers Cause Encoding Errors #### Description When attempting to send HTTP response headers that contain non-ASCII characters, a `TypeError` is raised. This issue occurs when headers are appended with values that include characters outside the US-ASCII range, such as 'häder' o...
diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 419ac50..6450b8c 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -217,16 +217,23 @@ class Response: self.must_close = True def should_close(self): - if self.must_close or self.req.should_close(): + """Determ...
["tests/test_http.py::test_http_header_encoding"]
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
25
1
1,399
0
0.6
1
0.75
1
0.3165
81.2245
5,225
swe_smith::train::35215
swe_smith
train
35,215
alecthomas__voluptuous.a7a55f83.combine_file__grh617px
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
Message decorator breaks validator functions with positional arguments #### Description The `message` decorator is not handling validator functions that expect positional arguments correctly. When using validators like `Email()`, `Url()`, `IsDir()`, etc., they fail with "missing 1 required positional argument" errors...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..a6692b9 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -786,10 +786,11 @@ def _compile_scalar(schema): return validate_callable def validate_value(path, data): - if data != sch...
["voluptuous/tests/tests.py::test_email_validation", "voluptuous/tests/tests.py::test_email_validation_with_none", "voluptuous/tests/tests.py::test_email_validation_with_empty_string", "voluptuous/tests/tests.py::test_email_validation_without_host", "voluptuous/tests/tests.py::test_email_validation_with_bad_data[john@v...
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests....
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
45
16
999
0
0.6
1
0.75
1
0.3165
81.2245
5,226
swe_smith::train::18380
swe_smith
train
18,380
msiemens__tinydb.10644a0e.lm_rewrite__o0uce7v7
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
# Query.fragment() not working with empty path ## Bug summary The `fragment()` method in the Query class doesn't work when used without a path. ## Code for reproduction ```python from tinydb import TinyDB, Query # Create an in-memory database db = TinyDB(storage=MemoryStorage) db.insert({'name': 'John', 'age': 30,...
diff --git a/tinydb/queries.py b/tinydb/queries.py index 0ef6a69..6abdad8 100644 --- a/tinydb/queries.py +++ b/tinydb/queries.py @@ -472,19 +472,37 @@ class Query(QueryInstance): ) def fragment(self, document: Mapping) -> QueryInstance: + """ + Match documents that contain a specific fragm...
["tests/test_queries.py::test_fragment"]
["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
30
1
1,299
0
0.6
1
0.75
1
0.3165
81.2245
5,227
swe_smith::train::5043
swe_smith
train
5,043
bottlepy__bottle.a8dfef30.lm_rewrite__id2ebh7e
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
# Deleting virtual keys in ConfigDict causes KeyError ## Description I've found an issue with the `ConfigDict` class when deleting keys. When trying to delete a key that exists in a parent overlay but not in the current dictionary, a KeyError is raised. Here's a simple reproduction: ```python source = ConfigDict() ...
diff --git a/bottle.py b/bottle.py index 286b5bc..13a6ef8 100755 --- a/bottle.py +++ b/bottle.py @@ -2464,21 +2464,20 @@ class ConfigDict(dict): overlay._set_virtual(key, value) def __delitem__(self, key): - if key not in self: - raise KeyError(key) + """Delete a key from th...
["test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_overlay"]
["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module", "test/test_config.py::TestConfDict::test_meta", "...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
27
2
1,359
0
0.6
1
0.75
1
0.3165
81.2245
5,228
swe_smith::train::31348
swe_smith
train
31,348
benoitc__gunicorn.bacbf8aa.combine_file__2n0dy0tp
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Logger initialization broken after recent changes #### Description The Logger class initialization is completely broken. When creating a Logger instance, it fails with AttributeError because the cfg parameter is being set to None instead of the actual config object. #### Steps/Code to Reproduce ```python from gunic...
diff --git a/gunicorn/glogging.py b/gunicorn/glogging.py index e34fcd5..e8b3dc2 100644 --- a/gunicorn/glogging.py +++ b/gunicorn/glogging.py @@ -181,15 +181,15 @@ class Logger: atoms_wrapper_class = SafeAtoms def __init__(self, cfg): - self.error_log = logging.getLogger("gunicorn.error") - sel...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
["tests/test_config.py::test_worker_class", "tests/test_config.py::test_defaults", "tests/test_config.py::test_property_access", "tests/test_config.py::test_bool_validation", "tests/test_config.py::test_pos_int_validation", "tests/test_config.py::test_str_validation", "tests/test_config.py::test_str_to_addr_list_valida...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
27
23
1,359
0
0.6
1
0.75
1
0.3165
81.2245
5,229
swe_smith::train::3571
swe_smith
train
3,571
pygments__pygments.27649ebb.combine_file__z69jkt78
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Erlang and Elixir lexers broken after recent changes #### Description The Erlang shell lexer and Elixir console lexer are not working properly. When trying to tokenize code, I'm getting AttributeError about NoneType objects not having certain methods. #### Steps/Code to Reproduce ```python from pygments.lexers impo...
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py index 1190182..7779477 100644 --- a/pygments/lexers/erlang.py +++ b/pygments/lexers/erlang.py @@ -161,28 +161,28 @@ class ErlangShellLexer(Lexer): def get_tokens_unprocessed(self, text): erlexer = ErlangLexer(**self.options) - + ...
["tests/test_basic_api.py::test_random_input[ErlangShellLexer]", "tests/test_basic_api.py::test_lexer_options[ErlangShellLexer]", "tests/examplefiles/erl/erl_session.erl-sh::", "tests/examplefiles/iex/iex_example::", "tests/examplefiles/elixir/example_elixir.ex::"]
["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
47
5
958
0
0.6
1
0.75
1
0.316333
81.224
5,230
swe_smith::train::203
swe_smith
train
203
oauthlib__oauthlib.1fd52536.combine_module__3w8xygfu
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OpenID Connect implicit grant broken after recent changes #### Description The OpenID Connect implicit grant flow is completely broken. When trying to use the implicit grant with OpenID Connect, various methods and attributes are no longer accessible, causing AttributeError exceptions. #### Steps/Code to Reproduce ...
diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py index 29d583e..6df1277 100644 --- a/oauthlib/openid/connect/core/grant_types/base.py +++ b/oauthlib/openid/connect/core/grant_types/base.py @@ -13,12 +13,6 @@ log = logging.getLogger(__name__) class 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
21
164
1,478
0
0.6
1
0.75
1
0.316333
81.224
5,231
swe_smith::train::49396
swe_smith
train
49,396
mozilla__bleach.73871d76.func_pm_class_rm_funcs__7sb43rca
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
TreeBuilder constructor missing after refactoring #### Description After some recent changes, the TreeBuilder class is missing its `__init__` method, causing instantiation to fail with a TypeError. #### Steps/Code to Reproduce ```python from bleach._vendor.html5lib.treebuilders.base import TreeBuilder # This shoul...
diff --git a/bleach/_vendor/html5lib/treebuilders/base.py b/bleach/_vendor/html5lib/treebuilders/base.py index 2869da0..1efca24 100644 --- a/bleach/_vendor/html5lib/treebuilders/base.py +++ b/bleach/_vendor/html5lib/treebuilders/base.py @@ -169,30 +169,6 @@ class TreeBuilder(object): # Fragment class fragment...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["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
50
185
898
0
0.6
1
0.75
1
0.316333
81.224
5,232
swe_smith::train::51652
swe_smith
train
51,652
pydicom__pydicom.7d361b3d.combine_module__uxh0lzor
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Pixel data processing functions return incorrect results after recent changes #### Description The pixel data processing functions are producing incorrect outputs. When trying to unpack bits from byte data, the results don't match expected values. Also getting wrong exception types when validating plugins. #### Step...
diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py index 10a4a93..efedd1f 100644 --- a/src/pydicom/pixels/common.py +++ b/src/pydicom/pixels/common.py @@ -215,20 +215,20 @@ class CoderBase: A dict of available {plugin name: decode/encode function} that can be used to deco...
["tests/pixels/test_common.py::TestCoderBase::test_init", "tests/pixels/test_common.py::TestCoderBase::test_validate_plugins", "tests/pixels/test_decoder_base.py::TestDecoder::test_init", "tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/pixels/test_decoder_base.py::TestDecoder::test_validate_plugin...
["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
2
32
32
1,258
0
0.6
1
0.75
1
0.316333
81.224
5,233
swe_smith::train::7037
swe_smith
train
7,037
cantools__cantools.0c6a7871.combine_file__m61quxy5
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
CDD file parsing produces invalid bitstruct format strings #### Description When loading CDD files, the parser generates invalid bitstruct format strings that cause encoding/decoding operations to fail. The format strings contain negative values like `f-1` which are not valid bitstruct format specifiers. #### Steps/...
diff --git a/src/cantools/database/diagnostics/formats/cdd.py b/src/cantools/database/diagnostics/formats/cdd.py index b25f9d5..b712b7e 100644 --- a/src/cantools/database/diagnostics/formats/cdd.py +++ b/src/cantools/database/diagnostics/formats/cdd.py @@ -26,17 +26,17 @@ class DataType: unit, ...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanTo...
["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_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
32
6
1,257
0
0.6
1
0.75
1
0.316167
81.2235
5,234
swe_smith::train::36561
swe_smith
train
36,561
lincolnloop__python-qrcode.456b01d4.combine_module__ymeqnwpt
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
# [Bug]: SVG QR code generation broken ## Description I'm trying to generate QR codes using the SVG image factory, but it's failing with a TypeError. The issue appears to be in the SVG generation code. ## Steps to Reproduce ```python import qrcode import io from qrcode.image import svg # Simple example qr = qrcode...
diff --git a/qrcode/image/styles/colormasks.py b/qrcode/image/styles/colormasks.py index 43186b2..33f6dcb 100644 --- a/qrcode/image/styles/colormasks.py +++ b/qrcode/image/styles/colormasks.py @@ -106,7 +106,9 @@ class SolidFillColorMask(QRColorMask): QRColorMask.apply_mask(self, image) def get_fg_p...
["qrcode/tests/test_qrcode_pil.py::test_render_styled_with_mask[mask1]", "qrcode/tests/test_qrcode_pil.py::test_render_styled_with_mask[mask7]", "qrcode/tests/test_qrcode_svg.py::test_render_svg", "qrcode/tests/test_qrcode_svg.py::test_render_svg_path", "qrcode/tests/test_qrcode_svg.py::test_render_svg_fragment", "qrco...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
2
28
10
1,337
0
0.6
1
0.75
1
0.316167
81.2235
5,235
swe_smith::train::18539
swe_smith
train
18,539
HIPS__autograd.ac044f0d.lm_rewrite__ki4lth6m
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Issue: Incorrect Gradient Calculation for `np.std` with `ddof` Parameter #### Description It seems there is an issue with the gradient calculation of the `np.std` function when using the `ddof` parameter. The problem arises when computing the standard deviation with degrees of freedom different from zero, which l...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..e8fc3fd 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -488,23 +488,20 @@ defvjp(anp.var, grad_np_var) def grad_np_std(ans, x, axis=None, ddof=0, keepdims=False): shape, _, dtype, iscomplex =...
["tests/test_numpy.py::test_std_ddof", "tests/test_systematic.py::test_std"]
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
21
2
1,477
0
0.6
1
0.75
1
0.316167
81.2235
5,236
swe_smith::train::10065
swe_smith
train
10,065
paramiko__paramiko.23f92003.combine_file__5xr2baie
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Authentication logic broken after recent changes #### Description SSH authentication is failing in unexpected ways. When attempting to authenticate with wrong credentials, the client doesn't raise the expected `AuthenticationException`. Additionally, multipart authentication seems to be returning incorrect results, a...
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index bc7f298..fd42c81 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -510,7 +510,6 @@ Error Message: {} ) def _send_auth_result(self, username, method, result): - # okay, send result m = Messag...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/test_client.py::SSHClientTest::test_multiple_key_files", "tests/test_client.py::SSHClientTest::test_multiple_key_files_failure", "tests/test_client.py::PasswordPassphraseTest...
["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
33
6
1,237
0
0.6
1
0.75
1
0.316167
81.2235
5,237
swe_smith::train::45091
swe_smith
train
45,091
mahmoud__glom.fb3c4e76.lm_rewrite__xdy85cn9
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
TypeError in Check Argument Validation The recent changes to the `Check` class in `glom/matching.py` have introduced a TypeError when processing certain argument values. The `_get_arg_val` function now raises a TypeError instead of a ValueError when the validation function fails, which affects the behavior of the `Che...
diff --git a/glom/matching.py b/glom/matching.py index 798ac40..26a2da8 100644 --- a/glom/matching.py +++ b/glom/matching.py @@ -901,19 +901,36 @@ class Check: self.default = kwargs.pop('default', RAISE) def _get_arg_val(name, cond, func, val, can_be_empty=True): + """Process and validate...
["glom/test/test_check.py::test_check_basic", "glom/test/test_check.py::test_check_multi", "glom/test/test_check.py::test_check_signature", "glom/test/test_error.py::test_all_public_errors", "glom/test/test_streaming.py::test_filter", "glom/test/test_streaming.py::test_windowed"]
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
41
6
1,076
0
0.6
1
0.75
1
0.316
81.223
5,238
swe_smith::train::52539
swe_smith
train
52,539
pydicom__pydicom.7d361b3d.func_pm_remove_cond__1ydaqd10
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
DSdecimal validation and auto_format not working properly #### Description When creating DSdecimal instances, validation and auto_format functionality appears to be broken. Values that should trigger validation errors (like strings longer than 16 characters, NaN, Infinity) are being accepted without raising exception...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..417a4f0 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -1175,8 +1175,6 @@ class DSdecimal(Decimal): value later. E.g. if set ``'1.23e2'``, :class:`~decimal.Decimal` would write ``'123'``, but :class:`D...
["tests/test_valuerep.py::TestDSdecimal::test_string_too_long", "tests/test_valuerep.py::TestDSdecimal::test_string_too_long_raises", "tests/test_valuerep.py::TestDSdecimal::test_auto_format[True]", "tests/test_valuerep.py::TestDSdecimal::test_auto_format[False]", "tests/test_valuerep.py::TestDSdecimal::test_auto_forma...
["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
33
16
1,236
0
0.6
1
0.75
1
0.316
81.223
5,239
swe_smith::train::45588
swe_smith
train
45,588
conan-io__conan.86f29e13.combine_module__2nk1848t
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
Settings validation fails with undefined values I've encountered an issue with the settings validation process. When loading settings with the `ANY` keyword, the validation doesn't seem to handle undefined values correctly. Here's a snippet to reproduce the problem: ```python from conan.internal.model.settings import...
diff --git a/conan/internal/model/profile.py b/conan/internal/model/profile.py index 54aa126..a800961 100644 --- a/conan/internal/model/profile.py +++ b/conan/internal/model/profile.py @@ -61,14 +61,6 @@ class Profile: return result - @property - def package_settings_values(self): - if self._p...
["test/unittests/model/profile_test.py::ProfileTest::test_package_settings_update", "test/unittests/model/settings_test.py::SettingsLoadsTest::test_any", "test/unittests/model/settings_test.py::SettingsLoadsTest::test_getattr_none", "test/unittests/model/settings_test.py::SettingsLoadsTest::test_nested_any", "test/unit...
["test/unittests/model/profile_test.py::ProfileTest::test_apply", "test/unittests/model/profile_test.py::ProfileTest::test_profile_dump_order", "test/unittests/model/profile_test.py::ProfileTest::test_profile_settings_update", "test/unittests/model/profile_test.py::ProfileTest::test_profile_subsettings_update", "test/u...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
35
18
1,196
0
0.6
1
0.75
1
0.316
81.223
5,240
swe_smith::train::35904
swe_smith
train
35,904
stanfordnlp__dspy.651a4c71.lm_rewrite__ig60nzlq
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# PythonInterpreter fails to handle FileNotFoundError when Deno is not installed ## Description When trying to use the PythonInterpreter functionality, if Deno is not installed on the system, the code fails with an unhelpful error message instead of providing clear installation instructions. ## To Reproduce Steps to ...
diff --git a/dspy/primitives/python_interpreter.py b/dspy/primitives/python_interpreter.py index 7cb63bf..6807c82 100644 --- a/dspy/primitives/python_interpreter.py +++ b/dspy/primitives/python_interpreter.py @@ -35,26 +35,18 @@ class PythonInterpreter: return os.path.join(current_dir, "runner.js") def ...
["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
30
4
1,295
0
0.6
1
0.75
1
0.315833
81.2225
5,241
swe_smith::train::3556
swe_smith
train
3,556
pygments__pygments.27649ebb.combine_file__xy5t2imq
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
PostgresConsoleLexer breaks with AttributeError on 'NoneType' object #### Description The PostgresConsoleLexer is throwing an AttributeError when processing certain input. The lexer appears to be trying to access attributes or methods on a None object, causing it to fail during tokenization. #### Steps/Code to Repro...
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py index 9016538..4ccbcbc 100644 --- a/pygments/lexers/sql.py +++ b/pygments/lexers/sql.py @@ -288,8 +288,8 @@ class lookahead: return self def send(self, i): - self._nextitem = i - return i + self._nextitem = None + r...
["tests/test_basic_api.py::test_random_input[PostgresConsoleLexer]", "tests/test_basic_api.py::test_lexer_options[PostgresConsoleLexer]", "tests/examplefiles/psql/psql_session.txt::"]
["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
42
3
1,054
0
0.6
1
0.75
1
0.315667
81.222
5,242
swe_smith::train::19693
swe_smith
train
19,693
kurtmckee__feedparser.cad965a3.combine_module__1w1q577v
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
**Describe the bug** There are two issues with the feed parsing functionality: 1. DC namespace description handling is broken - descriptions are not properly processed 2. Media RSS thumbnail handling is broken - thumbnails are stored as a dictionary instead of a list, causing KeyError when accessing them **To Reprod...
diff --git a/feedparser/namespaces/dc.py b/feedparser/namespaces/dc.py index 37c1619..bb9df76 100644 --- a/feedparser/namespaces/dc.py +++ b/feedparser/namespaces/dc.py @@ -46,7 +46,7 @@ class Namespace: self._end_updated() def _end_dc_description(self): - self._end_description() + self._s...
["tests/test_well_formed.py::test_strict_parser[info1153]", "tests/test_well_formed.py::test_loose_parser[info1153]", "tests/test_well_formed.py::test_loose_parser[info1518]", "tests/test_well_formed.py::test_strict_parser[info1518]"]
["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
2
8
4
1,733
0
0.6
1
0.75
1
0.3155
81.2215
5,243
swe_smith::train::91
swe_smith
train
91
oauthlib__oauthlib.1fd52536.combine_file__imz32t7h
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RefreshTokenGrant constructor breaks with request_validator parameter #### Description The RefreshTokenGrant class constructor is not properly handling the request_validator parameter, causing issues when trying to create token responses. #### Steps/Code to Reproduce ```python from oauthlib.oauth2.rfc6749.grant_typ...
diff --git a/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py b/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py index 43bf55a..8aceeba 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py +++ b/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py @@ -22,8 +22,8 @@ class RefreshTokenGrant(GrantType...
["tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_authenticate_client_id", "tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_authentication_required", "tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_authenticatio...
["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
25
56
1,393
0
0.6
1
0.75
1
0.3155
81.2215
5,244
swe_smith::train::35757
swe_smith
train
35,757
stanfordnlp__dspy.651a4c71.func_pm_remove_cond__dxhidho8
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Bug: Parallel execution in DSPy returns None instead of results ## Description I'm trying to use the `Parallel` class in DSPy to execute multiple predictors in parallel, but I'm encountering an issue where the execution returns `None` instead of the expected results. ## Steps to reproduce I created a simple modul...
diff --git a/dspy/predict/parallel.py b/dspy/predict/parallel.py index 03a4235..aab0d88 100644 --- a/dspy/predict/parallel.py +++ b/dspy/predict/parallel.py @@ -63,11 +63,5 @@ class Parallel: # Execute the processing function over the execution pairs results = executor.execute(process_pair, exec_pai...
["tests/predict/test_parallel.py::test_parallel_module", "tests/predict/test_parallel.py::test_batch_module", "tests/predict/test_parallel.py::test_nested_parallel_module", "tests/predict/test_parallel.py::test_nested_batch_method"]
["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
6
4
1,772
0
0.6
1
0.75
1
0.315333
81.221
5,245
swe_smith::train::29
swe_smith
train
29
oauthlib__oauthlib.1fd52536.combine_file__5wgd819s
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
TokenEndpoint constructor parameters swapped causing AttributeError #### Description The TokenEndpoint constructor has its parameters mixed up, causing grant_types and default_token_type to be assigned incorrectly. This leads to various AttributeErrors when trying to access token endpoint functionality. #### Steps/C...
diff --git a/oauthlib/oauth2/rfc6749/endpoints/token.py b/oauthlib/oauth2/rfc6749/endpoints/token.py index ab9e091..ffcec12 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/token.py +++ b/oauthlib/oauth2/rfc6749/endpoints/token.py @@ -62,13 +62,13 @@ class TokenEndpoint(BaseEndpoint): def __init__(self, default_gr...
["tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_backend", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_legacy", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::tes...
["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
36
44
1,172
0
0.6
1
0.75
1
0.315333
81.221
5,246
swe_smith::train::31163
swe_smith
train
31,163
scrapy__scrapy.35212ec5.combine_module__0gn92m5n
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
### Issue: FileNotFoundError when generating spiders and projects #### Current Problem When attempting to generate a new spider or start a new project using the `genspider` or `startproject` commands, a `FileNotFoundError` is raised. This error occurs even when the specified template or project directory exists and i...
diff --git a/scrapy/commands/genspider.py b/scrapy/commands/genspider.py index 6d4aec3..6751b41 100644 --- a/scrapy/commands/genspider.py +++ b/scrapy/commands/genspider.py @@ -113,13 +113,10 @@ class Command(ScrapyCommand): if not opts.force and self._spider_exists(name): return - - temp...
["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::StartprojectTemplatesTest::test_startproject_permissions_from_read_only", "tests...
["tests/test_commands.py::CommandSettings::test_help_formatter", "tests/test_commands.py::CommandSettings::test_settings_json_string", "tests/test_commands.py::MiscCommandsTest::test_command_not_found", "tests/test_commands.py::ViewCommandTest::test_methods", "tests/test_commands.py::PopCommandNameTest::test_no_command...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
2
36
55
1,172
0
0.6
1
0.75
1
0.315333
81.221
5,247
swe_smith::train::26689
swe_smith
train
26,689
pylint-dev__astroid.b114f6b5.pr_2380
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
# Filename not set in SyntaxError when parsing Python code with modname ## Description When parsing Python code with a syntax error using `AstroidBuilder.string_build()`, the filename in the resulting `SyntaxError` is not correctly set to the module name provided in the `modname` parameter. ## Steps to Reproduce ``...
diff --git a/astroid/_ast.py b/astroid/_ast.py index e3ad97d..0846d43 100644 --- a/astroid/_ast.py +++ b/astroid/_ast.py @@ -22,11 +22,7 @@ class ParserModule(NamedTuple): bin_op_classes: dict[type[ast.operator], str] context_classes: dict[type[ast.expr_context], Context] - def parse( - self, stri...
["tests/test_builder.py::BuilderTest::test_data_build_error_filename"]
["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
2
16
1
1,572
0
0.6
1
0.75
1
0.315333
81.221
5,248
swe_smith::train::19477
swe_smith
train
19,477
seperman__deepdiff.ed252022.lm_rewrite__5pe274si
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
# Unpickling fails when safe_to_import is a string **Describe the bug** When trying to unpickle an object with `safe_to_import` parameter as a string, it fails to properly handle the string value. This happens because the string value is not being properly converted to a set. **To Reproduce** Steps to reproduce the b...
diff --git a/deepdiff/serialization.py b/deepdiff/serialization.py index aa56399..efd7ebf 100644 --- a/deepdiff/serialization.py +++ b/deepdiff/serialization.py @@ -310,20 +310,24 @@ class SerializationMixin: class _RestrictedUnpickler(pickle.Unpickler): - def __init__(self, *args, **kwargs): - self.safe...
["tests/test_serialization.py::TestPickling::test_unpickling_object_that_is_not_imported_raises_error"]
["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
30
1
1,291
0
0.6
1
0.75
1
0.315167
81.2205
5,249
swe_smith::train::33296
swe_smith
train
33,296
django-money__django-money.835c1ab8.lm_rewrite__zza1zhvx
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
# Money string formatting broken when not using localization When using the `Money` class with localization turned off, the string representation is broken. The issue occurs because the `__str__` method is not properly handling the case when localization is disabled. ## Steps to reproduce ```python from djmoney.mone...
diff --git a/djmoney/money.py b/djmoney/money.py index 51c436b..21eacde 100644 --- a/djmoney/money.py +++ b/djmoney/money.py @@ -98,15 +98,27 @@ class Money(DefaultMoney): return self.use_l10n def __str__(self): - format_options = { - **MONEY_FORMAT, - **(self.format_options...
["tests/contrib/exchange/test_model.py::test_without_installed_exchange", "tests/test_form.py::TestValidation::test_default_django_validator", "tests/test_models.py::test_override_decorator", "tests/migrations/test_migrations.py::TestMigrationFramework::test_rename_field", "tests/test_admin.py::test_display_for_field[v...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
1
30
12
1,291
0
0.6
1
0.75
1
0.315167
81.2205
5,250
swe_smith::train::35813
swe_smith
train
35,813
stanfordnlp__dspy.651a4c71.func_pm_remove_loop__es6nxal8
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# ChatAdapter parse method not processing input correctly I'm using DSPy 2.3.5 and encountering an issue with the ChatAdapter's parse method. When trying to use any module that relies on the ChatAdapter, I get errors about expected fields not being found. ## Description The ChatAdapter's parse method is not correctl...
diff --git a/dspy/adapters/chat_adapter.py b/dspy/adapters/chat_adapter.py index b11e5c1..a2ee242 100644 --- a/dspy/adapters/chat_adapter.py +++ b/dspy/adapters/chat_adapter.py @@ -150,16 +150,6 @@ class ChatAdapter(Adapter): def parse(self, signature: Type[Signature], completion: str) -> dict[str, Any]: ...
["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_sync_call", "tests/adapters/test_json_adapter.py::test_json_adapter_async_call", "tests/adapters/test_two_step_adapter.py::tes...
["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_on_pydantic_model", "tests/adapters/test_json_adapter.py::test_json_adapter_parse_raise_error_on_mismatch_fields", "tests/adapters/test_two_step_a...
jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71
true
null
1
11
74
1,669
0
0.6
1
0.75
1
0.314833
81.2195
5,251
swe_smith::train::39632
swe_smith
train
39,632
pallets__jinja.ada0a9a6.lm_rewrite__yago43vx
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### Issue: Unexpected TypeError in Jinja2 Async Utilities #### Description It seems there's an issue with the `async_variant` decorator in the `jinja2.async_utils` module. After a recent change, several functions that rely on this decorator are now raising `TypeError` exceptions. This is affecting both synchronous an...
diff --git a/src/jinja2/async_utils.py b/src/jinja2/async_utils.py index f0c1402..46756e0 100644 --- a/src/jinja2/async_utils.py +++ b/src/jinja2/async_utils.py @@ -36,17 +36,11 @@ def async_variant(normal_func): # type: ignore @wraps(normal_func, assigned=normal_func_attrs) @wraps(async_func, assi...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "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/test_api.py::TestUndefined::test_debug_undefined", "tests/test_api....
["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", "tests/test_api.py::TestExtendedAPI::test_eval_finalize", "tes...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
12
18
1,649
0
0.6
1
0.75
1
0.314833
81.2195
5,252
swe_smith::train::42338
swe_smith
train
42,338
r1chardj0n3s__parse.30da9e4f.combine_file__p70qcld7
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
Parser returns None instead of compiled regex, breaking all parsing functionality #### Description The parser is completely broken and returns None for all parsing operations. When trying to parse any string, the parser fails with AttributeError because it's trying to call methods on None instead of a compiled regex ...
diff --git a/parse.py b/parse.py index 80242e1..25432b6 100644 --- a/parse.py +++ b/parse.py @@ -446,13 +446,10 @@ class Parser(object): try: self.__search_re = re.compile(self._expression, self._re_flags) except AssertionError: - # access error through sys to k...
["README.rst::README.rst", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_bugs.py::test_user_type_with_group_count_issue60", "tests/test_bugs.py::test_unused_centered_alignment_bug", "tests/test_bugs.py::test_unused_left_alignment_bug", "tests/test_fi...
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_bugs.py::test_unmatched_brace_doesnt_match", "tests/test_bugs.py::test_pickling_bug_110", "tests/test_bugs.py::test_match_trailing_n...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
29
45
1,308
0
0.6
1
0.75
1
0.314667
81.219
5,253
swe_smith::train::21991
swe_smith
train
21,991
life4__textdistance.c3aca916.func_pm_ctrl_shuffle__ihbf6pmj
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
DamerauLevenshtein unrestricted algorithm broken due to variable ordering #### Description The DamerauLevenshtein distance calculation with `restricted=False` is returning incorrect results. When computing the unrestricted Damerau-Levenshtein distance, the algorithm fails with `UnboundLocalError` for variables that s...
diff --git a/textdistance/algorithms/edit_based.py b/textdistance/algorithms/edit_based.py index 0a6e02f..8ac331d 100644 --- a/textdistance/algorithms/edit_based.py +++ b/textdistance/algorithms/edit_based.py @@ -203,24 +203,6 @@ class DamerauLevenshtein(_Base): return d[len(s1) - 1][len(s2) - 1] def _p...
["tests/test_edit/test_damerau_levenshtein.py::test_distance_unrestricted[test-text-1]", "tests/test_edit/test_damerau_levenshtein.py::test_distance_unrestricted[test-tset-1]", "tests/test_edit/test_damerau_levenshtein.py::test_distance_unrestricted[test-qwy-4]", "tests/test_edit/test_damerau_levenshtein.py::test_dista...
["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
1
35
22
1,188
0
0.6
1
0.75
1
0.314667
81.219
5,254
swe_smith::train::26540
swe_smith
train
26,540
pylint-dev__astroid.b114f6b5.lm_rewrite__6eunb0j3
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
### AttributeError in Const Node Class #### Description After the recent changes, it seems that the `Const` node class is encountering an `AttributeError` when attempting to access certain attributes. This issue appears to be affecting various parts of the codebase, particularly in areas related to inference and attr...
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index fde3239..c38f873 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -2091,16 +2091,22 @@ class Const(_base_nodes.NoChildrenNode, Instance): infer_binary_op = protocols.const_infer_binary_op def __...
["tests/brain/test_brain.py::TypingBrain::test_namedtuple_can_correctly_access_methods", "tests/brain/test_brain.py::test_infer_int", "tests/brain/test_brain.py::TestFunctoolsPartial::test_inferred_partial_function_calls", "tests/brain/test_ctypes.py::test_other_ctypes_member_untouched", "tests/brain/test_enum.py::Enum...
["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
54
1,408
0
0.6
1
0.75
1
0.314667
81.219
5,255
swe_smith::train::38133
swe_smith
train
38,133
weaveworks__grafanalib.5c3b17ed.lm_rewrite__0jupbouz
swesmith/weaveworks__grafanalib.5c3b17ed
weaveworks/grafanalib
python
null
Color code validation now accepts any length of hexadecimal digits Description I noticed a change in behavior with the color code validator in grafanalib. Previously, the validator would only accept color codes that were exactly 7 characters long (e.g., #37872D), but now it accepts color codes of any length as long a...
diff --git a/grafanalib/validators.py b/grafanalib/validators.py index e7c69a2..6673c78 100644 --- a/grafanalib/validators.py +++ b/grafanalib/validators.py @@ -47,16 +47,11 @@ def is_color_code(instance, attribute, value): Value considered as valid color code if it starts with # char followed by hexadecimal....
["grafanalib/tests/test_validators.py::test_is_color_code_raises[#1111111]", "grafanalib/tests/test_validators.py::test_is_color_code_raises[#11111]"]
["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
15
2
1,587
0
0.6
1
0.75
1
0.3145
81.2185
5,256
swe_smith::train::31882
swe_smith
train
31,882
davidhalter__parso.338a5760.func_basic__4utl4ys2
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Diff parser crashes with AttributeError when accessing node attributes #### Description The diff parser is throwing AttributeError exceptions when trying to access attributes on various node types during parsing operations. This appears to affect multiple node types including 'Name', 'Keyword', 'Newline', and 'String...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..84a046e 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -625,19 +625,19 @@ class _NodesTree: def _update_parsed_node_tos(self, tree_node, keyword_token_indents): if tree_node.type == 'suite': - def_leaf = ...
["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
14
60
1,607
0
0.6
1
0.75
1
0.3145
81.2185
5,257
swe_smith::train::11
swe_smith
train
11
oauthlib__oauthlib.1fd52536.combine_file__1utlssis
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RequestValidator methods should raise NotImplementedError but return values instead #### Description The base RequestValidator class has methods that are supposed to raise NotImplementedError to force subclasses to implement them, but some methods are now returning boolean values or implementing default behavior inst...
diff --git a/oauthlib/oauth2/rfc6749/request_validator.py b/oauthlib/oauth2/rfc6749/request_validator.py index 6d6ebaa..fa93788 100644 --- a/oauthlib/oauth2/rfc6749/request_validator.py +++ b/oauthlib/oauth2/rfc6749/request_validator.py @@ -181,7 +181,7 @@ class RequestValidator: Method is used by: ...
["tests/oauth2/rfc6749/test_request_validator.py::RequestValidatorTest::test_method_contracts"]
["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
27
1
1,347
0
0.6
1
0.75
1
0.3145
81.2185
5,258
swe_smith::train::46696
swe_smith
train
46,696
python-trio__trio.cfbbe2c1.combine_file__ym7bp5yo
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SocketStream.setsockopt parameter validation logic inverted #### Description The parameter validation logic in `SocketStream.setsockopt` appears to be inverted, causing incorrect behavior when setting socket options. #### Steps/Code to Reproduce ```python import trio import socket async def main(): sock = trio...
diff --git a/src/trio/_highlevel_socket.py b/src/trio/_highlevel_socket.py index c04e66e..4405d32 100644 --- a/src/trio/_highlevel_socket.py +++ b/src/trio/_highlevel_socket.py @@ -33,15 +33,22 @@ _closed_stream_errnos = { @contextmanager -def _translate_socket_errors_to_stream_errors() -> Generator[None, None, No...
["src/trio/_tests/test_highlevel_open_tcp_listeners.py::test_open_tcp_listeners_basic", "src/trio/_tests/test_highlevel_open_tcp_listeners.py::test_open_tcp_listeners_specific_port_specific_host", "src/trio/_tests/test_highlevel_open_tcp_listeners.py::test_open_tcp_listeners_ipv6_v6only", "src/trio/_tests/test_highleve...
["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
48
32
926
0
0.6
1
0.75
1
0.314333
81.218
5,259
swe_smith::train::7168
swe_smith
train
7,168
cantools__cantools.0c6a7871.combine_module__k1b57l40
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# Unable to retrieve data by name in DID objects #### Minimal example ```python import cantools # Create a simple DID with data did = cantools.database.diagnostics.did.Did( identifier=0x1234, name='TestDID', datas=[{'name': 'TestData', 'start': 0, 'length': 8}] ) # This fails data = did.get_data_by_name(...
diff --git a/src/cantools/database/diagnostics/did.py b/src/cantools/database/diagnostics/did.py index 5a0712c..a8b1135 100644 --- a/src/cantools/database/diagnostics/did.py +++ b/src/cantools/database/diagnostics/did.py @@ -71,12 +71,18 @@ class Did: self._datas = value def get_data_by_name(self, name)...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_le_example_cdd", "tests/test_diagnostics_database.py::C...
["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_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
2
16
4
1,565
0
0.6
1
0.75
1
0.314167
81.2175
5,260
swe_smith::train::11649
swe_smith
train
11,649
andialbrecht__sqlparse.e57923b3.combine_module__x9bxhim7
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
# SQL formatting broken after recent changes I was trying to format some SQL queries and noticed that the formatting is completely broken. The indentation and alignment are not working correctly anymore. ## Steps to Reproduce ```python import sqlparse # Example 1: Basic formatting sql = 'select * from foo where bar...
diff --git a/sqlparse/filters/aligned_indent.py b/sqlparse/filters/aligned_indent.py index dc60926..f94d220 100644 --- a/sqlparse/filters/aligned_indent.py +++ b/sqlparse/filters/aligned_indent.py @@ -87,15 +87,25 @@ class AlignedIndentFilter: tlist.insert_after(cond[-1], ws) def _next_token(sel...
["tests/test_cli.py::test_valid_args", "tests/test_format.py::TestFormatReindentAligned::test_basic", "tests/test_format.py::TestFormatReindentAligned::test_case_statement", "tests/test_format.py::TestFormatReindentAligned::test_case_statement_with_between", "tests/test_format.py::TestFormatReindent::test_stmts", "test...
["tests/test_cli.py::test_cli_main_empty", "tests/test_cli.py::test_parser_empty", "tests/test_cli.py::test_main_help", "tests/test_cli.py::test_invalid_choice", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfile", "tests/test_cli.py::test_stdout",...
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
true
null
2
39
40
1,105
0
0.6
1
0.75
1
0.314167
81.2175
5,261
swe_smith::train::1904
swe_smith
train
1,904
agronholm__typeguard.b6a7e438.func_pm_remove_cond__1347lcxz
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking fails for protocols, TypeVars, and NewType after recent changes #### Description Type checking is no longer working for several built-in type constructs including protocols, TypeVars, and NewType. The type checker appears to be silently passing validation when it should be raising TypeCheckError for inv...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..3b1de10 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -1021,27 +1021,9 @@ def builtin_checker_lookup( ): # NamedTuple return check_tuple - elif getattr(origin_type, "_is_protocol",...
["tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestTypevar::test_bound_fail", "tests/test_checkers.py::TestTypevar::test_collection_constraints_fail", "tests/test_checkers.py::TestTypevar::test_constraints_fail", "tests/test_checkers.py::TestNewType::test_simple_bad_value", "tests/test_c...
["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::TestBytesLike::test_valid[bytes]", "tests/test_checkers.py::TestBytesLike:...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
18
29
1,522
0
0.6
1
0.75
1
0.313667
81.216
5,262
swe_smith::train::17846
swe_smith
train
17,846
pyasn1__pyasn1.0f07d724.func_pm_class_rm_funcs__acghue52
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
ObjectIdentifier methods missing after recent changes #### Description The ObjectIdentifier class is missing several essential methods that were previously available. When trying to use basic functionality like string conversion, input parsing, or prefix checking, the methods are no longer found. #### Steps/Code to ...
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py index 9aff5e6..9678cf3 100644 --- a/pyasn1/type/univ.py +++ b/pyasn1/type/univ.py @@ -1106,59 +1106,6 @@ class ObjectIdentifier(base.SimpleAsn1Type): def index(self, suboid): return self._value.index(suboid) - def isPrefixOf(self, other): - ...
["tests/codec/native/test_encoder.py::ObjectIdentifierEncoderTestCase::testOne", "tests/type/test_univ.py::ObjectIdentifier::testContains", "tests/type/test_univ.py::ObjectIdentifier::testInput1", "tests/type/test_univ.py::ObjectIdentifier::testInput3", "tests/type/test_univ.py::ObjectIdentifier::testPrefix", "tests/ty...
["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
53
10
822
0
0.6
1
0.75
1
0.313667
81.216
5,263
swe_smith::train::52369
swe_smith
train
52,369
pydicom__pydicom.7d361b3d.func_pm_ctrl_invert_if__94k7cb3m
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
dcmwrite() error messages swapped for command set and file meta elements #### Description When using `dcmwrite()` with invalid elements, the error messages are incorrect. Command set elements (0000,eeee) show the file meta error message, and file meta elements (0002,eeee) show the command set error message. #### Ste...
diff --git a/src/pydicom/filewriter.py b/src/pydicom/filewriter.py index cb3ce64..ec46ecf 100644 --- a/src/pydicom/filewriter.py +++ b/src/pydicom/filewriter.py @@ -1329,13 +1329,13 @@ def dcmwrite( if bad_tags: if 0 in bad_tags: raise ValueError( - "Command Set elements (0000,...
["tests/test_filewriter.py::TestDCMWrite::test_command_set_raises", "tests/test_filewriter.py::TestDCMWrite::test_file_meta_raises"]
["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
9
2
1,701
0
0.6
1
0.75
1
0.3135
81.2155
5,264
swe_smith::train::26533
swe_smith
train
26,533
pylint-dev__astroid.b114f6b5.lm_rewrite__4hu12er2
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
# TypeError when using typing aliases like List, Dict, etc. ## Description I'm encountering an issue with typing aliases (List, Dict, Set, etc.) not working properly. When I try to use them with type annotations, they fail to be subscriptable. Here's a minimal example: ```python import typing typing.List[int] # Th...
diff --git a/astroid/brain/brain_typing.py b/astroid/brain/brain_typing.py index c44687b..c6b1d54 100644 --- a/astroid/brain/brain_typing.py +++ b/astroid/brain/brain_typing.py @@ -367,38 +367,40 @@ def _looks_like_special_alias(node: Call) -> bool: ) -def infer_special_alias( - node: Call, ctx: context.Inf...
["tests/brain/test_brain.py::TypingBrain::test_typing_object_builtin_subscriptable"]
["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
34
1
1,201
0
0.6
1
0.75
1
0.3135
81.2155
5,265
swe_smith::train::18352
swe_smith
train
18,352
msiemens__tinydb.10644a0e.func_pm_ctrl_shuffle__fm28hkim
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Document ID generation broken after recent changes #### Description After some recent changes to the `_get_next_id` method in the Table class, document ID generation is completely broken. When trying to insert documents into a TinyDB database, I'm getting `UnboundLocalError: local variable 'next_id' referenced before...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..b2bbb6c 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -661,16 +661,6 @@ class Table: yield self.document_class(doc, self.document_id_class(doc_id)) def _get_next_id(self): - """ - Return the ID for a newly inserted d...
["tests/test_middlewares.py::test_caching_json_write", "tests/test_storages.py::test_json_kwargs", "tests/test_storages.py::test_json_readwrite", "tests/test_storages.py::test_json_read", "tests/test_storages.py::test_in_memory_close", "tests/test_storages.py::test_read_once", "tests/test_storages.py::test_yaml", "test...
["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
29
21
1,301
0
0.6
1
0.75
1
0.3135
81.2155
5,266
swe_smith::train::31848
swe_smith
train
31,848
davidhalter__parso.338a5760.combine_module__x5huaoqy
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
DiffParser returns integer instead of node in _get_old_line_stmt When using the DiffParser, the `_get_old_line_stmt` method is returning an integer (0) instead of a proper node object in certain cases. This causes AttributeError when the returned value is used as if it were a node. #### Steps/Code to Reproduce ```py...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..bb615f4 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -390,19 +390,16 @@ class DiffParser: def _get_old_line_stmt(self, old_line): leaf = self._module.get_leaf_for_position((old_line, 0), include_prefixes=True) - ...
["test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_parser.py::test_one_statement_func", "test/test_diff_parser.py::test_for_on_one_line", "test/test_diff_pa...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
2
44
79
1,000
0
0.6
1
0.75
1
0.313333
81.215
5,267
swe_smith::train::31383
swe_smith
train
31,383
benoitc__gunicorn.bacbf8aa.combine_file__k0np4311
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
# Gunicorn PID file validation broken ### Bug description I've discovered an issue with the PID file validation in Gunicorn. When trying to use a PID file to manage my Gunicorn processes, I'm encountering unexpected behavior. The problem appears to be in the `pidfile.py` module where the initialization of the `Pidfi...
diff --git a/gunicorn/pidfile.py b/gunicorn/pidfile.py index b171f7d..9728ebe 100644 --- a/gunicorn/pidfile.py +++ b/gunicorn/pidfile.py @@ -15,8 +15,8 @@ class Pidfile: """ def __init__(self, fname): - self.fname = fname - self.pid = None + self.fname = None + self.pid = fname ...
["tests/test_pidfile.py::test_validate_file_pid_exists", "tests/test_pidfile.py::test_validate_file_pid_exists_kill_exception"]
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
16
2
1,560
0
0.6
1
0.75
1
0.313333
81.215
5,268
swe_smith::train::183
swe_smith
train
183
oauthlib__oauthlib.1fd52536.combine_file__zakonm6w
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RequestValidator methods return unexpected values instead of raising NotImplementedError #### Description When using the OAuth1 RequestValidator, some methods are returning hardcoded values or executing unexpected code paths instead of properly raising NotImplementedError to indicate they need to be implemented by su...
diff --git a/oauthlib/oauth1/rfc5849/request_validator.py b/oauthlib/oauth1/rfc5849/request_validator.py index e937aab..e999e89 100644 --- a/oauthlib/oauth1/rfc5849/request_validator.py +++ b/oauthlib/oauth1/rfc5849/request_validator.py @@ -136,7 +136,7 @@ class RequestValidator: @property def nonce_length(...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_validate_client_key", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_validate_request_token", "tes...
["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_authorization.py::AuthorizationEndpointTest::test_create_authorization_resp...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
26
19
1,360
0
0.6
1
0.75
1
0.313333
81.215
5,269
swe_smith::train::44400
swe_smith
train
44,400
pydata__patsy.a5d16484.func_pm_remove_assign__266x6wlz
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
# NameError when executing code in EvalEnvironment.capture ## Description I'm encountering a `NameError` when trying to execute code that uses `EvalEnvironment.capture()`. The code was working fine before, but after some recent changes, it's now failing with a `NameError` for a variable that should be defined. ## St...
diff --git a/patsy/eval.py b/patsy/eval.py index 9d1fba0..fb7b086 100644 --- a/patsy/eval.py +++ b/patsy/eval.py @@ -340,13 +340,6 @@ def test_EvalEnvironment_capture_flags(): " RETURN_INNER_FROM_OUTER = call_capture_1()\n" "f()\n" ) - code = compile(source, "<test string>", "exec", 0, 1) -...
["patsy/eval.py::test_EvalEnvironment_capture_flags"]
["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
8
1
1,720
0
0.6
1
0.75
1
0.313333
81.215
5,270
swe_smith::train::24749
swe_smith
train
24,749
marshmallow-code__marshmallow.9716fc62.func_basic__oou5e48o
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
Schema validation errors not being stored properly #### Description Schema validators decorated with `@validates_schema` are not properly storing validation errors. When validation fails, the errors are being silently ignored instead of being collected and returned in the validation results. #### Steps/Code to Repro...
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index e21768e..6fa7519 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -768,12 +768,12 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta): index=None, ): try: - if pass_original: # Pass ori...
["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.py::TestValidatesSchemaDecorator::test_validator_nested_many_pass_original_and_pass_many[True-expec...
["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
8
11
1,719
0
0.6
1
0.75
1
0.313167
81.2145
5,271
swe_smith::train::6861
swe_smith
train
6,861
joke2k__faker.8b401a7d.lm_rewrite__hp8xn3tk
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
### AttributeError in Profile Provider #### Description When generating a profile using the `profile` method from the `ProfileProvider`, an `AttributeError` is raised. The error message indicates that the `'Generator' object has no attribute 'blood_group'`. #### Steps to Reproduce 1. Create a `ProfileProvider` inst...
diff --git a/faker/providers/profile/__init__.py b/faker/providers/profile/__init__.py index 6f909e0..bf2729b 100644 --- a/faker/providers/profile/__init__.py +++ b/faker/providers/profile/__init__.py @@ -32,29 +32,42 @@ class Provider(BaseProvider): "birthdate": self.generator.date_of_birth(), } ...
["tests/providers/test_profile.py::TestProfileProvider::test_profile"]
["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
45
1
978
0
0.6
1
0.75
1
0.313
81.214
5,272
swe_smith::train::31419
swe_smith
train
31,419
benoitc__gunicorn.bacbf8aa.combine_module__7seo70ru
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
HTTP request parsing fails with TypeError and AttributeError #### Description When processing HTTP requests, the server encounters multiple errors related to incorrect initialization of internal components. The errors manifest as `TypeError: must be str, not bytes` and `AttributeError: 'NoneType' object has no attrib...
diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py index d7ee29e..0c51e73 100644 --- a/gunicorn/http/body.py +++ b/gunicorn/http/body.py @@ -11,9 +11,9 @@ from gunicorn.http.errors import (NoMoreData, ChunkMissingTerminator, class ChunkedReader: def __init__(self, req, unreader): - self.req = req...
["tests/test_http.py::test_readline_empty_body", "tests/test_http.py::test_readline_new_line_before_size", "tests/test_http.py::test_readline_new_line_after_size", "tests/test_http.py::test_readline_no_new_line", "tests/test_http.py::test_readline_buffer_loaded", "tests/test_http.py::test_readline_buffer_loaded_with_si...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
2
22
56
1,438
0
0.6
1
0.75
1
0.313
81.214
5,273
swe_smith::train::35532
swe_smith
train
35,532
stanfordnlp__dspy.651a4c71.func_pm_ctrl_shuffle__itkvw022
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# DeeplakeRM forward method has incorrect code order causing retrieval failures ### Summary I've discovered an issue with the `DeeplakeRM` class in the retrieval module. The `forward` method has code in the wrong order, causing it to fail when trying to retrieve passages. ### Reproducer The issue can be reproduced wi...
diff --git a/dspy/retrieve/deeplake_rm.py b/dspy/retrieve/deeplake_rm.py index a126941..c222306 100644 --- a/dspy/retrieve/deeplake_rm.py +++ b/dspy/retrieve/deeplake_rm.py @@ -80,7 +80,10 @@ class DeeplakeRM(dspy.Retrieve): def forward( self, query_or_queries: Union[str, List[str]], k: Optional[int],**kw...
["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
28
4
1,317
0
0.6
1
0.75
1
0.312833
81.2135
5,274
swe_smith::train::21159
swe_smith
train
21,159
tobymao__sqlglot.036601ba.lm_rewrite__q7yz2vxq
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
### Bug: AttributeError when parsing SQL with "IF" clause #### Description After the recent changes, it seems that parsing SQL statements containing the "IF" clause results in an `AttributeError`. This issue affects various SQL dialects, including but not limited to Athena, BigQuery, Clickhouse, Databricks, and other...
diff --git a/sqlglot/parser.py b/sqlglot/parser.py index 248a128..6e48ad7 100644 --- a/sqlglot/parser.py +++ b/sqlglot/parser.py @@ -1858,13 +1858,26 @@ class Parser(metaclass=_Parser): concurrently=concurrently, ) - def _parse_exists(self, not_: bool = False) -> t.Optional[bool]: - re...
["tests/dialects/test_athena.py::TestAthena::test_athena", "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_quoting", "tests/dialects/test_bigquery.py::TestBigQuery::test_bigquery", "tests/dialects/...
["tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_bigquery.py::TestBigQuery::test_annotate_timestamps", "tests/dialects/test_bigquery.py::TestBigQuery::test_convert", "tests/dialects/test_bigquery.py::TestBigQuery::test_errors", "tests/d...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
27
95
1,336
0
0.6
1
0.75
1
0.312667
81.213
5,275
swe_smith::train::43706
swe_smith
train
43,706
sloria__environs.73c372df.func_basic__sclaoaf0
swesmith/sloria__environs.73c372df
sloria/environs
python
null
Env sealing logic inverted causing incorrect behavior #### Description The environment sealing logic appears to be inverted, causing the Env class to behave incorrectly when parsing values. When an Env instance should be sealed and prevent new parsing, it instead allows parsing, and vice versa. #### Steps/Code to Re...
diff --git a/src/environs/__init__.py b/src/environs/__init__.py index 00f6072..6918d54 100644 --- a/src/environs/__init__.py +++ b/src/environs/__init__.py @@ -184,42 +184,42 @@ def _func2method(func: typing.Callable[..., _T], method_name: str) -> typing.Any default: typing.Any = ma.missing, **kwargs...
["tests/test_environs.py::TestCasting::test_enum_cast", "tests/test_environs.py::TestCasting::test_enum_cast_ignore_case", "tests/test_environs.py::TestCasting::test_enum_default", "tests/test_environs.py::TestCustomTypes::test_add_parser", "tests/test_environs.py::TestCustomTypes::test_parser_for", "tests/test_environ...
["tests/test_environs.py::TestCasting::test_call", "tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_basic", "tests/test_environs.py::TestCasting::test_empty_str", "tests/test_environs.py::TestCasting::test_int_cast", "tests/test_environs.py::TestCasting::test_inv...
jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df
true
null
1
34
20
1,196
0
0.6
1
0.75
1
0.312667
81.213
5,276
swe_smith::train::52615
swe_smith
train
52,615
pydicom__pydicom.7d361b3d.func_pm_remove_cond__xkr4prjf
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# NumPy import check missing when converting pixel data to ndarray I'm trying to use pydicom to work with some DICOM images, and I noticed an inconsistent behavior when NumPy is not available. ## Description When trying to convert pixel data to an ndarray using the Decoder class, I expected to get an ImportError if ...
diff --git a/src/pydicom/pixels/decoders/base.py b/src/pydicom/pixels/decoders/base.py index 268f0d4..9376f19 100644 --- a/src/pydicom/pixels/decoders/base.py +++ b/src/pydicom/pixels/decoders/base.py @@ -1651,10 +1651,6 @@ class Decoder(CoderBase): <pydicom.pixels.decoders.base.DecodeRunner.pixel_properti...
["tests/pixels/test_decoder_base.py::TestDecoder::test_missing_numpy_raises"]
["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
25
1
1,376
0
0.6
1
0.75
1
0.312667
81.213
5,277
swe_smith::train::28985
swe_smith
train
28,985
encode__starlette.db5063c2.pr_2583
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
# StaticFiles doesn't handle filenames that are too long correctly ## Description I discovered an issue with the `StaticFiles` class when handling filenames that exceed the system's maximum path length. When a request is made for a file with a name that is too long, instead of returning a 404 Not Found response, the...
diff --git a/starlette/staticfiles.py b/starlette/staticfiles.py index 746e740..8fd26dc 100644 --- a/starlette/staticfiles.py +++ b/starlette/staticfiles.py @@ -1,6 +1,5 @@ from __future__ import annotations -import errno import importlib.util import os import stat @@ -117,12 +116,8 @@ class StaticFiles: ...
["tests/test_staticfiles.py::test_staticfiles_filename_too_long[asyncio]", "tests/test_staticfiles.py::test_staticfiles_filename_too_long[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
11
2
1,655
0
0.6
1
0.75
1
0.3125
81.2125
5,278
swe_smith::train::3561
swe_smith
train
3,561
pygments__pygments.27649ebb.combine_file__yh21kmp3
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
LassoLexer fails with AttributeError: 'list' object has no attribute 'update' #### Description The LassoLexer is throwing an AttributeError when trying to tokenize code. The error occurs during initialization when the lexer attempts to call the `update` method on a list object. #### Steps/Code to Reproduce ```pytho...
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index 891e48e..6981ec8 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -751,44 +751,20 @@ class LassoLexer(RegexLexer): def __init__(self, **options): self.builtinshighlighting = get_bool_opt( - ...
["tests/test_basic_api.py::test_lexer_options[LassoHtmlLexer]", "tests/test_basic_api.py::test_lexer_options[LassoJavascriptLexer]", "tests/test_basic_api.py::test_random_input[LassoHtmlLexer]", "tests/test_basic_api.py::test_random_input[LassoCssLexer]", "tests/test_basic_api.py::test_random_input[LassoJavascriptLexer...
["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
47
15
935
0
0.6
1
0.75
1
0.3125
81.2125
5,279
swe_smith::train::84
swe_smith
train
84
oauthlib__oauthlib.1fd52536.combine_file__h9t9n344
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
Hybrid grant nonce validation logic inverted #### Description The nonce validation in the OpenID Connect hybrid grant flow is incorrectly rejecting requests that should be valid. When using response types like `code id_token` or `code id_token token`, requests with a nonce parameter are being rejected with an "invali...
diff --git a/oauthlib/openid/connect/core/grant_types/hybrid.py b/oauthlib/openid/connect/core/grant_types/hybrid.py index 9c1fc70..7cf60f4 100644 --- a/oauthlib/openid/connect/core/grant_types/hybrid.py +++ b/oauthlib/openid/connect/core/grant_types/hybrid.py @@ -22,41 +22,28 @@ class HybridGrant(GrantTypeBase): ...
["tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridInterferenceTest::test_code_modifier_called", "tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridInterferenceTest::test_create_authorization_grant", "tests/openid/connect/core/grant_types/test_hybrid.py::OpenIDHybridInterferenceTest::te...
["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
33
15
1,214
0
0.6
1
0.75
1
0.312333
81.212
5,280
swe_smith::train::52670
swe_smith
train
52,670
pydicom__pydicom.7d361b3d.lm_rewrite__aqwig9ia
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Description When attempting to decode a `DataElement` with a specific multi-byte encoding, an unexpected `UnicodeDecodeError` is raised. This occurs when the `reading_validation_mode` is set to `RAISE`, and the encoding used is not handled correctly, leading to an illegal multibyte sequence error. ### Expected Be...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..177b02d 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -1772,15 +1772,10 @@ class PersonName: """Return the name as a :class:`str` formatted using `format_str`.""" return format_str % self._create_dict...
["tests/test_charset.py::TestCharset::test_bad_decoded_multi_byte_encoding_enforce_standard"]
["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
11
1
1,654
0
0.6
1
0.75
1
0.312333
81.212
5,281
swe_smith::train::38152
swe_smith
train
38,152
termcolor__termcolor.3a42086f.func_basic__u7mdjl9x
swesmith/termcolor__termcolor.3a42086f
termcolor/termcolor
python
null
# __ALL__ deprecation warning is not being issued ## Description After upgrading to the latest version, I noticed that the deprecation warning for `__ALL__` is no longer being issued. This is a regression from previous behavior. ## How to Reproduce Here's a simple script that demonstrates the issue: ```python impo...
diff --git a/src/termcolor/termcolor.py b/src/termcolor/termcolor.py index 91f155a..479dbde 100644 --- a/src/termcolor/termcolor.py +++ b/src/termcolor/termcolor.py @@ -36,15 +36,10 @@ from ._types import Attribute, Color, Highlight def __getattr__(name: str) -> list[str]: if name == "__ALL__": - warning...
["tests/test_termcolor.py::test_all_deprecation"]
["tests/test_termcolor.py::test_basic", "tests/test_termcolor.py::test_sanity", "tests/test_termcolor.py::test_color[black-\\x1b[30mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[grey-\\x1b[30mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[red-\\x1b[31mtext\\x1b[0m]", "tests/test_termcolor.py::test_color[gr...
jyangballin/swesmith.x86_64.termcolor_1776_termcolor.3a42086f
true
null
1
13
1
1,614
0
0.6
1
0.75
1
0.312333
81.212
5,282
swe_smith::train::22976
swe_smith
train
22,976
graphql-python__graphene.82903263.lm_rewrite__8y59ynh3
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
# InputField with required=True and deprecation_reason fails to validate properly When creating an InputField with both `required=True` and a `deprecation_reason`, the validation logic is broken. ## Reproduction ```python from graphene.types import InputField, InputObjectType from graphene.types.scalars import Strin...
diff --git a/graphene/types/inputfield.py b/graphene/types/inputfield.py index e7ededb..b0f24de 100644 --- a/graphene/types/inputfield.py +++ b/graphene/types/inputfield.py @@ -46,29 +46,27 @@ class InputField(MountedType): **extra_args (optional, Dict): Not used. """ - def __init__( - self, -...
["graphene/types/tests/test_inputfield.py::test_inputfield_required_deprecated", "graphene/types/tests/test_inputobjecttype.py::test_ordered_fields_in_inputobjecttype", "graphene/types/tests/test_type_map.py::test_inputobject"]
["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i...
jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263
true
null
1
34
3
1,194
0
0.6
1
0.75
1
0.312333
81.212
5,283
swe_smith::train::1393
swe_smith
train
1,393
Cog-Creators__Red-DiscordBot.33e0eac7.combine_module__r1qkh2t8
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
[Bug]: Broken bounded_gather and pagify functions ### Bug summary The `bounded_gather` and `pagify` functions in the utils module are broken, causing errors when used. ### Code for reproduction For bounded_gather: ```python import asyncio from redbot.core.utils import bounded_gather async def test(): async def...
diff --git a/redbot/core/utils/__init__.py b/redbot/core/utils/__init__.py index dc3687f..fe599bf 100644 --- a/redbot/core/utils/__init__.py +++ b/redbot/core/utils/__init__.py @@ -237,6 +237,13 @@ def bounded_gather( limit: int = 4, semaphore: Optional[Semaphore] = None, ) -> Awaitable[List[Any]]: + + if...
["tests/core/test_utils.py::test_bounded_gather", "tests/core/test_utils.py::test_pagify_length_hint"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
2
23
2
1,413
0
0.6
1
0.75
1
0.312167
81.2115
5,284
swe_smith::train::14521
swe_smith
train
14,521
hukkin__tomli.443a0c1b.combine_module__wc3tpcay
swesmith/hukkin__tomli.443a0c1b
hukkin/tomli
python
null
# TOML parsing issues with array tables and time parsing ## Bug report **Bug summary** There are two issues with the TOML parser: 1. When using the `[[table]]` syntax (array of tables), the parser fails to properly handle certain cases, resulting in a `KeyError` or `TOMLDecodeError` when parsing valid TOML files. 2...
diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index 16c76cd..cdee18a 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -368,28 +368,24 @@ def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]: def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]: + ...
["tests/test_data.py::TestData::test_invalid", "tests/test_data.py::TestData::test_valid"]
["tests/test_error.py::TestError::test_deprecated_tomldecodeerror", "tests/test_error.py::TestError::test_invalid_char_quotes", "tests/test_error.py::TestError::test_invalid_parse_float", "tests/test_error.py::TestError::test_line_and_col", "tests/test_error.py::TestError::test_missing_value", "tests/test_error.py::Tes...
jyangballin/swesmith.x86_64.hukkin_1776_tomli.443a0c1b
true
null
2
20
2
1,473
0
0.6
1
0.75
1
0.312167
81.2115
5,285
swe_smith::train::28896
swe_smith
train
28,896
encode__starlette.db5063c2.lm_rewrite__1hnmd5s4
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
WebSocket Disconnect Handling Issue Description It seems there's an issue with how WebSocket disconnections are being handled in the latest patch. After applying the recent changes, certain WebSocket operations are not behaving as expected, leading to runtime errors. To reproduce the issue, you can use the following...
diff --git a/starlette/testclient.py b/starlette/testclient.py index 645ca10..3b73d46 100644 --- a/starlette/testclient.py +++ b/starlette/testclient.py @@ -126,15 +126,12 @@ class WebSocketTestSession: def __exit__(self, *args: typing.Any) -> None: try: - self.close(1000) - finally: -...
["tests/test_endpoints.py::test_websocket_endpoint_on_receive_bytes[asyncio]", "tests/test_endpoints.py::test_websocket_endpoint_on_receive_json[asyncio]", "tests/test_endpoints.py::test_websocket_endpoint_on_receive_text[asyncio]", "tests/test_endpoints.py::test_websocket_endpoint_on_receive_bytes[trio]", "tests/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
1
15
20
1,573
0
0.6
1
0.75
1
0.312167
81.2115
5,286
swe_smith::train::9409
swe_smith
train
9,409
jaraco__inflect.c079a96a.lm_rewrite__mj3c0wlu
swesmith/jaraco__inflect.c079a96a
jaraco/inflect
python
null
# `num()` method doesn't properly handle string inputs and type conversion ## Description I discovered an issue with the `num()` method in the `inflect.engine` class. The method doesn't properly handle string inputs and doesn't maintain the expected return type. Given the following code: ```python p = inflect.engin...
diff --git a/inflect/__init__.py b/inflect/__init__.py index 3eef486..d714537 100644 --- a/inflect/__init__.py +++ b/inflect/__init__.py @@ -2221,9 +2221,7 @@ class engine: else: raise UnknownClassicalModeError - def num( - self, count: Optional[int] = None, show: Optional[int]...
["tests/test_pwd.py::Test::test_num"]
["inflect/__init__.py::inflect.bysize", "inflect/__init__.py::inflect.engine._handle_long_compounds", "inflect/__init__.py::inflect.engine._handle_prepositional_phrase", "inflect/__init__.py::inflect.engine.compare", "inflect/__init__.py::inflect.engine.ordinal", "inflect/__init__.py::inflect.engine.singular_noun", "in...
jyangballin/swesmith.x86_64.jaraco_1776_inflect.c079a96a
true
null
1
20
1
1,473
0
0.6
1
0.75
1
0.312167
81.2115
5,287
swe_smith::train::45659
swe_smith
train
45,659
conan-io__conan.86f29e13.combine_module__mjm5s2pl
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
# [Bug]: Hook execution method missing in HookManager ## Bug summary The `execute` method is missing from the `HookManager` class, causing hooks to not be executed during the Conan workflow. ## Code for reproduction ```python from conans.client.hook_manager import HookManager from conans.errors import ConanExceptio...
diff --git a/conans/client/hook_manager.py b/conans/client/hook_manager.py index d213b20..7cc277c 100644 --- a/conans/client/hook_manager.py +++ b/conans/client/hook_manager.py @@ -18,24 +18,6 @@ class HookManager: self.hooks = {} self._load_hooks() # A bit dirty, but avoid breaking tests - def ...
["test/unittests/client/conanfile_loader_test.py::ConanLoaderTest::test_inherit_short_paths", "test/unittests/client/optimize_conanfile_load_test.py::OptimizeConanFileLoadTest::test_multiple_load"]
["test/unittests/client/conan_output_test.py::TestConanOutput::test_output_color_prevent_strip[True-env0]", "test/unittests/client/conan_output_test.py::TestConanOutput::test_output_color_prevent_strip[True-env1]", "test/unittests/client/conan_output_test.py::test_output_forced[1]", "test/unittests/client/conan_output_...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
35
2
1,172
0
0.6
1
0.75
1
0.312
81.211
5,288
r2e_gym::train::6174
r2e_gym
train
6,174
pillow__e625f7311965abd0a88992ca215d8ad61a27715e
pillow
python-pillow/pillow
python
e625f7311965abd0a88992ca215d8ad61a27715e
**Title:** `IcnsImageFile.load()` Raises Errors When Handling Scaled Sizes **Description:** When attempting to load an ICNS image with specific scaling parameters, the `load()` method in `IcnsImageFile` raises errors. This behavior occurs because the method does not accept a `scale` argument and fails to handle image ...
diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -330,6 +330,18 @@ will be reset to a 2-tuple containing pixel dimensions (so, e.g. if you ask for ``(512, 512, 2)``, the final value...
diff --git a/Tests/test_file_icns.py b/Tests/test_file_icns.py --- a/Tests/test_file_icns.py +++ b/Tests/test_file_icns.py @@ -63,8 +63,8 @@ assert_image_similar_tofile(im, temp_file, 1) with Image.open(temp_file) as reread: - reread.size = (16, 16, 2) - reread.load() + ...
null
null
namanjain12/pillow_final:e625f7311965abd0a88992ca215d8ad61a27715e
true
null
2
61
null
1,364
0
0.75
1
0.6375
1
0.430667
81.21075
5,289
swe_smith::train::141
swe_smith
train
141
oauthlib__oauthlib.1fd52536.combine_file__u0jblbrb
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# Silent authorization validation is not raising NotImplementedError ### Bug report I noticed that the `validate_silent_authorization` method in the `RequestValidator` class is not raising a `NotImplementedError` as expected. This method should require implementation by subclasses, but it's currently returning `True`...
diff --git a/oauthlib/openid/connect/core/request_validator.py b/oauthlib/openid/connect/core/request_validator.py index e3cea79..ead5fe5 100644 --- a/oauthlib/openid/connect/core/request_validator.py +++ b/oauthlib/openid/connect/core/request_validator.py @@ -205,7 +205,7 @@ class RequestValidator(OAuth2RequestValidat...
["tests/openid/connect/core/test_request_validator.py::RequestValidatorTest::test_method_contracts"]
["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
7
1
1,731
0
0.6
1
0.75
1
0.311833
81.2105
5,290
swe_smith::train::28329
swe_smith
train
28,329
encode__starlette.db5063c2.combine_file__fnyvrojr
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
# HTTPException and WebSocketException string representation is incorrect ### What happened? I noticed that the string representation of HTTPException and WebSocketException is incorrect. The values are swapped in both the `__str__` and `__repr__` methods, causing confusing output. ### What did you expect to happen?...
diff --git a/starlette/exceptions.py b/starlette/exceptions.py index c48f083..02a6907 100644 --- a/starlette/exceptions.py +++ b/starlette/exceptions.py @@ -21,11 +21,11 @@ class HTTPException(Exception): self.headers = headers def __str__(self) -> str: - return f"{self.status_code}: {self.detail...
["tests/test_exceptions.py::test_http_str", "tests/test_exceptions.py::test_http_repr", "tests/test_exceptions.py::test_websocket_str", "tests/test_exceptions.py::test_websocket_repr"]
["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
4
1,710
0
0.6
1
0.75
1
0.311667
81.21
5,291
swe_smith::train::24117
swe_smith
train
24,117
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__yy1obt9m
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
copy_default_config function broken due to variable scope issue #### Description The `copy_default_config` function in `sunpy.util.config` is currently broken and raises an `UnboundLocalError` when called. The function fails with the error "cannot access local variable 'user_config_file' where it is not associated wi...
diff --git a/sunpy/util/config.py b/sunpy/util/config.py index 290dc22..b8f40c8 100644 --- a/sunpy/util/config.py +++ b/sunpy/util/config.py @@ -153,6 +153,21 @@ def _get_user_configdir(): def copy_default_config(overwrite=False): + + if user_config_file.exists(): + if overwrite: + message = "...
["sunpy/util/tests/test_config.py::test_find_config_user_site_files", "sunpy/util/tests/test_config.py::test_copy_default_config", "sunpy/util/tests/test_config.py::test_copy_default_config_without_overwrite", "sunpy/util/tests/test_config.py::test_copy_default_config_with_overwrite", "sunpy/util/tests/test_config.py::...
["sunpy/util/tests/test_config.py::test_is_writable_dir", "sunpy/util/tests/test_config.py::test_get_user_configdir", "sunpy/util/tests/test_config.py::test_print_config_files", "sunpy/util/tests/test_config.py::test_get_and_create_download_dir", "sunpy/util/tests/test_config.py::test_get_and_create_sample_dir"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
40
5
1,070
0
0.6
1
0.75
1
0.311667
81.21
5,292
swe_smith::train::36113
swe_smith
train
36,113
borntyping__python-colorlog.dfa10f59.combine_file__bmf3qqlj
swesmith/borntyping__python-colorlog.dfa10f59
borntyping/python-colorlog
python
null
ColoredFormatter initialization broken after recent changes #### Description The ColoredFormatter class is not working properly. When trying to create a ColoredFormatter instance, it fails with various errors including AttributeError and ValueError exceptions. #### Steps/Code to Reproduce ```python import colorlog ...
diff --git a/colorlog/formatter.py b/colorlog/formatter.py index f011ca2..f3c2688 100644 --- a/colorlog/formatter.py +++ b/colorlog/formatter.py @@ -74,54 +74,20 @@ class ColoredFormatter(logging.Formatter): force_color: bool = False, defaults: typing.Optional[typing.Mapping[str, typing.Any]] = None, ...
["colorlog/tests/test_colorlog.py::test_colored_formatter", "colorlog/tests/test_colorlog.py::test_custom_colors", "colorlog/tests/test_colorlog.py::test_reset", "colorlog/tests/test_colorlog.py::test_no_reset", "colorlog/tests/test_colorlog.py::test_secondary_colors", "colorlog/tests/test_colorlog.py::test_some_second...
["colorlog/tests/test_escape_codes.py::test_esc", "colorlog/tests/test_escape_codes.py::test_reset", "colorlog/tests/test_escape_codes.py::test_bold_color", "colorlog/tests/test_escape_codes.py::test_fg_color", "colorlog/tests/test_escape_codes.py::test_bg_color", "colorlog/tests/test_escape_codes.py::test_parse_colors...
jyangballin/swesmith.x86_64.borntyping_1776_python-colorlog.dfa10f59
true
null
1
46
17
949
0
0.6
1
0.75
1
0.3115
81.2095
5,293
swe_smith::train::45465
swe_smith
train
45,465
dask__dask.5f61e423.pr_10391
swesmith/dask__dask.5f61e423
dask/dask
python
null
[Bug]: create_merge_tree function fails when converting xarray with string coordinates to dataframe ### Bug summary When trying to convert an xarray dataset with string coordinates to a dask dataframe using `from_xarray()`, the operation fails with a `NotImplementedError`. The error occurs because the `create_merge_t...
diff --git a/dask/dataframe/partitionquantiles.py b/dask/dataframe/partitionquantiles.py index 9a5b32e..657dff4 100644 --- a/dask/dataframe/partitionquantiles.py +++ b/dask/dataframe/partitionquantiles.py @@ -199,7 +199,7 @@ def tree_groups(N, num_groups): return rv -def create_merge_tree(func, keys, token, le...
["dask/dataframe/tests/test_dataframe.py::test_from_xarray_string_conversion"]
["dask/dataframe/tests/test_dataframe.py::test_Dataframe", "dask/dataframe/tests/test_dataframe.py::test_head_tail", "dask/dataframe/tests/test_dataframe.py::test_head_npartitions", "dask/dataframe/tests/test_dataframe.py::test_head_npartitions_warn", "dask/dataframe/tests/test_dataframe.py::test_index_head", "dask/dat...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
7
1
1,729
0
0.6
1
0.75
1
0.3115
81.2095
5,294
swe_smith::train::12660
swe_smith
train
12,660
lepture__mistune.bf54ef67.lm_rewrite__bqh2xgh2
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
TypeError when using custom heading_id function in add_toc_hook Description Encountering a TypeError when trying to use a custom `heading_id` function with `add_toc_hook`. The issue arises when generating the table of contents for markdown headings. Here's a minimal example to reproduce the problem: ```python def he...
diff --git a/src/mistune/toc.py b/src/mistune/toc.py index be4b8b3..8a02bc1 100644 --- a/src/mistune/toc.py +++ b/src/mistune/toc.py @@ -7,12 +7,8 @@ if TYPE_CHECKING: from .markdown import Markdown -def add_toc_hook( - md: "Markdown", - min_level: int = 1, - max_level: int = 3, - heading_id: Optio...
["tests/test_hooks.py::TestTocHook::test_complex_toc_001", "tests/test_hooks.py::TestTocHook::test_customize_heading_id_func", "tests/test_hooks.py::TestTocHook::test_html_in_heading_001", "tests/test_hooks.py::TestTocHook::test_insane_toc_001", "tests/test_hooks.py::TestTocHook::test_insane_toc_002", "tests/test_hooks...
["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
51
7
849
0
0.6
1
0.75
1
0.3115
81.2095
5,295
swe_bench::test::1102
swe_bench
test
1,102
matplotlib__matplotlib-26011
matplotlib/matplotlib
matplotlib/matplotlib
python
00afcc0c6d4d2e4390338127f05b8f4fdb4e7087
xlim_changed not emitted on shared axis ### Bug report **Bug summary** When an axis is shared with another its registered "xlim_changed" callbacks does not get called when the change is induced by a shared axis (via sharex=). In _base.py the set_xlim for sibling axis are called with emit=False: ``` matplotlib/lib/...
I'm also seeing this behavior on matplotlib 3.4.1. Working from the [resampling data example](https://matplotlib.org/stable/gallery/event_handling/resample.html), I've been developing an adaptive waveform plotter in [this PR](https://github.com/librosa/librosa/issues/1207) (code included there). The specific quirks t...
diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -1241,11 +1241,13 @@ def _set_lim(self, v0, v1, *, emit=True, auto): self.axes.callbacks.process(f"{name}lim_changed", self.axes) # Call all of the other axes that are shar...
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -8794,3 +8794,12 @@ def test_set_secondary_axis_color(): assert mcolors.same_color(sax.xaxis.get_tick_params()["color"], "red") assert mcolors.s...
["lib/matplotlib/tests/test_axes.py::test_xylim_changed_shared"]
["lib/matplotlib/tests/test_axes.py::test_invisible_axes[png]", "lib/matplotlib/tests/test_axes.py::test_get_labels", "lib/matplotlib/tests/test_axes.py::test_repr", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[png]", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[pdf]", "lib/matplotlib/test...
null
true
2023-05-30T13:45:49Z
1
12
1
1,428
0
0.8
1
0.55
1
0.278
81.209
5,296
swe_smith::train::7463
swe_smith
train
7,463
cantools__cantools.0c6a7871.func_basic__czl26d4s
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
ARXML loader fails with "Cannot retrieve a child element of a non-existing node!" error #### Description When loading ARXML files, the system loader is failing with an `UnsupportedDatabaseFormatError` containing the message "Cannot retrieve a child element of a non-existing node!". This appears to be affecting multip...
diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py index f7aa786..ece0b8a 100644 --- a/src/cantools/database/can/formats/arxml/system_loader.py +++ b/src/cantools/database/can/formats/arxml/system_loader.py @@ -740,14 +740,14 @@ 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
21
15
1,448
0
0.6
1
0.75
1
0.311333
81.209
5,297
swe_smith::train::18153
swe_smith
train
18,153
pndurette__gTTS.dbcda4f3.func_pm_ctrl_invert_if__io100ygf
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
# Error message logic is reversed in gTTSError #### Description There's an issue with the error message logic in the `gTTSError` class. The conditions for handling connection failures versus API response errors are reversed, causing incorrect error messages to be displayed. When a connection failure occurs (rsp is No...
diff --git a/gtts/tts.py b/gtts/tts.py index eae351f..9d0cd93 100644 --- a/gtts/tts.py +++ b/gtts/tts.py @@ -359,13 +359,6 @@ class gTTSError(Exception): cause = "Unknown" if rsp is None: - premise = "Failed to connect" - - if tts.tld != "com": - host = _translat...
["gtts/tests/test_cli.py::test_lang_nocheck", "gtts/tests/test_tts.py::test_infer_msg", "gtts/tests/test_tts.py::test_timeout"]
["gtts/tests/test_cli.py::test_text_no_text_or_file", "gtts/tests/test_cli.py::test_text_text_and_file", "gtts/tests/test_cli.py::test_text_empty", "gtts/tests/test_cli.py::test_file_not_exists", "gtts/tests/test_cli.py::test_all", "gtts/tests/test_cli.py::test_lang_not_valid", "gtts/tests/test_cli.py::test_params_set"...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
1
15
3
1,567
0
0.6
1
0.75
1
0.311167
81.2085
5,298
swe_smith::train::31008
swe_smith
train
31,008
martinblech__xmltodict.0952f382.lm_rewrite__ipvvco8k
swesmith/martinblech__xmltodict.0952f382
martinblech/xmltodict
python
null
# Multiple roots in XML document not validated correctly ## Description I found a bug in the `unparse` function of xmltodict. When using `full_document=True` (which is the default), the function should validate that the input dictionary has exactly one root element. However, this validation is not working correctly i...
diff --git a/xmltodict.py b/xmltodict.py index 098f627..502b9f4 100755 --- a/xmltodict.py +++ b/xmltodict.py @@ -452,8 +452,7 @@ def _emit(key, value, content_handler, def unparse(input_dict, output=None, encoding='utf-8', full_document=True, - short_empty_elements=False, - **kwargs): + sh...
["tests/test_dicttoxml.py::DictToXMLTestCase::test_multiple_roots", "tests/test_dicttoxml.py::DictToXMLTestCase::test_no_root"]
["tests/test_dicttoxml.py::DictToXMLTestCase::test_attr_order_roundtrip", "tests/test_dicttoxml.py::DictToXMLTestCase::test_attrib", "tests/test_dicttoxml.py::DictToXMLTestCase::test_attrib_and_cdata", "tests/test_dicttoxml.py::DictToXMLTestCase::test_boolean_unparse", "tests/test_dicttoxml.py::DictToXMLTestCase::test_...
jyangballin/swesmith.x86_64.martinblech_1776_xmltodict.0952f382
true
null
1
28
2
1,307
0
0.6
1
0.75
1
0.311167
81.2085
5,299
swe_smith::train::47277
swe_smith
train
47,277
python-trio__trio.cfbbe2c1.lm_rewrite__fk3esn7p
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
### TypeError when using open_signal_receiver with no signals #### Description I've encountered an issue with the `open_signal_receiver` function in the `trio` library. When attempting to use `open_signal_receiver` without providing any signals, a `TypeError` is raised. This behavior seems to have changed recently, a...
diff --git a/src/trio/_signals.py b/src/trio/_signals.py index 729c48a..49e3999 100644 --- a/src/trio/_signals.py +++ b/src/trio/_signals.py @@ -127,9 +127,9 @@ def get_pending_signal_count(rec: AsyncIterator[int]) -> int: @contextmanager -def open_signal_receiver( - *signals: signal.Signals | int, -) -> Genera...
["src/trio/_tests/test_signals.py::test_open_signal_receiver_empty_fail", "src/trio/_tests/test_signals.py::test_catch_signals_race_condition_on_exit"]
["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
35
2
1,166
0
0.6
1
0.75
1
0.311
81.208