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,500
swe_smith::train::35428
swe_smith
train
35,428
alecthomas__voluptuous.a7a55f83.lm_rewrite__9e2nb1af
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
SomeOf validator doesn't enforce parameter requirements Description When creating a SomeOf validator without specifying either min_valid or max_valid parameters, the validator should raise an AssertionError. However, this validation check appears to be missing in the current implementation. For example, the followin...
diff --git a/voluptuous/validators.py b/voluptuous/validators.py index 3f026b1..e8c065e 100644 --- a/voluptuous/validators.py +++ b/voluptuous/validators.py @@ -1202,21 +1202,11 @@ class SomeOf(_WithSubValidators): ... validate(6.2) """ - def __init__( - self, - validators: typing.List[...
["voluptuous/tests/tests.py::test_SomeOf_on_bounds_assertion"]
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests....
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
18
1
1,162
0
0.6
1
0.75
1
0.253667
81.036
6,501
swe_smith::train::998
swe_smith
train
998
pytest-dev__iniconfig.16793ead.combine_module__qvvm0oht
swesmith/pytest-dev__iniconfig.16793ead
pytest-dev/iniconfig
python
null
SectionWrapper constructor arguments swapped causing AttributeError When creating a SectionWrapper instance, the config and name arguments appear to be swapped in the constructor, causing various AttributeError exceptions when trying to access section properties. #### Steps/Code to Reproduce ```python from iniconfig...
diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py index 3c40bc9..b0ca9a6 100644 --- a/src/iniconfig/__init__.py +++ b/src/iniconfig/__init__.py @@ -37,8 +37,8 @@ class SectionWrapper: name: Final[str] def __init__(self, config: IniConfig, name: str) -> None: - self.config = config - ...
["testing/test_iniconfig.py::test_ParseError", "testing/test_iniconfig.py::test_continuation_needs_perceeding_token", "testing/test_iniconfig.py::test_continuation_cant_be_after_section", "testing/test_iniconfig.py::test_section_cant_be_empty", "testing/test_iniconfig.py::test_iniconfig_section_first", "testing/test_in...
["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_error_on_weird_lines[!!]", "...
jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead
true
null
2
25
13
1,022
0
0.6
1
0.75
1
0.253667
81.036
6,502
swe_smith::train::46585
swe_smith
train
46,585
python-trio__trio.cfbbe2c1.combine_file__942zqv3e
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Socket operations failing after recent changes #### Description Socket operations are not working correctly. When trying to use basic socket functionality, various errors are occurring including `TypeError` exceptions and incorrect behavior with socket shutdown operations. #### Steps/Code to Reproduce ```python imp...
diff --git a/src/trio/_socket.py b/src/trio/_socket.py index 259992b..e6dcdec 100644 --- a/src/trio/_socket.py +++ b/src/trio/_socket.py @@ -69,10 +69,10 @@ class _try_sync: self._blocking_exc_override = blocking_exc_override def _is_blocking_io_error(self, exc: BaseException) -> bool: - if self....
["src/trio/_core/_tests/test_guest_mode.py::test_guest_can_do_io", "src/trio/_tests/test_dtls.py::test_smoke[ipv4]", "src/trio/_tests/test_dtls.py::test_smoke[ipv6]", "src/trio/_tests/test_dtls.py::test_implicit_handshake", "src/trio/_tests/test_dtls.py::test_full_duplex", "src/trio/_tests/test_dtls.py::test_channel_cl...
["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
14
89
1,242
0
0.6
1
0.75
1
0.253667
81.036
6,503
swe_smith::train::2450
swe_smith
train
2,450
pdfminer__pdfminer.six.1a8bd2f7.func_pm_ctrl_shuffle__g6g95t53
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDF encryption key computation broken due to variable ordering #### Description When processing encrypted PDF files, the encryption key computation algorithm is producing incorrect results due to variables being used before they are properly initialized. This affects the ability to decrypt and extract content from pa...
diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py index 1c06335..2631c8c 100644 --- a/pdfminer/pdfdocument.py +++ b/pdfminer/pdfdocument.py @@ -391,22 +391,21 @@ class PDFStandardSecurityHandler: def compute_encryption_key(self, password: bytes) -> bytes: # Algorithm 3.2 password = (...
["tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_625_identity_cmap", "tests/test_pdfdocument.py::TestPdfDocument::test_encrypted_no_id", "tests/test_tools_dumppdf.py::TestDumpPDF::test_2", "tests/test_tools_dumppdf.py::TestDumpPDF::test_5", "tests...
["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_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
19
14
1,142
0
0.6
1
0.75
1
0.253667
81.036
6,504
swe_smith::train::43968
swe_smith
train
43,968
pydata__patsy.a5d16484.func_basic__b4wenx11
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
FactorInfo constructor validation broken after recent changes Description The FactorInfo class seems to have issues with its constructor validation. When creating FactorInfo instances with specific parameters, the validation logic appears to be inconsistent with expected behavior. Steps/Code to Reproduce ```python ...
diff --git a/patsy/design_info.py b/patsy/design_info.py index d94b97a..bd08697 100644 --- a/patsy/design_info.py +++ b/patsy/design_info.py @@ -132,36 +132,34 @@ def test_FactorInfo(): fi1 = FactorInfo("asdf", "numerical", {"a": 1}, num_columns=10) assert fi1.factor == "asdf" assert fi1.state == {"a": 1...
["patsy/design_info.py::test_FactorInfo"]
["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
24
1
1,042
0
0.6
1
0.75
1
0.253667
81.036
6,505
swe_smith::train::27934
swe_smith
train
27,934
jsvine__pdfplumber.02ff4313.func_pm_op_swap__gqvi20ec
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
Table extraction fails with incorrect intersection detection #### Description When extracting tables from PDFs, the intersection detection logic in `edges_to_intersections` produces incorrect results, causing table extraction to fail or return wrong cell boundaries. #### Steps/Code to Reproduce ```python import pdf...
diff --git a/pdfplumber/table.py b/pdfplumber/table.py index 0ba4445..c018321 100644 --- a/pdfplumber/table.py +++ b/pdfplumber/table.py @@ -218,9 +218,9 @@ def edges_to_intersections( for v in sorted(v_edges, key=itemgetter("x0", "top")): for h in sorted(h_edges, key=itemgetter("top", "x0")): ...
["tests/test_issues.py::Test::test_issue_140", "tests/test_table.py::Test::test_edges_strict", "tests/test_table.py::Test::test_issue_466_mixed_strategy", "tests/test_table.py::Test::test_order", "tests/test_table.py::Test::test_rows_and_columns"]
["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
7
5
1,382
0
0.6
1
0.75
1
0.253667
81.036
6,506
swe_smith::train::3227
swe_smith
train
3,227
Suor__funcy.207a7810.func_pm_remove_cond__cirspa75
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# arggetter function in decorators.py is broken I found a bug in the `arggetter` function in `decorators.py`. The function is missing several important code blocks that handle various argument types. ## Description When using decorators that need to access function arguments, the code fails in several scenarios: ``...
diff --git a/funcy/decorators.py b/funcy/decorators.py index e001629..afd62dc 100644 --- a/funcy/decorators.py +++ b/funcy/decorators.py @@ -147,15 +147,6 @@ def arggetter(func, _cache={}): return args[index] elif name in kwargs and name in kwnames: return kwargs[name] - elif n...
["tests/test_decorators.py::test_decorator_access_args", "tests/test_decorators.py::test_double_decorator_defaults"]
["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_make_lookuper_nested", "tests/test_cal...
jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810
true
null
1
9
2
1,342
0
0.6
1
0.75
1
0.253667
81.036
6,507
swe_smith::train::51952
swe_smith
train
51,952
pydicom__pydicom.7d361b3d.func_basic__ez57eo04
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
generate_filename function produces incorrect output with wrong validation #### Description The `generate_filename` function in `fileset.py` is not working correctly. It's generating filenames with wrong patterns and the validation logic seems broken. #### Steps/Code to Reproduce ```python from pydicom.fileset impo...
diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py index 75976eb..add71cc 100644 --- a/src/pydicom/fileset.py +++ b/src/pydicom/fileset.py @@ -106,17 +106,17 @@ def generate_filename( the previous one (i.e. ``'00000000'``, ``'00000001'``, ``'00000002'``, and so on). """ - if len(pref...
["tests/test_fileset.py::TestGenerateFilename::test_numeric", "tests/test_fileset.py::TestGenerateFilename::test_numeric_prefix", "tests/test_fileset.py::TestGenerateFilename::test_numeric_start", "tests/test_fileset.py::TestGenerateFilename::test_alphanumeric", "tests/test_fileset.py::TestGenerateFilename::test_alphan...
["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
16
7
1,202
0
0.6
1
0.75
1
0.253667
81.036
6,508
swe_smith::train::18228
swe_smith
train
18,228
msiemens__tinydb.10644a0e.func_basic__7jo42mey
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Table returns error dict instead of empty dict when table doesn't exist When trying to access a table that doesn't exist or when the database is empty, the `_get_table` method now returns `{"error": "Table not found"}` instead of an empty dict `{}`. This breaks existing functionality that expects an empty dict for non...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..c249d4e 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -704,21 +704,16 @@ class Table: only one document for example. """ - # Retrieve the tables from the storage tables = self._storage.read() - if tables i...
["tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_json_write", "tests/test_storages.py::test_json_kwargs", "tests/test_storages.py::test_json_readwrite", "tests/test_storages.py::test_json_read", "tests/test_storages.py::test_in_memory_close", "tests/test_storages.py::test_read_o...
["tests/test_middlewares.py::test_caching", "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_middlewares.py::test_nested", "tests/test_queries.py::...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
19
23
1,142
0
0.6
1
0.75
1
0.253667
81.036
6,509
swe_smith::train::32028
swe_smith
train
32,028
davidhalter__parso.338a5760.func_basic__pzzq5opl
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Parser incorrectly handles INDENT tokens during error recovery #### Description When parsing Python code with indentation errors, the parser's error recovery mechanism incorrectly processes INDENT tokens instead of DEDENT tokens, causing the indent counter to be incremented when it should be decremented. #### Steps/...
diff --git a/parso/python/parser.py b/parso/python/parser.py index fa45e8b..537c854 100644 --- a/parso/python/parser.py +++ b/parso/python/parser.py @@ -191,16 +191,15 @@ class Parser(BaseParser): def _recovery_tokenize(self, tokens): for token in tokens: typ = token[0] - if typ ==...
["test/test_diff_parser.py::test_invalid_to_valid_nodes", "test/test_diff_parser.py::test_paren_in_strange_position", "test/test_diff_parser.py::test_paren_before_docstring", "test/test_diff_parser.py::test_many_nested_ifs", "test/test_diff_parser.py::test_dont_copy_dedents_in_beginning", "test/test_diff_parser.py::tes...
["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
11
18
1,301
0
0.6
1
0.75
1
0.2535
81.0355
6,510
swe_smith::train::38656
swe_smith
train
38,656
erikrose__parsimonious.0d3f5f93.func_pm_class_rm_funcs__wfv8biqb
swesmith/erikrose__parsimonious.0d3f5f93
erikrose/parsimonious
python
null
# Missing _as_rhs method in Quantifier class breaks string representation After a recent change, the string representation of grammar rules with quantifiers is broken. This affects the ability to display and debug grammars properly. ## Steps to reproduce 1. Create a grammar with quantifiers 2. Try to convert the gra...
diff --git a/parsimonious/expressions.py b/parsimonious/expressions.py index a1cf40b..096af58 100644 --- a/parsimonious/expressions.py +++ b/parsimonious/expressions.py @@ -444,28 +444,12 @@ class Quantifier(Compound): if len(children) >= self.min: return Node(self, text, pos, new_pos, children) ...
["parsimonious/tests/test_expressions.py::RepresentationTests::test_unicode", "parsimonious/tests/test_expressions.py::RepresentationTests::test_unicode_keep_parens"]
["parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_call_vs_inline", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_lists_vs_dicts", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_startswith_vs_regex", "parsimonious/tests/test_expressions.py::LengthTests::test_not", "parsimonious/t...
jyangballin/swesmith.x86_64.erikrose_1776_parsimonious.0d3f5f93
true
null
1
16
2
1,201
0
0.6
1
0.75
1
0.2535
81.0355
6,511
swe_smith::train::46084
swe_smith
train
46,084
conan-io__conan.86f29e13.pr_13097
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
[BUG] Test package build folder not being cleaned properly #### Reference Issues/PRs None yet. #### What does this implement/fix? Explain your changes. When running `conan create .` multiple times with a test_package that has a custom layout, the test_package build folder is not being properly cleaned between runs. ...
diff --git a/conan/cli/commands/create.py b/conan/cli/commands/create.py index 13fa6d3..33d826a 100644 --- a/conan/cli/commands/create.py +++ b/conan/cli/commands/create.py @@ -170,15 +170,11 @@ def test_package(conan_api, deps_graph, test_conanfile_path): "package being created.".format(t...
["test/integration/command/test_package_test.py::test_removing_test_package_build_folder"]
["test/integration/command/test_package_test.py::TestPackageTest::test_basic", "test/integration/command/test_package_test.py::TestPackageTest::test_basic_json", "test/integration/command/test_package_test.py::TestPackageTest::test_check_version", "test/integration/command/test_package_test.py::TestPackageTest::test_ot...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
6
1
1,400
0
0.6
1
0.75
1
0.253333
81.035
6,512
swe_smith::train::44549
swe_smith
train
44,549
pydata__patsy.a5d16484.lm_rewrite__zyzy14zr
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Title: Handling of 0D Data in Categorical Processing Description It seems there is an issue with how 0-dimensional data is being processed in the categorical module. When using the `dmatrix` function with 0D data, an error is raised, which was not the expected behavior. This issue appears to be related to the recent ...
diff --git a/patsy/categorical.py b/patsy/categorical.py index c88ecd5..8616aa0 100644 --- a/patsy/categorical.py +++ b/patsy/categorical.py @@ -158,19 +158,26 @@ def test_guess_categorical(): def _categorical_shape_fix(data): - # helper function - # data should not be a _CategoricalBox or pandas Categorical...
["patsy/test_highlevel.py::test_0d_data"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
29
1
940
0
0.6
1
0.75
1
0.253333
81.035
6,513
swe_smith::train::36064
swe_smith
train
36,064
stanfordnlp__dspy.651a4c71.pr_7936
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
Exception handling in eval_candidate_program doesn't return expected values Description When an exception occurs during evaluation in the `eval_candidate_program` function, it doesn't return the expected values when `return_all_scores=True`. Currently, if an exception occurs during evaluation and `return_all_scores=...
diff --git a/dspy/teleprompt/mipro_optimizer_v2.py b/dspy/teleprompt/mipro_optimizer_v2.py index 711b227..4c6ff94 100644 --- a/dspy/teleprompt/mipro_optimizer_v2.py +++ b/dspy/teleprompt/mipro_optimizer_v2.py @@ -507,7 +507,7 @@ class MIPROv2(Teleprompter): adjusted_num_trials = int((num_trials + num_trials //...
["tests/teleprompt/test_utils.py::test_eval_candidate_program_failure[True]"]
["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
2
12
1
1,279
0
0.6
1
0.75
1
0.253167
81.0345
6,514
swe_smith::train::51780
swe_smith
train
51,780
pydicom__pydicom.7d361b3d.func_basic__5wmh1at2
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
DS conversion returns incorrect values when numpy not available #### Description When `use_DS_numpy` is enabled but numpy is not installed, the DS string conversion function returns incorrect values instead of raising an ImportError. #### Steps/Code to Reproduce ```python import pydicom from pydicom import config f...
diff --git a/src/pydicom/values.py b/src/pydicom/values.py index 9be0242..8e8351f 100644 --- a/src/pydicom/values.py +++ b/src/pydicom/values.py @@ -251,28 +251,19 @@ def convert_DS_string( available """ num_string = byte_string.decode(default_encoding) - # Below, go directly to DS class instance ...
["tests/test_filereader.py::TestDSISnumpy::test_DS_numpy_import_error", "tests/test_filereader.py::TestDSISnumpy::test_numpy_import_warning"]
["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
23
2
1,059
0
0.6
1
0.75
1
0.253167
81.0345
6,515
swe_smith::train::38286
swe_smith
train
38,286
burnash__gspread.a8be3b96.func_pm_ctrl_invert_if__bxl52eyc
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
get_all_records fails when expected_headers is None #### Description When calling `get_all_records()` without providing `expected_headers`, the method raises a `TypeError` due to incorrect conditional logic. #### Steps/Code to Reproduce ```python import gspread # Authenticate and open a spreadsheet gc = gspread.se...
diff --git a/gspread/worksheet.py b/gspread/worksheet.py index 883e3a2..ffb93c3 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -571,14 +571,6 @@ class Worksheet: values = entire_sheet[head:] if expected_headers is None: - # all headers must be unique - header_r...
["tests/worksheet_test.py::WorksheetTest::test_get_all_records", "tests/worksheet_test.py::WorksheetTest::test_get_all_records_different_header", "tests/worksheet_test.py::WorksheetTest::test_get_all_records_duplicate_keys", "tests/worksheet_test.py::WorksheetTest::test_get_all_records_numericise_unformatted", "tests/w...
["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_merge_cells", "tests/cell_test.py::CellTest::test_numeric_value", "tests/ce...
jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96
true
null
1
21
12
1,098
0
0.6
1
0.75
1
0.253
81.034
6,516
swe_smith::train::51482
swe_smith
train
51,482
pydicom__pydicom.7d361b3d.combine_file__a1av54q7
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
CLI eval_element function returns None instead of raising error for missing elements #### Description The CLI's `eval_element` function is not properly handling missing dataset elements. When trying to access a data element that doesn't exist in the dataset, it should raise an `ArgumentTypeError` with a descriptive m...
diff --git a/src/pydicom/cli/main.py b/src/pydicom/cli/main.py index 2f616ba..07a6cd6 100644 --- a/src/pydicom/cli/main.py +++ b/src/pydicom/cli/main.py @@ -46,15 +46,14 @@ filespec_help = ( def eval_element(ds: Dataset, element: str) -> Any: try: - return eval("ds." + element, {"ds": ds}) + retur...
["tests/test_cli.py::TestFilespec::test_elem_not_exists[NotThere]", "tests/test_cli.py::TestFilespec::test_elem_not_exists[BeamSequenceXX]", "tests/test_cli.py::TestFilespec::test_elem_not_exists[BeamDose]", "tests/test_cli.py::TestFilespec::test_bad_index[BeamSequence[42]]", "tests/test_cli.py::TestFilespec::test_bad_...
["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
16
10
1,198
0
0.6
1
0.75
1
0.253
81.034
6,517
swe_smith::train::51447
swe_smith
train
51,447
pydicom__pydicom.7d361b3d.combine_file__0ghggoro
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# Incorrect behavior in writing_validation_mode setting ## Description I've found an issue with the `writing_validation_mode` property in the `Settings` class. The property is returning incorrect values and causing unexpected behavior. ## How to reproduce: ```python import pydicom from pydicom.config import RAISE, ...
diff --git a/src/pydicom/config.py b/src/pydicom/config.py index b2a5d58..e418495 100644 --- a/src/pydicom/config.py +++ b/src/pydicom/config.py @@ -299,12 +299,12 @@ class Settings: See :attr:`Settings.reading_validation_mode`. """ if self._writing_validation_mode is None: - retur...
["tests/test_dataset.py::TestDataset::test_setdefault_unknown_tag_strict", "tests/test_dataset.py::TestDataset::test_setdefault_unknown_tuple_strict", "tests/test_filewriter.py::TestWriteText::test_invalid_encoding_enforce_standard"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
6
3
1,397
0
0.6
1
0.75
1
0.252833
81.0335
6,518
swe_smith::train::1707
swe_smith
train
1,707
agronholm__typeguard.b6a7e438.combine_module__f8v7fr1y
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Incorrect stacklevel in get_stacklevel() causes wrong file/line in warnings I've noticed that warnings emitted by typeguard are showing incorrect file and line information. The warnings are being attributed to typeguard's internal files rather than the actual location where the type error occurs. ## Reproduction H...
diff --git a/src/typeguard/_decorators.py b/src/typeguard/_decorators.py index a6c20cb..d38df50 100644 --- a/src/typeguard/_decorators.py +++ b/src/typeguard/_decorators.py @@ -30,7 +30,7 @@ else: def make_cell(value: object) -> _Cell: - return (lambda: value).__closure__[0] # type: ignore[index] + return (...
["tests/test_checkers.py::TestTypedDict::test_notrequired_pass[typing_extensions]", "tests/test_checkers.py::TestTypedDict::test_notrequired_fail[typing_extensions]", "tests/test_instrumentation.py::test_local_class_instance[typechecked]", "tests/test_warn_on_error.py::test_check_type", "tests/test_warn_on_error.py::te...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
2
8
5
1,357
0
0.6
1
0.75
1
0.252833
81.0335
6,519
swe_smith::train::47265
swe_smith
train
47,265
python-trio__trio.cfbbe2c1.lm_rewrite__cqmyn88x
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
### Issue: Semaphore Object Representation Error #### Describe the bug It seems there's an issue with the `__repr__` method of the `Semaphore` class. When attempting to represent a `Semaphore` object, an `AttributeError` is raised. This error occurs because the `Semaphore` object is missing an expected attribute, whi...
diff --git a/src/trio/_sync.py b/src/trio/_sync.py index ca37392..c4e798a 100644 --- a/src/trio/_sync.py +++ b/src/trio/_sync.py @@ -452,12 +452,11 @@ class Semaphore(AsyncContextManagerMixin): self._max_value = max_value def __repr__(self) -> str: - if self._max_value is None: - max_v...
["src/trio/_tests/test_sync.py::test_Semaphore", "src/trio/_tests/test_sync.py::test_Semaphore_bounded"]
["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
9
2
1,337
0
0.6
1
0.75
1
0.252833
81.0335
6,520
swe_smith::train::52496
swe_smith
train
52,496
pydicom__pydicom.7d361b3d.func_pm_remove_assign__g2tc8rwq
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
get_frame function broken after recent changes #### Description The `get_frame` function in `pydicom.encaps` is throwing `NameError` exceptions when trying to access variables that are no longer defined. This affects frame extraction from encapsulated pixel data. #### Steps/Code to Reproduce ```python from pydicom....
diff --git a/src/pydicom/encaps.py b/src/pydicom/encaps.py index 3493808..eb6b110 100644 --- a/src/pydicom/encaps.py +++ b/src/pydicom/encaps.py @@ -502,11 +502,6 @@ def get_frame( """ if isinstance(buffer, bytes | bytearray): buffer = BytesIO(buffer) - - # `buffer` is positioned at the start of t...
["tests/pixels/test_encoder_pydicom.py::TestEncodeSegment::test_cycle", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_no_app", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_app", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_component_ids", "tests/pixels/test_utils.py::TestGetJ...
["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
13
26
1,257
0
0.6
1
0.75
1
0.252833
81.0335
6,521
swe_smith::train::24074
swe_smith
train
24,074
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__rz2f8r74
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
copy_default_config function broken due to variable reference error #### Description The `copy_default_config` function in `sunpy.util.config` is currently broken and raises an `UnboundLocalError` when called. The function attempts to reference a variable `config_path` before it's defined. #### Steps/Code to Reprodu...
diff --git a/sunpy/util/config.py b/sunpy/util/config.py index 290dc22..e4fb6bc 100644 --- a/sunpy/util/config.py +++ b/sunpy/util/config.py @@ -153,23 +153,6 @@ def _get_user_configdir(): def copy_default_config(overwrite=False): - """ - Copies the default sunpy config file to the user's config directory. -...
["sunpy/util/tests/test_config.py::test_find_config_user_site_files", "sunpy/util/tests/test_config.py::test_copy_default_config", "sunpy/util/tests/test_config.py::test_copy_default_config_without_overwrite", "sunpy/util/tests/test_config.py::test_copy_default_config_with_overwrite", "sunpy/util/tests/test_config.py::...
["sunpy/util/tests/test_config.py::test_is_writable_dir", "sunpy/util/tests/test_config.py::test_get_user_configdir", "sunpy/util/tests/test_config.py::test_print_config_files", "sunpy/util/tests/test_config.py::test_get_and_create_download_dir", "sunpy/util/tests/test_config.py::test_get_and_create_sample_dir"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
34
5
837
0
0.6
1
0.75
1
0.252833
81.0335
6,522
swe_smith::train::36158
swe_smith
train
36,158
facelessuser__soupsieve.a8080d97.combine_file__2we2kx8b
swesmith/facelessuser__soupsieve.a8080d97
facelessuser/soupsieve
python
null
API functions broken after recent changes Description The main API functions in soupsieve are not working correctly. When trying to use basic functionality like `select()`, `filter()`, and `match()`, I'm getting various errors including `TypeError` and `AssertionError`. Steps/Code to Reproduce ```python import soup...
diff --git a/soupsieve/__init__.py b/soupsieve/__init__.py index 45730df..21a4fe7 100644 --- a/soupsieve/__init__.py +++ b/soupsieve/__init__.py @@ -87,7 +87,7 @@ def closest( ) -> bs4.Tag: """Match closest ancestor.""" - return compile(select, namespaces, flags, **kwargs).closest(tag) + return compile(se...
["tests/test_api.py::TestSoupSieve::test_closest_match_complex_parent", "tests/test_api.py::TestSoupSieve::test_closest_match_parent", "tests/test_api.py::TestSoupSieve::test_closest_match_self", "tests/test_api.py::TestSoupSieve::test_closest_must_be_parent", "tests/test_api.py::TestSoupSieve::test_filter_list", "test...
["tests/test_api.py::TestSoupSieve::test_cache", "tests/test_api.py::TestSoupSieve::test_copy_pickle", "tests/test_api.py::TestSoupSieve::test_escape_ctrl", "tests/test_api.py::TestSoupSieve::test_escape_hyphen", "tests/test_api.py::TestSoupSieve::test_escape_null", "tests/test_api.py::TestSoupSieve::test_escape_number...
jyangballin/swesmith.x86_64.facelessuser_1776_soupsieve.a8080d97
true
null
1
14
11
1,237
0
0.6
1
0.75
1
0.252833
81.0335
6,523
swe_bench::test::1007
swe_bench
test
1,007
matplotlib__matplotlib-23140
matplotlib/matplotlib
matplotlib/matplotlib
python
54bbf200ff88b7855db4e34153ba728b472b3727
Legend Title Left Alignment I'm trying to align my legend title on the left of the legend box. I assumed this would work: leg = ax.get_legend() title_inst = leg.get_title() title_inst.set_horizontalalignment('left') However only this worked: leg = ax.get_legend() leg._legend_box.align = "left" S...
`horizontalalignment` is relative to the x, y of the title, which in this case is the center of the legend box. I agree that it would make sense for `legend.set_title` to accept a `loc` kwarg, just like the axes title does. Looks like a `self._legend_box.align=loc` in `set_title` would do the trick. Did you want...
diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -257,6 +257,10 @@ def _update_bbox_to_anchor(self, loc_in_canvas): to set the fontsize alongside other font properties, use the *size* parameter in *title_fontproperties*. +align...
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py --- a/lib/matplotlib/tests/test_legend.py +++ b/lib/matplotlib/tests/test_legend.py @@ -607,6 +607,25 @@ def test_legend_title_fontprop_fontsize(): assert leg5.get_title().get_fontsize() == 20 +@pytest.mark.parametrize('alig...
["lib/matplotlib/tests/test_legend.py::test_legend_alignment[center]", "lib/matplotlib/tests/test_legend.py::test_legend_alignment[left]", "lib/matplotlib/tests/test_legend.py::test_legend_alignment[right]", "lib/matplotlib/tests/test_legend.py::test_legend_set_alignment[center]", "lib/matplotlib/tests/test_legend.py::...
["lib/matplotlib/tests/test_legend.py::test_legend_ordereddict", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[pdf]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[pdf]", "li...
null
true
2022-05-26T05:04:24Z
1
45
6
416
0
0.8
1
0.55
1
0.219333
81.033
6,524
swe_smith::train::20430
swe_smith
train
20,430
tobymao__sqlglot.036601ba.combine_module__dyhenhu2
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
NameError in optimizer modules after recent changes #### Description After some recent changes to the optimizer modules, several functions are throwing `NameError` exceptions for undefined variables. The errors seem to be related to variables that were removed or not properly defined in the scope. #### Steps/Code to...
diff --git a/sqlglot/optimizer/normalize.py b/sqlglot/optimizer/normalize.py index 610833d..a0034e9 100644 --- a/sqlglot/optimizer/normalize.py +++ b/sqlglot/optimizer/normalize.py @@ -160,7 +160,6 @@ def distributive_law(expression, dnf, max_distance): raise OptimizeError(f"Normalization distance {distance} e...
["tests/test_optimizer.py::TestOptimizer::test_lateral_annotation", "tests/test_optimizer.py::TestOptimizer::test_normalize", "tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch", "tests/test_optimizer.py::Test...
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
2
22
6
1,076
0
0.6
1
0.75
1
0.252667
81.033
6,525
swe_smith::train::28511
swe_smith
train
28,511
encode__starlette.db5063c2.func_basic__5vnj9r3y
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
ExceptionMiddleware debug flag inverted and handlers swapped When initializing ExceptionMiddleware with `debug=True`, the debug behavior is inverted - it acts as if debug is False. Additionally, HTTPException and WebSocketException handlers appear to be swapped, causing incorrect exception handling. #### Steps/Code t...
diff --git a/starlette/middleware/exceptions.py b/starlette/middleware/exceptions.py index d708929..5580567 100644 --- a/starlette/middleware/exceptions.py +++ b/starlette/middleware/exceptions.py @@ -22,15 +22,15 @@ class ExceptionMiddleware: debug: bool = False, ) -> None: self.app = app - ...
["tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[trio]", "tests/test_applications.py::test_400[asyncio]", "tests/test_applications.py::test_websocket_raise_websocket_exception[asyncio]", "tests/test_applications.py::test_websocket_ra...
["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_contextvars[asyncio-CustomMiddlewareWithoutBaseHTTPMiddle...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
8
58
1,356
0
0.6
1
0.75
1
0.252667
81.033
6,526
swe_smith::train::42524
swe_smith
train
42,524
python-jsonschema__jsonschema.93e0caa5.func_basic__42b47yah
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
_WrappedReferencingError equality comparison broken #### Description The `_WrappedReferencingError` class has broken equality comparison logic that causes issues when comparing wrapped exceptions. The equality method returns incorrect results and doesn't properly handle comparisons between wrapped and unwrapped excep...
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 3dcd296..288cff0 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -237,11 +237,11 @@ class _WrappedReferencingError(_RefResolutionError, _Unresolvable): # pragma: n object.__setattr__(self, "_wrapped", cause) ...
["jsonschema/tests/test_deprecations.py::TestDeprecations::test_WrappedReferencingError_hashability", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_catching_Unresolvable_directly", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_catching_Unresolvable_via_RefResolutionError"]
["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
8
3
1,356
0
0.6
1
0.75
1
0.252667
81.033
6,527
swe_smith::train::21816
swe_smith
train
21,816
life4__textdistance.c3aca916.combine_file__ujocn7qp
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
LibrariesManager.get_algorithms() returns library objects instead of algorithm names #### Description The `get_algorithms()` method in `LibrariesManager` is returning library objects instead of algorithm names, causing `TypeError: unhashable type` errors when trying to use the returned values. #### Steps/Code to Rep...
diff --git a/textdistance/libraries.py b/textdistance/libraries.py index fa24ea6..acf8ec8 100644 --- a/textdistance/libraries.py +++ b/textdistance/libraries.py @@ -42,7 +42,7 @@ class LibrariesManager: def get_algorithms(self) -> list[str]: """Get list of available algorithms. """ - retur...
["tests/test_edit/test_damerau_levenshtein.py::test_distance_restricted[ab-bca-3]", "tests/test_edit/test_damerau_levenshtein.py::test_distance_restricted[abcd-bdac-4]", "tests/test_edit/test_damerau_levenshtein.py::test_distance_unrestricted[ab-bca-2]", "tests/test_edit/test_damerau_levenshtein.py::test_distance_unres...
["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati...
jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916
true
null
1
17
39
1,176
0
0.6
1
0.75
1
0.252667
81.033
6,528
swe_smith::train::3464
swe_smith
train
3,464
pygments__pygments.27649ebb.combine_file__p97xugbv
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Perl6Lexer crashes with NameError on 'groups' variable #### Description The Perl6Lexer is throwing a `NameError: name 'groups' is not defined` when processing certain Perl6 code. This appears to be affecting the lexer's ability to tokenize Perl6 files properly. #### Steps/Code to Reproduce ```python from pygments.l...
diff --git a/pygments/lexers/perl.py b/pygments/lexers/perl.py index 3ec1944..4a361c4 100644 --- a/pygments/lexers/perl.py +++ b/pygments/lexers/perl.py @@ -494,16 +494,15 @@ class Perl6Lexer(ExtendedRegexLexer): def _build_word_match(words, boundary_regex_fragment=None, prefix='', suffix=''): if bounda...
["tests/test_basic_api.py::test_random_input[Perl6Lexer]", "tests/examplefiles/perl6/RoleQ.pm6::", "tests/examplefiles/perl6/grammar-test.p6::", "tests/examplefiles/perl6/test.p6::"]
["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
27
4
976
0
0.6
1
0.75
1
0.252667
81.033
6,529
swe_smith::train::144
swe_smith
train
144
oauthlib__oauthlib.1fd52536.combine_file__upmeyoym
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RefreshTokenGrant initialization breaks with None request_validator #### Description The OpenID Connect RefreshTokenGrant class fails to initialize properly when a request_validator is passed to the constructor. The grant type appears to be setting the proxy target's request_validator to None instead of using the pro...
diff --git a/oauthlib/openid/connect/core/grant_types/refresh_token.py b/oauthlib/openid/connect/core/grant_types/refresh_token.py index 43e4499..6b8dcdf 100644 --- a/oauthlib/openid/connect/core/grant_types/refresh_token.py +++ b/oauthlib/openid/connect/core/grant_types/refresh_token.py @@ -17,8 +17,8 @@ class Refresh...
["tests/openid/connect/core/endpoints/test_refresh_token.py::TestRefreshToken::test_refresh_token_no_openid", "tests/openid/connect/core/endpoints/test_refresh_token.py::TestRefreshToken::test_refresh_token_with_openid", "tests/openid/connect/core/grant_types/test_refresh_token.py::OpenIDRefreshTokenInterferenceTest::t...
["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
8
22
1,355
0
0.6
1
0.75
1
0.2525
81.0325
6,530
swe_smith::train::20409
swe_smith
train
20,409
tobymao__sqlglot.036601ba.combine_file__qg91myxw
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
SQLite dialect generates incorrect SQL for DATEDIFF with NANOSECOND unit #### Description When using DATEDIFF with 'NANOSECOND' unit in SQLite dialect, the generated SQL produces an incorrect multiplier and raises an "unsupported" error instead of applying the proper conversion. #### Steps/Code to Reproduce ```pyth...
diff --git a/sqlglot/dialects/sqlite.py b/sqlglot/dialects/sqlite.py index 659ba64..804310e 100644 --- a/sqlglot/dialects/sqlite.py +++ b/sqlglot/dialects/sqlite.py @@ -44,12 +44,6 @@ def _transform_create(expression: exp.Expression) -> exp.Expression: primary_key = e if primary_key and len(...
["tests/dialects/test_sqlite.py::TestSQLite::test_datediff", "tests/dialects/test_sqlite.py::TestSQLite::test_ddl", "tests/dialects/test_sqlite.py::TestSQLite::test_longvarchar_dtype", "tests/dialects/test_sqlite.py::TestSQLite::test_sqlite"]
["tests/dialects/test_sqlite.py::TestSQLite::test_analyze", "tests/dialects/test_sqlite.py::TestSQLite::test_hexadecimal_literal", "tests/dialects/test_sqlite.py::TestSQLite::test_strftime", "tests/dialects/test_sqlite.py::TestSQLite::test_warnings", "tests/dialects/test_sqlite.py::TestSQLite::test_window_null_treatmen...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
23
4
1,055
0
0.6
1
0.75
1
0.2525
81.0325
6,531
swe_smith::train::10539
swe_smith
train
10,539
paramiko__paramiko.23f92003.func_basic__nfmj8mlm
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
HostKeys loading behavior inverted - entries with matching keys are excluded instead of included #### Description When loading host keys from a file, the HostKeys class is incorrectly filtering out entries that should be kept and keeping entries that should be filtered out. This results in host key files being loaded...
diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py index 4d47e95..5d86242 100644 --- a/paramiko/hostkeys.py +++ b/paramiko/hostkeys.py @@ -97,10 +97,10 @@ class HostKeys(MutableMapping): continue if entry is not None: _hostnames = entry.hostnames - ...
["tests/test_hostkeys.py::HostKeysTest::test_add", "tests/test_hostkeys.py::HostKeysTest::test_delitem", "tests/test_hostkeys.py::HostKeysTest::test_dict", "tests/test_hostkeys.py::HostKeysTest::test_dict_set", "tests/test_hostkeys.py::HostKeysTest::test_entry_delitem", "tests/test_hostkeys.py::HostKeysTest::test_load"...
["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
13
1,395
0
0.6
1
0.75
1
0.2525
81.0325
6,532
swe_smith::train::47137
swe_smith
train
47,137
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__h9lu2n3z
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SocketStream initialization fails with AttributeError when accessing socket methods #### Description When creating a SocketStream instance, the initialization process fails with an AttributeError because socket methods are being called before the socket attribute is properly assigned. #### Steps/Code to Reproduce `...
diff --git a/src/trio/_highlevel_socket.py b/src/trio/_highlevel_socket.py index c04e66e..6c0e8c6 100644 --- a/src/trio/_highlevel_socket.py +++ b/src/trio/_highlevel_socket.py @@ -69,21 +69,11 @@ class SocketStream(HalfCloseableStream): """ def __init__(self, socket: SocketType) -> None: - if not is...
["src/trio/_tests/test_highlevel_open_tcp_listeners.py::test_open_tcp_listeners_basic", "src/trio/_tests/test_highlevel_open_tcp_listeners.py::test_open_tcp_listeners_ipv6_v6only", "src/trio/_tests/test_highlevel_open_tcp_listeners.py::test_open_tcp_listeners_rebind", "src/trio/_tests/test_highlevel_open_tcp_listeners....
["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
23
45
1,055
0
0.6
1
0.75
1
0.2525
81.0325
6,533
swe_smith::train::25901
swe_smith
train
25,901
pylint-dev__astroid.b114f6b5.func_basic__prudffbz
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
Const node __getattr__ returns None for value attribute instead of raising AttributeError #### Description When accessing the `value` attribute on a Const node, `__getattr__` now returns `None` instead of raising an `AttributeError`. This breaks inference and causes various operations to fail unexpectedly. #### Step...
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index fde3239..d85d641 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -2091,15 +2091,9 @@ class Const(_base_nodes.NoChildrenNode, Instance): infer_binary_op = protocols.const_infer_binary_op def __g...
["tests/brain/test_brain.py::TypingBrain::test_namedtuple_can_correctly_access_methods", "tests/brain/test_brain.py::test_infer_int", "tests/brain/test_brain.py::TestFunctoolsPartial::test_inferred_partial_function_calls", "tests/brain/test_ctypes.py::test_other_ctypes_member_untouched", "tests/brain/test_enum.py::Enum...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
10
53
1,314
0
0.6
1
0.75
1
0.252333
81.032
6,534
swe_smith::train::31344
swe_smith
train
31,344
benoitc__gunicorn.bacbf8aa.combine_file__0q9uqnfj
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
Body.readline() returns incorrect results with size parameter #### Description When using the `Body.readline()` method with a size parameter, the method returns incorrect results due to changes in the size validation logic. The method now raises a `TypeError` for valid size values and returns unexpected output. ####...
diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py index d7ee29e..69bca32 100644 --- a/gunicorn/http/body.py +++ b/gunicorn/http/body.py @@ -80,30 +80,28 @@ class ChunkedReader: buf.write(data) idx = buf.getvalue().find(b"\r\n") - while idx < 0: + while idx <= 0: ...
["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
1
18
53
1,154
0
0.6
1
0.75
1
0.252333
81.032
6,535
swe_smith::train::44341
swe_smith
train
44,341
pydata__patsy.a5d16484.func_pm_ctrl_shuffle__mwxa11um
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
dmatrices function returns early without checking for missing outcome variables #### Description The `dmatrices` function is returning results before performing the required validation check for missing outcome variables. This causes the function to return matrices even when the model is missing required outcome vari...
diff --git a/patsy/highlevel.py b/patsy/highlevel.py index 1af6ce8..8c55a50 100644 --- a/patsy/highlevel.py +++ b/patsy/highlevel.py @@ -304,6 +304,11 @@ def dmatrix(formula_like, data={}, eval_env=0, NA_action="drop", return_type="ma def dmatrices( formula_like, data={}, eval_env=0, NA_action="drop", return_type...
["patsy/test_highlevel.py::test_formula_likes", "patsy/test_highlevel.py::test_data_types", "patsy/test_highlevel.py::test_categorical", "patsy/test_highlevel.py::test_builtins", "patsy/test_highlevel.py::test_env_transform", "patsy/test_highlevel.py::test_multicolumn"]
["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
12
6
1,274
0
0.6
1
0.75
1
0.252333
81.032
6,536
swe_smith::train::19224
swe_smith
train
19,224
seperman__deepdiff.ed252022.func_pm_remove_assign__c5sgwsxc
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Delta operations fail with UnboundLocalError when applying changes #### Description When applying delta operations to objects, an UnboundLocalError is raised for the variable `current_old_value`. This affects various delta operations including list modifications, dictionary changes, and numpy array transformations. ...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..fc18741 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -238,7 +238,7 @@ class Delta: # if forced_old_value is not None: try: if action == GET: - current_old_value = obj[elem] + pass ...
["tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t2_json.csv-t1.json-args3-0]", "tests/test_command.py::TestCommands::test_deep...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
7
60
1,374
0
0.6
1
0.75
1
0.252333
81.032
6,537
swe_smith::train::26809
swe_smith
train
26,809
tkrajina__gpxpy.09fc46b3.combine_file__j10ihf14
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
XML generation broken with incorrect logic inversions #### Description The XML generation functions in `gpxpy/utils.py` have several logic errors that cause incorrect output formatting and runtime errors when processing GPX data. #### Steps/Code to Reproduce ```python import gpxpy import datetime # Test 1: Large f...
diff --git a/gpxpy/utils.py b/gpxpy/utils.py index 4ee2981..ab6ef87 100644 --- a/gpxpy/utils.py +++ b/gpxpy/utils.py @@ -20,9 +20,9 @@ import datetime as mod_datetime from typing import Any, AnyStr, List, Optional, cast def to_xml(tag: str, attributes: Any=None, content: Any=None, default: Any=None, escape: bool=Fa...
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_dilutions", "test.py::GPXTests::test_get_duration", "test.py::GPXTests::test_gpx_10_fields", "test.py::GPXTests::test_gpx_11_fields", "test.py::GPXTests::test_gpx_fill_time_data_with_start_time_and_end_time", "test.py::GPXTests::test_gpx_fill_time...
["test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_add_missing_elevations", "test.py::GPXTests::tes...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
17
16
1,174
0
0.6
1
0.75
1
0.252333
81.032
6,538
swe_smith::train::1920
swe_smith
train
1,920
agronholm__typeguard.b6a7e438.func_pm_remove_cond__xp4p1yy9
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Variable assignment type checking broken after recent changes #### Description Variable assignment type checking appears to be completely broken. When using typeguard with variable assignments that have type annotations, the type checking is not being performed at all. #### Steps/Code to Reproduce ```python from ty...
diff --git a/src/typeguard/_transformer.py b/src/typeguard/_transformer.py index 25696a5..d69d013 100644 --- a/src/typeguard/_transformer.py +++ b/src/typeguard/_transformer.py @@ -1050,10 +1050,6 @@ class TypeguardTransformer(NodeTransformer): elts: Sequence[expr] if isinstance(target...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_transformer.py::TestAssign::test_varargs_assign", "tests/test_transformer.py::TestAssign::test_kwargs_assign", "tests/test_transformer.py::TestAssign::test_multi_assign", "tests/test_transformer.py::Tes...
["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
15
11
1,214
0
0.6
1
0.75
1
0.252333
81.032
6,539
swe_smith::train::23973
swe_smith
train
23,973
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__amdv41th
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
**Endpoint parser in helio module crashes with UnboundLocalError** **Description** The `endpoint_parser` function in the helio parser module crashes with an UnboundLocalError when trying to access the `soup` variable. **To reproduce:** ```python from sunpy.net.helio.parser import endpoint_parser # This will crash ...
diff --git a/sunpy/net/helio/parser.py b/sunpy/net/helio/parser.py index 7af0dfa..d813552 100644 --- a/sunpy/net/helio/parser.py +++ b/sunpy/net/helio/parser.py @@ -73,6 +73,12 @@ def webservice_parser(service='HEC'): def endpoint_parser(link): + for web_link in soup.find_all('a'): + url = web_link.get('...
["sunpy/net/helio/tests/test_helio.py::test_endpoint_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_endpoint_parser_get_links"]
["sunpy/net/helio/tests/test_helio.py::test_webservice_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_webservice_parser_get_links", "sunpy/net/helio/tests/test_helio.py::test_taverna_parser_no_content", "sunpy/net/helio/tests/test_helio.py::test_taverna_parser_no_taverna_links", "sunpy/net/helio/tests/t...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
17
2
1,174
0
0.6
1
0.75
1
0.252333
81.032
6,540
swe_smith::train::33159
swe_smith
train
33,159
django-money__django-money.835c1ab8.func_basic__34mglbvj
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
MoneyField F expressions validation broken for currency comparison and operations #### Description When using F expressions with MoneyField, the validation logic appears to be incorrectly rejecting valid operations and allowing invalid ones. Operations that should work are being blocked, while operations that should ...
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index dc5f6ad..914796c 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -48,15 +48,15 @@ def validate_money_expression(obj, expr): - Multiplication, division, modulo with money instances on both sides of expression """ ...
["tests/test_models.py::TestVanillaMoneyField::test_old_money_not_mutated_f_object", "tests/test_models.py::TestFExpressions::test_save[f_obj0-expected0]", "tests/test_models.py::TestFExpressions::test_save[f_obj1-expected1]", "tests/test_models.py::TestFExpressions::test_save[f_obj2-expected2]", "tests/test_models.py:...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
1
12
11
1,274
0
0.6
1
0.75
1
0.252333
81.032
6,541
swe_smith::train::2529
swe_smith
train
2,529
pdfminer__pdfminer.six.1a8bd2f7.func_pm_remove_assign__wl0br5hw
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
TrueType font parsing fails with NameError on undefined variables When processing certain PDF files with TrueType fonts, the font parsing code encounters undefined variable errors that prevent text extraction from completing successfully. #### Steps to Reproduce The issue occurs when processing PDF files that contai...
diff --git a/pdfminer/pdffont.py b/pdfminer/pdffont.py index e1df40c..66e6b91 100644 --- a/pdfminer/pdffont.py +++ b/pdfminer/pdffont.py @@ -743,7 +743,6 @@ class TrueTypeFont: if b"cmap" not in self.tables: raise TrueTypeFont.CMapNotFound (base_offset, length) = self.tables[b"cmap"] - ...
["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_791_non_unicode_cmap"]
["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_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
18
2
1,153
0
0.6
1
0.75
1
0.252167
81.0315
6,542
swe_smith::train::48376
swe_smith
train
48,376
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__hgk3x8q1
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
NameError in generate_source_patches when processing templated files #### Description When processing patches for templated SQL files, the `generate_source_patches` function throws a `NameError` because it references an undefined variable `local_raw_slices`. This occurs when the function attempts to evaluate patches ...
diff --git a/src/sqlfluff/core/linter/patch.py b/src/sqlfluff/core/linter/patch.py index 0262713..f2d47e9 100644 --- a/src/sqlfluff/core/linter/patch.py +++ b/src/sqlfluff/core/linter/patch.py @@ -265,15 +265,6 @@ def generate_source_patches( patch.dedupe_tuple(), ) continue -...
["test/core/linter/fix_test.py::test__fix__generate_source_patches[tree1-templated_file1-expected_result1]", "test/core/linter/fix_test.py::test__fix__generate_source_patches[tree2-templated_file2-expected_result2]", "test/core/linter/fix_test.py::test__fix__generate_source_patches[tree3-templated_file3-expected_result...
["test/core/linter/discovery_test.py::test__linter__path_from_paths__dir", "test/core/linter/discovery_test.py::test__linter__path_from_paths__default", "test/core/linter/discovery_test.py::test__linter__path_from_paths__exts", "test/core/linter/discovery_test.py::test__linter__path_from_paths__file", "test/core/linter...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
11
5
1,293
0
0.6
1
0.75
1
0.252167
81.0315
6,543
swe_smith::train::18647
swe_smith
train
18,647
seperman__deepdiff.ed252022.combine_file__a23pnr2y
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Delta operations failing with parameter order issues #### Description When applying delta operations to modify data structures, the operations are failing due to incorrect parameter ordering in internal method calls. This affects various delta operations including list modifications, item additions, and deletions. #...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..654f35c 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -354,35 +354,32 @@ class Delta: Delete the element value on an object and if necessary convert the object to the proper mutable type """ obj_is_new = False - ...
["tests/test_delta.py::TestBasicsOfDelta::test_list_difference_add_delta", "tests/test_delta.py::TestBasicsOfDelta::test_multiple_delta", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference3_delta", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference_delta1", "tests/test_delta.py::TestBasicsOfDelta:...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
27
28
973
0
0.6
1
0.75
1
0.252167
81.0315
6,544
swe_smith::train::2707
swe_smith
train
2,707
cknd__stackprinter.219fcc52.func_basic__w3sslrvw
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
Exception message formatting broken - traceback object displayed instead of exception value #### Description When formatting exception messages, the traceback object is being displayed instead of the actual exception value. This causes incorrect output where you see something like `<traceback object at 0x...>` instea...
diff --git a/stackprinter/formatting.py b/stackprinter/formatting.py index 25f5fd8..ca5aec4 100644 --- a/stackprinter/formatting.py +++ b/stackprinter/formatting.py @@ -223,23 +223,23 @@ def format_exc_info(etype, evalue, tb, style='plaintext', add_summary='auto', def format_exception_message(etype, evalue, tb=None,...
["tests/test_formatting.py::test_exception_formatting", "tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting"]
["tests/test_formatting.py::test_frame_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
14
3
1,233
0
0.6
1
0.75
1
0.252167
81.0315
6,545
swe_smith::train::49002
swe_smith
train
49,002
facebookresearch__hydra.0f03eb60.lm_rewrite__n0r8rpzt
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
### Unexpected Behavior in Cast Function Hey team, I've encountered an issue with the `_normalize_cast_value` function in `grammar_functions.py`. It seems like there's a problem when trying to handle input arguments for casting functions. Specifically, when neither `value` nor `args` are provided, the function raises...
diff --git a/hydra/_internal/grammar/grammar_functions.py b/hydra/_internal/grammar/grammar_functions.py index 879b06b..a80451c 100644 --- a/hydra/_internal/grammar/grammar_functions.py +++ b/hydra/_internal/grammar/grammar_functions.py @@ -68,19 +68,19 @@ def _list_to_simple_choice(*args: Any) -> ChoiceSweep: ret...
["tests/test_overrides_parser.py::test_value[sort(float(3,2,1))]", "tests/test_overrides_parser.py::test_cast_conversions[simple_choice:ints]", "tests/test_overrides_parser.py::test_cast_conversions[simple_choice:types]"]
["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
20
3
1,113
0
0.6
1
0.75
1
0.252167
81.0315
6,546
swe_smith::train::23435
swe_smith
train
23,435
pyparsing__pyparsing.533adf47.func_basic__1udfzr0e
swesmith/pyparsing__pyparsing.533adf47
pyparsing/pyparsing
python
null
trace_parse_action decorator broken - returns None and raises wrong exceptions #### Description The `trace_parse_action` decorator is not working correctly. When decorating parse actions, it always returns `None` instead of the actual return value from the decorated function, and when exceptions occur, it raises a ge...
diff --git a/pyparsing/core.py b/pyparsing/core.py index 777165c..997a935 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -6024,16 +6024,16 @@ def trace_parse_action(f: ParseAction) -> ParseAction: s, l, t = paArgs[-3:] if len(paArgs) > 3: thisFunc = f"{type(paArgs[0]).__name__}...
["tests/test_unit.py::Test02_WithoutPackrat::testTraceParseActionDecorator", "tests/test_unit.py::Test02_WithoutPackrat::testTraceParseActionDecorator_with_exception", "tests/test_unit.py::Test02_WithoutPackrat::test_exception_messages_with_exception_subclass", "tests/test_unit.py::Test04_WithPackrat::testTraceParseAct...
["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
12
18
1,272
0
0.6
1
0.75
1
0.252
81.031
6,547
swe_smith::train::42826
swe_smith
train
42,826
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__fq676bn5
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
### KeyError Raised for Unknown Formats in FormatChecker #### Description When initializing a `FormatChecker` with a format that is not recognized, a `KeyError` is raised. This occurs when the specified format is not part of the known formats in the `FormatChecker` class. #### Steps to Reproduce 1. Create a `Format...
diff --git a/jsonschema/_format.py b/jsonschema/_format.py index 789fe4f..8c49068 100644 --- a/jsonschema/_format.py +++ b/jsonschema/_format.py @@ -47,10 +47,22 @@ class FormatChecker: ] = {} # noqa: RUF012 def __init__(self, formats: typing.Iterable[str] | None = None): + """ + Initialize a...
["jsonschema/tests/test_format.py::TestFormatChecker::test_it_raises_a_key_error_for_unknown_formats"]
["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
18
1
1,152
0
0.6
1
0.75
1
0.252
81.031
6,548
swe_smith::train::39291
swe_smith
train
39,291
pallets__jinja.ada0a9a6.func_basic__xim0rt3k
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Template inheritance broken with conditional extends statements #### Description When using conditional `{% extends %}` statements in Jinja2 templates, the template compilation fails with a `TemplateRuntimeError: extended multiple times` error, even when only one extend should be executed at runtime. #### Steps/Code...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..107d4cc 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1002,22 +1002,13 @@ class CodeGenerator(NodeVisitor): if not frame.toplevel: self.fail("cannot use extend from a non top-level scope", node.linen...
["tests/test_inheritance.py::TestInheritance::test_multi_inheritance"]
["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
21
1
1,092
0
0.6
1
0.75
1
0.252
81.031
6,549
swe_smith::train::4119
swe_smith
train
4,119
pygments__pygments.27649ebb.func_basic__w62b7uhv
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Elixir lexer regex compilation error with sigil patterns #### Description The Elixir lexer is failing to compile due to invalid regex patterns in the sigil rules generation. When trying to use the ElixirLexer, it raises a `ValueError: uncompilable regex` error. #### Steps/Code to Reproduce ```python from pygments.l...
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py index 1190182..b384dfb 100644 --- a/pygments/lexers/erlang.py +++ b/pygments/lexers/erlang.py @@ -281,7 +281,6 @@ class ElixirLexer(RegexLexer): yield index, token, value def gen_elixir_sigil_rules(): - # all valid sigil t...
["tests/test_basic_api.py::test_lexer_options[ElixirLexer]", "tests/test_basic_api.py::test_random_input[ElixirLexer]", "tests/test_basic_api.py::test_lexer_classes[ElixirLexer]", "tests/test_basic_api.py::test_get_lexers", "tests/test_basic_api.py::test_lexer_options[ElixirConsoleLexer]", "tests/test_basic_api.py::tes...
["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
28
8
951
0
0.6
1
0.75
1
0.251833
81.0305
6,550
swe_smith::train::6516
swe_smith
train
6,516
mahmoud__boltons.3bfcfdd0.lm_rewrite__2v06l0v7
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
# SpooledIOBase ValueError message formatting issue ## Description Hi, I've noticed an issue with the `SpooledIOBase` class in `boltons/ioutils.py`. When attempting to perform I/O operations on a closed file, the error message formatting is incorrect. ## Current Behaviour When performing operations on a closed fil...
diff --git a/boltons/ioutils.py b/boltons/ioutils.py index bfcaf3f..b8de840 100644 --- a/boltons/ioutils.py +++ b/boltons/ioutils.py @@ -76,9 +76,9 @@ class SpooledIOBase(IOBase): def _checkClosed(self, msg=None): """Raise a ValueError if file is closed""" if self.closed: - raise Value...
["tests/test_ioutils.py::TestSpooledBytesIO::test_closed_file_method_valueerrors", "tests/test_ioutils.py::TestSpooledStringIO::test_closed_file_method_valueerrors"]
["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
6
2
1,391
0
0.6
1
0.75
1
0.251833
81.0305
6,551
swe_smith::train::3316
swe_smith
train
3,316
pygments__pygments.27649ebb.combine_file__6y3kng06
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
XQuery lexer crashes with IndexError on certain syntax patterns #### Description The XQuery lexer throws an `IndexError: list index out of range` when processing certain XQuery code patterns. This appears to be related to how the lexer handles operator parsing state transitions. #### Steps/Code to Reproduce ```pyth...
diff --git a/pygments/lexers/webmisc.py b/pygments/lexers/webmisc.py index 815c7a3..aa6599f 100644 --- a/pygments/lexers/webmisc.py +++ b/pygments/lexers/webmisc.py @@ -184,12 +184,12 @@ class XQueryLexer(ExtendedRegexLexer): ctx.pos = match.end() def pushstate_operator_order_callback(lexer, match, ctx)...
["tests/examplefiles/xquery/test.xqy::"]
["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
18
1
1,151
0
0.6
1
0.75
1
0.251833
81.0305
6,552
swe_smith::train::18545
swe_smith
train
18,545
HIPS__autograd.ac044f0d.lm_rewrite__mjvaa7gi
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### TypeError: 'int' object is not iterable in FFT functions #### Description After a recent update, I've encountered an issue with the FFT functions in the library. When attempting to perform FFT operations with certain parameters, a `TypeError` is raised, indicating that an 'int' object is not iterable. This seems ...
diff --git a/autograd/numpy/fft.py b/autograd/numpy/fft.py index e401b4c..880d9b8 100644 --- a/autograd/numpy/fft.py +++ b/autograd/numpy/fft.py @@ -120,11 +120,13 @@ def check_even_shape(shape): def get_fft_args(a, d=None, axis=-1, norm=None, *args, **kwargs): - axes = [axis] - if d is not None: - d ...
["tests/test_fft.py::test_rfft_n_smaller", "tests/test_fft.py::test_rfft_n_bigger", "tests/test_fft.py::test_irfft_n_smaller", "tests/test_fft.py::test_irfft_n_bigger"]
["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
12
4
1,271
0
0.6
1
0.75
1
0.251833
81.0305
6,553
swe_smith::train::4558
swe_smith
train
4,558
pygments__pygments.27649ebb.lm_rewrite__axceelr4
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
PHP Lexer Fails with TypeError on Function Collection **Describe the bug** The PHP lexer is currently throwing a `TypeError` when attempting to process certain inputs. This seems to be related to the way functions are being collected from modules. The error message indicates that tuple indices must be integers or slic...
diff --git a/pygments/lexers/php.py b/pygments/lexers/php.py index 4f00c6f..0d9d6ae 100644 --- a/pygments/lexers/php.py +++ b/pygments/lexers/php.py @@ -294,25 +294,19 @@ class PhpLexer(RegexLexer): } def __init__(self, **options): - self.funcnamehighlighting = get_bool_opt( - options, 'fu...
["tests/test_basic_api.py::test_lexer_options[HtmlPhpLexer]", "tests/test_basic_api.py::test_lexer_options[JavascriptPhpLexer]", "tests/test_basic_api.py::test_lexer_options[XmlPhpLexer]", "tests/test_basic_api.py::test_random_input[JavascriptPhpLexer]", "tests/test_basic_api.py::test_random_input[HtmlPhpLexer]", "test...
["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
22
24
1,071
0
0.6
1
0.75
1
0.251833
81.0305
6,554
r2e_gym::train::442
r2e_gym
train
442
orange3__a4c46c8ccad1f694d1a78f7b929cd861bd179237
orange3
biolab/orange3
python
a4c46c8ccad1f694d1a78f7b929cd861bd179237
**Title:** Tests Fail with AttributeError After Renaming `select_new_features` to `ignore_new_features` **Description:** After renaming the `select_new_features` setting to `ignore_new_features` in the `OWSelectAttributes` widget, related tests are failing due to missing attributes. **Example Buggy Code:** ```python ...
diff --git a/Orange/widgets/data/owselectcolumns.py b/Orange/widgets/data/owselectcolumns.py --- a/Orange/widgets/data/owselectcolumns.py +++ b/Orange/widgets/data/owselectcolumns.py @@ -168,7 +168,7 @@ settingsHandler = SelectAttributesDomainContextHandler(first_match=False) domain_role_hints = ContextSettin...
diff --git a/Orange/widgets/data/tests/test_owselectcolumns.py b/Orange/widgets/data/tests/test_owselectcolumns.py --- a/Orange/widgets/data/tests/test_owselectcolumns.py +++ b/Orange/widgets/data/tests/test_owselectcolumns.py @@ -415,7 +415,7 @@ def test_select_new_features(self): """ - When sel...
null
null
namanjain12/orange3_final:a4c46c8ccad1f694d1a78f7b929cd861bd179237
true
null
1
10
null
2,023
0
0.75
1
0.6375
1
0.3705
81.03025
6,555
swe_bench::test::951
swe_bench
test
951
matplotlib__matplotlib-13984
matplotlib/matplotlib
matplotlib/matplotlib
python
76db50151a65927c19c83a8c3c195c87dbcc0556
Tick mark color cannot be set on Axes3D As [mentioned on StackOverflow](https://stackoverflow.com/questions/53549960/setting-tick-colors-of-matplotlib-3d-plot/), the `ax.tick_params` method does not change the color of tick marks on `Axes3D`, only the color of tick labels. Several workarounds were proposed, and accordi...
Something to do with https://github.com/matplotlib/matplotlib/blob/2c1cd6bb0f4037805011b082258c6c3923e4cf29/lib/mpl_toolkits/mplot3d/axis3d.py#L439 which overwrites the line color. This seems to be some external setting, but I'm not enough into the 3d toolkit to know how to fix it properly. Ah, yes, I remember now. ...
diff --git a/lib/mpl_toolkits/mplot3d/axis3d.py b/lib/mpl_toolkits/mplot3d/axis3d.py --- a/lib/mpl_toolkits/mplot3d/axis3d.py +++ b/lib/mpl_toolkits/mplot3d/axis3d.py @@ -81,8 +81,7 @@ def __init__(self, adir, v_intervalx, d_intervalx, axes, *args, 'ha': 'center'}, 'tick': ...
diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py --- a/lib/mpl_toolkits/tests/test_mplot3d.py +++ b/lib/mpl_toolkits/tests/test_mplot3d.py @@ -924,3 +924,20 @@ def test_proj3d_deprecated(): with pytest.warns(MatplotlibDeprecationWarning): proj3d.proj_trans_cli...
["lib/mpl_toolkits/tests/test_mplot3d.py::test_ax3d_tickcolour"]
["lib/mpl_toolkits/tests/test_mplot3d.py::test_aspect_equal_error", "lib/mpl_toolkits/tests/test_mplot3d.py::test_bar3d[png]", "lib/mpl_toolkits/tests/test_mplot3d.py::test_bar3d_shaded[png]", "lib/mpl_toolkits/tests/test_mplot3d.py::test_bar3d_notshaded[png]", "lib/mpl_toolkits/tests/test_mplot3d.py::test_contour3d[pn...
null
true
2019-04-18T11:21:30Z
1
12
1
1,070
0
0.8
1
0.55
1
0.218333
81.03
6,556
swe_smith::train::10013
swe_smith
train
10,013
google__textfsm.c31b6007.func_pm_ctrl_shuffle__3zats9yl
swesmith/google__textfsm.c31b6007
google/textfsm
python
null
# KeyValue method in CliTable is broken ## Description I've discovered an issue with the `KeyValue` method in the `CliTable` class. When trying to use this method, I'm getting an AttributeError. This is causing problems when trying to sort tables or retrieve key values from rows. ## Steps to reproduce Here's a simp...
diff --git a/textfsm/clitable.py b/textfsm/clitable.py index c7ad7a7..6037249 100755 --- a/textfsm/clitable.py +++ b/textfsm/clitable.py @@ -388,8 +388,12 @@ class CliTable(texttable.TextTable): sorted_list.append(header) return sorted_list - def KeyValue(self, row=None): - """Returns the super key ...
["tests/clitable_test.py::UnitTestCliTable::testKeyValue", "tests/clitable_test.py::UnitTestCliTable::testTableSort"]
["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.p...
jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007
true
null
1
14
2
1,230
0
0.6
1
0.75
1
0.251667
81.03
6,557
swe_smith::train::47866
swe_smith
train
47,866
sqlfluff__sqlfluff.50a1c4b6.func_basic__eqtdi9yy
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Segment validation logic broken for single whitespace segments #### Description The `validate_non_code_ends` method in BaseSegment has incorrect validation logic when dealing with segments that contain only whitespace. The method is supposed to check that segments don't start or end with whitespace, but the current i...
diff --git a/src/sqlfluff/core/parser/segments/base.py b/src/sqlfluff/core/parser/segments/base.py index 533fca3..06526ba 100644 --- a/src/sqlfluff/core/parser/segments/base.py +++ b/src/sqlfluff/core/parser/segments/base.py @@ -1157,7 +1157,7 @@ class BaseSegment(metaclass=SegmentMetaclass): return segment.is...
["test/core/parser/segments/segments_base_test.py::test__parser_base_segments_validate_non_code_ends[list_in3-True]"]
["test/core/parser/segments/segments_base_test.py::test__parser__base_segments_type", "test/core/parser/segments/segments_base_test.py::test__parser__base_segments_class_types", "test/core/parser/segments/segments_base_test.py::test__parser__base_segments_descendant_type_set", "test/core/parser/segments/segments_base_t...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
24
1
1,030
0
0.6
1
0.75
1
0.251667
81.03
6,558
swe_smith::train::7124
swe_smith
train
7,124
cantools__cantools.0c6a7871.combine_module__4lmf912q
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
CDD file loading broken - DIDs appear in wrong order and lookups fail When loading CDD files, the DIDs are being loaded in reverse order and the name/identifier lookup dictionaries are getting corrupted. This causes various issues when trying to access DIDs by name or identifier. #### Steps to Reproduce ```python im...
diff --git a/src/cantools/database/diagnostics/database.py b/src/cantools/database/diagnostics/database.py index de312e8..9b47309 100644 --- a/src/cantools/database/diagnostics/database.py +++ b/src/cantools/database/diagnostics/database.py @@ -36,7 +36,8 @@ class Database: """ - self.add_cdd_string...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanTo...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
2
24
7
1,030
0
0.6
1
0.75
1
0.251667
81.03
6,559
swe_smith::train::19603
swe_smith
train
19,603
kurtmckee__feedparser.cad965a3.combine_file__1bc7c007
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
iTunes namespace parsing broken after recent changes #### Description The iTunes namespace parsing is not working correctly. When parsing feeds with iTunes-specific elements like `<itunes:summary>`, `<itunes:keywords>`, and `<itunes:block>`, the parser is producing unexpected results or throwing errors. #### Steps/C...
diff --git a/feedparser/namespaces/itunes.py b/feedparser/namespaces/itunes.py index 67d6803..594c6a4 100644 --- a/feedparser/namespaces/itunes.py +++ b/feedparser/namespaces/itunes.py @@ -44,7 +44,7 @@ class Namespace: self._end_author() def _end_itunes_category(self): - self._end_category() + ...
["tests/test_well_formed.py::test_strict_parser[info30]", "tests/test_well_formed.py::test_strict_parser[info52]", "tests/test_well_formed.py::test_strict_parser[info42]", "tests/test_well_formed.py::test_strict_parser[info55]", "tests/test_well_formed.py::test_loose_parser[info45]", "tests/test_well_formed.py::test_st...
["tests/test_json.py::test_json[path0]", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_multiple_mapping_target_2", "tests/test_feedparser_dict.py::test_category", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparse...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
10
34
1,310
0
0.6
1
0.75
1
0.251667
81.03
6,560
swe_smith::train::38812
swe_smith
train
38,812
pallets__jinja.ada0a9a6.func_basic__20cgd1t5
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Context initialization broken with template inheritance and scoped blocks #### Description Template rendering fails when using template inheritance with scoped blocks. The context object appears to be incorrectly initialized, causing KeyError exceptions when trying to access block names and variables. #### Steps/Cod...
diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py index 9dcc9d4..b089c19 100644 --- a/src/jinja2/runtime.py +++ b/src/jinja2/runtime.py @@ -170,18 +170,15 @@ class Context: blocks: t.Dict[str, t.Callable[["Context"], t.Iterator[str]]], globals: t.Optional[t.MutableMapping[str, t.Any]] = None,...
["tests/test_async.py::test_async_blocks[asyncio]", "tests/test_async.py::test_async_blocks[trio]", "tests/test_async.py::TestAsyncImports::test_import_with_globals", "tests/test_async.py::TestAsyncImports::test_import_with_globals_override", "tests/test_async.py::TestAsyncImports::test_from_import_with_globals", "test...
["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
15
35
1,209
0
0.6
1
0.75
1
0.2515
81.0295
6,561
swe_smith::train::44553
swe_smith
train
44,553
pydata__patsy.a5d16484.pr_212
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
### Bug report **Bug summary** The recent changes to the `asarray_or_pandas` function seem to have introduced an issue where it fails to handle certain inputs correctly, resulting in unexpected behavior. This appears to be related to the handling of the `copy` parameter. **Steps to reproduce** Here's a minimal examp...
diff --git a/patsy/util.py b/patsy/util.py index 2c1c19d..426bc11 100644 --- a/patsy/util.py +++ b/patsy/util.py @@ -65,18 +65,8 @@ else: ) have_pandas_categorical_dtype = _pandas_is_categorical_dtype is not None -# The handling of the `copy` keyword has been changed since numpy>=2. -# https://numpy.org/dev...
["patsy/test_highlevel.py::test_formula_likes", "patsy/test_highlevel.py::test_builtins", "patsy/test_highlevel.py::test_incremental", "patsy/test_state.py::test_Center", "patsy/test_state.py::test_stateful_transform_wrapper", "patsy/util.py::test_asarray_or_pandas"]
["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
13
6
1,249
0
0.6
1
0.75
1
0.2515
81.0295
6,562
swe_smith::train::21019
swe_smith
train
21,019
tobymao__sqlglot.036601ba.func_pm_remove_cond__yi8ojspf
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Column validation not working after qualify_columns optimization #### Description The `validate_qualify_columns` function is not properly validating unqualified columns anymore. SQL queries that should raise `OptimizeError` for ambiguous or unresolvable columns are now passing validation without any errors. #### Ste...
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..25ea326 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -116,29 +116,13 @@ def validate_qualify_columns(expression: E) -> E: """Raise an `OptimizeError` if any col...
["tests/test_optimizer.py::TestOptimizer::test_qualify_columns__invalid"]
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
18
1
1,149
0
0.6
1
0.75
1
0.2515
81.0295
6,563
swe_smith::train::47125
swe_smith
train
47,125
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__delyzie0
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
DTLS handshake fragment decoding fails with UnboundLocalError #### Description When processing DTLS handshake fragments, the code fails with an `UnboundLocalError` for variables that should be defined during the decoding process. #### Steps/Code to Reproduce ```python import trio from trio._dtls import decode_hands...
diff --git a/src/trio/_dtls.py b/src/trio/_dtls.py index 7f4bccc..5d56dcc 100644 --- a/src/trio/_dtls.py +++ b/src/trio/_dtls.py @@ -213,6 +213,20 @@ class HandshakeFragment: def decode_handshake_fragment_untrusted(payload: bytes) -> HandshakeFragment: + return HandshakeFragment( + msg_type, + msg...
["src/trio/_tests/test_dtls.py::test_smoke[ipv4]", "src/trio/_tests/test_dtls.py::test_smoke[ipv6]", "src/trio/_tests/test_dtls.py::test_implicit_handshake", "src/trio/_tests/test_dtls.py::test_full_duplex", "src/trio/_tests/test_dtls.py::test_channel_closing", "src/trio/_tests/test_dtls.py::test_client_multiplex", "sr...
["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
31
21
889
0
0.6
1
0.75
1
0.2515
81.0295
6,564
swe_smith::train::20164
swe_smith
train
20,164
kurtmckee__feedparser.cad965a3.lm_rewrite__ixg2yzto
swesmith/kurtmckee__feedparser.cad965a3
kurtmckee/feedparser
python
null
Unexpected KeyError and AssertionError in GUID Handling Description I've encountered some issues with the GUID handling in the feedparser library after a recent update. It seems that certain feeds are causing unexpected KeyError and AssertionError exceptions. This is particularly noticeable when parsing feeds that in...
diff --git a/feedparser/namespaces/_base.py b/feedparser/namespaces/_base.py index 6299b02..7bb9ca0 100644 --- a/feedparser/namespaces/_base.py +++ b/feedparser/namespaces/_base.py @@ -388,12 +388,11 @@ class Namespace: def _end_guid(self): value = self.pop("id") - self._save("guidislink", self.g...
["tests/test_well_formed.py::test_strict_parser[info1648]", "tests/test_well_formed.py::test_loose_parser[info1157]", "tests/test_well_formed.py::test_loose_parser[info1606]", "tests/test_well_formed.py::test_loose_parser[info1648]", "tests/test_well_formed.py::test_strict_parser[info1512]", "tests/test_well_formed.py:...
["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te...
jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3
true
null
1
11
16
1,289
0
0.6
1
0.75
1
0.2515
81.0295
6,565
swe_smith::train::36480
swe_smith
train
36,480
lincolnloop__python-qrcode.456b01d4.combine_file__qza4ffxs
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
**Issue Text** # PyPNGImage fails to generate QR codes due to incorrect condition check ## Description When trying to generate QR codes using the PyPNGImage factory, I'm getting an ImportError even though the PyPNG library is installed. It seems like there's an issue with the condition check in the `new_image` metho...
diff --git a/qrcode/image/pure.py b/qrcode/image/pure.py index 5a8b2c5..70395ba 100644 --- a/qrcode/image/pure.py +++ b/qrcode/image/pure.py @@ -14,10 +14,10 @@ class PyPNGImage(BaseImage): needs_drawrect = False def new_image(self, **kwargs): - if not PngWriter: + if PngWriter: r...
["qrcode/tests/test_qrcode_pypng.py::test_render_pypng", "qrcode/tests/test_qrcode_pypng.py::test_render_pypng_to_str"]
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
8
2
1,349
0
0.6
1
0.75
1
0.2515
81.0295
6,566
swe_smith::train::1702
swe_smith
train
1,702
agronholm__typeguard.b6a7e438.combine_module__c4lfqgzl
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
suppress_type_checks context manager not working properly #### Description The `suppress_type_checks` context manager appears to be broken and is not suppressing type checks as expected. When using it, type checking still occurs and RecursionErrors are being raised in various scenarios. #### Steps/Code to Reproduce ...
diff --git a/src/typeguard/_suppression.py b/src/typeguard/_suppression.py index bbbfbfb..84f02eb 100644 --- a/src/typeguard/_suppression.py +++ b/src/typeguard/_suppression.py @@ -60,7 +60,7 @@ def suppress_type_checks( assert func is not None try: - return func(*args, **kwargs) + ...
["tests/test_checkers.py::test_suppressed_checking", "tests/test_checkers.py::test_suppressed_checking_exception", "tests/test_checkers.py::test_check_against_tuple_failure", "tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_suppression.py::test_context...
["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
2
8
45
1,348
0
0.6
1
0.75
1
0.251333
81.029
6,567
swe_smith::train::43780
swe_smith
train
43,780
pydata__patsy.a5d16484.combine_file__cgt1od7e
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Standardize transform produces incorrect results with wrong array dimensions #### Description The `Standardize` transform is producing incorrect results due to array dimension mismatches in the computation. When using the standardize function, it fails with broadcasting errors and produces unexpected outputs. #### S...
diff --git a/patsy/state.py b/patsy/state.py index 8d674ba..624929a 100644 --- a/patsy/state.py +++ b/patsy/state.py @@ -53,9 +53,9 @@ def stateful_transform(class_): @wraps(class_) def stateful_transform_wrapper(*args, **kwargs): transform = class_() - transform.memorize_chunk(*args, **kwargs...
["patsy/mgcv_cubic_splines.py::test_crs_errors", "patsy/mgcv_cubic_splines.py::test_te_errors", "patsy/mgcv_cubic_splines.py::test_te_1smooth", "patsy/splines.py::test_bs_0degree", "patsy/splines.py::test_bs_errors", "patsy/test_state.py::test_Standardize"]
["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
17
6
1,168
0
0.6
1
0.75
1
0.251333
81.029
6,568
swe_smith::train::46607
swe_smith
train
46,607
python-trio__trio.cfbbe2c1.combine_file__dr2tjt6n
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Traceback concatenation returns None instead of concatenated traceback #### Description When concatenating tracebacks using the internal `concat_tb` function, the function returns `None` instead of the properly concatenated traceback object. #### Steps/Code to Reproduce ```python import trio._core._concat_tb as con...
diff --git a/src/trio/_core/_concat_tb.py b/src/trio/_core/_concat_tb.py index a146961..66f8d6a 100644 --- a/src/trio/_core/_concat_tb.py +++ b/src/trio/_core/_concat_tb.py @@ -46,7 +46,6 @@ except ImportError: ] def copy_tb(base_tb: TracebackType, tb_next: TracebackType | None) -> TracebackType: - ...
["src/trio/_core/_tests/test_exceptiongroup_gc.py::test_concat_tb"]
["src/trio/_core/_tests/test_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
32
1
868
0
0.6
1
0.75
1
0.251333
81.029
6,569
swe_smith::train::9577
swe_smith
train
9,577
marshmallow-code__webargs.dbde72fe.func_basic__12macmpi
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
Parser error handling broken - exceptions not properly raised #### Description The error handling in the Parser class is not working correctly. When validation errors occur, they're being logged at the wrong level and in some cases the exceptions are being swallowed entirely instead of being raised. #### Steps/Code ...
diff --git a/src/webargs/core.py b/src/webargs/core.py index 44294e9..fccc25b 100644 --- a/src/webargs/core.py +++ b/src/webargs/core.py @@ -884,5 +884,9 @@ class Parser(typing.Generic[Request]): """Called if an error occurs while parsing args. By default, just logs and raises ``error``. """ ...
["tests/test_core.py::test_parse_with_unknown_behavior_specified[schema_instance]", "tests/test_core.py::test_parse_with_unknown_behavior_specified[parse_call]", "tests/test_core.py::test_parse_with_unknown_behavior_specified[parser_default]", "tests/test_core.py::test_parse_with_unknown_behavior_specified[parser_class...
["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
8
36
1,348
0
0.6
1
0.75
1
0.251333
81.029
6,570
swe_smith::train::46018
swe_smith
train
46,018
conan-io__conan.86f29e13.pr_12517
swesmith/conan-io__conan.86f29e13
conan-io/conan
python
null
Environment variable custom placeholder not functioning as expected Description How to reproduce: 1. Create an environment and append a path to a variable: ```python env = Environment() env.append_path('MyVar', 'MyValue') ``` 2. Retrieve the environment variables using a mock Conan file: ```python ...
diff --git a/conan/tools/env/environment.py b/conan/tools/env/environment.py index b5ef89f..5def597 100644 --- a/conan/tools/env/environment.py +++ b/conan/tools/env/environment.py @@ -356,36 +356,16 @@ class EnvVars: def keys(self): return self._values.keys() - def get(self, name, default=None, vari...
["test/unittests/tools/env/test_env.py::test_custom_placeholder"]
["test/integration/environment/test_env.py::test_complete[True]", "test/integration/environment/test_env.py::test_complete[False]", "test/integration/environment/test_env.py::test_profile_included_multiple", "test/integration/environment/test_env.py::test_profile_buildenv", "test/integration/environment/test_env.py::te...
jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13
true
null
1
34
1
827
0
0.6
1
0.75
1
0.251167
81.0285
6,571
swe_smith::train::31769
swe_smith
train
31,769
davidhalter__parso.338a5760.combine_file__8diiyw0q
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
Cache system broken after recent changes #### Description The cache system appears to be completely broken. When trying to parse files, I'm getting various errors related to cache operations and file system access. #### Steps/Code to Reproduce ```python import parso # Simple parsing that should work code = "x = 1"...
diff --git a/parso/cache.py b/parso/cache.py index 5592a9f..e68b62b 100644 --- a/parso/cache.py +++ b/parso/cache.py @@ -102,12 +102,12 @@ parser_cache: Dict[str, Any] = {} class _NodeCacheItem: def __init__(self, node, lines, change_time=None): - self.node = node - self.lines = lines + sel...
["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.py::test_cache_last_used_update[False-True]", "test/test_cache.py::test_...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
1
27
10
966
0
0.6
1
0.75
1
0.251
81.028
6,572
swe_smith::train::51036
swe_smith
train
51,036
marshmallow-code__apispec.8b421526.combine_file__0b5bc0wh
swesmith/marshmallow-code__apispec.8b421526
marshmallow-code/apispec
python
null
APISpec.to_yaml() method fails with TypeError when called #### Description The `to_yaml()` method in APISpec is throwing a TypeError when trying to convert the spec to YAML format. This appears to be related to incorrect argument passing to the underlying YAML conversion function. #### Steps/Code to Reproduce ```py...
diff --git a/src/apispec/core.py b/src/apispec/core.py index e9ccb40..d0e0cc7 100644 --- a/src/apispec/core.py +++ b/src/apispec/core.py @@ -323,22 +323,26 @@ class Components: def _resolve_refs_in_schema(self, schema: dict) -> None: if "properties" in schema: - for key in schema["properties"...
["tests/test_core.py::TestComponents::test_to_yaml[2.0]", "tests/test_core.py::TestComponents::test_to_yaml[3.0.0]", "tests/test_core.py::TestComponents::test_components_resolve_refs_in_schema[2.0]", "tests/test_core.py::TestComponents::test_components_resolve_refs_in_schema[3.0.0]", "tests/test_core.py::TestComponents...
["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
17
15
1,166
0
0.6
1
0.75
1
0.251
81.028
6,573
swe_smith::train::47331
swe_smith
train
47,331
sqlfluff__sqlfluff.50a1c4b6.combine_file__1of808lw
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Simple API functions returning unexpected results #### Description The simple API functions `lint()` and `fix()` are not working correctly. When calling `lint()`, it returns an IndexError, and `fix()` returns empty strings instead of the expected fixed SQL. #### Steps/Code to Reproduce ```python import sqlfluff # ...
diff --git a/src/sqlfluff/api/simple.py b/src/sqlfluff/api/simple.py index 1d91187..3ff898e 100644 --- a/src/sqlfluff/api/simple.py +++ b/src/sqlfluff/api/simple.py @@ -22,13 +22,6 @@ def get_simple_config( # Create overrides for simple API arguments. overrides: ConfigMappingType = {} if dialect is not N...
["test/api/simple_test.py::test__api__lint_string_without_violations", "test/api/simple_test.py::test__api__lint_string", "test/api/simple_test.py::test__api__lint_string_specific", "test/api/simple_test.py::test__api__lint_string_specific_single", "test/api/simple_test.py::test__api__lint_string_specific_exclude", "te...
["test/api/simple_test.py::test__api__parse_string", "test/api/simple_test.py::test__api__parse_fail", "test/api/simple_test.py::test__api__config_path", "test/api/simple_test.py::test__api__parse_exceptions"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
26
15
986
0
0.6
1
0.75
1
0.251
81.028
6,574
swe_smith::train::19487
swe_smith
train
19,487
seperman__deepdiff.ed252022.lm_rewrite__7rb3dfl2
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
### Issue: Delta Element Setting Fails with IndexError #### Description When attempting to set an element value in a list using the `_simple_set_elem_value` method, an `IndexError` is raised unexpectedly. This occurs when the index specified is equal to the length of the list, which should ideally append the value to ...
diff --git a/deepdiff/delta.py b/deepdiff/delta.py index 8bafc9a..afb3e5a 100644 --- a/deepdiff/delta.py +++ b/deepdiff/delta.py @@ -275,26 +275,22 @@ class Delta: path_for_err_reporting)) return current_old_value - def _simple_set_elem_value(self, obj, path_for_err_reporting, elem=No...
["tests/test_delta.py::TestBasicsOfDelta::test_list_difference_add_delta", "tests/test_delta.py::TestBasicsOfDelta::test_list_difference_dump_delta", "tests/test_delta.py::TestBasicsOfDelta::test_multiple_delta", "tests/test_delta.py::TestBasicsOfDelta::test_delta_dump_and_read1", "tests/test_delta.py::TestBasicsOfDelt...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
16
29
1,186
0
0.6
1
0.75
1
0.251
81.028
6,575
swe_smith::train::32465
swe_smith
train
32,465
pydantic__pydantic.acb0f10f.func_pm_class_rm_funcs__2n578xvi
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
ByteSize.human_readable method missing after recent changes #### Description The `human_readable` method on `ByteSize` instances is no longer available, causing `AttributeError` when trying to call it. #### Steps/Code to Reproduce ```python from pydantic import ByteSize # Create a ByteSize instance size = ByteSize...
diff --git a/pydantic/types.py b/pydantic/types.py index 02e61dd..409b15c 100644 --- a/pydantic/types.py +++ b/pydantic/types.py @@ -2135,37 +2135,6 @@ class ByteSize(int): return cls(int(float(scalar) * unit_mult)) - def human_readable(self, decimal: bool = False, separator: str = '') -> str: - ...
["tests/test_docs.py::test_docstrings_examples[pydantic/types.py:2042-2063]", "tests/test_docs.py::test_docstrings_examples[pydantic/types.py:2481-2527]", "tests/test_docs.py::test_docstrings_examples[pydantic/types.py:2580-2626]", "tests/test_docs.py::test_docstrings_examples[pydantic/types.py:2691-2720]", "tests/test...
["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
32
13
866
0
0.6
1
0.75
1
0.251
81.028
6,576
swe_smith::train::55593
swe_smith
train
55,593
RoaringBitmap__roaring.09c46a0a.func_pm_op_change__8hc6rob8
swesmith/RoaringBitmap__roaring.09c46a0a
roaringbitmap/roaring
go
null
RemoveRange causes index out of range panic with certain range values #### Description When calling `RemoveRange` on a Bitmap with specific range values, the function panics with "runtime error: index out of range [-2]". This appears to happen when the range calculation results in negative indices being passed to int...
diff --git a/roaring64/roaring64.go b/roaring64/roaring64.go index 8ce7f4f..cdd3b1b 100644 --- a/roaring64/roaring64.go +++ b/roaring64/roaring64.go @@ -1083,7 +1083,7 @@ func (rb *Bitmap) RemoveRange(rangeStart, rangeEnd uint64) { hbStart := uint64(highbits(rangeStart)) lbStart := uint64(lowbits(rangeStart)) hbL...
["TestRoaringRangeEnd"]
["TestParAggregations", "TestParAggregations/par1", "TestParAggregations/par1/simple_case", "TestParAggregations/par1/aggregate_nothing", "TestParAggregations/par1/single_bitmap", "TestParAggregations/par1/empty_and_single_elem_bitmaps", "TestParAggregations/par1/two_single_elem_disjoint_sets", "TestParAggregations/par...
jyangballin/swesmith.x86_64.roaringbitmap_1776_roaring.09c46a0a
true
null
1
12
1
1,266
0
0.6
1
0.75
1
0.251
81.028
6,577
swe_smith::train::47287
swe_smith
train
47,287
python-trio__trio.cfbbe2c1.lm_rewrite__m6s6dapo
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
TypeError in `close_all` context manager when handling socket exceptions While working with the `close_all` context manager, I encountered a `TypeError` when attempting to handle exceptions during socket closure. The issue arises when multiple exceptions are raised, and the context manager tries to group them together...
diff --git a/src/trio/_highlevel_open_tcp_stream.py b/src/trio/_highlevel_open_tcp_stream.py index d4ec983..0917fcf 100644 --- a/src/trio/_highlevel_open_tcp_stream.py +++ b/src/trio/_highlevel_open_tcp_stream.py @@ -116,23 +116,35 @@ DEFAULT_DELAY = 0.250 # Twisted and Tornado always uses default flags. I think we'll...
["src/trio/_tests/test_highlevel_open_tcp_listeners.py::test_open_tcp_listeners_ipv6_v6only", "src/trio/_tests/test_highlevel_open_tcp_stream.py::test_close_all", "src/trio/_tests/test_highlevel_open_tcp_stream.py::test_open_tcp_stream_real_socket_smoketest", "src/trio/_tests/test_highlevel_open_tcp_stream.py::test_loc...
["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
32
27
866
0
0.6
1
0.75
1
0.251
81.028
6,578
r2e_gym::train::6290
r2e_gym
train
6,290
pillow__3f24276bf2ab8c29b2c3aa96f5bca2b60b9f3340
pillow
python-pillow/pillow
python
3f24276bf2ab8c29b2c3aa96f5bca2b60b9f3340
**Analysis:** - **Key Parts:** - **Commit Message:** Fixed writing multiple StripOffsets to TIFF. - **Commit Patch:** Removed the `NotImplementedError` for multistrip support and implemented handling of multiple StripOffsets. - **Test Results:** Previously, the test `test_save_multiple_stripoffsets` failed with ...
diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -991,9 +991,11 @@ if stripoffsets is not None: tag, typ, count, value, data = entries[stripoffsets] if data: - msg = "multistrip sup...
diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -108,7 +108,8 @@ assert_image_equal_tofile(im, "Tests/images/hopper.tif") with Image.open("Tests/images/hopper_bigtiff.tif") as im: - # multistrip support not ...
null
null
namanjain12/pillow_final:3f24276bf2ab8c29b2c3aa96f5bca2b60b9f3340
true
null
1
8
null
2,058
0
0.75
1
0.6375
1
0.369667
81.02775
6,579
swe_smith::train::32468
swe_smith
train
32,468
pydantic__pydantic.acb0f10f.func_pm_class_rm_funcs__9tompqjl
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
MultiHost URL path property missing after recent changes #### Description The `path` property is no longer available on multi-host URL types like `PostgresDsn`, `MongoDsn`, etc. This breaks existing code that relies on accessing the path component of these URLs. #### Steps/Code to Reproduce ```python from pydantic ...
diff --git a/pydantic/networks.py b/pydantic/networks.py index cae8238..cde4668 100644 --- a/pydantic/networks.py +++ b/pydantic/networks.py @@ -348,14 +348,6 @@ class _BaseMultiHostUrl: """ return self._url.scheme - @property - def path(self) -> str | None: - """The path part of the UR...
["tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:562-591]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:599-614]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:686-733]", "tests/test_docs.py::test_docstrings_examples[pydantic/networks.py:955-963]", "tests/...
["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_...
jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f
true
null
1
19
28
1,125
0
0.6
1
0.75
1
0.250833
81.0275
6,580
swe_smith::train::18753
swe_smith
train
18,753
seperman__deepdiff.ed252022.func_basic__6dep599l
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
Distance calculation produces incorrect results when comparing arrays #### Description When using DeepDiff with `ignore_order=True` and distance calculations, the results are incorrect. The distance values and comparisons seem to be swapped or calculated incorrectly. #### Steps/Code to Reproduce ```python from deep...
diff --git a/deepdiff/distance.py b/deepdiff/distance.py index d2dc2fe..edd98cd 100644 --- a/deepdiff/distance.py +++ b/deepdiff/distance.py @@ -98,37 +98,36 @@ class DistanceMixin: def _precalculate_numpy_arrays_distance( self, hashes_added, hashes_removed, t1_hashtable, t2_hashtable, _original_type)...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::test_cache_1D_array_of_numbers_that_overlap", "tests/test_delta.py::TestBasicsOfDelta::test_raise_error", "tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_order_case3]", "tests/test_delt...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
25
29
1,005
0
0.6
1
0.75
1
0.250833
81.0275
6,581
swe_smith::train::30
swe_smith
train
30
oauthlib__oauthlib.1fd52536.combine_file__6cwt9dv9
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
#### Description The `list_to_scope` function doesn't properly handle string inputs anymore and the `params_from_uri` function returns early without processing scope parameters. #### Steps/Code to Reproduce ```python from oauthlib.oauth2.rfc6749.utils import list_to_scope, params_from_uri # This should return the s...
diff --git a/oauthlib/oauth2/rfc6749/utils.py b/oauthlib/oauth2/rfc6749/utils.py index 7dc27b3..982aa1d 100644 --- a/oauthlib/oauth2/rfc6749/utils.py +++ b/oauthlib/oauth2/rfc6749/utils.py @@ -13,13 +13,12 @@ from oauthlib.common import urldecode def list_to_scope(scope): """Convert a list of scopes to a space ...
["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/oauth2/rfc6749/test_utils.py::UtilsTests::test_list_to_scope", "tests/oauth2/rfc6749/test_...
["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
23
5
1,045
0
0.6
1
0.75
1
0.250833
81.0275
6,582
swe_smith::train::39625
swe_smith
train
39,625
pallets__jinja.ada0a9a6.lm_rewrite__vry974ol
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
# Binary operator parenthesizing issue in Jinja2 templates I found an issue with how binary operators are parenthesized in Jinja2 templates. When using binary operators in a template, the closing parenthesis is incorrectly placed, causing unexpected behavior. Here is an example: ```python from jinja2 import Environm...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..55b7475 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -58,9 +58,11 @@ def optimizeconst(f: F) -> F: return update_wrapper(new_func, f) # type: ignore[return-value] -def _make_binop(op: str) -> t.Callable[["CodeGe...
["tests/test_security.py::TestSandbox::test_binary_operator_intercepting"]
["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
1
1,265
0
0.6
1
0.75
1
0.250833
81.0275
6,583
swe_smith::train::4932
swe_smith
train
4,932
bottlepy__bottle.a8dfef30.func_pm_ctrl_shuffle__3qht9uwo
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
FileUpload.filename property fails with NameError on unicode check #### Description The `FileUpload.filename` property raises a `NameError` when processing filenames due to an undefined `unicode` reference in Python 3. #### Steps/Code to Reproduce ```python import bottle from io import BytesIO # Create a mock file...
diff --git a/bottle.py b/bottle.py index 286b5bc..a5aaf49 100755 --- a/bottle.py +++ b/bottle.py @@ -2740,6 +2740,15 @@ class FileUpload(object): @cached_property def filename(self): + fname = self.raw_filename + fname = fname.encode('ASCII', 'ignore').decode('ASCII') + fname = re.sub(r...
["test/test_fileupload.py::TestFileUpload::test_filename"]
["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
19
1
1,124
0
0.6
1
0.75
1
0.250667
81.027
6,584
swe_smith::train::35029
swe_smith
train
35,029
pyutils__line_profiler.a646bf0f.func_pm_ctrl_shuffle__kogi5cjr
swesmith/pyutils__line_profiler.a646bf0f
pyutils/line_profiler
python
null
GlobalProfiler.show() method executes lprof output code before variable declarations #### Description The `GlobalProfiler.show()` method has a code ordering issue where the lprof output generation code block is executed before the necessary variables are declared, causing `NameError` when trying to access undefined v...
diff --git a/line_profiler/explicit_profiler.py b/line_profiler/explicit_profiler.py index 0cac00c..6e714a5 100644 --- a/line_profiler/explicit_profiler.py +++ b/line_profiler/explicit_profiler.py @@ -331,19 +331,27 @@ class GlobalProfiler: return self._profile(func) def show(self): + + if write_...
["tests/test_complex_case.py::test_varied_complex_invocations", "tests/test_explicit_profile.py::test_explicit_profile_with_environ_on", "tests/test_explicit_profile.py::test_explicit_profile_with_cmdline", "tests/test_explicit_profile.py::test_explicit_profile_with_in_code_enable", "tests/test_explicit_profile.py::tes...
["tests/test_autoprofile.py::test_single_function_autoprofile", "tests/test_autoprofile.py::test_multi_function_autoprofile", "tests/test_autoprofile.py::test_duplicate_function_autoprofile", "tests/test_autoprofile.py::test_autoprofile_script_with_module", "tests/test_autoprofile.py::test_autoprofile_module", "tests/t...
jyangballin/swesmith.x86_64.pyutils_1776_line_profiler.a646bf0f
true
null
1
23
5
1,044
0
0.6
1
0.75
1
0.250667
81.027
6,585
swe_smith::train::36720
swe_smith
train
36,720
lincolnloop__python-qrcode.456b01d4.lm_rewrite__e55jp1n1
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
# TypeError not raised when providing invalid mask pattern type ## Description I found a bug in the QR code library when providing an invalid mask pattern type. When creating a QRCode with a non-integer mask pattern (like a string), the library should raise a TypeError, but instead it raises a ValueError. This is in...
diff --git a/qrcode/main.py b/qrcode/main.py index 46116b5..38d06b5 100644 --- a/qrcode/main.py +++ b/qrcode/main.py @@ -41,15 +41,16 @@ def _check_border(size): def _check_mask_pattern(mask_pattern): - if mask_pattern is None: - return - if not isinstance(mask_pattern, int): - raise TypeError(...
["qrcode/tests/test_qrcode.py::test_make_image_with_wrong_pattern", "qrcode/tests/test_qrcode.py::test_mask_pattern_setter"]
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
19
2
1,124
0
0.6
1
0.75
1
0.250667
81.027
6,586
swe_smith::train::9417
swe_smith
train
9,417
jaraco__inflect.c079a96a.lm_rewrite__wc4fd9gl
swesmith/jaraco__inflect.c079a96a
jaraco/inflect
python
null
# millfn doesn't raise NumOutOfRangeError for indices beyond the mill array ## Description The `millfn` method in the `engine` class has been modified to return the largest defined magnitude suffix instead of raising a `NumOutOfRangeError` when the index is out of range. Previously, when an index was provided that w...
diff --git a/inflect/__init__.py b/inflect/__init__.py index 3eef486..00d52af 100644 --- a/inflect/__init__.py +++ b/inflect/__init__.py @@ -3678,11 +3678,20 @@ class engine: else: return self._sub_ord(num) - def millfn(self, ind: int = 0) -> str: - if ind > len(mill) - 1: - ...
["tests/test_pwd.py::Test::test_millfn"]
["inflect/__init__.py::inflect.bysize", "inflect/__init__.py::inflect.engine._handle_long_compounds", "inflect/__init__.py::inflect.engine._handle_prepositional_phrase", "inflect/__init__.py::inflect.engine.compare", "inflect/__init__.py::inflect.engine.ordinal", "inflect/__init__.py::inflect.engine.singular_noun", "in...
jyangballin/swesmith.x86_64.jaraco_1776_inflect.c079a96a
true
null
1
19
1
1,124
0
0.6
1
0.75
1
0.250667
81.027
6,587
swe_smith::train::19139
swe_smith
train
19,139
seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__u63pul9v
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepHash fails with UnboundLocalError when processing objects #### Description When using DeepHash on various object types, an UnboundLocalError is raised for the variable 'd'. This affects hashing of custom objects, enums, named tuples, and other complex data structures. #### Steps/Code to Reproduce ```python from...
diff --git a/deepdiff/deephash.py b/deepdiff/deephash.py index 1f293bd..4bea79c 100644 --- a/deepdiff/deephash.py +++ b/deepdiff/deephash.py @@ -332,10 +332,11 @@ class DeepHash(Base): return ((i, v[0]) for i, v in self.hashes.items()) def _prep_obj(self, obj, parent, parents_ids=EMPTY_FROZENSET, is_nam...
["tests/test_diff_other.py::TestDiffOther::test_multi_processing3_deephash", "tests/test_hash.py::TestDeepHash::test_bad_attribute", "tests/test_hash.py::TestDeepHash::test_re", "tests/test_hash.py::TestDeepHashPrep::test_named_tuples", "tests/test_hash.py::TestDeepHashPrep::test_hash_enum", "tests/test_hash.py::TestDe...
["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach...
jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022
true
null
1
9
18
1,324
0
0.6
1
0.75
1
0.250667
81.027
6,588
swe_smith::train::4857
swe_smith
train
4,857
bottlepy__bottle.a8dfef30.func_basic__sd3dqo1a
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
FileUpload constructor parameters swapped causing attribute errors Description When creating FileUpload instances, the constructor parameters appear to be incorrectly assigned, causing various attribute access errors and unexpected behavior. Steps/Code to Reproduce ```python from bottle import FileUpload from io im...
diff --git a/bottle.py b/bottle.py index 286b5bc..d91beac 100755 --- a/bottle.py +++ b/bottle.py @@ -2723,13 +2723,13 @@ class FileUpload(object): def __init__(self, fileobj, name, filename, headers=None): """ Wrapper for a single file uploaded via ``multipart/form-data``. """ #: Open file(-like)...
["test/test_environ.py::TestRequest::test_multipart", "test/test_fileupload.py::TestFileUpload::test_content_type", "test/test_fileupload.py::TestFileUpload::test_filename", "test/test_fileupload.py::TestFileUpload::test_name", "test/test_fileupload.py::TestFileUpload::test_preserve_case_issue_582", "test/test_fileuplo...
["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
8
10
1,343
0
0.6
1
0.75
1
0.2505
81.0265
6,589
swe_smith::train::23853
swe_smith
train
23,853
sunpy__sunpy.f8edfd5c.func_pm_ctrl_invert_if__e84iqj1g
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Observer coordinate logic inverted when default observer is available #### Description When a map source specifies a default observer coordinate, the observer coordinate property incorrectly returns an Earth-based observer instead of the custom default observer. The logic appears to be inverted - maps with default ob...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..3d0ad18 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -1360,18 +1360,17 @@ class GenericMap(NDData): default = self._default_observer_coordinate if default is not None: - # If a map source specifies ...
["sunpy/map/tests/test_mapbase.py::test_remove_observers", "sunpy/map/tests/test_mapbase.py::test_partially_missing_observers", "sunpy/map/tests/test_mapbase.py::test_crota_scale", "sunpy/map/tests/test_mapbase.py::test_missing_metadata_warnings"]
["sunpy/map/tests/test_mapbase.py::test_notes_combined", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_references", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_existing_notes", "sunpy/map/tests/test_mapbase.py::test_notes_combined_no_notes_no_references", "sunpy/map/tests/test_mapbase.py::test_f...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
13
4
1,243
0
0.6
1
0.75
1
0.2505
81.0265
6,590
swe_smith::train::2733
swe_smith
train
2,733
cknd__stackprinter.219fcc52.func_pm_ctrl_shuffle__p7y0on2y
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
UnboundLocalError when calling stackprinter.format() #### Description When calling `stackprinter.format()`, an `UnboundLocalError` is raised for local variable 'function' referenced before assignment. #### Steps/Code to Reproduce ```python import stackprinter # This should work but raises UnboundLocalError msg = s...
diff --git a/stackprinter/extraction.py b/stackprinter/extraction.py index 42ee4ec..76564b5 100644 --- a/stackprinter/extraction.py +++ b/stackprinter/extraction.py @@ -18,6 +18,24 @@ class FrameInfo(_FrameInfo): def get_info(tb_or_frame, lineno=None, suppressed_vars=[]): + + if function in NON_FUNCTION_SCOPES:...
["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting"]
["tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
39
2
723
0
0.6
1
0.75
1
0.2505
81.0265
6,591
swe_smith::train::37898
swe_smith
train
37,898
kayak__pypika.1c9646f0.func_pm_class_rm_funcs__rvufzg55
swesmith/kayak__pypika.1c9646f0
kayak/pypika
python
null
# Missing SQL set operations in _SetOperation class **Describe the bug** After a recent update, several SQL set operations are no longer working. Specifically, the `intersect` and `minus` operations are failing when trying to use them in queries. **To Reproduce** Steps to reproduce the behavior: ```python from pypik...
diff --git a/pypika/queries.py b/pypika/queries.py index 42c7c45..53c46cb 100644 --- a/pypika/queries.py +++ b/pypika/queries.py @@ -592,18 +592,10 @@ class _SetOperation(Selectable, Term): def union_all(self, other: Selectable) -> "_SetOperation": self._set_operation.append((SetOperation.union_all, other...
["pypika/tests/test_joins.py::UnionTests::test_mysql_query_wraps_unioned_queries", "pypika/tests/test_joins.py::IntersectTests::test_intersect_multiple", "pypika/tests/test_joins.py::IntersectTests::test_intersect_with_offset", "pypika/tests/test_joins.py::IntersectTests::test_mysql_query_wraps_intersected_queries", "p...
["pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_0__ridley_scott_jimi_hendrix_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_1__1_2_3_4_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_2__toInt64_1_toInt64_2_toInt64_3_toInt64_4_", "pypika/tests/clickhouse/test_array...
jyangballin/swesmith.x86_64.kayak_1776_pypika.1c9646f0
true
null
1
15
6
1,203
0
0.6
1
0.75
1
0.2505
81.0265
6,592
swe_smith::train::48488
swe_smith
train
48,488
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_cond__rtt2dulh
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
PlaceholderTemplater breaks with UnboundLocalError on param_name Description When using the PlaceholderTemplater, I'm getting an `UnboundLocalError: local variable 'param_name' referenced before assignment` error. This seems to happen when processing SQL templates with placeholder parameters. Steps/Code to Reproduce...
diff --git a/src/sqlfluff/core/templaters/placeholder.py b/src/sqlfluff/core/templaters/placeholder.py index de708a8..a9e5f68 100644 --- a/src/sqlfluff/core/templaters/placeholder.py +++ b/src/sqlfluff/core/templaters/placeholder.py @@ -150,11 +150,6 @@ class PlaceholderTemplater(RawTemplater): param_counter =...
["test/core/templaters/placeholder_test.py::test__templater_raw", "test/core/templaters/placeholder_test.py::test__templater_param_style[no_changes]", "test/core/templaters/placeholder_test.py::test__templater_param_style[colon_simple_substitution]", "test/core/templaters/placeholder_test.py::test__templater_param_styl...
["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
27
21
963
0
0.6
1
0.75
1
0.2505
81.0265
6,593
swe_smith::train::44276
swe_smith
train
44,276
pydata__patsy.a5d16484.func_pm_ctrl_invert_if__cs38r9td
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Categorical factor handling broken after recent changes #### Description After some recent changes, categorical factors are being processed incorrectly. The code seems to be treating categorical factors as numerical factors, which causes assertion errors and incorrect behavior. #### Steps/Code to Reproduce ```pytho...
diff --git a/patsy/build.py b/patsy/build.py index cbe2524..2b41c2c 100644 --- a/patsy/build.py +++ b/patsy/build.py @@ -282,6 +282,12 @@ def _build_subterm(subterm, factor_infos, factor_values, out): ): for factor, column_idx in zip(subterm.factors, column_idxs): if factor_infos[factor].type...
["patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths", "patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_b...
["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__factors_memorize", "patsy/build.py::test__examine_factor_types", "patsy/builtins.py::test_I", "patsy/builtins.py::...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
13
33
1,243
0
0.6
1
0.75
1
0.2505
81.0265
6,594
swe_bench::test::1848
swe_bench
test
1,848
sphinx-doc__sphinx-8697
sphinx-doc/sphinx
sphinx-doc/sphinx
python
596dfba841a2e8c570ab8a916398140f15efd9f5
The reference to the same file is interpreted as a duplicate Tested on Windows 7 64bit machine, Python 2.7.3, Sphinx 1.1.3 If there is reference in various ways to the same resource, it is interpreted as different file with duplicate name. If there is a files structure as follows: ``` #! [source]/ document/ ...
_From Georg Brandl on 2013-03-30 11:44:40+00:00_ Closes #1112: Avoid duplicate download files when referenced from documents in different ways (absolute/relative). → <<cset 181b075251e0f21fa19e4a7be9dd380d392135ae>> _From Georg Brandl on 2013-03-30 11:44:59+00:00_ Thanks for the report! _From [Tawez](https://bitbu...
diff --git a/sphinx/environment/__init__.py b/sphinx/environment/__init__.py --- a/sphinx/environment/__init__.py +++ b/sphinx/environment/__init__.py @@ -10,6 +10,7 @@ import os import pickle +import posixpath import warnings from collections import defaultdict from copy import copy @@ -356,9 +357,9 @@ def relf...
diff --git a/tests/test_environment.py b/tests/test_environment.py --- a/tests/test_environment.py +++ b/tests/test_environment.py @@ -138,6 +138,11 @@ def test_env_relfn2path(app): assert relfn == '../logo.jpg' assert absfn == app.srcdir.parent / 'logo.jpg' + # relative path traversal + relfn, absfn ...
["tests/test_environment.py::test_env_relfn2path"]
["tests/test_environment.py::test_config_status", "tests/test_environment.py::test_images", "tests/test_environment.py::test_object_inventory"]
null
true
2021-01-17T15:07:20Z
1
7
1
1,163
0
0.8
1
0.55
1
0.217167
81.0265
6,595
swe_smith::train::10
swe_smith
train
10
oauthlib__oauthlib.1fd52536.combine_file__1o3hm5l5
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
RequestValidator methods silently fail instead of raising NotImplementedError #### Description Several methods in the OpenID Connect RequestValidator class are supposed to raise NotImplementedError to force subclasses to implement them, but they're returning values instead. This breaks the contract and can lead to si...
diff --git a/oauthlib/openid/connect/core/request_validator.py b/oauthlib/openid/connect/core/request_validator.py index e3cea79..1685e8a 100644 --- a/oauthlib/openid/connect/core/request_validator.py +++ b/oauthlib/openid/connect/core/request_validator.py @@ -75,7 +75,7 @@ class RequestValidator(OAuth2RequestValidator...
["tests/openid/connect/core/test_request_validator.py::RequestValidatorTest::test_method_contracts"]
["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth...
jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536
true
null
1
9
1
1,322
0
0.6
1
0.75
1
0.250333
81.026
6,596
swe_smith::train::52229
swe_smith
train
52,229
pydicom__pydicom.7d361b3d.func_basic__uyv3t3sb
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Dataset.is_implicit_VR setter behavior inverted when config._use_future is False #### Description The `is_implicit_VR` property setter on Dataset objects has inverted behavior when `config._use_future` is False. Instead of raising an AttributeError as expected, it allows setting the attribute, and the boolean logic f...
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..da340b7 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -1348,18 +1348,18 @@ class Dataset: @is_implicit_VR.setter def is_implicit_VR(self, value: bool | None) -> None: name = type(self).__name__ - ...
["tests/test_dataset.py::test_setattr_warns", "tests/test_dataset.py::test_setattr_raises", "tests/test_dataset.py::test_setattr_ignore", "tests/test_dataset.py::TestFuture::test_is_implicit_VR_raises"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
6
4
1,381
0
0.6
1
0.75
1
0.250167
81.0255
6,597
swe_smith::train::44647
swe_smith
train
44,647
mahmoud__glom.fb3c4e76.func_basic__6f28xvmh
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
# Required class has incorrect implementation ## Description The `Required` class in the matching module has several issues that cause unexpected behavior: 1. When initializing a `Required` object with a key, the key is being wrapped with `bbrepr()` instead of being stored directly, causing the actual key value to b...
diff --git a/glom/matching.py b/glom/matching.py index 798ac40..6ad123e 100644 --- a/glom/matching.py +++ b/glom/matching.py @@ -643,12 +643,12 @@ class Required: __slots__ = ('key',) def __init__(self, key): - if type(key) in (Required, Optional): - raise TypeError("double wrapping of Req...
["glom/test/test_match.py::test_double_wrapping", "glom/test/test_match.py::test_sample"]
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
10
2
1,301
0
0.6
1
0.75
1
0.250167
81.0255
6,598
swe_smith::train::27668
swe_smith
train
27,668
arrow-py__arrow.1d70d009.func_pm_class_rm_funcs__d3ec0j9u
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Slavic locale timeframe formatting broken after recent changes #### Description The `_format_timeframe` method for Slavic locales is no longer working properly. When trying to format timeframes for Slavic languages like Russian, Polish, Bulgarian, etc., an AttributeError is raised saying `'dict' object has no attribu...
diff --git a/arrow/locales.py b/arrow/locales.py index 63b2d48..ea8f9b7 100644 --- a/arrow/locales.py +++ b/arrow/locales.py @@ -1330,21 +1330,6 @@ class DutchLocale(Locale): class SlavicBaseLocale(Locale): timeframes: ClassVar[Mapping[TimeFrameLiteral, Union[str, Mapping[str, str]]]] - def _format_timeframe...
["tests/test_arrow.py::TestArrowHumanize::test_no_floats", "tests/test_arrow.py::TestArrowHumanize::test_no_floats_multi_gran", "tests/test_arrow.py::TestArrowHumanizeTestsWithLocale::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_seconds", "tests/test_arrow.py::TestArrowDehumanize::test_minutes", "test...
["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te...
jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009
true
null
1
15
23
1,201
0
0.6
1
0.75
1
0.250167
81.0255
6,599
swe_smith::train::7064
swe_smith
train
7,064
cantools__cantools.0c6a7871.combine_file__q1addpjd
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
DID length property returns wrong type causing encoding/decoding failures #### Description When accessing the `length` property of a DID object, it returns the length of the internal `_length` attribute instead of the attribute value itself. This causes `'int' object is not iterable` errors when trying to encode or d...
diff --git a/src/cantools/database/diagnostics/did.py b/src/cantools/database/diagnostics/did.py index 5a0712c..5749aac 100644 --- a/src/cantools/database/diagnostics/did.py +++ b/src/cantools/database/diagnostics/did.py @@ -52,7 +52,7 @@ class Did: """ - return self._length + return len(self...
["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanTo...
["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo...
jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871
true
null
1
12
7
1,261
0
0.6
1
0.75
1
0.250167
81.0255