problem_id stringlengths 18 21 | source stringclasses 1
value | task_type stringclasses 1
value | in_source_id stringlengths 13 54 | prompt stringlengths 1.28k 64.2k | golden_diff stringlengths 166 811 | verification_info stringlengths 604 118k |
|---|---|---|---|---|---|---|
gh_patches_debug_1400 | rasdani/github-patches | git_diff | numpy__numpy-12439 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: functions marked with NPY_NO_EXPORT still are exported
Steps to reproduce (on linux):
- git checkout
- `python setup.py build_ext`
- choose a random function marked with the `NPY_NO_EXPORT` macro, for... | diff --git a/numpy/core/setup.py b/numpy/core/setup.py
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -379,8 +379,9 @@
def visibility_define(config):
"""Return the define value to use for NPY_VISIBILITY_HIDDEN (may be empty
string)."""
- if config.check_compiler_gcc4():
- return '__attribut... | {"golden_diff": "diff --git a/numpy/core/setup.py b/numpy/core/setup.py\n--- a/numpy/core/setup.py\n+++ b/numpy/core/setup.py\n@@ -379,8 +379,9 @@\n def visibility_define(config):\n \"\"\"Return the define value to use for NPY_VISIBILITY_HIDDEN (may be empty\n string).\"\"\"\n- if config.check_compiler_gcc4(... |
gh_patches_debug_1401 | rasdani/github-patches | git_diff | zulip__zulip-21726 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create collapsible "Private messages" section in left sidebar
At present, private messages are collapsed in the left sidebar, unless the user is in a private message narrow. This has a few down sides:
1. G... | diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py
--- a/tools/lib/capitalization.py
+++ b/tools/lib/capitalization.py
@@ -78,6 +78,9 @@
r"more topics",
# Used alone in a parenthetical where capitalized looks worse.
r"^deprecated$",
+ # We want the similar text in the Private Messa... | {"golden_diff": "diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py\n--- a/tools/lib/capitalization.py\n+++ b/tools/lib/capitalization.py\n@@ -78,6 +78,9 @@\n r\"more topics\",\n # Used alone in a parenthetical where capitalized looks worse.\n r\"^deprecated$\",\n+ # We want the simil... |
gh_patches_debug_1402 | rasdani/github-patches | git_diff | mars-project__mars-426 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
How to perform all tensor on np.array packages
Example:
```
import mars.tensor as mt
import numpy as np
def test_x():
X1 = mt.tensor([0, 1])
X2 = mt.tensor([2, 3])
X = np.array([X1,X2])
... | diff --git a/mars/tensor/expressions/datasource/array.py b/mars/tensor/expressions/datasource/array.py
--- a/mars/tensor/expressions/datasource/array.py
+++ b/mars/tensor/expressions/datasource/array.py
@@ -129,7 +129,7 @@
if dtype is not None and data.dtype != dtype:
return data.astype(dtype)
... | {"golden_diff": "diff --git a/mars/tensor/expressions/datasource/array.py b/mars/tensor/expressions/datasource/array.py\n--- a/mars/tensor/expressions/datasource/array.py\n+++ b/mars/tensor/expressions/datasource/array.py\n@@ -129,7 +129,7 @@\n if dtype is not None and data.dtype != dtype:\n return ... |
gh_patches_debug_1403 | rasdani/github-patches | git_diff | ansible__ansible-modules-core-3778 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
unarchive issue with ansible 2.1 rc3
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
unarchive
##### ANSIBLE VERSION
```
ansible-playbook 2.1.0.0
config file = /etc/ansible/ansible.cfg
configured mod... | diff --git a/files/unarchive.py b/files/unarchive.py
--- a/files/unarchive.py
+++ b/files/unarchive.py
@@ -701,6 +701,9 @@
# supports_check_mode = True,
)
+ # We screenscrape a huge amount of commands so use C locale anytime we do
+ module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_... | {"golden_diff": "diff --git a/files/unarchive.py b/files/unarchive.py\n--- a/files/unarchive.py\n+++ b/files/unarchive.py\n@@ -701,6 +701,9 @@\n # supports_check_mode = True,\n )\n \n+ # We screenscrape a huge amount of commands so use C locale anytime we do\n+ module.run_command_environ_update = dict(... |
gh_patches_debug_1404 | rasdani/github-patches | git_diff | matrix-org__synapse-6563 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
/_synapse/admin/v2/users is broken
Running the /_synapse/admin/v2/users as documented produces an internal server error
Postgres logs:
```
STATEMENT: SELECT name, password_hash, is_guest, admin, user_ty... | diff --git a/synapse/storage/data_stores/main/__init__.py b/synapse/storage/data_stores/main/__init__.py
--- a/synapse/storage/data_stores/main/__init__.py
+++ b/synapse/storage/data_stores/main/__init__.py
@@ -526,9 +526,9 @@
attr_filter = {}
if not guests:
- attr_filter["is_guest"] = Fa... | {"golden_diff": "diff --git a/synapse/storage/data_stores/main/__init__.py b/synapse/storage/data_stores/main/__init__.py\n--- a/synapse/storage/data_stores/main/__init__.py\n+++ b/synapse/storage/data_stores/main/__init__.py\n@@ -526,9 +526,9 @@\n \n attr_filter = {}\n if not guests:\n- attr... |
gh_patches_debug_1405 | rasdani/github-patches | git_diff | keras-team__keras-core-348 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
keras.layers.CenterCrop raises AttributeError when passed a list of images
With tf.keras, the following code works, but not in Keras-Core:
```python
import keras_core as keras
import numpy as np
image... | diff --git a/keras_core/layers/preprocessing/center_crop.py b/keras_core/layers/preprocessing/center_crop.py
--- a/keras_core/layers/preprocessing/center_crop.py
+++ b/keras_core/layers/preprocessing/center_crop.py
@@ -52,6 +52,7 @@
self.data_format = backend.standardize_data_format(data_format)
def cal... | {"golden_diff": "diff --git a/keras_core/layers/preprocessing/center_crop.py b/keras_core/layers/preprocessing/center_crop.py\n--- a/keras_core/layers/preprocessing/center_crop.py\n+++ b/keras_core/layers/preprocessing/center_crop.py\n@@ -52,6 +52,7 @@\n self.data_format = backend.standardize_data_format(data_f... |
gh_patches_debug_1406 | rasdani/github-patches | git_diff | streamlit__streamlit-6828 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Right-side label of `st.slider` and `st.select_slider` overflows when inside `st.expander`
### Checklist
- [x] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for simil... | diff --git a/e2e/scripts/st_select_slider.py b/e2e/scripts/st_select_slider.py
--- a/e2e/scripts/st_select_slider.py
+++ b/e2e/scripts/st_select_slider.py
@@ -88,3 +88,12 @@
)
st.write("Value 8:", st.session_state.select_slider8)
st.write("Select slider changed:", "select_slider_changed" in st.session_st... | {"golden_diff": "diff --git a/e2e/scripts/st_select_slider.py b/e2e/scripts/st_select_slider.py\n--- a/e2e/scripts/st_select_slider.py\n+++ b/e2e/scripts/st_select_slider.py\n@@ -88,3 +88,12 @@\n )\n st.write(\"Value 8:\", st.session_state.select_slider8)\n st.write(\"Select slider changed:\", \"select_slid... |
gh_patches_debug_1407 | rasdani/github-patches | git_diff | apluslms__a-plus-1310 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Users should not be able to edit content hierarchy
Typically the A+ course content structure is configured from a JSON file generated by gitmanager. However, the teachers have possibility to edit the attribut... | diff --git a/edit_course/exercise_forms.py b/edit_course/exercise_forms.py
--- a/edit_course/exercise_forms.py
+++ b/edit_course/exercise_forms.py
@@ -55,6 +55,8 @@
self.fields["parent"].queryset = LearningObject.objects\
.exclude(id=self.lobject.id)\
.filter(course_module=self.lobjec... | {"golden_diff": "diff --git a/edit_course/exercise_forms.py b/edit_course/exercise_forms.py\n--- a/edit_course/exercise_forms.py\n+++ b/edit_course/exercise_forms.py\n@@ -55,6 +55,8 @@\n self.fields[\"parent\"].queryset = LearningObject.objects\\\n .exclude(id=self.lobject.id)\\\n .filte... |
gh_patches_debug_1408 | rasdani/github-patches | git_diff | conan-io__conan-center-index-7774 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[request] sigslot/1.2.1
### Package Details
* Package Name/Version: **sigslot/1.2.1**
* Changelog: **https://github.com/palacaze/sigslot/releases/tag/v1.2.1**
The above mentioned version is newly r... | diff --git a/recipes/sigslot/all/conanfile.py b/recipes/sigslot/all/conanfile.py
--- a/recipes/sigslot/all/conanfile.py
+++ b/recipes/sigslot/all/conanfile.py
@@ -65,4 +65,4 @@
self.cpp_info.components["_sigslot"].system_libs.append("pthread")
if self.settings.os == "Windows":
if self... | {"golden_diff": "diff --git a/recipes/sigslot/all/conanfile.py b/recipes/sigslot/all/conanfile.py\n--- a/recipes/sigslot/all/conanfile.py\n+++ b/recipes/sigslot/all/conanfile.py\n@@ -65,4 +65,4 @@\n self.cpp_info.components[\"_sigslot\"].system_libs.append(\"pthread\")\n if self.settings.os == \"Win... |
gh_patches_debug_1409 | rasdani/github-patches | git_diff | qutip__qutip-1390 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installation of qutip shows various warnings on ubuntu 20.04.1
**Describe the bug**
Installing the qutip on ubuntu 20.04.1 shows the following warnings:
```
$ sudo apt install python3-qutip
…
Entpacken ... | diff --git a/qutip/_mkl/spmv.py b/qutip/_mkl/spmv.py
--- a/qutip/_mkl/spmv.py
+++ b/qutip/_mkl/spmv.py
@@ -50,7 +50,7 @@
indices = A.indices.ctypes.data_as(POINTER(c_int))
# Allocate output, using same conventions as input
- if x.ndim is 1:
+ if x.ndim == 1:
y = np.empty(m,dtype=np.comple... | {"golden_diff": "diff --git a/qutip/_mkl/spmv.py b/qutip/_mkl/spmv.py\n--- a/qutip/_mkl/spmv.py\n+++ b/qutip/_mkl/spmv.py\n@@ -50,7 +50,7 @@\n indices = A.indices.ctypes.data_as(POINTER(c_int))\n \n # Allocate output, using same conventions as input\n- if x.ndim is 1:\n+ if x.ndim == 1:\n y = ... |
gh_patches_debug_1410 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-3848 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
lint takes a long time
Fix that.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `exporter/opentelemetry-exp... | diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py
--- a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py
+++ b/exporter/opentelemetry-exp... | {"golden_diff": "diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py\n--- a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py\n+++ b/exporte... |
gh_patches_debug_1411 | rasdani/github-patches | git_diff | kivy__kivy-4728 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error: fromstring() in core/image/img_pil.py
Platform: Linux (OpenSuse, Ubuntu)
[INFO ] [Kivy ] v1.9.1
[INFO ] [Python ] v2.7.12 (default, Jul 01 2016, 15:36:53) [GCC]
Error:
File "/... | diff --git a/kivy/core/image/img_pil.py b/kivy/core/image/img_pil.py
--- a/kivy/core/image/img_pil.py
+++ b/kivy/core/image/img_pil.py
@@ -102,7 +102,8 @@
@staticmethod
def save(filename, width, height, fmt, pixels, flipped=False):
- image = PILImage.fromstring(fmt.upper(), (width, height), pixels)
+... | {"golden_diff": "diff --git a/kivy/core/image/img_pil.py b/kivy/core/image/img_pil.py\n--- a/kivy/core/image/img_pil.py\n+++ b/kivy/core/image/img_pil.py\n@@ -102,7 +102,8 @@\n \n @staticmethod\n def save(filename, width, height, fmt, pixels, flipped=False):\n- image = PILImage.fromstring(fmt.upper(), (w... |
gh_patches_debug_1412 | rasdani/github-patches | git_diff | ethereum__consensus-specs-1131 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BLS and testing
Decided I wanted to get this out to explain the current state of testing, and **collect feedback** (implementers please comment) on what you need from testing, and your feelings about BLS usag... | diff --git a/scripts/phase0/build_spec.py b/scripts/phase0/build_spec.py
--- a/scripts/phase0/build_spec.py
+++ b/scripts/phase0/build_spec.py
@@ -13,17 +13,9 @@
NewType,
Tuple,
)
-from eth2spec.utils.minimal_ssz import (
- SSZType,
- hash_tree_root,
- signing_root,
-)
-from eth2spec.utils.bls_stub ... | {"golden_diff": "diff --git a/scripts/phase0/build_spec.py b/scripts/phase0/build_spec.py\n--- a/scripts/phase0/build_spec.py\n+++ b/scripts/phase0/build_spec.py\n@@ -13,17 +13,9 @@\n NewType,\n Tuple,\n )\n-from eth2spec.utils.minimal_ssz import (\n- SSZType,\n- hash_tree_root,\n- signing_root,\n-)\n-... |
gh_patches_debug_1413 | rasdani/github-patches | git_diff | googleapis__python-spanner-django-124 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
dbapi: properly parse and ensure WHERE clause
PR #111's task was to add a WHERE clause to missing ones. However, the code in there assumes a single statement not terminated by a SQL terminator `;` and we blin... | diff --git a/spanner/django/operations.py b/spanner/django/operations.py
--- a/spanner/django/operations.py
+++ b/spanner/django/operations.py
@@ -30,7 +30,7 @@
# Cloud Spanner doesn't support TRUNCATE so DELETE instead.
# A dummy WHERE clause is required.
if tables:
- delete_sql =... | {"golden_diff": "diff --git a/spanner/django/operations.py b/spanner/django/operations.py\n--- a/spanner/django/operations.py\n+++ b/spanner/django/operations.py\n@@ -30,7 +30,7 @@\n # Cloud Spanner doesn't support TRUNCATE so DELETE instead.\n # A dummy WHERE clause is required.\n if tables:\n-... |
gh_patches_debug_1414 | rasdani/github-patches | git_diff | tensorflow__tfx-2189 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Project can't be cloned correctly on macOS due to case insensitivity
Under the `tfx` folder there's a folder called `build` and a bazel file called `BUILD`. Because macOS is by default case insensitive, only ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -108,7 +108,7 @@
def run(self):
subprocess.check_call(
- [self._bazel_cmd, 'run', '//tfx/build:gen_proto'],
+ [self._bazel_cmd, 'run', '//build:gen_proto'],
# Bazel should be invoked in a directory containing bazel WORKSP... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -108,7 +108,7 @@\n \n def run(self):\n subprocess.check_call(\n- [self._bazel_cmd, 'run', '//tfx/build:gen_proto'],\n+ [self._bazel_cmd, 'run', '//build:gen_proto'],\n # Bazel should be invoked in a directo... |
gh_patches_debug_1415 | rasdani/github-patches | git_diff | akvo__akvo-rsr-3604 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Organisation report shown in project reports page
The "Project overview" report is displayed on the project report page, which is an organisation report and should not be displayed on the project report page... | diff --git a/akvo/rest/views/report.py b/akvo/rest/views/report.py
--- a/akvo/rest/views/report.py
+++ b/akvo/rest/views/report.py
@@ -58,7 +58,7 @@
project = get_object_or_404(Project, pk=project_pk)
reports = Report.objects.prefetch_related('formats', 'organisations')\
- .filter... | {"golden_diff": "diff --git a/akvo/rest/views/report.py b/akvo/rest/views/report.py\n--- a/akvo/rest/views/report.py\n+++ b/akvo/rest/views/report.py\n@@ -58,7 +58,7 @@\n \n project = get_object_or_404(Project, pk=project_pk)\n reports = Report.objects.prefetch_related('formats', 'organisations')\\\n- ... |
gh_patches_debug_1416 | rasdani/github-patches | git_diff | numba__numba-3241 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ellipsis indexing and assignment not working when needed number of `:` is zero
I was trying to index using `...` on both sides of assignment so I could use the same function for inputs with 1, 2, or N dimensi... | diff --git a/numba/typing/arraydecl.py b/numba/typing/arraydecl.py
--- a/numba/typing/arraydecl.py
+++ b/numba/typing/arraydecl.py
@@ -144,7 +144,11 @@
elif not check_contiguity(right_indices[::-1]):
layout = 'A'
- res = ary.copy(ndim=ndim, layout=layout)
+ if ndim == 0:
+ ... | {"golden_diff": "diff --git a/numba/typing/arraydecl.py b/numba/typing/arraydecl.py\n--- a/numba/typing/arraydecl.py\n+++ b/numba/typing/arraydecl.py\n@@ -144,7 +144,11 @@\n elif not check_contiguity(right_indices[::-1]):\n layout = 'A'\n \n- res = ary.copy(ndim=ndim, layout=layout)\n... |
gh_patches_debug_1417 | rasdani/github-patches | git_diff | Theano__Theano-4343 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bilinear_Upsampling requires to specify batch_size and num_input_channels
Referring to this line:
https://github.com/Theano/Theano/blob/master/theano/tensor/nnet/abstract_conv.py#L570
this piece of code does... | diff --git a/theano/tensor/nnet/abstract_conv.py b/theano/tensor/nnet/abstract_conv.py
--- a/theano/tensor/nnet/abstract_conv.py
+++ b/theano/tensor/nnet/abstract_conv.py
@@ -567,7 +567,7 @@
subsample=(ratio, ratio),
filter_... | {"golden_diff": "diff --git a/theano/tensor/nnet/abstract_conv.py b/theano/tensor/nnet/abstract_conv.py\n--- a/theano/tensor/nnet/abstract_conv.py\n+++ b/theano/tensor/nnet/abstract_conv.py\n@@ -567,7 +567,7 @@\n subsample=(ratio, ratio),\n ... |
gh_patches_debug_1418 | rasdani/github-patches | git_diff | openshift__openshift-ansible-3914 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Long DN string with spaces can cause incorrect YAML to be generated in master-config
#### Description
I have a configuration file where my settings for an LDAP identity provider has a long string containing ... | diff --git a/roles/openshift_master_facts/filter_plugins/openshift_master.py b/roles/openshift_master_facts/filter_plugins/openshift_master.py
--- a/roles/openshift_master_facts/filter_plugins/openshift_master.py
+++ b/roles/openshift_master_facts/filter_plugins/openshift_master.py
@@ -496,6 +496,7 @@
return u... | {"golden_diff": "diff --git a/roles/openshift_master_facts/filter_plugins/openshift_master.py b/roles/openshift_master_facts/filter_plugins/openshift_master.py\n--- a/roles/openshift_master_facts/filter_plugins/openshift_master.py\n+++ b/roles/openshift_master_facts/filter_plugins/openshift_master.py\n@@ -496,6 +496,7 ... |
gh_patches_debug_1419 | rasdani/github-patches | git_diff | beeware__toga-1078 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
toga-winforms\windows.py openFileDialog needs an "s"
**Describe the bug**
When using multiselect = True in winforms the returned value is a single file because
if dialog.ShowDialog() == WinForms.Dialo... | diff --git a/src/winforms/toga_winforms/window.py b/src/winforms/toga_winforms/window.py
--- a/src/winforms/toga_winforms/window.py
+++ b/src/winforms/toga_winforms/window.py
@@ -187,7 +187,7 @@
if multiselect:
dialog.Multiselect = True
if dialog.ShowDialog() == WinForms.DialogResult.OK:
... | {"golden_diff": "diff --git a/src/winforms/toga_winforms/window.py b/src/winforms/toga_winforms/window.py\n--- a/src/winforms/toga_winforms/window.py\n+++ b/src/winforms/toga_winforms/window.py\n@@ -187,7 +187,7 @@\n if multiselect:\n dialog.Multiselect = True\n if dialog.ShowDialog() == Win... |
gh_patches_debug_1420 | rasdani/github-patches | git_diff | facebookresearch__hydra-2677 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] Fix failing tests
Several tests are broken on main
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ex... | diff --git a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py b/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py
--- a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py
+++ b/examples/tutorials/basic/running_your_hydra_app/3_working_d... | {"golden_diff": "diff --git a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py b/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py\n--- a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py\n+++ b/examples/tutorials/basic/running_your_hy... |
gh_patches_debug_1421 | rasdani/github-patches | git_diff | Pycord-Development__pycord-888 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
case_insensitive not working properly in 2.0.0b1
### Summary
Commands will only be accepted if they are full lowercase
### Reproduction Steps
Implement command with not only lowercase letters
Add ca... | diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -314,7 +314,7 @@
ctx.invoked_with = invoker
# type-checker fails to narrow invoked_prefix type.
ctx.prefix = invoked_prefix # type: ignore
- ct... | {"golden_diff": "diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py\n--- a/discord/ext/commands/bot.py\n+++ b/discord/ext/commands/bot.py\n@@ -314,7 +314,7 @@\n ctx.invoked_with = invoker\n # type-checker fails to narrow invoked_prefix type.\n ctx.prefix = invoked_prefix # t... |
gh_patches_debug_1422 | rasdani/github-patches | git_diff | django__channels-1886 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve BaseMiddleware class docstring
The class docstring of [BaseMiddleware](https://github.com/django/channels/blob/master/channels/middleware.py#L3) should be updated to explain that `__call__` (and `__in... | diff --git a/channels/middleware.py b/channels/middleware.py
--- a/channels/middleware.py
+++ b/channels/middleware.py
@@ -1,8 +1,6 @@
class BaseMiddleware:
"""
- Base class for implementing ASGI middleware. Inherit from this and
- override the setup() method if you want to do things before you
- get to.... | {"golden_diff": "diff --git a/channels/middleware.py b/channels/middleware.py\n--- a/channels/middleware.py\n+++ b/channels/middleware.py\n@@ -1,8 +1,6 @@\n class BaseMiddleware:\n \"\"\"\n- Base class for implementing ASGI middleware. Inherit from this and\n- override the setup() method if you want to do thi... |
gh_patches_debug_1423 | rasdani/github-patches | git_diff | cocotb__cocotb-745 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Waiting on an event that has already fired will hang forever
We just need to check that if we have already fired then return a NullTrigger()
[Need to modify this function](https://github.com/potentialventu... | diff --git a/cocotb/triggers.py b/cocotb/triggers.py
--- a/cocotb/triggers.py
+++ b/cocotb/triggers.py
@@ -401,7 +401,13 @@
def wait(self):
"""This can be yielded to block this coroutine
- until another wakes it"""
+ until another wakes it
+
+ If the Event has already been fired, th... | {"golden_diff": "diff --git a/cocotb/triggers.py b/cocotb/triggers.py\n--- a/cocotb/triggers.py\n+++ b/cocotb/triggers.py\n@@ -401,7 +401,13 @@\n \n def wait(self):\n \"\"\"This can be yielded to block this coroutine\n- until another wakes it\"\"\"\n+ until another wakes it\n+\n+ If the... |
gh_patches_debug_1424 | rasdani/github-patches | git_diff | e-valuation__EvaP-728 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Warning in courses with small number of participants
In courses with 5 or less participants a warning should be shown above the course's questionnaire:
_This course has only a small number of participants. P... | diff --git a/evap/student/views.py b/evap/student/views.py
--- a/evap/student/views.py
+++ b/evap/student/views.py
@@ -76,6 +76,7 @@
course_form_group=course_form_group,
contributor_form_groups=contributor_form_groups,
course=course,
+ participants_warni... | {"golden_diff": "diff --git a/evap/student/views.py b/evap/student/views.py\n--- a/evap/student/views.py\n+++ b/evap/student/views.py\n@@ -76,6 +76,7 @@\n course_form_group=course_form_group,\n contributor_form_groups=contributor_form_groups,\n course=course,\n+ ... |
gh_patches_debug_1425 | rasdani/github-patches | git_diff | WordPress__openverse-api-723 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Swagger/ReDoc page raises an error
## Description
<!-- Concisely describe the bug. Compare your experience with what you expected to happen. -->
<!-- For example: "I clicked the 'submit' button and instead of... | diff --git a/api/catalog/custom_auto_schema.py b/api/catalog/custom_auto_schema.py
--- a/api/catalog/custom_auto_schema.py
+++ b/api/catalog/custom_auto_schema.py
@@ -4,6 +4,14 @@
class CustomAutoSchema(SwaggerAutoSchema):
+ def get_pagination_parameters(self):
+ """
+ Since the pagination params ... | {"golden_diff": "diff --git a/api/catalog/custom_auto_schema.py b/api/catalog/custom_auto_schema.py\n--- a/api/catalog/custom_auto_schema.py\n+++ b/api/catalog/custom_auto_schema.py\n@@ -4,6 +4,14 @@\n \n \n class CustomAutoSchema(SwaggerAutoSchema):\n+ def get_pagination_parameters(self):\n+ \"\"\"\n+ ... |
gh_patches_debug_1426 | rasdani/github-patches | git_diff | xorbitsai__inference-758 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG:vllm bug
### Describe the bug
KeyError: [address=172.22.227.26:33767, pid=20969] 'stream'
### To Reproduce
To help us to reproduce this bug, please provide information below:
```
Traceback (most ... | diff --git a/xinference/model/llm/vllm/core.py b/xinference/model/llm/vllm/core.py
--- a/xinference/model/llm/vllm/core.py
+++ b/xinference/model/llm/vllm/core.py
@@ -349,7 +349,7 @@
full_prompt = self.get_prompt(prompt, chat_history, prompt_style)
sanitized = self._sanitize_chat_config(generate_con... | {"golden_diff": "diff --git a/xinference/model/llm/vllm/core.py b/xinference/model/llm/vllm/core.py\n--- a/xinference/model/llm/vllm/core.py\n+++ b/xinference/model/llm/vllm/core.py\n@@ -349,7 +349,7 @@\n full_prompt = self.get_prompt(prompt, chat_history, prompt_style)\n \n sanitized = self._sanitize_c... |
gh_patches_debug_1427 | rasdani/github-patches | git_diff | GeotrekCE__Geotrek-admin-2644 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Interventions - calcul des coûts
Dans le module intervention, il y a un truc que je comprends pas trop sur le calcul des coûts, en effet les coûts ne se cumulent pas, on dirait qu'il privilégie certains poste... | diff --git a/geotrek/maintenance/models.py b/geotrek/maintenance/models.py
--- a/geotrek/maintenance/models.py
+++ b/geotrek/maintenance/models.py
@@ -179,9 +179,9 @@
@property
def total_cost(self):
return self.total_cost_mandays + \
- self.material_cost or 0 + \
- self.heliport... | {"golden_diff": "diff --git a/geotrek/maintenance/models.py b/geotrek/maintenance/models.py\n--- a/geotrek/maintenance/models.py\n+++ b/geotrek/maintenance/models.py\n@@ -179,9 +179,9 @@\n @property\n def total_cost(self):\n return self.total_cost_mandays + \\\n- self.material_cost or 0 + \\\... |
gh_patches_debug_1428 | rasdani/github-patches | git_diff | pallets__werkzeug-1798 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
New Microsoft Edge User Agent
## Background
Microsoft Edge now based on Chromium and the user agent string is updated.
`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom... | diff --git a/src/werkzeug/useragents.py b/src/werkzeug/useragents.py
--- a/src/werkzeug/useragents.py
+++ b/src/werkzeug/useragents.py
@@ -47,7 +47,7 @@
("ask jeeves", "ask"),
(r"aol|america\s+online\s+browser", "aol"),
(r"opera|opr", "opera"),
- ("edge", "edge"),
+ ("edge|edg",... | {"golden_diff": "diff --git a/src/werkzeug/useragents.py b/src/werkzeug/useragents.py\n--- a/src/werkzeug/useragents.py\n+++ b/src/werkzeug/useragents.py\n@@ -47,7 +47,7 @@\n (\"ask jeeves\", \"ask\"),\n (r\"aol|america\\s+online\\s+browser\", \"aol\"),\n (r\"opera|opr\", \"opera\"),\n- (... |
gh_patches_debug_1429 | rasdani/github-patches | git_diff | ansible-collections__community.general-1082 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
solaris_zone: zone configuration fails with python3
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!---... | diff --git a/plugins/modules/system/solaris_zone.py b/plugins/modules/system/solaris_zone.py
--- a/plugins/modules/system/solaris_zone.py
+++ b/plugins/modules/system/solaris_zone.py
@@ -193,7 +193,7 @@
self.module.fail_json(msg='Missing required argument: path')
if not self.module.check_mode:
-... | {"golden_diff": "diff --git a/plugins/modules/system/solaris_zone.py b/plugins/modules/system/solaris_zone.py\n--- a/plugins/modules/system/solaris_zone.py\n+++ b/plugins/modules/system/solaris_zone.py\n@@ -193,7 +193,7 @@\n self.module.fail_json(msg='Missing required argument: path')\n \n if not se... |
gh_patches_debug_1430 | rasdani/github-patches | git_diff | pymedusa__Medusa-6208 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[APP SUBMITTED]: TypeError: cannot use a string pattern on a bytes-like object
### INFO
**Python Version**: `3.7.2 (default, Jan 3 2019, 02:55:40) [GCC 8.2.0]`
**Operating System**: `Linux-4.9.35-v7+-armv7l... | diff --git a/medusa/providers/nzb/binsearch.py b/medusa/providers/nzb/binsearch.py
--- a/medusa/providers/nzb/binsearch.py
+++ b/medusa/providers/nzb/binsearch.py
@@ -272,7 +272,7 @@
return None
# Validate that the result has the content of a valid nzb.
- if not BinSearchProvider.nzb_chec... | {"golden_diff": "diff --git a/medusa/providers/nzb/binsearch.py b/medusa/providers/nzb/binsearch.py\n--- a/medusa/providers/nzb/binsearch.py\n+++ b/medusa/providers/nzb/binsearch.py\n@@ -272,7 +272,7 @@\n return None\n \n # Validate that the result has the content of a valid nzb.\n- if not Bi... |
gh_patches_debug_1431 | rasdani/github-patches | git_diff | goauthentik__authentik-3769 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support HA postgresql
When using a HA installation of postgresql connection problems with the api server arise during initial load of the user dashboard.
Pgbouncer in transaction pooling mode requires cust... | diff --git a/authentik/root/settings.py b/authentik/root/settings.py
--- a/authentik/root/settings.py
+++ b/authentik/root/settings.py
@@ -270,6 +270,12 @@
}
}
+if CONFIG.y_bool("postgresql.use_pgbouncer", False):
+ # https://docs.djangoproject.com/en/4.0/ref/databases/#transaction-pooling-server-side-cursor... | {"golden_diff": "diff --git a/authentik/root/settings.py b/authentik/root/settings.py\n--- a/authentik/root/settings.py\n+++ b/authentik/root/settings.py\n@@ -270,6 +270,12 @@\n }\n }\n \n+if CONFIG.y_bool(\"postgresql.use_pgbouncer\", False):\n+ # https://docs.djangoproject.com/en/4.0/ref/databases/#transaction... |
gh_patches_debug_1432 | rasdani/github-patches | git_diff | django-extensions__django-extensions-1150 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
validate_template raised false problems
Since 1.9.8 I got this problem on our internal ci system but the files exists on the server on the path.
Locally there is no error raised.
```
/home/django/.vir... | diff --git a/django_extensions/management/commands/validate_templates.py b/django_extensions/management/commands/validate_templates.py
--- a/django_extensions/management/commands/validate_templates.py
+++ b/django_extensions/management/commands/validate_templates.py
@@ -85,7 +85,7 @@
if self.ignore... | {"golden_diff": "diff --git a/django_extensions/management/commands/validate_templates.py b/django_extensions/management/commands/validate_templates.py\n--- a/django_extensions/management/commands/validate_templates.py\n+++ b/django_extensions/management/commands/validate_templates.py\n@@ -85,7 +85,7 @@\n ... |
gh_patches_debug_1433 | rasdani/github-patches | git_diff | xonsh__xonsh-4879 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
xpip doesn't detect/support "pip install --user" installs of xonsh
## xonfig
<details>
```
+------------------+----------------------+
| xonsh | 0.9.27 |
| Git SHA |... | diff --git a/xonsh/aliases.py b/xonsh/aliases.py
--- a/xonsh/aliases.py
+++ b/xonsh/aliases.py
@@ -815,7 +815,7 @@
# XXX: Does windows have an installation mode that requires UAC?
return basecmd
elif not os.access(os.path.dirname(sys.executable), os.W_OK):
- return ["sudo"]... | {"golden_diff": "diff --git a/xonsh/aliases.py b/xonsh/aliases.py\n--- a/xonsh/aliases.py\n+++ b/xonsh/aliases.py\n@@ -815,7 +815,7 @@\n # XXX: Does windows have an installation mode that requires UAC?\n return basecmd\n elif not os.access(os.path.dirname(sys.executable), os.W_OK):\n- ... |
gh_patches_debug_1434 | rasdani/github-patches | git_diff | pypi__warehouse-8550 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
/pypi/{package}/{version}/json: yanking an older release updates latest release's yanked_reason field
**Describe the bug**
Yanking an older version of a package leads to unexpected side-effect for latest ver... | diff --git a/warehouse/legacy/api/json.py b/warehouse/legacy/api/json.py
--- a/warehouse/legacy/api/json.py
+++ b/warehouse/legacy/api/json.py
@@ -190,7 +190,7 @@
"home_page": release.home_page,
"download_url": release.download_url,
"yanked": release.yanked,
- "yanked_r... | {"golden_diff": "diff --git a/warehouse/legacy/api/json.py b/warehouse/legacy/api/json.py\n--- a/warehouse/legacy/api/json.py\n+++ b/warehouse/legacy/api/json.py\n@@ -190,7 +190,7 @@\n \"home_page\": release.home_page,\n \"download_url\": release.download_url,\n \"yanked\": release.y... |
gh_patches_debug_1435 | rasdani/github-patches | git_diff | translate__pootle-5160 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ensure tests can be run with `--reuse-db`
When iterating over a test that require DB access (or a few of them), currently a site-wide setup is made which in such scenario ends up being relatively time-consumi... | diff --git a/pytest_pootle/plugin.py b/pytest_pootle/plugin.py
--- a/pytest_pootle/plugin.py
+++ b/pytest_pootle/plugin.py
@@ -85,7 +85,7 @@
@pytest.fixture(autouse=True, scope='session')
def setup_db_if_needed(request, tests_use_db):
"""Sets up the site DB only if tests requested to use the DB (autouse)."""
- ... | {"golden_diff": "diff --git a/pytest_pootle/plugin.py b/pytest_pootle/plugin.py\n--- a/pytest_pootle/plugin.py\n+++ b/pytest_pootle/plugin.py\n@@ -85,7 +85,7 @@\n @pytest.fixture(autouse=True, scope='session')\n def setup_db_if_needed(request, tests_use_db):\n \"\"\"Sets up the site DB only if tests requested to us... |
gh_patches_debug_1436 | rasdani/github-patches | git_diff | pypi__warehouse-6294 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PyPI accepts packages with dependencies on local versions (e.g., 0.1.0+local)
PyPI accepts packages with dependencies on local versions (e.g., 0.1.0+local). I'm not sure if this is intentional or not, since P... | diff --git a/warehouse/forklift/legacy.py b/warehouse/forklift/legacy.py
--- a/warehouse/forklift/legacy.py
+++ b/warehouse/forklift/legacy.py
@@ -252,6 +252,11 @@
"Can't have direct dependency: {!r}".format(requirement)
)
+ if any(packaging.version.Version(spec.version).local for spec in req... | {"golden_diff": "diff --git a/warehouse/forklift/legacy.py b/warehouse/forklift/legacy.py\n--- a/warehouse/forklift/legacy.py\n+++ b/warehouse/forklift/legacy.py\n@@ -252,6 +252,11 @@\n \"Can't have direct dependency: {!r}\".format(requirement)\n )\n \n+ if any(packaging.version.Version(spec.vers... |
gh_patches_debug_1437 | rasdani/github-patches | git_diff | pyqtgraph__pyqtgraph-2888 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dock restoreState fails silently if a dock object is the only item in a V- or HContainer
### Short description
Calling restoreState() on a dockArea where a dock is the only object inside a container leads to... | diff --git a/pyqtgraph/dockarea/Dock.py b/pyqtgraph/dockarea/Dock.py
--- a/pyqtgraph/dockarea/Dock.py
+++ b/pyqtgraph/dockarea/Dock.py
@@ -210,7 +210,7 @@
def containerChanged(self, c):
if self._container is not None:
# ask old container to close itself if it is no longer needed
- ... | {"golden_diff": "diff --git a/pyqtgraph/dockarea/Dock.py b/pyqtgraph/dockarea/Dock.py\n--- a/pyqtgraph/dockarea/Dock.py\n+++ b/pyqtgraph/dockarea/Dock.py\n@@ -210,7 +210,7 @@\n def containerChanged(self, c):\n if self._container is not None:\n # ask old container to close itself if it is no long... |
gh_patches_debug_1438 | rasdani/github-patches | git_diff | interactions-py__interactions.py-89 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Subcommands are registered to guilds where there are not allowed
I've noticed that when I use `guild_ids` on a subcommand for a command which is shared between multiple guilds, that subcommand is registered t... | diff --git a/discord_slash/client.py b/discord_slash/client.py
--- a/discord_slash/client.py
+++ b/discord_slash/client.py
@@ -425,8 +425,8 @@
name = name.lower()
description = description or getdoc(cmd)
- if name in self.commands:
- tgt = self.commands[name]
+ if base in se... | {"golden_diff": "diff --git a/discord_slash/client.py b/discord_slash/client.py\n--- a/discord_slash/client.py\n+++ b/discord_slash/client.py\n@@ -425,8 +425,8 @@\n name = name.lower()\n description = description or getdoc(cmd)\n \n- if name in self.commands:\n- tgt = self.commands[nam... |
gh_patches_debug_1439 | rasdani/github-patches | git_diff | translate__pootle-5899 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add language on pootle_fs/xliff support
Ubuntu 16.04
Pootle 2.8.0b3
Have succesfully created a pootle_fs project.
Based on xliff, I put a file with my GNU style "messages.<language_code>.<ext>"
I tried frenc... | diff --git a/pootle/apps/pootle_translationproject/models.py b/pootle/apps/pootle_translationproject/models.py
--- a/pootle/apps/pootle_translationproject/models.py
+++ b/pootle/apps/pootle_translationproject/models.py
@@ -438,7 +438,10 @@
if not created or raw:
return
- for project in Project.object... | {"golden_diff": "diff --git a/pootle/apps/pootle_translationproject/models.py b/pootle/apps/pootle_translationproject/models.py\n--- a/pootle/apps/pootle_translationproject/models.py\n+++ b/pootle/apps/pootle_translationproject/models.py\n@@ -438,7 +438,10 @@\n if not created or raw:\n return\n \n- for p... |
gh_patches_debug_1440 | rasdani/github-patches | git_diff | nonebot__nonebot2-430 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: mirai adapter调用upload_image上传图片报错
**描述问题:**
mirai adapter调用upload_image上传图片报错:
```powershell
httpx.HTTPStatusError: 400 Client Error: Bad Request for url: http://127.0.0.1:8000/uploadImage
For mo... | diff --git a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py
--- a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py
+++ b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py
@@ -95,6 +95,7 @@
"""
files = {... | {"golden_diff": "diff --git a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py\n--- a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py\n+++ b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py\n@@ -95,6 +95,7 @@\n \... |
gh_patches_debug_1441 | rasdani/github-patches | git_diff | conda__conda-5232 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
conda config stack trace when can't write config file
This situation should be handled nicer. `conda config` doesn't have permission to write the config file.
Thanks.
```
An unexpected error has occurred,... | diff --git a/conda/cli/main_config.py b/conda/cli/main_config.py
--- a/conda/cli/main_config.py
+++ b/conda/cli/main_config.py
@@ -423,8 +423,12 @@
# config.rc_keys
if not args.get:
- with open(rc_path, 'w') as rc:
- rc.write(yaml_dump(rc_config))
+ try:
+ with open(rc_pa... | {"golden_diff": "diff --git a/conda/cli/main_config.py b/conda/cli/main_config.py\n--- a/conda/cli/main_config.py\n+++ b/conda/cli/main_config.py\n@@ -423,8 +423,12 @@\n \n # config.rc_keys\n if not args.get:\n- with open(rc_path, 'w') as rc:\n- rc.write(yaml_dump(rc_config))\n+ try:\n+... |
gh_patches_debug_1442 | rasdani/github-patches | git_diff | evennia__evennia-3042 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] "evennia xyzgrid help" causes TypeError: NoneType takes no arguments
#### Describe the bug
Fresh migration from git master to main and then installing xyzgrid prevents evennia xyzgrid commands from wor... | diff --git a/evennia/contrib/grid/xyzgrid/__init__.py b/evennia/contrib/grid/xyzgrid/__init__.py
--- a/evennia/contrib/grid/xyzgrid/__init__.py
+++ b/evennia/contrib/grid/xyzgrid/__init__.py
@@ -2,14 +2,15 @@
XYZGrid - Griatch 2021
"""
-
-from . import commands # noqa
-from . import example # noqa
-from . import ... | {"golden_diff": "diff --git a/evennia/contrib/grid/xyzgrid/__init__.py b/evennia/contrib/grid/xyzgrid/__init__.py\n--- a/evennia/contrib/grid/xyzgrid/__init__.py\n+++ b/evennia/contrib/grid/xyzgrid/__init__.py\n@@ -2,14 +2,15 @@\n XYZGrid - Griatch 2021\n \n \"\"\"\n-\n-from . import commands # noqa\n-from . import ex... |
gh_patches_debug_1443 | rasdani/github-patches | git_diff | mkdocs__mkdocs-3700 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Empty mkdocs_theme.yml breaks build
Hello! In the docs its [stated](https://www.mkdocs.org/dev-guide/themes/#theme-configuration) that a theme **can** have an empty `mkdocs_theme.yml` file:
> However, if t... | diff --git a/mkdocs/theme.py b/mkdocs/theme.py
--- a/mkdocs/theme.py
+++ b/mkdocs/theme.py
@@ -138,6 +138,9 @@
f"Please upgrade to a current version of the theme."
)
+ if theme_config is None:
+ theme_config = {}
+
log.debug(f"Loaded theme configuration for '{n... | {"golden_diff": "diff --git a/mkdocs/theme.py b/mkdocs/theme.py\n--- a/mkdocs/theme.py\n+++ b/mkdocs/theme.py\n@@ -138,6 +138,9 @@\n f\"Please upgrade to a current version of the theme.\"\n )\n \n+ if theme_config is None:\n+ theme_config = {}\n+\n log.debug(f\"Load... |
gh_patches_debug_1444 | rasdani/github-patches | git_diff | tensorflow__tensor2tensor-1557 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
distributed training on multiple machine fails
### Description
I am trying to do distributed training on multiple machines with 1 GPU each. It is failing on the workers. Please look into this!
...
### En... | diff --git a/tensor2tensor/bin/t2t_trainer.py b/tensor2tensor/bin/t2t_trainer.py
--- a/tensor2tensor/bin/t2t_trainer.py
+++ b/tensor2tensor/bin/t2t_trainer.py
@@ -372,7 +372,8 @@
# Create HParams.
if argv:
set_hparams_from_args(argv[1:])
- hparams = create_hparams()
+ if FLAGS.schedule != "run_std_server":... | {"golden_diff": "diff --git a/tensor2tensor/bin/t2t_trainer.py b/tensor2tensor/bin/t2t_trainer.py\n--- a/tensor2tensor/bin/t2t_trainer.py\n+++ b/tensor2tensor/bin/t2t_trainer.py\n@@ -372,7 +372,8 @@\n # Create HParams.\n if argv:\n set_hparams_from_args(argv[1:])\n- hparams = create_hparams()\n+ if FLAGS.sche... |
gh_patches_debug_1445 | rasdani/github-patches | git_diff | mindsdb__lightwood-868 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[TS] error if 'group by' column contains a single value
If 'group by' column has single value for all cells, then error appears. Can be replicated with any ts-dataset if add filter to data select query:
```
... | diff --git a/lightwood/api/json_ai.py b/lightwood/api/json_ai.py
--- a/lightwood/api/json_ai.py
+++ b/lightwood/api/json_ai.py
@@ -193,7 +193,8 @@
tss = problem_definition.timeseries_settings
dtype_dict = type_information.dtypes
for k in type_information.identifiers:
- del dtype_dict[k]
+ i... | {"golden_diff": "diff --git a/lightwood/api/json_ai.py b/lightwood/api/json_ai.py\n--- a/lightwood/api/json_ai.py\n+++ b/lightwood/api/json_ai.py\n@@ -193,7 +193,8 @@\n tss = problem_definition.timeseries_settings\n dtype_dict = type_information.dtypes\n for k in type_information.identifiers:\n- del ... |
gh_patches_debug_1446 | rasdani/github-patches | git_diff | plone__Products.CMFPlone-2822 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Plone 5.1.4 to 5.1.5 update: resource registry meta bundle generator comments first css construct of individual bundles
In one of our projects, after upgrading from Plone 5.1.4 to Plone 5.1.5 A very small pa... | diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py
--- a/Products/CMFPlone/resources/browser/combine.py
+++ b/Products/CMFPlone/resources/browser/combine.py
@@ -124,9 +124,9 @@
fi = StringIO()
for bname, script in resources.items():
... | {"golden_diff": "diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py\n--- a/Products/CMFPlone/resources/browser/combine.py\n+++ b/Products/CMFPlone/resources/browser/combine.py\n@@ -124,9 +124,9 @@\n fi = StringIO()\n for bname, script in resource... |
gh_patches_debug_1447 | rasdani/github-patches | git_diff | lightly-ai__lightly-1177 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CUDA errors in NTXentLoss with gloo backend in multi-gpu training
I was wondering if the `gloo` distributed communication package for multi-gpu training is officially supported by lightly. It seems like e.g.... | diff --git a/lightly/loss/ntx_ent_loss.py b/lightly/loss/ntx_ent_loss.py
--- a/lightly/loss/ntx_ent_loss.py
+++ b/lightly/loss/ntx_ent_loss.py
@@ -161,7 +161,8 @@
# create labels
labels = torch.arange(batch_size, device=device, dtype=torch.long)
- labels = labels + dist.rank() * b... | {"golden_diff": "diff --git a/lightly/loss/ntx_ent_loss.py b/lightly/loss/ntx_ent_loss.py\n--- a/lightly/loss/ntx_ent_loss.py\n+++ b/lightly/loss/ntx_ent_loss.py\n@@ -161,7 +161,8 @@\n \n # create labels\n labels = torch.arange(batch_size, device=device, dtype=torch.long)\n- labels = ... |
gh_patches_debug_1448 | rasdani/github-patches | git_diff | mars-project__mars-291 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Chinese document layout has a link error.
<!--
Thank you for your contribution!
Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->
**Des... | diff --git a/docs/source/norm_zh.py b/docs/source/norm_zh.py
--- a/docs/source/norm_zh.py
+++ b/docs/source/norm_zh.py
@@ -130,7 +130,7 @@
# only modify recent-changed files
modify_time = datetime.datetime.fromtimestamp(os.path.getmtime(path))
- if (datetime.datetime.now() - modif... | {"golden_diff": "diff --git a/docs/source/norm_zh.py b/docs/source/norm_zh.py\n--- a/docs/source/norm_zh.py\n+++ b/docs/source/norm_zh.py\n@@ -130,7 +130,7 @@\n \n # only modify recent-changed files\n modify_time = datetime.datetime.fromtimestamp(os.path.getmtime(path))\n- if (datetim... |
gh_patches_debug_1449 | rasdani/github-patches | git_diff | keras-team__keras-7552 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Masking a layer that has an integer dtype raises an error in TensorFlow but not Theano.
The following:
```python
from keras.layers import Input, Masking
document = Input(shape = (10, ), dtype = "int32")
... | diff --git a/keras/layers/core.py b/keras/layers/core.py
--- a/keras/layers/core.py
+++ b/keras/layers/core.py
@@ -61,7 +61,7 @@
def call(self, inputs):
boolean_mask = K.any(K.not_equal(inputs, self.mask_value),
axis=-1, keepdims=True)
- return inputs * K.cast(boolean_... | {"golden_diff": "diff --git a/keras/layers/core.py b/keras/layers/core.py\n--- a/keras/layers/core.py\n+++ b/keras/layers/core.py\n@@ -61,7 +61,7 @@\n def call(self, inputs):\n boolean_mask = K.any(K.not_equal(inputs, self.mask_value),\n axis=-1, keepdims=True)\n- return ... |
gh_patches_debug_1450 | rasdani/github-patches | git_diff | enthought__chaco-731 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ArrayDataSource get_mask_data() fails when data is None
See this test here:
https://github.com/enthought/chaco/blob/enh/data-source-tests/chaco/tests/arraydatasource_test_case.py#L108
More generally, I thin... | diff --git a/chaco/array_data_source.py b/chaco/array_data_source.py
--- a/chaco/array_data_source.py
+++ b/chaco/array_data_source.py
@@ -155,7 +155,10 @@
Implements AbstractDataSource.
"""
if self._cached_mask is None:
- return self._data, ones(len(self._data), dtype=bool)
+ ... | {"golden_diff": "diff --git a/chaco/array_data_source.py b/chaco/array_data_source.py\n--- a/chaco/array_data_source.py\n+++ b/chaco/array_data_source.py\n@@ -155,7 +155,10 @@\n Implements AbstractDataSource.\n \"\"\"\n if self._cached_mask is None:\n- return self._data, ones(len(self... |
gh_patches_debug_1451 | rasdani/github-patches | git_diff | meltano__meltano-7343 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
feature: Support arrow key text navigation during interactive config
### Feature scope
CLI (options, error messages, logging, etc.)
### Description
Currently when using interactive config, the arrow keys a... | diff --git a/src/meltano/cli/interactive/config.py b/src/meltano/cli/interactive/config.py
--- a/src/meltano/cli/interactive/config.py
+++ b/src/meltano/cli/interactive/config.py
@@ -2,6 +2,14 @@
from __future__ import annotations
+from contextlib import suppress
+
+# NOTE: Importing the readline module enables th... | {"golden_diff": "diff --git a/src/meltano/cli/interactive/config.py b/src/meltano/cli/interactive/config.py\n--- a/src/meltano/cli/interactive/config.py\n+++ b/src/meltano/cli/interactive/config.py\n@@ -2,6 +2,14 @@\n \n from __future__ import annotations\n \n+from contextlib import suppress\n+\n+# NOTE: Importing the ... |
gh_patches_debug_1452 | rasdani/github-patches | git_diff | nipy__nipype-3634 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ENH: add STC partial volume correction to PETPVC interface
### Summary
Partial Volume Correction using Single-target correction (STC) has been added to PETPVC since the Nipype PETPVC interface was created, a... | diff --git a/nipype/interfaces/petpvc.py b/nipype/interfaces/petpvc.py
--- a/nipype/interfaces/petpvc.py
+++ b/nipype/interfaces/petpvc.py
@@ -37,6 +37,7 @@
"RBV+VC",
"RL",
"VC",
+ "STC",
]
@@ -75,6 +76,7 @@
* Muller Gartner -- ``MG``
* Muller Gartner with Van-Cittert -- ``MG+VC``
... | {"golden_diff": "diff --git a/nipype/interfaces/petpvc.py b/nipype/interfaces/petpvc.py\n--- a/nipype/interfaces/petpvc.py\n+++ b/nipype/interfaces/petpvc.py\n@@ -37,6 +37,7 @@\n \"RBV+VC\",\n \"RL\",\n \"VC\",\n+ \"STC\",\n ]\n \n \n@@ -75,6 +76,7 @@\n * Muller Gartner -- ``MG``\n * Muller Gartn... |
gh_patches_debug_1453 | rasdani/github-patches | git_diff | Pyomo__pyomo-797 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
gams writer, splitting lines with characters > 80,000
if line is > 80,000 the line is splitted at the last space within the fist 80,000 characters '(function 'split_long_line' of 'gams_writer.py' This mostly ... | diff --git a/pyomo/repn/plugins/gams_writer.py b/pyomo/repn/plugins/gams_writer.py
--- a/pyomo/repn/plugins/gams_writer.py
+++ b/pyomo/repn/plugins/gams_writer.py
@@ -244,7 +244,9 @@
"Found an 80,000+ character string with no spaces")
i -= 1
new_lines += line[:i] + '\n'
- ... | {"golden_diff": "diff --git a/pyomo/repn/plugins/gams_writer.py b/pyomo/repn/plugins/gams_writer.py\n--- a/pyomo/repn/plugins/gams_writer.py\n+++ b/pyomo/repn/plugins/gams_writer.py\n@@ -244,7 +244,9 @@\n \"Found an 80,000+ character string with no spaces\")\n i -= 1\n new_lines ... |
gh_patches_debug_1454 | rasdani/github-patches | git_diff | fossasia__open-event-server-6182 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Coorganizer and owners can't download tickets, invoices
Current config only allows the organizer role to download the tickets
--- END ISSUE ---
Below are some code segments, each from a relevant file. One o... | diff --git a/app/models/user.py b/app/models/user.py
--- a/app/models/user.py
+++ b/app/models/user.py
@@ -387,7 +387,7 @@
def can_download_tickets(self, order):
permissible_users = [holder.id for holder in order.ticket_holders] + [order.user.id]
- if self.is_staff or self.is_organizer(order.even... | {"golden_diff": "diff --git a/app/models/user.py b/app/models/user.py\n--- a/app/models/user.py\n+++ b/app/models/user.py\n@@ -387,7 +387,7 @@\n \n def can_download_tickets(self, order):\n permissible_users = [holder.id for holder in order.ticket_holders] + [order.user.id]\n- if self.is_staff or self... |
gh_patches_debug_1455 | rasdani/github-patches | git_diff | zulip__zulip-20678 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support restarting the server without rejecting any requests
In theory, it should be possible with uwsgi and its `master=true` setting to restart the server with 0 requests being rejected due to the service b... | diff --git a/scripts/lib/zulip_tools.py b/scripts/lib/zulip_tools.py
--- a/scripts/lib/zulip_tools.py
+++ b/scripts/lib/zulip_tools.py
@@ -623,7 +623,7 @@
universal_newlines=True,
stdout=subprocess.PIPE,
)
- # `supercisorctl status` returns 3 if any are stopped, which is
+ # `supervisorctl ... | {"golden_diff": "diff --git a/scripts/lib/zulip_tools.py b/scripts/lib/zulip_tools.py\n--- a/scripts/lib/zulip_tools.py\n+++ b/scripts/lib/zulip_tools.py\n@@ -623,7 +623,7 @@\n universal_newlines=True,\n stdout=subprocess.PIPE,\n )\n- # `supercisorctl status` returns 3 if any are stopped, which i... |
gh_patches_debug_1456 | rasdani/github-patches | git_diff | OCHA-DAP__hdx-ckan-1798 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ebola page: loading second page of datasets reloads to top of page
Would it be easy to have it load the page at the `Datasets [41]` line?
--- END ISSUE ---
Below are some code segments, each from a relevan... | diff --git a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py
--- a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py
+++ b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py
@@ -54,7 ... | {"golden_diff": "diff --git a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py\n--- a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py\n+++ b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_cont... |
gh_patches_debug_1457 | rasdani/github-patches | git_diff | plone__Products.CMFPlone-3529 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow to migrate to Volto after updating a site to Plone 6
When Plone is updated to 6 the upgrade-view (@@plone-upgrade) should display a link to the migration to Volto.
See https://github.com/plone/plone.vo... | diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py
--- a/Products/CMFPlone/browser/admin.py
+++ b/Products/CMFPlone/browser/admin.py
@@ -343,3 +343,16 @@
)
return self.index()
+
+ def can_migrate_to_volto(self):
+ if not HAS_VOLTO:
+ return ... | {"golden_diff": "diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py\n--- a/Products/CMFPlone/browser/admin.py\n+++ b/Products/CMFPlone/browser/admin.py\n@@ -343,3 +343,16 @@\n )\n \n return self.index()\n+\n+ def can_migrate_to_volto(self):\n+ if not HAS_V... |
gh_patches_debug_1458 | rasdani/github-patches | git_diff | Lightning-Universe__lightning-flash-597 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Confusing KerError message for flash registry
## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
### To Reproduce
Steps to reproduce the behavior:
```
from flash.image import ... | diff --git a/flash/core/registry.py b/flash/core/registry.py
--- a/flash/core/registry.py
+++ b/flash/core/registry.py
@@ -56,7 +56,7 @@
"""
matches = [e for e in self.functions if key == e["name"]]
if not matches:
- raise KeyError(f"Key: {key} is not in {repr(self)}")
+ ... | {"golden_diff": "diff --git a/flash/core/registry.py b/flash/core/registry.py\n--- a/flash/core/registry.py\n+++ b/flash/core/registry.py\n@@ -56,7 +56,7 @@\n \"\"\"\n matches = [e for e in self.functions if key == e[\"name\"]]\n if not matches:\n- raise KeyError(f\"Key: {key} is not ... |
gh_patches_debug_1459 | rasdani/github-patches | git_diff | benoitc__gunicorn-1071 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Include request URL in error message
It would be really helpful if the logged error message were "Error handling request http://host/path/etc" instead of just "Error handling request".
--- END ISSUE ---
Be... | diff --git a/gunicorn/workers/base.py b/gunicorn/workers/base.py
--- a/gunicorn/workers/base.py
+++ b/gunicorn/workers/base.py
@@ -210,7 +210,7 @@
msg = "Invalid request from ip={ip}: {error}"
self.log.debug(msg.format(ip=addr[0], error=str(exc)))
else:
- self.log.exception... | {"golden_diff": "diff --git a/gunicorn/workers/base.py b/gunicorn/workers/base.py\n--- a/gunicorn/workers/base.py\n+++ b/gunicorn/workers/base.py\n@@ -210,7 +210,7 @@\n msg = \"Invalid request from ip={ip}: {error}\"\n self.log.debug(msg.format(ip=addr[0], error=str(exc)))\n else:\n- ... |
gh_patches_debug_1460 | rasdani/github-patches | git_diff | wemake-services__wemake-python-styleguide-343 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Replace `sphinxcontrib-napoleon`
It is now bundled with `sphinx` as `sphinx.ext.napoleon`.
So, we need to remove this dependency from both:
- `pyproject.toml`
- `docs/requirements.txt`
--- END ISSUE ---... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -55,13 +55,11 @@
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.autosummary',
+ 'sphinx.ext.napoleon',
# Used to include .md files:
'm2r',
- # Used to write python docstrings in a readable way... | {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -55,13 +55,11 @@\n 'sphinx.ext.coverage',\n 'sphinx.ext.viewcode',\n 'sphinx.ext.autosummary',\n+ 'sphinx.ext.napoleon',\n \n # Used to include .md files:\n 'm2r',\n \n- # Used to write python... |
gh_patches_debug_1461 | rasdani/github-patches | git_diff | LibraryOfCongress__concordia-1208 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create URL path for staff page
We will create a simple page for staff. Need to create the URL path.
ex - `crowd.loc.gov/for-staff`
--- END ISSUE ---
Below are some code segments, each from a relevant fi... | diff --git a/concordia/urls.py b/concordia/urls.py
--- a/concordia/urls.py
+++ b/concordia/urls.py
@@ -107,6 +107,7 @@
),
path("help-center/how-to-tag-esp/", views.simple_page, name="how-to-tag-spanish"),
path("for-educators/", views.simple_page, name="for-educators"),
+ path("for-staff/", views.simpl... | {"golden_diff": "diff --git a/concordia/urls.py b/concordia/urls.py\n--- a/concordia/urls.py\n+++ b/concordia/urls.py\n@@ -107,6 +107,7 @@\n ),\n path(\"help-center/how-to-tag-esp/\", views.simple_page, name=\"how-to-tag-spanish\"),\n path(\"for-educators/\", views.simple_page, name=\"for-educators\"),\n+ ... |
gh_patches_debug_1462 | rasdani/github-patches | git_diff | spack__spack-23320 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installation issue: bzip2: python error in package.py
#23230 appeared to introduce a typo/python error in package.py
### Steps to reproduce the issue
```console
$ spack install bzip2
...
==> Installi... | diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py
--- a/var/spack/repos/builtin/packages/bzip2/package.py
+++ b/var/spack/repos/builtin/packages/bzip2/package.py
@@ -54,7 +54,7 @@
return(flags, None, None)
def patch(self):
- if spec... | {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py\n--- a/var/spack/repos/builtin/packages/bzip2/package.py\n+++ b/var/spack/repos/builtin/packages/bzip2/package.py\n@@ -54,7 +54,7 @@\n return(flags, None, None)\n \n def patch(... |
gh_patches_debug_1463 | rasdani/github-patches | git_diff | ranaroussi__yfinance-1257 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
utils.py: list index out of range
There is a strange behaviour with yfinance 0.1.94 when I try to read ticker "G7W.DU":
Sometimes it works and sometimes the utils.py gets a list index out of range error.
... | diff --git a/yfinance/utils.py b/yfinance/utils.py
--- a/yfinance/utils.py
+++ b/yfinance/utils.py
@@ -202,6 +202,9 @@
session = session or _requests
html = session.get(url=url, proxies=proxy, headers=user_agent_headers).text
+ if not "root.App.main =" in html:
+ return {}
+
json_str = html.s... | {"golden_diff": "diff --git a/yfinance/utils.py b/yfinance/utils.py\n--- a/yfinance/utils.py\n+++ b/yfinance/utils.py\n@@ -202,6 +202,9 @@\n session = session or _requests\n html = session.get(url=url, proxies=proxy, headers=user_agent_headers).text\n \n+ if not \"root.App.main =\" in html:\n+ return ... |
gh_patches_debug_1464 | rasdani/github-patches | git_diff | kubeflow__pipelines-4118 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
allow output artifact store configuration (vs hard coded)
it seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`... | diff --git a/samples/core/iris/iris.py b/samples/core/iris/iris.py
--- a/samples/core/iris/iris.py
+++ b/samples/core/iris/iris.py
@@ -14,10 +14,6 @@
# limitations under the License.
"""Iris flowers example using TFX. Based on https://github.com/tensorflow/tfx/blob/master/tfx/examples/iris/iris_pipeline_native_keras.... | {"golden_diff": "diff --git a/samples/core/iris/iris.py b/samples/core/iris/iris.py\n--- a/samples/core/iris/iris.py\n+++ b/samples/core/iris/iris.py\n@@ -14,10 +14,6 @@\n # limitations under the License.\n \"\"\"Iris flowers example using TFX. Based on https://github.com/tensorflow/tfx/blob/master/tfx/examples/iris/ir... |
gh_patches_debug_1465 | rasdani/github-patches | git_diff | pallets__click-1839 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
urllib.unquote() no longer exists
In [_termui_impl.py](https://github.com/pallets/click/blob/972becff259e4ffcd220a6cad5096f36a89fdd6d/src/click/_termui_impl.py#L556) `urllib.unquote()` is called. But [urllib]... | diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py
--- a/src/click/_termui_impl.py
+++ b/src/click/_termui_impl.py
@@ -549,11 +549,12 @@
def open_url(url, wait=False, locate=False):
import subprocess
- def _unquote_file(url):
- import urllib
+ def _unquote_file(url: str) -> str:
+ ... | {"golden_diff": "diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py\n--- a/src/click/_termui_impl.py\n+++ b/src/click/_termui_impl.py\n@@ -549,11 +549,12 @@\n def open_url(url, wait=False, locate=False):\n import subprocess\n \n- def _unquote_file(url):\n- import urllib\n+ def _unquote_... |
gh_patches_debug_1466 | rasdani/github-patches | git_diff | google__turbinia-637 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Crash when running locally
```
$ turbiniactl -t SSHDAnalysisTask -R rawdisk -l dfchecklist.img
[INFO] Turbinia version: 20190819
[INFO] Creating request 5d50f281e7fc4a24bd88993ad8bb34a9 with evidence dfc... | diff --git a/turbinia/client.py b/turbinia/client.py
--- a/turbinia/client.py
+++ b/turbinia/client.py
@@ -1017,7 +1017,7 @@
if not request.evidence:
raise TurbiniaException('TurbiniaRequest does not contain evidence.')
log.info('Running Task {0:s} locally'.format(task_name))
- result = task.run_wra... | {"golden_diff": "diff --git a/turbinia/client.py b/turbinia/client.py\n--- a/turbinia/client.py\n+++ b/turbinia/client.py\n@@ -1017,7 +1017,7 @@\n if not request.evidence:\n raise TurbiniaException('TurbiniaRequest does not contain evidence.')\n log.info('Running Task {0:s} locally'.format(task_name))\n- ... |
gh_patches_debug_1467 | rasdani/github-patches | git_diff | horovod__horovod-3002 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
【Elastic Horovod】Should we catch exceptions for state.sync()?
**Environment:**
1. Framework: (TensorFlow, Keras, PyTorch, MXNet): Pytorch
2. Framework version: 1.6.0
3. Horovod version: 0.21.3
4. MPI vers... | diff --git a/horovod/common/elastic.py b/horovod/common/elastic.py
--- a/horovod/common/elastic.py
+++ b/horovod/common/elastic.py
@@ -157,10 +157,10 @@
try:
while True:
- if not skip_sync:
- state.sync()
-
try:
+ if not skip_... | {"golden_diff": "diff --git a/horovod/common/elastic.py b/horovod/common/elastic.py\n--- a/horovod/common/elastic.py\n+++ b/horovod/common/elastic.py\n@@ -157,10 +157,10 @@\n \n try:\n while True:\n- if not skip_sync:\n- state.sync()\n-\n try:\n+ ... |
gh_patches_debug_1468 | rasdani/github-patches | git_diff | scoutapp__scout_apm_python-672 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support ElasticSearch 7.14
The python package `elasticsearch-py` introduced the `terms_enum` parameter from ElasticSearch 7.14. This is currently not being instrumented and breaking tests.
--- END ISSUE ---
... | diff --git a/src/scout_apm/instruments/elasticsearch.py b/src/scout_apm/instruments/elasticsearch.py
--- a/src/scout_apm/instruments/elasticsearch.py
+++ b/src/scout_apm/instruments/elasticsearch.py
@@ -71,6 +71,7 @@
ClientMethod("search_shards", True),
ClientMethod("search_template", True),
ClientMethod... | {"golden_diff": "diff --git a/src/scout_apm/instruments/elasticsearch.py b/src/scout_apm/instruments/elasticsearch.py\n--- a/src/scout_apm/instruments/elasticsearch.py\n+++ b/src/scout_apm/instruments/elasticsearch.py\n@@ -71,6 +71,7 @@\n ClientMethod(\"search_shards\", True),\n ClientMethod(\"search_template\"... |
gh_patches_debug_1469 | rasdani/github-patches | git_diff | arviz-devs__arviz-1043 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error with PyMC3 model that contains Potential
**Describe the bug**
For PyMC3 model that contains Potential, io_pymc3 is attempting to call `eval()` without graph dependence.
**To Reproduce**
```python
... | diff --git a/arviz/data/io_pymc3.py b/arviz/data/io_pymc3.py
--- a/arviz/data/io_pymc3.py
+++ b/arviz/data/io_pymc3.py
@@ -287,6 +287,7 @@
var not in self.model.deterministics
and var not in self.model.observed_RVs
and var not in self.model.free_RVs
+ an... | {"golden_diff": "diff --git a/arviz/data/io_pymc3.py b/arviz/data/io_pymc3.py\n--- a/arviz/data/io_pymc3.py\n+++ b/arviz/data/io_pymc3.py\n@@ -287,6 +287,7 @@\n var not in self.model.deterministics\n and var not in self.model.observed_RVs\n and var not in self.model.free_... |
gh_patches_debug_1470 | rasdani/github-patches | git_diff | pretix__pretix-2537 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot change month in the widget
In the current version it is not possible to change the month in the widget. When you hit it, it reloads but does nothing. The cause seems to be because the call https://XXXX... | diff --git a/src/pretix/presale/views/organizer.py b/src/pretix/presale/views/organizer.py
--- a/src/pretix/presale/views/organizer.py
+++ b/src/pretix/presale/views/organizer.py
@@ -225,7 +225,7 @@
def _set_month_year(self):
if 'date' in self.request.GET:
try:
- date = dateuti... | {"golden_diff": "diff --git a/src/pretix/presale/views/organizer.py b/src/pretix/presale/views/organizer.py\n--- a/src/pretix/presale/views/organizer.py\n+++ b/src/pretix/presale/views/organizer.py\n@@ -225,7 +225,7 @@\n def _set_month_year(self):\n if 'date' in self.request.GET:\n try:\n- ... |
gh_patches_debug_1471 | rasdani/github-patches | git_diff | getsentry__sentry-21581 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hardcoded MAX_RETRIES = 1
https://github.com/getsentry/sentry/blob/master/src/sentry/tasks/deletion.py#L18
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these fil... | diff --git a/src/sentry/tasks/deletion.py b/src/sentry/tasks/deletion.py
--- a/src/sentry/tasks/deletion.py
+++ b/src/sentry/tasks/deletion.py
@@ -14,8 +14,7 @@
# in prod we run with infinite retries to recover from errors
# in debug/development, we assume these tasks generally shouldn't fail
-MAX_RETRIES = 1 if se... | {"golden_diff": "diff --git a/src/sentry/tasks/deletion.py b/src/sentry/tasks/deletion.py\n--- a/src/sentry/tasks/deletion.py\n+++ b/src/sentry/tasks/deletion.py\n@@ -14,8 +14,7 @@\n \n # in prod we run with infinite retries to recover from errors\n # in debug/development, we assume these tasks generally shouldn't fail... |
gh_patches_debug_1472 | rasdani/github-patches | git_diff | oppia__oppia-1713 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add an OutputContains rule to the CodeRepl interaction.
We've had a request to add an OutputContains rule to the CodeRepl interaction.
The use case is as follows: the student will type in the body of a funct... | diff --git a/extensions/rules/code_evaluation.py b/extensions/rules/code_evaluation.py
--- a/extensions/rules/code_evaluation.py
+++ b/extensions/rules/code_evaluation.py
@@ -30,6 +30,8 @@
class CodeDoesNotContain(base.CodeEvaluationRule):
description = 'has code that does not contain {{x|CodeString}}'
+class O... | {"golden_diff": "diff --git a/extensions/rules/code_evaluation.py b/extensions/rules/code_evaluation.py\n--- a/extensions/rules/code_evaluation.py\n+++ b/extensions/rules/code_evaluation.py\n@@ -30,6 +30,8 @@\n class CodeDoesNotContain(base.CodeEvaluationRule):\n description = 'has code that does not contain {{x|Co... |
gh_patches_debug_1473 | rasdani/github-patches | git_diff | optuna__optuna-56 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Incompatibility with old versions of SQLAlchemy.
Connecting to PostgreSQL fails with old versions of SQLAlchemy raising an error: `sqlalchemy.exc.CompileError: Postgresql ENUM type requires a name`. This erro... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@
author='Takuya Akiba',
author_email='akiba@preferred.jp',
packages=find_packages(),
- install_requires=['sqlalchemy', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],
+ install_requires=['sqlalchemy>=1.1.0', 'num... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -25,7 +25,7 @@\n author='Takuya Akiba',\n author_email='akiba@preferred.jp',\n packages=find_packages(),\n- install_requires=['sqlalchemy', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],\n+ install_requires=[... |
gh_patches_debug_1474 | rasdani/github-patches | git_diff | freedomofpress__securedrop-4391 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Source Interface requests fail with 500 error, due to session issue
## Description
In some situations, requests to the source interface may start to fail, returning the 500 error page. Once the 500 errors ... | diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py
--- a/securedrop/source_app/main.py
+++ b/securedrop/source_app/main.py
@@ -67,6 +67,13 @@
# Issue 2386: don't log in on duplicates
del session['codename']
+
+ # Issue 4361: Delete 'logged_in' if it's in th... | {"golden_diff": "diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py\n--- a/securedrop/source_app/main.py\n+++ b/securedrop/source_app/main.py\n@@ -67,6 +67,13 @@\n \n # Issue 2386: don't log in on duplicates\n del session['codename']\n+\n+ # Issue 4361: Delete ... |
gh_patches_debug_1475 | rasdani/github-patches | git_diff | microsoft__ptvsd-926 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make --host a required switch
`--host` is currently optional, and defaults to `localhost`. The old behavior was to default to `0.0.0.0`, which is not a particularly sane default. However, the new default make... | diff --git a/ptvsd/__main__.py b/ptvsd/__main__.py
--- a/ptvsd/__main__.py
+++ b/ptvsd/__main__.py
@@ -157,7 +157,7 @@
parser.add_argument('--nodebug', action='store_true')
parser.add_argument('--client', action='store_true')
- parser.add_argument('--host')
+ parser.add_argument('--host', required=Tru... | {"golden_diff": "diff --git a/ptvsd/__main__.py b/ptvsd/__main__.py\n--- a/ptvsd/__main__.py\n+++ b/ptvsd/__main__.py\n@@ -157,7 +157,7 @@\n parser.add_argument('--nodebug', action='store_true')\n parser.add_argument('--client', action='store_true')\n \n- parser.add_argument('--host')\n+ parser.add_argume... |
gh_patches_debug_1476 | rasdani/github-patches | git_diff | ResonantGeoData__ResonantGeoData-470 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Proper testing for rgd_client
We need to implement real tests for the Python client
The tests for this would require running RGD with data prepopulated in the background then executing the client tests
--... | diff --git a/rgd-client/rgd_client/rgdc.py b/rgd-client/rgd_client/rgdc.py
--- a/rgd-client/rgd_client/rgdc.py
+++ b/rgd-client/rgd_client/rgdc.py
@@ -238,7 +238,11 @@
limit=limit,
offset=offset,
)
- return list(limit_offset_pager(self.session, 'rgd/search', params=params))
+
+... | {"golden_diff": "diff --git a/rgd-client/rgd_client/rgdc.py b/rgd-client/rgd_client/rgdc.py\n--- a/rgd-client/rgd_client/rgdc.py\n+++ b/rgd-client/rgd_client/rgdc.py\n@@ -238,7 +238,11 @@\n limit=limit,\n offset=offset,\n )\n- return list(limit_offset_pager(self.session, 'rgd/sear... |
gh_patches_debug_1477 | rasdani/github-patches | git_diff | canonical__snapcraft-80 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Logging out from the run environment produces a traceback
(amd64)ubuntu@localhost:~$ logout
Connection to localhost closed.
Traceback (most recent call last):
File "/usr/bin/snapcraft", line 33, in <module>... | diff --git a/snapcraft/cmds.py b/snapcraft/cmds.py
--- a/snapcraft/cmds.py
+++ b/snapcraft/cmds.py
@@ -229,7 +229,7 @@
['ssh'] + ssh_opts +
['ubuntu@localhost', '-p', '8022', 'sudo snappy install *.snap'])
# "login"
- _check_call(
+ _call(
['ssh'] + ssh_opt... | {"golden_diff": "diff --git a/snapcraft/cmds.py b/snapcraft/cmds.py\n--- a/snapcraft/cmds.py\n+++ b/snapcraft/cmds.py\n@@ -229,7 +229,7 @@\n ['ssh'] + ssh_opts +\n ['ubuntu@localhost', '-p', '8022', 'sudo snappy install *.snap'])\n # \"login\"\n- _check_call(\n+ _call(\n ... |
gh_patches_debug_1478 | rasdani/github-patches | git_diff | ManimCommunity__manim-3510 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
keyword argument 'line_join'
## Description of bug / unexpected behavior
When I rendering the line joint scene from basic.py from the example scene it shows Mobject.__init__() got an unexpected keyword argum... | diff --git a/example_scenes/basic.py b/example_scenes/basic.py
--- a/example_scenes/basic.py
+++ b/example_scenes/basic.py
@@ -167,8 +167,8 @@
class LineJoints(Scene):
def construct(self):
t1 = Triangle()
- t2 = Triangle(line_join=LineJointType.ROUND)
- t3 = Triangle(line_join=LineJointType... | {"golden_diff": "diff --git a/example_scenes/basic.py b/example_scenes/basic.py\n--- a/example_scenes/basic.py\n+++ b/example_scenes/basic.py\n@@ -167,8 +167,8 @@\n class LineJoints(Scene):\n def construct(self):\n t1 = Triangle()\n- t2 = Triangle(line_join=LineJointType.ROUND)\n- t3 = Triangl... |
gh_patches_debug_1479 | rasdani/github-patches | git_diff | deepchecks__deepchecks-728 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] resources/suite_output.html file is missing when installing not via git
**Describe the bug**
can't use save_as_html because suite_output.html file is missing
**To Reproduce**
pip install deepchecks... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,6 @@
import setuptools
from setuptools import setup
-from distutils.util import convert_path
import os
main_ns = {}
@@ -89,9 +88,6 @@
with open(requirementPath) as f:
install_requires = f.read().splitlines()
-
-
-
setup... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -74,7 +74,6 @@\n \n import setuptools\n from setuptools import setup\n-from distutils.util import convert_path\n import os\n \n main_ns = {}\n@@ -89,9 +88,6 @@\n with open(requirementPath) as f:\n install_requires = f.read... |
gh_patches_debug_1480 | rasdani/github-patches | git_diff | zostera__django-bootstrap3-90 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Special display of required fields
It would be nice if there was some way to render differently required fields, like with boldface, or with and asterisk.
--- END ISSUE ---
Below are some code segments, ea... | diff --git a/bootstrap3/forms.py b/bootstrap3/forms.py
--- a/bootstrap3/forms.py
+++ b/bootstrap3/forms.py
@@ -172,6 +172,12 @@
elif field.form.is_bound:
form_group_class = add_css_class(form_group_class, 'has-success')
+ # Required and optional classes to the form group
+ if field.field.required:... | {"golden_diff": "diff --git a/bootstrap3/forms.py b/bootstrap3/forms.py\n--- a/bootstrap3/forms.py\n+++ b/bootstrap3/forms.py\n@@ -172,6 +172,12 @@\n elif field.form.is_bound:\n form_group_class = add_css_class(form_group_class, 'has-success')\n \n+ # Required and optional classes to the form group\n+ ... |
gh_patches_debug_1481 | rasdani/github-patches | git_diff | fossasia__open-event-server-6046 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error logs generated in Celery while sending Mails
```
Traceback (most recent call last):
File "/Users/abhinav/Documents/OpenSource/fossassia/open-event-server/venv/lib/python3.6/site-packages/celery/work... | diff --git a/app/__init__.py b/app/__init__.py
--- a/app/__init__.py
+++ b/app/__init__.py
@@ -108,6 +108,7 @@
# setup celery
app.config['CELERY_BROKER_URL'] = app.config['REDIS_URL']
app.config['CELERY_RESULT_BACKEND'] = app.config['CELERY_BROKER_URL']
+ app.config['CELERY_ACCEPT_CONTENT'] = ['json',... | {"golden_diff": "diff --git a/app/__init__.py b/app/__init__.py\n--- a/app/__init__.py\n+++ b/app/__init__.py\n@@ -108,6 +108,7 @@\n # setup celery\n app.config['CELERY_BROKER_URL'] = app.config['REDIS_URL']\n app.config['CELERY_RESULT_BACKEND'] = app.config['CELERY_BROKER_URL']\n+ app.config['CELERY_ACC... |
gh_patches_debug_1482 | rasdani/github-patches | git_diff | translate__pootle-3380 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Core: drop MySQL dependence on MyISAM
Core depends on MyISAM at the moment because of low level features used for changeid tracking. We need to migrate that to a more general approach that works on InnoDB an... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,7 @@
requirements = []
for line in open(file_name, 'r').read().split('\n'):
# Ignore comments, blank lines and included requirements files
- if re.match(r'(\s*#)|(\s*$)|(-r .*$)', line):
+ if re.match(r'(\s*#)|(... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -43,7 +43,7 @@\n requirements = []\n for line in open(file_name, 'r').read().split('\\n'):\n # Ignore comments, blank lines and included requirements files\n- if re.match(r'(\\s*#)|(\\s*$)|(-r .*$)', line):\n+ ... |
gh_patches_debug_1483 | rasdani/github-patches | git_diff | CiviWiki__OpenCiviWiki-1375 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update grammar in contributing guide
### Idea summary
Improve the grammar in our contributing guide with an automated grammar checker.
### Further details
_No response_
--- END ISSUE ---
Below are some c... | diff --git a/project/core/settings.py b/project/core/settings.py
--- a/project/core/settings.py
+++ b/project/core/settings.py
@@ -107,9 +107,7 @@
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = "/media/"
-# TODO: re-organize and simplify staticfiles settings
-if "CIVIWIKI_LOCAL_NAME" not in os.environ:
- ... | {"golden_diff": "diff --git a/project/core/settings.py b/project/core/settings.py\n--- a/project/core/settings.py\n+++ b/project/core/settings.py\n@@ -107,9 +107,7 @@\n MEDIA_ROOT = os.path.join(BASE_DIR, \"media\")\n MEDIA_URL = \"/media/\"\n \n-# TODO: re-organize and simplify staticfiles settings\n-if \"CIVIWIKI_LOC... |
gh_patches_debug_1484 | rasdani/github-patches | git_diff | opsdroid__opsdroid-1363 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
opsdroid slack connector intermittently ends up in an exception
<!-- Before you post an issue or if you are unsure about something join our matrix channel https://riot.im/app/#/room/#opsdroid-general:matrix.o... | diff --git a/opsdroid/connector/slack/__init__.py b/opsdroid/connector/slack/__init__.py
--- a/opsdroid/connector/slack/__init__.py
+++ b/opsdroid/connector/slack/__init__.py
@@ -144,7 +144,8 @@
_LOGGER.debug(_("Looking up sender username."))
try:
user_info = await self.lookup_username(me... | {"golden_diff": "diff --git a/opsdroid/connector/slack/__init__.py b/opsdroid/connector/slack/__init__.py\n--- a/opsdroid/connector/slack/__init__.py\n+++ b/opsdroid/connector/slack/__init__.py\n@@ -144,7 +144,8 @@\n _LOGGER.debug(_(\"Looking up sender username.\"))\n try:\n user_info = awai... |
gh_patches_debug_1485 | rasdani/github-patches | git_diff | pyca__cryptography-7644 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AESSIV Encryption/Decryption fails if empty data is passed
## Issue description
If an empty byte string is passed to `data` parameter of methods `encrypt` and `decrypt` of `AESSIV`, operation fails with `I... | diff --git a/src/cryptography/hazmat/primitives/ciphers/aead.py b/src/cryptography/hazmat/primitives/ciphers/aead.py
--- a/src/cryptography/hazmat/primitives/ciphers/aead.py
+++ b/src/cryptography/hazmat/primitives/ciphers/aead.py
@@ -366,6 +366,8 @@
associated_data: typing.List,
) -> None:
utils... | {"golden_diff": "diff --git a/src/cryptography/hazmat/primitives/ciphers/aead.py b/src/cryptography/hazmat/primitives/ciphers/aead.py\n--- a/src/cryptography/hazmat/primitives/ciphers/aead.py\n+++ b/src/cryptography/hazmat/primitives/ciphers/aead.py\n@@ -366,6 +366,8 @@\n associated_data: typing.List,\n ) -... |
gh_patches_debug_1486 | rasdani/github-patches | git_diff | open-mmlab__mmpose-295 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pylint: W0105
```bash
mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py:173:8: W0105: String statement has no effect (pointless-string-statement)
```
--- END ISSUE ---
Below are some code segm... | diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py
--- a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py
+++ b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py
@@ -170,7 +170,7 @@
for metric in me... | {"golden_diff": "diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py\n--- a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py\n+++ b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py\n@@ -170,7 +170,7 @@\n ... |
gh_patches_debug_1487 | rasdani/github-patches | git_diff | holoviz__holoviews-5452 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Interpolated charts (Curve, Area, etc) plot data in the provided order, but decimate unsorts data
#### ALL software version info
| Library | Version |
| -- | -- |
| python | 3.9.13 |
| holoviews | 1.15.0 ... | diff --git a/holoviews/operation/element.py b/holoviews/operation/element.py
--- a/holoviews/operation/element.py
+++ b/holoviews/operation/element.py
@@ -909,7 +909,8 @@
if len(sliced) > self.p.max_samples:
prng = np.random.RandomState(self.p.random_seed)
- return sliced.iloc[prng.ch... | {"golden_diff": "diff --git a/holoviews/operation/element.py b/holoviews/operation/element.py\n--- a/holoviews/operation/element.py\n+++ b/holoviews/operation/element.py\n@@ -909,7 +909,8 @@\n \n if len(sliced) > self.p.max_samples:\n prng = np.random.RandomState(self.p.random_seed)\n- re... |
gh_patches_debug_1488 | rasdani/github-patches | git_diff | interlegis__sapl-979 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Erro na função adjust_normajuridica_depois_salvar()
```
File "[...]/sapl/sapl/legacy/migration.py", line 636, in adjust_normajuridica_depois_salvar
new.assuntos.add(AssuntoNorma.objects.get(pk=pk_assunt... | diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py
--- a/sapl/legacy/migration.py
+++ b/sapl/legacy/migration.py
@@ -633,7 +633,9 @@
def adjust_normajuridica_depois_salvar(new, old):
# Ajusta relação M2M
lista_pks_assunto = old.cod_assunto.split(',')
- for pk_assunto in lista_pks_assunto:
+
... | {"golden_diff": "diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py\n--- a/sapl/legacy/migration.py\n+++ b/sapl/legacy/migration.py\n@@ -633,7 +633,9 @@\n def adjust_normajuridica_depois_salvar(new, old):\n # Ajusta rela\u00e7\u00e3o M2M\n lista_pks_assunto = old.cod_assunto.split(',')\n- for p... |
gh_patches_debug_1489 | rasdani/github-patches | git_diff | uccser__cs-unplugged-862 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Only prepend www for production website
It should not be used for development website.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.... | diff --git a/csunplugged/config/settings/production.py b/csunplugged/config/settings/production.py
--- a/csunplugged/config/settings/production.py
+++ b/csunplugged/config/settings/production.py
@@ -23,7 +23,10 @@
# URL Configuration
# ------------------------------------------------------------------------------
-... | {"golden_diff": "diff --git a/csunplugged/config/settings/production.py b/csunplugged/config/settings/production.py\n--- a/csunplugged/config/settings/production.py\n+++ b/csunplugged/config/settings/production.py\n@@ -23,7 +23,10 @@\n \n # URL Configuration\n # ---------------------------------------------------------... |
gh_patches_debug_1490 | rasdani/github-patches | git_diff | kivy__kivy-2526 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Inspector property list scrolling selects an underlying widget
While scrolling with the mouse wheel through the property list of a selected widget, a different widget (one underneath the property list) is sel... | diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py
--- a/kivy/uix/scrollview.py
+++ b/kivy/uix/scrollview.py
@@ -644,7 +644,7 @@
self._scroll_y_mouse = self.scroll_y
if (ud.get('in_bar_x', False) or ud.get('in_bar_y', False)):
- return
+ return True
if sc... | {"golden_diff": "diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py\n--- a/kivy/uix/scrollview.py\n+++ b/kivy/uix/scrollview.py\n@@ -644,7 +644,7 @@\n self._scroll_y_mouse = self.scroll_y\n \n if (ud.get('in_bar_x', False) or ud.get('in_bar_y', False)):\n- return\n+ r... |
gh_patches_debug_1491 | rasdani/github-patches | git_diff | encode__httpx-721 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Keepalive connections aren't released when closing the ConnectionPool
Hello. I am having an issue where it looks like connections aren't being closed correctly, and after i reach a number of requests equivale... | diff --git a/httpx/dispatch/connection_pool.py b/httpx/dispatch/connection_pool.py
--- a/httpx/dispatch/connection_pool.py
+++ b/httpx/dispatch/connection_pool.py
@@ -206,6 +206,7 @@
connections = list(self.keepalive_connections)
self.keepalive_connections.clear()
for connection in connection... | {"golden_diff": "diff --git a/httpx/dispatch/connection_pool.py b/httpx/dispatch/connection_pool.py\n--- a/httpx/dispatch/connection_pool.py\n+++ b/httpx/dispatch/connection_pool.py\n@@ -206,6 +206,7 @@\n connections = list(self.keepalive_connections)\n self.keepalive_connections.clear()\n for c... |
gh_patches_debug_1492 | rasdani/github-patches | git_diff | wright-group__WrightTools-899 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
print_tree should print value and units for variables with size 1
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---... | diff --git a/WrightTools/_dataset.py b/WrightTools/_dataset.py
--- a/WrightTools/_dataset.py
+++ b/WrightTools/_dataset.py
@@ -117,9 +117,12 @@
@property
def _leaf(self):
out = self.natural_name
+ if self.size == 1:
+ out += f" = {self.points}"
if self.units is not None:
... | {"golden_diff": "diff --git a/WrightTools/_dataset.py b/WrightTools/_dataset.py\n--- a/WrightTools/_dataset.py\n+++ b/WrightTools/_dataset.py\n@@ -117,9 +117,12 @@\n @property\n def _leaf(self):\n out = self.natural_name\n+ if self.size == 1:\n+ out += f\" = {self.points}\"\n i... |
gh_patches_debug_1493 | rasdani/github-patches | git_diff | pulp__pulpcore-4156 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BaseDownloader.fetch passes coroutine to asyncio.wait which is forbidden in python 3.11
Python 3.8 deprecated passing coroutines to `asyncio.wait` and Python 3.11 will now [raise an error](https://github.com/... | diff --git a/pulpcore/download/base.py b/pulpcore/download/base.py
--- a/pulpcore/download/base.py
+++ b/pulpcore/download/base.py
@@ -182,8 +182,8 @@
Raises:
Exception: Any fatal exception emitted during downloading
"""
- done, _ = asyncio.get_event_loop().run_until_complete(async... | {"golden_diff": "diff --git a/pulpcore/download/base.py b/pulpcore/download/base.py\n--- a/pulpcore/download/base.py\n+++ b/pulpcore/download/base.py\n@@ -182,8 +182,8 @@\n Raises:\n Exception: Any fatal exception emitted during downloading\n \"\"\"\n- done, _ = asyncio.get_event_loop... |
gh_patches_debug_1494 | rasdani/github-patches | git_diff | ludwig-ai__ludwig-1702 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Shape mismatch when introducing multiple levels of dependencies
**Describe the bug**
When introducing multiple levels of dependencies, the shape of the _concatenated hidden states_ does not match the _inpu... | diff --git a/ludwig/features/base_feature.py b/ludwig/features/base_feature.py
--- a/ludwig/features/base_feature.py
+++ b/ludwig/features/base_feature.py
@@ -217,6 +217,7 @@
logger.debug(" FCStack")
self.input_size = get_input_size_with_dependencies(self.input_size, self.dependencies, other_output... | {"golden_diff": "diff --git a/ludwig/features/base_feature.py b/ludwig/features/base_feature.py\n--- a/ludwig/features/base_feature.py\n+++ b/ludwig/features/base_feature.py\n@@ -217,6 +217,7 @@\n logger.debug(\" FCStack\")\n \n self.input_size = get_input_size_with_dependencies(self.input_size, self.d... |
gh_patches_debug_1495 | rasdani/github-patches | git_diff | pulp__pulpcore-4010 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RESTAPI document fix for Upstream Pulp Replication API
**Version**
Pulp installed through the Python modules.
"core:3.28.0"
"certguard:3.28.0"
"file:3.28.0"
"python:3.28.0"
"rpm:3.28.0"
**Describe th... | diff --git a/pulpcore/app/viewsets/replica.py b/pulpcore/app/viewsets/replica.py
--- a/pulpcore/app/viewsets/replica.py
+++ b/pulpcore/app/viewsets/replica.py
@@ -33,6 +33,7 @@
summary="Replicate",
description="Trigger an asynchronous repository replication task group. This API is "
"provided... | {"golden_diff": "diff --git a/pulpcore/app/viewsets/replica.py b/pulpcore/app/viewsets/replica.py\n--- a/pulpcore/app/viewsets/replica.py\n+++ b/pulpcore/app/viewsets/replica.py\n@@ -33,6 +33,7 @@\n summary=\"Replicate\",\n description=\"Trigger an asynchronous repository replication task group. This AP... |
gh_patches_debug_1496 | rasdani/github-patches | git_diff | searx__searx-672 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Infinite scroll: answer are repeated on each page
How to reproduce : search for ["user agent"](https://searx.me/?q=user+agent) with Infinite scroll activated.
Should the answer be disabled except the first p... | diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py
--- a/searx/plugins/self_info.py
+++ b/searx/plugins/self_info.py
@@ -29,6 +29,8 @@
# request: flask request object
# ctx: the whole local context of the pre search hook
def post_search(request, ctx):
+ if ctx['search'].pageno > 1:
+ re... | {"golden_diff": "diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py\n--- a/searx/plugins/self_info.py\n+++ b/searx/plugins/self_info.py\n@@ -29,6 +29,8 @@\n # request: flask request object\n # ctx: the whole local context of the pre search hook\n def post_search(request, ctx):\n+ if ctx['search']... |
gh_patches_debug_1497 | rasdani/github-patches | git_diff | fedora-infra__bodhi-4148 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Crash in automatic update handler when submitting work_on_bugs_task
From bodhi-consumer logs:
```
2020-10-25 11:17:14,460 INFO [fedora_messaging.twisted.protocol][MainThread] Consuming message from topic o... | diff --git a/bodhi/server/consumers/automatic_updates.py b/bodhi/server/consumers/automatic_updates.py
--- a/bodhi/server/consumers/automatic_updates.py
+++ b/bodhi/server/consumers/automatic_updates.py
@@ -199,6 +199,7 @@
except Exception as e:
log.error(f'Problem obsoleting older updates... | {"golden_diff": "diff --git a/bodhi/server/consumers/automatic_updates.py b/bodhi/server/consumers/automatic_updates.py\n--- a/bodhi/server/consumers/automatic_updates.py\n+++ b/bodhi/server/consumers/automatic_updates.py\n@@ -199,6 +199,7 @@\n except Exception as e:\n log.error(f'Problem ob... |
gh_patches_debug_1498 | rasdani/github-patches | git_diff | falconry__falcon-602 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hoist HTTPStatus into falcon top-level namespace
I.e., add an import line to `falcon/__init__.py`
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may c... | diff --git a/falcon/__init__.py b/falcon/__init__.py
--- a/falcon/__init__.py
+++ b/falcon/__init__.py
@@ -34,6 +34,7 @@
from falcon.errors import * # NOQA
from falcon.redirects import * # NOQA
from falcon.http_error import HTTPError # NOQA
+from falcon.http_status import HTTPStatus # NOQA
from falcon.util impo... | {"golden_diff": "diff --git a/falcon/__init__.py b/falcon/__init__.py\n--- a/falcon/__init__.py\n+++ b/falcon/__init__.py\n@@ -34,6 +34,7 @@\n from falcon.errors import * # NOQA\n from falcon.redirects import * # NOQA\n from falcon.http_error import HTTPError # NOQA\n+from falcon.http_status import HTTPStatus # NOQ... |
gh_patches_debug_1499 | rasdani/github-patches | git_diff | litestar-org__litestar-2244 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
StaticFilesConfig and virtual directories
I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/usin... | diff --git a/litestar/cli/main.py b/litestar/cli/main.py
--- a/litestar/cli/main.py
+++ b/litestar/cli/main.py
@@ -27,7 +27,7 @@
click.rich_click.STYLE_ERRORS_SUGGESTION = "magenta italic"
click.rich_click.ERRORS_SUGGESTION = ""
click.rich_click.ERRORS_EPILOGUE = ""
- click.rich_click.MAX_WIDTH = 100
... | {"golden_diff": "diff --git a/litestar/cli/main.py b/litestar/cli/main.py\n--- a/litestar/cli/main.py\n+++ b/litestar/cli/main.py\n@@ -27,7 +27,7 @@\n click.rich_click.STYLE_ERRORS_SUGGESTION = \"magenta italic\"\n click.rich_click.ERRORS_SUGGESTION = \"\"\n click.rich_click.ERRORS_EPILOGUE = \"\"\n- cli... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.