selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
6,900
swe_smith::train::6895
swe_smith
train
6,895
joke2k__faker.8b401a7d.lm_rewrite__w60cwno3
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
Slug generation fails with missing generator argument. Description After updating the slug method in the internet provider, I encountered an issue where the slug generation fails due to a missing 'generator' argument. This seems to affect multiple locales, including Japanese, Chinese, Hungarian, Polish, and others. ...
diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py index d4a20a5..ae439c9 100644 --- a/faker/providers/internet/__init__.py +++ b/faker/providers/internet/__init__.py @@ -726,16 +726,24 @@ class Provider(BaseProvider): return f"{self.generator.parse(pattern)}{path}{page}{e...
["tests/providers/test_internet.py::TestJaJp::test_slug", "tests/providers/test_internet.py::TestZhCn::test_slug", "tests/providers/test_internet.py::TestZhTw::test_slug", "tests/providers/test_internet.py::TestHuHu::test_slug", "tests/providers/test_internet.py::TestPlPl::test_slug", "tests/providers/test_internet.py:...
["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
22
18
997
0
0.6
1
0.75
1
0.2395
80.9935
6,901
swe_smith::train::42701
swe_smith
train
42,701
python-jsonschema__jsonschema.93e0caa5.func_pm_ctrl_shuffle__7bai6q0v
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
unevaluatedProperties validation fails with NameError #### Description When validating JSON schemas with `unevaluatedProperties`, validation fails with a `NameError` because `unevaluated_keys` is referenced before assignment. #### Steps/Code to Reproduce ```python import jsonschema schema = { "type": "object",...
diff --git a/jsonschema/_keywords.py b/jsonschema/_keywords.py index f30f954..fb2b780 100644 --- a/jsonschema/_keywords.py +++ b/jsonschema/_keywords.py @@ -405,12 +405,23 @@ def unevaluatedItems(validator, unevaluatedItems, instance, schema): def unevaluatedProperties(validator, unevaluatedProperties, instance, s...
["jsonschema/tests/test_jsonschema_test_suite.py::TestDraft202012::test_dynamicRef_strict_tree_schema_guards_against_misspelled_properties_instance_with_correct_field", "jsonschema/tests/test_jsonschema_test_suite.py::TestDraft202012::test_dynamicRef_strict_tree_schema_guards_against_misspelled_properties_instance_with...
["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
27
118
897
0
0.6
1
0.75
1
0.2395
80.9935
6,902
swe_smith::train::21005
swe_smith
train
21,005
tobymao__sqlglot.036601ba.func_pm_remove_cond__tetitecy
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
MySQL index constraint parsing fails with UnboundLocalError #### Description When parsing MySQL CREATE TABLE statements with index constraints that include certain options like COMMENT, VISIBLE/INVISIBLE, or ENGINE_ATTRIBUTE, the parser throws an UnboundLocalError for the variable 'opt'. #### Steps/Code to Reproduce...
diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py index 927642a..cd73f34 100644 --- a/sqlglot/dialects/mysql.py +++ b/sqlglot/dialects/mysql.py @@ -498,8 +498,6 @@ class MySQL(Dialect): def _parse_index_constraint( self, kind: t.Optional[str] = None ) -> exp.IndexColumnCo...
["tests/dialects/test_mysql.py::TestMySQL::test_ddl"]
["tests/dialects/test_mysql.py::TestMySQL::test_analyze", "tests/dialects/test_mysql.py::TestMySQL::test_at_time_zone", "tests/dialects/test_mysql.py::TestMySQL::test_bits_literal", "tests/dialects/test_mysql.py::TestMySQL::test_canonical_functions", "tests/dialects/test_mysql.py::TestMySQL::test_convert", "tests/diale...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
17
1
1,097
0
0.6
1
0.75
1
0.2395
80.9935
6,903
swe_smith::train::844
swe_smith
train
844
oauthlib__oauthlib.1fd52536.lm_rewrite__0pmptnff
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
host_from_uri function returns incorrect format Description The `host_from_uri` function in `oauthlib/oauth2/rfc6749/utils.py` is returning the hostname and port in an incorrect format. Instead of returning a tuple of (hostname, port), it's returning a string with the format "hostname:port". This breaks code that ex...
diff --git a/oauthlib/oauth2/rfc6749/utils.py b/oauthlib/oauth2/rfc6749/utils.py index 7dc27b3..2d80490 100644 --- a/oauthlib/oauth2/rfc6749/utils.py +++ b/oauthlib/oauth2/rfc6749/utils.py @@ -43,19 +43,20 @@ def host_from_uri(uri): Will use default port for HTTP and HTTPS if none is present in the URI. """...
["tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_add_mac_token", "tests/oauth2/rfc6749/test_tokens.py::TokenTest::test_prepare_mac_header", "tests/oauth2/rfc6749/test_utils.py::UtilsTests::test_host_from_uri"]
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
25
3
937
0
0.6
1
0.75
1
0.2395
80.9935
6,904
swe_smith::train::40177
swe_smith
train
40,177
scanny__python-pptx.278b47b1.combine_file__pvionasj
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
CT_Relationship.new() returns None instead of relationship object #### Description When creating a new CT_Relationship using the `new()` class method, the method returns `None` instead of the expected relationship object. This breaks relationship creation throughout the codebase. #### Steps/Code to Reproduce ```pyt...
diff --git a/src/pptx/opc/oxml.py b/src/pptx/opc/oxml.py index 5dd902a..fdeebd4 100644 --- a/src/pptx/opc/oxml.py +++ b/src/pptx/opc/oxml.py @@ -113,11 +113,11 @@ class CT_Relationship(BaseOxmlElement): `target_ref` is either a partname or a URI. """ relationship = cast(CT_Relationship, parse...
["tests/opc/test_oxml.py::DescribeCT_Relationship::it_constructs_an_internal_relationship_when_no_target_mode_is_provided", "tests/opc/test_oxml.py::DescribeCT_Relationship::and_it_constructs_an_internal_relationship_when_target_mode_INTERNAL_is_specified", "tests/opc/test_oxml.py::DescribeCT_Relationship::and_it_const...
["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
8
9
1,277
0
0.6
1
0.75
1
0.2395
80.9935
6,905
swe_smith::train::43756
swe_smith
train
43,756
pydata__patsy.a5d16484.combine_file__4txyl1h6
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
# Q function doesn't work correctly with non-existent variables ## Description When using the `Q` function to access variables by name, it returns `None` instead of raising a `NameError` when the variable doesn't exist. For example, if I try to access a non-existent variable: ```python from patsy import Q # This s...
diff --git a/patsy/builtins.py b/patsy/builtins.py index fb4b319..3bdd452 100644 --- a/patsy/builtins.py +++ b/patsy/builtins.py @@ -46,6 +46,8 @@ def I(x): we instead have a single predictor, defined to be the sum of ``x1`` and ``x2``.""" + if isinstance(x, list): + return x[0] return x ...
["patsy/builtins.py::test_Q", "patsy/test_highlevel.py::test_builtins"]
["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
6
2
1,316
0
0.6
1
0.75
1
0.239333
80.993
6,906
swe_smith::train::52547
swe_smith
train
52,547
pydicom__pydicom.7d361b3d.func_pm_remove_cond__5yxyt1mj
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Camel case attribute validation removed unexpectedly #### Description Setting camel case attributes on Dataset instances no longer triggers warnings or raises exceptions as expected. The validation logic for detecting invalid camel case keywords appears to have been removed. #### Steps/Code to Reproduce ```python f...
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..1693cb9 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -2717,22 +2717,11 @@ class Dataset: "added using the add() or add_new() methods." ) else: - # Warn if `name` is camel ...
["tests/test_config.py::TestFuture::test_invalid_keyword_raise[config]", "tests/test_config.py::TestFuture::test_invalid_keyword_raise[env]", "tests/test_dataset.py::TestDataset::test_set_non_dicom", "tests/test_dataset.py::TestDataset::test_dir", "tests/test_dataset.py::TestDataset::test_dir_filter", "tests/test_datas...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
11
8
1,216
0
0.6
1
0.75
1
0.239333
80.993
6,907
swe_smith::train::24852
swe_smith
train
24,852
marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_shuffle__co0b5r94
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
And validator not working properly - returns value without validation #### Description The `And` validator is not properly validating input values. It appears to return the input value immediately without running any of the validators in the chain. #### Steps/Code to Reproduce ```python from marshmallow import fiel...
diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py index e4536d8..ec3a74c 100644 --- a/src/marshmallow/validate.py +++ b/src/marshmallow/validate.py @@ -71,8 +71,10 @@ class And(Validator): return f"validators={self.validators!r}" def __call__(self, value: typing.Any) -> typing.Any: ...
["tests/test_decorators.py::TestValidatesDecorator::test_precedence", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_skip_on_field_errors", "tests/test_deserialization.py::TestFieldDeserialization::test_structured_dict_key_value_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
9
63
1,256
0
0.6
1
0.75
1
0.239333
80.993
6,908
swe_smith::train::5484
swe_smith
train
5,484
PyCQA__flake8.cf1542ce.func_basic__t9pbpqjy
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
PluginRequestedUnknownParameters exception attributes swapped during initialization #### Description When creating a `PluginRequestedUnknownParameters` exception, the `plugin_name` and `original_exception` attributes are incorrectly assigned to each other, causing the exception to store the wrong values. #### Steps/...
diff --git a/src/flake8/exceptions.py b/src/flake8/exceptions.py index 18646e7..c4f0e44 100644 --- a/src/flake8/exceptions.py +++ b/src/flake8/exceptions.py @@ -40,9 +40,9 @@ class PluginRequestedUnknownParameters(Flake8Exception): def __init__(self, plugin_name: str, exception: Exception) -> None: """P...
["tests/unit/test_exceptions.py::test_pickleable[err1]"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker....
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
6
1
1,316
0
0.6
1
0.75
1
0.239333
80.993
6,909
swe_smith::train::29202
swe_smith
train
29,202
tox-dev__pipdeptree.c31b6418.func_pm_remove_assign__0t1jwl3c
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
NameError when using custom interpreter with pipdeptree #### Description When using pipdeptree with a custom Python interpreter (via `--python` flag), the tool crashes with a `NameError: name 'py_path' is not defined` error. This affects various functionality including basic package discovery and rendering operations...
diff --git a/src/pipdeptree/_discovery.py b/src/pipdeptree/_discovery.py index ba23498..cbae77c 100644 --- a/src/pipdeptree/_discovery.py +++ b/src/pipdeptree/_discovery.py @@ -24,10 +24,7 @@ def get_installed_distributions( # See https://docs.python.org/3/library/venv.html#how-venvs-work for more details. ...
["tests/render/test_render.py::test_json_routing", "tests/render/test_render.py::test_json_tree_routing", "tests/render/test_render.py::test_mermaid_routing", "tests/render/test_render.py::test_grahpviz_routing", "tests/render/test_render.py::test_text_routing", "tests/test_discovery.py::test_local_only", "tests/test_d...
["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
1
7
20
1,296
0
0.6
1
0.75
1
0.239333
80.993
6,910
swe_smith::train::10258
swe_smith
train
10,258
paramiko__paramiko.23f92003.func_basic__21g9vd23
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
posix_rename swaps source and destination paths #### Description The `posix_rename` method in SFTPClient appears to be swapping the source and destination paths, causing files to be renamed in the opposite direction than expected. #### Steps/Code to Reproduce ```python import paramiko # Connect to SFTP server clie...
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 066cd83..f9703d9 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -437,11 +437,11 @@ class SFTPClient(BaseSFTP, ClosingContextManager): :versionadded: 2.2 """ - oldpath = self._adjust_cwd(oldpath) ...
["tests/test_sftp.py::TestSFTP::testa_posix_rename"]
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
6
1
1,316
0
0.6
1
0.75
1
0.239333
80.993
6,911
swe_smith::train::20228
swe_smith
train
20,228
gruns__furl.da386f68.func_basic__8q7fz6wr
swesmith/gruns__furl.da386f68
gruns/furl
python
null
omdict1D update method breaks with non-iterable values When using the `update()` method on `omdict1D` with non-iterable values, it raises a `TypeError` because the code tries to iterate over integers or other non-iterable types. #### Steps/Code to Reproduce ```python from furl.omdict1D import omdict1D # This should...
diff --git a/furl/omdict1D.py b/furl/omdict1D.py index 446e8e4..1bdbe44 100644 --- a/furl/omdict1D.py +++ b/furl/omdict1D.py @@ -75,34 +75,24 @@ class omdict1D(omdict): reference. """ for key, values in items: - # <values> is not a list or an empty list. like_list_not_...
["tests/test_furl.py::TestQuery::test_add", "tests/test_furl.py::TestQuery::test_asdict", "tests/test_furl.py::TestQuery::test_encode", "tests/test_furl.py::TestQuery::test_equality", "tests/test_furl.py::TestQuery::test_load", "tests/test_furl.py::TestQuery::test_none", "tests/test_furl.py::TestQuery::test_params", "t...
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_it...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
24
33
955
0
0.6
1
0.75
1
0.239167
80.9925
6,912
swe_smith::train::31974
swe_smith
train
31,974
davidhalter__parso.338a5760.func_basic__hoxjxni6
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
F-string parsing broken with nested parentheses #### Description F-string parsing fails when there are nested parentheses or braces within format expressions. The tokenizer incorrectly handles parentheses counting, causing syntax errors for valid f-string expressions. #### Steps/Code to Reproduce ```python import p...
diff --git a/parso/python/tokenize.py b/parso/python/tokenize.py index e3ffe44..59f073c 100644 --- a/parso/python/tokenize.py +++ b/parso/python/tokenize.py @@ -266,10 +266,9 @@ class FStringNode: self.parentheses_count += 1 def close_parentheses(self, character): - self.parentheses_count -= 1 - ...
["test/test_file_python_errors.py::test_on_itself[3.6]", "test/test_file_python_errors.py::test_on_itself[3.7]", "test/test_file_python_errors.py::test_on_itself[3.8]", "test/test_file_python_errors.py::test_on_itself[3.9]", "test/test_file_python_errors.py::test_on_itself[3.10]", "test/test_fstring.py::test_valid[f\"{...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
7
17
1,295
0
0.6
1
0.75
1
0.239167
80.9925
6,913
swe_smith::train::21487
swe_smith
train
21,487
rubik__radon.54b88e58.func_pm_ctrl_shuffle__xnyf0xqn
swesmith/rubik__radon.54b88e58
rubik/radon
python
null
# XML generation for CC analysis results is broken ### Steps to reproduce ```python from radon.cli import tools # Create a dictionary with CC analysis results results = { 'example.py': [ { 'complexity': 6, 'name': 'function_name', 'type': 'function', 'rank'...
diff --git a/radon/cli/tools.py b/radon/cli/tools.py index cc8d4fa..9f1b7fb 100644 --- a/radon/cli/tools.py +++ b/radon/cli/tools.py @@ -327,9 +327,6 @@ def raw_to_dict(obj): def dict_to_xml(results): - '''Convert a dictionary holding CC analysis result into a string containing - xml.''' - ccm = et.Elemen...
["radon/tests/test_cli_tools.py::test_cc_to_xml"]
["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
7
1
1,295
0
0.6
1
0.75
1
0.239167
80.9925
6,914
swe_smith::train::17269
swe_smith
train
17,269
kennethreitz__records.5941ab27.func_basic__8ansg240
swesmith/kennethreitz__records.5941ab27
kennethreitz/records
python
null
RecordCollection slicing returns raw list instead of RecordCollection #### Description When slicing a RecordCollection, the result is a raw list instead of a RecordCollection instance. This breaks the expected API behavior where slicing should return another RecordCollection. #### Steps/Code to Reproduce ```python ...
diff --git a/records.py b/records.py index b5b6766..5a39e03 100644 --- a/records.py +++ b/records.py @@ -148,21 +148,20 @@ class RecordCollection(object): def __getitem__(self, key): is_int = isinstance(key, int) - # Convert RecordCollection[1] into slice. if is_int: key = s...
["tests/test_105.py::test_issue105[sqlite_memory]", "tests/test_records.py::TestRecordCollection::test_slice_iter", "tests/test_records.py::TestRecordCollection::test_first_returns_a_single_record", "tests/test_records.py::TestRecordCollection::test_first_default_is_overridable", "tests/test_records.py::TestRecordColle...
["tests/test_69.py::test_issue69[sqlite_memory]", "tests/test_records.py::TestRecordCollection::test_iter", "tests/test_records.py::TestRecordCollection::test_next", "tests/test_records.py::TestRecordCollection::test_iter_and_next", "tests/test_records.py::TestRecordCollection::test_multiple_iter", "tests/test_records....
jyangballin/swesmith.x86_64.kennethreitz_1776_records.5941ab27
true
null
1
9
20
1,255
0
0.6
1
0.75
1
0.239167
80.9925
6,915
swe_smith::train::23389
swe_smith
train
23,389
pyparsing__pyparsing.533adf47.combine_file__gs2ab0ay
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
ParseException error messages and location reporting broken #### Description ParseException instances are not properly reporting error locations and messages. The exception formatting appears to be corrupted, with character positions and line/column information being swapped or incorrect. #### Steps/Code to Reproduc...
diff --git a/pyparsing/exceptions.py b/pyparsing/exceptions.py index 57a1579..51d8111 100644 --- a/pyparsing/exceptions.py +++ b/pyparsing/exceptions.py @@ -54,13 +54,13 @@ class ParseBaseException(Exception): elem=None, ): if msg is None: - msg, pstr = pstr, "" + pstr, msg ...
["tests/test_simple_unit.py::TestLiteral::runTest", "tests/test_simple_unit.py::TestRepetition::runTest", "tests/test_simple_unit.py::TestWhitespaceMethods::runTest", "tests/test_unit.py::Test02_WithoutPackrat::testEachWithParseFatalException", "tests/test_unit.py::Test02_WithoutPackrat::testEnableDebugOnExpressionWith...
["examples/test_bibparse.py::TestBibparse::test_bib1", "examples/test_bibparse.py::TestBibparse::test_bibfile", "examples/test_bibparse.py::TestBibparse::test_comments", "examples/test_bibparse.py::TestBibparse::test_entry", "examples/test_bibparse.py::TestBibparse::test_macro", "examples/test_bibparse.py::TestBibparse...
jyangballin/swesmith.x86_64.pyparsing_1776_pyparsing.533adf47
true
null
1
14
79
1,155
0
0.6
1
0.75
1
0.239167
80.9925
6,916
swe_smith::train::42079
swe_smith
train
42,079
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__a2thswls
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Slide ID generation broken after code refactoring #### Description The `_next_id` property in `CT_SlideIdList` is not working correctly. When trying to add new slides to a presentation, the method fails to generate valid slide IDs. #### Steps/Code to Reproduce ```python from pptx import Presentation # Create a new...
diff --git a/src/pptx/oxml/presentation.py b/src/pptx/oxml/presentation.py index 17997c2..a338db0 100644 --- a/src/pptx/oxml/presentation.py +++ b/src/pptx/oxml/presentation.py @@ -68,21 +68,20 @@ class CT_SlideIdList(BaseOxmlElement): @property def _next_id(self) -> int: - """The next available slid...
["tests/oxml/test_presentation.py::DescribeCT_SlideIdList::it_can_add_a_sldId_element_as_a_child", "tests/oxml/test_presentation.py::DescribeCT_SlideIdList::it_knows_the_next_available_slide_id[p:sldIdLst-256]", "tests/oxml/test_presentation.py::DescribeCT_SlideIdList::it_knows_the_next_available_slide_id[p:sldIdLst/p:...
["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
21
13
1,015
0
0.6
1
0.75
1
0.239167
80.9925
6,917
swe_smith::train::24279
swe_smith
train
24,279
sunpy__sunpy.f8edfd5c.func_pm_remove_assign__xj7q58iy
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
NameError in get_horizons_coord when using large time arrays #### Description When calling `get_horizons_coord` with a time array containing more than 10,000 values, a `NameError` is raised for an undefined variable `prepend`. #### Steps/Code to Reproduce ```python import numpy as np from astropy.time import Time i...
diff --git a/sunpy/coordinates/ephemeris.py b/sunpy/coordinates/ephemeris.py index b5a70da..4e986e0 100644 --- a/sunpy/coordinates/ephemeris.py +++ b/sunpy/coordinates/ephemeris.py @@ -289,24 +289,8 @@ def get_horizons_coord(body, time='now', id_type=None, *, include_velocity=False INFO: Obtained JPL HORIZONS loca...
["sunpy/coordinates/tests/test_ephemeris.py::test_get_horizons_coord_array_time_too_large"]
["sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst", "sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst_light_travel_time", "sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst_light_travel_time_array", "sunpy/coordinates/tests/...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
29
1
855
0
0.6
1
0.75
1
0.239167
80.9925
6,918
swe_smith::train::10384
swe_smith
train
10,384
paramiko__paramiko.23f92003.func_basic__aifi6x9b
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTPAttributes._from_msg returns None instead of attribute object #### Description When using SFTP operations, the `SFTPAttributes._from_msg` method is returning `None` instead of the expected `SFTPAttributes` object. This causes various SFTP operations to fail with errors like `TypeError: 'NoneType' object has no at...
diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index 18ffbf8..cbc9fba 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -87,12 +87,12 @@ class SFTPAttributes: @classmethod def _from_msg(cls, msg, filename=None, longname=None): attr = cls() - attr._unpack(msg) - ...
["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::testa_posix_rename", "tests/test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
10
42
1,235
0
0.6
1
0.75
1
0.239167
80.9925
6,919
swe_smith::train::29179
swe_smith
train
29,179
tox-dev__pipdeptree.c31b6418.func_pm_ctrl_shuffle__u7idmckg
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
# Incorrect order of operations in determine_interpreter_file_name function **Description** pipdeptree 2.3.3 I'm experiencing an issue with the `determine_interpreter_file_name` function in the `_detect_env.py` module. The function is returning an undefined variable before it's actually defined. **To Reproduce** W...
diff --git a/src/pipdeptree/_detect_env.py b/src/pipdeptree/_detect_env.py index 36037e8..3d79e90 100644 --- a/src/pipdeptree/_detect_env.py +++ b/src/pipdeptree/_detect_env.py @@ -87,12 +87,11 @@ def detect_poetry_env_interpreter() -> Path | None: def determine_interpreter_file_name() -> str | None: impl_name_...
["tests/test_detect_env.py::test_detect_active_interpreter_using_env_vars[VIRTUAL_ENV]", "tests/test_detect_env.py::test_detect_active_interpreter_using_env_vars[CONDA_PREFIX]", "tests/test_detect_env.py::test_detect_active_interpreter_non_supported_python_implementation", "tests/test_detect_env.py::test_detect_active_...
["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
1
7
4
1,295
0
0.6
1
0.75
1
0.239167
80.9925
6,920
r2e_gym::train::5121
r2e_gym
train
5,121
pyramid__6c16fb020027fac47e4d2e335cd9e264dba8aa3b
pyramid
pylons/pyramid
python
6c16fb020027fac47e4d2e335cd9e264dba8aa3b
**Title:** CSRF Checks Enabled by Default on Exception Views Causing Unexpected Errors **Description:** When an exception is raised within a view, the corresponding exception view inadvertently undergoes CSRF validation even when it should be exempted. This results in `BadCSRFToken` errors, disrupting the response han...
diff --git a/pyramid/viewderivers.py b/pyramid/viewderivers.py --- a/pyramid/viewderivers.py +++ b/pyramid/viewderivers.py @@ -483,21 +483,29 @@ default_val = _parse_csrf_setting( info.settings.get('pyramid.require_default_csrf'), 'Config setting "pyramid.require_default_csrf"') - val = _parse...
diff --git a/pyramid/tests/test_viewderivers.py b/pyramid/tests/test_viewderivers.py --- a/pyramid/tests/test_viewderivers.py +++ b/pyramid/tests/test_viewderivers.py @@ -1297,6 +1297,64 @@ result = view(None, request) self.assertTrue(result is response) + def test_csrf_view_skipped_by_default_on...
null
null
namanjain12/pyramid_final:6c16fb020027fac47e4d2e335cd9e264dba8aa3b
true
null
1
24
null
1,667
0
0.75
1
0.6375
1
0.357833
80.99225
6,921
swe_smith::train::31447
swe_smith
train
31,447
benoitc__gunicorn.bacbf8aa.combine_module__pzzkln68
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Response object initialization broken after recent changes #### Description The Response class initialization is failing due to incorrect attribute assignments. When creating a Response object, several attributes are being set to incorrect default values causing downstream failures. #### Steps/Code to Reproduce ```...
diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py index d7ee29e..31a05b1 100644 --- a/gunicorn/http/body.py +++ b/gunicorn/http/body.py @@ -200,10 +200,10 @@ class Body: if size is None: return sys.maxsize elif not isinstance(size, int): - raise TypeError("size must be...
["tests/test_http.py::test_readline_zero_size", "tests/test_http.py::test_readline_new_line_before_size", "tests/test_http.py::test_readline_new_line_after_size", "tests/test_http.py::test_readline_no_new_line", "tests/test_http.py::test_readline_buffer_loaded", "tests/test_http.py::test_readline_buffer_loaded_with_siz...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
2
14
50
1,154
0
0.6
1
0.75
1
0.239
80.992
6,922
swe_smith::train::13033
swe_smith
train
13,033
python-openxml__python-docx.0cf6d71f.combine_module__kamdewrq
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
TabStops indexing broken and raises wrong exception type #### Description TabStops indexing is not working correctly. When accessing tab stops by index, it's off by one and when the TabStops object is empty, it raises a KeyError instead of an IndexError. #### Steps/Code to Reproduce ```python from docx import Docum...
diff --git a/src/docx/text/parfmt.py b/src/docx/text/parfmt.py index ea37437..342575f 100644 --- a/src/docx/text/parfmt.py +++ b/src/docx/text/parfmt.py @@ -120,15 +120,15 @@ class ParagraphFormat(ElementProxy): def line_spacing(self, value): pPr = self._element.get_or_add_pPr() if value is None:...
["tests/text/test_parfmt.py::DescribeParagraphFormat::it_can_change_its_line_spacing[line_spacing_set_fixture0]", "tests/text/test_parfmt.py::DescribeParagraphFormat::it_can_change_its_line_spacing[line_spacing_set_fixture1]", "tests/text/test_parfmt.py::DescribeParagraphFormat::it_can_change_its_line_spacing[line_spac...
["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
2
14
11
1,154
0
0.6
1
0.75
1
0.239
80.992
6,923
swe_smith::train::3
swe_smith
train
3
oauthlib__oauthlib.1fd52536.combine_file__0hkl0pea
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OpenID Connect grant types broken after recent changes #### Description OpenID Connect grant types are failing to work properly. When trying to use any OpenID Connect flow (authorization code, implicit, etc.), the grant type objects are unable to access attributes from their proxy targets correctly. #### Steps/Code ...
diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py index 29d583e..381e130 100644 --- a/oauthlib/openid/connect/core/grant_types/base.py +++ b/oauthlib/openid/connect/core/grant_types/base.py @@ -17,11 +17,14 @@ class GrantTypeBase: # proxy_target grant ...
["tests/oauth2/rfc6749/endpoints/test_metadata.py::MetadataEndpointTest::test_openid_oauth2_preconfigured", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_claims_stored_on_code_creation", "tests/openid/connect/core/endpoints/test_claims_handling.py::TestClaimsHandling::test_inval...
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
11
172
1,214
0
0.6
1
0.75
1
0.239
80.992
6,924
swe_smith::train::42246
swe_smith
train
42,246
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__x3nqg77h
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Chart.category_axis always raises ValueError regardless of axis type #### Description When accessing the `category_axis` property on a chart object, it always raises a `ValueError` with the message "chart has no category axis", even when the chart does have a valid category, date, or value axis. #### Steps/Code to R...
diff --git a/src/pptx/chart/chart.py b/src/pptx/chart/chart.py index d73aa93..42eee7e 100644 --- a/src/pptx/chart/chart.py +++ b/src/pptx/chart/chart.py @@ -24,25 +24,24 @@ class Chart(PartElementProxy): @property def category_axis(self): + + raise ValueError("chart has no category axis") ""...
["tests/chart/test_chart.py::DescribeChart::it_provides_access_to_the_category_axis[c:catAx]", "tests/chart/test_chart.py::DescribeChart::it_provides_access_to_the_category_axis[c:dateAx]", "tests/chart/test_chart.py::DescribeChart::it_provides_access_to_the_category_axis[c:valAx]"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
15
3
1,133
0
0.6
1
0.75
1
0.238833
80.9915
6,925
swe_smith::train::28587
swe_smith
train
28,587
encode__starlette.db5063c2.func_basic__g2jvr4ag
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Router.url_path_for() crashes with NameError when routes contain duplicate names #### Description When using `Router.url_path_for()` with routes that have duplicate names, the method crashes with a `NameError: name 'nonexistent_function_check' is not defined` instead of properly handling the duplicate route scenario....
diff --git a/starlette/routing.py b/starlette/routing.py index 3b3c529..36c6677 100644 --- a/starlette/routing.py +++ b/starlette/routing.py @@ -654,11 +654,14 @@ class Router: await response(scope, receive, send) def url_path_for(self, name: str, /, **path_params: typing.Any) -> URLPath: - for r...
["tests/test_applications.py::test_url_path_for", "tests/test_authentication.py::test_authentication_redirect[asyncio]", "tests/test_authentication.py::test_authentication_redirect[trio]", "tests/test_convertors.py::test_datetime_convertor[asyncio]", "tests/test_convertors.py::test_datetime_convertor[trio]", "tests/tes...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
9
28
1,253
0
0.6
1
0.75
1
0.238833
80.9915
6,926
swe_smith::train::45164
swe_smith
train
45,164
modin-project__modin.8c7799fd.func_pm_remove_cond__9fiztf7o
swesmith/modin-project__modin.8c7799fd
modin-project/modin
python
null
merge_asof doesn't validate conflicting parameters properly #### Description The `merge_asof` function is not properly validating conflicting parameter combinations. When using parameters like `on` with `left_on`/`right_on` or combining index parameters with column parameters, the function should raise appropriate `V...
diff --git a/modin/pandas/general.py b/modin/pandas/general.py index 92aa195..14f7a05 100644 --- a/modin/pandas/general.py +++ b/modin/pandas/general.py @@ -181,18 +181,7 @@ def merge_asof( ) ErrorMessage.default_to_pandas("`merge_asof`") - # As of Pandas 1.2 these should raise an error; before that ...
["modin/tests/pandas/test_general.py::test_merge_asof_bad_arguments"]
["modin/tests/pandas/test_general.py::test_isna_isnull_notna_notnull[isna-True-int_data]", "modin/tests/pandas/test_general.py::test_isna_isnull_notna_notnull[isna-True-float_nan_data]", "modin/tests/pandas/test_general.py::test_isna_isnull_notna_notnull[isna-False-int_data]", "modin/tests/pandas/test_general.py::test_...
jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd
true
null
1
12
1
1,193
0
0.6
1
0.75
1
0.238833
80.9915
6,927
swe_smith::train::32147
swe_smith
train
32,147
davidhalter__parso.338a5760.func_pm_ctrl_invert_if__9znzdouk
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
dump() method raises TypeError for BaseNode instances #### Description The `dump()` method in `NodeOrLeaf` is raising a `TypeError` when encountering `BaseNode` instances during tree traversal. This breaks the ability to generate string representations of parse trees. #### Steps/Code to Reproduce ```python from par...
diff --git a/parso/tree.py b/parso/tree.py index e529871..a462d21 100644 --- a/parso/tree.py +++ b/parso/tree.py @@ -241,10 +241,10 @@ class NodeOrLeaf: newline = True indent_string = ' ' * indent elif isinstance(indent, str): + raise TypeError(f"expect 'indent' to be int, ...
["parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_dump_tree.py::test_eval_dump_recovers_parent"]
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_used_update[False-False]", "test/test_cache.p...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
19
2
1,053
0
0.6
1
0.75
1
0.238833
80.9915
6,928
swe_smith::train::8049
swe_smith
train
8,049
cantools__cantools.0c6a7871.func_pm_remove_assign__duocvygu
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
DBC parser fails to load files with relational attributes #### Description When loading DBC files that contain relational attributes (BA_REL_), the parser throws KeyError exceptions and fails to properly parse the file. This affects files that have signal-to-node or message-to-node attribute relationships defined. #...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..8d27db1 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -1179,13 +1179,12 @@ def _load_attributes_rel(tokens, definitions): if definition.type_...
["tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_database.py::CanToolsDatabaseTest::test_foobar", "tests/test_database.py::CanToolsDatabaseTest::test_foobar_decode_masked_frame_id", "tests/test_database.py::CanToolsDatabaseTest::test_foobar_encode_decode", "tests/test_database.py:...
["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
10
11
1,233
0
0.6
1
0.75
1
0.238833
80.9915
6,929
swe_smith::train::1874
swe_smith
train
1,874
agronholm__typeguard.b6a7e438.func_pm_ctrl_shuffle__spymikml
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
qualified_name function returns incorrect results due to variable scope issue #### Description The `qualified_name` function in `_utils.py` is not working correctly and returns unexpected results. When calling this function, it raises `UnboundLocalError` because variables are being used before they are defined. ####...
diff --git a/src/typeguard/_utils.py b/src/typeguard/_utils.py index e8f9b03..3bb9d0b 100644 --- a/src/typeguard/_utils.py +++ b/src/typeguard/_utils.py @@ -93,13 +93,10 @@ def get_type_name(type_: Any) -> str: def qualified_name(obj: Any, *, add_class_prefix: bool = False) -> str: - """ - Return the qualifi...
["tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_fail", "tests/test_checkers.py::TestFloat::test_bad_type", "tests/test_checkers.py::TestComplexNumber::test_bad_type", "tests/test_checkers.py::TestCallable::test_bad_type", "tests/test_checkers.py::TestCallable::test_too...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestBytesLike::test_valid[bytes]", "tests/test_checkers.py::TestBytesLike:...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
19
190
1,053
0
0.6
1
0.75
1
0.238833
80.9915
6,930
swe_smith::train::33147
swe_smith
train
33,147
django-money__django-money.835c1ab8.combine_module__yvbcjpg7
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
MoneyValidator fails with AttributeError on Money objects #### Description When validating Money fields in forms, the MoneyValidator is trying to access a `price` attribute on Money objects instead of the correct `amount` attribute, causing validation to fail with an AttributeError. #### Steps/Code to Reproduce ```...
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index dc5f6ad..bb22c13 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -23,7 +23,7 @@ __all__ = ("MoneyField",) class MoneyValidator(DecimalValidator): def __call__(self, value): - return super().__call__(value.amoun...
["tests/test_form.py::test_save", "tests/test_form.py::TestValidation::test_valid[value0]", "tests/test_form.py::TestValidation::test_valid[value1]", "tests/test_form.py::TestValidation::test_valid[value2]", "tests/test_form.py::TestValidation::test_valid[value3]", "tests/test_form.py::TestValidation::test_non_negative...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
2
19
17
1,053
0
0.6
1
0.75
1
0.238833
80.9915
6,931
swe_bench::test::1671
swe_bench
test
1,671
scikit-learn__scikit-learn-15495
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
b13b02c311c18c2041782bcdaadd08b8fd3f216b
Use _check_sample_weight to consistently validate sample_weight We recently introduced `utils.validation._check_sample_weight` which returns a validated `sample_weight` array. We should use it consistently throughout the code base, instead of relying on custom and adhoc checks like `check_consistent_lenght` or `check_...
@NicolasHug I could give it a try. Furthermore, should `_check_sample_weight` also guarantee non-negativeness and sum(sw) > 0 ? I think for the above mentioned estimators @NicolasHug intended this as an easier refactoring issues for new contributors, but if you want to look into it feel free to open PRs. > (I left-o...
diff --git a/sklearn/tree/_classes.py b/sklearn/tree/_classes.py --- a/sklearn/tree/_classes.py +++ b/sklearn/tree/_classes.py @@ -32,6 +32,7 @@ from ..utils import Bunch from ..utils import check_array from ..utils import check_random_state +from ..utils.validation import _check_sample_weight from ..utils import c...
diff --git a/sklearn/tree/tests/test_tree.py b/sklearn/tree/tests/test_tree.py --- a/sklearn/tree/tests/test_tree.py +++ b/sklearn/tree/tests/test_tree.py @@ -3,7 +3,6 @@ """ import copy import pickle -from functools import partial from itertools import product import struct @@ -1121,7 +1120,8 @@ def test_sample...
["sklearn/tree/tests/test_tree.py::test_sample_weight_invalid"]
["sklearn/tree/tests/test_tree.py::test_classification_toy", "sklearn/tree/tests/test_tree.py::test_weighted_classification_toy", "sklearn/tree/tests/test_tree.py::test_regression_toy", "sklearn/tree/tests/test_tree.py::test_xor", "sklearn/tree/tests/test_tree.py::test_iris", "sklearn/tree/tests/test_tree.py::test_bost...
null
true
2019-11-02T20:17:27Z
1
14
1
952
0
0.8
1
0.55
1
0.205333
80.991
6,932
swe_smith::train::17502
swe_smith
train
17,502
pyasn1__pyasn1.0f07d724.func_basic__3oqsumnd
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
Set.setComponentByType breaks with inverted logic conditions #### Description When using `setComponentByType` on Set objects, the method fails due to inverted boolean logic in the conditional statements. This affects both inner and outer component setting operations. #### Steps/Code to Reproduce ```python from pyas...
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py index 9aff5e6..28a67b4 100644 --- a/pyasn1/type/univ.py +++ b/pyasn1/type/univ.py @@ -2906,21 +2906,21 @@ class Set(SequenceAndSetBase): """ idx = self.componentType.getPositionByType(tagSet) - if innerFlag: # set inner component by inne...
["tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testBySpec", "tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testExplicitTag", "tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testExplicitTagUndefLength", "tests/codec/ber/test_decoder.py::ChoiceDecoderTestCase::testUndefLength", "tests/type/t...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
10
16
1,232
0
0.6
1
0.75
1
0.238667
80.991
6,933
swe_smith::train::21305
swe_smith
train
21,305
Instagram__MonkeyType.70c3acf6.pr_37
swesmith/Instagram__MonkeyType.70c3acf6
instagram/monkeytype
python
null
Module path validation removed, causing incorrect error messages for file paths When passing file paths instead of module names to monkeytype commands, the error messages are no longer helpful. Previously, monkeytype would detect when a path-like string was passed (containing path separators) and provide a clear error...
diff --git a/monkeytype/cli.py b/monkeytype/cli.py index 990079d..5435776 100644 --- a/monkeytype/cli.py +++ b/monkeytype/cli.py @@ -8,7 +8,6 @@ import collections import difflib import importlib import inspect -import os import os.path import runpy import sys @@ -48,11 +47,6 @@ def module_path(path: str) -> Tupl...
["tests/test_cli.py::test_pathlike_parameter", "tests/test_cli.py::test_toplevel_filename_parameter"]
["demo/test_inbox.py::test_empty_inbox", "demo/test_inbox.py::test_commented", "demo/test_inbox.py::test_followed", "demo/test_inbox.py::test_one_like", "demo/test_inbox.py::test_two_likes", "demo/test_inbox.py::test_three_likes", "demo/test_inbox.py::test_everything", "demo/test_inbox.py::test_aggregator_interface", "...
jyangballin/swesmith.x86_64.instagram_1776_monkeytype.70c3acf6
true
null
1
13
2
1,172
0
0.6
1
0.75
1
0.238667
80.991
6,934
swe_smith::train::4698
swe_smith
train
4,698
bottlepy__bottle.a8dfef30.combine_file__ahufnyv5
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
DictProperty and HeaderProperty broken after recent changes #### Description Setting values through DictProperty and HeaderProperty is completely broken. The logic for read-only checks has been inverted and there's an off-by-one error in key assignment. #### Steps/Code to Reproduce ```python import bottle # Test D...
diff --git a/bottle.py b/bottle.py index 286b5bc..4ac4e03 100755 --- a/bottle.py +++ b/bottle.py @@ -216,8 +216,8 @@ class DictProperty(object): return storage[key] def __set__(self, obj, value): - if self.read_only: raise AttributeError("Read-Only property.") - getattr(obj, self.attr)[sel...
["test/test_contextlocals.py::TestThreadLocals::test_response", "test/test_environ.py::TestResponse::test_charset", "test/test_environ.py::TestResponse::test_content_type", "test/test_environ.py::TestResponse::test_expires_header", "test/test_exc.py::TestAppException::test_noncatched_error", "test/test_mount.py::TestAp...
["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
29
13
852
0
0.6
1
0.75
1
0.238667
80.991
6,935
swe_smith::train::34049
swe_smith
train
34,049
allegro__bigcache.5aa251c4.lm_modify__tx94kjp2
swesmith/allegro__bigcache.5aa251c4
allegro/bigcache
go
null
Cache eviction callback receives nil function pointer causing panic #### Description When setting entries in the cache with clean disabled, the eviction callback is called with a nil function pointer, causing a segmentation fault. #### Steps/Code to Reproduce ```go package main import ( "fmt" "time" "...
diff --git a/shard.go b/shard.go index 4f03b53..f08bfd3 100644 --- a/shard.go +++ b/shard.go @@ -122,33 +122,35 @@ func (s *cacheShard) set(key string, hashedKey uint64, entry []byte) error { s.lock.Lock() - if previousIndex := s.hashmap[hashedKey]; previousIndex != 0 { + if previousIndex := s.hashmap[hashedKey];...
["TestOnRemoveWithReasonCallback"]
["TestOnRemoveFilterExpired", "TestClosing", "TestCache_SetWithoutCleanWindow", "TestCache_RepeatedSetWithBiggerEntry", "TestRemoveNonExpiredData", "TestEncodeDecode", "TestAllocateBiggerBuffer", "TestFnvHashSum64", "TestEntriesIteratorParallelAdd", "TestPushAndPop", "TestPushEntryAfterAllocateAdditionMemoryInFull", "T...
jyangballin/swesmith.x86_64.allegro_1776_bigcache.5aa251c4
true
null
1
14
1
1,151
0
0.6
1
0.75
1
0.2385
80.9905
6,936
swe_smith::train::52663
swe_smith
train
52,663
pydicom__pydicom.7d361b3d.lm_rewrite__8rrqp4x1
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Bug: `_dictionary_vr_fast` raises KeyError unexpectedly #### Description The function `_dictionary_vr_fast` is raising a `KeyError` for certain DICOM tags that should be present in the dictionary. This behavior is inconsistent with the expected functionality where the function should return the VR for a given tag...
diff --git a/src/pydicom/datadict.py b/src/pydicom/datadict.py index b4f9f3a..de21e63 100644 --- a/src/pydicom/datadict.py +++ b/src/pydicom/datadict.py @@ -325,19 +325,16 @@ def dictionary_VR(tag: TagType) -> str: return get_entry(tag)[0] -def _dictionary_vr_fast(tag: int) -> str: +def _dictionary_vr_fast(tag...
["tests/test_dictionary.py::TestDict::test_dictionary_vr_fast"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
9
1
1,251
0
0.6
1
0.75
1
0.2385
80.9905
6,937
swe_smith::train::10425
swe_smith
train
10,425
paramiko__paramiko.23f92003.func_basic__dzjw70zo
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
ECDH key exchange fails with ValueError on NIST P-256 curve #### Description When performing ECDH key exchange using the NIST P-256 curve in server mode, the key exchange process fails with a ValueError related to invalid literal for int() conversion. #### Steps/Code to Reproduce ```python import paramiko from para...
diff --git a/paramiko/kex_ecdh_nist.py b/paramiko/kex_ecdh_nist.py index 41fab46..55a62e9 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_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
12
1
1,190
0
0.6
1
0.75
1
0.238333
80.99
6,938
swe_smith::train::35871
swe_smith
train
35,871
stanfordnlp__dspy.651a4c71.lm_rewrite__36hdcobp
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# AttributeError when deleting non-existent attribute from dotdict ### Description I've encountered an issue with the `dotdict` class in DSPy. When trying to delete an attribute that doesn't exist, the code raises a `KeyError` instead of an `AttributeError`. This is inconsistent with Python's standard behavior for at...
diff --git a/dspy/dsp/utils/utils.py b/dspy/dsp/utils/utils.py index 4025dfa..4401e7a 100644 --- a/dspy/dsp/utils/utils.py +++ b/dspy/dsp/utils/utils.py @@ -91,11 +91,14 @@ class dotdict(dict): self[key] = value def __delattr__(self, key): + """TODO: Implement this function""" if key...
["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
7
4
1,290
0
0.6
1
0.75
1
0.238333
80.99
6,939
swe_smith::train::39573
swe_smith
train
39,573
pallets__jinja.ada0a9a6.lm_rewrite__5pvjurt9
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
# Async template generation broken in Jinja2 ## Description I noticed an issue when using async template generation in Jinja2. When trying to use the `generate()` method with async templates, it fails with an AttributeError. ## Steps to reproduce Here's a simple example that demonstrates the issue: ```python from ...
diff --git a/src/jinja2/environment.py b/src/jinja2/environment.py index 0b303d5..bcd58f8 100644 --- a/src/jinja2/environment.py +++ b/src/jinja2/environment.py @@ -1332,20 +1332,14 @@ class Template: """ if self.environment.is_async: import asyncio - - async def to_list() -> t...
["tests/test_async.py::test_async_generate", "tests/test_async.py::test_async_iteration_in_templates", "tests/test_async.py::test_async_iteration_in_templates_extended"]
["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
12
3
1,189
0
0.6
1
0.75
1
0.238167
80.9895
6,940
swe_smith::train::39324
swe_smith
train
39,324
pallets__jinja.ada0a9a6.func_basic__zgybouff
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Context functions not receiving proper arguments #### Description Functions decorated with `@pass_context`, `@pass_environment`, or `@pass_eval_context` are not receiving the expected arguments when called from templates. Instead of getting the context, environment, or evaluation context objects, they receive `None` ...
diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py index 9dcc9d4..e568f62 100644 --- a/src/jinja2/runtime.py +++ b/src/jinja2/runtime.py @@ -271,28 +271,26 @@ class Context: argument if the callable has :func:`pass_context` or :func:`pass_environment`. """ - if __debug__: + ...
["tests/test_ext.py::TestInternationalization::test_trans", "tests/test_ext.py::TestInternationalization::test_trans_plural", "tests/test_ext.py::TestInternationalization::test_trans_plural_with_functions", "tests/test_ext.py::TestInternationalization::test_complex_plural", "tests/test_ext.py::TestInternationalization:...
["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
12
29
1,189
0
0.6
1
0.75
1
0.238167
80.9895
6,941
swe_smith::train::17222
swe_smith
train
17,222
prettytable__prettytable.ca90b055.lm_rewrite__8xvwy913
swesmith/prettytable__prettytable.ca90b055
prettytable/prettytable
python
null
# Invalid style value not raising error in set_style method When setting an invalid style value using the `set_style` method, the method no longer raises a ValueError as expected. This behavior is inconsistent with previous versions. ## Description The `set_style` method should validate that the provided style is a ...
diff --git a/src/prettytable/prettytable.py b/src/prettytable/prettytable.py index 818a520..56c014b 100644 --- a/src/prettytable/prettytable.py +++ b/src/prettytable/prettytable.py @@ -1441,6 +1441,12 @@ class PrettyTable: ############################## def set_style(self, style: TableStyle) -> None: + ...
["tests/test_prettytable.py::TestStyle::test_style_invalid"]
["tests/test_colortable.py::TestColorTable::test_themeless", "tests/test_colortable.py::TestColorTable::test_theme_setter", "tests/test_colortable.py::TestFormatCode::test_basic", "tests/test_colortable.py::TestFormatCode::test_prefix", "tests/test_colortable.py::TestFormatCode::test_escapes", "tests/test_colortable.py...
jyangballin/swesmith.x86_64.prettytable_1776_prettytable.ca90b055
true
null
1
12
1
1,189
0
0.6
1
0.75
1
0.238167
80.9895
6,942
swe_smith::train::2055
swe_smith
train
2,055
pdfminer__pdfminer.six.1a8bd2f7.func_basic__494sljw0
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFDocument initialization broken - catalog becomes None When initializing a PDFDocument, the catalog is being set to None instead of the proper dictionary value from the trailer's Root object. This breaks PDF parsing completely. #### Steps/Code to Reproduce ```python from pdfminer.pdfparser import PDFParser from pd...
diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py index 1c06335..5fd50e8 100644 --- a/pdfminer/pdfdocument.py +++ b/pdfminer/pdfdocument.py @@ -685,14 +685,14 @@ class PDFDocument: self, parser: PDFParser, password: str = "", - caching: bool = True, - fallback: bool...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
35
75
729
0
0.6
1
0.75
1
0.238167
80.9895
6,943
swe_smith::train::23969
swe_smith
train
23,969
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__a18woe9c
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
prime_meridian function raises UnboundLocalError when axes don't have observer #### Description When calling `prime_meridian()` with axes that don't have an observer, the function raises an `UnboundLocalError` instead of the expected `ValueError`. #### Steps/Code to Reproduce ```python import matplotlib.pyplot as p...
diff --git a/sunpy/visualization/drawing.py b/sunpy/visualization/drawing.py index e1996d6..e172d91 100644 --- a/sunpy/visualization/drawing.py +++ b/sunpy/visualization/drawing.py @@ -155,6 +155,20 @@ def equator(axes, *, rsun: u.m = R_sun, resolution=500, **kwargs): @u.quantity_input def prime_meridian(axes, *, r...
["sunpy/visualization/tests/test_drawing.py::test_prime_meridian_error"]
["sunpy/visualization/tests/test_drawing.py::test_limb_invisible"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
29
1
849
0
0.6
1
0.75
1
0.238167
80.9895
6,944
swe_smith::train::44634
swe_smith
train
44,634
mahmoud__glom.fb3c4e76.func_basic__4c5ut8n6
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
Coalesce behavior changed unexpectedly I'm seeing some weird behavior with `Coalesce` after updating. It seems like the order of subspecs is getting reversed and the skip logic is inverted. #### Steps/Code to Reproduce ```python from glom import glom, Coalesce # Basic coalesce should try specs in order target = {'a...
diff --git a/glom/core.py b/glom/core.py index cee71a3..4c1b60c 100644 --- a/glom/core.py +++ b/glom/core.py @@ -897,24 +897,24 @@ class Coalesce: """ def __init__(self, *subspecs, **kwargs): - self.subspecs = subspecs + self.subspecs = tuple(reversed(subspecs)) self._orig_kwargs = di...
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_check.py::test_check_basic", "glom/test/test_error.py::test_coalesce_stack", "glom/test/test_error.py::test_all_public_errors", "glom/test/test_match.py::test_check_porte...
["glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "glom/test/test_basic.py::test_abstract_iterable", "glom/test/test_basic.py::test_call_and_target", "glom/test/test_basic.py::test_inv...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
14
8
1,149
0
0.6
1
0.75
1
0.238167
80.9895
6,945
r2e_gym::train::6321
r2e_gym
train
6,321
pillow__25500e83bccbaa2b01d9f1b9f183d908c44c13a9
pillow
python-pillow/pillow
python
25500e83bccbaa2b01d9f1b9f183d908c44c13a9
**Title:** `putpalette` Fails with RGBA Palettes Containing Alpha Values **Description:** When attempting to use the `putpalette` method with a palette that includes alpha values (i.e., 1024 integers for RGBA), a `ValueError` is raised indicating an unrecognized raw mode. This prevents the application of transparency ...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -815,9 +815,15 @@ """ if self.im and self.palette and self.palette.dirty: # realize palette - self.im.putpalette(*self.palette.getdata()) + mode, arr = self.palette.getd...
diff --git a/Tests/test_image_putpalette.py b/Tests/test_image_putpalette.py --- a/Tests/test_image_putpalette.py +++ b/Tests/test_image_putpalette.py @@ -1,8 +1,8 @@ import pytest -from PIL import ImagePalette +from PIL import Image, ImagePalette -from .helper import hopper +from .helper import assert_image_equal...
null
null
namanjain12/pillow_final:25500e83bccbaa2b01d9f1b9f183d908c44c13a9
true
null
1
26
null
1,621
0
0.75
1
0.6375
1
0.356833
80.98925
6,946
swe_smith::train::29765
swe_smith
train
29,765
getnikola__nikola.0f4c230e.combine_module__9orpwwxc
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
# Scheduling feature in new_post command not working #### Description The scheduling feature in the `new_post` command is broken. When trying to schedule a post using the `--schedule` option with a rule, the command fails. #### Steps to Reproduce ```python from nikola.plugins.command.new_post import get_date import...
diff --git a/nikola/plugins/command/new_post.py b/nikola/plugins/command/new_post.py index 0734ec8..a1a989f 100644 --- a/nikola/plugins/command/new_post.py +++ b/nikola/plugins/command/new_post.py @@ -81,7 +81,7 @@ def get_date(schedule=False, rule=None, last_date=None, tz=None, iso8601=False): """ if tz is...
["tests/integration/test_dev_server_serve.py::test_serves_root_dir[https://example.org]", "tests/integration/test_dev_server_serve.py::test_serves_root_dir[https://example.org:1234/blog]", "tests/integration/test_dev_server_serve.py::test_serves_root_dir[https://example.org:3456/blog/]", "tests/integration/test_dev_ser...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[o...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
2
14
11
1,148
0
0.6
1
0.75
1
0.238
80.989
6,947
swe_smith::train::48867
swe_smith
train
48,867
facebookresearch__hydra.0f03eb60.func_pm_remove_assign__bjgdxw7c
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
QuotedString.with_quotes() method broken for strings with backslashes #### Description The `with_quotes()` method in `QuotedString` class fails to properly reconstruct quoted strings that contain backslashes. When calling `with_quotes()` on a `QuotedString` object that was parsed from a string containing escaped char...
diff --git a/hydra/core/override_parser/types.py b/hydra/core/override_parser/types.py index f020ccb..e5e01cc 100644 --- a/hydra/core/override_parser/types.py +++ b/hydra/core/override_parser/types.py @@ -36,10 +36,8 @@ class QuotedString: match = None if "\\" in self.text: - text = self....
["tests/test_overrides_parser.py::test_primitive_quoted_string[escape_single_quote_x3]", "tests/test_overrides_parser.py::test_primitive_quoted_string[escape_double_quote_x3]", "tests/test_overrides_parser.py::test_primitive_quoted_string[escape_backslash_trailing]", "tests/test_overrides_parser.py::test_primitive_quot...
["build_helpers/test_helpers.py::test_find[none]", "build_helpers/test_helpers.py::test_find[all]", "build_helpers/test_helpers.py::test_find[filter_a]", "build_helpers/test_helpers.py::test_find[include_a]", "build_helpers/test_helpers.py::test_find[include_a,exclude_file1]", "build_helpers/test_helpers.py::test_find[...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
7
6
1,288
0
0.6
1
0.75
1
0.238
80.989
6,948
swe_smith::train::27967
swe_smith
train
27,967
jsvine__pdfplumber.02ff4313.func_pm_remove_assign__tns3tj66
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
PDFStructElement creation fails with UnboundLocalError #### Description When parsing PDF structure trees, the code fails with `UnboundLocalError: local variable 'children' referenced before assignment` in the `_parse_struct_element` method. #### Steps/Code to Reproduce ```python import pdfplumber # This will fail ...
diff --git a/pdfplumber/structure.py b/pdfplumber/structure.py index 88749d7..86125a5 100644 --- a/pdfplumber/structure.py +++ b/pdfplumber/structure.py @@ -278,9 +278,8 @@ class PDFStructTree(Findable): obj_tag = decode_text(obj["S"].name) if obj_tag in self.role_map: obj_tag...
["tests/test_convert.py::Test::test_cli_structure_text", "tests/test_structure.py::Test::test_structure_tree", "tests/test_structure.py::TestClass::test_all_mcids", "tests/test_structure.py::TestClass::test_element_bbox", "tests/test_structure.py::TestClass::test_find_all_element", "tests/test_structure.py::TestClass::...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
15
16
1,128
0
0.6
1
0.75
1
0.238
80.989
6,949
swe_smith::train::41999
swe_smith
train
41,999
scanny__python-pptx.278b47b1.func_pm_class_rm_funcs__v2svdork
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Table boolean properties broken after recent changes #### Description Table boolean properties are no longer working correctly. When accessing boolean properties on table objects, they're raising AttributeError instead of returning the expected boolean values. #### Steps/Code to Reproduce ```python from pptx import...
diff --git a/src/pptx/oxml/table.py b/src/pptx/oxml/table.py index cd3e9eb..4dd505d 100644 --- a/src/pptx/oxml/table.py +++ b/src/pptx/oxml/table.py @@ -136,18 +136,6 @@ class CT_Table(BaseOxmlElement): """Return `a:tc` element at `row_idx`, `col_idx`.""" return self.tr_lst[row_idx].tc_lst[col_idx] ...
["tests/test_table.py::DescribeTableBooleanProperties::it_knows_its_boolean_property_settings[boolprop_get_fixture0]", "tests/test_table.py::DescribeTableBooleanProperties::it_knows_its_boolean_property_settings[boolprop_get_fixture1]", "tests/test_table.py::DescribeTableBooleanProperties::it_knows_its_boolean_property...
["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
13
11
1,168
0
0.6
1
0.75
1
0.238
80.989
6,950
swe_smith::train::45468
swe_smith
train
45,468
dask__dask.5f61e423.pr_10500
swesmith/dask__dask.5f61e423
dask/dask
python
null
# Missing preserve_index parameter in get_pyarrow_schema_pandas function ## Description When trying to convert a pandas DataFrame to a PyArrow schema with the `preserve_index` parameter, I'm getting an unexpected error: ``` TypeError: get_pyarrow_schema_pandas() got an unexpected keyword argument 'preserve_index' ``...
diff --git a/dask/dataframe/backends.py b/dask/dataframe/backends.py index b44f2c0..5936b4d 100644 --- a/dask/dataframe/backends.py +++ b/dask/dataframe/backends.py @@ -209,10 +209,10 @@ except ImportError: @pyarrow_schema_dispatch.register((pd.DataFrame,)) -def get_pyarrow_schema_pandas(obj, preserve_index=None):...
["dask/dataframe/tests/test_dataframe.py::test_pyarrow_schema_dispatch_preserves_index[True]", "dask/dataframe/tests/test_dataframe.py::test_pyarrow_schema_dispatch_preserves_index[False]"]
["dask/dataframe/tests/test_dataframe.py::test_Dataframe", "dask/dataframe/tests/test_dataframe.py::test_head_tail", "dask/dataframe/tests/test_dataframe.py::test_head_npartitions", "dask/dataframe/tests/test_dataframe.py::test_head_npartitions_warn", "dask/dataframe/tests/test_dataframe.py::test_index_head", "dask/dat...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
6
2
1,307
0
0.6
1
0.75
1
0.237833
80.9885
6,951
swe_smith::train::49437
swe_smith
train
49,437
mozilla__bleach.73871d76.func_pm_ctrl_shuffle__foyz6dtc
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
URL parsing fails with AttributeError when mixing str and non-str arguments #### Description When using the URL parsing functionality in bleach, certain operations fail with an `AttributeError: 'str' object has no attribute 'decode'` error. This appears to happen when the argument type checking logic encounters mixed...
diff --git a/bleach/_vendor/parse.py b/bleach/_vendor/parse.py index ac6e7a9..a8f2e21 100644 --- a/bleach/_vendor/parse.py +++ b/bleach/_vendor/parse.py @@ -110,12 +110,7 @@ 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
15
25
1,127
0
0.6
1
0.75
1
0.237833
80.9885
6,952
swe_smith::train::2576
swe_smith
train
2,576
pdfminer__pdfminer.six.1a8bd2f7.func_pm_remove_wrapper__1czw3ege
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFXRef parsing fails with NameError when xref line contains non-integer values #### Description When parsing PDF files with xref tables that contain non-integer values in the start/nobjs line, the parser crashes with a `NameError: name 'start' is not defined` error instead of properly handling the invalid format. #...
diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py index 1c06335..509034d 100644 --- a/pdfminer/pdfdocument.py +++ b/pdfminer/pdfdocument.py @@ -152,11 +152,6 @@ class PDFXRef(PDFBaseXRef): if len(f) != 2: error_msg = f"Trailer not found: {parser!r}: line={line!r}" ...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_625_identity_cmap", "tests/test_highlevel_extracttext.py::TestExtractText::test_i...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
6
48
1,307
0
0.6
1
0.75
1
0.237833
80.9885
6,953
swe_smith::train::31166
swe_smith
train
31,166
scrapy__scrapy.35212ec5.combine_module__2rfd8rsi
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
### AttributeError in WebClientTestCase It seems there's an issue with the `WebClientTestCase` after the recent changes. The tests are failing due to an `AttributeError` related to the `ScrapyHTTPClientFactory` class. This is causing several tests to fail, including `testFactoryInfo`, `testHostHeader`, `testNotFound`,...
diff --git a/scrapy/core/downloader/webclient.py b/scrapy/core/downloader/webclient.py index e5c2255..60cca02 100644 --- a/scrapy/core/downloader/webclient.py +++ b/scrapy/core/downloader/webclient.py @@ -91,7 +91,7 @@ class ScrapyHTTPPageGetter(HTTPClient): # twisted.web.client.HTTPClientFactory. When that class was ...
["tests/test_engine.py::EngineTest::test_crawler", "tests/test_engine.py::EngineTest::test_crawler_dupefilter", "tests/test_engine.py::EngineTest::test_crawler_itemerror", "tests/test_webclient.py::WebClientTestCase::testFactoryInfo", "tests/test_webclient.py::WebClientTestCase::testHostHeader", "tests/test_webclient.p...
["tests/test_engine.py::EngineTest::test_close_downloader", "tests/test_engine.py::EngineTest::test_crawler_change_close_reason_on_idle", "tests/test_engine.py::EngineTest::test_short_timeout", "tests/test_engine.py::EngineTest::test_start_already_running_exception", "tests/test_engine.py::test_request_scheduled_signal...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
2
8
16
1,267
0
0.6
1
0.75
1
0.237833
80.9885
6,954
swe_smith::train::49161
swe_smith
train
49,161
mozilla__bleach.73871d76.combine_file__xmo3oau0
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
BoundMethodDispatcher arguments swapped causing AttributeError When using bleach's linkify functionality, I'm getting AttributeError: 'dict' object has no attribute 'startswith' errors. This seems to be happening because the BoundMethodDispatcher class has its arguments mixed up. #### Steps/Code to Reproduce ```pyth...
diff --git a/bleach/_vendor/html5lib/_utils.py b/bleach/_vendor/html5lib/_utils.py index 635bb02..a46e871 100644 --- a/bleach/_vendor/html5lib/_utils.py +++ b/bleach/_vendor/html5lib/_utils.py @@ -70,14 +70,14 @@ class MethodDispatcher(dict): return dict.get(self, key, self.default) def __get__(self, in...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
14
185
1,147
0
0.6
1
0.75
1
0.237833
80.9885
6,955
swe_smith::train::20344
swe_smith
train
20,344
gruns__furl.da386f68.func_pm_ctrl_shuffle__xl74y5p7
swesmith/gruns__furl.da386f68
gruns/furl
python
null
# furl.origin property broken - UnboundLocalError when accessing #### Description The `origin` property of the `furl` class is broken. When trying to access the `origin` property, an `UnboundLocalError` is raised because variables are being used before they are defined. #### Steps/Code to Reproduce ```python from fur...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..3ede0bf 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -1539,14 +1539,13 @@ class furl(URLPathCompositionInterface, QueryCompositionInterface, @property def origin(self): port = '' + origin = '%s://%s%s' % (scheme, host, port) s...
["tests/test_furl.py::TestFurl::test_asdict", "tests/test_furl.py::TestFurl::test_origin"]
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_it...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
7
2
1,287
0
0.6
1
0.75
1
0.237833
80.9885
6,956
swe_smith::train::20254
swe_smith
train
20,254
gruns__furl.da386f68.func_basic__g5xaaimb
swesmith/gruns__furl.da386f68
gruns/furl
python
null
# IDNA decoding broken for internationalized domain names ## Description I've found an issue with the IDNA decoding functionality in furl. When working with internationalized domain names (IDNs), the library is no longer correctly handling the conversion between encoded and decoded forms. ## Steps to reproduce Here...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..cb3b8f0 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -123,9 +123,9 @@ def idna_encode(o): def idna_decode(o): - if callable_attr(utf8(o), 'decode'): - return utf8(o).decode('idna') - return o + if callable_attr(utf8(o), 'encode'): + ...
["tests/test_furl.py::TestFurl::test_asdict", "tests/test_furl.py::TestFurl::test_idna"]
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_it...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
6
2
1,307
0
0.6
1
0.75
1
0.237833
80.9885
6,957
swe_bench::test::1677
swe_bench
test
1,677
scikit-learn__scikit-learn-23099
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
42d235924efa64987a19e945035c85414c53d4f0
GPR `sample_y` enforce `n_targets=1` before calling `fit` In `GaussianProcessRegressor`, sampling in the prior before calling `fit` via `sample_y` will assume that `y` is made of a single target. However, this is not necessarily the case. Therefore, the shape of the output of `sample_y` before and after `fit` is differ...
I see that we have the same issue with `predict` indeed.
diff --git a/sklearn/gaussian_process/_gpr.py b/sklearn/gaussian_process/_gpr.py --- a/sklearn/gaussian_process/_gpr.py +++ b/sklearn/gaussian_process/_gpr.py @@ -110,6 +110,14 @@ def optimizer(obj_func, initial_theta, bounds): which might cause predictions to change if the data is modified externally...
diff --git a/sklearn/gaussian_process/tests/test_gpr.py b/sklearn/gaussian_process/tests/test_gpr.py --- a/sklearn/gaussian_process/tests/test_gpr.py +++ b/sklearn/gaussian_process/tests/test_gpr.py @@ -773,6 +773,57 @@ def test_sample_y_shapes(normalize_y, n_targets): assert y_samples.shape == y_test_shape +@...
["sklearn/gaussian_process/tests/test_gpr.py::test_sample_y_shape_with_prior[1-None]", "sklearn/gaussian_process/tests/test_gpr.py::test_sample_y_shape_with_prior[1-1]", "sklearn/gaussian_process/tests/test_gpr.py::test_sample_y_shape_with_prior[1-2]", "sklearn/gaussian_process/tests/test_gpr.py::test_sample_y_shape_wi...
["sklearn/gaussian_process/tests/test_gpr.py::test_gpr_interpolation[kernel0]", "sklearn/gaussian_process/tests/test_gpr.py::test_gpr_interpolation[kernel1]", "sklearn/gaussian_process/tests/test_gpr.py::test_gpr_interpolation[kernel2]", "sklearn/gaussian_process/tests/test_gpr.py::test_gpr_interpolation[kernel3]", "sk...
null
true
2022-04-10T13:13:15Z
1
31
13
606
0
0.8
1
0.55
1
0.204333
80.988
6,958
swe_smith::train::47159
swe_smith
train
47,159
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__t5inc4id
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
AsyncIOWrapper raises AttributeError immediately instead of checking for valid attributes #### Description When trying to access any attribute on an AsyncIOWrapper instance, it immediately raises an AttributeError without checking if the attribute should be forwarded from the wrapped file object or if it's a valid as...
diff --git a/src/trio/_file_io.py b/src/trio/_file_io.py index 5a612ff..61b6eab 100644 --- a/src/trio/_file_io.py +++ b/src/trio/_file_io.py @@ -237,6 +237,8 @@ class AsyncIOWrapper(AsyncResource, Generic[FileT_co]): if not TYPE_CHECKING: def __getattr__(self, name: str) -> object: + + raise ...
["src/trio/_tests/test_file_io.py::test_sync_attrs_forwarded", "src/trio/_tests/test_file_io.py::test_async_methods_generated_once", "src/trio/_tests/test_file_io.py::test_async_methods_signature", "src/trio/_tests/test_file_io.py::test_async_methods_wrap", "src/trio/_tests/test_file_io.py::test_open_context_manager", ...
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
7
10
1,286
0
0.6
1
0.75
1
0.237667
80.988
6,959
swe_smith::train::48270
swe_smith
train
48,270
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__w5jogbs0
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Plugin manager initialization broken - UnboundLocalError on plugin_manager #### Description The plugin manager initialization is failing with an `UnboundLocalError` when trying to access the `plugin_manager` variable. This appears to be happening during the plugin loading process. #### Steps/Code to Reproduce ```py...
diff --git a/src/sqlfluff/core/plugin/host.py b/src/sqlfluff/core/plugin/host.py index 8541164..dd045e8 100644 --- a/src/sqlfluff/core/plugin/host.py +++ b/src/sqlfluff/core/plugin/host.py @@ -80,36 +80,35 @@ def _load_plugin( def get_plugin_manager() -> pluggy.PluginManager: - """Initializes the PluginManager....
["test/core/plugin_test.py::test__plugin_handle_bad_load"]
["test/core/plugin_test.py::test__plugin_get_version"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
25
1
926
0
0.6
1
0.75
1
0.237667
80.988
6,960
swe_smith::train::42092
swe_smith
train
42,092
scanny__python-pptx.278b47b1.func_pm_ctrl_shuffle__c54v2cwf
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
_next_rId property raises exception immediately instead of finding next available ID #### Description When trying to access the `_next_rId` property on a `_Relationships` object, it immediately raises an exception instead of finding the next available relationship ID. This breaks functionality that depends on generat...
diff --git a/src/pptx/opc/package.py b/src/pptx/opc/package.py index 713759c..2059ecd 100644 --- a/src/pptx/opc/package.py +++ b/src/pptx/opc/package.py @@ -647,11 +647,9 @@ class _Relationships(Mapping[str, "_Relationship"]): @property def _next_rId(self) -> str: - """Next str rId available in colle...
["tests/opc/test_package.py::Describe_Relationships::it_finds_the_next_rId_to_help[rIds0-rId1]", "tests/opc/test_package.py::Describe_Relationships::it_finds_the_next_rId_to_help[rIds1-rId2]", "tests/opc/test_package.py::Describe_Relationships::it_finds_the_next_rId_to_help[rIds2-rId3]", "tests/opc/test_package.py::Des...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
15
6
1,126
0
0.6
1
0.75
1
0.237667
80.988
6,961
swe_smith::train::20796
swe_smith
train
20,796
tobymao__sqlglot.036601ba.func_pm_op_swap__3xemq367
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Snowflake datetime function parsing fails with AttributeError #### Description When parsing certain Snowflake datetime functions, the parser raises an `AttributeError` due to incorrect null checking order in the `_build_datetime` function. The error occurs when trying to access attributes on `None` values. #### Step...
diff --git a/sqlglot/dialects/snowflake.py b/sqlglot/dialects/snowflake.py index efcec16..18335da 100644 --- a/sqlglot/dialects/snowflake.py +++ b/sqlglot/dialects/snowflake.py @@ -45,12 +45,12 @@ def _build_datetime( value = seq_get(args, 0) scale_or_fmt = seq_get(args, 1) - int_value = valu...
["tests/dialects/test_snowflake.py::TestSnowflake::test_ddl", "tests/dialects/test_snowflake.py::TestSnowflake::test_from_changes", "tests/dialects/test_snowflake.py::TestSnowflake::test_snowflake", "tests/dialects/test_snowflake.py::TestSnowflake::test_timestamps"]
["tests/dialects/test_snowflake.py::TestSnowflake::test_alter_set_unset", "tests/dialects/test_snowflake.py::TestSnowflake::test_copy", "tests/dialects/test_snowflake.py::TestSnowflake::test_describe_table", "tests/dialects/test_snowflake.py::TestSnowflake::test_flatten", "tests/dialects/test_snowflake.py::TestSnowflak...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
9
4
1,245
0
0.6
1
0.75
1
0.2375
80.9875
6,962
swe_smith::train::5847
swe_smith
train
5,847
mahmoud__boltons.3bfcfdd0.combine_file__eqm2kszz
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
# Callpoint.from_current() returns None instead of a Callpoint object I've found an issue with the `Callpoint.from_current()` method in `tbutils.py`. It's returning `None` instead of a proper `Callpoint` object. ## Reproduction Here's a simple script that demonstrates the issue: ```python from boltons.tbutils impor...
diff --git a/boltons/tbutils.py b/boltons/tbutils.py index bfc4984..c89d9fe 100644 --- a/boltons/tbutils.py +++ b/boltons/tbutils.py @@ -111,8 +111,8 @@ class Callpoint: @classmethod def from_current(cls, level=1): "Creates a Callpoint from the location of the calling function." - frame = sys....
["tests/test_tbutils.py::test_exception_info", "tests/test_tbutils.py::test_contextual"]
["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac...
jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0
true
null
1
10
2
1,225
0
0.6
1
0.75
1
0.2375
80.9875
6,963
swe_smith::train::6890
swe_smith
train
6,890
joke2k__faker.8b401a7d.lm_rewrite__uwosvblf
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# TypeError not raised when passing tuple to json() method ## Description When using the `json()` method with a tuple as `data_columns` parameter, the method doesn't raise a TypeError as expected. Instead, it tries to process the tuple as if it were a dictionary, which can lead to unexpected behavior. ## Steps to re...
diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index 70f20ec..194448d 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -633,14 +633,19 @@ class Provider(BaseProvider): return data def create_json_structure(data_columns: Uni...
["tests/providers/test_misc.py::TestMiscProvider::test_json_invalid_data_columns"]
["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
17
1
1,084
0
0.6
1
0.75
1
0.237333
80.987
6,964
swe_smith::train::22294
swe_smith
train
22,294
tweepy__tweepy.91a41c6e.func_basic__6lvkkwh3
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Cursor Initialization Issue #### Description It seems there's an issue with the initialization of the `Cursor` class in the `tweepy/cursor.py` file. The recent changes have caused the `Cursor` to not behave as expected, particularly when iterating over items or pages. This is affecting the ability to retrieve use...
diff --git a/tweepy/cursor.py b/tweepy/cursor.py index 1db73e1..f277b4d 100644 --- a/tweepy/cursor.py +++ b/tweepy/cursor.py @@ -77,10 +77,10 @@ class Cursor: class BaseIterator: def __init__(self, method, *args, **kwargs): - self.method = method - self.args = args - self.kwargs = kwargs - ...
["tests/test_cursors.py::TweepyCursorTests::testcursorcursoritems", "tests/test_cursors.py::TweepyCursorTests::testcursorcursorpages", "tests/test_cursors.py::TweepyCursorTests::testcursornext", "tests/test_cursors.py::TweepyCursorTests::testcursorsetstartcursor", "tests/test_cursors.py::TweepyCursorTests::testidcursor...
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
8
6
1,264
0
0.6
1
0.75
1
0.237333
80.987
6,965
swe_smith::train::1546
swe_smith
train
1,546
Cog-Creators__Red-DiscordBot.33e0eac7.func_basic__xu84ju9v
swesmith/Cog-Creators__Red-DiscordBot.33e0eac7
cog-creators/red-discordbot
python
null
Alias configuration entries swapped between global and guild scopes #### Description The alias cog is incorrectly registering configuration entries, causing `handled_string_creator` to be registered at the guild level instead of globally. This breaks alias functionality as the configuration system expects certain ent...
diff --git a/redbot/cogs/alias/alias.py b/redbot/cogs/alias/alias.py index cdc3806..d6c246b 100644 --- a/redbot/cogs/alias/alias.py +++ b/redbot/cogs/alias/alias.py @@ -45,11 +45,12 @@ class Alias(commands.Cog): def __init__(self, bot: Red): super().__init__() self.bot = bot + # Swapped in...
["tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_alias", "tests/cogs/test_alias.py::test_add_global_alias", "tests/cogs/test_alias.py::test_delete_global_alias"]
["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_economy.py::test_bank_register", "tests/cogs/test_economy.py::test_bank_transfer", "tests/cogs/test_economy.py::test_bank_set", "tests/cogs...
jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7
true
null
1
7
5
1,284
0
0.6
1
0.75
1
0.237333
80.987
6,966
swe_smith::train::17667
swe_smith
train
17,667
pyasn1__pyasn1.0f07d724.func_basic__iuk8r5sj
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
BER decoder fails with "Complex tag format expected" error for Null values #### Description The BER decoder is incorrectly rejecting valid Null ASN.1 values with a "Complex tag format expected" error. This appears to affect decoding of sequences and other structures that contain Null components. #### Steps/Code to R...
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 7e69ca1..be580cd 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -383,19 +383,19 @@ class NullPayloadDecoder(AbstractSimplePayloadDecoder): decodeFun=None, substrateFun=None, ...
["tests/codec/ber/test_decoder.py::NullDecoderTestCase::testNull", "tests/codec/ber/test_decoder.py::SequenceDecoderTestCase::testWithOptionalAndDefaultedDefMode", "tests/codec/ber/test_decoder.py::SequenceDecoderTestCase::testWithOptionalAndDefaultedDefModeChunked", "tests/codec/ber/test_decoder.py::SequenceDecoderTes...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
10
49
1,224
0
0.6
1
0.75
1
0.237333
80.987
6,967
swe_bench::test::1700
swe_bench
test
1,700
scikit-learn__scikit-learn-25774
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
1ae0eb570beee304082f70824b8867cc8d9c08b8
FIX ignore nan values in partial dependence computation closes #25401 This PR implements the default behaviour suggested in https://github.com/scikit-learn/scikit-learn/issues/25401#issuecomment-1383989717 that is ignoring `nan` values in both numerical and categorical features. Up to now, there is a bug since the co...
I am adding some thinking that we had with @GaelVaroquaux and @ogrisel. @GaelVaroquaux is not keen on discarding missing values because you are introducing another type of bias. As an alternative to the current implementation, I would suggest the following proposal: - Make the behaviour consistent by raising an e...
diff --git a/sklearn/inspection/_partial_dependence.py b/sklearn/inspection/_partial_dependence.py --- a/sklearn/inspection/_partial_dependence.py +++ b/sklearn/inspection/_partial_dependence.py @@ -87,8 +87,20 @@ def _grid_from_X(X, percentiles, is_categorical, grid_resolution): raise ValueError("'grid_resolu...
diff --git a/sklearn/inspection/tests/test_partial_dependence.py b/sklearn/inspection/tests/test_partial_dependence.py --- a/sklearn/inspection/tests/test_partial_dependence.py +++ b/sklearn/inspection/tests/test_partial_dependence.py @@ -865,3 +865,19 @@ def test_partial_dependence_bunch_values_deprecated(): # ...
["sklearn/inspection/tests/test_partial_dependence.py::test_mixed_type_categorical"]
["sklearn/inspection/tests/test_partial_dependence.py::test_output_shape[average-features0-5-GradientBoostingClassifier-auto-data0]", "sklearn/inspection/tests/test_partial_dependence.py::test_output_shape[average-features0-5-GradientBoostingClassifier-auto-data1]", "sklearn/inspection/tests/test_partial_dependence.py:...
null
true
2023-03-07T11:33:16Z
1
14
1
944
0
0.8
1
0.55
1
0.204
80.987
6,968
swe_smith::train::4576
swe_smith
train
4,576
pygments__pygments.27649ebb.lm_rewrite__jdrsyprj
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
### AttributeError in Inform7Lexer and Inform6TemplateLexer Hello, I've encountered an issue with the `Inform7Lexer` and `Inform6TemplateLexer` after a recent update. It seems that the lexers are not handling options correctly, leading to an `AttributeError`. This error occurs when trying to use these lexers with spe...
diff --git a/pygments/lexers/int_fiction.py b/pygments/lexers/int_fiction.py index a7bc667..0115568 100644 --- a/pygments/lexers/int_fiction.py +++ b/pygments/lexers/int_fiction.py @@ -732,14 +732,11 @@ class Inform7Lexer(RegexLexer): tokens[level][token][:0] = [include('+i6t'), include(level)] ...
["tests/test_basic_api.py::test_lexer_options[Inform7Lexer]", "tests/test_basic_api.py::test_random_input[Inform7Lexer]", "tests/test_basic_api.py::test_random_input[Inform6TemplateLexer]", "tests/test_basic_api.py::test_lexer_options[Inform6TemplateLexer]", "tests/examplefiles/inform7/example.ni::", "tests/examplefile...
["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
9
7
1,244
0
0.6
1
0.75
1
0.237333
80.987
6,969
r2e_gym::train::4874
r2e_gym
train
4,874
numpy__1511c1f267c35b8e619b3b1c913f336ae7505910
numpy
numpy/numpy
python
1511c1f267c35b8e619b3b1c913f336ae7505910
**[ISSUE]** **Title:** Array Printing Misaligns Multi-line Element Representations **Description:** When array elements have multi-line string representations, the printed output of the array does not align the subsequent lines properly. This results in a misaligned and hard-to-read array format. **Example Code:** `...
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -695,7 +695,7 @@ def _extendLine(s, line, word, line_width, next_line_prefix, legacy): needs_wrap = len(line) + len(word) > line_width if legacy != '1.13': - s# don't wrap ...
diff --git a/numpy/core/tests/test_arrayprint.py b/numpy/core/tests/test_arrayprint.py --- a/numpy/core/tests/test_arrayprint.py +++ b/numpy/core/tests/test_arrayprint.py @@ -395,6 +395,37 @@ "[ 'xxxxx']" ) + def test_multiline_repr(self): + class MultiLine: + def __repr__(s...
null
null
namanjain12/numpy_final:1511c1f267c35b8e619b3b1c913f336ae7505910
true
null
1
31
null
1,516
0
0.75
1
0.6375
1
0.356
80.98675
6,970
swe_smith::train::51144
swe_smith
train
51,144
marshmallow-code__apispec.8b421526.func_basic__0t1lms67
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
Parameter reference resolution broken for path-level parameters #### Description When using path-level parameters with references, the parameter resolution is failing with a KeyError. The issue occurs when trying to resolve parameter references at the path level, causing the spec generation to break. #### Steps/Code...
diff --git a/src/apispec/core.py b/src/apispec/core.py index e9ccb40..c9c4e21 100644 --- a/src/apispec/core.py +++ b/src/apispec/core.py @@ -392,20 +392,22 @@ class Components: if "parameters" in path: parameters = [] for parameter in path["parameters"]: - parameter = s...
["tests/test_core.py::TestPath::test_path_called_twice_with_same_operations_parameters[2.0]", "tests/test_core.py::TestPath::test_path_called_twice_with_same_operations_parameters[3.0.0]", "tests/test_core.py::TestPath::test_global_parameters[2.0]", "tests/test_core.py::TestPath::test_global_parameters[3.0.0]", "tests/...
["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
8
8
1,263
0
0.6
1
0.75
1
0.237167
80.9865
6,971
swe_smith::train::9380
swe_smith
train
9,380
jaraco__inflect.c079a96a.func_pm_remove_cond__vgfifkfh
swesmith/jaraco__inflect.c079a96a
jaraco/inflect
python
null
Postprocess method breaks with NameError on result variable #### Description The `postprocess` method in the inflect engine is throwing a `NameError: name 'result' is not defined` when processing inflected words. This appears to affect various inflection operations including pluralization, comparison, and other word ...
diff --git a/inflect/__init__.py b/inflect/__init__.py index 3eef486..4fae6fd 100644 --- a/inflect/__init__.py +++ b/inflect/__init__.py @@ -2350,19 +2350,6 @@ class engine: def postprocess(self, orig: str, inflected) -> str: inflected = str(inflected) - if "|" in inflected: - word_opt...
["inflect/__init__.py::inflect.engine.compare", "inflect/__init__.py::inflect.engine.singular_noun", "tests/test_classical_all.py::Test::test_classical", "tests/test_classical_ancient.py::test_ancient_1", "tests/test_classical_herd.py::test_ancient_1", "tests/test_classical_names.py::test_ancient_1", "tests/test_classi...
["inflect/__init__.py::inflect.bysize", "inflect/__init__.py::inflect.engine._handle_long_compounds", "inflect/__init__.py::inflect.engine._handle_prepositional_phrase", "inflect/__init__.py::inflect.engine.ordinal", "inflect/__init__.py::inflect.joinstem", "tests/test_an.py::test_an", "tests/test_an.py::test_an_abbrev...
jyangballin/swesmith.x86_64.jaraco_1776_inflect.c079a96a
true
null
1
16
80
1,103
0
0.6
1
0.75
1
0.237167
80.9865
6,972
swe_smith::train::10646
swe_smith
train
10,646
paramiko__paramiko.23f92003.func_basic__wk9c2awk
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP chmod method fails with TypeError when using octal permissions #### Description When calling `sftp.chmod()` with octal permission values, the method raises a `TypeError: Expected unicode string, got int` error. This appears to affect any code that uses octal notation for file permissions. #### Steps/Code to Rep...
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 066cd83..09aa72f 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -534,10 +534,10 @@ class SFTPClient(BaseSFTP, ClosingContextManager): :param str path: path of the file to change the permissions of :param int mo...
["tests/test_sftp.py::TestSFTP::test_setstat", "tests/test_sftp_big.py::TestBigSFTP::test_lots_of_files"]
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
6
2
1,302
0
0.6
1
0.75
1
0.237
80.986
6,973
swe_smith::train::24473
swe_smith
train
24,473
sunpy__sunpy.f8edfd5c.combine_module__5up0xr1r
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Logic error in BasicRegistrationFactory when handling default widget type ## Description I found a bug in the `BasicRegistrationFactory` class where the logic for handling the default widget type is reversed. When no matches are found and I try to use a factory with a default widget type set, it raises a `NoMatchEr...
diff --git a/sunpy/util/datatype_factory_base.py b/sunpy/util/datatype_factory_base.py index 6c132c0..a890f5c 100644 --- a/sunpy/util/datatype_factory_base.py +++ b/sunpy/util/datatype_factory_base.py @@ -82,9 +82,9 @@ class BasicRegistrationFactory: if n_matches == 0: if self.default_widget_typ...
["sunpy/util/tests/test_datatype_factory_base.py::test_default_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_no_default_factory", "sunpy/util/tests/test_sysinfo.py::test_system_info"]
["sunpy/util/tests/test_datatype_factory_base.py::test_validation_fun_not_callable", "sunpy/util/tests/test_datatype_factory_base.py::test_with_external_registry", "sunpy/util/tests/test_datatype_factory_base.py::test_multiple_match_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_extra_validation_factor...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
2
10
3
1,222
0
0.6
1
0.75
1
0.237
80.986
6,974
swe_smith::train::7043
swe_smith
train
7,043
cantools__cantools.0c6a7871.combine_file__mzizz6rb
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
NamedSignalValue initialization broken - AttributeError on _comments #### Description When creating NamedSignalValue objects, an AttributeError is raised saying "'NamedSignalValue' object has no attribute '_comments'". This affects loading DBC files and other database operations. #### Steps/Code to Reproduce ```pyt...
diff --git a/src/cantools/database/namedsignalvalue.py b/src/cantools/database/namedsignalvalue.py index 89bface..e7ffb1c 100644 --- a/src/cantools/database/namedsignalvalue.py +++ b/src/cantools/database/namedsignalvalue.py @@ -15,14 +15,11 @@ class NamedSignalValue: name: str, comments: Optional[dic...
["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...
["tests/test_command_line.py::CanToolsCommandLineTest::test_decode_muxed_data", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_single_line_muxed_data", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_j1939", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_no_sender", "...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
19
187
1,042
0
0.6
1
0.75
1
0.237
80.986
6,975
swe_smith::train::5084
swe_smith
train
5,084
agronholm__exceptiongroup.0b4f4937.combine_module__0oguvz02
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
ExceptionGroup allows empty exceptions sequence #### Description When creating an ExceptionGroup with an empty sequence of exceptions, the constructor no longer raises a ValueError as expected. This allows creation of exception groups with no actual exceptions, which breaks the fundamental contract of exception group...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..29835af 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -65,10 +65,6 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): raise TypeError(f"argumen...
["tests/test_catch.py::test_catch_ungrouped", "tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_catch.py::test_catch_no_match", "tests/test_catch.py::test_bare_raise_in_handler", "tests/test_catch.py::test_catch_subclass", "tests/test_catch.py::test_bare_reraise_from_n...
["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio...
jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937
true
null
2
10
36
1,222
0
0.6
1
0.75
1
0.237
80.986
6,976
swe_smith::train::43929
swe_smith
train
43,929
pydata__patsy.a5d16484.func_basic__72977l3q
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
NAAction constructor swaps on_NA parameter values #### Description When creating an NAAction object, the `on_NA` parameter gets its value swapped - passing "drop" results in "raise" behavior and vice versa. #### Steps/Code to Reproduce ```python from patsy.missing import NAAction # This should create an action tha...
diff --git a/patsy/missing.py b/patsy/missing.py index b4d8a01..4dc9051 100644 --- a/patsy/missing.py +++ b/patsy/missing.py @@ -105,17 +105,17 @@ class NAAction(object): .. versionadded:: 0.2.0 """ - self.on_NA = on_NA + self.on_NA = "raise" if on_NA == "drop" else "drop" if ...
["patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__examine_factor_types", "patsy/categorical.py::test_CategoricalSniffer", "patsy/categorical.py::test_categorical_to_int", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_c...
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/builtins.py::test_I", "patsy/builtins.py::test_Q", "patsy/categorical.py::test_C", "patsy/categorical.py::test_gue...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
10
43
1,222
0
0.6
1
0.75
1
0.237
80.986
6,977
swe_smith::train::18531
swe_smith
train
18,531
HIPS__autograd.ac044f0d.lm_rewrite__g4kzefby
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
ConstGraphNode TypeError in const_graph_unary Function Description After the recent changes, it seems that the `const_graph_unary` function in `autograd/misc/tracers.py` is causing a `TypeError`. The error message indicates an issue with the operation on the input arguments, which suggests that the function might not...
diff --git a/autograd/misc/tracers.py b/autograd/misc/tracers.py index 20dd555..0d50833 100644 --- a/autograd/misc/tracers.py +++ b/autograd/misc/tracers.py @@ -27,20 +27,15 @@ def const_graph_unary(fun): _fun = [fun] # Allow fun to be freed, since it may have bound args def maybe_cached_fun(x): - i...
["tests/test_misc.py::test_const_graph", "tests/test_misc.py::test_const_graph_args"]
["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
23
2
962
0
0.6
1
0.75
1
0.237
80.986
6,978
r2e_gym::train::4311
r2e_gym
train
4,311
numpy__6fb5327de77bed842c7583ab1ad70335044b7d87
numpy
numpy/numpy
python
6fb5327de77bed842c7583ab1ad70335044b7d87
**Title:** `array2string` Raises `NameError` Due to Undefined `floatmode` Parameter **Description:** When using the `array2string` function to generate a string representation of an array, a `NameError` is raised because the `floatmode` parameter is not defined. This issue primarily affects the formatting of 0-dimensi...
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -170,10 +170,9 @@ represented with an equal number of fewer digits, use that many digits for all elements. legacy : boolean, optional - ...
diff --git a/numpy/core/tests/test_arrayprint.py b/numpy/core/tests/test_arrayprint.py --- a/numpy/core/tests/test_arrayprint.py +++ b/numpy/core/tests/test_arrayprint.py @@ -5,7 +5,7 @@ import numpy as np from numpy.testing import ( - run_module_suite, assert_, assert_equal, assert_raises + run_module_suit...
null
null
namanjain12/numpy_final:6fb5327de77bed842c7583ab1ad70335044b7d87
true
null
1
62
null
894
0
0.75
1
0.6375
1
0.355667
80.98575
6,979
swe_smith::train::36492
swe_smith
train
36,492
lincolnloop__python-qrcode.456b01d4.combine_file__y0h50vf1
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QRCode generation fails with TypeError when creating modules matrix #### Description When trying to generate QR codes, the library throws a `TypeError: can only concatenate str (not "int") to str` error during the QR code creation process. This affects all QR code generation functionality. #### Steps/Code to Reprodu...
diff --git a/qrcode/main.py b/qrcode/main.py index 46116b5..496b427 100644 --- a/qrcode/main.py +++ b/qrcode/main.py @@ -163,32 +163,32 @@ class QRCode(Generic[GenericImage]): self.makeImpl(False, self.mask_pattern) def makeImpl(self, test, mask_pattern): - self.modules_count = self.version *...
["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_overflow", "qrcode/tests/test_qrcode.py::test_add_qrdata", "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qr...
["qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_make_image_with_wrong_pattern", "qrcode/tests/test_qrcode.py::test_mask_pattern_setter", "qrcode/tests/test_qrcode.py::test_qrcode_bad_factory", "qrcode/tests/test_qrcode.py::test...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
22
58
981
0
0.6
1
0.75
1
0.236833
80.9855
6,980
swe_smith::train::999
swe_smith
train
999
pytest-dev__iniconfig.16793ead.combine_module__sxsvwi72
swesmith/pytest-dev__iniconfig.16793ead
pytest-dev/iniconfig
python
null
TypeError when parsing INI files with unexpected lines Description When parsing INI files with unexpected lines, the parser raises a TypeError instead of a proper ParseError. This happens because the error message formatting uses the division operator (`/`) instead of string formatting with `%` or an f-string. For e...
diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py index 3c40bc9..31ce660 100644 --- a/src/iniconfig/__init__.py +++ b/src/iniconfig/__init__.py @@ -122,23 +122,6 @@ class IniConfig: self._sources = {} sections_data: dict[str, dict[str, str]] self.sections = sections_data = {}...
["testing/test_iniconfig.py::test_error_on_weird_lines[!!]", "testing/test_iniconfig.py::test_iniconfig_from_file", "testing/test_iniconfig.py::test_iniconfig_section_first", "testing/test_iniconfig.py::test_iniconig_section_duplicate_fails", "testing/test_iniconfig.py::test_iniconfig_duplicate_key_fails", "testing/tes...
["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
20
14
1,021
0
0.6
1
0.75
1
0.236833
80.9855
6,981
swe_smith::train::23930
swe_smith
train
23,930
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__3uyu9xkh
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
AttributeError when setting WCS auxiliary observer coordinates with Heliocentric frame #### Description When trying to set WCS auxiliary observer coordinates using `_set_wcs_aux_obs_coord` with a Heliocentric frame, an AttributeError is raised because the function tries to access the `radius` attribute before checkin...
diff --git a/sunpy/coordinates/wcs_utils.py b/sunpy/coordinates/wcs_utils.py index 72706d7..a54fd55 100644 --- a/sunpy/coordinates/wcs_utils.py +++ b/sunpy/coordinates/wcs_utils.py @@ -123,6 +123,9 @@ def _sunpy_frame_class_from_ctypes(ctypes): def _set_wcs_aux_obs_coord(wcs, obs_frame): + # Sometimes obs_coord...
["sunpy/coordinates/tests/test_wcs_utils.py::test_set_wcs_aux"]
["sunpy/coordinates/tests/test_wcs_utils.py::test_wcs_frame_mapping[ctype0-Helioprojective]", "sunpy/coordinates/tests/test_wcs_utils.py::test_wcs_frame_mapping[ctype1-Helioprojective]", "sunpy/coordinates/tests/test_wcs_utils.py::test_wcs_frame_mapping[ctype2-HeliographicStonyhurst]", "sunpy/coordinates/tests/test_wcs...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
9
1
1,241
0
0.6
1
0.75
1
0.236833
80.9855
6,982
swe_smith::train::48605
swe_smith
train
48,605
sqlfluff__sqlfluff.50a1c4b6.pr_5101
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
# PlaceholderTemplater fails when parameter is not in context ## Description When using the PlaceholderTemplater, if a parameter is not found in the context, it should be replaced with the parameter name itself. However, the current implementation raises a KeyError exception instead. For example, when using a query ...
diff --git a/src/sqlfluff/core/templaters/placeholder.py b/src/sqlfluff/core/templaters/placeholder.py index de708a8..9d63523 100644 --- a/src/sqlfluff/core/templaters/placeholder.py +++ b/src/sqlfluff/core/templaters/placeholder.py @@ -156,13 +156,14 @@ class PlaceholderTemplater(RawTemplater): else: ...
["test/core/templaters/placeholder_test.py::test__templater_param_style[colon_quoted]", "test/core/templaters/placeholder_test.py::test__templater_param_style[params_not_specified]"]
["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
21
2
1,001
0
0.6
1
0.75
1
0.236833
80.9855
6,983
swe_smith::train::43805
swe_smith
train
43,805
pydata__patsy.a5d16484.combine_file__m9o187s6
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
DesignMatrix creation fails with dimension validation error When creating DesignMatrix objects, the dimension validation logic appears to be inverted, causing valid 2D arrays to be rejected. #### Steps/Code to Reproduce ```python import numpy as np from patsy import dmatrix # Simple case that should work data = {'x...
diff --git a/patsy/design_info.py b/patsy/design_info.py index d94b97a..35c6944 100644 --- a/patsy/design_info.py +++ b/patsy/design_info.py @@ -702,15 +702,15 @@ class DesignInfo(object): array_like.design_info, cls ): return array_like.design_info - arr = atleast_2d_column_de...
["patsy/design_info.py::test_DesignInfo_from_array", "patsy/design_info.py::test_design_matrix", "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::t...
["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
30
34
821
0
0.6
1
0.75
1
0.236833
80.9855
6,984
swe_smith::train::45168
swe_smith
train
45,168
modin-project__modin.8c7799fd.func_pm_remove_cond__kqk4x2nk
swesmith/modin-project__modin.8c7799fd
modin-project/modin
python
null
Array.mean() raises UnboundLocalError when called without where parameter #### Description When calling the `mean()` method on a modin numpy array without specifying a `where` parameter, an `UnboundLocalError` is raised because the `result` variable is referenced before assignment. #### Steps/Code to Reproduce ```p...
diff --git a/modin/numpy/arr.py b/modin/numpy/arr.py index ab40eca..7133da5 100644 --- a/modin/numpy/arr.py +++ b/modin/numpy/arr.py @@ -1417,12 +1417,6 @@ class array(object): if self._ndim == 1: if apply_axis == 1: raise numpy.AxisError(1, 1) - if isinstance(where, ar...
["modin/tests/numpy/test_array_axis_functions.py::test_mean"]
["modin/tests/numpy/test_array.py::test_shape[100]", "modin/tests/numpy/test_array.py::test_shape[size1]", "modin/tests/numpy/test_array.py::test_shape[size2]", "modin/tests/numpy/test_array.py::test_shape[size3]", "modin/tests/numpy/test_array.py::test_shape[size4]", "modin/tests/numpy/test_array.py::test_dtype", "mod...
jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd
true
null
1
13
1
1,161
0
0.6
1
0.75
1
0.236833
80.9855
6,985
swe_smith::train::1759
swe_smith
train
1,759
agronholm__typeguard.b6a7e438.func_basic__6yo0fcfo
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
TYPE_CHECKING blocks not properly handled causing NameError exceptions #### Description When using `typing.TYPE_CHECKING` blocks in code, typeguard is not correctly handling the conditional imports and type annotations, leading to `NameError` exceptions at runtime for names that should only be available during type c...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..ed24afb 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -1203,12 +1203,12 @@ class TypeguardTransformer(NodeTransformer): self.generic_visit(node) if ( - self._memo ...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_instrumentation.py::TestGuardedType::test_plain[typechecked]", "tests/test_instrumentation.py::TestGuardedType::test_subscript_toplevel[typechecked]", "tests/test_instrumentation.py::TestGuardedType::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
10
16
1,220
0
0.6
1
0.75
1
0.236667
80.985
6,986
swe_smith::train::52477
swe_smith
train
52,477
pydicom__pydicom.7d361b3d.func_pm_remove_assign__87vusoy5
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
NameError in decompress function when accessing undefined variables #### Description The `decompress` function in `src/pydicom/pixels/utils.py` is raising `NameError` exceptions due to undefined variables being referenced after recent code changes. #### Steps/Code to Reproduce ```python import pydicom from pydicom....
diff --git a/src/pydicom/pixels/utils.py b/src/pydicom/pixels/utils.py index f9a31a8..28a29e9 100644 --- a/src/pydicom/pixels/utils.py +++ b/src/pydicom/pixels/utils.py @@ -607,8 +607,6 @@ def decompress( raise AttributeError( "Unable to decompress as the dataset has no (7FE0,0010) 'Pixel Data' el...
["tests/pixels/test_utils.py::TestDecompress::test_no_file_meta_raises", "tests/pixels/test_utils.py::TestDecompress::test_uncompressed_raises", "tests/pixels/test_utils.py::TestDecompress::test_no_decoders_raises", "tests/test_numpy_pixel_data.py::TestNoNumpy_NoNumpyHandler::test_using_numpy_handler_raises", "tests/te...
["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
12
5
1,180
0
0.6
1
0.75
1
0.236667
80.985
6,987
swe_smith::train::5761
swe_smith
train
5,761
luozhouyang__python-string-similarity.115acaac.func_basic__3yir7e7s
swesmith/luozhouyang__python-string-similarity.115acaac
luozhouyang/python-string-similarity
python
null
OverlapCoefficient similarity calculation is incorrect Description The OverlapCoefficient similarity calculation is not working correctly. I found several issues with the implementation: 1. When two strings are identical, the similarity returns 0.0 instead of 1.0 2. The error messages for None arguments are swapped ...
diff --git a/strsimpy/overlap_coefficient.py b/strsimpy/overlap_coefficient.py index 39edc96..1d12709 100644 --- a/strsimpy/overlap_coefficient.py +++ b/strsimpy/overlap_coefficient.py @@ -13,16 +13,16 @@ class OverlapCoefficient(ShingleBased, NormalizedStringDistance, NormalizedStrin def similarity(self, s0, s1...
["strsimpy/overlap_coefficient_test.py::TestOverlapCoefficient::test_overlap_coefficient_onestringissubset_return1", "strsimpy/overlap_coefficient_test.py::TestOverlapCoefficient::test_overlap_coefficient_onestringissubsetofother_return0", "strsimpy/overlap_coefficient_test.py::TestOverlapCoefficient::test_overlap_coef...
["strsimpy/cosine_test.py::TestCosine::test_cosine", "strsimpy/damerau_test.py::TestDamerau::test_damerau", "strsimpy/jaccard_test.py::TestJaccard::test_jaccard", "strsimpy/jaro_winkler_test.py::TestJaroWinkler::test_jarowinkler", "strsimpy/levenshtein_test.py::TestLevenshtein::test_levenshtein", "strsimpy/longest_comm...
jyangballin/swesmith.x86_64.luozhouyang_1776_python-string-similarity.115acaac
true
null
1
10
3
1,220
0
0.6
1
0.75
1
0.236667
80.985
6,988
swe_smith::train::2188
swe_smith
train
2,188
pdfminer__pdfminer.six.1a8bd2f7.func_basic__i664aqbh
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
Plane.add() method breaks object placement and tracking #### Description The `Plane.add()` method in `pdfminer/utils.py` has incorrect logic that prevents objects from being properly added to the spatial grid and tracking structures. When trying to add objects to a Plane, they are not being stored correctly, causing ...
diff --git a/pdfminer/utils.py b/pdfminer/utils.py index a5b5385..cfa3b13 100644 --- a/pdfminer/utils.py +++ b/pdfminer/utils.py @@ -740,14 +740,14 @@ class Plane(Generic[LTComponentT]): def add(self, obj: LTComponentT) -> None: """Place an object.""" for k in self._getrange((obj.x0, obj.y0, obj....
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
8
60
1,260
0
0.6
1
0.75
1
0.236667
80.985
6,989
swe_smith::train::17946
swe_smith
train
17,946
pyasn1__pyasn1.0f07d724.func_pm_remove_assign__4m4vrcpo
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
CER/DER encoder fails with NameError for undefined variables #### Description The CER and DER encoders are throwing NameError exceptions when encoding SET types due to undefined variables in the encoding logic. #### Steps/Code to Reproduce ```python from pyasn1.type import univ, namedtype from pyasn1.codec.cer impo...
diff --git a/pyasn1/codec/cer/encoder.py b/pyasn1/codec/cer/encoder.py index e16e9ec..dc44858 100644 --- a/pyasn1/codec/cer/encoder.py +++ b/pyasn1/codec/cer/encoder.py @@ -163,14 +163,10 @@ class SetEncoder(encoder.SequenceEncoder): def encodeValue(self, value, asn1Spec, encodeFun, **options): - substr...
["tests/codec/cer/test_encoder.py::SetEncoderTestCase::testIndefMode", "tests/codec/cer/test_encoder.py::SetEncoderTestCase::testWithDefaultedIndefMode", "tests/codec/cer/test_encoder.py::SetEncoderTestCase::testWithOptionalAndDefaultedIndefMode", "tests/codec/cer/test_encoder.py::SetEncoderTestCase::testWithOptionalIn...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
8
15
1,260
0
0.6
1
0.75
1
0.236667
80.985
6,990
swe_smith::train::9476
swe_smith
train
9,476
marshmallow-code__webargs.dbde72fe.combine_file__9i964e6a
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
Nested field initialization broken with dict schemas #### Description When creating a Nested field with a dictionary schema, the field fails to initialize properly. The Nested field should accept dict schemas and convert them using `ma.Schema.from_dict()`, but this functionality appears to be broken. #### Steps/Code...
diff --git a/src/webargs/fields.py b/src/webargs/fields.py index edd670e..bdc9a18 100644 --- a/src/webargs/fields.py +++ b/src/webargs/fields.py @@ -45,9 +45,9 @@ class Nested(ma.fields.Nested): # type: ignore[no-redef] """ def __init__(self, nested, *args, **kwargs): - if isinstance(nested, dict): ...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_nested_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_nested_many_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_nested_many_missing", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_nested_many_with_data_key", "t...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T...
jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe
true
null
1
22
43
980
0
0.6
1
0.75
1
0.236667
80.985
6,991
swe_smith::train::25698
swe_smith
train
25,698
pylint-dev__astroid.b114f6b5.func_basic__i14webd9
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
BoolOp nodes return None instead of proper node instance #### Description When parsing boolean operations (and/or expressions), the AST rebuilder is returning None instead of the expected BoolOp node instance. This causes AttributeError exceptions throughout the codebase when trying to access attributes or methods on...
diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py index 4c77906..067a703 100644 --- a/astroid/rebuilder.py +++ b/astroid/rebuilder.py @@ -743,13 +743,13 @@ class TreeRebuilder: newnode = nodes.BoolOp( op=self._parser_module.bool_op_classes[type(node.op)], lineno=node.lineno, - ...
["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_mul...
["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
8
124
1,260
0
0.6
1
0.75
1
0.236667
80.985
6,992
swe_smith::train::32764
swe_smith
train
32,764
pydantic__pydantic.acb0f10f.lm_rewrite__6mi17gxa
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# [Bug]: TypeError when using PrivateAttr with default value ## Description When using `PrivateAttr` with a default value, I'm getting a TypeError. It seems like there's an issue with how the parameters are passed to `ModelPrivateAttr`. ## Code for reproduction ```python from pydantic import BaseModel, PrivateAttr ...
diff --git a/pydantic/fields.py b/pydantic/fields.py index 7081292..d47f67d 100644 --- a/pydantic/fields.py +++ b/pydantic/fields.py @@ -1208,12 +1208,8 @@ def PrivateAttr( *, init: Literal[False] = False, ) -> Any: ... -def PrivateAttr( - default: Any = PydanticUndefined, - *, - default_factory: Ca...
["tests/test_docs.py::test_docstrings_examples[pydantic/fields.py:1350-1364]", "tests/test_docs.py::test_docstrings_examples[pydantic/fields.py:1378-1411]", "tests/test_docs.py::test_docstrings_examples[pydantic/fields.py:1418-1437]", "tests/test_docs.py::test_docstrings_examples[pydantic/fields.py:1441-1462]", "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
18
5
1,059
0
0.6
1
0.75
1
0.2365
80.9845
6,993
swe_smith::train::24796
swe_smith
train
24,796
marshmallow-code__marshmallow.9716fc62.func_basic__xnxp84t9
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
TimeDelta field deserialization broken with incorrect kwargs handling #### Description The TimeDelta field is not deserializing values correctly. When deserializing a simple numeric value like '42', it's returning a timedelta with 42 days instead of 42 seconds as expected. #### Steps/Code to Reproduce ```python fro...
diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index e83ba19..bfac475 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -1530,12 +1530,12 @@ class TimeDelta(Field): except (TypeError, ValueError) as error: raise self.make_error("invalid") from error - ...
["tests/test_deserialization.py::TestFieldDeserialization::test_timedelta_field_deserialization", "tests/test_deserialization.py::TestFieldDeserialization::test_invalid_timedelta_field_deserialization[9999999999]"]
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
8
2
1,259
0
0.6
1
0.75
1
0.2365
80.9845
6,994
swe_smith::train::18200
swe_smith
train
18,200
msiemens__tinydb.10644a0e.combine_file__sbnmrj18
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
LRUCache __len__ returns incorrect value When using TinyDB's query caching functionality, the LRUCache's `__len__` method returns an incorrect value that is one less than the actual cache size. This causes issues with cache size validation and query cache behavior. #### Steps/Code to Reproduce ```python from tinydb ...
diff --git a/tinydb/utils.py b/tinydb/utils.py index e1f01fb..e5fa0a5 100644 --- a/tinydb/utils.py +++ b/tinydb/utils.py @@ -66,7 +66,7 @@ class LRUCache(abc.MutableMapping, Generic[K, V]): self.cache.clear() def __len__(self) -> int: - return self.length + return self.length - 1 de...
["tests/test_tables.py::test_query_cache_with_mutable_callable[memory]", "tests/test_tables.py::test_query_cache_with_mutable_callable[json]", "tests/test_tables.py::test_zero_cache_size[memory]", "tests/test_tables.py::test_zero_cache_size[json]", "tests/test_tables.py::test_query_cache_size[memory]", "tests/test_tabl...
["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
10
14
1,219
0
0.6
1
0.75
1
0.2365
80.9845
6,995
swe_smith::train::52759
swe_smith
train
52,759
pydicom__pydicom.7d361b3d.lm_rewrite__zie8wuv4
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Issue: Unexpected Behavior in `reading_validation_mode` with Enforced Valid Values #### Description When using the `reading_validation_mode` property in conjunction with enforced valid values, the behavior deviates from the expected outcome. Specifically, when `enforce_valid_values` is set, the `reading_validatio...
diff --git a/src/pydicom/config.py b/src/pydicom/config.py index b2a5d58..84ff2c5 100644 --- a/src/pydicom/config.py +++ b/src/pydicom/config.py @@ -274,7 +274,7 @@ class Settings: self._buffered_read_size = size @property - def reading_validation_mode(self) -> int: + def reading_validation_mode(s...
["tests/test_config.py::TestSettings::test_reading_validation_mode_with_enforce_valid_values"]
["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
6
1
1,299
0
0.6
1
0.75
1
0.2365
80.9845
6,996
swe_smith::train::20230
swe_smith
train
20,230
gruns__furl.da386f68.func_basic__9363y9pt
swesmith/gruns__furl.da386f68
gruns/furl
python
null
Path.add() returns None instead of self after recent changes #### Description The `Path.add()` method is now returning `None` instead of returning `self`, breaking method chaining and existing code that expects the method to return the Path instance. #### Steps/Code to Reproduce ```python from furl import furl # T...
diff --git a/furl/furl.py b/furl/furl.py index cd6d710..f9bdc82 100644 --- a/furl/furl.py +++ b/furl/furl.py @@ -532,25 +532,25 @@ class Path(object): Returns: <self>. """ - if quacks_like_a_path_with_segments(path): # Path interface. + if is_iterable_but_not_string(path): # List int...
["tests/test_furl.py::TestPath::test_add", "tests/test_furl.py::TestPath::test_itruediv", "tests/test_furl.py::TestPath::test_truediv", "tests/test_furl.py::TestFragment::test_add", "tests/test_furl.py::TestFurl::test_add", "tests/test_furl.py::TestFurl::test_path_itruediv", "tests/test_furl.py::TestFurl::test_path_tru...
["tests/test_furl.py::TestPath::test_asdict", "tests/test_furl.py::TestPath::test_encoding", "tests/test_furl.py::TestPath::test_equality", "tests/test_furl.py::TestPath::test_isabsolute", "tests/test_furl.py::TestPath::test_isdir_isfile", "tests/test_furl.py::TestPath::test_leading_slash", "tests/test_furl.py::TestPat...
jyangballin/swesmith.x86_64.gruns_1776_furl.da386f68
true
null
1
20
8
1,019
0
0.6
1
0.75
1
0.2365
80.9845
6,997
swe_smith::train::18099
swe_smith
train
18,099
pndurette__gTTS.dbcda4f3.combine_module__d8rwge87
swesmith/pndurette__gTTS.dbcda4f3
pndurette/gtts
python
null
Tokenizer silently fails when given invalid parameters I'm trying to use the Tokenizer class in my project and noticed some strange behavior. When I pass invalid parameters to the Tokenizer constructor, it silently fails instead of raising an error. For example: ```python from gtts.tokenizer.core import Tokenizer #...
diff --git a/gtts/tokenizer/core.py b/gtts/tokenizer/core.py index d7e0a4e..d2e0f64 100644 --- a/gtts/tokenizer/core.py +++ b/gtts/tokenizer/core.py @@ -294,11 +294,8 @@ class Tokenizer: try: # Combine self.total_regex = self._combine_regex() - except (TypeError, AttributeError...
["gtts/tokenizer/tests/test_core.py::TestTokenizer::test_bad_params_not_callable", "gtts/tokenizer/tests/test_core.py::TestTokenizer::test_bad_params_not_callable_returning_regex", "gtts/tokenizer/tests/test_core.py::TestTokenizer::test_bad_params_not_list"]
["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
2
11
3
1,199
0
0.6
1
0.75
1
0.2365
80.9845
6,998
swe_smith::train::24972
swe_smith
train
24,972
pylint-dev__astroid.b114f6b5.combine_file__3mvm6j0q
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
AstroidError string formatting broken with positional arguments #### Description When creating AstroidError instances, the string formatting in `__str__` method fails when using positional arguments instead of keyword arguments. #### Steps/Code to Reproduce ```python from astroid.exceptions import AstroidError # T...
diff --git a/astroid/exceptions.py b/astroid/exceptions.py index 126acb9..dc124c9 100644 --- a/astroid/exceptions.py +++ b/astroid/exceptions.py @@ -64,7 +64,7 @@ class AstroidError(Exception): setattr(self, key, value) def __str__(self) -> str: - return self.message.format(**vars(self)) + ...
["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_mul...
["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
10
47
1,218
0
0.6
1
0.75
1
0.236333
80.984
6,999
swe_smith::train::46755
swe_smith
train
46,755
python-trio__trio.cfbbe2c1.combine_module__ozdo3tv0
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
System tasks not inheriting context properly #### Description System tasks spawned with `spawn_system_task` are not properly inheriting the context from their parent task. This causes context variables to have unexpected values in system tasks. #### Steps/Code to Reproduce ```python import contextvars import trio ...
diff --git a/src/trio/_core/_parking_lot.py b/src/trio/_core/_parking_lot.py index af6ff61..bccd3fb 100644 --- a/src/trio/_core/_parking_lot.py +++ b/src/trio/_core/_parking_lot.py @@ -314,4 +314,4 @@ class ParkingLot: :meth:`park` method. """ - return ParkingLotStatistics(tasks_waiting=len...
["src/trio/_core/_tests/test_parking_lot.py::test_parking_lot_basic", "src/trio/_core/_tests/test_run.py::test_spawn_system_task", "src/trio/_core/_tests/test_run.py::test_system_task_contexts", "src/trio/_core/_tests/test_unbounded_queue.py::test_UnboundedQueue_basic", "src/trio/_core/_tests/test_unbounded_queue.py::t...
["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
8
6
1,258
0
0.6
1
0.75
1
0.236333
80.984