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,700
swe_smith::train::18518
swe_smith
train
18,518
HIPS__autograd.ac044f0d.lm_rewrite__7sy8cnvk
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Issue: `hstack` Function Fails with 1D Arrays **Description** The `hstack` function is currently not handling 1D arrays correctly. When attempting to stack 1D arrays, a `ValueError` is raised, indicating an issue with zero-dimensional arrays. **To Reproduce** Here's a simple script to reproduce the issue: ```p...
diff --git a/autograd/numpy/numpy_wrapper.py b/autograd/numpy/numpy_wrapper.py index 6dfd22e..09e1836 100644 --- a/autograd/numpy/numpy_wrapper.py +++ b/autograd/numpy/numpy_wrapper.py @@ -49,11 +49,20 @@ vstack = row_stack = lambda tup: concatenate([atleast_2d(_m) for _m in tup], axi def hstack(tup): - arrs = ...
["tests/test_systematic.py::test_hstack_1d", "tests/test_scipy.py::test_odeint"]
["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
17
2
1,139
0
0.6
1
0.75
1
0.2465
81.0145
6,701
swe_smith::train::10462
swe_smith
train
10,462
paramiko__paramiko.23f92003.func_basic__h970md7u
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Curve25519 key exchange fails with ValueError during SSH connection #### Description SSH connections using Curve25519 key exchange are failing with a `ValueError: An X25519PublicKey cannot be created from the given key bytes` error. This appears to be affecting all SSH operations that rely on the Curve25519 key excha...
diff --git a/paramiko/kex_curve25519.py b/paramiko/kex_curve25519.py index 20c23e4..6698907 100644 --- a/paramiko/kex_curve25519.py +++ b/paramiko/kex_curve25519.py @@ -106,26 +106,25 @@ class KexCurve25519: peer_key_bytes = m.get_string() sig = m.get_binary() - peer_key = X25519PublicKey.fro...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::interactive_auth", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/auth.py::AuthHandler_::utf8", "tests/auth.py::AuthHandler_::non_utf8", "...
["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
13
121
1,219
0
0.6
1
0.75
1
0.2465
81.0145
6,702
swe_smith::train::6514
swe_smith
train
6,514
mahmoud__boltons.3bfcfdd0.lm_rewrite__298mfslg
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
### Issue: ComplementSet Comparison Fails with NotImplementedError #### Description: It seems there's an issue with the `_ComplementSet` class when attempting to compare it with other set-like objects. Specifically, the comparison operation is resulting in a `NotImplementedError`. #### Steps to Reproduce: 1. Create a...
diff --git a/boltons/setutils.py b/boltons/setutils.py index 3ed5ab3..7edb7e5 100644 --- a/boltons/setutils.py +++ b/boltons/setutils.py @@ -830,22 +830,13 @@ class _ComplementSet: return self._included.issubset(inc) def __lt__(self, other): - inc, exc = _norm_args_notimplemented(other) -...
["tests/test_setutils.py::test_complement_set"]
["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
21
1
1,059
0
0.6
1
0.75
1
0.2465
81.0145
6,703
swe_smith::train::24430
swe_smith
train
24,430
sunpy__sunpy.f8edfd5c.lm_rewrite__ng4z5aeo
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
### Bug report The `Time` attribute in `sunpy/net/_attrs.py` is not raising a `ValueError` when only a start time is provided without an end time or a `TimeRange`. This behavior seems to have changed recently and is causing unexpected results. #### Steps to Reproduce 1. Attempt to create a `Time` attribute with only...
diff --git a/sunpy/net/_attrs.py b/sunpy/net/_attrs.py index 9b509c9..d9a33f2 100644 --- a/sunpy/net/_attrs.py +++ b/sunpy/net/_attrs.py @@ -38,19 +38,28 @@ class Time(Range): type_name = "time" def __init__(self, start, end=None, near=None): - if end is None and not isinstance(start, TimeRange): - ...
["sunpy/net/vso/tests/test_attrs.py::test_input_error"]
["sunpy/net/vso/tests/test_attrs.py::test_simpleattr_apply", "sunpy/net/vso/tests/test_attrs.py::test_Time_timerange", "sunpy/net/vso/tests/test_attrs.py::test_simpleattr_and_duplicate", "sunpy/net/vso/tests/test_attrs.py::test_simpleattr_or_eq", "sunpy/net/vso/tests/test_attrs.py::test_complexattr_apply", "sunpy/net/v...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
29
1
899
0
0.6
1
0.75
1
0.2465
81.0145
6,704
swe_smith::train::27937
swe_smith
train
27,937
jsvine__pdfplumber.02ff4313.func_pm_op_swap__lmiy9mb0
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
Table extraction fails with AttributeError when accessing strategy settings #### Description When trying to extract tables from PDFs, the table extraction functionality is broken and raises AttributeError when accessing strategy-related settings. This affects both `extract_table()` and `extract_tables()` methods. ##...
diff --git a/pdfplumber/table.py b/pdfplumber/table.py index 0ba4445..afaf600 100644 --- a/pdfplumber/table.py +++ b/pdfplumber/table.py @@ -601,9 +601,9 @@ class TableFinder(object): settings = self.settings for orientation in ["vertical", "horizontal"]: - strategy = getattr(settings, or...
["tests/test_basics.py::Test::test_outside_bbox", "tests/test_ca_warn_report.py::Test::test_parse", "tests/test_dedupe_chars.py::Test::test_extract_table", "tests/test_display.py::Test::test_debug_tablefinder", "tests/test_issues.py::Test::test_issue_1181", "tests/test_issues.py::Test::test_issue_140", "tests/test_issu...
["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
10
21
1,279
0
0.6
1
0.75
1
0.2465
81.0145
6,705
swe_smith::train::2255
swe_smith
train
2,255
pdfminer__pdfminer.six.1a8bd2f7.func_basic__pnhb7l9m
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
LZW decoder produces incorrect output after bit position changes #### Description The LZW decoder is returning incorrect decoded data when processing certain byte sequences. The decoder appears to have issues with bit position tracking and boundary conditions. #### Steps/Code to Reproduce ```python from pdfminer.lz...
diff --git a/pdfminer/lzw.py b/pdfminer/lzw.py index 8e9585a..72f6d3b 100644 --- a/pdfminer/lzw.py +++ b/pdfminer/lzw.py @@ -24,26 +24,19 @@ class LZWDecoder: def readbits(self, bits: int) -> int: v = 0 while 1: - # the number of remaining bits we can get from the current buffer. ...
["tests/test_pdfminer_crypto.py::TestLzw::test_lzwdecode", "tests/test_tools_dumppdf.py::TestDumpPDF::test_2", "tests/test_tools_pdf2txt.py::TestDumpImages::test_nonfree_dmca"]
["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
17
3
1,138
0
0.6
1
0.75
1
0.246333
81.014
6,706
swe_smith::train::42413
swe_smith
train
42,413
r1chardj0n3s__parse.30da9e4f.func_pm_remove_loop__4kca4mum
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
# Width parsing in format specifiers is broken ## Description The width parsing in format specifiers has been removed, causing any format that includes width specifications to fail with ValueError. This affects many common use cases like padding numbers or constraining string widths. ## Steps to Reproduce Here's a si...
diff --git a/parse.py b/parse.py index 80242e1..bc761bb 100644 --- a/parse.py +++ b/parse.py @@ -368,11 +368,6 @@ def extract_format(format, extra_types): format = format[1:] width = "" - while format: - if not format[0].isdigit(): - break - width += format[0] - format...
["README.rst::README.rst", "tests/test_bugs.py::test_unused_centered_alignment_bug", "tests/test_bugs.py::test_unused_left_alignment_bug", "tests/test_parse.py::test_precision", "tests/test_parse.py::test_numbers", "tests/test_parsetype.py::test_width_str", "tests/test_parsetype.py::test_width_constraints", "tests/test...
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_bugs.py::test_user_type_with...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
6
10
1,358
0
0.6
1
0.75
1
0.246333
81.014
6,707
swe_smith::train::48263
swe_smith
train
48,263
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__ujdaq6oa
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
JinjaTemplater slice adjustment fails with UnboundLocalError #### Description The JinjaTemplater is throwing an `UnboundLocalError` when processing templates that require slice adjustments. The error occurs because a variable is being referenced before it's defined in the code flow. #### Steps/Code to Reproduce ```...
diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py index 934ded3..1436ce3 100644 --- a/src/sqlfluff/core/templaters/jinja.py +++ b/src/sqlfluff/core/templaters/jinja.py @@ -801,11 +801,6 @@ class JinjaTemplater(PythonTemplater): handled correctly and can be combined with...
["test/core/templaters/jinja_test.py::test__templater_lint_unreached_code[simple_if_true]", "test/core/templaters/jinja_test.py::test__templater_lint_unreached_code[simple_if_false]", "test/core/templaters/jinja_test.py::test__templater_lint_unreached_code[if_elif_else]", "test/core/templaters/jinja_test.py::test__temp...
["test/core/templaters/jinja_test.py::test__templater_jinja[simple]", "test/core/templaters/jinja_test.py::test__templater_jinja[unboundlocal_bugfix]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[basic_block]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[strip_left_block]", "...
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
11
7
1,258
0
0.6
1
0.75
1
0.246333
81.014
6,708
swe_smith::train::3376
swe_smith
train
3,376
pygments__pygments.27649ebb.combine_file__euje8e5r
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
Lexer guessing broken for several languages #### Description The lexer guessing functionality appears to be broken for multiple languages. When trying to guess lexers for various code samples, the system is incorrectly identifying them as Stan lexer instead of their proper lexers. #### Steps/Code to Reproduce ```py...
diff --git a/pygments/lexers/modeling.py b/pygments/lexers/modeling.py index b5393e7..6714176 100644 --- a/pygments/lexers/modeling.py +++ b/pygments/lexers/modeling.py @@ -184,10 +184,10 @@ class BugsLexer(RegexLexer): } def analyse_text(text): - if re.search(r"^\s*model\s*{", text, re.M): - ...
["tests/test_cmdline.py::test_C_opt", "tests/test_guess.py::test_guess_lexer_forth", "tests/test_guess.py::test_guess_lexer_gap", "tests/test_guess.py::test_guess_lexer_ezhil", "tests/test_guess.py::test_guess_carbon_lexer", "tests/test_guess.py::test_guess_lexer_brainfuck", "tests/test_guess.py::test_guess_c_lexer", "...
["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
12
12
1,238
0
0.6
1
0.75
1
0.246333
81.014
6,709
swe_smith::train::24318
swe_smith
train
24,318
sunpy__sunpy.f8edfd5c.func_pm_remove_cond__ivwwpn09
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
solar_rotate_coordinate accepts invalid observer types without validation #### Description The `solar_rotate_coordinate` function is not properly validating the `observer` parameter type, allowing invalid inputs like strings to be passed through without raising appropriate errors. #### Steps/Code to Reproduce ```py...
diff --git a/sunpy/physics/differential_rotation.py b/sunpy/physics/differential_rotation.py index e4f3f4a..d67e7e1 100644 --- a/sunpy/physics/differential_rotation.py +++ b/sunpy/physics/differential_rotation.py @@ -92,16 +92,6 @@ def _validate_observer_args(initial_obstime, observer, time): raise ValueError(...
["sunpy/physics/tests/test_differential_rotation.py::test_solar_rotate_coordinate", "sunpy/physics/tests/test_differential_rotation.py::test_get_new_observer"]
["sunpy/physics/tests/test_differential_rotation.py::test_diff_rot_deprecated_warning", "sunpy/physics/tests/test_differential_rotation.py::test_consistency_with_rotatedsunframe", "sunpy/physics/tests/test_differential_rotation.py::test_differential_rotate_observer_all_off_disk", "sunpy/physics/tests/test_differential_...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
10
2
1,278
0
0.6
1
0.75
1
0.246333
81.014
6,710
swe_smith::train::2935
swe_smith
train
2,935
madzak__python-json-logger.5f85723f.func_basic__niajdsy9
swesmith/madzak__python-json-logger.5f85723f
madzak/python-json-logger
python
null
# Renaming non-existent fields causes KeyError ## Description I found an issue with the `rename_fields` functionality in the `JsonFormatter`. When trying to rename a field that doesn't exist in the log record, a `KeyError` is raised. ## Steps to reproduce: ```python import logging import json from pythonjsonlogger ...
diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py index 519a64d..cf67207 100644 --- a/src/pythonjsonlogger/jsonlogger.py +++ b/src/pythonjsonlogger/jsonlogger.py @@ -229,8 +229,10 @@ class JsonFormatter(logging.Formatter): def _perform_rename_log_fields(self, log_record): ...
["tests/test_jsonlogger.py::TestJsonLogger::test_rename_nonexistent_field"]
["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg...
jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f
true
null
1
6
1
1,358
0
0.6
1
0.75
1
0.246333
81.014
6,711
swe_smith::train::42000
swe_smith
train
42,000
scanny__python-pptx.278b47b1.func_pm_class_rm_funcs__wq5px8hy
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Cell.split() method missing after recent changes #### Description The `split()` method appears to have been removed from the `_Cell` class, causing issues when trying to unmerge table cells. This method was previously available to split merged cells back into individual cells. #### Steps/Code to Reproduce ```python...
diff --git a/src/pptx/table.py b/src/pptx/table.py index 3bdf54b..2a72e49 100644 --- a/src/pptx/table.py +++ b/src/pptx/table.py @@ -182,11 +182,6 @@ class _Cell(Subshape): return False return self._tc is other._tc - def __ne__(self, other: object) -> bool: - if not isinstance(other, t...
["tests/test_table.py::Describe_Cell::it_can_split_a_merged_cell[split_fixture0]", "tests/test_table.py::Describe_Cell::it_can_split_a_merged_cell[split_fixture1]", "tests/test_table.py::Describe_Cell::it_can_split_a_merged_cell[split_fixture2]", "tests/test_table.py::Describe_Cell::but_it_raises_when_cell_to_be_split_...
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
24
4
997
0
0.6
1
0.75
1
0.246167
81.0135
6,712
swe_smith::train::43717
swe_smith
train
43,717
sloria__environs.73c372df.func_pm_remove_cond__1g10dp2v
swesmith/sloria__environs.73c372df
sloria/environs
python
null
Environment variable parsing returns None instead of raising error when variable not set #### Description When trying to parse environment variables that are not set, the parser returns `None` instead of raising an `EnvError` as expected. This affects all parsing methods including `env()`, `env.list()`, `env.dict()`,...
diff --git a/src/environs/__init__.py b/src/environs/__init__.py index 00f6072..b88fa5f 100644 --- a/src/environs/__init__.py +++ b/src/environs/__init__.py @@ -151,16 +151,8 @@ def _field2method( self._fields[parsed_key] = field source_key = proxied_key or parsed_key if value is ma.missing: ...
["tests/test_environs.py::TestCasting::test_call", "tests/test_environs.py::TestCasting::test_list_cast", "tests/test_environs.py::TestCasting::test_list_with_default_from_string", "tests/test_environs.py::TestCasting::test_list_with_subcast", "tests/test_environs.py::TestCasting::test_list_with_empty_env_and_subcast",...
["tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_basic", "tests/test_environs.py::TestCasting::test_empty_str", "tests/test_environs.py::TestCasting::test_int_cast", "tests/test_environs.py::TestCasting::test_invalid_int", "tests/test_environs.py::TestCasting::t...
jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df
true
null
1
11
29
1,257
0
0.6
1
0.75
1
0.246167
81.0135
6,713
swe_smith::train::33098
swe_smith
train
33,098
django-money__django-money.835c1ab8.combine_module__bwgtl4ql
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
MoneyField validation and database operations broken #### Description When working with MoneyField instances, several core operations are failing unexpectedly. The field seems to have issues with currency validation logic and database preparation methods. #### Steps/Code to Reproduce ```python from djmoney import M...
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index dc5f6ad..dfbf682 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -110,14 +110,13 @@ class MoneyFieldProxy: value is not None and self.field._currency_field.null and not isinstance(value,...
["tests/test_form.py::test_save", "tests/test_form.py::test_default_currency", "tests/test_form.py::TestValidation::test_positive_validator[value0]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs0-expected0]", "tests/test_models.py::TestVanillaMoneyField::test_crea...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
2
11
141
1,257
0
0.6
1
0.75
1
0.246167
81.0135
6,714
swe_smith::train::43829
swe_smith
train
43,829
pydata__patsy.a5d16484.combine_file__uo3rfwbc
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
LookupFactor constructor broken after recent changes I'm getting errors when trying to create LookupFactor instances. It seems like the constructor is no longer working properly. #### Steps to Reproduce ```python from patsy.user_util import LookupFactor # This used to work but now fails factor = LookupFactor("my_va...
diff --git a/patsy/user_util.py b/patsy/user_util.py index 080af84..bba4a0e 100644 --- a/patsy/user_util.py +++ b/patsy/user_util.py @@ -42,17 +42,16 @@ def balanced(**kwargs): {'a': ['a1', 'a1', 'a2', 'a2', 'a1', 'a1', 'a2', 'a2'], 'b': ['b1', 'b2', 'b1', 'b2', 'b1', 'b2', 'b1', 'b2']} """ - r...
["patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_data_types", "patsy/test_build.py::test_build_design_matrices_dtype", "patsy/test_build.py::test_return_type", "patsy/test_build.py::test_NA_action", "patsy/test_build.p...
["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
33
22
817
0
0.6
1
0.75
1
0.246167
81.0135
6,715
swe_bench::test::1660
swe_bench
test
1,660
scikit-learn__scikit-learn-14999
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
d2476fb679f05e80c56e8b151ff0f6d7a470e4ae
data leak in GBDT due to warm start (This is about the non-histogram-based version of GBDTs) X is split into train and validation data with `train_test_split(random_state=self.random_state)`. As @johannfaouzi noted, in a warm starting context, this will produce a leak if If `self.random_state` is a `RandomState` inst...
After discussing with @amueller , maybe the best option would be to: - store a seed attribute e.g. `_train_val_split_seed` that would be generated **once**, the first time `fit` is called - pass this seed as the `random_state` parameter to `train_test_split()`. - add a small test making sure this parameter stays...
diff --git a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py --- a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py +++ b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py @@ -104,12 +104,14 @@ def fit(self, X, y): ...
diff --git a/sklearn/ensemble/_hist_gradient_boosting/tests/test_warm_start.py b/sklearn/ensemble/_hist_gradient_boosting/tests/test_warm_start.py --- a/sklearn/ensemble/_hist_gradient_boosting/tests/test_warm_start.py +++ b/sklearn/ensemble/_hist_gradient_boosting/tests/test_warm_start.py @@ -154,13 +154,15 @@ def tes...
["sklearn/ensemble/_hist_gradient_boosting/tests/test_warm_start.py::test_random_seeds_warm_start[none-HistGradientBoostingClassifier-X0-y0]", "sklearn/ensemble/_hist_gradient_boosting/tests/test_warm_start.py::test_random_seeds_warm_start[none-HistGradientBoostingRegressor-X1-y1]", "sklearn/ensemble/_hist_gradient_boo...
["sklearn/ensemble/_hist_gradient_boosting/tests/test_warm_start.py::test_max_iter_with_warm_start_validation[HistGradientBoostingClassifier-X0-y0]", "sklearn/ensemble/_hist_gradient_boosting/tests/test_warm_start.py::test_max_iter_with_warm_start_validation[HistGradientBoostingRegressor-X1-y1]", "sklearn/ensemble/_his...
null
true
2019-09-17T07:06:27Z
1
36
6
556
0
0.8
1
0.55
1
0.212667
81.013
6,716
swe_smith::train::51353
swe_smith
train
51,353
spulec__freezegun.5f171db0.func_basic__90eepuof
swesmith/spulec__freezegun.5f171db0
spulec/freezegun
python
null
freeze_time fails to start with NameError: name 'fake_perfcounter' is not defined #### Description When using freeze_time, the library fails to start properly and raises a NameError about 'fake_perfcounter' not being defined. This appears to affect all basic functionality of the library. #### Steps/Code to Reproduce...
diff --git a/freezegun/api.py b/freezegun/api.py index d235292..eca1b85 100644 --- a/freezegun/api.py +++ b/freezegun/api.py @@ -707,18 +707,17 @@ class _freeze_time: freeze_factories.append(freeze_factory) tz_offsets.append(self.tz_offset) ignore_lists.append(self.ignore) - tick_flags...
["tests/test_asyncio.py::test_datetime_in_coroutine", "tests/test_asyncio.py::test_freezing_time_in_coroutine", "tests/test_asyncio.py::test_freezing_time_before_running_coroutine", "tests/test_asyncio.py::test_asyncio_sleeping_not_affected_by_freeze_time", "tests/test_asyncio.py::test_asyncio_to_call_later_with_frozen...
["tests/test_configure.py::test_default_ignore_list_is_overridden[ignorelist0]", "tests/test_configure.py::test_default_ignore_list_is_overridden[ignorelist1]", "tests/test_configure.py::test_extend_default_ignore_list[ignorelist0]", "tests/test_configure.py::test_extend_default_ignore_list[ignorelist1]", "tests/test_c...
jyangballin/swesmith.x86_64.spulec_1776_freezegun.5f171db0
true
null
1
24
113
996
0
0.6
1
0.75
1
0.246
81.013
6,717
swe_smith::train::26998
swe_smith
train
26,998
tkrajina__gpxpy.09fc46b3.func_basic__p130sxtk
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
XML serialization broken for single objects when prettyprint=False #### Description When calling `to_xml()` with `prettyprint=False` on GPX objects containing single (non-list) elements, the serialization fails with AttributeError. The issue appears to affect various GPX field types including waypoints, tracks, route...
diff --git a/gpxpy/gpxfield.py b/gpxpy/gpxfield.py index e253df3..7322d03 100644 --- a/gpxpy/gpxfield.py +++ b/gpxpy/gpxfield.py @@ -247,9 +247,9 @@ class GPXComplexField(AbstractGPXField): def to_xml(self, value: Any, version: str, nsmap: Dict[str, str]={}, prettyprint: bool=True, indent: str='') -> str: ...
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_bounds_xml", "test.py::GPXTests::test_custom_schema_locations", "test.py::GPXTests::test_default_schema_locations", "test.py::GPXTests::test_dilutions", "test.py::GPXTests::test_garmin_extension", "test.py::GPXTests::test_gpx_10_fields", "test.py:...
["test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_add_missing_elevations", "test.py::GPXTests::tes...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
8
27
1,316
0
0.6
1
0.75
1
0.246
81.013
6,718
swe_smith::train::832
swe_smith
train
832
oauthlib__oauthlib.1fd52536.func_pm_remove_cond__v36uumsg
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
# Missing grant type validation in ClientCredentialsGrant ## Description The ClientCredentialsGrant class doesn't validate the grant_type parameter properly. The validation code that checks if the grant_type is present and equal to 'client_credentials' has been removed. ## Steps to reproduce ```python from oauthlib...
diff --git a/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py b/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py index 35c5440..05cabc8 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py +++ b/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py @@ -91,13 +91,6 @@ class Client...
["tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_unsupported_grant_type"]
["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,296
0
0.6
1
0.75
1
0.246
81.013
6,719
swe_smith::train::578
swe_smith
train
578
oauthlib__oauthlib.1fd52536.func_basic__ommycgnc
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2Error headers property returns incorrect WWW-Authenticate header for 401 status codes #### Description The `OAuth2Error.headers` property is not generating the correct WWW-Authenticate header for 401 status codes. Instead of checking for status code 401, it's checking for 402, and the error and description fiel...
diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py index 3b41574..ef59fc1 100644 --- a/oauthlib/oauth2/rfc6749/errors.py +++ b/oauthlib/oauth2/rfc6749/errors.py @@ -95,21 +95,14 @@ class OAuth2Error(Exception): @property def headers(self): - if self.status_code == 401:...
["tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py::IntrospectEndpointTest::test_introspect_bad_post_request", "tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py::IntrospectEndpointTest::test_introspect_invalid_request_method", "tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py::IntrospectEn...
["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
17
10
1,136
0
0.6
1
0.75
1
0.246
81.013
6,720
swe_smith::train::18348
swe_smith
train
18,348
msiemens__tinydb.10644a0e.func_pm_ctrl_shuffle__9vt8417i
swesmith/msiemens__tinydb.10644a0e
msiemens/tinydb
python
null
Table.search() raises UnboundLocalError when query caching is enabled #### Description When using the `search()` method on a TinyDB table, an `UnboundLocalError` is raised for the variable `is_cacheable`. This appears to happen when the query caching mechanism tries to access the `is_cacheable` function before it's d...
diff --git a/tinydb/table.py b/tinydb/table.py index c562d02..3c34876 100644 --- a/tinydb/table.py +++ b/tinydb/table.py @@ -237,6 +237,9 @@ class Table: return list(iter(self)) def search(self, cond: QueryLike) -> List[Document]: + if is_cacheable(): + # Update the query cache + ...
["tests/test_tables.py::test_multiple_tables[memory]", "tests/test_tables.py::test_multiple_tables[json]", "tests/test_tables.py::test_query_cache[memory]", "tests/test_tables.py::test_query_cache[json]", "tests/test_tables.py::test_query_cache_with_mutable_callable[memory]", "tests/test_tables.py::test_query_cache_wit...
["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle...
jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e
true
null
1
11
48
1,256
0
0.6
1
0.75
1
0.246
81.013
6,721
swe_smith::train::50906
swe_smith
train
50,906
python-hyper__h11.bed0dd4a.func_pm_remove_assign__2qlylwtd
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
NameError in response header processing when variables are undefined #### Description When processing HTTP responses, the connection code fails with a `NameError` because some variables are referenced before being defined. This affects response handling across different scenarios including chunked encoding, content-l...
diff --git a/h11/_connection.py b/h11/_connection.py index e37d82a..75b6470 100644 --- a/h11/_connection.py +++ b/h11/_connection.py @@ -601,8 +601,6 @@ class Connection: # side channels. def _clean_up_response_headers_for_sending(self, response: Response) -> Response: assert type(response) is Respon...
["h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_server_talking_to_http10_client", "h11/tests/test_connection.py::test_automatic_transfer_encoding_in_...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_connection.py::test_client_talking_to_http10_server", "h11/tests/test_connection.py::...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
10
17
1,275
0
0.6
1
0.75
1
0.245833
81.0125
6,722
swe_smith::train::20406
swe_smith
train
20,406
tobymao__sqlglot.036601ba.combine_file__n04oysu6
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Hive dialect generates invalid SQL due to variable reference before assignment #### Description When using the Hive dialect to generate SQL for date operations, the code references variables before they are assigned, causing `UnboundLocalError` exceptions. #### Steps/Code to Reproduce ```python import sqlglot # Th...
diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py index 6084d44..7ce831d 100644 --- a/sqlglot/dialects/hive.py +++ b/sqlglot/dialects/hive.py @@ -64,25 +64,24 @@ DIFF_MONTH_SWITCH = ("YEAR", "QUARTER", "MONTH") def _add_date_sql(self: Hive.Generator, expression: DATE_ADD_OR_SUB) -> str: - if isin...
["tests/dialects/test_hive.py::TestHive::test_hive", "tests/dialects/test_hive.py::TestHive::test_time"]
["tests/dialects/test_hive.py::TestHive::test_bits", "tests/dialects/test_hive.py::TestHive::test_cast", "tests/dialects/test_hive.py::TestHive::test_data_type", "tests/dialects/test_hive.py::TestHive::test_ddl", "tests/dialects/test_hive.py::TestHive::test_escapes", "tests/dialects/test_hive.py::TestHive::test_lateral...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
23
2
1,015
0
0.6
1
0.75
1
0.245833
81.0125
6,723
swe_smith::train::4706
swe_smith
train
4,706
bottlepy__bottle.a8dfef30.func_basic__0yaqi7l2
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
ConfigDict.update() method broken with namespace prefixes #### Description The `ConfigDict.update()` method is not working correctly when using namespace prefixes. When calling `update()` with a namespace string as the first argument, the method fails to properly handle the prefix logic, causing key lookup errors and...
diff --git a/bottle.py b/bottle.py index 286b5bc..79f72ef 100755 --- a/bottle.py +++ b/bottle.py @@ -2436,8 +2436,10 @@ class ConfigDict(dict): >>> c.update('some.namespace', key='value') """ prefix = '' - if a and isinstance(a[0], basestring): - prefix = a[0].strip('.')...
["test/test_config.py::TestConfDict::test_load_module", "test/test_config.py::TestConfDict::test_meta", "test/test_config.py::TestConfDict::test_namespaces", "test/test_config.py::TestConfDict::test_update", "test/test_exc.py::TestAppException::test_other_error", "test/test_outputfilter.py::TestOutputFilter::test_error...
["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_overlay", "t...
jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30
true
null
1
6
13
1,355
0
0.6
1
0.75
1
0.245833
81.0125
6,724
swe_smith::train::39204
swe_smith
train
39,204
pallets__jinja.ada0a9a6.func_basic__re6lkp09
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
SandboxedEnvironment attribute access order changed breaks security Description The sandboxed environment's attribute resolution order has been changed, causing security issues. When accessing attributes on objects, the sandbox now tries dictionary-style access first before attribute access, which bypasses security c...
diff --git a/src/jinja2/sandbox.py b/src/jinja2/sandbox.py index ce27615..4f3a508 100644 --- a/src/jinja2/sandbox.py +++ b/src/jinja2/sandbox.py @@ -324,17 +324,17 @@ class SandboxedEnvironment(Environment): attribute. The attribute passed *must* be a bytestring. """ try: - value ...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_security.py::TestSandbox::test_unsafe", "tests/test_security.py::TestSandbox::test_immutable_environment", "tests/test_security.py::TestStringFormat::test_basic_format_safety", "tests/test_security.py::TestStringFormat::test_basic_format_all_ok...
["tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize", "tests/test_api.py::TestExtendedAPI::test_eval_finalize", "tes...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
14
10
1,194
0
0.6
1
0.75
1
0.245667
81.012
6,725
swe_smith::train::1910
swe_smith
train
1,910
agronholm__typeguard.b6a7e438.func_pm_remove_cond__f8ngnzia
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Type checking fails silently after removing core validation logic #### Description Type checking is not working properly - values that should fail type checks are passing without any errors or warnings being raised. #### Steps/Code to Reproduce ```python from typeguard import check_type # This should raise a TypeC...
diff --git a/src/typeguard/_checkers.py b/src/typeguard/_checkers.py index 5e34036..6dcbabc 100644 --- a/src/typeguard/_checkers.py +++ b/src/typeguard/_checkers.py @@ -898,21 +898,6 @@ def check_type_internal( looking up forward references """ - if isinstance(annotation, ForwardRef): - try: -...
["tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestLiteral::test_literal_union", "tests/test_checkers.py::TestMapping::test_bad_key_type", "tests/test_checkers.py::TestMapping::test_bad_value_type", "tests/test_checkers.py::TestMapping::test_bad_key_type_full_check", "tests/test_checkers...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestBytesLike::test_valid[bytes]", "tests/test_checkers.py::TestBytesLike:...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
32
116
834
0
0.6
1
0.75
1
0.245667
81.012
6,726
swe_smith::train::20838
swe_smith
train
20,838
tobymao__sqlglot.036601ba.func_pm_op_swap__ybxedsqh
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Parser fails with AttributeError when processing certain SQL queries #### Description The SQL parser is encountering an AttributeError when trying to access attributes on NoneType objects during query parsing. This appears to be affecting various SQL constructs including SELECT statements, DDL operations, and set ope...
diff --git a/sqlglot/parser.py b/sqlglot/parser.py index 248a128..a4d4222 100644 --- a/sqlglot/parser.py +++ b/sqlglot/parser.py @@ -3120,15 +3120,15 @@ class Parser(metaclass=_Parser): hint = self._parse_hint() - if self._next and not self._next.token_type == TokenType.DOT: + if ...
["tests/dialects/test_bigquery.py::TestBigQuery::test_bigquery", "tests/dialects/test_bigquery.py::TestBigQuery::test_inline_constructor", "tests/dialects/test_bigquery.py::TestBigQuery::test_mod", "tests/dialects/test_bigquery.py::TestBigQuery::test_user_defined_functions", "tests/dialects/test_clickhouse.py::TestClic...
["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
11
72
1,254
0
0.6
1
0.75
1
0.245667
81.012
6,727
swe_smith::train::21823
swe_smith
train
21,823
life4__textdistance.c3aca916.combine_module__1028ojvo
swesmith/life4__textdistance.c3aca916
life4/textdistance
python
null
Normalized distance calculation returns incorrect values #### Description The normalized distance calculation is producing incorrect results. When computing normalized distance between sequences, the function returns values that don't follow expected mathematical properties and can cause division by zero errors. ###...
diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py index 5ce8cc7..d2b490c 100644 --- a/textdistance/algorithms/base.py +++ b/textdistance/algorithms/base.py @@ -45,9 +45,9 @@ class Base: """Get distance from 0 to 1 """ maximum = self.maximum(*sequences) - if...
["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...
["tests/test_common.py::test_normalization_range[alg21]", "tests/test_common.py::test_normalization_by_one[alg21]", "tests/test_common.py::test_normalization_same[alg21]", "tests/test_common.py::test_normalization_monotonic[alg21]", "tests/test_common.py::test_no_common_chars[alg0]", "tests/test_common.py::test_no_comm...
jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916
true
null
2
12
119
1,234
0
0.6
1
0.75
1
0.245667
81.012
6,728
swe_smith::train::42745
swe_smith
train
42,745
python-jsonschema__jsonschema.93e0caa5.func_pm_remove_assign__0i9b9nat
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Format validation broken for draft6, draft7, and draft201909 schemas #### Description Format validation is not working properly for JSON Schema draft6, draft7, and draft201909. When validating schemas that contain format constraints like regex patterns, the validation silently passes instead of properly checking the ...
diff --git a/jsonschema/_format.py b/jsonschema/_format.py index 789fe4f..f87a79b 100644 --- a/jsonschema/_format.py +++ b/jsonschema/_format.py @@ -197,9 +197,6 @@ def _checks_drafts( ) -> typing.Callable[[_F], _F]: draft3 = draft3 or name draft4 = draft4 or name - draft6 = draft6 or name - draft7 = d...
["jsonschema/tests/test_validators.py::TestDraft6Validator::test_schema_with_invalid_regex", "jsonschema/tests/test_validators.py::TestDraft7Validator::test_schema_with_invalid_regex", "jsonschema/tests/test_validators.py::TestDraft201909Validator::test_schema_with_invalid_regex"]
["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
10
3
1,273
0
0.6
1
0.75
1
0.2455
81.0115
6,729
swe_smith::train::40535
swe_smith
train
40,535
scanny__python-pptx.278b47b1.func_basic__3aq3tu6s
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Color mapping returns wrong color classes causing AttributeError #### Description When working with color objects, the color type mapping appears to be returning incorrect color classes, which leads to AttributeError when trying to access color properties. #### Steps/Code to Reproduce ```python from pptx import Pre...
diff --git a/src/pptx/dml/color.py b/src/pptx/dml/color.py index 5415582..823f21b 100644 --- a/src/pptx/dml/color.py +++ b/src/pptx/dml/color.py @@ -116,14 +116,14 @@ class _Color(object): def __new__(cls, xClr): color_cls = { type(None): _NoneColor, - CT_HslColor: _HslColor, + ...
["tests/text/test_text.py::DescribeFont::it_provides_access_to_its_color"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
14
1
1,193
0
0.6
1
0.75
1
0.2455
81.0115
6,730
swe_smith::train::46669
swe_smith
train
46,669
python-trio__trio.cfbbe2c1.combine_file__s6j7xwc8
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Deprecated attribute access broken after recent changes #### Description When trying to access deprecated attributes from modules that use `enable_attribute_deprecations`, I'm getting `AttributeError` instead of the expected deprecation warning and attribute value. #### Steps/Code to Reproduce ```python import trio...
diff --git a/src/trio/_deprecate.py b/src/trio/_deprecate.py index 51c51f7..05c71fd 100644 --- a/src/trio/_deprecate.py +++ b/src/trio/_deprecate.py @@ -42,13 +42,13 @@ class TrioDeprecationWarning(FutureWarning): def _url_for_issue(issue: int) -> str: - return f"https://github.com/python-trio/trio/issues/{issu...
["src/trio/_tests/test_deprecate.py::test_warn_deprecated", "src/trio/_tests/test_deprecate.py::test_warn_deprecated_no_instead_or_issue", "src/trio/_tests/test_deprecate.py::test_warn_deprecated_formatting", "src/trio/_tests/test_deprecate.py::test_deprecated_decorator", "src/trio/_tests/test_deprecate.py::test_deprec...
["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
15
10
1,173
0
0.6
1
0.75
1
0.2455
81.0115
6,731
swe_smith::train::48183
swe_smith
train
48,183
sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__1mlxa8dc
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
Segment validation fails when segments list is empty #### Description When calling `validate_non_code_ends()` on a segment with an empty segments list, the method attempts to access `self.segments[0]` and `self.segments[-1]` before checking if the list is empty, causing an IndexError. #### Steps/Code to Reproduce `...
diff --git a/src/sqlfluff/core/parser/segments/base.py b/src/sqlfluff/core/parser/segments/base.py index 533fca3..d4244fc 100644 --- a/src/sqlfluff/core/parser/segments/base.py +++ b/src/sqlfluff/core/parser/segments/base.py @@ -1157,6 +1157,18 @@ class BaseSegment(metaclass=SegmentMetaclass): return segment.i...
["test/core/rules/functional/segments_test.py::test_segments_recursive_crawl"]
["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
25
1
973
0
0.6
1
0.75
1
0.2455
81.0115
6,732
swe_smith::train::12912
swe_smith
train
12,912
python-openxml__python-docx.0cf6d71f.combine_file__oh5a70re
swesmith/python-openxml__python-docx.0cf6d71f
python-openxml/python-docx
python
null
CorePropertiesPart.default() returns wrong object type #### Description When creating a default core properties part using `CorePropertiesPart.default()`, the method returns a package object instead of a `CorePropertiesPart` instance. This breaks code that expects to work with the core properties part directly. ####...
diff --git a/src/docx/opc/parts/coreprops.py b/src/docx/opc/parts/coreprops.py index fda0112..dc8f4bb 100644 --- a/src/docx/opc/parts/coreprops.py +++ b/src/docx/opc/parts/coreprops.py @@ -28,17 +28,19 @@ class CorePropertiesPart(XmlPart): its base properties.""" core_properties_part = cls._new(packag...
["tests/opc/parts/test_coreprops.py::DescribeCorePropertiesPart::it_provides_access_to_its_core_props_object", "tests/opc/parts/test_coreprops.py::DescribeCorePropertiesPart::it_can_create_a_default_core_properties_part"]
["tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture0]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture1]", "tests/dml/test_color.py::DescribeColorFormat::it_knows_its_color_type[type_fixture2]", "tests/dml/test_color.py::DescribeColorFormat::it_knows...
jyangballin/swesmith.x86_64.python-openxml_1776_python-docx.0cf6d71f
true
null
1
14
2
1,193
0
0.6
1
0.75
1
0.2455
81.0115
6,733
swe_smith::train::6458
swe_smith
train
6,458
mahmoud__boltons.3bfcfdd0.func_pm_remove_assign__vqbi52f0
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
Bits class doesn't properly initialize with list values Description I'm trying to use the Bits class to work with binary data, but I'm encountering issues when initializing with a list: ```python from boltons.mathutils import Bits # This fails bits = Bits([True, False]) ``` I get the following error: ``` TypeError...
diff --git a/boltons/mathutils.py b/boltons/mathutils.py index 1367a54..eb17df6 100644 --- a/boltons/mathutils.py +++ b/boltons/mathutils.py @@ -140,7 +140,7 @@ class Bits: def __init__(self, val=0, len_=None): if type(val) is not int: if type(val) is list: - val = ''.join(['1'...
["tests/test_mathutils.py::test_bits"]
["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
1
1,352
0
0.6
1
0.75
1
0.245333
81.011
6,734
swe_smith::train::24849
swe_smith
train
24,849
marshmallow-code__marshmallow.9716fc62.func_pm_ctrl_shuffle__5y7s1jmq
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
ErrorStore.store_error produces incorrect error structure when index is provided #### Description When using ErrorStore.store_error with an index parameter, the error messages are being merged incorrectly, resulting in a flattened list structure instead of the expected nested dictionary structure. #### Steps/Code to...
diff --git a/src/marshmallow/error_store.py b/src/marshmallow/error_store.py index 72b7037..715f160 100644 --- a/src/marshmallow/error_store.py +++ b/src/marshmallow/error_store.py @@ -15,15 +15,14 @@ class ErrorStore: self.errors = {} def store_error(self, messages, field_name=SCHEMA, index=None): + ...
["tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorated_processor_returning_none[raise]", "tests/test_decorators.py::TestValidatesDecorator::test_validates", "tests/test_decorat...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::TestPassOriginal::test_pass_original_single", "tests/test_decorators.py::TestPassOriginal::test_pass_original_many", "tests/test_decorators.py::test_decorated_processor_...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
7
139
1,332
0
0.6
1
0.75
1
0.245333
81.011
6,735
swe_smith::train::42322
swe_smith
train
42,322
scanny__python-pptx.278b47b1.lm_rewrite__r0oazac4
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
### Issue: Incorrect Handling of Non-Existent Package Paths #### Description It seems there's an issue with how `_PhysPkgReader.factory()` handles non-existent package paths. When providing a string path that does not correspond to a valid package, the expected behavior is to raise a `PackageNotFoundError` with a spe...
diff --git a/src/pptx/opc/serialized.py b/src/pptx/opc/serialized.py index 9236670..af1c79b 100644 --- a/src/pptx/opc/serialized.py +++ b/src/pptx/opc/serialized.py @@ -129,20 +129,16 @@ class _PhysPkgReader(Container[PackURI]): @classmethod def factory(cls, pkg_file: str | IO[bytes]) -> _PhysPkgReader: ...
["tests/opc/test_serialized.py::Describe_PhysPkgReader::but_it_raises_when_pkg_path_is_not_a_package"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
20
1
1,071
0
0.6
1
0.75
1
0.245167
81.0105
6,736
swe_smith::train::36463
swe_smith
train
36,463
lincolnloop__python-qrcode.456b01d4.combine_file__ez97acz5
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QRCode generation fails with IndexError after recent changes I'm getting an `IndexError: list index out of range` when trying to generate QR codes. This seems to affect all basic QR code operations. #### Steps to Reproduce ```python import qrcode qr = qrcode.QRCode() qr.add_data("Hello World") qr.make() img = qr.ma...
diff --git a/qrcode/util.py b/qrcode/util.py index 02fe11d..c0741fe 100644 --- a/qrcode/util.py +++ b/qrcode/util.py @@ -269,10 +269,6 @@ def _lost_point_level2(modules, modules_count): def _lost_point_level3(modules, modules_count): - # 1 : 1 : 3 : 1 : 1 ratio (dark:light:dark:light:dark) pattern in - # row...
["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_add_qrdata", "qrcode/tests/test_qrcode.py::test_fit", "qrcode/tests/test_qrcode.py::test_mode_number", "qrcode/tests/test_qrcode.py::test_mode_alpha", "...
["qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_make_image_with_wrong_pattern", "qrcode/tests/test_qrcode.py::test_mask_pattern_setter", "qrcode/tests/test_qrcode.py::test_qrcode_ba...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
1
29
56
891
0
0.6
1
0.75
1
0.245167
81.0105
6,737
swe_smith::train::10207
swe_smith
train
10,207
paramiko__paramiko.23f92003.combine_file__w69hrvr2
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
Ed25519 key loading fails with UnicodeDecodeError #### Description Ed25519 key loading is broken and throws UnicodeDecodeError when trying to load keys from files. This affects both direct key loading and certificate operations. #### Steps/Code to Reproduce ```python import paramiko # Try to load an Ed25519 key ke...
diff --git a/paramiko/ed25519key.py b/paramiko/ed25519key.py index e5e81ac..c9a51b1 100644 --- a/paramiko/ed25519key.py +++ b/paramiko/ed25519key.py @@ -73,12 +73,6 @@ class Ed25519Key(PKey): def _parse_signing_key_data(self, data, password): from paramiko.transport import Transport - # We may ev...
["tests/auth.py::AuthSource_::InMemoryPrivateKey_::repr_shows_pkey_repr", "tests/auth.py::AuthSource_::InMemoryPrivateKey_::repr_appends_agent_flag_when_AgentKey", "tests/pkey.py::PKey_::load_certificate::loading_cert_of_different_type_from_key_raises_ValueError", "tests/test_client.py::SSHClientTest::test_certs_allowe...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
26
12
951
0
0.6
1
0.75
1
0.245167
81.0105
6,738
swe_smith::train::25772
swe_smith
train
25,772
pylint-dev__astroid.b114f6b5.func_basic__kwv79tdx
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
UnboundMethod inference broken for __new__ calls Description When calling `__new__` methods on classes, the inference logic is completely broken and returns incorrect results or raises InferenceError unexpectedly. Steps/Code to Reproduce ```python import astroid # This should infer to a Const node with value 42 co...
diff --git a/astroid/bases.py b/astroid/bases.py index d91a4c9..43ef185 100644 --- a/astroid/bases.py +++ b/astroid/bases.py @@ -492,12 +492,12 @@ class UnboundMethod(Proxy): caller: SuccessfulInferenceResult | None, context: InferenceContext, ) -> collections.abc.Generator[nodes.Const | Instance...
["tests/brain/test_brain.py::test_http_status_brain", "tests/brain/test_pathlib.py::test_inference_parents", "tests/brain/test_pathlib.py::test_inference_parents_subscript_index", "tests/brain/test_pathlib.py::test_inference_parents_subscript_slice", "tests/test_inference.py::InferenceTest::test__new__", "tests/test_in...
["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
15
8
1,171
0
0.6
1
0.75
1
0.245167
81.0105
6,739
swe_smith::train::20455
swe_smith
train
20,455
tobymao__sqlglot.036601ba.combine_module__y3hli898
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
Hive date diff function generates invalid SQL due to variable reference errors #### Description When transpiling date difference expressions to Hive dialect, the code generation fails with `UnboundLocalError` due to variables being referenced before assignment. This affects date/time calculations that rely on the `_d...
diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py index 6084d44..131c9e2 100644 --- a/sqlglot/dialects/hive.py +++ b/sqlglot/dialects/hive.py @@ -84,28 +84,27 @@ def _add_date_sql(self: Hive.Generator, expression: DATE_ADD_OR_SUB) -> str: def _date_diff_sql(self: Hive.Generator, expression: exp.Date...
["tests/dialects/test_hive.py::TestHive::test_time", "tests/dialects/test_teradata.py::TestTeradata::test_translate"]
["tests/dialects/test_hive.py::TestHive::test_bits", "tests/dialects/test_hive.py::TestHive::test_cast", "tests/dialects/test_hive.py::TestHive::test_data_type", "tests/dialects/test_hive.py::TestHive::test_ddl", "tests/dialects/test_hive.py::TestHive::test_escapes", "tests/dialects/test_hive.py::TestHive::test_hive", ...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
2
24
2
991
0
0.6
1
0.75
1
0.245167
81.0105
6,740
swe_smith::train::21066
swe_smith
train
21,066
tobymao__sqlglot.036601ba.func_pm_remove_loop__yyf1zst4
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. It appears that the validation logic has been removed, causing queries with ambiguous or unresolvable columns to pass validation when they s...
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..15855fc 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -115,30 +115,12 @@ def qualify_columns( def validate_qualify_columns(expression: E) -> E: """Raise an `Opt...
["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,110
0
0.6
1
0.75
1
0.245
81.01
6,741
swe_smith::train::20444
swe_smith
train
20,444
tobymao__sqlglot.036601ba.combine_module__qauh81n0
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in unnest_subqueries optimizer #### Description The unnest_subqueries optimizer is throwing an UnboundLocalError when processing certain SQL queries. Variables are being referenced before assignment in the unnest function. #### Steps/Code to Reproduce ```python import sqlglot from sqlglot import o...
diff --git a/sqlglot/optimizer/optimize_joins.py b/sqlglot/optimizer/optimize_joins.py index 1530456..835741f 100644 --- a/sqlglot/optimizer/optimize_joins.py +++ b/sqlglot/optimizer/optimize_joins.py @@ -77,15 +77,14 @@ def normalize(expression): join.set("kind", "CROSS") if join.kind == "CROSS...
["tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_optimize_joins", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch", "tests/test_optimizer.py::TestOptimizer::test_unnest_subqueries"]
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
2
16
5
1,150
0
0.6
1
0.75
1
0.245
81.01
6,742
swe_smith::train::9820
swe_smith
train
9,820
keleshev__schema.24a30457.func_basic__t668k5ky
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
Schema key priority ordering broken for Hook and Optional keys #### Description When using Hook and Optional keys together in a schema, the key priority ordering is incorrect, causing validation to behave unexpectedly. Hook keys should be processed before Optional keys, but the current implementation processes them i...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..2d6b59d 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -395,10 +395,10 @@ class Schema(object): def _dict_key_priority(s) -> float: """Return priority for a given key object.""" if isinstance(s, Hook): - r...
["test_schema.py::test_dict_forbidden_keys", "test_schema.py::test_dict_hook"]
["test_schema.py::test_schema", "test_schema.py::test_validate_file", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_or_only_one", "test_schema.py::test_test", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema....
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
6
2
1,350
0
0.6
1
0.75
1
0.245
81.01
6,743
swe_smith::train::3411
swe_smith
train
3,411
pygments__pygments.27649ebb.combine_file__ik3ytbv4
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
get_all_formatters() returns None values instead of formatter classes #### Description The `get_all_formatters()` function is returning `None` values instead of actual formatter classes. This breaks code that expects to iterate over valid formatter classes. #### Steps/Code to Reproduce ```python from pygments impor...
diff --git a/pygments/formatters/__init__.py b/pygments/formatters/__init__.py index 014de97..87c3272 100644 --- a/pygments/formatters/__init__.py +++ b/pygments/formatters/__init__.py @@ -43,13 +43,12 @@ def _load_formatters(module_name): def get_all_formatters(): """Return a generator for all formatter classe...
["tests/test_cmdline.py::test_L_opt", "tests/test_cmdline.py::test_outfile", "tests/test_cmdline.py::test_S_opt", "tests/test_cmdline.py::test_stream_opt", "tests/test_cmdline.py::test_O_opt", "tests/test_cmdline.py::test_P_opt", "tests/test_cmdline.py::test_F_opt", "tests/test_cmdline.py::test_normal", "tests/test_cmd...
["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
15
12
1,170
0
0.6
1
0.75
1
0.245
81.01
6,744
swe_smith::train::10492
swe_smith
train
10,492
paramiko__paramiko.23f92003.func_basic__k41bkdhd
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SFTP stat() method returns None instead of file attributes #### Description The SFTP client's `stat()` method is returning `None` instead of the expected `SFTPAttributes` object when querying file information. This breaks basic file operations and causes failures when trying to get file size, permissions, or other me...
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 066cd83..b0ba8cb 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -491,9 +491,9 @@ class SFTPClient(BaseSFTP, ClosingContextManager): path = self._adjust_cwd(path) self._log(DEBUG, "stat({!r})".format(path)) ...
["tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_setstat", "tests/test_sftp.py::TestSFTP::test_write_seek", "tests/test_sftp.py::TestSFTP::test_symlink", "tests/test_sftp.py::TestSFTP::test_chdir", "tests/test...
["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag...
jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003
true
null
1
6
21
1,349
0
0.6
1
0.75
1
0.244833
81.0095
6,745
swe_smith::train::28284
swe_smith
train
28,284
encode__starlette.db5063c2.combine_file__1q1r5qt4
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Debug mode inverted in middleware stack When setting `app.debug = True`, the application behaves as if debug mode is disabled, and vice versa. The debug information that should be shown in error responses is not displayed when debug is enabled. #### Steps to Reproduce ```python from starlette.applications import Sta...
diff --git a/starlette/applications.py b/starlette/applications.py index 0a717bb..4f64a51 100644 --- a/starlette/applications.py +++ b/starlette/applications.py @@ -77,24 +77,24 @@ class Starlette: self.middleware_stack: ASGIApp | None = None def build_middleware_stack(self) -> ASGIApp: - debug =...
["tests/middleware/test_base.py::test_multiple_middlewares_stacked_client_disconnected[asyncio]", "tests/middleware/test_base.py::test_multiple_middlewares_stacked_client_disconnected[trio]", "tests/middleware/test_errors.py::test_background_task[asyncio]", "tests/middleware/test_errors.py::test_background_task[trio]",...
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
16
23
1,149
0
0.6
1
0.75
1
0.244833
81.0095
6,746
swe_smith::train::32825
swe_smith
train
32,825
pydantic__pydantic.acb0f10f.lm_rewrite__y6a8rjdp
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Discriminator value mapping error message changed unexpectedly #### Description When defining discriminated unions with overlapping literal values, the error message format has changed. The error now shows a different message than expected when discriminator values map to multiple choices. #### Steps/Code to Reprodu...
diff --git a/pydantic/_internal/_discriminated_union.py b/pydantic/_internal/_discriminated_union.py index 5dd6fda..9daca32 100644 --- a/pydantic/_internal/_discriminated_union.py +++ b/pydantic/_internal/_discriminated_union.py @@ -460,20 +460,16 @@ class _ApplyInferredDiscriminator: code='discriminat...
["tests/test_discriminated_union.py::test_distinct_choices"]
["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
26
1
949
0
0.6
1
0.75
1
0.244833
81.0095
6,747
swe_smith::train::46685
swe_smith
train
46,685
python-trio__trio.cfbbe2c1.combine_file__w4rd4epu
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
SSL operations fail with AttributeError after recent changes #### Description SSL streams are throwing AttributeError exceptions when trying to access basic functionality. The SSL module appears to have broken functionality across the board. #### Steps/Code to Reproduce ```python import trio import ssl async def m...
diff --git a/src/trio/_ssl.py b/src/trio/_ssl.py index 0a0419f..1d71dd7 100644 --- a/src/trio/_ssl.py +++ b/src/trio/_ssl.py @@ -205,12 +205,8 @@ STARTING_RECEIVE_SIZE: TFinal = 16384 def _is_eof(exc: BaseException | None) -> bool: - # There appears to be a bug on Python 3.10, where SSLErrors - # aren't prop...
["src/trio/_tests/test_highlevel_ssl_helpers.py::test_open_ssl_over_tcp_stream_and_everything_else[tls13]", "src/trio/_tests/test_highlevel_ssl_helpers.py::test_open_ssl_over_tcp_stream_and_everything_else[tls12]", "src/trio/_tests/test_ssl.py::test_ssl_client_basics[tls13]", "src/trio/_tests/test_ssl.py::test_ssl_serv...
["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
62
1,189
0
0.6
1
0.75
1
0.244833
81.0095
6,748
swe_smith::train::44721
swe_smith
train
44,721
mahmoud__glom.fb3c4e76.func_basic__fe5bij8m
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
CLI argument order swapped causing incorrect behavior #### Description The glom CLI is not working correctly - it appears the target and spec arguments have been swapped internally, causing glom to try to access the spec as if it were the target data. #### Steps/Code to Reproduce ```bash glom 'a' '{"a": 3}' ``` Ex...
diff --git a/glom/cli.py b/glom/cli.py index 2987064..f8b0da4 100644 --- a/glom/cli.py +++ b/glom/cli.py @@ -53,27 +53,27 @@ def glom_cli(target, spec, indent, debug, inspect, scalar): """Command-line interface to the glom library, providing nested data access and data restructuring with the power of Python. ...
["glom/test/test_cli.py::test_cli_spec_target_argv_basic", "glom/test/test_cli.py::test_cli_spec_argv_target_stdin_basic", "glom/test/test_cli.py::test_cli_scalar", "glom/test/test_cli.py::test_cli_spec_target_files_basic", "glom/test/test_cli.py::test_main_basic", "glom/test/test_cli.py::test_main"]
["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
20
6
1,068
0
0.6
1
0.75
1
0.244667
81.009
6,749
swe_smith::train::24349
swe_smith
train
24,349
sunpy__sunpy.f8edfd5c.func_pm_remove_loop__38w2ou10
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
FITS header processing broken for COMMENT and HISTORY entries #### Description When processing FITS headers, COMMENT and HISTORY entries are not being handled properly. The header conversion appears to skip processing these special keywords entirely. #### Steps/Code to Reproduce ```python import sunpy.io._fits as _...
diff --git a/sunpy/io/_fits.py b/sunpy/io/_fits.py index 5513abe..cadda94 100644 --- a/sunpy/io/_fits.py +++ b/sunpy/io/_fits.py @@ -233,12 +233,6 @@ def header_to_fits(header): # This first iteration separates out COMMENTS and HISTORY into their own # entries. header_items = [] - for k, v in header.i...
["sunpy/io/tests/test_fits.py::test_simple_write_compressed_instance[kwargs0-False]", "sunpy/io/tests/test_fits.py::test_simple_write_compressed_instance[kwargs1-True]", "sunpy/io/tests/test_fits.py::test_warn_nonascii", "sunpy/io/tests/test_fits.py::test_warn_nan", "sunpy/io/tests/test_fits.py::test_warn_longkey", "su...
["sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-None-4]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-1-1]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
7
7
1,328
0
0.6
1
0.75
1
0.244667
81.009
6,750
swe_smith::train::24950
swe_smith
train
24,950
pylint-dev__astroid.b114f6b5.combine_file__0542t5ft
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
CallSite constructor arguments swapped causing inference failures #### Description When creating CallSite instances, the constructor arguments are being passed in the wrong order, causing widespread inference failures across the codebase. #### Steps/Code to Reproduce ```python import astroid # Simple function call...
diff --git a/astroid/arguments.py b/astroid/arguments.py index 3781889..8d51877 100644 --- a/astroid/arguments.py +++ b/astroid/arguments.py @@ -62,8 +62,8 @@ class CallSite: # Determine the callcontext from the given `context` object if any. context = context or InferenceContext() - callcont...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/test_argparse.py::TestBrainArgparse::test_infer_namespace", "tests/brain/test_attr.py::AttrsTest::test_attr_transform", "tests/brain/test_attr.py::AttrsTest::test_attrs_transform", "tests/brain/test_brain.py::Typin...
["tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
9
176
1,288
0
0.6
1
0.75
1
0.244667
81.009
6,751
swe_smith::train::20913
swe_smith
train
20,913
tobymao__sqlglot.036601ba.func_pm_remove_assign__rdpyp6ft
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
NameError in qualify_columns optimizer when processing USING clauses #### Description The qualify_columns optimizer is throwing NameError exceptions when processing SQL queries with USING clauses in JOINs. Multiple variables are referenced before assignment, causing the optimizer to fail. #### Steps/Code to Reproduc...
diff --git a/sqlglot/optimizer/qualify_columns.py b/sqlglot/optimizer/qualify_columns.py index 3ab987d..3ec5d7a 100644 --- a/sqlglot/optimizer/qualify_columns.py +++ b/sqlglot/optimizer/qualify_columns.py @@ -185,11 +185,8 @@ def _expand_using(scope: Scope, resolver: Resolver) -> t.Dict[str, t.Any]: _update_so...
["tests/test_optimizer.py::TestOptimizer::test_merge_subqueries", "tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_pushdown_projection", "tests/test_optimizer.py::TestOptimizer::test_qualify_columns", "tests/test_optimizer.py::TestOptimizer::test_qualify_columns__in...
["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
13
9
1,208
0
0.6
1
0.75
1
0.244667
81.009
6,752
swe_smith::train::9719
swe_smith
train
9,719
marshmallow-code__webargs.dbde72fe.func_pm_class_rm_funcs__4elrucaa
swesmith/marshmallow-code__webargs.dbde72fe
marshmallow-code/webargs
python
null
Missing create_testapp method breaks test framework integration #### Description The `create_testapp` method was removed from `CommonTestCase` class, causing test framework integration to fail. This method is essential for creating WebTest application instances in testing scenarios. #### Steps/Code to Reproduce ```...
diff --git a/src/webargs/testing.py b/src/webargs/testing.py index 0d7bf0f..788d7b6 100644 --- a/src/webargs/testing.py +++ b/src/webargs/testing.py @@ -22,9 +22,6 @@ class CommonTestCase: """Return a WSGI app""" raise NotImplementedError("Must define create_app()") - def create_testapp(self, app...
["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_ignore_extra_data", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_empty", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form_multiple", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_with_nonascii_chars", "te...
["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
27
35
927
0
0.6
1
0.75
1
0.2445
81.0085
6,753
swe_smith::train::5324
swe_smith
train
5,324
PyCQA__flake8.cf1542ce.combine_module__r6vjxuov
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
# Flake8 formatter issues with output files and FilenameOnly formatter I'm experiencing two issues with the latest version of Flake8: ## Issue 1: Output file directories not created properly When using the `--output-file` option to write violations to a file, Flake8 fails if the directory doesn't already exist. It s...
diff --git a/src/flake8/formatting/base.py b/src/flake8/formatting/base.py index d986d65..a8efe37 100644 --- a/src/flake8/formatting/base.py +++ b/src/flake8/formatting/base.py @@ -80,8 +80,8 @@ class BaseFormatter: """ if self.filename: dirname = os.path.dirname(os.path.abspath(self.file...
["tests/unit/test_base_formatter.py::test_start[out.txt]", "tests/unit/test_filenameonly_formatter.py::test_only_returns_a_string_once_from_format"]
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker....
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
2
8
2
1,307
0
0.6
1
0.75
1
0.2445
81.0085
6,754
swe_smith::train::6545
swe_smith
train
6,545
mahmoud__boltons.3bfcfdd0.lm_rewrite__z30h9ukn
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
### Description The `research` function in `iterutils.py` does not handle non-callable `query` parameters as expected. When a non-callable object is passed as the `query` parameter, the function does not raise the anticipated `TypeError`. ### Expected Behavior When a non-callable object is passed as the `query` para...
diff --git a/boltons/iterutils.py b/boltons/iterutils.py index e0a5b90..1bdb7fe 100644 --- a/boltons/iterutils.py +++ b/boltons/iterutils.py @@ -1332,7 +1332,8 @@ def get_path(root, path, default=_UNSET): return cur -def research(root, query=lambda p, k, v: True, reraise=False, enter=default_enter): +def resea...
["tests/test_iterutils.py::test_research"]
["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
17
1
1,127
0
0.6
1
0.75
1
0.2445
81.0085
6,755
swe_smith::train::39707
swe_smith
train
39,707
tornadoweb__tornado.d5ac65c1.func_pm_class_rm_funcs__vltjr7hf
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
Semaphore missing acquire method after recent changes #### Description The `Semaphore` class is missing its `acquire` method, making it impossible to acquire semaphore locks. This breaks basic semaphore functionality. #### Steps/Code to Reproduce ```python import asyncio from tornado.locks import Semaphore async d...
diff --git a/tornado/locks.py b/tornado/locks.py index 9ee1f2f..f48df1e 100644 --- a/tornado/locks.py +++ b/tornado/locks.py @@ -387,13 +387,6 @@ class Semaphore(_TimeoutGarbageCollector): self._value = value - def __repr__(self) -> str: - res = super().__repr__() - extra = "locked" if sel...
["test_release_unacquired (tornado.test.locks_test.BoundedSemaphoreTest)", "test_acquire_fifo (tornado.test.locks_test.LockTests)", "test_acquire_fifo_async_with (tornado.test.locks_test.LockTests)", "test_acquire_release (tornado.test.locks_test.LockTests)", "test_acquire_timeout (tornado.test.locks_test.LockTests)", ...
["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
true
null
1
36
19
746
0
0.6
1
0.75
1
0.244333
81.008
6,756
swe_smith::train::22504
swe_smith
train
22,504
tweepy__tweepy.91a41c6e.func_pm_remove_assign__b9nkory2
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### RecursionError when accessing Space data Hi team, I've encountered an issue when trying to access Space data using the `get_space`, `get_spaces`, and `search_spaces` methods. It seems like there's a RecursionError being thrown, which is quite unexpected. ### Steps to Reproduce 1. Attempt to retrieve a specific ...
diff --git a/tweepy/space.py b/tweepy/space.py index 17fe227..f058b71 100644 --- a/tweepy/space.py +++ b/tweepy/space.py @@ -122,7 +122,6 @@ class Space(HashableID, DataMapping): ) def __init__(self, data): - self.data = data self.id = data["id"] self.state = data["state"] @@ -133...
["tests/test_asyncclient.py::TweepyAsyncClientTests::test_get_space", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_get_spaces", "tests/test_asyncclient.py::TweepyAsyncClientTests::test_search_spaces", "tests/test_client.py::TweepyClientTests::test_get_space", "tests/test_client.py::TweepyClientTests::test_g...
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
15
6
1,166
0
0.6
1
0.75
1
0.244333
81.008
6,757
swe_smith::train::52359
swe_smith
train
52,359
pydicom__pydicom.7d361b3d.func_pm_class_rm_funcs__w1ed3kq3
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
FileMetaDataset allows setting non-group 2 elements #### Description FileMetaDataset should only allow setting DICOM Group 2 elements, but currently accepts any element without validation. #### Steps/Code to Reproduce ```python from pydicom.dataset import FileMetaDataset # This should raise ValueError but doesn't ...
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..9aeca0b 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -3608,34 +3608,6 @@ class FileMetaDataset(Dataset): f"following elements are present: {', '.join(non_group2)}" ) - def __setitem__(se...
["tests/test_dataset.py::TestFileMeta::test_assign_file_meta", "tests/test_dataset.py::TestFileMeta::test_set_file_meta"]
["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
29
2
886
0
0.6
1
0.75
1
0.244333
81.008
6,758
swe_smith::train::31706
swe_smith
train
31,706
benoitc__gunicorn.bacbf8aa.lm_rewrite__ta6nwceb
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
### Worker Class Configuration Issue #### What happened? When attempting to configure a custom worker class in Gunicorn, an error is raised. The issue occurs when setting a custom worker class using the `worker_class` configuration option. Here's a snippet to reproduce the issue: ```python from gunicorn import conf...
diff --git a/gunicorn/config.py b/gunicorn/config.py index 402a26b..f709266 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -113,18 +113,15 @@ class Config: @property def worker_class(self): - uri = self.settings['worker_class'].get() + uri = self.worker_class_str - # are ...
["tests/test_config.py::test_worker_class"]
["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
15
1
1,165
0
0.6
1
0.75
1
0.244167
81.0075
6,759
swe_smith::train::8874
swe_smith
train
8,874
pyupio__safety.7654596b.func_pm_op_change__8ujd8g4i
swesmith/pyupio__safety.7654596b
pyupio/safety
python
null
Text formatter crashes with TypeError when generating reports #### Description The text formatter is throwing a TypeError when trying to generate vulnerability reports. The error occurs during the report generation process where list concatenation operations are being performed incorrectly. #### Steps/Code to Reprod...
diff --git a/safety/formatters/text.py b/safety/formatters/text.py index 0d7a7ff..e53c7af 100644 --- a/safety/formatters/text.py +++ b/safety/formatters/text.py @@ -102,11 +102,11 @@ class TextReport(FormatterAPI): report_brief_section = click.unstyle( build_report_brief_section(columns=80, prim...
["tests/test_cli.py::TestSafetyCLI::test_check_ignore_unpinned_requirements", "tests/test_cli.py::TestSafetyCLI::test_check_vulnerabilities_found_with_outputs", "tests/test_cli.py::TestSafetyCLI::test_check_vulnerabilities_not_found_with_outputs"]
["tests/test_cli.py::TestSafetyCLI::test_announcements_if_is_not_tty", "tests/test_cli.py::TestSafetyCLI::test_basic_html_output_pass", "tests/test_cli.py::TestSafetyCLI::test_check_continue_on_error", "tests/test_cli.py::TestSafetyCLI::test_check_ignore_format_backward_compatible", "tests/test_cli.py::TestSafetyCLI::t...
jyangballin/swesmith.x86_64.pyupio_1776_safety.7654596b
true
null
1
7
3
1,325
0
0.6
1
0.75
1
0.244167
81.0075
6,760
swe_smith::train::20650
swe_smith
train
20,650
tobymao__sqlglot.036601ba.func_pm_ctrl_shuffle__jjq53jtw
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
#### Description SQL transformation functions fail with `NameError` when processing expressions due to undefined variables in the preprocessing logic. #### Steps/Code to Reproduce ```python import sqlglot from sqlglot.transforms import eliminate_join_marks # This should work but raises NameError sql = "SELECT T1.d,...
diff --git a/sqlglot/transforms.py b/sqlglot/transforms.py index 10c0faf..eda5002 100644 --- a/sqlglot/transforms.py +++ b/sqlglot/transforms.py @@ -28,20 +28,6 @@ def preprocess( """ def _to_sql(self, expression: exp.Expression) -> str: - expression_type = type(expression) - - try: - ...
["tests/test_transforms.py::TestTransforms::test_eliminate_join_marks"]
["tests/test_transforms.py::TestTransforms::test_eliminate_distinct_on", "tests/test_transforms.py::TestTransforms::test_eliminate_qualify", "tests/test_transforms.py::TestTransforms::test_remove_precision_parameterized_types", "tests/test_transforms.py::TestTransforms::test_unalias_group"]
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
27
1
925
0
0.6
1
0.75
1
0.244167
81.0075
6,761
swe_smith::train::24038
swe_smith
train
24,038
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__lldm5gb4
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
UnboundLocalError in _update_contour_args method when accessing original_plot_defaults #### Description When calling methods that use `_update_contour_args`, an `UnboundLocalError` is raised because the variable `original_plot_defaults` is referenced before it's defined in the method. #### Steps/Code to Reproduce `...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..bb8cc05 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -2547,6 +2547,10 @@ class GenericMap(NDData): def _update_contour_args(self, contour_args): + # Replace conflicting settings with contour defaults + for ...
["sunpy/map/tests/test_mapbase.py::test_find_contours_inputs", "sunpy/map/tests/test_mapbase.py::test_plot_composite_map_updated_args"]
["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
23
2
1,005
0
0.6
1
0.75
1
0.244167
81.0075
6,762
swe_smith::train::23950
swe_smith
train
23,950
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__7nkiufcr
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
MetaDict._prune_keycomments raises UnboundLocalError when keycomments not in dict #### Description When creating a MetaDict instance without a 'keycomments' key, the `_prune_keycomments` method raises an `UnboundLocalError` because it tries to access the `keycomments` variable before it's defined. #### Steps/Code to...
diff --git a/sunpy/util/metadata.py b/sunpy/util/metadata.py index 38b398b..7de8fb5 100644 --- a/sunpy/util/metadata.py +++ b/sunpy/util/metadata.py @@ -127,6 +127,18 @@ class MetaDict(OrderedDict): ', '.join(bad_keys)) def _prune_keycomments(self, copy=False): + + if copy: +...
["sunpy/util/tests/test_metadata.py::sunpy.util.tests.test_metadata.test_init_with_lst_of_lsts", "sunpy/util/tests/test_metadata.py::sunpy.util.tests.test_metadata.test_init_with_tuple_of_tuples", "sunpy/util/tests/test_metadata.py::test_init_with_tuple_of_tuples", "sunpy/util/tests/test_metadata.py::test_init_with_dic...
["sunpy/util/tests/test_metadata.py::test_init_with_illegal_arg"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
25
11
965
0
0.6
1
0.75
1
0.244167
81.0075
6,763
swe_smith::train::2200
swe_smith
train
2,200
pdfminer__pdfminer.six.1a8bd2f7.func_basic__jmnqve0l
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
PDFType1Font initialization fails with TypeError when processing font widths #### Description When processing PDF documents with Type1 fonts, the font initialization is failing due to incorrect type casting and parameter passing in the PDFType1Font constructor. #### Steps/Code to Reproduce ```python from pdfminer.h...
diff --git a/pdfminer/pdffont.py b/pdfminer/pdffont.py index e1df40c..db938bd 100644 --- a/pdfminer/pdffont.py +++ b/pdfminer/pdffont.py @@ -989,25 +989,23 @@ class PDFType1Font(PDFSimpleFont): try: self.basefont = literal_name(spec["BaseFont"]) except KeyError: - if settings.S...
["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cid_range", "tests/test_highlevel_extract...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
18
43
1,105
0
0.6
1
0.75
1
0.244167
81.0075
6,764
swe_smith::train::41483
swe_smith
train
41,483
scanny__python-pptx.278b47b1.func_basic__pgadrxoh
swesmith/scanny__python-pptx.278b47b1
scanny/python-pptx
python
null
Gradient angle property raises TypeError instead of ValueError for non-linear gradients #### Description When accessing the `gradient_angle` property on a non-linear gradient fill, a `TypeError` is raised instead of the expected `ValueError`. This breaks existing error handling code that expects `ValueError` for this...
diff --git a/src/pptx/dml/fill.py b/src/pptx/dml/fill.py index 8212af9..ed38b7d 100644 --- a/src/pptx/dml/fill.py +++ b/src/pptx/dml/fill.py @@ -235,23 +235,16 @@ class _GradFill(_Fill): |TypeError| when the fill type is not MSO_FILL_TYPE.GRADIENT. Raises |ValueError| for a non-linear gradient (e.g. a...
["tests/dml/test_fill.py::Describe_GradFill::it_knows_the_gradient_angle[angle_fixture0]", "tests/dml/test_fill.py::Describe_GradFill::it_raises_on_non_linear_gradient"]
["tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:catAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:dateAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_provides_access_to_its_title[c:valAx]", "tests/chart/test_axis.py::Describe_BaseAxis::it_pr...
jyangballin/swesmith.x86_64.scanny_1776_python-pptx.278b47b1
true
null
1
13
2
1,204
0
0.6
1
0.75
1
0.244
81.007
6,765
swe_smith::train::22487
swe_smith
train
22,487
tweepy__tweepy.91a41c6e.func_pm_ctrl_shuffle__nhd8sn05
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
### Regression: UnboundLocalError in SearchResults.parse It seems there's a regression in the `SearchResults.parse` method that causes an `UnboundLocalError` when attempting to search tweets. This issue appears to have been introduced in the latest patch. #### Steps to Reproduce: 1. Set up the environment with the l...
diff --git a/tweepy/models.py b/tweepy/models.py index f29361e..24e5f8a 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -294,23 +294,22 @@ class SearchResults(ResultSet): @classmethod def parse(cls, api, json): - metadata = json['search_metadata'] - results = SearchResults() - r...
["tests/test_api.py::TweepyAPITests::testsearchtweets"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
15
1
1,164
0
0.6
1
0.75
1
0.244
81.007
6,766
swe_smith::train::6936
swe_smith
train
6,936
cantools__cantools.0c6a7871.combine_file__2x9fa1qb
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
CDD file loading broken - only reads first line instead of full content When loading CDD files using `add_cdd_file()` or `load_file()`, the parser only reads the first line of the file instead of the complete content. This causes incomplete parsing and missing DIDs. #### Steps/Code to Reproduce ```python import cant...
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
1
16
7
1,144
0
0.6
1
0.75
1
0.244
81.007
6,767
swe_smith::train::39704
swe_smith
train
39,704
tornadoweb__tornado.d5ac65c1.func_pm_class_rm_funcs__smgxz1lk
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
Queue constructor missing after refactoring #### Description The Queue class is missing its `__init__` method, causing `TypeError: Queue() takes no arguments` when trying to instantiate a Queue object. #### Steps/Code to Reproduce ```python from tornado.queues import Queue # This should work but raises TypeError q...
diff --git a/tornado/queues.py b/tornado/queues.py index 9552633..4111a34 100644 --- a/tornado/queues.py +++ b/tornado/queues.py @@ -150,21 +150,6 @@ class Queue(Generic[_T]): # parameter and use protocols to be more precise here. _queue = None # type: Any - def __init__(self, maxsize: int = 0) -> None:...
["test_join_empty_queue (tornado.test.queues_test.LifoQueueJoinTest)", "test_join_timeout (tornado.test.queues_test.LifoQueueJoinTest)", "test_order (tornado.test.queues_test.LifoQueueJoinTest)", "test_task_done (tornado.test.queues_test.LifoQueueJoinTest)", "test_task_done_delay (tornado.test.queues_test.LifoQueueJoin...
["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header...
jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1
true
null
1
32
94
824
0
0.6
1
0.75
1
0.244
81.007
6,768
swe_smith::train::43626
swe_smith
train
43,626
cloudpipe__cloudpickle.6220b0ce.func_pm_ctrl_invert_if__02r4vlsa
swesmith/cloudpipe__cloudpickle.6220b0ce
cloudpipe/cloudpickle
python
null
Slots handling broken for classes with string __slots__ #### Description When pickling classes that have `__slots__` defined as a string (single slot), cloudpickle incorrectly handles the slot removal logic, causing failures during unpickling. #### Steps/Code to Reproduce ```python import cloudpickle class MyClass...
diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 8c50ba1..312cd33 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -752,32 +752,31 @@ def _class_getstate(obj): clsdict.pop("_abc_negative_cache_version", None) registry = clsdict.pop("_abc_registry", ...
["tests/cloudpickle_test.py::CloudPickleTest::test_NamedTuple", "tests/cloudpickle_test.py::CloudPickleTest::test_abc", "tests/cloudpickle_test.py::CloudPickleTest::test_abc_cache_not_pickled", "tests/cloudpickle_test.py::CloudPickleTest::test_abstracts", "tests/cloudpickle_test.py::CloudPickleTest::test_instance_with_...
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/c...
jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce
true
null
1
13
12
1,203
0
0.6
1
0.75
1
0.243833
81.0065
6,769
swe_smith::train::38853
swe_smith
train
38,853
pallets__jinja.ada0a9a6.func_basic__4hkgsulq
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
PackageLoader fails to find templates when package path contains directories #### Description PackageLoader is incorrectly checking for files instead of directories when looking for template roots, causing it to fail to locate templates in packages. #### Steps/Code to Reproduce ```python from jinja2 import PackageL...
diff --git a/src/jinja2/loaders.py b/src/jinja2/loaders.py index 8ca32cb..dbc35f3 100644 --- a/src/jinja2/loaders.py +++ b/src/jinja2/loaders.py @@ -301,20 +301,17 @@ class PackageLoader(BaseLoader): package_path: "str" = "templates", encoding: str = "utf-8", ) -> None: - package_path = os...
["tests/test_loader.py::test_pep_451_import_hook"]
["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
18
1
1,103
0
0.6
1
0.75
1
0.243833
81.0065
6,770
swe_smith::train::31277
swe_smith
train
31,277
scrapy__scrapy.35212ec5.func_pm_ctrl_shuffle__rpw00jjw
swesmith/scrapy__scrapy.35212ec5
scrapy/scrapy
python
null
`scrapy startproject` command fails with NameError #### Description When running `scrapy startproject`, the command fails with a NameError because variables are being used before they are defined. #### Steps/Code to Reproduce ```python import subprocess import sys # Try to create a new Scrapy project result = subp...
diff --git a/scrapy/commands/startproject.py b/scrapy/commands/startproject.py index 1adc153..5fe0d8f 100644 --- a/scrapy/commands/startproject.py +++ b/scrapy/commands/startproject.py @@ -92,10 +92,12 @@ class Command(ScrapyCommand): def run(self, args: list[str], opts: argparse.Namespace) -> None: if le...
["tests/test_commands.py::StartprojectTest::test_existing_project_dir", "tests/test_commands.py::StartprojectTest::test_startproject", "tests/test_commands.py::StartprojectTest::test_startproject_with_project_dir", "tests/test_commands.py::StartprojectTemplatesTest::test_startproject_permissions_from_read_only", "tests...
["tests/test_commands.py::CommandSettings::test_help_formatter", "tests/test_commands.py::CommandSettings::test_settings_json_string", "tests/test_commands.py::GenspiderStandaloneCommandTest::test_generate_standalone_spider", "tests/test_commands.py::GenspiderStandaloneCommandTest::test_same_name_as_existing_file", "te...
jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5
true
null
1
25
52
963
0
0.6
1
0.75
1
0.243833
81.0065
6,771
swe_smith::train::18865
swe_smith
train
18,865
seperman__deepdiff.ed252022.func_basic__m1trqrdj
swesmith/seperman__deepdiff.ed252022
seperman/deepdiff
python
null
DeepHash fails with UnboundLocalError when apply_hash is True for string objects #### Description When using DeepHash with `apply_hash=True` on objects containing strings, an `UnboundLocalError` is raised because the variable `result_cleaned` is not defined in the string handling branch. #### Steps/Code to Reproduce...
diff --git a/deepdiff/deephash.py b/deepdiff/deephash.py index 1f293bd..69bbbb7 100644 --- a/deepdiff/deephash.py +++ b/deepdiff/deephash.py @@ -521,7 +521,7 @@ class DeepHash(Base): elif isinstance(obj, strings): result = prepare_string_for_hashing( - obj, + obj.up...
["tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_delta.py::TestBasicsOfDelta::test_delta_constr_flat_dict_list_param_preserve", "tests/test_delta.py::TestDelta::test_delta_cases[delta_case1]", "tests/test_delta.py::TestIgnoreOrderDelta::test_ignore_order_delta_cases[delta_ignore_order_case1]",...
["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
13
93
1,203
0
0.6
1
0.75
1
0.243833
81.0065
6,772
swe_smith::train::24019
swe_smith
train
24,019
sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__hzfkvu9c
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
TimeSeries equality comparison raises UnboundLocalError #### Description When comparing TimeSeries objects using the `==` operator, an `UnboundLocalError` is raised due to a variable scoping issue in the `__eq__` method. #### Steps/Code to Reproduce ```python import sunpy.timeseries import pandas as pd import numpy...
diff --git a/sunpy/timeseries/timeseriesbase.py b/sunpy/timeseries/timeseriesbase.py index 80e5d20..f51d10e 100644 --- a/sunpy/timeseries/timeseriesbase.py +++ b/sunpy/timeseries/timeseriesbase.py @@ -868,6 +868,14 @@ class GenericTimeSeries: return self._data.values def __eq__(self, other): + ...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_concat_list", "sunpy/timeseries/tests/test_timeseriesbase.py::test_concatenation_of_self", "sunpy/timeseries/tests/test_timeseriesbase.py::test_concatenation_different_data_ts_error", "sunpy/timeseries/tests/test_timeseriesbase.py::test_generic_construction_concaten...
["sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[eve_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[esp_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[fermi_gbm_test_ts]", "sunpy/timeseries/tests/test_timeseriesbase.py::test_units_type[norh_test_ts...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
17
6
1,123
0
0.6
1
0.75
1
0.243833
81.0065
6,773
swe_smith::train::46827
swe_smith
train
46,827
python-trio__trio.cfbbe2c1.func_basic__7mwul5hr
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
System tasks not inheriting context properly #### Description System tasks spawned with `spawn_system_task` are not inheriting the context from the calling task correctly. The context variables set in the parent task are not accessible in system tasks. #### Steps/Code to Reproduce ```python import contextvars impor...
diff --git a/src/trio/_core/_run.py b/src/trio/_core/_run.py index bfb38f4..e6b61de 100644 --- a/src/trio/_core/_run.py +++ b/src/trio/_core/_run.py @@ -2020,9 +2020,9 @@ class Runner: # type: ignore[misc] async_fn, args, self.system_nursery, - name, - syste...
["src/trio/_core/_tests/test_run.py::test_spawn_system_task", "src/trio/_core/_tests/test_run.py::test_system_task_contexts"]
["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co...
jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1
true
null
1
6
2
1,342
0
0.6
1
0.75
1
0.243667
81.006
6,774
swe_smith::train::28279
swe_smith
train
28,279
encode__starlette.db5063c2.combine_file__0petjob6
swesmith/encode__starlette.db5063c2
encode/starlette
python
null
Config file values not being read correctly #### Description When using Config with a file, the configuration values from the file are not being loaded properly. The config seems to be returning default values or environment variables instead of the values specified in the config file. #### Steps/Code to Reproduce ...
diff --git a/starlette/config.py b/starlette/config.py index ca15c56..6e67cdf 100644 --- a/starlette/config.py +++ b/starlette/config.py @@ -37,7 +37,7 @@ class Environ(typing.MutableMapping[str, str]): return iter(self._environ) def __len__(self) -> int: - return len(self._environ) + retu...
["tests/test_config.py::test_config_types", "tests/test_config.py::test_config", "tests/test_config.py::test_environ", "tests/test_config.py::test_config_with_env_prefix"]
["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/tes...
jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2
true
null
1
13
4
1,202
0
0.6
1
0.75
1
0.243667
81.006
6,775
swe_smith::train::27616
swe_smith
train
27,616
arrow-py__arrow.1d70d009.func_basic__plyqblvl
swesmith/arrow-py__arrow.1d70d009
arrow-py/arrow
python
null
Arrow.strptime swaps day and second values #### Description When using `Arrow.strptime()` to parse datetime strings, the day and second values are being swapped in the resulting Arrow object. This causes incorrect datetime objects to be created. #### Steps/Code to Reproduce ```python import arrow from datetime impo...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 9d1f5e3..4eafcde 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -369,15 +369,15 @@ class Arrow: dt = dt_datetime.strptime(date_str, fmt) if tzinfo is None: - tzinfo = dt.tzinfo + tzinfo = timezone.utc if dt.tzinfo is None ...
["tests/test_arrow.py::TestTestArrowFactory::test_strptime"]
["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
6
1
1,342
0
0.6
1
0.75
1
0.243667
81.006
6,776
swe_smith::train::51664
swe_smith
train
51,664
pydicom__pydicom.7d361b3d.combine_module__yt47ki7o
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Pixel data buffer validation fails with incorrect length calculation #### Description When encoding pixel data, the buffer validation is incorrectly calculating the expected length, causing valid pixel data to be rejected with a length mismatch error. #### Steps/Code to Reproduce ```python import pydicom from pydic...
diff --git a/src/pydicom/pixels/decoders/base.py b/src/pydicom/pixels/decoders/base.py index 268f0d4..e942a97 100644 --- a/src/pydicom/pixels/decoders/base.py +++ b/src/pydicom/pixels/decoders/base.py @@ -348,17 +348,10 @@ class DecodeRunner(RunnerBase): The decoded frame. """ - # If self...
["tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/pixels/test_encoder_base.py::TestEncodeRunner::test_validate_buffer", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_compress_inplace", "tests/pixels/test_encoder_base.py::TestDatasetCompress::test_encapsulate_extended", "tests/pixels...
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
2
18
8
1,102
0
0.6
1
0.75
1
0.243667
81.006
6,777
swe_smith::train::24301
swe_smith
train
24,301
sunpy__sunpy.f8edfd5c.func_pm_remove_cond__6f1fqf9z
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
Contour fill validation removed causing unexpected behavior #### Description When using `draw_contours` with `fill=True` and a single contour level that exceeds the maximum data value, the method no longer raises an appropriate error and may produce unexpected results. #### Steps/Code to Reproduce ```python import ...
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py index bdcac77..b14344a 100644 --- a/sunpy/map/mapbase.py +++ b/sunpy/map/mapbase.py @@ -2649,21 +2649,10 @@ class GenericMap(NDData): data = np.ma.array(data, mask=~np.logical_and(np.isfinite(x), np.isfinite(y))) if fill: - # En...
["sunpy/map/tests/test_mapbase.py::test_find_contours_inputs"]
["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
11
1
1,242
0
0.6
1
0.75
1
0.243667
81.006
6,778
swe_smith::train::43614
swe_smith
train
43,614
cloudpipe__cloudpickle.6220b0ce.func_basic__um6uh23a
swesmith/cloudpipe__cloudpickle.6220b0ce
cloudpipe/cloudpickle
python
null
Function unpickling fails with AttributeError after recent changes #### Description Functions pickled with cloudpickle are failing to unpickle correctly, raising AttributeError when trying to set attributes during the restoration process. #### Steps/Code to Reproduce ```python import cloudpickle def test_function(...
diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py index 8c50ba1..7e1adc6 100644 --- a/cloudpickle/cloudpickle.py +++ b/cloudpickle/cloudpickle.py @@ -1123,28 +1123,23 @@ def _function_setstate(obj, state): state, slotstate = state obj.__dict__.update(state) - obj_globals = slotstate.po...
["tests/cloudpickle_test.py::CloudPickleTest::test_NamedTuple", "tests/cloudpickle_test.py::CloudPickleTest::test_abc", "tests/cloudpickle_test.py::CloudPickleTest::test_abstracts", "tests/cloudpickle_test.py::CloudPickleTest::test_bound_classmethod", "tests/cloudpickle_test.py::CloudPickleTest::test_classmethod", "tes...
["tests/cloudpickle_file_test.py::CloudPickleFileTests::test_closed_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_empty_file", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles", "tests/cloudpickle_file_test.py::CloudPickleFileTests::test_plus_mode", "tests/c...
jyangballin/swesmith.x86_64.cloudpipe_1776_cloudpickle.6220b0ce
true
null
1
19
136
1,082
0
0.6
1
0.75
1
0.243667
81.006
6,779
swe_smith::train::44511
swe_smith
train
44,511
pydata__patsy.a5d16484.lm_rewrite__fmcef3v3
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
TypeError when iterating over factor states in _examine_factor_types Description Encountered a TypeError when attempting to iterate over factor states using the DataIterMaker class. The issue arises when the iterator attempts to access elements in the factor_states dictionary using tuple indices, which is not support...
diff --git a/patsy/build.py b/patsy/build.py index cbe2524..9c28191 100644 --- a/patsy/build.py +++ b/patsy/build.py @@ -540,11 +540,11 @@ def test__examine_factor_types(): return self def next(self): + """Return the next item in the sequence, incrementing the counter.""" ...
["patsy/build.py::test__examine_factor_types"]
["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/builtins.py::test_...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
8
1
1,302
0
0.6
1
0.75
1
0.243667
81.006
6,780
swe_smith::train::11652
swe_smith
train
11,652
andialbrecht__sqlparse.e57923b3.combine_module__zqrr80g2
swesmith/andialbrecht__sqlparse.e57923b3
andialbrecht/sqlparse
python
null
SQL formatting produces incorrect output with reindent=True #### Description When using `sqlparse.format()` with `reindent=True`, the formatted SQL output is completely broken and produces unexpected results. The formatting appears to be processing tokens in reverse order and using incorrect method names. #### Steps...
diff --git a/sqlparse/filters/aligned_indent.py b/sqlparse/filters/aligned_indent.py index dc60926..fc274e0 100644 --- a/sqlparse/filters/aligned_indent.py +++ b/sqlparse/filters/aligned_indent.py @@ -58,10 +58,9 @@ class AlignedIndentFilter: tlist.insert_before(tlist[-1], self.nl()) def _process_id...
["tests/test_cli.py::test_valid_args", "tests/test_format.py::TestFormatReindentAligned::test_basic", "tests/test_format.py::TestFormatReindentAligned::test_case_statement", "tests/test_format.py::TestFormatReindentAligned::test_case_statement_with_between", "tests/test_format.py::TestFormatReindentAligned::test_group_...
["tests/test_cli.py::test_cli_main_empty", "tests/test_cli.py::test_parser_empty", "tests/test_cli.py::test_main_help", "tests/test_cli.py::test_invalid_choice", "tests/test_cli.py::test_invalid_args", "tests/test_cli.py::test_invalid_infile", "tests/test_cli.py::test_invalid_outfile", "tests/test_cli.py::test_stdout",...
jyangballin/swesmith.x86_64.andialbrecht_1776_sqlparse.e57923b3
true
null
2
14
43
1,181
0
0.6
1
0.75
1
0.2435
81.0055
6,781
swe_smith::train::24626
swe_smith
train
24,626
marshmallow-code__marshmallow.9716fc62.func_basic__1wz8vdfq
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
NoneOf validator error handling broken after recent changes #### Description The `NoneOf` validator is not working correctly - it's throwing `AttributeError: 'NoneType' object has no attribute 'format'` when validation fails, and the error message formatting has changed unexpectedly. #### Steps/Code to Reproduce ``...
diff --git a/src/marshmallow/validate.py b/src/marshmallow/validate.py index e4536d8..c6f9aaf 100644 --- a/src/marshmallow/validate.py +++ b/src/marshmallow/validate.py @@ -543,9 +543,9 @@ class NoneOf(Validator): default_message = "Invalid input." def __init__(self, iterable: typing.Iterable, *, error: str...
["tests/test_validate.py::test_noneof", "tests/test_validate.py::test_noneof_custom_message", "tests/test_validate.py::test_noneof_repr", "tests/test_validate.py::test_containsnoneof_error_message", "tests/test_validate.py::test_containsnoneof_in_list", "tests/test_validate.py::test_containsnoneof_unhashable_types", "t...
["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
6
10
1,341
0
0.6
1
0.75
1
0.2435
81.0055
6,782
swe_smith::train::42634
swe_smith
train
42,634
python-jsonschema__jsonschema.93e0caa5.func_basic__ph4smhtp
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
Schema validation silently fails without raising SchemaError #### Description When creating a validator with an invalid schema, the validation process no longer raises a `SchemaError` as expected. Instead, it silently continues without any indication that the schema is invalid. #### Steps/Code to Reproduce ```pytho...
diff --git a/jsonschema/validators.py b/jsonschema/validators.py index b8ca3bd..76a6eb3 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -310,11 +310,12 @@ def create( if format_checker is _UNSET: format_checker = Validator.FORMAT_CHECKER validator = Val...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_invalid_explicit_base_uri", "jsonschema/tests/test_cli.py::TestCLI::test_invalid_schema", "jsonschema/tests/test_cli.py::TestCLI::test_invalid_schema_multiple_errors", "jsonschema/te...
["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jsonschema/tests/test_cli.py::TestCLI::test_instance_is_invalid_JSON", "jsonschema/tests/test_c...
jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5
true
null
1
7
137
1,320
0
0.6
1
0.75
1
0.243333
81.005
6,783
swe_smith::train::4444
swe_smith
train
4,444
pygments__pygments.27649ebb.func_pm_remove_assign__q4dgk5p5
swesmith/pygments__pygments.27649ebb
pygments/pygments
python
null
HtmlFormatter breaks with NameError when using line numbers #### Description The HtmlFormatter raises a `NameError: name 'mw' is not defined` when trying to format code with line numbers enabled. This affects both inline and table line number modes. #### Steps/Code to Reproduce ```python from pygments import highli...
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index 3330c1d..760911d 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -726,9 +726,7 @@ class HtmlFormatter(Formatter): sp = self.linenospecial st = self.linenostep num = self.linenostart - ...
["tests/test_html_formatter.py::test_all_options", "tests/test_html_formatter.py::test_linespans", "tests/test_html_formatter_linenos_elements.py::test_linenos_elements[testfilename-False-3-8-1-False-inline]", "tests/test_html_formatter_linenos_elements.py::test_linenos_elements[-True-0-8-1-True-inline]", "tests/test_h...
["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
10
66
1,260
0
0.6
1
0.75
1
0.243333
81.005
6,784
swe_smith::train::48387
swe_smith
train
48,387
sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__mqub590g
swesmith/sqlfluff__sqlfluff.50a1c4b6
sqlfluff/sqlfluff
python
null
JinjaTemplater fails with NameError when ignore_templating is enabled #### Description When using the Jinja templater with `ignore_templating` configuration enabled, the templater crashes with a `NameError` for undefined variables that should be available in the method scope. #### Steps/Code to Reproduce The issue ...
diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py index 934ded3..7f90ceb 100644 --- a/src/sqlfluff/core/templaters/jinja.py +++ b/src/sqlfluff/core/templaters/jinja.py @@ -361,11 +361,8 @@ class JinjaTemplater(PythonTemplater): jinja2.Environment: A properly configu...
["test/core/templaters/jinja_test.py::test__templater_jinja[simple]", "test/core/templaters/jinja_test.py::test__templater_jinja[unboundlocal_bugfix]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[basic_block]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[strip_left_block]", "...
["test/core/templaters/jinja_test.py::test_dummy_undefined_fail_with_undefined_error", "test/core/templaters/jinja_test.py::test_undefined_magic_methods"]
jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6
true
null
1
7
73
1,320
0
0.6
1
0.75
1
0.243333
81.005
6,785
swe_smith::train::49440
swe_smith
train
49,440
mozilla__bleach.73871d76.func_pm_ctrl_shuffle__lk9rbeqs
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
Cleaner.clean() raises UnboundLocalError when processing text #### Description The `clean()` method in the `Cleaner` class is raising an `UnboundLocalError` for the variable `filtered` when trying to clean HTML text. #### Steps/Code to Reproduce ```python import bleach # Basic cleaning operation text = '<p>Hello w...
diff --git a/bleach/sanitizer.py b/bleach/sanitizer.py index 8662a87..fb53832 100644 --- a/bleach/sanitizer.py +++ b/bleach/sanitizer.py @@ -169,6 +169,8 @@ class Cleaner: ) def clean(self, text): + + return self.serializer.render(filtered) """Cleans text and returns sanitized re...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
25
108
960
0
0.6
1
0.75
1
0.243333
81.005
6,786
swe_smith::train::3267
swe_smith
train
3,267
Suor__funcy.207a7810.lm_rewrite__yexal35n
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
# monkey decorator fails with property decorators #### Description The `monkey` decorator in funcy doesn't work correctly when used with properties. When trying to monkey patch a class with a property, it fails to properly handle the property decorator. #### Steps to Reproduce ```python from funcy import monkey cl...
diff --git a/funcy/objects.py b/funcy/objects.py index 6054f7b..1b7d15d 100644 --- a/funcy/objects.py +++ b/funcy/objects.py @@ -66,20 +66,21 @@ def monkey(cls, name=None): Anything overwritten could be accessed via .original attribute of decorated object. """ - assert isclass(cls) or ismodule(cls), "Att...
["tests/test_objects.py::test_monkey_property"]
["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
25
1
960
0
0.6
1
0.75
1
0.243333
81.005
6,787
swe_smith::train::49334
swe_smith
train
49,334
mozilla__bleach.73871d76.func_basic__pxx3up37
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
getTreeBuilder fails with case-sensitive tree type strings #### Description The `getTreeBuilder` function in bleach's html5lib treebuilders module is now case-sensitive and only accepts uppercase tree type strings, breaking existing code that uses lowercase strings like "etree" or "dom". #### Steps/Code to Reproduce...
diff --git a/bleach/_vendor/html5lib/treebuilders/__init__.py b/bleach/_vendor/html5lib/treebuilders/__init__.py index d44447e..923507a 100644 --- a/bleach/_vendor/html5lib/treebuilders/__init__.py +++ b/bleach/_vendor/html5lib/treebuilders/__init__.py @@ -64,16 +64,14 @@ def getTreeBuilder(treeType, implementation=Non...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
11
185
1,240
0
0.6
1
0.75
1
0.243333
81.005
6,788
swe_smith::train::33707
swe_smith
train
33,707
pallets__click.fde47b4b.func_pm_class_rm_funcs__72g237n3
swesmith/pallets__click.fde47b4b
pallets/click
python
null
ProgressBar missing essential methods after refactoring #### Description The ProgressBar class is missing critical methods that were accidentally removed, causing it to be unusable as a context manager and breaking percentage calculations. #### Steps/Code to Reproduce ```python import click # This should work as a...
diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py index a6c7e6b..67600c6 100644 --- a/src/click/_termui_impl.py +++ b/src/click/_termui_impl.py @@ -115,14 +115,6 @@ class ProgressBar(t.Generic[V]): self.render_progress() return self - def __exit__( - self, - exc_typ...
["tests/test_termui.py::test_progressbar_strip_regression", "tests/test_termui.py::test_progressbar_length_hint", "tests/test_termui.py::test_progressbar_no_tty", "tests/test_termui.py::test_progressbar_time_per_iteration[avg0-0.0]", "tests/test_termui.py::test_progressbar_time_per_iteration[avg1-2.5]", "tests/test_ter...
["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs...
jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b
true
null
1
15
26
1,160
0
0.6
1
0.75
1
0.243333
81.005
6,789
swe_smith::train::46561
swe_smith
train
46,561
python-trio__trio.cfbbe2c1.combine_file__4008mwwv
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
Thread limiter returns None instead of CapacityLimiter instance #### Description The `current_default_thread_limiter()` function is returning `None` instead of a `CapacityLimiter` instance, causing widespread failures in thread-related functionality. #### Steps/Code to Reproduce ```python import trio # This should...
diff --git a/src/trio/_threads.py b/src/trio/_threads.py index 7afd7b6..1915a8f 100644 --- a/src/trio/_threads.py +++ b/src/trio/_threads.py @@ -67,15 +67,15 @@ def _track_active_thread() -> Generator[None, None, None]: try: active_threads_local = _active_threads_local.get() except LookupError: - ...
["src/trio/_core/_tests/test_run.py::test_cancel_scope_repr", "src/trio/_tests/test_file_io.py::test_async_methods_wrap", "src/trio/_tests/test_file_io.py::test_open", "src/trio/_tests/test_file_io.py::test_open_context_manager", "src/trio/_tests/test_file_io.py::test_async_iter", "src/trio/_tests/test_file_io.py::test...
["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
22
100
1,019
0
0.6
1
0.75
1
0.243167
81.0045
6,790
swe_smith::train::44007
swe_smith
train
44,007
pydata__patsy.a5d16484.func_basic__ejm35abv
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
Cubic spline error handling inconsistent with expected exceptions #### Description The cubic spline functions `cr()` and `cc()` are not raising the expected error types in certain edge cases. When passing invalid input shapes or parameters, the functions should raise `ValueError` but are instead raising different exc...
diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py index 5f93680..342b3bf 100644 --- a/patsy/mgcv_cubic_splines.py +++ b/patsy/mgcv_cubic_splines.py @@ -785,8 +785,8 @@ def test_crs_errors(): import pytest # Invalid 'x' shape - pytest.raises(ValueError, cr, np.arange(16).reshape((4, 4...
["patsy/mgcv_cubic_splines.py::test_crs_errors"]
["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex...
jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484
true
null
1
11
1
1,239
0
0.6
1
0.75
1
0.243167
81.0045
6,791
swe_smith::train::38308
swe_smith
train
38,308
burnash__gspread.a8be3b96.func_pm_ctrl_shuffle__r06wyhqm
swesmith/burnash__gspread.a8be3b96
burnash/gspread
python
null
Worksheet.resize() method broken - UnboundLocalError on grid_properties #### Description The `resize()` method in the Worksheet class is throwing an `UnboundLocalError` when trying to resize a worksheet. The error occurs because `grid_properties` is referenced before being defined. #### Steps/Code to Reproduce ```p...
diff --git a/gspread/worksheet.py b/gspread/worksheet.py index 883e3a2..f7fa160 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -1484,23 +1484,20 @@ class Worksheet: def resize( self, rows: Optional[int] = None, cols: Optional[int] = None ) -> JSONResponse: + + if not grid_prop...
["tests/worksheet_test.py::WorksheetTest::test_basic_filters", "tests/worksheet_test.py::WorksheetTest::test_batch_merged_cells", "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...
["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
25
30
959
0
0.6
1
0.75
1
0.243167
81.0045
6,792
swe_smith::train::2972
swe_smith
train
2,972
Suor__funcy.207a7810.combine_file__71pmnmxj
swesmith/Suor__funcy.207a7810
suor/funcy
python
null
cached_property returns None instead of the computed value Description I found an issue with the `cached_property` decorator in funcy. When using it, the property always returns `None` instead of the actual computed value. Here's a simple reproduction: ```python from funcy import cached_property class A(object): ...
diff --git a/funcy/objects.py b/funcy/objects.py index 6054f7b..329a24e 100644 --- a/funcy/objects.py +++ b/funcy/objects.py @@ -22,8 +22,9 @@ class cached_property(object): def __get__(self, instance, type=None): if instance is None: return self - res = instance.__dict__[self.fget.__n...
["tests/test_objects.py::test_cached_property", "tests/test_objects.py::test_cached_readonly", "tests/test_objects.py::test_wrap_prop", "tests/test_objects.py::test_monkey_property"]
["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
4
1,279
0
0.6
1
0.75
1
0.243167
81.0045
6,793
swe_smith::train::38600
swe_smith
train
38,600
erikrose__parsimonious.0d3f5f93.combine_file__o06arzju
swesmith/erikrose__parsimonious.0d3f5f93
erikrose/parsimonious
python
null
ParseError message is incorrect and shows wrong information Description I found an issue with the ParseError class in parsimonious. The error messages are incorrect and confusing. Here's a simple example to reproduce the issue: ```python from parsimonious.grammar import Grammar grammar = Grammar('starts_with_a = &...
diff --git a/parsimonious/exceptions.py b/parsimonious/exceptions.py index b9e05bc..7624566 100644 --- a/parsimonious/exceptions.py +++ b/parsimonious/exceptions.py @@ -20,13 +20,13 @@ class ParseError(StrAndRepr, ParsimoniousError): self.expr = expr def __str__(self): - rule_name = (("'%s'" % se...
["parsimonious/tests/test_expressions.py::ErrorReportingTests::test_favoring_named_rules", "parsimonious/tests/test_expressions.py::ErrorReportingTests::test_inner_rule_succeeding", "parsimonious/tests/test_expressions.py::ErrorReportingTests::test_line_and_column", "parsimonious/tests/test_expressions.py::ErrorReporti...
["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
23
5
999
0
0.6
1
0.75
1
0.243167
81.0045
6,794
swe_smith::train::6479
swe_smith
train
6,479
mahmoud__boltons.3bfcfdd0.func_pm_remove_cond__ewalrujw
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
_parse_wraps_expected function breaks with NameError when processing expected arguments #### Description The `_parse_wraps_expected` function in `funcutils.py` is throwing a `NameError` when trying to process expected arguments. The function appears to be missing variable definitions that are referenced in the loop. ...
diff --git a/boltons/funcutils.py b/boltons/funcutils.py index 0bdc28e..4aeb1b5 100644 --- a/boltons/funcutils.py +++ b/boltons/funcutils.py @@ -624,8 +624,6 @@ def _parse_wraps_expected(expected): # you look if expected is None: expected = [] - elif isinstance(expected, str): - expected = ...
["tests/test_funcutils_fb.py::test_wraps_expected"]
["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
19
1
1,078
0
0.6
1
0.75
1
0.243
81.004
6,795
swe_smith::train::2669
swe_smith
train
2,669
cknd__stackprinter.219fcc52.combine_file__p0eqskd7
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
Exception formatting broken - wrong order and missing attributes When formatting exceptions, the output is completely garbled. The exception type and message appear in wrong order, and trying to format exceptions with None values causes AttributeError. #### Steps to Reproduce ```python import stackprinter # This sh...
diff --git a/stackprinter/formatting.py b/stackprinter/formatting.py index 25f5fd8..389877c 100644 --- a/stackprinter/formatting.py +++ b/stackprinter/formatting.py @@ -130,21 +130,15 @@ def format_exc_info(etype, evalue, tb, style='plaintext', add_summary='auto', msg = '' try: - # First, recursively...
["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
32
3
818
0
0.6
1
0.75
1
0.243
81.004
6,796
swe_smith::train::36512
swe_smith
train
36,512
lincolnloop__python-qrcode.456b01d4.combine_module__9hfctbe7
swesmith/lincolnloop__python-qrcode.456b01d4
lincolnloop/python-qrcode
python
null
QR code image generation broken - colors swapped and wrong attributes I'm getting errors when trying to generate QR codes with the PIL image factory. The colors seem to be swapped and there are attribute errors. #### Steps/Code to Reproduce ```python import qrcode qr = qrcode.QRCode() qr.add_data("test data") img =...
diff --git a/qrcode/image/pil.py b/qrcode/image/pil.py index 57ee13a..6f9b314 100644 --- a/qrcode/image/pil.py +++ b/qrcode/image/pil.py @@ -17,29 +17,28 @@ class PilImage(qrcode.image.base.BaseImage): fill_color = kwargs.get("fill_color", "black") try: - fill_color = fill_color.lower() +...
["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode_pil.py::test_render_pil", "qrcode/tests/test_qrcode_pil.py::test_render_pil_background[TransParent]", "qrcode/tests/test_qrcode_pil.py::test_render_pil_background[red]", "qrcode/tests/test_qrcode_pil.py::test_render_pil_background[back_color2]", "...
["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_add_qrdata", "qrcode/tests/test_qrcode.py::test...
jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4
true
null
3
33
16
798
0
0.6
1
0.75
1
0.243
81.004
6,797
swe_smith::train::7035
swe_smith
train
7,035
cantools__cantools.0c6a7871.combine_file__lvfi2b2j
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
DBC parser fails with "list index out of range" when loading files #### Description When trying to load DBC files, the parser crashes with "list index out of range" errors. This affects multiple operations including loading databases, decoding messages, and converting between formats. #### Steps/Code to Reproduce `...
diff --git a/src/cantools/database/can/formats/dbc.py b/src/cantools/database/can/formats/dbc.py index a5b6092..f0f7948 100644 --- a/src/cantools/database/can/formats/dbc.py +++ b/src/cantools/database/can/formats/dbc.py @@ -1291,9 +1291,9 @@ def _load_message_senders(tokens, attributes): message_senders = default...
["tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_databases", "tests/test_database.py::CanToolsDatabaseTest::test_dbc_BU_BO_REL", "tests/test_database.py::CanToolsDatabaseTest::test_foobar", "tests/test_database.py::CanT...
["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
20
15
1,058
0
0.6
1
0.75
1
0.243
81.004
6,798
swe_smith::train::31433
swe_smith
train
31,433
benoitc__gunicorn.bacbf8aa.combine_module__ha56d46u
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
WSGIApplication inheritance broken after recent changes #### Description After some recent changes, WSGIApplication no longer inherits from Application class, causing multiple initialization and functionality issues. #### Steps/Code to Reproduce ```python from gunicorn.app.wsgiapp import WSGIApplication # This sho...
diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py index 9bf7a4f..d5f49c9 100644 --- a/gunicorn/app/base.py +++ b/gunicorn/app/base.py @@ -19,10 +19,10 @@ class BaseApplication: the various necessities for any given web framework. """ def __init__(self, usage=None, prog=None): - self.usage =...
["tests/test_config.py::test_app_config", "tests/test_config.py::test_load_config", "tests/test_config.py::test_load_config_explicit_file", "tests/test_config.py::test_load_config_module", "tests/test_config.py::test_cli_overrides_config", "tests/test_config.py::test_cli_overrides_config_module", "tests/test_config.py:...
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
2
13
17
1,198
0
0.6
1
0.75
1
0.243
81.004
6,799
swe_smith::train::31832
swe_smith
train
31,832
davidhalter__parso.338a5760.combine_module__dht12f4b
swesmith/davidhalter__parso.338a5760
davidhalter/parso
python
null
TokenType constructor arguments swapped causing attribute errors #### Description When creating TokenType instances, the name and contains_syntax arguments appear to be swapped in the constructor, causing the name attribute to contain a boolean value and contains_syntax to contain a string. This leads to AttributeErr...
diff --git a/parso/python/diff.py b/parso/python/diff.py index ba999fa..77ec595 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -65,11 +65,11 @@ def _get_next_leaf_if_indentation(leaf): def _get_suite_indentation(tree_node): - return _get_indentation(tree_node.children[1]) + return _get_inden...
["test/test_cache.py::test_cache_last_used_update[False-True]", "test/test_diff_parser.py::test_simple", "test/test_diff_parser.py::test_change_and_undo", "test/test_diff_parser.py::test_positions", "test/test_diff_parser.py::test_if_simple", "test/test_diff_parser.py::test_func_with_for_and_comment", "test/test_diff_p...
["parso/__init__.py::parso", "parso/python/tree.py::parso.python.tree", "parso/tree.py::parso.tree.NodeOrLeaf.dump", "test/test_cache.py::test_modulepickling_change_cache_dir", "test/test_cache.py::test_modulepickling_simulate_deleted_cache", "test/test_cache.py::test_cache_limit", "test/test_cache.py::test_cache_last_...
jyangballin/swesmith.x86_64.davidhalter_1776_parso.338a5760
true
null
2
25
87
958
0
0.6
1
0.75
1
0.243
81.004