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
4,700
swe_smith::train::14391
swe_smith
train
14,391
python-openxml__python-docx.0cf6d71f.lm_rewrite__cb20qe9c
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
# Style lookup by style_id broken in python-docx ## Description I've encountered an issue with style lookup by style_id in python-docx. When trying to access styles using their style_id, the lookup fails and raises a KeyError. ## Steps to reproduce Here's a simple script that demonstrates the issue: ```python from...
diff --git a/src/docx/styles/styles.py b/src/docx/styles/styles.py index 98a56e5..ce7c25b 100644 --- a/src/docx/styles/styles.py +++ b/src/docx/styles/styles.py @@ -34,21 +34,24 @@ class Styles(ElementProxy): Lookup by style id is deprecated, triggers a warning, and will be removed in a near-future re...
["tests/styles/test_styles.py::DescribeStyles::it_can_get_a_style_by_id[getitem_id_fixture0]", "tests/styles/test_styles.py::DescribeStyles::it_can_get_a_style_by_id[getitem_id_fixture1]", "tests/styles/test_styles.py::DescribeStyles::it_can_get_a_style_by_id[getitem_id_fixture2]", "tests/styles/test_styles.py::Describ...
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
31
5
1,564
0
0.6
1
0.75
1
0.364
81.367
4,701
swe_smith::train::45097
swe_smith
train
45,097
mahmoud__glom.fb3c4e76.lm_rewrite__ydtusybj
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
# S.attribute access fails when attribute is not in scope ## Description I found an issue with the `S` object in glom when trying to access attributes that don't exist in the scope. The error handling for missing attributes in the scope has changed behavior. ## Steps to Reproduce Here's a simple example that demons...
diff --git a/glom/core.py b/glom/core.py index cee71a3..3e2b85b 100644 --- a/glom/core.py +++ b/glom/core.py @@ -1525,15 +1525,23 @@ def _s_first_magic(scope, key, _t): enable S.a to do S['a'] or S['a'].val as a special case for accessing user defined string variables """ - err = None - try: - ...
["glom/test/test_path_and_t.py::test_s_magic"]
["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
26
1
1,663
0
0.6
1
0.75
1
0.363833
81.3665
4,702
swe_smith::train::18165
swe_smith
train
18,165
pndurette__gTTS.dbcda4f3.lm_rewrite__np4nbyym
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
# gTTSError loses message attribute after initialization I found a bug in the `gTTSError` exception class where the error message attribute is lost after initialization. ## Reproduction When creating a `gTTSError` instance, the message attribute (`msg`) is set during initialization but is not accessible after the ob...
diff --git a/gtts/tts.py b/gtts/tts.py index eae351f..f82f94d 100644 --- a/gtts/tts.py +++ b/gtts/tts.py @@ -341,16 +341,22 @@ class gTTSError(Exception): """Exception that uses context to present a meaningful error message""" def __init__(self, msg=None, **kwargs): - self.tts = kwargs.pop("tts", Non...
["gtts/tests/test_tts.py::test_msg", "gtts/tests/test_tts.py::test_infer_msg"]
["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_lang_nochec...
jyangballin/swesmith.x86_64.pndurette_1776_gtts.dbcda4f3
true
null
1
26
2
1,663
0
0.6
1
0.75
1
0.363833
81.3665
4,703
swe_smith::train::6845
swe_smith
train
6,845
joke2k__faker.8b401a7d.lm_rewrite__akmy51do
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
### Issue with JSON List Format in Misc Provider It seems there's a problem with processing nested list structures in the JSON generation functionality of the Misc Provider. After the recent changes, the following issues have been observed: 1. **Unexpected Output for Nested Lists of Values:** When attempting to pr...
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index 70f20ec..a1bf466 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -595,25 +595,41 @@ class Provider(BaseProvider): data_columns: Union[List, Dict] = data_columns if data_columns else de...
["tests/providers/test_misc.py::TestMiscProvider::test_json_list_format_nested_list_of_values", "tests/providers/test_misc.py::TestMiscProvider::test_json_list_format_nested_list_of_objects", "tests/providers/test_misc.py::TestMiscProvider::test_json_list_format_nested_objects"]
["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
46
3
1,263
0
0.6
1
0.75
1
0.363833
81.3665
4,704
swe_smith::train::51940
swe_smith
train
51,940
pydicom__pydicom.7d361b3d.func_basic__ecxlzr00
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Encoding profile validation always raises ValueError for valid configurations #### Description The encoding profile validation in `EncodeRunner` is incorrectly rejecting valid DICOM encoding configurations. When trying to encode pixel data with valid parameters that should match an encoding profile, the validation me...
diff --git a/src/pydicom/pixels/encoders/base.py b/src/pydicom/pixels/encoders/base.py index c5123f9..c6079b4 100644 --- a/src/pydicom/pixels/encoders/base.py +++ b/src/pydicom/pixels/encoders/base.py @@ -433,7 +433,7 @@ class EncodeRunner(RunnerBase): ) def _validate_encoding_profile(self) -> None:...
["tests/pixels/test_encoder_base.py::TestEncodeRunner::test_validate_encoding_profile"]
["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
40
1
1,380
0
0.6
1
0.75
1
0.363333
81.365
4,705
swe_smith::train::24943
swe_smith
train
24,943
marshmallow-code__marshmallow.9716fc62.pr_2719
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
# Version attributes missing in marshmallow package **Describe the bug** I'm trying to access version information from the marshmallow package, but the version attributes (`__version__`, `__parsed_version__`, and `__version_info__`) seem to be missing. This is breaking my code that depends on these attributes. **To R...
diff --git a/src/marshmallow/__init__.py b/src/marshmallow/__init__.py index ce666e1ed..63f137f9e 100644 --- a/src/marshmallow/__init__.py +++ b/src/marshmallow/__init__.py @@ -1,10 +1,3 @@ -from __future__ import annotations - -import importlib.metadata -import typing - -from packaging.version import Version - from m...
["tests/test_version_attributes.py::test_version_attributes_deprecated"]
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
50
1
1,180
0
0.6
1
0.75
1
0.363333
81.365
4,706
swe_smith::train::48601
swe_smith
train
48,601
sqlfluff__sqlfluff.50a1c4b6.pr_5047
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
# SQLFluff error pickling is broken When trying to pickle SQLFluff errors, it fails with AttributeError. The `__reduce__` methods in the error classes have been modified and are now incompatible with the original class definitions. ## Steps to Reproduce ```python import pickle from sqlfluff.core.errors import SQLLex...
diff --git a/src/sqlfluff/core/errors.py b/src/sqlfluff/core/errors.py index db964c5..d8311dd 100644 --- a/src/sqlfluff/core/errors.py +++ b/src/sqlfluff/core/errors.py @@ -11,7 +11,7 @@ tracking. https://stackoverflow.com/questions/49715881/how-to-pickle-inherited-exceptions """ -from typing import TYPE_CHECKING, ...
["test/core/errors_test.py::test__lex_error_pickle[True]", "test/core/errors_test.py::test__lex_error_pickle[False]", "test/core/errors_test.py::test__parse_error_pickle[True]", "test/core/errors_test.py::test__lint_error_pickle[True]"]
["test/core/errors_test.py::test__parse_error_pickle[False]", "test/core/errors_test.py::test__lint_error_pickle[False]"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
38
4
1,420
0
0.6
1
0.75
1
0.363333
81.365
4,707
swe_smith::train::36152
swe_smith
train
36,152
gruns__icecream.f76fef56.lm_rewrite__fj3ecok2
swesmith/gruns__icecream.f76fef56
gruns/icecream
python
null
### Unexpected Behavior in IceCreamDebugger's `_format` Method #### Describe the Bug After a recent update, the `IceCreamDebugger` class's `_format` method seems to be malfunctioning. The method no longer handles arguments as expected, leading to unexpected behavior when attempting to format call frames with argument...
diff --git a/icecream/icecream.py b/icecream/icecream.py index 5350d8e..b8e872d 100644 --- a/icecream/icecream.py +++ b/icecream/icecream.py @@ -214,21 +214,40 @@ class IceCreamDebugger: out = self._format(callFrame, *args) return out - def _format(self, callFrame, *args): - prefix = callO...
["tests/test_icecream.py::TestIceCream::testArgToStringFunction", "tests/test_icecream.py::TestIceCream::testAsArgument", "tests/test_icecream.py::TestIceCream::testCallSurroundedByExpressions", "tests/test_icecream.py::TestIceCream::testColoring", "tests/test_icecream.py::TestIceCream::testComments", "tests/test_icecr...
["tests/test_icecream.py::TestIceCream::testConfigureOutputWithNoParameters", "tests/test_icecream.py::TestIceCream::testMetadata", "tests/test_install.py::TestIceCreamInstall::testUninstall"]
jyangballin/swesmith.x86_64.gruns_1776_icecream.f76fef56
true
null
1
49
34
1,199
0
0.6
1
0.75
1
0.363167
81.3645
4,708
swe_smith::train::10943
swe_smith
train
10,943
paramiko__paramiko.23f92003.lm_rewrite__uht3u3n8
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
# SFTP 'x' mode flag not working correctly when opening files ### Description When using the 'x' mode flag with SFTP's open method, it doesn't properly raise an exception when trying to open an existing file. The 'x' mode is supposed to fail if the file already exists, but currently it allows opening existing files. ...
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 066cd83..cf80eee 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -323,7 +323,7 @@ class SFTPClient(BaseSFTP, ClosingContextManager): self._request(CMD_CLOSE, handle) return - def open(self, ...
["tests/test_sftp.py::TestSFTP::test_x_flag"]
["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
42
1
1,339
0
0.6
1
0.75
1
0.363167
81.3645
4,709
swe_smith::train::30201
swe_smith
train
30,201
pyca__pyopenssl.04766a49.combine_module__8px7vyxv
swesmith/pyca__pyopenssl.04766a49
pyca/pyopenssl
python
null
# bio_shutdown() causes error when used with socket connections I'm encountering an issue with the `bio_shutdown()` method in the SSL Connection class. When using this method with a connection that was created with a socket, it fails with a TypeError. ## What happened? When I try to use `bio_shutdown()` on a Connect...
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index eed27a0..ec492ec 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -2484,11 +2484,16 @@ class Connection: :return: None """ - if self._from_ssl is None: - raise TypeError("Connection sock was not None") + i...
["tests/test_ssl.py::TestContext::test_set_cipher_list_no_cipher_match", "tests/test_ssl.py::TestContext::test_set_session_id_fail", "tests/test_ssl.py::TestConnection::test_shutdown_truncated", "tests/test_ssl.py::TestMemoryBIO::test_socket_overrides_memory", "tests/test_ssl.py::TestMemoryBIO::test_shutdown", "tests/t...
["tests/test_crypto.py::TestX509Ext::test_str", "tests/test_crypto.py::TestX509Ext::test_type", "tests/test_crypto.py::TestX509Ext::test_construction", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[thisIsMadeUp-False-hi]", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[proxyCertInfo-True-langua...
jyangballin/swesmith.x86_64.pyca_1776_pyopenssl.04766a49
true
null
2
15
6
1,879
0
0.6
1
0.75
1
0.363167
81.3645
4,710
swe_smith::train::22201
swe_smith
train
22,201
jawah__charset_normalizer.1fdd6463.func_pm_remove_wrapper__4i8ro3zf
swesmith/jawah__charset_normalizer.1fdd6463
jawah/charset_normalizer
python
null
from_bytes function fails with NameError on is_multi_byte_decoder #### Description When calling `from_bytes()` on various byte sequences, the function raises a `NameError` because `is_multi_byte_decoder` is referenced but not defined in the current scope. #### Steps/Code to Reproduce ```python from charset_normaliz...
diff --git a/charset_normalizer/api.py b/charset_normalizer/api.py index 9ffc049..c6cf103 100644 --- a/charset_normalizer/api.py +++ b/charset_normalizer/api.py @@ -212,16 +212,6 @@ def from_bytes( ) continue - try: - is_multi_byte_decoder: bool = is_multi_byte_encoding(enc...
["tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xfe\\xff-utf_16]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\x841\\x953-gb18030]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\\xef\\xbb\\xbf-utf_8]", "tests/test_base_detection.py::test_empty_but_with_bom_or_sig[\...
["tests/test_base_detection.py::test_empty", "tests/test_base_detection.py::test_bool_matches", "tests/test_cli.py::TestCommandLineInterface::test_force_replace_without_replace", "tests/test_cli.py::TestCommandLineInterface::test_non_existent_file", "tests/test_cli.py::TestCommandLineInterface::test_replace_without_nor...
jyangballin/swesmith.x86_64.jawah_1776_charset_normalizer.1fdd6463
true
null
1
52
60
1,138
0
0.6
1
0.75
1
0.363
81.364
4,711
swe_smith::train::32426
swe_smith
train
32,426
pydantic__pydantic.acb0f10f.combine_module__htbb7vzl
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
pydantic_encoder fails with dataclasses after recent changes #### Description The `pydantic_encoder` function is not properly handling dataclass objects anymore. When trying to encode a dataclass to JSON, it raises a TypeError instead of converting it to a dictionary. #### Steps/Code to Reproduce ```python from dat...
diff --git a/pydantic/deprecated/copy_internals.py b/pydantic/deprecated/copy_internals.py index 1b0dc12..e1dee7a 100644 --- a/pydantic/deprecated/copy_internals.py +++ b/pydantic/deprecated/copy_internals.py @@ -76,25 +76,14 @@ def _iter( continue if by_alias and field_key in self.__pyd...
["tests/test_construction.py::test_copy_exclude", "tests/test_construction.py::test_copy_include", "tests/test_construction.py::test_copy_include_exclude", "tests/test_construction.py::test_copy_advanced_exclude", "tests/test_construction.py::test_copy_advanced_include", "tests/test_construction.py::test_copy_advanced_...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
2
73
14
717
0
0.6
1
0.75
1
0.362833
81.3635
4,712
swe_smith::train::47408
swe_smith
train
47,408
sqlfluff__sqlfluff.50a1c4b6.combine_file__duzweobz
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
SQLParseError and SQLLintError initialization parameters swapped #### Description When creating SQLParseError and SQLLintError instances, the constructor parameters appear to be getting mixed up, causing unexpected behavior during error handling. #### Steps/Code to Reproduce ```python from sqlfluff.core.errors impo...
diff --git a/src/sqlfluff/core/errors.py b/src/sqlfluff/core/errors.py index db964c5..41929f7 100644 --- a/src/sqlfluff/core/errors.py +++ b/src/sqlfluff/core/errors.py @@ -201,16 +201,15 @@ class SQLParseError(SQLBaseError): fatal: bool = False, warning: Optional[bool] = None, ) -> None: - ...
["test/core/errors_test.py::test__parse_error_pickle[True]", "test/core/errors_test.py::test__parse_error_pickle[False]", "test/core/errors_test.py::test__lint_error_pickle[True]", "test/core/errors_test.py::test__lint_error_pickle[False]"]
["test/core/errors_test.py::test__lex_error_pickle[True]", "test/core/errors_test.py::test__lex_error_pickle[False]"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
32
4
1,537
0
0.6
1
0.75
1
0.362833
81.3635
4,713
swe_smith::train::52669
swe_smith
train
52,669
pydicom__pydicom.7d361b3d.lm_rewrite__ajw3vyth
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Description It seems there's an issue with writing DICOM files after the recent changes. When attempting to write a DICOM file using certain methods, an `AttributeError` is raised. This is affecting multiple functionalities, including writing files with specific VRs and handling file metadata. ### Steps to Reprod...
diff --git a/src/pydicom/dataelem.py b/src/pydicom/dataelem.py index 431e294..8346981 100644 --- a/src/pydicom/dataelem.py +++ b/src/pydicom/dataelem.py @@ -54,9 +54,8 @@ if TYPE_CHECKING: # pragma: no cover from pydicom.dataset import Dataset -def empty_value_for_VR( - VR: str | None, raw: bool = False -)...
["tests/test_charset.py::TestCharset::test_standard_file", "tests/test_charset.py::TestCharset::test_invalid_character_set", "tests/test_charset.py::TestCharset::test_charset_patient_names[chrArab-\\u0642\\u0628\\u0627\\u0646\\u064a^\\u0644\\u0646\\u0632\\u0627\\u0631]", "tests/test_charset.py::TestCharset::test_charse...
["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
43
184
1,316
0
0.6
1
0.75
1
0.362667
81.363
4,714
swe_smith::train::3581
swe_smith
train
3,581
pygments__pygments.27649ebb.combine_module__22c16n1w
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
TNT lexer broken after recent changes #### Description The TNT lexer is completely broken and fails to tokenize even basic TNT syntax. When trying to use the lexer, it throws AttributeError exceptions because `self.cur` is set to `None` instead of an empty list. #### Steps/Code to Reproduce ```python from pygments....
diff --git a/pygments/lexers/modula2.py b/pygments/lexers/modula2.py index 8f5a72a..1f8db69 100644 --- a/pygments/lexers/modula2.py +++ b/pygments/lexers/modula2.py @@ -1564,16 +1564,16 @@ class Modula2Lexer(RegexLexer): instead.""" # Check if this looks like Pascal, if not, bail out early - ...
["tests/test_tnt.py::test_multiterm_positive_matches[(c+d)]", "tests/test_tnt.py::test_quantifier_negative_matches[Eba=b]", "tests/test_tnt.py::test_multiterm_positive_matches[(b.a)]", "tests/test_tnt.py::test_compound_negative_matches[<a=b/b=a>]", "tests/test_tnt.py::test_error_till_line_end[asdf]", "tests/test_tnt.py...
["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
2
62
23
935
0
0.6
1
0.75
1
0.3625
81.3625
4,715
swe_smith::train::42427
swe_smith
train
42,427
vi3k6i5__flashtext.b316c7e9.combine_file__bf6xa4bb
swesmith/vi3k6i5__flashtext.b316c7e9
vi3k6i5/flashtext
python
null
KeywordProcessor methods not working correctly after recent changes I'm having issues with the KeywordProcessor where several methods are behaving unexpectedly. When I try to add keywords from dictionaries or lists, the extraction and removal operations don't work as expected. #### Steps to Reproduce ```python from ...
diff --git a/flashtext/keyword.py b/flashtext/keyword.py index b5cb1d1..000fdd1 100644 --- a/flashtext/keyword.py +++ b/flashtext/keyword.py @@ -347,8 +347,8 @@ class KeywordProcessor(object): if not isinstance(keywords, list): raise AttributeError("Value of key {} should be a list".format...
["test/test_dictionary_loading.py::TestDictionaryLoad::test_dictionary_loading", "test/test_extractor.py::TestKeywordExtractor::test_extract_keywords", "test/test_extractor.py::TestKeywordExtractor::test_extract_keywords_case_sensitive", "test/test_kp_exceptions.py::TestKPExceptions::test_add_keyword_from_list", "test/...
["test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_addition", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_deletion", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_substitution", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_extract_addition"...
jyangballin/swesmith.x86_64.vi3k6i5_1776_flashtext.b316c7e9
true
null
1
15
9
1,875
0
0.6
1
0.75
1
0.3625
81.3625
4,716
swe_smith::train::32814
swe_smith
train
32,814
pydantic__pydantic.acb0f10f.lm_rewrite__rgtu7jau
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Deprecated field descriptor returns itself when accessed through class instead of raising AttributeError #### Description When accessing a deprecated field through the class (not an instance), the descriptor now returns itself instead of raising an AttributeError as expected. This breaks the normal Python descriptor ...
diff --git a/pydantic/_internal/_model_construction.py b/pydantic/_internal/_model_construction.py index 88f67ef..121b6fc 100644 --- a/pydantic/_internal/_model_construction.py +++ b/pydantic/_internal/_model_construction.py @@ -682,18 +682,33 @@ class _DeprecatedFieldDescriptor: def __set_name__(self, cls: type[B...
["tests/test_deprecated_fields.py::test_deprecated_fields", "tests/test_deprecated_fields.py::test_computed_field_deprecated", "tests/test_deprecated_fields.py::test_computed_field_deprecated_deprecated_class", "tests/test_deprecated_fields.py::test_computed_field_deprecated_class_access"]
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
31
4
1,555
0
0.6
1
0.75
1
0.3625
81.3625
4,717
swe_smith::train::24497
swe_smith
train
24,497
sunpy__sunpy.f8edfd5c.combine_module__fk0fjxlf
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Missing code in header_to_fits and split_lines functions causes errors ## Description I've encountered issues with the `header_to_fits` function in `sunpy/io/_fits.py` and the `split_lines` function in `sunpy/io/special/srs.py`. Both functions are missing critical code blocks that cause errors when processing certa...
diff --git a/sunpy/io/_fits.py b/sunpy/io/_fits.py index 5513abe..cadda94 100644 --- a/sunpy/io/_fits.py +++ b/sunpy/io/_fits.py @@ -233,12 +233,6 @@ def header_to_fits(header): # This first iteration separates out COMMENTS and HISTORY into their own # entries. header_items = [] - for k, v in header.i...
["sunpy/io/tests/test_fits.py::test_simple_write_compressed_instance[kwargs0-False]", "sunpy/io/tests/test_fits.py::test_simple_write_compressed_instance[kwargs1-True]", "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", "su...
["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...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
14
19
1,894
0
0.6
1
0.75
1
0.362333
81.362
4,718
swe_smith::train::51523
swe_smith
train
51,523
pydicom__pydicom.7d361b3d.combine_file__mch373b3
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
EncodeRunner validation logic inverted causing encoding failures #### Description The encoding profile validation in `EncodeRunner` appears to be rejecting valid DICOM parameter combinations and accepting invalid ones. When trying to compress pixel data with standard DICOM parameters, the validation incorrectly raise...
diff --git a/src/pydicom/pixels/encoders/base.py b/src/pydicom/pixels/encoders/base.py index c5123f9..e1bcc9d 100644 --- a/src/pydicom/pixels/encoders/base.py +++ b/src/pydicom/pixels/encoders/base.py @@ -128,11 +128,11 @@ class EncodeRunner(RunnerBase): If the pixel data only has one from then use ``None`...
["tests/pixels/test_encoder_base.py::TestEncodeRunner::test_validate_encoding_profile", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_compress_inplace", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_encapsulate_extended", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_plan...
["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
44
7
1,293
0
0.6
1
0.75
1
0.362167
81.3615
4,719
swe_smith::train::1176
swe_smith
train
1,176
jd__tenacity.0d40e76f.lm_rewrite__nrufeeyo
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
# Retry mechanism broken in tenacity I've found an issue with the retry mechanism in tenacity. When using retry with certain configurations, it fails to work properly. Here's a simple reproduction case: ```python from tenacity import retry, stop_after_attempt @retry(stop=stop_after_attempt(3)) def my_function(): ...
diff --git a/tenacity/__init__.py b/tenacity/__init__.py index 72eba04..97b71e3 100644 --- a/tenacity/__init__.py +++ b/tenacity/__init__.py @@ -405,36 +405,18 @@ class BaseRetrying(ABC): self._add_action_func(self._run_stop) self._add_action_func(self._post_stop_check_actions) - def _post_stop_c...
["tests/test_asyncio.py::TestDecoratorWrapper::test_retry_function_attributes", "tests/test_tenacity.py::TestWaitConditions::test_wait_chain_multiple_invocations", "tests/test_tenacity.py::TestRetryConditions::test_retry_try_again_forever", "tests/test_tenacity.py::TestRetryConditions::test_retry_try_again_forever_rera...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
36
25
1,453
0
0.6
1
0.75
1
0.362167
81.3615
4,720
swe_smith::train::29270
swe_smith
train
29,270
tox-dev__pipdeptree.c31b6418.pr_321
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
### Bug Report **AttributeError when accessing licenses method** **Bug Summary** Encountering an `AttributeError` when attempting to access the `licenses` method on a `Package` object. This seems to occur after recent changes to the codebase. **Code for Reproduction** Here's a minimal example to reproduce the issu...
diff --git a/src/pipdeptree/_models/package.py b/src/pipdeptree/_models/package.py index 7e49250..321d9b5 100644 --- a/src/pipdeptree/_models/package.py +++ b/src/pipdeptree/_models/package.py @@ -26,32 +26,10 @@ class InvalidRequirementError(ValueError): class Package(ABC): """Abstract class for wrappers around ...
["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack...
[]
jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418
true
null
2
56
125
1,050
0
0.6
1
0.75
1
0.361667
81.36
4,721
r2e_gym::train::4976
r2e_gym
train
4,976
datalad__c85c3682e7c0706779d77719876a045c843c4a29
datalad
datalad/datalad
python
c85c3682e7c0706779d77719876a045c843c4a29
**Title:** TypeError When Calling `extract` Without `input_type` After Adding List Support **Description:** After updating the `addurls` plugin to support passing a list of records directly from the Python interface, certain function calls to `extract` are failing because the `input_type` argument is missing. This res...
diff --git a/datalad/plugin/addurls.py b/datalad/plugin/addurls.py --- a/datalad/plugin/addurls.py +++ b/datalad/plugin/addurls.py @@ -399,6 +399,31 @@ return rows, idx_map +def _read_from_file(fname, input_type): + from_stdin = fname == "-" + if input_type == "ext": + if from_stdin: + ...
diff --git a/datalad/plugin/tests/test_addurls.py b/datalad/plugin/tests/test_addurls.py --- a/datalad/plugin/tests/test_addurls.py +++ b/datalad/plugin/tests/test_addurls.py @@ -256,7 +256,7 @@ @known_failure_githubci_win def test_extract(): info, subpaths = au.extract( - json_stream(ST_DATA["rows"]), "j...
null
null
namanjain12/datalad_final:c85c3682e7c0706779d77719876a045c843c4a29
true
null
1
89
null
1,102
0
0.75
1
0.6375
1
0.480333
81.35975
4,722
swe_smith::train::47556
swe_smith
train
47,556
sqlfluff__sqlfluff.50a1c4b6.combine_module__0bsw5r7h
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Linter returns wrong data types in violation results #### Description When running the linter, the violation results are returning incorrect data types. The linter appears to be mixing up fixes and violations in the output, causing `AttributeError` when trying to access expected attributes on the returned objects. #...
diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py index 1f00fb3..94f809b 100644 --- a/src/sqlfluff/core/rules/base.py +++ b/src/sqlfluff/core/rules/base.py @@ -620,45 +620,35 @@ class BaseRule(metaclass=RuleMetaclass): new_fixes: List[LintFix], root: BaseSegment, ) ->...
["test/core/rules/docstring_test.py::test_backtick_replace", "test/core/rules/noqa_test.py::test_linter_noqa", "test/core/rules/noqa_test.py::test_linter_noqa_disable", "test/core/rules/noqa_test.py::test_linter_disable_noqa_except", "test/core/rules/rules_test.py::test__rules__filter_unparsable", "test/core/rules/rule...
["test/core/rules/docstring_test.py::test_content_count[\\\\*\\\\*Anti-pattern\\\\*\\\\*-1]", "test/core/rules/docstring_test.py::test_keyword_anti_before_best", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input0-True]", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
2
56
6
1,049
0
0.6
1
0.75
1
0.3615
81.3595
4,723
swe_smith::train::1981
swe_smith
train
1,981
agronholm__typeguard.b6a7e438.lm_rewrite__xhv4u3cd
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Type checking for numeric types is broken in check_number function ## Description I found a bug in the `check_number` function that breaks type checking for numeric types. The function is now too strict and rejects valid numeric types that should be accepted according to Python's numeric tower. ## Steps to reprodu...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..a86fdc3 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -619,17 +619,17 @@ def check_none( raise TypeCheckError("is not None") -def check_number( - value: Any, - origin_type: Any, - args...
["tests/test_checkers.py::TestFloat::test_valid[int]", "tests/test_checkers.py::TestFloat::test_bad_type", "tests/test_checkers.py::TestComplexNumber::test_valid[int]", "tests/test_checkers.py::TestComplexNumber::test_valid[float]", "tests/test_checkers.py::TestComplexNumber::test_bad_type", "tests/test_checkers.py::Te...
["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
22
11
1,728
0
0.6
1
0.75
1
0.361333
81.359
4,724
swe_smith::train::3244
swe_smith
train
3,244
Suor__funcy.207a7810.lm_rewrite__8ua2rbq5
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# once_per decorator not working correctly with non-hashable arguments ### Description I've encountered an issue with the `once_per` decorator in funcy. When using this decorator with arguments that aren't hashable, it fails with a TypeError. Here's a simple reproduction case: ```python from funcy import once_per @...
diff --git a/funcy/flow.py b/funcy/flow.py index 85c5a8e..04ceb24 100644 --- a/funcy/flow.py +++ b/funcy/flow.py @@ -209,28 +209,26 @@ def joining(call, sep): def once_per(*argnames): """Call function only once for every combination of the given arguments.""" - def once(func): - lock = threading.Lock(...
["tests/test_flow.py::test_once", "tests/test_flow.py::test_once_per", "tests/test_flow.py::test_once_per_args"]
["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_cal...
jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810
true
null
1
34
3
1,488
0
0.6
1
0.75
1
0.361333
81.359
4,725
swe_smith::train::49152
swe_smith
train
49,152
mozilla__bleach.73871d76.combine_file__tk5d3fju
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
URL parsing broken with mixed string types #### Description When using the URL parsing functionality with mixed string and non-string arguments, a TypeError is raised even for valid inputs. This affects URL parsing operations that should work correctly. #### Steps/Code to Reproduce ```python from bleach._vendor.par...
diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py index ac6e7a9..1bec502 100644 --- a/bleach/_vendor/parse.py +++ b/bleach/_vendor/parse.py @@ -110,18 +110,11 @@ def _decode_args(args, encoding=_implicit_encoding, return tuple(x.decode(encoding, errors) if x else '' for x in args) def _coerce_args(...
["tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_disallowed_attr", "tests/test_clean.py::test_unquoted_event_handler_attr_value", "tests/test_clean.py::test_invalid_filter_attr", "tests/test_clean.py::test_poster_attribute", "tests/test_clean.py::test_attributes_wildcard", "tests/test_clean.p...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
60
25
967
0
0.6
1
0.75
1
0.361167
81.3585
4,726
swe_smith::train::7026
swe_smith
train
7,026
cantools__cantools.0c6a7871.combine_file__jrxs4tu8
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
[Bug]: ECU Extract ARXML loader fails to parse files ### Bug summary The ECU Extract ARXML loader is not properly initializing its attributes and has incorrect path references, causing it to fail when trying to parse ARXML files. ### Steps to reproduce 1. Create an ECU Extract ARXML file 2. Try to load it using the...
diff --git a/src/cantools/database/can/formats/arxml/ecu_extract_loader.py b/src/cantools/database/can/formats/arxml/ecu_extract_loader.py index 67935ab..358d87f 100644 --- a/src/cantools/database/can/formats/arxml/ecu_extract_loader.py +++ b/src/cantools/database/can/formats/arxml/ecu_extract_loader.py @@ -54,14 +54,1...
["tests/test_database.py::CanToolsDatabaseTest::test_ecu_extract_arxml"]
["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
38
1
1,407
0
0.6
1
0.75
1
0.361167
81.3585
4,727
r2e_gym::train::4237
r2e_gym
train
4,237
numpy__541fd509c24e9d3f94b478b3d09c8ac1b0c0d207
numpy
numpy/numpy
python
541fd509c24e9d3f94b478b3d09c8ac1b0c0d207
**Title:** Missing `polyvalfromroots` Function in `numpy.polynomial.polynomial` Module **Description:** When attempting to evaluate a polynomial at given points using its roots with the `polyvalfromroots` function, an `AttributeError` is raised because the function does not exist in the `numpy.polynomial.polynomial` m...
diff --git a/doc/release/1.12.0-notes.rst b/doc/release/1.12.0-notes.rst --- a/doc/release/1.12.0-notes.rst +++ b/doc/release/1.12.0-notes.rst @@ -128,7 +128,7 @@ but that can be overwritten by people making binary distributions of numpy. New nanfunctions ``nancumsum`` and ``nancumprod`` added -~~~~~~~~~~~~~~~~~~~~...
diff --git a/numpy/polynomial/tests/test_polynomial.py b/numpy/polynomial/tests/test_polynomial.py --- a/numpy/polynomial/tests/test_polynomial.py +++ b/numpy/polynomial/tests/test_polynomial.py @@ -135,6 +135,70 @@ assert_equal(poly.polyval(x, [1]).shape, dims) assert_equal(poly.polyval(x, [1...
null
null
namanjain12/numpy_final:541fd509c24e9d3f94b478b3d09c8ac1b0c0d207
true
null
3
103
null
818
0
0.75
1
0.6375
1
0.479667
81.35775
4,728
swe_smith::train::51507
swe_smith
train
51,507
pydicom__pydicom.7d361b3d.combine_file__hno15q2a
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
dicomfile iterator broken after recent changes #### Description The `dicomfile` class in `util.leanread` is not working properly when iterating through DICOM elements. The iterator seems to have issues with reading the file structure correctly. #### Steps/Code to Reproduce ```python from pydicom.util.leanread impor...
diff --git a/src/pydicom/util/leanread.py b/src/pydicom/util/leanread.py index 605e507..598c405 100644 --- a/src/pydicom/util/leanread.py +++ b/src/pydicom/util/leanread.py @@ -33,9 +33,9 @@ class dicomfile: # Read the DICOM preamble, if present self.preamble: bytes | None = fobj.read(0x80) d...
["tests/test_util.py::TestLeanRead::test_explicit_little", "tests/test_util.py::TestLeanRead::test_implicit_little", "tests/test_util.py::TestLeanRead::test_explicit_big", "tests/test_util.py::TestLeanRead::test_no_tsyntax", "tests/test_util.py::TestLeanRead::test_no_meta", "tests/test_util.py::TestLeanRead::test_UN_se...
["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
60
6
965
0
0.6
1
0.75
1
0.360833
81.3575
4,729
swe_smith::train::4590
swe_smith
train
4,590
pygments__pygments.27649ebb.lm_rewrite__q8yykp6l
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
### RawTokenLexer Compression Handling Issue #### Description There seems to be an issue with the `RawTokenLexer` when handling compressed token streams. Specifically, the lexer fails to process certain compressed inputs correctly, leading to unexpected behavior. #### Steps to Reproduce 1. Create a Python script with...
diff --git a/pygments/lexers/special.py b/pygments/lexers/special.py index b8680b7..c94a4b0 100644 --- a/pygments/lexers/special.py +++ b/pygments/lexers/special.py @@ -78,26 +78,20 @@ class RawTokenLexer(Lexer): Lexer.__init__(self, **options) def get_tokens(self, text): + """ + Parse the...
["tests/test_raw_token.py::test_raw_token", "tests/test_raw_token.py::test_invalid_raw_token"]
["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
32
2
1,525
0
0.6
1
0.75
1
0.360833
81.3575
4,730
swe_smith::train::6899
swe_smith
train
6,899
joke2k__faker.8b401a7d.lm_rewrite__x6wvhegn
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
dsv method raises unexpected errors with certain inputs Description The `dsv` method in the `misc` provider is currently experiencing issues when handling specific input values. This seems to have been introduced in a recent change. Reproduction Steps: 1. Attempt to generate a DSV with the following parameters: ...
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index 70f20ec..a397e0f 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -382,15 +382,9 @@ class Provider(BaseProvider): fobj.seek(0) return fobj.read() - def dsv( - ...
["tests/providers/test_misc.py::TestMiscProvider::test_dsv_with_invalid_values", "tests/providers/test_misc.py::TestMiscProvider::test_dsv_no_header", "tests/providers/test_misc.py::TestMiscProvider::test_dsv_with_valid_header", "tests/providers/test_misc.py::TestMiscProvider::test_dsv_with_row_ids", "tests/providers/t...
["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
60
6
964
0
0.6
1
0.75
1
0.360667
81.357
4,731
swe_smith::train::42420
swe_smith
train
42,420
r1chardj0n3s__parse.30da9e4f.lm_rewrite__5q31391t
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
# Parser fails to match strings with trailing newlines ## Description I've discovered an issue with the `parse` library where it fails to match strings that have trailing newlines. For example, this simple code: ```python from parse import parse r = parse('{}', 'test\n') print(r[0]) # Should print "test\n" ``` F...
diff --git a/parse.py b/parse.py index 80242e1..ede0f18 100644 --- a/parse.py +++ b/parse.py @@ -405,36 +405,33 @@ class Parser(object): """Encapsulate a format string that may be used to parse other strings.""" def __init__(self, format, extra_types=None, case_sensitive=False): - # a mapping of a na...
["tests/test_bugs.py::test_match_trailing_newline"]
["README.rst::README.rst", "parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_bu...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
45
1
1,264
0
0.6
1
0.75
1
0.360667
81.357
4,732
swe_smith::train::44518
swe_smith
train
44,518
pydata__patsy.a5d16484.lm_rewrite__ig98dzva
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
### Issue: TypeError in Contrast Handling I've encountered an issue with the `code_contrast_matrix` function in the `patsy` library after a recent update. It seems that the function is not handling certain contrast specifications correctly, leading to a `TypeError`. #### Steps to Reproduce: 1. Define a simple datase...
diff --git a/patsy/contrasts.py b/patsy/contrasts.py index 0ac9ac7..e44ac24 100644 --- a/patsy/contrasts.py +++ b/patsy/contrasts.py @@ -625,18 +625,48 @@ def test_diff(): # -- None, in which case the above rules are applied to 'default' # This function always returns a ContrastMatrix. def code_contrast_matrix(int...
["patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_data_types", "patsy/test_build.py::test_NA_action", "patsy/test_build.py::test_NA_drop_preserves_levels", "patsy/test_build.py::test_data_mismatch", "patsy/test_build.py...
["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
50
19
1,164
0
0.6
1
0.75
1
0.360667
81.357
4,733
swe_smith::train::43793
swe_smith
train
43,793
pydata__patsy.a5d16484.combine_file__hewnw9sw
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Design matrix construction fails with KeyError on frozenset() When building design matrices, the code is throwing a `KeyError: frozenset()` error during the term processing phase. This appears to be related to how terms are being bucketed and ordered in the `_make_subterm_infos` function. #### Steps/Code to Reproduce...
diff --git a/patsy/build.py b/patsy/build.py index cbe2524..d68872d 100644 --- a/patsy/build.py +++ b/patsy/build.py @@ -625,32 +625,28 @@ def test__examine_factor_types(): def _make_subterm_infos(terms, num_column_counts, cat_levels_contrasts): - # Sort each term into a bucket based on the set of numeric facto...
["patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths", "patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_data_...
["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
55
32
1,064
0
0.6
1
0.75
1
0.360667
81.357
4,734
swe_smith::train::45224
swe_smith
train
45,224
dask__dask.5f61e423.combine_module__b13mt24s
swesmith/dask__dask.5f61e423
dask/dask
python
null
DataFrame binary operations with Series and axis=1 no longer raise ValueError #### Description When performing binary operations between a DataFrame and Series with `axis=1` (or `axis='columns'`), the operation should raise a `ValueError` with the message "Unable to {operation} dd.Series with axis=1". However, this v...
diff --git a/dask/dataframe/dask_expr/_collection.py b/dask/dataframe/dask_expr/_collection.py index 7aa07d4..a8a207c 100644 --- a/dask/dataframe/dask_expr/_collection.py +++ b/dask/dataframe/dask_expr/_collection.py @@ -193,24 +193,35 @@ def _wrap_expr_method_operator(name, class_): """ if class_ == DataFram...
["dask/dataframe/dask_expr/io/tests/test_io.py::test_io_fusion[parquet]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_io_fusion_blockwise", "dask/dataframe/dask_expr/io/tests/test_io.py::test_repartition_io_fusion_blockwise", "dask/dataframe/dask_expr/io/tests/test_io.py::test_io_fusion_merge", "dask/dataframe/...
["dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>0]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>1]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-<lambda>2]", "dask/dataframe/dask_expr/io/tests/test_io.py::test_simplify[<lambda>-...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
2
57
144
1,022
0
0.6
1
0.75
1
0.360333
81.356
4,735
swe_smith::train::39590
swe_smith
train
39,590
pallets__jinja.ada0a9a6.lm_rewrite__f9sn7uc5
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### Description It seems that filters and tests are not being properly checked for existence before being used in conditional expressions. This results in a `KeyError` when a filter or test is referenced but not defined in the environment. ### How to Reproduce Here's a minimal example to reproduce the issue: 1. Cre...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..7d121ca 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -547,40 +547,18 @@ class CodeGenerator(NodeVisitor): runtime instead of compile time. """ visitor = DependencyFinderVisitor() - ...
["tests/test_compile.py::test_filters_deterministic", "tests/test_filters.py::TestFilter::test_filter_undefined_in_if", "tests/test_filters.py::TestFilter::test_filter_undefined_in_elif", "tests/test_filters.py::TestFilter::test_filter_undefined_in_else", "tests/test_filters.py::TestFilter::test_filter_undefined_in_nes...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
42
7
1,322
0
0.6
1
0.75
1
0.360333
81.356
4,736
swe_smith::train::24583
swe_smith
train
24,583
marshmallow-code__marshmallow.9716fc62.combine_file__w6t6b3ut
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
# Schema registry not handling multiple classes with same name correctly When registering schemas with the same class name but from different modules, the registry is not properly maintaining them. This causes issues when trying to reference schemas by name. ## Reproduction I have two schemas with the same class nam...
diff --git a/src/marshmallow/class_registry.py b/src/marshmallow/class_registry.py index d41b112..b6b2e31 100644 --- a/src/marshmallow/class_registry.py +++ b/src/marshmallow/class_registry.py @@ -27,45 +27,20 @@ _registry = {} # type: dict[str, list[SchemaType]] def register(classname: str, cls: SchemaType) -> N...
["tests/test_registry.py::test_serializer_class_registry_register_same_classname_different_module", "tests/test_registry.py::test_serializer_class_registry_override_if_same_classname_same_module", "tests/test_registry.py::test_multiple_classes_with_same_name_raises_error", "tests/test_registry.py::test_multiple_classes...
["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
44
5
1,281
0
0.6
1
0.75
1
0.360167
81.3555
4,737
swe_smith::train::45379
swe_smith
train
45,379
dask__dask.5f61e423.lm_rewrite__00uv53s4
swesmith/dask__dask.5f61e423
dask/dask
python
null
AttributeError: 'DataFrame' object has no attribute '_name' ### Description Hello team, I've encountered an issue with the recent changes in the `dask.dataframe.dask_expr._collection` module. It seems that certain operations on DataFrame objects are now raising an `AttributeError`, specifically indicating that the '...
diff --git a/dask/dataframe/dask_expr/_collection.py b/dask/dataframe/dask_expr/_collection.py index 7aa07d4..a3f4b11 100644 --- a/dask/dataframe/dask_expr/_collection.py +++ b/dask/dataframe/dask_expr/_collection.py @@ -620,21 +620,31 @@ Expr={expr}""" ) def __getattr__(self, key): + """Return a...
["dask/dataframe/dask_expr/tests/test_collection.py::test_dont_fuse_from_pandas_ops", "dask/dataframe/dask_expr/tests/test_collection.py::test_meta_divisions_name", "dask/dataframe/dask_expr/tests/test_collection.py::test_dot", "dask/dataframe/dask_expr/tests/test_collection.py::test_value_counts", "dask/dataframe/dask...
["dask/dataframe/dask_expr/tests/test_collection.py::test_del", "dask/dataframe/dask_expr/tests/test_collection.py::test_info[True-None-True]", "dask/dataframe/dask_expr/tests/test_collection.py::test_info[True-None-False]", "dask/dataframe/dask_expr/tests/test_collection.py::test_info[True-None-None]", "dask/dataframe...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
38
80
1,400
0
0.6
1
0.75
1
0.36
81.355
4,738
swe_smith::train::21510
swe_smith
train
21,510
rubik__radon.54b88e58.lm_rewrite__js7055gx
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
[Bug]: cc_to_dict function not handling Function objects correctly ### Bug summary The `cc_to_dict` function in `radon/cli/tools.py` is not correctly converting Function objects to dictionaries. This causes issues when trying to generate JSON output for cyclomatic complexity results. ### Code for reproduction ```py...
diff --git a/radon/cli/tools.py b/radon/cli/tools.py index cc8d4fa..ec78ab7 100644 --- a/radon/cli/tools.py +++ b/radon/cli/tools.py @@ -291,29 +291,25 @@ def filter_out(strings, patterns): def cc_to_dict(obj): - '''Convert an object holding CC results into a dictionary. This is meant - for JSON dumping.''' ...
["radon/tests/test_cli_tools.py::test_cc_to_dict[blocks0-dict_result0]", "radon/tests/test_cli_tools.py::test_cc_to_dict[blocks1-dict_result1]", "radon/tests/test_cli_tools.py::test_cc_to_dict[blocks2-dict_result2]", "radon/tests/test_ipynb.py::test_ipynb", "radon/tests/test_ipynb.py::test_ipynb_with_cells"]
["radon/tests/test_cli.py::test_config_base_behavior", "radon/tests/test_cli.py::test_config_exceptions", "radon/tests/test_cli.py::test_config_str", "radon/tests/test_cli.py::test_config_eq", "radon/tests/test_cli.py::test_config_for", "radon/tests/test_cli.py::test_config_converts_types", "radon/tests/test_cli.py::te...
jyangballin/swesmith.x86_64.rubik_1776_radon.54b88e58
true
null
1
42
5
1,319
0
0.6
1
0.75
1
0.359833
81.3545
4,739
swe_smith::train::18382
swe_smith
train
18,382
msiemens__tinydb.10644a0e.pr_504
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
# TinyDB get() method no longer supports retrieving multiple documents by doc_ids ### Bug description I'm using TinyDB to retrieve multiple documents by their IDs, but I'm encountering an error when trying to use the `get()` method with the `doc_ids` parameter. When I try to retrieve multiple documents using code li...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..db2b977 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -284,20 +284,15 @@ class Table: self, cond: Optional[QueryLike] = None, doc_id: Optional[int] = None, - doc_ids: Optional[List] = None - ) -> Optional[Union[Do...
["tests/test_tinydb.py::test_get_multiple_ids[memory]", "tests/test_tinydb.py::test_get_multiple_ids[json]"]
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
29
2
1,577
0
0.6
1
0.75
1
0.3595
81.3535
4,740
r2e_gym::train::4762
r2e_gym
train
4,762
numpy__8969da59ea9803b81b0dcb2fab3f41d4b168bc68
numpy
numpy/numpy
python
8969da59ea9803b81b0dcb2fab3f41d4b168bc68
**Title:** `np.gradient` Produces Incorrect Results for `datetime64` and `timedelta64` Arrays **Description:** When using `numpy.gradient` on arrays with `datetime64` or `timedelta64` data types, the function returns unexpected and incorrect gradient values, especially at the boundaries. Additionally, attempting to sp...
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -883,28 +883,33 @@ # Basic operations -def gradient(f, *varargs): +def gradient(f, *varargs, **kwargs): """ Return the gradient of an N-dimensional array. - + ...
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -536,7 +536,7 @@ '1910-10-12', '1910-12-12', '1912-12-12'], dtype='datetime64[D]') dx = np.array( - ...
null
null
namanjain12/numpy_final:8969da59ea9803b81b0dcb2fab3f41d4b168bc68
true
null
1
51
null
1,849
0
0.75
1
0.6375
1
0.478167
81.35325
4,741
swe_smith::train::51290
swe_smith
train
51,290
marshmallow-code__apispec.8b421526.lm_rewrite__0qho0dmb
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
# trim_docstring function breaks YAML parsing from docstrings ### What happened? After recent changes to the `trim_docstring` function in `apispec.utils`, YAML parsing from docstrings is broken. The function no longer correctly handles docstrings that contain only YAML content (like "---") without any regular text be...
diff --git a/src/apispec/utils.py b/src/apispec/utils.py index 0ddb831..7708c93 100644 --- a/src/apispec/utils.py +++ b/src/apispec/utils.py @@ -43,19 +43,38 @@ def build_reference( # from django.contrib.admindocs.utils -def trim_docstring(docstring: str) -> str: +def trim_docstring(docstring: str) ->str: """...
["tests/test_yaml_utils.py::test_load_yaml_from_docstring", "tests/test_yaml_utils.py::test_load_yaml_from_docstring_empty_docstring[---]", "tests/test_yaml_utils.py::test_load_operations_from_docstring_empty_docstring[---]"]
["tests/test_core.py::TestAPISpecInit::test_raises_wrong_apispec_version", "tests/test_core.py::TestMetadata::test_openapi_metadata[2.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata[3.0.0]", "tests/test_core.py::TestMetadata::test_openapi_metadata_merge_v3[3.0.0]", "tests/test_core.py::TestTags::test_tag[...
jyangballin/swesmith.x86_64.marshmallow-code_1776_apispec.8b421526
true
null
1
33
3
1,496
0
0.6
1
0.75
1
0.359333
81.353
4,742
r2e_gym::train::4525
r2e_gym
train
4,525
numpy__fe16f8322e7a45269df7d1631e9ac6216d17f05f
numpy
numpy/numpy
python
fe16f8322e7a45269df7d1631e9ac6216d17f05f
**Analysis:** - **Key Parts:** - The commit deprecates incorrect behavior of `expand_dims`, specifically axis values outside the valid range. - In the old commit, the test `TestExpandDims.test_deprecations` failed because using `axis=-6` raised an `AxisError` instead of a `DeprecationWarning`. - The expected beh...
diff --git a/doc/release/1.13.0-notes.rst b/doc/release/1.13.0-notes.rst --- a/doc/release/1.13.0-notes.rst +++ b/doc/release/1.13.0-notes.rst @@ -53,6 +53,9 @@ with ``np.minimum``. * Calling ``ndarray.conjugate`` on non-numeric dtypes is deprecated (it should match the behavior of ``np.conjugate``, which throws...
diff --git a/numpy/lib/tests/test_shape_base.py b/numpy/lib/tests/test_shape_base.py --- a/numpy/lib/tests/test_shape_base.py +++ b/numpy/lib/tests/test_shape_base.py @@ -1,9 +1,11 @@ from __future__ import division, absolute_import, print_function import numpy as np +import warnings + from numpy.lib.shape_base im...
null
null
namanjain12/numpy_final:fe16f8322e7a45269df7d1631e9ac6216d17f05f
true
null
2
24
null
2,388
0
0.75
1
0.6375
1
0.478
81.35275
4,743
swe_smith::train::18548
swe_smith
train
18,548
HIPS__autograd.ac044f0d.lm_rewrite__p8t5ifgz
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
**Unexpected Behavior in `np.inner` with Non-Broadcastable Operands** **Describe the bug** When using `np.inner` with certain non-broadcastable operand shapes, a `ValueError` is raised unexpectedly. This issue seems to occur when the operands have specific dimensions that do not align for broadcasting. **To Reproduce...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..088d43e 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -546,16 +546,44 @@ defvjp(anp.cumsum, grad_np_cumsum) def grad_inner(argnum, ans, A, B): - A_ndim, B_ndim = anp.ndim(A), anp.ndim(B) - ...
["tests/test_systematic.py::test_inner"]
["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
46
1
1,234
0
0.6
1
0.75
1
0.359
81.352
4,744
swe_smith::train::19586
swe_smith
train
19,586
seperman__deepdiff.ed252022.lm_rewrite__z9hswmvc
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
# Security vulnerability in unpickling objects from modules that are not imported I've found a security issue in the `_RestrictedUnpickler.find_class` method that could lead to unexpected behavior when unpickling objects from modules that aren't already imported. ## Reproduction ```python import pickle import sys fr...
diff --git a/deepdiff/serialization.py b/deepdiff/serialization.py index aa56399..ceb5971 100644 --- a/deepdiff/serialization.py +++ b/deepdiff/serialization.py @@ -325,17 +325,31 @@ class _RestrictedUnpickler(pickle.Unpickler): super().__init__(*args, **kwargs) def find_class(self, module, name): - ...
["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
34
1
1,473
0
0.6
1
0.75
1
0.358833
81.3515
4,745
swe_smith::train::1002
swe_smith
train
1,002
pytest-dev__iniconfig.16793ead.combine_module__tou5haey
swesmith/pytest-dev__iniconfig.16793ead
pytest-dev/iniconfig
python
null
SectionWrapper constructor arguments swapped causing AttributeError #### Description When creating a SectionWrapper instance, the constructor arguments are being assigned incorrectly, causing the config and name attributes to be swapped. This leads to various AttributeError exceptions when trying to access section me...
diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py index 3c40bc9..b27f6e0 100644 --- a/src/iniconfig/__init__.py +++ b/src/iniconfig/__init__.py @@ -37,8 +37,8 @@ class SectionWrapper: name: Final[str] def __init__(self, config: IniConfig, name: str) -> None: - self.config = config - ...
["testing/test_iniconfig.py::test_tokenize[comment]", "testing/test_iniconfig.py::test_tokenize[comment2]", "testing/test_iniconfig.py::test_tokenize[section]", "testing/test_iniconfig.py::test_tokenize[value]", "testing/test_iniconfig.py::test_continuation_cant_be_after_section", "testing/test_iniconfig.py::test_secti...
["testing/test_iniconfig.py::test_parse_empty", "testing/test_iniconfig.py::test_ParseError", "testing/test_iniconfig.py::test_continuation_needs_perceeding_token", "testing/test_iniconfig.py::test_api_import", "testing/test_iniconfig.py::test_iscommentline_true[#qwe]", "testing/test_iniconfig.py::test_iscommentline_tr...
jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead
true
null
2
38
22
1,393
0
0.6
1
0.75
1
0.358833
81.3515
4,746
swe_smith::train::38022
swe_smith
train
38,022
weaveworks__grafanalib.5c3b17ed.combine_file__2a6rzcsr
swesmith/weaveworks__grafanalib.5c3b17ed
weaveworks/grafanalib
python
null
# Validators in grafanalib are not working correctly I discovered that validators in grafanalib are completely broken. Several issues: 1. The `is_in` validator is inverted - it raises an error when a value IS in the choices list, rather than when it's NOT in the list. 2. The color code validator has multiple problem...
diff --git a/grafanalib/validators.py b/grafanalib/validators.py index e7c69a2..2e32f39 100644 --- a/grafanalib/validators.py +++ b/grafanalib/validators.py @@ -7,7 +7,7 @@ class _IsInValidator(object): choices = attr.attr() def __call__(self, inst, attr, value): - if value not in self.choices: + ...
["grafanalib/tests/test_opentsdb.py::test_serialization_opentsdb_target", "grafanalib/tests/test_validators.py::test_is_in", "grafanalib/tests/test_validators.py::test_is_in_raises", "grafanalib/tests/test_validators.py::test_is_color_code_raises[#gggggg]", "grafanalib/tests/test_validators.py::test_is_color_code_raise...
["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
14
7
1,873
0
0.6
1
0.75
1
0.358833
81.3515
4,747
swe_smith::train::38349
swe_smith
train
38,349
burnash__gspread.a8be3b96.lm_rewrite__596cni6x
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
Color Conversion Error with Hexadecimal Input Description Hi there, I've encountered an issue with the `convert_hex_to_colors_dict` function when dealing with certain hexadecimal color inputs. It seems that the function is not handling some valid hex color formats correctly, which leads to unexpected behavior. To r...
diff --git a/gspread/utils.py b/gspread/utils.py index 6daac86..c8df8ff 100644 --- a/gspread/utils.py +++ b/gspread/utils.py @@ -854,32 +854,31 @@ def convert_hex_to_colors_dict(hex_color: str) -> Mapping[str, float]: {'red': 0.2, 'green': 0.0, 'blue': 0.8} """ - hex_color = hex_color.lstrip("#") - -...
["tests/utils_test.py::UtilsTest::test_convert_hex_to_color"]
["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_merge_cells", "tests/cell_test.py::CellTest::test_numeric_value", "tests/ce...
jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96
true
null
1
45
1
1,252
0
0.6
1
0.75
1
0.358667
81.351
4,748
swe_smith::train::35616
swe_smith
train
35,616
stanfordnlp__dspy.651a4c71.func_pm_op_swap__22uh330j
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Random search optimization fails with empty scores list When using `BootstrapFewShotWithRandomSearch` teleprompter, the optimization process fails with a ValueError when trying to find the best program. ## Description I'm trying to use the random search teleprompter to optimize a simple module, but it's failing wi...
diff --git a/dspy/teleprompt/random_search.py b/dspy/teleprompt/random_search.py index caba147..4fa8838 100644 --- a/dspy/teleprompt/random_search.py +++ b/dspy/teleprompt/random_search.py @@ -122,12 +122,12 @@ class BootstrapFewShotWithRandomSearch(Teleprompter): ############ Assertion-aware Optimizatio...
["tests/teleprompt/test_random_search.py::test_basic_workflow"]
["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
7
1
2,012
0
0.6
1
0.75
1
0.358667
81.351
4,749
swe_smith::train::4337
swe_smith
train
4,337
pygments__pygments.27649ebb.func_pm_ctrl_shuffle__002iurxg
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
HtmlFormatter initialization order causes AttributeError with tagsfile option #### Description When using the HtmlFormatter with the `tagsfile` option, an AttributeError is raised during initialization because the code tries to access `self.tagsfile` before it's been assigned. #### Steps/Code to Reproduce ```python...
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index 3330c1d..0841dcc 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -409,54 +409,53 @@ class HtmlFormatter(Formatter): filenames = ['*.html', '*.htm'] def __init__(self, **options): + self.noclobbe...
["tests/test_html_formatter.py::test_lineanchors_with_startnum", "tests/test_html_formatter.py::test_get_style_defs_contains_pre_style", "tests/test_html_formatter.py::test_get_style_defs_contains_default_line_numbers_styles", "tests/test_html_formatter.py::test_ctags", "tests/test_html_formatter.py::test_external_css"...
["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
57
162
1,012
0
0.6
1
0.75
1
0.358667
81.351
4,750
swe_smith::train::4726
swe_smith
train
4,726
bottlepy__bottle.a8dfef30.func_basic__4ns7r09f
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
static_file function broken after recent changes #### Description The `static_file` function is completely broken and throws `TypeError` when trying to serve files. Multiple issues seem to have been introduced that prevent basic file serving functionality. #### Steps/Code to Reproduce ```python import bottle import...
diff --git a/bottle.py b/bottle.py index 286b5bc..fed4ce0 100755 --- a/bottle.py +++ b/bottle.py @@ -2857,33 +2857,33 @@ def static_file(filename, root, root = os.path.join(os.path.abspath(root), '') filename = os.path.abspath(os.path.join(root, filename.strip('/\\'))) - headers = headers.copy() if heade...
["test/test_sendfile.py::TestSendFile::test_custom_headers", "test/test_sendfile.py::TestSendFile::test_download", "test/test_sendfile.py::TestSendFile::test_etag", "test/test_sendfile.py::TestSendFile::test_ims", "test/test_sendfile.py::TestSendFile::test_ims_empty", "test/test_sendfile.py::TestSendFile::test_mime", "...
["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_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
44
9
1,272
0
0.6
1
0.75
1
0.358667
81.351
4,751
swe_smith::train::761
swe_smith
train
761
oauthlib__oauthlib.1fd52536.func_pm_ctrl_shuffle__jk0rxtgo
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
HMAC signature generation broken due to variable ordering issue #### Description OAuth1 HMAC signature generation is failing because variables are being used before they are defined in the `_sign_hmac` function. #### Steps/Code to Reproduce ```python from oauthlib.oauth1 import Client from oauthlib.oauth1.rfc5849 i...
diff --git a/oauthlib/oauth1/rfc5849/signature.py b/oauthlib/oauth1/rfc5849/signature.py index 8916782..d11cad3 100644 --- a/oauthlib/oauth1/rfc5849/signature.py +++ b/oauthlib/oauth1/rfc5849/signature.py @@ -367,6 +367,12 @@ def _sign_hmac(hash_algorithm_name: str, sig_base_str: str, cl...
["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...
["tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointTest::test_create_authorization_response", "tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointTest::test_create_authorization_response_oob", "tests/oauth1/rfc5849/endpoints/test_authorization.py::AuthorizationEndpointT...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
47
58
1,212
0
0.6
1
0.75
1
0.358667
81.351
4,752
swe_smith::train::51688
swe_smith
train
51,688
pydicom__pydicom.7d361b3d.func_basic__1ecnc6cw
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
EncodeRunner._get_frame_buffer fails with TypeError when index is None #### Description When using the pixel data encoding functionality, passing `None` as the index parameter to `_get_frame_buffer` results in a TypeError due to incorrect conditional logic. #### Steps/Code to Reproduce ```python import pydicom from...
diff --git a/src/pydicom/pixels/encoders/base.py b/src/pydicom/pixels/encoders/base.py index c5123f9..9cea205 100644 --- a/src/pydicom/pixels/encoders/base.py +++ b/src/pydicom/pixels/encoders/base.py @@ -171,77 +171,51 @@ class EncodeRunner(RunnerBase): def _get_frame_buffer(self, index: int | None) -> bytes | ...
["tests/pixels/test_encoder_base.py::TestDatasetCompress::test_compress_inplace", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_encapsulate_extended", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_planar_configuration_rle", "tests/pixels/test_encoder_base.py::TestFuture::test_compress", ...
["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
58
6
991
0
0.6
1
0.75
1
0.3585
81.3505
4,753
swe_smith::train::46335
swe_smith
train
46,335
conan-io__conan.86f29e13.pr_15665
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
Unexpected Behavior with Platform Requires and System Tool Requires I encountered an issue with the recent changes in the dependency graph handling. It seems that the platform requires and system tool requires are not being resolved as expected, leading to unexpected behavior during package creation and installation. ...
diff --git a/conans/client/graph/graph_builder.py b/conans/client/graph/graph_builder.py index 51ac37a..7d8bb78 100644 --- a/conans/client/graph/graph_builder.py +++ b/conans/client/graph/graph_builder.py @@ -273,16 +273,8 @@ class DepsGraphBuilder(object): @staticmethod def _resolved_system(node, require, pr...
["test/integration/graph/test_platform_requires.py::TestPlatformRequires::test_platform_requires", "test/integration/graph/test_platform_requires.py::TestPlatformRequires::test_platform_requires_range", "test/integration/graph/test_platform_requires.py::TestPlatformRequires::test_platform_requires_build_context", "test...
["test/integration/graph/test_platform_requires.py::TestPlatformRequires::test_platform_requires_non_matching", "test/integration/graph/test_platform_requires.py::TestPlatformRequires::test_platform_requires_range_non_matching", "test/integration/graph/test_platform_requires.py::TestPlatformRequires::test_platform_requ...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
3
28
25
1,591
0
0.6
1
0.75
1
0.3585
81.3505
4,754
swe_smith::train::32693
swe_smith
train
32,693
pydantic__pydantic.acb0f10f.func_pm_remove_cond__jyri7e1l
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Model validation bypassed for unannotated attributes #### Description When defining a Pydantic model with unannotated attributes, the model construction process is not properly validating or handling these attributes, allowing models to be created without proper field validation. #### Steps/Code to Reproduce ```pyt...
diff --git a/pydantic/_internal/_model_construction.py b/pydantic/_internal/_model_construction.py index 88f67ef..534ce9c 100644 --- a/pydantic/_internal/_model_construction.py +++ b/pydantic/_internal/_model_construction.py @@ -398,9 +398,6 @@ def inspect_namespace( # noqa C901 private_attributes: dict[str, Mode...
["tests/test_computed_fields.py::test_properties_and_computed_fields", "tests/test_config.py::TestsBaseConfig::test_base_config_private_attribute_intersection_with_extra_field", "tests/test_construction.py::test_pickle_undefined", "tests/test_construction.py::test_copy_undefined[copy]", "tests/test_construction.py::tes...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
53
44
1,090
0
0.6
1
0.75
1
0.358333
81.35
4,755
swe_smith::train::20402
swe_smith
train
20,402
tobymao__sqlglot.036601ba.combine_file__e3glq4nf
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Column qualification fails with UnboundLocalError in _add_rename_columns #### Description The column qualification optimizer is throwing an `UnboundLocalError` when processing queries. The error occurs in the `_add_rename_columns` function where the `columns` variable is referenced before being defined. #### Steps/C...
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..332d58a 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -175,9 +175,6 @@ def _expand_using(scope: Scope, resolver: Resolver) -> t.Dict[str, t.Any]: names = {join.a...
["tests/test_optimizer.py::TestOptimizer::test_canonicalize", "tests/test_optimizer.py::TestOptimizer::test_expand_alias_refs", "tests/test_optimizer.py::TestOptimizer::test_file_schema", "tests/test_optimizer.py::TestOptimizer::test_lateral_annotation", "tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", ...
["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
47
18
1,210
0
0.6
1
0.75
1
0.358333
81.35
4,756
swe_smith::train::30797
swe_smith
train
30,797
mido__mido.a0158ff9.combine_module__y4gbjyko
swesmith/mido__mido.a0158ff9
mido/mido
python
null
# Pitchwheel range check is too restrictive ## Description The current implementation of `check_pitch()` in `mido/messages/checks.py` is using strict inequality (`<`) instead of inclusive inequality (`<=`) when checking if a pitchwheel value is within the valid range. This means that the minimum and maximum pitchwhe...
diff --git a/mido/messages/checks.py b/mido/messages/checks.py index 2d71918..0cd3b1e 100644 --- a/mido/messages/checks.py +++ b/mido/messages/checks.py @@ -35,10 +35,10 @@ def check_pos(pos): def check_pitch(pitch): if not isinstance(pitch, Integral): - raise TypeError('pichwheel value must be int') - ...
["../dev/tests/test_parser.py::test_parse", "../dev/tests/test_parser.py::test_encode_and_parse", "../dev/tests/test_parser.py::test_parse_channel", "../dev/tests/test_parser.py::test_encode_and_parse_all", "../dev/tests/messages/test_decode.py::test_channel", "../dev/tests/messages/test_decode.py::test_too_few_bytes",...
["../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev...
jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9
true
null
2
36
11
1,429
0
0.6
1
0.75
1
0.358167
81.3495
4,757
swe_smith::train::38179
swe_smith
train
38,179
john-kurkowski__tldextract.3d1bf184.combine_file__n6zgcqxa
swesmith/john-kurkowski__tldextract.3d1bf184
john-kurkowski/tldextract
python
null
# Cache directory creation and environment variable handling issues in tldextract ## Description I've encountered several issues with the cache directory handling in tldextract that are causing failures in my application: 1. The cache directory is not being created properly. When trying to use tldextract, I'm gettin...
diff --git a/tldextract/cache.py b/tldextract/cache.py index 83a87f0..35bb425 100644 --- a/tldextract/cache.py +++ b/tldextract/cache.py @@ -64,9 +64,9 @@ def get_cache_dir() -> str: if cache_dir is not None: return cache_dir - xdg_cache_home = os.getenv("XDG_CACHE_HOME", None) + xdg_cache_home = ...
["tests/main_test.py::test_cache_permission", "tests/test_cache.py::test_disk_cache", "tests/test_cache.py::test_get_cache_dir", "tests/test_cache.py::test_run_and_cache", "tests/test_parallel.py::test_multiprocessing_makes_one_request"]
["tests/cli_test.py::test_cli_no_input", "tests/cli_test.py::test_cli_parses_args", "tests/cli_test.py::test_cli_posargs", "tests/cli_test.py::test_cli_namedargs", "tests/cli_test.py::test_cli_json_output", "tests/custom_suffix_test.py::test_private_extraction", "tests/custom_suffix_test.py::test_suffix_which_is_not_in...
jyangballin/swesmith.x86_64.john-kurkowski_1776_tldextract.3d1bf184
true
null
1
10
5
1,949
0
0.6
1
0.75
1
0.358167
81.3495
4,758
swe_smith::train::42001
swe_smith
train
42,001
scanny__python-pptx.278b47b1.func_pm_class_rm_funcs__x4dwje3d
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Group shape methods missing after refactoring I was working with group shapes in python-pptx and noticed that some functionality seems to have been removed. When I try to access child extents or iterate over shape elements in a group shape, I get AttributeError exceptions. #### Steps/Code to Reproduce ```python from...
diff --git a/src/pptx/oxml/shapes/groupshape.py b/src/pptx/oxml/shapes/groupshape.py index f62bc66..5931da3 100644 --- a/src/pptx/oxml/shapes/groupshape.py +++ b/src/pptx/oxml/shapes/groupshape.py @@ -138,15 +138,6 @@ class CT_GroupShape(BaseShapeElement): if e.has_ph_elm: yield e - d...
["tests/oxml/shapes/test_groupshape.py::DescribeCT_GroupShape::it_calculates_its_child_extents_to_help[child_exts_fixture0]", "tests/oxml/shapes/test_groupshape.py::DescribeCT_GroupShape::it_calculates_its_child_extents_to_help[child_exts_fixture1]", "tests/oxml/shapes/test_groupshape.py::DescribeCT_GroupShape::it_calc...
["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
33
29
1,488
0
0.6
1
0.75
1
0.358
81.349
4,759
swe_smith::train::43675
swe_smith
train
43,675
sloria__environs.73c372df.combine_file__1ek10skm
swesmith/sloria__environs.73c372df
sloria/environs
python
null
Environment variable parsing returns wrong values after recent changes #### Description After some recent changes, environment variable parsing is not working correctly. When trying to read environment variables, the library is returning default values instead of the actual environment variable values, or in some cas...
diff --git a/src/environs/__init__.py b/src/environs/__init__.py index 00f6072..91f0a7a 100644 --- a/src/environs/__init__.py +++ b/src/environs/__init__.py @@ -257,8 +257,8 @@ def _preprocess_list( value: str | typing.Iterable, *, delimiter: str = ",", **kwargs ) -> typing.Iterable: if ma.utils.is_iterable_...
["tests/test_environs.py::TestCasting::test_call", "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_invalid_int", "tests/test_environs.py::TestCasting::test_float_cas...
["tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_list_with_default_from_string", "tests/test_environs.py::TestCasting::test_dict_with_default_from_string", "tests/test_environs.py::TestCasting::test_dict_with_default_from_dict", "tests/test_environs.py::TestCast...
jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df
true
null
1
32
80
1,507
0
0.6
1
0.75
1
0.357833
81.3485
4,760
swe_smith::train::31405
swe_smith
train
31,405
benoitc__gunicorn.bacbf8aa.combine_file__wc8vk1ds
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Arbiter initialization broken after recent changes #### Description The Arbiter class fails to initialize properly due to several issues in the constructor. When creating an Arbiter instance, it crashes with AttributeError because `worker_class` is being set to `None` instead of the configured worker class. #### Ste...
diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 646d684..d654aed 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -89,17 +89,17 @@ class Arbiter: self.app = app self.cfg = app.cfg - if self.log is None: + if self.log is not None: self.log = self.c...
["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
43
12
1,286
0
0.6
1
0.75
1
0.357667
81.348
4,761
swe_smith::train::3359
swe_smith
train
3,359
pygments__pygments.27649ebb.combine_file__ci6bjvz4
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Lexer token type assignments broken in markup.py Description Several lexers in `pygments/lexers/markup.py` are producing incorrect token types and causing KeyError exceptions when processing code blocks and markup elements. The issue affects RstLexer, TiddlyWiki5Lexer, and WikitextLexer. Steps/Code to Reproduce ```...
diff --git a/pygments/lexers/markup.py b/pygments/lexers/markup.py index 5d5ff2c..0383b2f 100644 --- a/pygments/lexers/markup.py +++ b/pygments/lexers/markup.py @@ -134,28 +134,28 @@ class RstLexer(RegexLexer): from pygments.lexers import get_lexer_by_name # section header - yield match.start...
["tests/test_basic_api.py::test_random_input[WikitextLexer]", "tests/test_basic_api.py::test_lexer_options[WikitextLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_classes[WikitextLexer]", "tests/snippets/wikitext/only-highlight-first-redirect.txt::", "tests/examplefiles/rst/jin...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
57
25
1,004
0
0.6
1
0.75
1
0.357333
81.347
4,762
swe_smith::train::3529
swe_smith
train
3,529
pygments__pygments.27649ebb.combine_file__vd0zdnky
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
WikitextLexer broken after recent changes #### Description The WikitextLexer is throwing KeyError: 'name' when trying to tokenize wikitext content. This affects all wikitext parsing functionality. #### Steps/Code to Reproduce ```python from pygments.lexers import WikitextLexer lexer = WikitextLexer() code = "'''bo...
diff --git a/pygments/lexers/markup.py b/pygments/lexers/markup.py index 5d5ff2c..c8514a0 100644 --- a/pygments/lexers/markup.py +++ b/pygments/lexers/markup.py @@ -134,28 +134,28 @@ class RstLexer(RegexLexer): from pygments.lexers import get_lexer_by_name # section header - yield match.start...
["tests/test_basic_api.py::test_random_input[WikitextLexer]", "tests/test_basic_api.py::test_lexer_options[WikitextLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_classes[WikitextLexer]", "tests/snippets/wikitext/only-highlight-first-redirect.txt::", "tests/examplefiles/rst/jin...
["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma...
jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb
true
null
1
61
25
923
0
0.6
1
0.75
1
0.357167
81.3465
4,763
swe_smith::train::31701
swe_smith
train
31,701
benoitc__gunicorn.bacbf8aa.lm_rewrite__qo8ncrou
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
### Issue: TypeError when validating callable strings #### Description After updating the `validate_callable` function, there seems to be an issue with validating callable strings. When attempting to validate a string that represents a callable, a `TypeError` is raised unexpectedly. #### Steps to Reproduce 1. Use t...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..e5a6624 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -431,29 +431,38 @@ def validate_class(val): def validate_callable(arity): + """Returns a validator function that checks that the provided value is a + callable that accepts ...
["tests/test_config.py::test_callable_validation_for_string"]
["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
45
1
1,241
0
0.6
1
0.75
1
0.356833
81.3455
4,764
swe_smith::train::38184
swe_smith
train
38,184
john-kurkowski__tldextract.3d1bf184.combine_file__zfqj17dm
swesmith/john-kurkowski__tldextract.3d1bf184
john-kurkowski/tldextract
python
null
# Release script fails when generating GitHub release notes ## Description I'm trying to use the release script to create a new release, but it's failing when trying to generate GitHub release notes. The script seems to be swapping the token and version parameters when making the API request to GitHub. ```python >>>...
diff --git a/scripts/release.py b/scripts/release.py index 501d585..d17c721 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -53,7 +53,7 @@ def remove_previous_dist() -> None: def create_build() -> None: """Create a build.""" - subprocess.run(["python", "-m", "build"], check=True) + subprocess....
["tests/test_release.py::test_happy_path"]
["tests/cli_test.py::test_cli_no_input", "tests/cli_test.py::test_cli_parses_args", "tests/cli_test.py::test_cli_posargs", "tests/cli_test.py::test_cli_namedargs", "tests/cli_test.py::test_cli_json_output", "tests/custom_suffix_test.py::test_private_extraction", "tests/custom_suffix_test.py::test_suffix_which_is_not_in...
jyangballin/swesmith.x86_64.john-kurkowski_1776_tldextract.3d1bf184
true
null
1
16
1
1,821
0
0.6
1
0.75
1
0.356833
81.3455
4,765
swe_smith::train::18768
swe_smith
train
18,768
seperman__deepdiff.ed252022.func_basic__7nkb1dry
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
BaseOperator constructor swaps regex_paths and types parameters #### Description When creating custom operators that inherit from BaseOperator, the constructor parameters `regex_paths` and `types` are being swapped internally. This causes operators to match against the wrong criteria - regex patterns are applied wher...
diff --git a/deepdiff/operator.py b/deepdiff/operator.py index b7e2596..0bd950b 100644 --- a/deepdiff/operator.py +++ b/deepdiff/operator.py @@ -6,10 +6,10 @@ class BaseOperator: def __init__(self, regex_paths=None, types=None): if regex_paths: - self.regex_paths = convert_item_or_items_into_...
["tests/test_operators.py::TestOperators::test_custom_operators_prevent_default", "tests/test_operators.py::TestOperators::test_custom_operators_not_prevent_default", "tests/test_operators.py::TestOperators::test_custom_operators_should_not_equal", "tests/test_operators.py::TestOperators::test_custom_operator2"]
["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
6
4
2,021
0
0.6
1
0.75
1
0.356833
81.3455
4,766
r2e_gym::train::4130
r2e_gym
train
4,130
numpy__58ebb6a7d77cf89afeb888a70aff23e03d213788
numpy
numpy/numpy
python
58ebb6a7d77cf89afeb888a70aff23e03d213788
**Title:** `linspace`, `logspace`, and `geomspace` Fail When `start` and `stop` Are Arrays **Description:** When using `linspace`, `logspace`, or `geomspace` with array-like `start` and `stop` parameters, the functions raise a `ValueError`. This prevents generating sequences where each start and stop can vary independ...
diff --git a/doc/release/1.16.0-notes.rst b/doc/release/1.16.0-notes.rst --- a/doc/release/1.16.0-notes.rst +++ b/doc/release/1.16.0-notes.rst @@ -20,7 +20,7 @@ ============= * New functions in the `numpy.lib.recfunctions` module to ease the structured - assignment changes: `assign_fields_by_name`, `structured_t...
diff --git a/numpy/core/tests/test_function_base.py b/numpy/core/tests/test_function_base.py --- a/numpy/core/tests/test_function_base.py +++ b/numpy/core/tests/test_function_base.py @@ -2,7 +2,7 @@ from numpy import ( logspace, linspace, geomspace, dtype, array, sctypes, arange, isnan, - ndarray, sqrt, next...
null
null
namanjain12/numpy_final:58ebb6a7d77cf89afeb888a70aff23e03d213788
true
null
2
82
null
1,213
0
0.75
1
0.6375
1
0.4755
81.34525
4,767
swe_smith::train::35892
swe_smith
train
35,892
stanfordnlp__dspy.651a4c71.lm_rewrite__cfr1krta
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# merge_dicts function is missing implementation causing evaluation failures ## Description I've encountered an issue with the `merge_dicts` function in `dspy/evaluate/evaluate.py`. The function appears to be defined but doesn't actually implement any merging logic. It creates an empty dictionary but doesn't populate...
diff --git a/dspy/evaluate/evaluate.py b/dspy/evaluate/evaluate.py index 5ddf66c..8118da3 100644 --- a/dspy/evaluate/evaluate.py +++ b/dspy/evaluate/evaluate.py @@ -267,20 +267,25 @@ def prediction_is_dictlike(prediction): def merge_dicts(d1, d2) -> dict: merged = {} - for k, v in d1.items(): - if k i...
["tests/evaluate/test_evaluate.py::test_construct_result_df", "tests/evaluate/test_evaluate.py::test_evaluate_display_table[True-True-program_with_example0]", "tests/evaluate/test_evaluate.py::test_evaluate_display_table[True-True-program_with_example3]", "tests/evaluate/test_evaluate.py::test_evaluate_display_table[Tr...
["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
29
13
1,559
0
0.6
1
0.75
1
0.3565
81.3445
4,768
swe_smith::train::3505
swe_smith
train
3,505
pygments__pygments.27649ebb.combine_file__t0y6scko
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
PostgresConsoleLexer and SqliteConsoleLexer broken after recent changes #### Description The PostgresConsoleLexer and SqliteConsoleLexer are throwing AttributeError exceptions when processing input. The lexers appear to have issues with their prompt detection and line processing logic. #### Steps/Code to Reproduce ...
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py index 9016538..f96de5c 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_lexer_options[SqliteConsoleLexer]", "tests/test_basic_api.py::test_random_input[PostgresConsoleLexer]", "tests/test_basic_api.py::test_lexer_options[PostgresConsoleLexer]", "tests/test_basic_api.py::test_random_input[SqliteConsoleLexer]", "tests/examplefiles/sqlite3/sqlite3.sqlite3-conso...
["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
54
6
1,057
0
0.6
1
0.75
1
0.356167
81.3435
4,769
r2e_gym::train::218
r2e_gym
train
218
orange3__98c103599e1b5c9ca9dc273fa95f335fea550ac9
orange3
biolab/orange3
python
98c103599e1b5c9ca9dc273fa95f335fea550ac9
**Title:** DiscreteVariable Pickle Backward Compatibility Fails After Recent Commit **Description:** After updating to the latest version, attempting to unpickle `DiscreteVariable` objects that were serialized with a previous version results in an error. This issue prevents the successful restoration of `DiscreteVaria...
diff --git a/Orange/data/variable.py b/Orange/data/variable.py --- a/Orange/data/variable.py +++ b/Orange/data/variable.py @@ -870,7 +870,7 @@ If time is specified without a date, Unix epoch is assumed. - If time is specified wihout an UTC offset, localtime is assumed. + If time is specified without an U...
diff --git a/Orange/data/tests/test_variable.py b/Orange/data/tests/test_variable.py --- a/Orange/data/tests/test_variable.py +++ b/Orange/data/tests/test_variable.py @@ -13,6 +13,7 @@ from io import StringIO import numpy as np +import pandas as pd import scipy.sparse as sp from Orange.data import Variable, Con...
null
null
namanjain12/orange3_final:98c103599e1b5c9ca9dc273fa95f335fea550ac9
true
null
1
80
null
1,248
0
0.75
1
0.6375
1
0.474667
81.34275
4,770
swe_smith::train::35672
swe_smith
train
35,672
stanfordnlp__dspy.651a4c71.func_pm_remove_assign__1iqqm2u9
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# DatabricksProvider deployment fails due to undefined variables ## Description I found an issue with the DatabricksProvider class in the `dspy/clients/databricks.py` file. When trying to deploy a model, the code fails because it's trying to access variables that are not defined. ## Steps to reproduce 1. Create a D...
diff --git a/dspy/clients/databricks.py b/dspy/clients/databricks.py index 427accf..4982216 100644 --- a/dspy/clients/databricks.py +++ b/dspy/clients/databricks.py @@ -64,43 +64,17 @@ class DatabricksProvider(Provider): headers = {"Context-Type": "text/json", "Authorization": f"Bearer {databricks_token}"} ...
["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
27
4
1,595
0
0.6
1
0.75
1
0.355833
81.3425
4,771
swe_bench::test::1547
swe_bench
test
1,547
scikit-learn__scikit-learn-12421
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
013d295a13721ffade7ac321437c6d4458a64c7d
OPTICS: self.core_distances_ inconsistent with documentation&R implementation In the doc, we state that ``Points which will never be core have a distance of inf.``, but it's not the case. Result from scikit-learn: ``` import numpy as np from sklearn.cluster import OPTICS X = np.array([-5, -2, -4.8, -1.8, -5.2, -2.2, 10...
Does this have an impact on the clustering? I assume it doesn't. But yes, I suppose we can mask those out as inf. > Does this have an impact on the clustering? AFAIK, no. So maybe it's not an urgent one. (I'll try to debug other urgent issues these days). My point here is that we should ensure the correctness of pu...
diff --git a/sklearn/cluster/optics_.py b/sklearn/cluster/optics_.py --- a/sklearn/cluster/optics_.py +++ b/sklearn/cluster/optics_.py @@ -39,9 +39,8 @@ def optics(X, min_samples=5, max_eps=np.inf, metric='minkowski', This implementation deviates from the original OPTICS by first performing k-nearest-neighbor...
diff --git a/sklearn/cluster/tests/test_optics.py b/sklearn/cluster/tests/test_optics.py --- a/sklearn/cluster/tests/test_optics.py +++ b/sklearn/cluster/tests/test_optics.py @@ -22,7 +22,7 @@ rng = np.random.RandomState(0) -n_points_per_cluster = 50 +n_points_per_cluster = 10 C1 = [-5, -2] + .8 * rng.randn(n_poi...
["sklearn/cluster/tests/test_optics.py::test_processing_order", "sklearn/cluster/tests/test_optics.py::test_compare_to_ELKI"]
["sklearn/cluster/tests/test_optics.py::test_correct_number_of_clusters", "sklearn/cluster/tests/test_optics.py::test_minimum_number_of_sample_check", "sklearn/cluster/tests/test_optics.py::test_empty_extract", "sklearn/cluster/tests/test_optics.py::test_bad_extract", "sklearn/cluster/tests/test_optics.py::test_bad_rea...
null
true
2018-10-19T09:32:51Z
1
54
2
853
0
0.8
1
0.55
1
0.322167
81.3415
4,772
swe_smith::train::47440
swe_smith
train
47,440
sqlfluff__sqlfluff.50a1c4b6.combine_file__hwz753ea
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
TOML config loading returns empty dict instead of parsed configuration #### Description When loading configuration from TOML files, the config loader is returning an empty dictionary instead of the actual parsed configuration values. This affects all TOML-based configuration loading. #### Steps/Code to Reproduce ``...
diff --git a/src/sqlfluff/core/config/toml.py b/src/sqlfluff/core/config/toml.py index b814e0b..d46d6c4 100644 --- a/src/sqlfluff/core/config/toml.py +++ b/src/sqlfluff/core/config/toml.py @@ -21,9 +21,9 @@ T = TypeVar("T") def _condense_rule_record(record: NestedDictRecord[T]) -> NestedDictRecord[T]: """Helper f...
["test/core/config/loader_test.py::test__config__load_nested", "test/core/config/loader_test.py::test__config__load_parent", "test/core/config/loader_test.py::test__config__load_toml", "test/core/config/loader_test.py::test__config__toml_list_config"]
["test/core/config/fluffconfig_test.py::test__config__from_strings", "test/core/config/fluffconfig_test.py::test__config__nested_config_tests", "test/core/config/fluffconfig_test.py::test__config__templater_selection[raw-RawTemplater-False]", "test/core/config/fluffconfig_test.py::test__config__templater_selection[jinj...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
49
4
1,153
0
0.6
1
0.75
1
0.3555
81.3415
4,773
swe_smith::train::52642
swe_smith
train
52,642
pydicom__pydicom.7d361b3d.lm_rewrite__1lsvn1r1
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Bug: Value Length Validation Not Triggering Correctly #### Description It seems there's an issue with the value length validation for certain VRs (Value Representations) in the `pydicom` library. When a value exceeds the maximum allowed length for a given VR, the expected behavior is to raise a `ValueError`. Howe...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..b6959c4 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -98,7 +98,7 @@ def validate_type( return True, "" -def validate_vr_length(vr: str, value: Any) -> tuple[bool, str]: +def validate_vr_length(vr: str, value:...
["tests/test_dataelem.py::TestDataElementValidation::test_maxvalue_exceeded[AE-17]", "tests/test_dataelem.py::TestDataElementValidation::test_maxvalue_exceeded[CS-17]", "tests/test_dataelem.py::TestDataElementValidation::test_maxvalue_exceeded[DS-27]", "tests/test_dataelem.py::TestDataElementValidation::test_maxvalue_e...
["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
19
8
1,752
0
0.6
1
0.75
1
0.355333
81.341
4,774
swe_smith::train::991
swe_smith
train
991
pytest-dev__iniconfig.16793ead.combine_module__h23o5xn0
swesmith/pytest-dev__iniconfig.16793ead
pytest-dev/iniconfig
python
null
IniConfig lineof method fails after parsing changes #### Description After recent changes to the parsing logic, the `lineof` method in IniConfig is broken. When trying to get line numbers for sections or keys, it raises an AttributeError because the `_sources` attribute is no longer being initialized. #### Steps/Cod...
diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py index 3c40bc9..293910f 100644 --- a/src/iniconfig/__init__.py +++ b/src/iniconfig/__init__.py @@ -118,8 +118,6 @@ class IniConfig: data = fp.read() tokens = _parse.parse_lines(self.path, data.splitlines(True)) - - self...
["testing/test_iniconfig.py::test_error_on_weird_lines[!!]", "testing/test_iniconfig.py::test_iniconfig_from_file", "testing/test_iniconfig.py::test_iniconig_section_duplicate_fails", "testing/test_iniconfig.py::test_iniconfig_duplicate_key_fails", "testing/test_iniconfig.py::test_iniconfig_lineof", "testing/test_inico...
["testing/test_iniconfig.py::test_tokenize[comment]", "testing/test_iniconfig.py::test_tokenize[comment2]", "testing/test_iniconfig.py::test_tokenize[section]", "testing/test_iniconfig.py::test_tokenize[value]", "testing/test_iniconfig.py::test_parse_empty", "testing/test_iniconfig.py::test_ParseError", "testing/test_i...
jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead
true
null
2
60
15
932
0
0.6
1
0.75
1
0.355333
81.341
4,775
swe_smith::train::11843
swe_smith
train
11,843
andialbrecht__sqlparse.e57923b3.func_pm_class_rm_funcs__rbjxq852
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
# Python output format not working in sqlparse ### Describe the bug The Python output format in sqlparse is not working. When trying to format SQL queries with `output_format='python'`, it fails to produce the expected Python code representation. ### Steps to Reproduce ```python import sqlparse # Try to format a s...
diff --git a/sqlparse/filters/output.py b/sqlparse/filters/output.py index 253537e..7e7ca00 100644 --- a/sqlparse/filters/output.py +++ b/sqlparse/filters/output.py @@ -31,48 +31,7 @@ class OutputFilter: class OutputPythonFilter(OutputFilter): - def _process(self, stream, varname, has_nl): - # SQL query ...
["tests/test_format.py::TestOutputFormat::test_python", "tests/test_format.py::TestOutputFormat::test_python_multiple_statements"]
["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_valid_args", "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_outfi...
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
true
null
1
43
2
1,271
0
0.6
1
0.75
1
0.355167
81.3405
4,776
swe_smith::train::26810
swe_smith
train
26,810
tkrajina__gpxpy.09fc46b3.combine_file__jfv6o22n
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX XML generation produces malformed output When generating GPX XML using `to_xml()`, the output contains malformed XML structure and incorrect namespace handling. The generated XML has broken tag structures and missing namespace declarations. #### Steps to Reproduce ```python import gpxpy # Create a simple GPX wi...
diff --git a/gpxpy/gpxfield.py b/gpxpy/gpxfield.py index e253df3..ba8cb51 100644 --- a/gpxpy/gpxfield.py +++ b/gpxpy/gpxfield.py @@ -352,7 +352,7 @@ class GPXExtensionsField(AbstractGPXField): Convert a tag from Clark notation using the nsmap into a prefixed tag. If the tag isn't in Clark notation, re...
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_bounds_xml", "test.py::GPXTests::test_custom_schema_locations", "test.py::GPXTests::test_default_schema_locations", "test.py::GPXTests::test_dilutions", "test.py::GPXTests::test_garmin_extension", "test.py::GPXTests::test_gpx_10_fields", "test.py:...
["test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_add_missing_elevations", "test.py::GPXTests::tes...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
61
27
911
0
0.6
1
0.75
1
0.355167
81.3405
4,777
swe_smith::train::39034
swe_smith
train
39,034
pallets__jinja.ada0a9a6.func_basic__fowujd11
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
urlize filter broken with nofollow parameter #### Description The urlize filter is not working correctly when the `nofollow` parameter is used. It seems to be applying the opposite logic - when `nofollow=False` it adds the nofollow attribute, and when `nofollow=True` it doesn't add it. #### Steps/Code to Reproduce ...
diff --git a/src/jinja2/filters.py b/src/jinja2/filters.py index 1420877..2f3eb2d 100644 --- a/src/jinja2/filters.py +++ b/src/jinja2/filters.py @@ -739,71 +739,34 @@ def do_urlize( rel: t.Optional[str] = None, extra_schemes: t.Optional[t.Iterable[str]] = None, ) -> str: - """Convert URLs in text into cli...
["tests/test_filters.py::TestFilter::test_urlize", "tests/test_filters.py::TestFilter::test_urlize_rel_policy", "tests/test_filters.py::TestFilter::test_urlize_target_parameter", "tests/test_filters.py::TestFilter::test_urlize_extra_schemes_parameter", "tests/test_regression.py::TestBug::test_urlize_filter_escaping", "...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
55
6
1,031
0
0.6
1
0.75
1
0.355167
81.3405
4,778
swe_smith::train::42505
swe_smith
train
42,505
python-jsonschema__jsonschema.93e0caa5.combine_file__vz89oqyv
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Equality comparison broken for NaN values and error message formatting issues #### Description The equality comparison function is not handling NaN values correctly, and there are issues with error message formatting for validation failures. #### Steps/Code to Reproduce ```python import jsonschema from math import ...
diff --git a/jsonschema/_utils.py b/jsonschema/_utils.py index 54d28c0..95e16f6 100644 --- a/jsonschema/_utils.py +++ b/jsonschema/_utils.py @@ -88,8 +88,8 @@ def extras_msg(extras): """ Create an error message for extra items or properties. """ - verb = "was" if len(extras) == 1 else "were" - retu...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_enum_enum_with_0_does_not_match_false___0_0_is_valid", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_enum_enum_with_0_does_not_match_false_float_zero_is_valid", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft4::test_enum_e...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
47
59
1,191
0
0.6
1
0.75
1
0.355167
81.3405
4,779
swe_smith::train::12649
swe_smith
train
12,649
lepture__mistune.bf54ef67.lm_rewrite__6aitslwk
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
### Issue: Rendering Lists in Markdown and RST Fails with KeyError #### Description When rendering lists using the `render_list` function, a `KeyError` is raised. This issue occurs when attempting to process both ordered and unordered lists in Markdown and RST formats. The error seems to be related to the handling of...
diff --git a/src/mistune/renderers/_list.py b/src/mistune/renderers/_list.py index a9f0313..912b60c 100644 --- a/src/mistune/renderers/_list.py +++ b/src/mistune/renderers/_list.py @@ -6,23 +6,19 @@ if TYPE_CHECKING: from ..core import BaseRenderer, BlockState -def render_list( - renderer: "BaseRenderer", t...
["tests/test_renderers.py::TestRendererRst::test_list_001", "tests/test_renderers.py::TestRendererRst::test_list_002", "tests/test_renderers.py::TestRendererRst::test_list_003", "tests/test_renderers.py::TestRendererRst::test_list_004", "tests/test_renderers.py::TestRendererRst::test_list_005", "tests/test_renderers.py...
["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
28
11
1,570
0
0.6
1
0.75
1
0.355
81.34
4,780
swe_smith::train::10987
swe_smith
train
10,987
rsalmei__alive-progress.35853799.combine_file__o59vxaq7
swesmith/rsalmei__alive-progress.35853799
rsalmei/alive-progress
python
null
Hook manager causes infinite recursion when capturing output #### Description When using alive-progress with output capturing, the hook manager enters an infinite recursion loop that eventually crashes with `RecursionError: maximum recursion depth exceeded while calling a Python object`. This happens during the strea...
diff --git a/alive_progress/core/hook_manager.py b/alive_progress/core/hook_manager.py index 5b43fff..4cd1b81 100644 --- a/alive_progress/core/hook_manager.py +++ b/alive_progress/core/hook_manager.py @@ -35,43 +35,8 @@ def buffered_hook_manager(header_template, get_pos, offset, cond_refresh, term): stream...
["tests/core/test_hook_manager.py::test_hook_manager_captures_stdout[print_data0]", "tests/core/test_hook_manager.py::test_hook_manager_captures_stdout[print_data1]", "tests/core/test_hook_manager.py::test_hook_manager_captures_stdout[print_data2]", "tests/core/test_hook_manager.py::test_hook_manager_captures_stdout[pr...
["tests/animations/test_bars.py::test_bar_tip_background[--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[_-=--0.5-False-|0123456789|]", "tests/animations/test_bars.py::test_bar_tip_background[-0.0-Fa...
jyangballin/swesmith.x86_64.rsalmei_1776_alive-progress.35853799
true
null
1
47
38
1,189
0
0.6
1
0.75
1
0.354833
81.3395
4,781
swe_smith::train::46722
swe_smith
train
46,722
python-trio__trio.cfbbe2c1.combine_module__a74o8f84
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Traceback concatenation returns None instead of concatenated traceback #### Description When concatenating tracebacks using the internal `concat_tb` function, the function returns `None` instead of the properly concatenated traceback. This breaks exception handling and traceback display in various parts of the codeba...
diff --git a/src/trio/_core/_concat_tb.py b/src/trio/_core/_concat_tb.py index a146961..66f8d6a 100644 --- a/src/trio/_core/_concat_tb.py +++ b/src/trio/_core/_concat_tb.py @@ -46,7 +46,6 @@ except ImportError: ] def copy_tb(base_tb: TracebackType, tb_next: TracebackType | None) -> TracebackType: - ...
["src/trio/_core/_tests/test_exceptiongroup_gc.py::test_concat_tb", "src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_ki", "src/trio/_core/_tests/test_ki.py::test_ki_protection_works", "src/trio/_core/_tests/test_ki.py::test_identity_weakref_internals", "src/trio/_core/_tests/test_ki.py::test_weak_key_identity...
["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
2
54
10
1,047
0
0.6
1
0.75
1
0.3545
81.3385
4,782
swe_smith::train::8400
swe_smith
train
8,400
pyupio__safety.7654596b.combine_file__ka0pk878
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
# SafetyFormatter breaks output formatting and rendering ## Description The SafetyFormatter class doesn't properly initialize formatters anymore. When trying to generate reports with different output formats (json, html, bare, text), the formatter returns a base FormatterAPI instance instead of the appropriate format...
diff --git a/safety/formatter.py b/safety/formatter.py index f70b4de..6af1fc8 100644 --- a/safety/formatter.py +++ b/safety/formatter.py @@ -78,23 +78,30 @@ class SafetyFormatter(FormatterAPI): output (str): The output format (e.g., 'json', 'html', 'bare', 'text'). **kwargs: Additional keyword...
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_unpinned_requirements", "tests/test_cli.py::TestSafetyCLI::test_check_vulnerabilities_found_default", "tests/test_cli.py::TestSafet...
["tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::test_check_with_fix_does_verify_api_key", "tests/test_cli.py::TestSafetyCLI::test_check_with_fix_only_works_with_files", "tests/test_cli...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
43
11
1,267
0
0.6
1
0.75
1
0.3545
81.3385
4,783
swe_smith::train::43745
swe_smith
train
43,745
pydata__patsy.a5d16484.combine_file__1d9hsten
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
B-spline basis function evaluation fails with boundary points #### Description When evaluating B-spline basis functions, data points that fall exactly on the boundary knots now raise a `NotImplementedError`, even though these should be valid inputs. This affects the `bs()` function when data points equal the minimum ...
diff --git a/patsy/splines.py b/patsy/splines.py index a6735e5..101e72b 100644 --- a/patsy/splines.py +++ b/patsy/splines.py @@ -21,9 +21,6 @@ def _eval_bspline_basis(x, knots, degree): from scipy.interpolate import splev except ImportError: # pragma: no cover raise ImportError("spline functiona...
["patsy/mgcv_cubic_splines.py::test_te_1smooth", "patsy/splines.py::test__R_compat_quantile", "patsy/splines.py::test_bs_compat", "patsy/splines.py::test_bs_0degree", "patsy/splines.py::test_bs_errors"]
["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
43
5
1,266
0
0.6
1
0.75
1
0.354333
81.338
4,784
swe_smith::train::51848
swe_smith
train
51,848
pydicom__pydicom.7d361b3d.func_basic__9n0t19ah
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
format_number_as_ds function produces incorrect output for negative values and Decimal types #### Description The `format_number_as_ds` function in `valuerep.py` is producing incorrect formatted strings for negative numbers and has broken support for `Decimal` types. The function appears to have issues with sign hand...
diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py index c81f96d..2fb5c56 100644 --- a/src/pydicom/valuerep.py +++ b/src/pydicom/valuerep.py @@ -950,7 +950,7 @@ def format_number_as_ds(val: float | Decimal) -> str: If val does not represent a finite value """ - if not isinstance(val, floa...
["tests/test_dataelem.py::TestDataElement::test_DSFloat_conversion_auto_format", "tests/test_dataset.py::TestDatasetElements::test_formatted_DS_assignment", "tests/test_valuerep.py::TestTruncateFloatForDS::test_auto_format[3.141592653589793-3.14159265358979]", "tests/test_valuerep.py::TestTruncateFloatForDS::test_auto_...
["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
30
95
1,525
0
0.6
1
0.75
1
0.354167
81.3375
4,785
swe_smith::train::10049
swe_smith
train
10,049
paramiko__paramiko.23f92003.combine_file__348h079d
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
# SSH Key Exchange Fails with NIST P-256 Curve I've discovered a bug in the NIST P-256 key exchange implementation. When trying to establish an SSH connection using this curve, the connection fails. ## Reproduction When using the NIST P-256 curve for key exchange, the client fails with an AttributeError: ```python ...
diff --git a/paramiko/kex_ecdh_nist.py b/paramiko/kex_ecdh_nist.py index 41fab46..2a84190 100644 --- a/paramiko/kex_ecdh_nist.py +++ b/paramiko/kex_ecdh_nist.py @@ -69,25 +69,25 @@ class KexNistp256: ) K_S = self.transport.get_server_key().asbytes() K = self.P.exchange(ec.ECDH(), self.Q_C) - ...
["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
32
2
1,485
0
0.6
1
0.75
1
0.354167
81.3375
4,786
swe_smith::train::7860
swe_smith
train
7,860
cantools__cantools.0c6a7871.func_pm_class_rm_funcs__3wo578x2
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
'Signals' object has no attribute 'add_signal' when using plot command #### Description When trying to use the `cantools plot` command, it fails with an AttributeError indicating that the 'Signals' object has no attribute 'add_signal'. This affects all plotting functionality. #### Steps/Code to Reproduce ```bash ca...
diff --git a/src/cantools/subparsers/plot.py b/src/cantools/subparsers/plot.py index c3d5890..64579c0 100644 --- a/src/cantools/subparsers/plot.py +++ b/src/cantools/subparsers/plot.py @@ -564,57 +564,9 @@ class Signals: self.half_break_time = self.break_time / 2 self.break_time_uninit = False -...
["tests/test_plot.py::CanToolsPlotTest::test_autocolor", "tests/test_plot.py::CanToolsPlotTest::test_break_time", "tests/test_plot.py::CanToolsPlotTest::test_break_time_none", "tests/test_plot.py::CanToolsPlotTest::test_case_sensitive", "tests/test_plot.py::CanToolsPlotTest::test_choices_stem", "tests/test_plot.py::Can...
["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
61
48
904
0
0.6
1
0.75
1
0.354
81.337
4,787
r2e_gym::train::259
r2e_gym
train
259
orange3__67ed8aa9c709cc53f3cd2b05ef0e08b64bf3b30e
orange3
biolab/orange3
python
67ed8aa9c709cc53f3cd2b05ef0e08b64bf3b30e
**Analysis** - **Key Parts:** - **Commit Message:** `[FIX] Test and Score: Improve data errors.` - **Code Changes:** Consolidated multiple error messages into a single `train_data_error` with dynamic messages. - **Test Results:** Previously, tests `test_data_errors` and `test_one_class_value` failed with `Attrib...
diff --git a/Orange/widgets/evaluate/owtestandscore.py b/Orange/widgets/evaluate/owtestandscore.py --- a/Orange/widgets/evaluate/owtestandscore.py +++ b/Orange/widgets/evaluate/owtestandscore.py @@ -32,6 +32,7 @@ from Orange.evaluation import Results from Orange.preprocess.preprocess import Preprocess import Orange....
diff --git a/Orange/widgets/evaluate/tests/test_owtestandscore.py b/Orange/widgets/evaluate/tests/test_owtestandscore.py --- a/Orange/widgets/evaluate/tests/test_owtestandscore.py +++ b/Orange/widgets/evaluate/tests/test_owtestandscore.py @@ -168,25 +168,38 @@ "yyyy")) ) self.widget.n...
null
null
namanjain12/orange3_final:67ed8aa9c709cc53f3cd2b05ef0e08b64bf3b30e
true
null
1
46
null
1,915
0
0.75
1
0.6375
1
0.4725
81.33625
4,788
swe_smith::train::1939
swe_smith
train
1,939
agronholm__typeguard.b6a7e438.lm_rewrite__1v9vxrsf
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Warning location incorrect when using warn_on_error ## Bug report When using the `warn_on_error` callback with `check_type` or `@typechecked`, the warning location reported is incorrect. The warning shows as coming from inside the typeguard module instead of from the actual location where the type error occurred. ...
diff --git a/src/typeguard/_utils.py b/src/typeguard/_utils.py index e8f9b03..a6aac85 100644 --- a/src/typeguard/_utils.py +++ b/src/typeguard/_utils.py @@ -151,15 +151,32 @@ def is_method_of(obj: object, cls: type) -> bool: def get_stacklevel() -> int: + """ + Return the stack level to use for warnings. + ...
["tests/test_warn_on_error.py::test_check_type", "tests/test_warn_on_error.py::test_typechecked"]
["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
25
2
1,621
0
0.6
1
0.75
1
0.3535
81.3355
4,789
swe_smith::train::32479
swe_smith
train
32,479
pydantic__pydantic.acb0f10f.func_pm_class_rm_funcs__tfhar9yl
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
URL objects missing essential methods and properties after recent changes #### Description URL objects are missing several essential methods and properties that were previously available. Trying to access properties like `username`, `port`, or methods like `unicode_string()` and `query_params()` on URL instances now ...
diff --git a/pydantic/networks.py b/pydantic/networks.py index cae8238..f27b997 100644 --- a/pydantic/networks.py +++ b/pydantic/networks.py @@ -124,9 +124,6 @@ class _BaseUrl: _constraints: ClassVar[UrlConstraints] = UrlConstraints() _url: _CoreUrl - def __init__(self, url: str | _CoreUrl | _BaseUrl) ->...
["tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:562-591]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:599-614]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:686-733]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:955-963]", "tests/...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
38
65
1,361
0
0.6
1
0.75
1
0.3535
81.3355
4,790
swe_smith::train::25002
swe_smith
train
25,002
pylint-dev__astroid.b114f6b5.combine_file__8ixha0c3
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Inference returns None values unexpectedly When using astroid's inference system, some inference operations are now returning None values where they previously would not. This seems to affect various inference scenarios including context managers and generic type resolution. #### Steps/Code to Reproduce ```python im...
diff --git a/astroid/decorators.py b/astroid/decorators.py index cd0f5a7..968af16 100644 --- a/astroid/decorators.py +++ b/astroid/decorators.py @@ -42,19 +42,23 @@ def path_wrapper(func): if context is None: context = InferenceContext() if context.push(node): + yield None ...
["tests/test_decorators.py::TestDeprecationDecorators::test_deprecated_default_argument_values_one_arg", "tests/test_decorators.py::TestDeprecationDecorators::test_deprecated_default_argument_values_two_args", "tests/test_decorators.py::TestDeprecationDecorators::test_deprecated_default_argument_values_ok", "tests/test...
["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
35
10
1,421
0
0.6
1
0.75
1
0.3535
81.3355
4,791
swe_smith::train::4001
swe_smith
train
4,001
pygments__pygments.27649ebb.func_basic__nktvxal1
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Ruby lexer broken after recent changes #### Description The Ruby lexer is throwing `ValueError: uncompiled regular expression` errors when trying to tokenize Ruby code. This affects basic functionality like syntax highlighting and code analysis. #### Steps/Code to Reproduce ```python from pygments.lexers import Rub...
diff --git a/pygments/lexers/ruby.py b/pygments/lexers/ruby.py index 134ff77..833c5b9 100644 --- a/pygments/lexers/ruby.py +++ b/pygments/lexers/ruby.py @@ -89,36 +89,34 @@ class RubyLexer(ExtendedRegexLexer): def gen_rubystrings_rules(): def intp_regex_callback(self, match, ctx): - yield mat...
["tests/test_basic_api.py::test_lexer_options[RubyLexer]", "tests/test_basic_api.py::test_lexer_options[TreetopLexer]", "tests/test_basic_api.py::test_lexer_options[CssErbLexer]", "tests/test_basic_api.py::test_random_input[RhtmlLexer]", "tests/test_basic_api.py::test_random_input[RubyLexer]", "tests/test_basic_api.py:...
["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
57
42
980
0
0.6
1
0.75
1
0.353333
81.335
4,792
swe_smith::train::45863
swe_smith
train
45,863
conan-io__conan.86f29e13.lm_rewrite__tcfqibrf
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
### Unexpected Behavior with Non-Existing Settings Values **Description:** When attempting to update settings with non-existing values, the behavior is not as expected. Specifically, when using the `update_values` method with a setting that does not exist, the error handling seems inconsistent. **Steps to Reproduce:*...
diff --git a/conan/internal/model/settings.py b/conan/internal/model/settings.py index 367bf47..c579361 100644 --- a/conan/internal/model/settings.py +++ b/conan/internal/model/settings.py @@ -307,20 +307,21 @@ class Settings(object): Receives a list of tuples (compiler.version, value) This is more an...
["test/unittests/model/settings_test.py::test_set_value_non_existing_values"]
["test/unittests/model/settings_test.py::SettingsLoadsTest::test_any", "test/unittests/model/settings_test.py::SettingsLoadsTest::test_get_safe", "test/unittests/model/settings_test.py::SettingsLoadsTest::test_getattr_none", "test/unittests/model/settings_test.py::SettingsLoadsTest::test_nested_any", "test/unittests/mo...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
23
1
1,660
0
0.6
1
0.75
1
0.353333
81.335
4,793
swe_smith::train::32770
swe_smith
train
32,770
pydantic__pydantic.acb0f10f.lm_rewrite__9pcdjdga
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
`type[TypeVar]` with bounds or constraints raises PydanticSchemaGenerationError #### Description When using `type[T]` where `T` is a TypeVar with bounds or constraints, Pydantic now raises a `PydanticSchemaGenerationError` instead of properly handling the TypeVar. #### Steps/Code to Reproduce ```python from typing ...
diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py index 9ec8a61..61e8fb8 100644 --- a/pydantic/_internal/_generate_schema.py +++ b/pydantic/_internal/_generate_schema.py @@ -1685,43 +1685,26 @@ class GenerateSchema: def _subclass_schema(self, type_: Any) -> core_schema....
["tests/test_edge_cases.py::test_pep585_generic_types[Dict-FrozenSet-List-Set-Tuple-Type]", "tests/test_edge_cases.py::test_type_on_none", "tests/test_edge_cases.py::test_type_on_typealias", "tests/test_edge_cases.py::test_type_on_annotated", "tests/test_edge_cases.py::test_type_on_generic_alias", "tests/test_edge_case...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
57
11
979
0
0.6
1
0.75
1
0.353167
81.3345
4,794
swe_smith::train::1047
swe_smith
train
1,047
jd__tenacity.0d40e76f.combine_file__hr16k2ip
swesmith/jd__tenacity.0d40e76f
jd/tenacity
python
null
# Bug: retry_unless_exception_type and retry_all logic is inverted ## Description I found a bug in the `retry_unless_exception_type` and `retry_all` classes where the logic appears to be inverted, causing unexpected behavior when retrying operations. ## Steps to reproduce Here's a simple example that demonstrates t...
diff --git a/tenacity/retry.py b/tenacity/retry.py index 9211631..e8876c1 100644 --- a/tenacity/retry.py +++ b/tenacity/retry.py @@ -127,16 +127,16 @@ class retry_unless_exception_type(retry_if_exception): def __call__(self, retry_state: "RetryCallState") -> bool: if retry_state.outcome is None: - ...
["tests/test_tenacity.py::TestRetryConditions::test_retry_all", "tests/test_tenacity.py::TestRetryConditions::test_retry_and", "tests/test_tenacity.py::TestDecoratorWrapper::test_retry_until_exception_of_type_attempt_number", "tests/test_tenacity.py::TestDecoratorWrapper::test_retry_until_exception_of_type_no_type", "t...
["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test...
jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f
true
null
1
12
5
1,878
0
0.6
1
0.75
1
0.353
81.334
4,795
swe_smith::train::21030
swe_smith
train
21,030
tobymao__sqlglot.036601ba.func_pm_remove_loop__84hlovoa
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Tokenizer fails to parse numbers after removing number scanning logic #### Description The tokenizer is unable to properly parse numeric literals after a recent change. When tokenizing SQL that contains numbers, the tokenizer throws an IndexError or fails to recognize numbers correctly. #### Steps/Code to Reproduce ...
diff --git a/sqlglot/tokens.py b/sqlglot/tokens.py index 2944deb..21cc8fa 100644 --- a/sqlglot/tokens.py +++ b/sqlglot/tokens.py @@ -1295,47 +1295,6 @@ class Tokenizer(metaclass=_Tokenizer): decimal = False scientific = 0 - - while True: - if self._peek.isdigit(): - ...
["tests/test_tokens.py::TestTokens::test_comment_attachment", "tests/test_tokens.py::TestTokens::test_crlf", "tests/test_tokens.py::TestTokens::test_token_line_col"]
["tests/test_tokens.py::TestTokens::test_command", "tests/test_tokens.py::TestTokens::test_error_msg", "tests/test_tokens.py::TestTokens::test_jinja", "tests/test_tokens.py::TestTokens::test_space_keywords"]
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
41
3
1,297
0
0.6
1
0.75
1
0.352833
81.3335
4,796
swe_smith::train::36555
swe_smith
train
36,555
lincolnloop__python-qrcode.456b01d4.combine_module__u70t26f9
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
PyPNGImage and SVG Circle Drawer broken in latest version Description I've been using the qrcode library to generate QR codes in my application, but after updating to the latest version, I'm encountering several issues with the PyPNGImage and SVG Circle Drawer functionality. Here's a simple reproduction case for the...
diff --git a/qrcode/image/pure.py b/qrcode/image/pure.py index 5a8b2c5..66d647b 100644 --- a/qrcode/image/pure.py +++ b/qrcode/image/pure.py @@ -14,10 +14,10 @@ class PyPNGImage(BaseImage): needs_drawrect = False def new_image(self, **kwargs): - if not PngWriter: + if PngWriter: r...
["qrcode/tests/test_qrcode_pypng.py::test_render_pypng", "qrcode/tests/test_qrcode_pypng.py::test_render_pypng_to_str", "qrcode/tests/test_qrcode_svg.py::test_svg_circle_drawer", "qrcode/tests/test_script.py::test_factory_drawer"]
["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
4
1,556
0
0.6
1
0.75
1
0.352667
81.333
4,797
swe_smith::train::2879
swe_smith
train
2,879
pudo__dataset.5c2dc8d3.lm_rewrite__3su3yv0o
swesmith/pudo__dataset.5c2dc8d3
pudo/dataset
python
null
# Column name validation is not checking for invalid characters ## Description I found an issue with column name validation in the dataset library. The current implementation of `normalize_column_name` doesn't properly validate column names containing special characters like dots (`.`) or hyphens (`-`). Consider the...
diff --git a/dataset/util.py b/dataset/util.py index 4fa225d..548b992 100644 --- a/dataset/util.py +++ b/dataset/util.py @@ -112,20 +112,16 @@ class ResultIter(object): def normalize_column_name(name): """Check if a string is a reasonable thing to use as a column name.""" - if not isinstance(name, str): - ...
["test/test_dataset.py::TableTestCase::test_invalid_column_names", "test/test_dataset.py::TableTestCase::test_weird_column_names"]
["test/test_dataset.py::DatabaseTestCase::test_contains", "test/test_dataset.py::DatabaseTestCase::test_create_table", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id1", "test/test_dataset.py::DatabaseTestCase::test_create_table_custom_id2", "test/test_dataset.py::DatabaseTestCase::test_create_tabl...
jyangballin/swesmith.x86_64.pudo_1776_dataset.5c2dc8d3
true
null
1
24
2
1,634
0
0.6
1
0.75
1
0.352333
81.332
4,798
swe_smith::train::24394
swe_smith
train
24,394
sunpy__sunpy.f8edfd5c.lm_rewrite__8kyhzvoy
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
KeyError: 'id' in SRS Metadata Parsing It seems there's an issue with parsing the metadata from SRS files. When processing certain SRS files, a `KeyError` is raised due to the absence of the 'id' key in the metadata dictionary. This error occurs when attempting to access the 'id' field, which should contain informatio...
diff --git a/sunpy/io/special/srs.py b/sunpy/io/special/srs.py index bde7f94..35e7be5 100644 --- a/sunpy/io/special/srs.py +++ b/sunpy/io/special/srs.py @@ -185,38 +185,42 @@ def get_meta_data(header, supplementary_lines): """ Convert a list of header lines and a list of supplementary lines (if not 'None') in...
["sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150906SRS.txt-5]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150306SRS.txt-4]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150101SRS.txt-9]", "sunpy/io/tests/test_s...
["sunpy/io/tests/test_srs.py::test_parse_longitude[N10W05-5]", "sunpy/io/tests/test_srs.py::test_parse_longitude[N89E00-0]", "sunpy/io/tests/test_srs.py::test_parse_longitude[S33E02--2]", "sunpy/io/tests/test_srs.py::test_parse_longitude[S01-None]", "sunpy/io/tests/test_srs.py::test_parse_latitude[N10W05-10]", "sunpy/i...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
60
12
914
0
0.6
1
0.75
1
0.352333
81.332
4,799
swe_smith::train::45594
swe_smith
train
45,594
conan-io__conan.86f29e13.combine_module__454cthl0
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
# Profile.dumps() and package_settings_values broken in recent changes ## Description After recent changes to the Profile class, there are two issues: 1. The `dumps()` method is using division operator `/` instead of string formatting `%` which causes errors when trying to serialize profiles 2. The `package_settings_...
diff --git a/conan/internal/model/profile.py b/conan/internal/model/profile.py index 54aa126..e1b3ca8 100644 --- a/conan/internal/model/profile.py +++ b/conan/internal/model/profile.py @@ -63,12 +63,13 @@ class Profile: @property def package_settings_values(self): + """Returns a dictionary with packa...
["test/unittests/model/profile_test.py::ProfileTest::test_apply", "test/unittests/model/profile_test.py::ProfileTest::test_package_settings_update", "test/unittests/model/profile_test.py::ProfileTest::test_profile_dump_order", "test/unittests/model/settings_test.py::test_possible_values"]
["test/unittests/model/profile_test.py::ProfileTest::test_profile_settings_update", "test/unittests/model/profile_test.py::ProfileTest::test_profile_subsettings_update", "test/unittests/model/profile_test.py::test_update_build_requires", "test/unittests/model/profile_test.py::test_profile_serialize", "test/unittests/mo...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
2
17
4
1,774
0
0.6
1
0.75
1
0.352333
81.332