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_800 | rasdani/github-patches | git_diff | bokeh__bokeh-5968 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Transform docstring ends abruptly
```
Bases: bokeh.model.Model
Base class for Transform models that represent a computation to be carried out on the client-side.
JavaScript implementations shou... | diff --git a/bokeh/models/transforms.py b/bokeh/models/transforms.py
--- a/bokeh/models/transforms.py
+++ b/bokeh/models/transforms.py
@@ -19,11 +19,11 @@
.. code-block: coffeescript
- compute: (x) ->
- # compute the transform of a single value
+ compute: (x) ->
+ # compute th... | {"golden_diff": "diff --git a/bokeh/models/transforms.py b/bokeh/models/transforms.py\n--- a/bokeh/models/transforms.py\n+++ b/bokeh/models/transforms.py\n@@ -19,11 +19,11 @@\n \n .. code-block: coffeescript\n \n- compute: (x) ->\n- # compute the transform of a single value\n+ compute: (x) -... |
gh_patches_debug_801 | rasdani/github-patches | git_diff | carpentries__amy-1090 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Import old release notes
Add them to `docs/releases` dictionary. Get old release notes from [Piotr's blog](http://piotr.banaszkiewicz.org/).
It'd be better to keep release notes along with source code, so ... | diff --git a/extforms/views.py b/extforms/views.py
--- a/extforms/views.py
+++ b/extforms/views.py
@@ -1,5 +1,6 @@
from django.conf import settings
-from django.core.urlresolvers import reverse, reverse_lazy
+from django.contrib import messages
+from django.core.urlresolvers import reverse_lazy
from django.shortcuts ... | {"golden_diff": "diff --git a/extforms/views.py b/extforms/views.py\n--- a/extforms/views.py\n+++ b/extforms/views.py\n@@ -1,5 +1,6 @@\n from django.conf import settings\n-from django.core.urlresolvers import reverse, reverse_lazy\n+from django.contrib import messages\n+from django.core.urlresolvers import reverse_lazy... |
gh_patches_debug_802 | rasdani/github-patches | git_diff | python-telegram-bot__python-telegram-bot-3987 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
UnboundLocalError when submitting smth else then an Update to the webhook
https://github.com/python-telegram-bot/python-telegram-bot/blob/dd9af64a5c99c2518ef86027e008cdb8659dd1f5/telegram/ext/_utils/webhookha... | diff --git a/telegram/ext/_utils/webhookhandler.py b/telegram/ext/_utils/webhookhandler.py
--- a/telegram/ext/_utils/webhookhandler.py
+++ b/telegram/ext/_utils/webhookhandler.py
@@ -146,6 +146,9 @@
"Received data was *not* processed!",
exc_info=exc,
)
+ raise t... | {"golden_diff": "diff --git a/telegram/ext/_utils/webhookhandler.py b/telegram/ext/_utils/webhookhandler.py\n--- a/telegram/ext/_utils/webhookhandler.py\n+++ b/telegram/ext/_utils/webhookhandler.py\n@@ -146,6 +146,9 @@\n \"Received data was *not* processed!\",\n exc_info=exc,\n ... |
gh_patches_debug_803 | rasdani/github-patches | git_diff | google__flax-107 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
VAE example uses deprecated `optimizer.optimize()`
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `example... | diff --git a/examples/vae/main.py b/examples/vae/main.py
--- a/examples/vae/main.py
+++ b/examples/vae/main.py
@@ -120,7 +120,9 @@
kld_loss = kl_divergence(mean, logvar)
loss = jnp.mean(bce_loss + kld_loss)
return loss, recon_x
- optimizer, _, _ = optimizer.optimize(loss_fn)
+ grad_fn = jax.value_and_g... | {"golden_diff": "diff --git a/examples/vae/main.py b/examples/vae/main.py\n--- a/examples/vae/main.py\n+++ b/examples/vae/main.py\n@@ -120,7 +120,9 @@\n kld_loss = kl_divergence(mean, logvar)\n loss = jnp.mean(bce_loss + kld_loss)\n return loss, recon_x\n- optimizer, _, _ = optimizer.optimize(loss_fn)\n+ ... |
gh_patches_debug_804 | rasdani/github-patches | git_diff | python-poetry__poetry-1481 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`~=` version constraints (PEP 440) do not correctly set the lower version
<!--
Hi there! Thank you for discovering and submitting an issue.
Before you submit this; let's make sure of a few things.
... | diff --git a/poetry/semver/__init__.py b/poetry/semver/__init__.py
--- a/poetry/semver/__init__.py
+++ b/poetry/semver/__init__.py
@@ -79,7 +79,7 @@
low = version
high = version.stable.next_major
else:
- low = Version(version.major, version.minor, 0)
+ low = Vers... | {"golden_diff": "diff --git a/poetry/semver/__init__.py b/poetry/semver/__init__.py\n--- a/poetry/semver/__init__.py\n+++ b/poetry/semver/__init__.py\n@@ -79,7 +79,7 @@\n low = version\n high = version.stable.next_major\n else:\n- low = Version(version.major, version.minor, 0)... |
gh_patches_debug_805 | rasdani/github-patches | git_diff | pypi__warehouse-7351 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix simple typo: thorugh -> through
# Issue Type
[x] Bug (Typo)
# Steps to Replicate
1. Examine warehouse/filters.py.
2. Search for `thorugh`.
# Expected Behaviour
1. Should read `through`.
--- END IS... | diff --git a/warehouse/filters.py b/warehouse/filters.py
--- a/warehouse/filters.py
+++ b/warehouse/filters.py
@@ -132,7 +132,7 @@
if value:
structured[key].append(value[0])
- # Go thorugh and ensure that all of the lists in our classifiers are in
+ # Go through and ensure that all of the ... | {"golden_diff": "diff --git a/warehouse/filters.py b/warehouse/filters.py\n--- a/warehouse/filters.py\n+++ b/warehouse/filters.py\n@@ -132,7 +132,7 @@\n if value:\n structured[key].append(value[0])\n \n- # Go thorugh and ensure that all of the lists in our classifiers are in\n+ # Go through an... |
gh_patches_debug_806 | rasdani/github-patches | git_diff | secdev__scapy-4141 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] GENEVE.post_build() compute 'optionlen' incorrect
### Brief description
GENEVE.post_build() compute 'optionlen' incorrect.
I found that 'optionlen' always incorrect, when I implement class `GeneveOp... | diff --git a/scapy/contrib/geneve.py b/scapy/contrib/geneve.py
--- a/scapy/contrib/geneve.py
+++ b/scapy/contrib/geneve.py
@@ -66,7 +66,7 @@
def post_build(self, p, pay):
if self.optionlen is None:
tmp_len = (len(p) - 8) // 4
- p = chb(tmp_len & 0x2f | orb(p[0]) & 0xc0) + p[1:]
+ ... | {"golden_diff": "diff --git a/scapy/contrib/geneve.py b/scapy/contrib/geneve.py\n--- a/scapy/contrib/geneve.py\n+++ b/scapy/contrib/geneve.py\n@@ -66,7 +66,7 @@\n def post_build(self, p, pay):\n if self.optionlen is None:\n tmp_len = (len(p) - 8) // 4\n- p = chb(tmp_len & 0x2f | orb(p... |
gh_patches_debug_807 | rasdani/github-patches | git_diff | vacanza__python-holidays-1429 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
mypy 1.5.0 errors: "`Unsupported operand types`"
New error from new `mypy` version (1.5.0) for `beta` branch); the code works more or less fine as before:
```bash
mypy.......................................... | diff --git a/holidays/holiday_base.py b/holidays/holiday_base.py
--- a/holidays/holiday_base.py
+++ b/holidays/holiday_base.py
@@ -399,7 +399,7 @@
if getattr(self, attribute_name, None) != getattr(other, attribute_name, None):
return False
- return dict.__eq__(self, other)
+ ... | {"golden_diff": "diff --git a/holidays/holiday_base.py b/holidays/holiday_base.py\n--- a/holidays/holiday_base.py\n+++ b/holidays/holiday_base.py\n@@ -399,7 +399,7 @@\n if getattr(self, attribute_name, None) != getattr(other, attribute_name, None):\n return False\n \n- return dict.__e... |
gh_patches_debug_808 | rasdani/github-patches | git_diff | buildbot__buildbot-426 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Move to a ChangeHook in hgbuildbot.py (closes #2227)
Starting a Twisted reactor within a Mercurial hook is problematic
because a hook can get called multiple times (from the same Mercurial
process) which conf... | diff --git a/master/buildbot/steps/source/cvs.py b/master/buildbot/steps/source/cvs.py
--- a/master/buildbot/steps/source/cvs.py
+++ b/master/buildbot/steps/source/cvs.py
@@ -46,6 +46,7 @@
Source.__init__(self, **kwargs)
def startVC(self, branch, revision, patch):
+ self.branch = branch
... | {"golden_diff": "diff --git a/master/buildbot/steps/source/cvs.py b/master/buildbot/steps/source/cvs.py\n--- a/master/buildbot/steps/source/cvs.py\n+++ b/master/buildbot/steps/source/cvs.py\n@@ -46,6 +46,7 @@\n Source.__init__(self, **kwargs)\n \n def startVC(self, branch, revision, patch):\n+ self.b... |
gh_patches_debug_809 | rasdani/github-patches | git_diff | locustio__locust-994 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fail ratio calculation for individual requests is incorrect
### Description of issue
The fail ratio for each individual request is incorrect, and doesn't match the total fail ratio.
### Expected behavio... | diff --git a/locust/stats.py b/locust/stats.py
--- a/locust/stats.py
+++ b/locust/stats.py
@@ -276,7 +276,7 @@
@property
def fail_ratio(self):
try:
- return float(self.num_failures) / (self.num_requests + self.num_failures)
+ return float(self.num_failures) / self.num_requests
... | {"golden_diff": "diff --git a/locust/stats.py b/locust/stats.py\n--- a/locust/stats.py\n+++ b/locust/stats.py\n@@ -276,7 +276,7 @@\n @property\n def fail_ratio(self):\n try:\n- return float(self.num_failures) / (self.num_requests + self.num_failures)\n+ return float(self.num_failur... |
gh_patches_debug_810 | rasdani/github-patches | git_diff | CTFd__CTFd-1925 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Consider passing challenge class over into the view.html context
This makes it a little easier for the challenge view to access Python code. Not sure if this looks best as challenge.class.read() or challenge_... | diff --git a/CTFd/models/__init__.py b/CTFd/models/__init__.py
--- a/CTFd/models/__init__.py
+++ b/CTFd/models/__init__.py
@@ -122,6 +122,12 @@
return markup(build_markdown(self.description))
+ @property
+ def plugin_class(self):
+ from CTFd.plugins.challenges import get_chal_class
+
+ ... | {"golden_diff": "diff --git a/CTFd/models/__init__.py b/CTFd/models/__init__.py\n--- a/CTFd/models/__init__.py\n+++ b/CTFd/models/__init__.py\n@@ -122,6 +122,12 @@\n \n return markup(build_markdown(self.description))\n \n+ @property\n+ def plugin_class(self):\n+ from CTFd.plugins.challenges import ... |
gh_patches_debug_811 | rasdani/github-patches | git_diff | biolab__orange3-text-356 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bag of Words: crashes if < 11 tokens on the input
<!--
This is an issue template. Please fill in the relevant details in the
sections below.
-->
##### Text version
<!-- From menu _Options→Add-ons→Orang... | diff --git a/orangecontrib/text/vectorization/bagofwords.py b/orangecontrib/text/vectorization/bagofwords.py
--- a/orangecontrib/text/vectorization/bagofwords.py
+++ b/orangecontrib/text/vectorization/bagofwords.py
@@ -46,7 +46,8 @@
wlocals = OrderedDict((
(COUNT, lambda tf: tf),
- (BINARY, lambd... | {"golden_diff": "diff --git a/orangecontrib/text/vectorization/bagofwords.py b/orangecontrib/text/vectorization/bagofwords.py\n--- a/orangecontrib/text/vectorization/bagofwords.py\n+++ b/orangecontrib/text/vectorization/bagofwords.py\n@@ -46,7 +46,8 @@\n \n wlocals = OrderedDict((\n (COUNT, lambda tf: tf),\... |
gh_patches_debug_812 | rasdani/github-patches | git_diff | searxng__searxng-706 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`?` search syntax is broken
The [user documentation says](https://docs.searxng.org/user/search_syntax.html):
>**Prefix: `?`**
>to add engines and categories to the currently selected categories
But t... | diff --git a/searx/query.py b/searx/query.py
--- a/searx/query.py
+++ b/searx/query.py
@@ -177,7 +177,7 @@
class BangParser(QueryPartParser):
@staticmethod
def check(raw_value):
- return raw_value[0] == '!' or raw_value[0] == '?'
+ return raw_value[0] == '!'
def __call__(self, raw_value)... | {"golden_diff": "diff --git a/searx/query.py b/searx/query.py\n--- a/searx/query.py\n+++ b/searx/query.py\n@@ -177,7 +177,7 @@\n class BangParser(QueryPartParser):\n @staticmethod\n def check(raw_value):\n- return raw_value[0] == '!' or raw_value[0] == '?'\n+ return raw_value[0] == '!'\n \n de... |
gh_patches_debug_813 | rasdani/github-patches | git_diff | kubeflow__pipelines-4195 | 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/sdk/python/kfp/_client.py b/sdk/python/kfp/_client.py
--- a/sdk/python/kfp/_client.py
+++ b/sdk/python/kfp/_client.py
@@ -247,7 +247,7 @@
def _refresh_api_client_token(self):
"""Refreshes the existing token associated with the kfp_api_client."""
- if getattr(self, '_is_refresh_token'):
+... | {"golden_diff": "diff --git a/sdk/python/kfp/_client.py b/sdk/python/kfp/_client.py\n--- a/sdk/python/kfp/_client.py\n+++ b/sdk/python/kfp/_client.py\n@@ -247,7 +247,7 @@\n \n def _refresh_api_client_token(self):\n \"\"\"Refreshes the existing token associated with the kfp_api_client.\"\"\"\n- if getattr... |
gh_patches_debug_814 | rasdani/github-patches | git_diff | Textualize__textual-772 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Grid cell margin issue
Adding margin: 1 to the cells within this grid causes unexpected output:
<img width="752" alt="image" src="https://user-images.githubusercontent.com/5740731/190180955-3b10bd1f-60ca-4... | diff --git a/src/textual/layouts/grid.py b/src/textual/layouts/grid.py
--- a/src/textual/layouts/grid.py
+++ b/src/textual/layouts/grid.py
@@ -150,7 +150,7 @@
fraction_unit,
)
region = (
- Region(x, y, int(width), int(height))
+ Region(x, y, int(w... | {"golden_diff": "diff --git a/src/textual/layouts/grid.py b/src/textual/layouts/grid.py\n--- a/src/textual/layouts/grid.py\n+++ b/src/textual/layouts/grid.py\n@@ -150,7 +150,7 @@\n fraction_unit,\n )\n region = (\n- Region(x, y, int(width), int(height))\n+ ... |
gh_patches_debug_815 | rasdani/github-patches | git_diff | beeware__toga-866 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
tests.test_image.ImageTests cannot pass
## Expected Behavior
all tests pass
## Current Behavior
```
======================================================================
ERROR: test_object_created... | diff --git a/src/core/toga/app.py b/src/core/toga/app.py
--- a/src/core/toga/app.py
+++ b/src/core/toga/app.py
@@ -51,7 +51,7 @@
The absolute minimum App would be::
- >>> app = toga.App(name='Empty App', app_id='org.beeware.empty')
+ >>> app = toga.App(formal_name='Empty App', app_id='org.beeware... | {"golden_diff": "diff --git a/src/core/toga/app.py b/src/core/toga/app.py\n--- a/src/core/toga/app.py\n+++ b/src/core/toga/app.py\n@@ -51,7 +51,7 @@\n \n The absolute minimum App would be::\n \n- >>> app = toga.App(name='Empty App', app_id='org.beeware.empty')\n+ >>> app = toga.App(formal_name='Empty ... |
gh_patches_debug_816 | rasdani/github-patches | git_diff | sopel-irc__sopel-914 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The example() decorator is improperly "fixing" the example text.
Version: 6.0.0
Code excerpt
``` python
@commands('abort')
@example(".abort")
```
Help output:
``` text
08:49 bgallew: .help abort
08:49 D... | diff --git a/sopel/loader.py b/sopel/loader.py
--- a/sopel/loader.py
+++ b/sopel/loader.py
@@ -142,7 +142,7 @@
puts them in func._docs, and sets defaults"""
nick = config.core.nick
prefix = config.core.prefix
- help_prefix = config.core.prefix
+ help_prefix = config.core.help_prefix
func._docs... | {"golden_diff": "diff --git a/sopel/loader.py b/sopel/loader.py\n--- a/sopel/loader.py\n+++ b/sopel/loader.py\n@@ -142,7 +142,7 @@\n puts them in func._docs, and sets defaults\"\"\"\n nick = config.core.nick\n prefix = config.core.prefix\n- help_prefix = config.core.prefix\n+ help_prefix = config.core... |
gh_patches_debug_817 | rasdani/github-patches | git_diff | ourownstory__neural_prophet-1254 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Static Trend does not follow required forecasting pattern
**Source Code:**
```
import pandas as pd
from neuralprophet import NeuralProphet, set_log_level, set_random_seed
set_log_level("ERROR")
data_... | diff --git a/neuralprophet/components/trend/static.py b/neuralprophet/components/trend/static.py
--- a/neuralprophet/components/trend/static.py
+++ b/neuralprophet/components/trend/static.py
@@ -28,7 +28,7 @@
torch.Tensor
Trend component, same dimensions as input t
"""
- re... | {"golden_diff": "diff --git a/neuralprophet/components/trend/static.py b/neuralprophet/components/trend/static.py\n--- a/neuralprophet/components/trend/static.py\n+++ b/neuralprophet/components/trend/static.py\n@@ -28,7 +28,7 @@\n torch.Tensor\n Trend component, same dimensions as input t\n ... |
gh_patches_debug_818 | rasdani/github-patches | git_diff | python-telegram-bot__python-telegram-bot-1698 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] duplicate assignment of job_queue in dispatcher class
Hi I was going through dispatcher.py, I found job_queue class object initialized twice at line 115 and 141,which seems not helping anywhere.
Should... | diff --git a/telegram/ext/dispatcher.py b/telegram/ext/dispatcher.py
--- a/telegram/ext/dispatcher.py
+++ b/telegram/ext/dispatcher.py
@@ -138,8 +138,6 @@
else:
self.persistence = None
- self.job_queue = job_queue
-
self.handlers = {}
"""Dict[:obj:`int`, List[:class:`tel... | {"golden_diff": "diff --git a/telegram/ext/dispatcher.py b/telegram/ext/dispatcher.py\n--- a/telegram/ext/dispatcher.py\n+++ b/telegram/ext/dispatcher.py\n@@ -138,8 +138,6 @@\n else:\n self.persistence = None\n \n- self.job_queue = job_queue\n-\n self.handlers = {}\n \"\"\"Dic... |
gh_patches_debug_819 | rasdani/github-patches | git_diff | MTES-MCT__aides-territoires-174 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Mauvais article et mauvaise casse pour message d'erreur sur adresse mail
Sur la page `/comptes/connexion/`, on voit :
```
Saisissez un Adresse e-mail…
```
Alors que l'on devrait avoir :
```
Sais... | diff --git a/src/accounts/forms.py b/src/accounts/forms.py
--- a/src/accounts/forms.py
+++ b/src/accounts/forms.py
@@ -39,6 +39,13 @@
class LoginForm(AuthenticationForm):
+ error_messages = {
+ 'invalid_login': _(
+ 'Please enter a correct email address and password.'
+ ),
+ 'ina... | {"golden_diff": "diff --git a/src/accounts/forms.py b/src/accounts/forms.py\n--- a/src/accounts/forms.py\n+++ b/src/accounts/forms.py\n@@ -39,6 +39,13 @@\n \n \n class LoginForm(AuthenticationForm):\n+ error_messages = {\n+ 'invalid_login': _(\n+ 'Please enter a correct email address and password.'... |
gh_patches_debug_820 | rasdani/github-patches | git_diff | zostera__django-bootstrap4-163 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Putting a link in bootstrap_alert
How do I put a link in `bootstrap_alert`?
```
msg=mark_safe('Please visit our forum site <a href="talk.edgle.com" class="alert-link">Edgle Talk</a> as well!')
render_a... | diff --git a/src/bootstrap4/components.py b/src/bootstrap4/components.py
--- a/src/bootstrap4/components.py
+++ b/src/bootstrap4/components.py
@@ -21,6 +21,6 @@
render_tag(
"div",
attrs={"class": " ".join(css_classes), "role": "alert"},
- content=button_placeholder + text_v... | {"golden_diff": "diff --git a/src/bootstrap4/components.py b/src/bootstrap4/components.py\n--- a/src/bootstrap4/components.py\n+++ b/src/bootstrap4/components.py\n@@ -21,6 +21,6 @@\n render_tag(\n \"div\",\n attrs={\"class\": \" \".join(css_classes), \"role\": \"alert\"},\n- c... |
gh_patches_debug_821 | rasdani/github-patches | git_diff | fossasia__open-event-server-8939 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Adjust the Server to the Changes in Gender Options
The server needs to be changed slightly in order to work with the new client after implementing [feature no 8842](https://github.com/fossasia/open-event-fron... | diff --git a/app/api/helpers/static.py b/app/api/helpers/static.py
--- a/app/api/helpers/static.py
+++ b/app/api/helpers/static.py
@@ -563,11 +563,13 @@
]
GENDER_CHOICES = [
- 'Male',
- 'Female',
- 'Other',
- 'Diverse / Non-binary',
- 'Prefer not to share',
+ 'Man',
+ 'Woman',
+ 'Transgender... | {"golden_diff": "diff --git a/app/api/helpers/static.py b/app/api/helpers/static.py\n--- a/app/api/helpers/static.py\n+++ b/app/api/helpers/static.py\n@@ -563,11 +563,13 @@\n ]\n \n GENDER_CHOICES = [\n- 'Male',\n- 'Female',\n- 'Other',\n- 'Diverse / Non-binary',\n- 'Prefer not to share',\n+ 'Man',\n+... |
gh_patches_debug_822 | rasdani/github-patches | git_diff | docker__docker-py-2687 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Plugin model upgrade: object has no attribute '_reload'
I've already got a fix for this that I'm about to submit. For reference, here are the steps to reproduce in ipython:
```
~$ ipython ... | diff --git a/docker/models/plugins.py b/docker/models/plugins.py
--- a/docker/models/plugins.py
+++ b/docker/models/plugins.py
@@ -119,7 +119,7 @@
privileges = self.client.api.plugin_privileges(remote)
for d in self.client.api.upgrade_plugin(self.name, remote, privileges):
yield d
- ... | {"golden_diff": "diff --git a/docker/models/plugins.py b/docker/models/plugins.py\n--- a/docker/models/plugins.py\n+++ b/docker/models/plugins.py\n@@ -119,7 +119,7 @@\n privileges = self.client.api.plugin_privileges(remote)\n for d in self.client.api.upgrade_plugin(self.name, remote, privileges):\n ... |
gh_patches_debug_823 | rasdani/github-patches | git_diff | goauthentik__authentik-6727 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Certificate requires private key to be used for LDAP server verification in 2023.8.1
**Describe the bug**
CA Certificates that don't have private keys seem to be not showing up in the list of certificates fo... | diff --git a/authentik/crypto/api.py b/authentik/crypto/api.py
--- a/authentik/crypto/api.py
+++ b/authentik/crypto/api.py
@@ -189,6 +189,8 @@
def filter_has_key(self, queryset, name, value): # pragma: no cover
"""Only return certificate-key pairs with keys"""
+ if not value:
+ return... | {"golden_diff": "diff --git a/authentik/crypto/api.py b/authentik/crypto/api.py\n--- a/authentik/crypto/api.py\n+++ b/authentik/crypto/api.py\n@@ -189,6 +189,8 @@\n \n def filter_has_key(self, queryset, name, value): # pragma: no cover\n \"\"\"Only return certificate-key pairs with keys\"\"\"\n+ if ... |
gh_patches_debug_824 | rasdani/github-patches | git_diff | python-gitlab__python-gitlab-838 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix Pickle support: dump() after load() fails
This is a one-liner fix to pickle support: pickle.dump() fails after pickle.load()
```
File "/home/bourgesl/.local/lib/python3.6/site-packages/gitlab/base.py"... | diff --git a/gitlab/base.py b/gitlab/base.py
--- a/gitlab/base.py
+++ b/gitlab/base.py
@@ -52,7 +52,7 @@
def __setstate__(self, state):
module_name = state.pop("_module_name")
self.__dict__.update(state)
- self._module = importlib.import_module(module_name)
+ self.__dict__["_module"... | {"golden_diff": "diff --git a/gitlab/base.py b/gitlab/base.py\n--- a/gitlab/base.py\n+++ b/gitlab/base.py\n@@ -52,7 +52,7 @@\n def __setstate__(self, state):\n module_name = state.pop(\"_module_name\")\n self.__dict__.update(state)\n- self._module = importlib.import_module(module_name)\n+ ... |
gh_patches_debug_825 | rasdani/github-patches | git_diff | deepset-ai__haystack-2184 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cant Upload a TXT file with REST API
**Describe the bug**
Cant Upload a TXT file with REST API, Receiving the following error
**Error message**
TyperError : 'NoneType' object does not support item assign... | diff --git a/rest_api/controller/file_upload.py b/rest_api/controller/file_upload.py
--- a/rest_api/controller/file_upload.py
+++ b/rest_api/controller/file_upload.py
@@ -91,7 +91,10 @@
file_paths: list = []
file_metas: list = []
- meta_form = json.loads(meta) # type: ignore
+
+ meta_form = json.load... | {"golden_diff": "diff --git a/rest_api/controller/file_upload.py b/rest_api/controller/file_upload.py\n--- a/rest_api/controller/file_upload.py\n+++ b/rest_api/controller/file_upload.py\n@@ -91,7 +91,10 @@\n \n file_paths: list = []\n file_metas: list = []\n- meta_form = json.loads(meta) # type: ignore\n+\n... |
gh_patches_debug_826 | rasdani/github-patches | git_diff | lutris__lutris-389 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create desktop/application menu shortcut writes a bad .desktop file
File contents:
```
[Desktop Entry]
Type=Application
Name=%s
Icon=%s
Exec=lutris lutris:%s
Categories=Game
```
**How to reproduce**
Right c... | diff --git a/lutris/shortcuts.py b/lutris/shortcuts.py
--- a/lutris/shortcuts.py
+++ b/lutris/shortcuts.py
@@ -30,9 +30,9 @@
"""
[Desktop Entry]
Type=Application
- Name=%s
- Icon=%s
- Exec=lutris lutris:%s
+ Name={}
+ Icon={}
+ Exec=lutris lutris:{}
... | {"golden_diff": "diff --git a/lutris/shortcuts.py b/lutris/shortcuts.py\n--- a/lutris/shortcuts.py\n+++ b/lutris/shortcuts.py\n@@ -30,9 +30,9 @@\n \"\"\"\n [Desktop Entry]\n Type=Application\n- Name=%s\n- Icon=%s\n- Exec=lutris lutris:%s\n+ Name={}\n+ Icon={}\n... |
gh_patches_debug_827 | rasdani/github-patches | git_diff | carltongibson__django-filter-1628 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
OrderingFilter triggers a 500 error if a single comma is given as the input
When `','` is given as the value for an OrderingFilter in a filterset form, a FieldError is thrown: `Cannot resolve keyword '' into ... | diff --git a/django_filters/filters.py b/django_filters/filters.py
--- a/django_filters/filters.py
+++ b/django_filters/filters.py
@@ -759,7 +759,11 @@
if value in EMPTY_VALUES:
return qs
- ordering = [self.get_ordering_value(param) for param in value]
+ ordering = [
+ s... | {"golden_diff": "diff --git a/django_filters/filters.py b/django_filters/filters.py\n--- a/django_filters/filters.py\n+++ b/django_filters/filters.py\n@@ -759,7 +759,11 @@\n if value in EMPTY_VALUES:\n return qs\n \n- ordering = [self.get_ordering_value(param) for param in value]\n+ or... |
gh_patches_debug_828 | rasdani/github-patches | git_diff | kserve__kserve-2343 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
KServe 0.9 release tracking
/kind feature
**Describe the solution you'd like**
KServe 0.9 release tracking:
RC release Date: 6/13/2022
Release Date: 6/27/2022
## KServe Model Serving:
- [X] Storage ... | diff --git a/python/kserve/setup.py b/python/kserve/setup.py
--- a/python/kserve/setup.py
+++ b/python/kserve/setup.py
@@ -28,7 +28,7 @@
setuptools.setup(
name='kserve',
- version='0.9.0rc0',
+ version='0.9.0',
author="The KServe Authors",
author_email='ellisbigelow@google.com, hejinchi@cn.ibm.c... | {"golden_diff": "diff --git a/python/kserve/setup.py b/python/kserve/setup.py\n--- a/python/kserve/setup.py\n+++ b/python/kserve/setup.py\n@@ -28,7 +28,7 @@\n \n setuptools.setup(\n name='kserve',\n- version='0.9.0rc0',\n+ version='0.9.0',\n author=\"The KServe Authors\",\n author_email='ellisbigelow@... |
gh_patches_debug_829 | rasdani/github-patches | git_diff | xonsh__xonsh-1764 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Completion traceback on Windows
I am now seeing this on Windows on master (eff2626)
```
(Miniconda) scopa@DESKTOP-EACI0E4 ~ $ cd Exception in thread Thread-24: ... | diff --git a/xonsh/completers/path.py b/xonsh/completers/path.py
--- a/xonsh/completers/path.py
+++ b/xonsh/completers/path.py
@@ -14,7 +14,7 @@
def PATTERN_NEED_QUOTES():
pattern = r'\s`\$\{\}\,\*\(\)"\'\?&'
if xp.ON_WINDOWS:
- pattern.append('%')
+ pattern += '%'
pattern = '[' + pattern ... | {"golden_diff": "diff --git a/xonsh/completers/path.py b/xonsh/completers/path.py\n--- a/xonsh/completers/path.py\n+++ b/xonsh/completers/path.py\n@@ -14,7 +14,7 @@\n def PATTERN_NEED_QUOTES():\n pattern = r'\\s`\\$\\{\\}\\,\\*\\(\\)\"\\'\\?&'\n if xp.ON_WINDOWS:\n- pattern.append('%')\n+ pattern ... |
gh_patches_debug_830 | rasdani/github-patches | git_diff | zestedesavoir__zds-site-4844 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TypeError: unorderable types: method() >= int()
https://sentry.sandhose.fr/zeste-de-savoir/backend-l7/issues/1319/
```
TypeError: unorderable types: method() >= int()
(3 additional frame(s) were not displaye... | diff --git a/zds/member/views.py b/zds/member/views.py
--- a/zds/member/views.py
+++ b/zds/member/views.py
@@ -412,7 +412,7 @@
def form_valid(self, form):
# Delete old token
token = TokenRegister.objects.filter(user=self.usr)
- if token.count >= 1:
+ if token.count() >= 1:
... | {"golden_diff": "diff --git a/zds/member/views.py b/zds/member/views.py\n--- a/zds/member/views.py\n+++ b/zds/member/views.py\n@@ -412,7 +412,7 @@\n def form_valid(self, form):\n # Delete old token\n token = TokenRegister.objects.filter(user=self.usr)\n- if token.count >= 1:\n+ if toke... |
gh_patches_debug_831 | rasdani/github-patches | git_diff | goauthentik__authentik-4675 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Proxy Provider not working
Hello
Please help me, I updated the authentik server to 23.1.2, it worked perfectly until now, now the Proxy Provider is not working because of the following error
this is in... | diff --git a/authentik/core/tasks.py b/authentik/core/tasks.py
--- a/authentik/core/tasks.py
+++ b/authentik/core/tasks.py
@@ -43,6 +43,7 @@
amount = 0
for session in AuthenticatedSession.objects.all():
cache_key = f"{KEY_PREFIX}{session.session_key}"
+ value = None
try:
... | {"golden_diff": "diff --git a/authentik/core/tasks.py b/authentik/core/tasks.py\n--- a/authentik/core/tasks.py\n+++ b/authentik/core/tasks.py\n@@ -43,6 +43,7 @@\n amount = 0\n for session in AuthenticatedSession.objects.all():\n cache_key = f\"{KEY_PREFIX}{session.session_key}\"\n+ value = None\n... |
gh_patches_debug_832 | rasdani/github-patches | git_diff | typeddjango__django-stubs-904 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Custom queryset methods returns `Any` on cached runs
# Bug report
I have a manager with custom queryset methods getting return types of `Any`, on cached runs.
## What's wrong
I've investigated the is... | diff --git a/mypy_django_plugin/main.py b/mypy_django_plugin/main.py
--- a/mypy_django_plugin/main.py
+++ b/mypy_django_plugin/main.py
@@ -276,7 +276,7 @@
if (
info
and info.has_base(fullnames.BASE_MANAGER_CLASS_FULLNAME)
- and class_name in self._get_current_manager_bases(... | {"golden_diff": "diff --git a/mypy_django_plugin/main.py b/mypy_django_plugin/main.py\n--- a/mypy_django_plugin/main.py\n+++ b/mypy_django_plugin/main.py\n@@ -276,7 +276,7 @@\n if (\n info\n and info.has_base(fullnames.BASE_MANAGER_CLASS_FULLNAME)\n- and class_name in self._ge... |
gh_patches_debug_833 | rasdani/github-patches | git_diff | OpenNMT__OpenNMT-py-1086 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bug in tally_parameters
Hi - there's a bug in _tally_parameters because `elif 'decoder' or 'generator' in name:` will always evaluate to True, since a string is True. I'd submit the fix, but I've already got... | diff --git a/onmt/train_single.py b/onmt/train_single.py
--- a/onmt/train_single.py
+++ b/onmt/train_single.py
@@ -34,7 +34,7 @@
for name, param in model.named_parameters():
if 'encoder' in name:
enc += param.nelement()
- elif 'decoder' or 'generator' in name:
+ elif ('decoder' ... | {"golden_diff": "diff --git a/onmt/train_single.py b/onmt/train_single.py\n--- a/onmt/train_single.py\n+++ b/onmt/train_single.py\n@@ -34,7 +34,7 @@\n for name, param in model.named_parameters():\n if 'encoder' in name:\n enc += param.nelement()\n- elif 'decoder' or 'generator' in name:\n... |
gh_patches_debug_834 | rasdani/github-patches | git_diff | open-mmlab__mmdetection-1853 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Why ga_shape_target_single() return (None,) *6
I got ValueError:not enough values to unpack(expected 5) whe using ga_shape_target_single(), and found that
`if not inside_flags.any(): return (None,) *6` but... | diff --git a/mmdet/core/anchor/guided_anchor_target.py b/mmdet/core/anchor/guided_anchor_target.py
--- a/mmdet/core/anchor/guided_anchor_target.py
+++ b/mmdet/core/anchor/guided_anchor_target.py
@@ -250,7 +250,7 @@
tuple
"""
if not inside_flags.any():
- return (None, ) * 6
+ return (Non... | {"golden_diff": "diff --git a/mmdet/core/anchor/guided_anchor_target.py b/mmdet/core/anchor/guided_anchor_target.py\n--- a/mmdet/core/anchor/guided_anchor_target.py\n+++ b/mmdet/core/anchor/guided_anchor_target.py\n@@ -250,7 +250,7 @@\n tuple\n \"\"\"\n if not inside_flags.any():\n- return (None,... |
gh_patches_debug_835 | rasdani/github-patches | git_diff | LMFDB__lmfdb-2961 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Favicon color should be updated
If we are changing the color scheme, the background color of the favicon (small image that appears on a tab) should be updated to match.
--- END ISSUE ---
Below are some code... | diff --git a/lmfdb/utils/config.py b/lmfdb/utils/config.py
--- a/lmfdb/utils/config.py
+++ b/lmfdb/utils/config.py
@@ -44,7 +44,7 @@
dest = 'core_color',
metavar = "COLOR",
help = 'color template (see lmfdb/utils/color.py)',
- default = 0,
+ default = 19,
... | {"golden_diff": "diff --git a/lmfdb/utils/config.py b/lmfdb/utils/config.py\n--- a/lmfdb/utils/config.py\n+++ b/lmfdb/utils/config.py\n@@ -44,7 +44,7 @@\n dest = 'core_color',\n metavar = \"COLOR\",\n help = 'color template (see lmfdb/utils/color.py)',\n- default = 0,\n+ ... |
gh_patches_debug_836 | rasdani/github-patches | git_diff | translate__pootle-5471 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Static page editing save HTML outcome instead of raw text
To reproduce:
1. Server using Markdown for static pages and an existing static page written using Markdown
2. Minor edit the content of the static... | diff --git a/pootle/core/markup/fields.py b/pootle/core/markup/fields.py
--- a/pootle/core/markup/fields.py
+++ b/pootle/core/markup/fields.py
@@ -119,8 +119,11 @@
return value
+ def to_python(self, value):
+ return self.get_prep_value(value)
+
def value_to_string(self, obj):
- value ... | {"golden_diff": "diff --git a/pootle/core/markup/fields.py b/pootle/core/markup/fields.py\n--- a/pootle/core/markup/fields.py\n+++ b/pootle/core/markup/fields.py\n@@ -119,8 +119,11 @@\n \n return value\n \n+ def to_python(self, value):\n+ return self.get_prep_value(value)\n+\n def value_to_string(... |
gh_patches_debug_837 | rasdani/github-patches | git_diff | aws-cloudformation__cfn-lint-1834 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
E3021 after upgrading to cfn_lint-0.44.0
cfn-lint version: cfn_lint-0.44.0
Hi!
After upgrading to version cfn_lint 0.44.0 don't validate AWS::Events::Rule
This was reported valid since yesterday:
... | diff --git a/src/cfnlint/rules/resources/events/RuleTargetsLimit.py b/src/cfnlint/rules/resources/events/RuleTargetsLimit.py
--- a/src/cfnlint/rules/resources/events/RuleTargetsLimit.py
+++ b/src/cfnlint/rules/resources/events/RuleTargetsLimit.py
@@ -21,6 +21,9 @@
self.resource_property_types = ['AWS::Events::... | {"golden_diff": "diff --git a/src/cfnlint/rules/resources/events/RuleTargetsLimit.py b/src/cfnlint/rules/resources/events/RuleTargetsLimit.py\n--- a/src/cfnlint/rules/resources/events/RuleTargetsLimit.py\n+++ b/src/cfnlint/rules/resources/events/RuleTargetsLimit.py\n@@ -21,6 +21,9 @@\n self.resource_property_ty... |
gh_patches_debug_838 | rasdani/github-patches | git_diff | mdn__kuma-6254 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Redirect "Featured
Hi there!
Apologies; it looks like we have another page that needs to be redirected from MDN to Extension Workshop.
AMO Features Extensions policies (https://developer.mozilla.org/d... | diff --git a/kuma/redirects/redirects.py b/kuma/redirects/redirects.py
--- a/kuma/redirects/redirects.py
+++ b/kuma/redirects/redirects.py
@@ -952,6 +952,8 @@
'publish/third-party-library-usage/'),
('WebExtensions/What_does_review_rejection_mean_to_users',
'publish/what-does-review-rejectio... | {"golden_diff": "diff --git a/kuma/redirects/redirects.py b/kuma/redirects/redirects.py\n--- a/kuma/redirects/redirects.py\n+++ b/kuma/redirects/redirects.py\n@@ -952,6 +952,8 @@\n 'publish/third-party-library-usage/'),\n ('WebExtensions/What_does_review_rejection_mean_to_users',\n 'publish/wh... |
gh_patches_debug_839 | rasdani/github-patches | git_diff | kornia__kornia-1400 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RandomAffine3D throws RuntimeError when batch_size > 1
### Describe the bug
When the batch_size of input > 1, `kornia.augmentation.RandomAffine3D` throws RuntimeError: "The size of tensor a (3) must match th... | diff --git a/kornia/augmentation/random_generator/random_generator3d.py b/kornia/augmentation/random_generator/random_generator3d.py
--- a/kornia/augmentation/random_generator/random_generator3d.py
+++ b/kornia/augmentation/random_generator/random_generator3d.py
@@ -119,7 +119,7 @@
dim=1,
)
e... | {"golden_diff": "diff --git a/kornia/augmentation/random_generator/random_generator3d.py b/kornia/augmentation/random_generator/random_generator3d.py\n--- a/kornia/augmentation/random_generator/random_generator3d.py\n+++ b/kornia/augmentation/random_generator/random_generator3d.py\n@@ -119,7 +119,7 @@\n dim... |
gh_patches_debug_840 | rasdani/github-patches | git_diff | networkx__networkx-5287 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`json_graph.tree_data` can cause maximum recursion depth error.
<!-- If you have a general question about NetworkX, please use the discussions tab to create a new discussion -->
<!--- Provide a general sum... | diff --git a/networkx/readwrite/json_graph/tree.py b/networkx/readwrite/json_graph/tree.py
--- a/networkx/readwrite/json_graph/tree.py
+++ b/networkx/readwrite/json_graph/tree.py
@@ -75,6 +75,8 @@
raise TypeError("G is not a tree.")
if not G.is_directed():
raise TypeError("G is not directed.")
+ ... | {"golden_diff": "diff --git a/networkx/readwrite/json_graph/tree.py b/networkx/readwrite/json_graph/tree.py\n--- a/networkx/readwrite/json_graph/tree.py\n+++ b/networkx/readwrite/json_graph/tree.py\n@@ -75,6 +75,8 @@\n raise TypeError(\"G is not a tree.\")\n if not G.is_directed():\n raise TypeError... |
gh_patches_debug_841 | rasdani/github-patches | git_diff | ibis-project__ibis-3709 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bug(sqlalchemy): incorrect CROSS JOIN with multiple joins
From @gvwilson's comments in #2087, using this SQL schema:
```
CREATE TABLE Person (
id text,
personal text,
family text
);
CREAT... | diff --git a/ibis/backends/base/sql/alchemy/registry.py b/ibis/backends/base/sql/alchemy/registry.py
--- a/ibis/backends/base/sql/alchemy/registry.py
+++ b/ibis/backends/base/sql/alchemy/registry.py
@@ -117,9 +117,11 @@
where `table_set` is `sa_table` above.
"""
try:
- out_expr = sa_table.c[colnam... | {"golden_diff": "diff --git a/ibis/backends/base/sql/alchemy/registry.py b/ibis/backends/base/sql/alchemy/registry.py\n--- a/ibis/backends/base/sql/alchemy/registry.py\n+++ b/ibis/backends/base/sql/alchemy/registry.py\n@@ -117,9 +117,11 @@\n where `table_set` is `sa_table` above.\n \"\"\"\n try:\n- o... |
gh_patches_debug_842 | rasdani/github-patches | git_diff | sopel-irc__sopel-1419 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
User objects aren't updated on NICK events
````
<Reptarsaurus> Okay, I just tested....I am doing users = chans[chan].users.values() after
a nick change, and 'for user in users: print(user.nic... | diff --git a/sopel/tools/target.py b/sopel/tools/target.py
--- a/sopel/tools/target.py
+++ b/sopel/tools/target.py
@@ -76,6 +76,7 @@
def rename_user(self, old, new):
if old in self.users:
self.users[new] = self.users.pop(old)
+ self.users[new].nick = new
if old in self.pri... | {"golden_diff": "diff --git a/sopel/tools/target.py b/sopel/tools/target.py\n--- a/sopel/tools/target.py\n+++ b/sopel/tools/target.py\n@@ -76,6 +76,7 @@\n def rename_user(self, old, new):\n if old in self.users:\n self.users[new] = self.users.pop(old)\n+ self.users[new].nick = new\n ... |
gh_patches_debug_843 | rasdani/github-patches | git_diff | ethereum__web3.py-670 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Consider adding Chain Id to library
* Version: 4.0.0-b
* Python: 3.6.3
* OS: linux
### What was wrong?
No clear way to access known chain ids.
### How can it be fixed?
Proposed syntax
```
>>... | diff --git a/web3/net.py b/web3/net.py
--- a/web3/net.py
+++ b/web3/net.py
@@ -12,6 +12,10 @@
def peerCount(self):
return self.web3.manager.request_blocking("net_peerCount", [])
+ @property
+ def chainId(self):
+ return self.version
+
@property
def version(self):
return s... | {"golden_diff": "diff --git a/web3/net.py b/web3/net.py\n--- a/web3/net.py\n+++ b/web3/net.py\n@@ -12,6 +12,10 @@\n def peerCount(self):\n return self.web3.manager.request_blocking(\"net_peerCount\", [])\n \n+ @property\n+ def chainId(self):\n+ return self.version\n+\n @property\n def v... |
gh_patches_debug_844 | rasdani/github-patches | git_diff | StackStorm__st2-4656 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
3.0 - `source_channel` no longer working for Mistral workflows
##### SUMMARY
In ST2 3.0, Mistral workflows no longer able to identify `source_channel` that alias was called from.
##### ISSUE TYPE
- B... | diff --git a/st2api/st2api/controllers/v1/aliasexecution.py b/st2api/st2api/controllers/v1/aliasexecution.py
--- a/st2api/st2api/controllers/v1/aliasexecution.py
+++ b/st2api/st2api/controllers/v1/aliasexecution.py
@@ -143,6 +143,7 @@
'action_alias_ref': reference.get_ref_from_model(action_alias_db),
... | {"golden_diff": "diff --git a/st2api/st2api/controllers/v1/aliasexecution.py b/st2api/st2api/controllers/v1/aliasexecution.py\n--- a/st2api/st2api/controllers/v1/aliasexecution.py\n+++ b/st2api/st2api/controllers/v1/aliasexecution.py\n@@ -143,6 +143,7 @@\n 'action_alias_ref': reference.get_ref_from_model(ac... |
gh_patches_debug_845 | rasdani/github-patches | git_diff | liqd__a4-meinberlin-4730 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
No "moderation tasks" filter in participatory budget (one phase)
**URL:** https://meinberlin-dev.liqd.net/projekte/module/burgerhaushalt/?mode=list (list view)
or https://meinberlin-dev.liqd.net/dashboard/pr... | diff --git a/meinberlin/apps/moderationtasks/dashboard.py b/meinberlin/apps/moderationtasks/dashboard.py
--- a/meinberlin/apps/moderationtasks/dashboard.py
+++ b/meinberlin/apps/moderationtasks/dashboard.py
@@ -17,7 +17,7 @@
'meinberlin_moderationtasks/moderation_tasks_form.html'
def is_effective(self, ... | {"golden_diff": "diff --git a/meinberlin/apps/moderationtasks/dashboard.py b/meinberlin/apps/moderationtasks/dashboard.py\n--- a/meinberlin/apps/moderationtasks/dashboard.py\n+++ b/meinberlin/apps/moderationtasks/dashboard.py\n@@ -17,7 +17,7 @@\n 'meinberlin_moderationtasks/moderation_tasks_form.html'\n \n ... |
gh_patches_debug_846 | rasdani/github-patches | git_diff | fedora-infra__bodhi-2512 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CLI forces user to pass --notes or --notes-file when --file is used
```fedpkg``` passes update notes via the update ini file, but the development version of Bodhi now requires ```--notes``` or ```--notes-file... | diff --git a/bodhi/client/__init__.py b/bodhi/client/__init__.py
--- a/bodhi/client/__init__.py
+++ b/bodhi/client/__init__.py
@@ -307,8 +307,8 @@
kwargs['notes'] = _get_notes(**kwargs)
- if not kwargs['notes']:
- click.echo("ERROR: must specify at least one of --notes, --notes-file")
+ if not kwa... | {"golden_diff": "diff --git a/bodhi/client/__init__.py b/bodhi/client/__init__.py\n--- a/bodhi/client/__init__.py\n+++ b/bodhi/client/__init__.py\n@@ -307,8 +307,8 @@\n \n kwargs['notes'] = _get_notes(**kwargs)\n \n- if not kwargs['notes']:\n- click.echo(\"ERROR: must specify at least one of --notes, --no... |
gh_patches_debug_847 | rasdani/github-patches | git_diff | kornia__kornia-1316 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Importing kornia causes `logging` to print to stderr?
### Describe the bug
I pip-installed the master version of kornia to access my latest PR and now my training scripts started to print all kinds of debug ... | diff --git a/kornia/x/trainer.py b/kornia/x/trainer.py
--- a/kornia/x/trainer.py
+++ b/kornia/x/trainer.py
@@ -15,9 +15,6 @@
from .metrics import AverageMeter
from .utils import Configuration, TrainerState
-logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
-
-
callbacks_whitelist = [
... | {"golden_diff": "diff --git a/kornia/x/trainer.py b/kornia/x/trainer.py\n--- a/kornia/x/trainer.py\n+++ b/kornia/x/trainer.py\n@@ -15,9 +15,6 @@\n from .metrics import AverageMeter\n from .utils import Configuration, TrainerState\n \n-logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)\n-\n-\n ... |
gh_patches_debug_848 | rasdani/github-patches | git_diff | hylang__hy-1886 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Empty form crashes compiler
An empty form will crash the compiler as shown below. One would think, that this wouldn't matter, but I accidentally left a `()` in a 300 line file and it was quite hard to catch. ... | diff --git a/hy/macros.py b/hy/macros.py
--- a/hy/macros.py
+++ b/hy/macros.py
@@ -308,10 +308,7 @@
assert not compiler or compiler.module == module
- while True:
-
- if not isinstance(tree, HyExpression) or tree == []:
- break
+ while isinstance(tree, HyExpression) and tree:
... | {"golden_diff": "diff --git a/hy/macros.py b/hy/macros.py\n--- a/hy/macros.py\n+++ b/hy/macros.py\n@@ -308,10 +308,7 @@\n \n assert not compiler or compiler.module == module\n \n- while True:\n-\n- if not isinstance(tree, HyExpression) or tree == []:\n- break\n+ while isinstance(tree, HyExpr... |
gh_patches_debug_849 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-contrib-348 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix readthedocs build
As discussed in 01/28/2021 SIG.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -124,8 +124,8 @@
if "anys" in mcfg:
anys = getlistcfg(mcfg["anys"])
- for any in anys:
- nitpick_ignore.append(("any", any,))
+ for _any in anys:
+ nitpick_ignore.append(("any", _any,))
# Add any paths that ... | {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -124,8 +124,8 @@\n \n if \"anys\" in mcfg:\n anys = getlistcfg(mcfg[\"anys\"])\n- for any in anys:\n- nitpick_ignore.append((\"any\", any,))\n+ for _any in anys:\n+ nitpick_ignore.append((\"any\... |
gh_patches_debug_850 | rasdani/github-patches | git_diff | spesmilo__electrum-1112 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hardcoded icon path in launcher for GNU/Linux systems
Hi,
currently the icon path specified in the created _.desktop_ launcher file is set to:
_Icon=/usr/share/app-install/icons/electrum.png_
(see https:/... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@
usr_share = os.path.join(sys.prefix, "share")
data_files += [
(os.path.join(usr_share, 'applications/'), ['electrum.desktop']),
- (os.path.join(usr_share, 'app-install', 'icons/'), ['icons/electrum.png'])
+ ... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -21,7 +21,7 @@\n usr_share = os.path.join(sys.prefix, \"share\")\n data_files += [\n (os.path.join(usr_share, 'applications/'), ['electrum.desktop']),\n- (os.path.join(usr_share, 'app-install', 'icons/'), ['icon... |
gh_patches_debug_851 | rasdani/github-patches | git_diff | rasterio__rasterio-926 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow type annotation support for rasterio data types
Recently I've been adding PEP 484 type annotations to my projects and rasterio has proved quite ugly to use as is, the main annoyance being that `rasterio... | diff --git a/rasterio/io.py b/rasterio/io.py
--- a/rasterio/io.py
+++ b/rasterio/io.py
@@ -9,7 +9,7 @@
import warnings
from rasterio._base import (
- get_dataset_driver, driver_can_create, driver_can_create_copy)
+ DatasetBase, get_dataset_driver, driver_can_create, driver_can_create_copy)
from rasterio._io ... | {"golden_diff": "diff --git a/rasterio/io.py b/rasterio/io.py\n--- a/rasterio/io.py\n+++ b/rasterio/io.py\n@@ -9,7 +9,7 @@\n import warnings\n \n from rasterio._base import (\n- get_dataset_driver, driver_can_create, driver_can_create_copy)\n+ DatasetBase, get_dataset_driver, driver_can_create, driver_can_create_... |
gh_patches_debug_852 | rasdani/github-patches | git_diff | wagtail__wagtail-6871 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Upstream change in django-treebeard 4.5 requires a new wagtail core migration
Default MP_Node depth has changed to 1.
https://github.com/django-treebeard/django-treebeard/commit/454be8f29ac2b4b4fbe6512357b... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
"Django>=2.2,<3.2",
"django-modelcluster>=5.1,<6.0",
"django-taggit>=1.0,<2.0",
- "django-treebeard>=4.2.0,<4.5",
+ "django-treebeard>=4.2.0,<5.0,!=4.5",
"djangorestframework>=3.11.1,<4.0",
"django-filter>=2.... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -23,7 +23,7 @@\n \"Django>=2.2,<3.2\",\n \"django-modelcluster>=5.1,<6.0\",\n \"django-taggit>=1.0,<2.0\",\n- \"django-treebeard>=4.2.0,<4.5\",\n+ \"django-treebeard>=4.2.0,<5.0,!=4.5\",\n \"djangorestframework>=... |
gh_patches_debug_853 | rasdani/github-patches | git_diff | pennersr__django-allauth-1144 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Foursquare Name
Hello the foursquare connect ist connecting fine but is displaying Foursquare as the connected name. How can i change that?
--- END ISSUE ---
Below are some code segments, each from a relev... | diff --git a/allauth/socialaccount/providers/foursquare/provider.py b/allauth/socialaccount/providers/foursquare/provider.py
--- a/allauth/socialaccount/providers/foursquare/provider.py
+++ b/allauth/socialaccount/providers/foursquare/provider.py
@@ -11,6 +11,10 @@
def get_avatar_url(self):
return self.ac... | {"golden_diff": "diff --git a/allauth/socialaccount/providers/foursquare/provider.py b/allauth/socialaccount/providers/foursquare/provider.py\n--- a/allauth/socialaccount/providers/foursquare/provider.py\n+++ b/allauth/socialaccount/providers/foursquare/provider.py\n@@ -11,6 +11,10 @@\n def get_avatar_url(self):\n ... |
gh_patches_debug_854 | rasdani/github-patches | git_diff | pre-commit__pre-commit-1497 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Stalls on hooks checkout
When trying to use some hook repositories I am getting hangs while fetching hooks. Tried pre-commit clean and rm -rf ~/.cache/pre-commit, but nothing changed. This is happening on bot... | diff --git a/pre_commit/git.py b/pre_commit/git.py
--- a/pre_commit/git.py
+++ b/pre_commit/git.py
@@ -158,7 +158,8 @@
remote = os.path.abspath(remote)
env = no_git_env()
- cmd_output_b('git', 'init', path, env=env)
+ # avoid the user's template so that hooks do not recurse
+ cmd_output_b('git'... | {"golden_diff": "diff --git a/pre_commit/git.py b/pre_commit/git.py\n--- a/pre_commit/git.py\n+++ b/pre_commit/git.py\n@@ -158,7 +158,8 @@\n remote = os.path.abspath(remote)\n \n env = no_git_env()\n- cmd_output_b('git', 'init', path, env=env)\n+ # avoid the user's template so that hooks do not recurs... |
gh_patches_debug_855 | rasdani/github-patches | git_diff | mdn__kuma-6595 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: address_zip on strip object
https://sentry.prod.mozaws.net/operations/mdn-prod/issues/7356686/
```
Resolver404: {'tried': [[<RegexURLPattern None ^media/(?:redesign/)?css/(?P<doc>.*)-min.css... | diff --git a/kuma/users/utils.py b/kuma/users/utils.py
--- a/kuma/users/utils.py
+++ b/kuma/users/utils.py
@@ -62,7 +62,8 @@
"brand": card.brand,
"expires_at": f"{card.exp_month}/{card.exp_year}",
"last4": card.last4,
- "zip": card.address_zip,
+ # Cards that... | {"golden_diff": "diff --git a/kuma/users/utils.py b/kuma/users/utils.py\n--- a/kuma/users/utils.py\n+++ b/kuma/users/utils.py\n@@ -62,7 +62,8 @@\n \"brand\": card.brand,\n \"expires_at\": f\"{card.exp_month}/{card.exp_year}\",\n \"last4\": card.last4,\n- \"zip\": card.addr... |
gh_patches_debug_856 | rasdani/github-patches | git_diff | pytest-dev__pytest-django-979 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
4.5.1: reset_sequences=True fails on MariaDB/MySQL
Firstly, thanks for maintaining such a powerful and useful testing library for Django.
On to the bug:
- OS: Windows 10
- Python: 3.9.1
- pytest-6.2.5... | diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py
--- a/pytest_django/fixtures.py
+++ b/pytest_django/fixtures.py
@@ -167,7 +167,7 @@
serialized_rollback,
) = False, False, None, False
- transactional = transactional or (
+ transactional = transactional or reset_sequences ... | {"golden_diff": "diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py\n--- a/pytest_django/fixtures.py\n+++ b/pytest_django/fixtures.py\n@@ -167,7 +167,7 @@\n serialized_rollback,\n ) = False, False, None, False\n \n- transactional = transactional or (\n+ transactional = transact... |
gh_patches_debug_857 | rasdani/github-patches | git_diff | pypa__virtualenv-1941 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Multiple processes competition on read/write update log
**Issue**
https://github.com/pypa/virtualenv/blob/0cd009b5a1338f66397f71c85a75f576a2f3eabf/src/virtualenv/app_data/via_disk_folder.py#L129-L141
Wh... | diff --git a/src/virtualenv/app_data/via_disk_folder.py b/src/virtualenv/app_data/via_disk_folder.py
--- a/src/virtualenv/app_data/via_disk_folder.py
+++ b/src/virtualenv/app_data/via_disk_folder.py
@@ -137,7 +137,10 @@
except Exception: # noqa
pass
if bad_format:
- self.remov... | {"golden_diff": "diff --git a/src/virtualenv/app_data/via_disk_folder.py b/src/virtualenv/app_data/via_disk_folder.py\n--- a/src/virtualenv/app_data/via_disk_folder.py\n+++ b/src/virtualenv/app_data/via_disk_folder.py\n@@ -137,7 +137,10 @@\n except Exception: # noqa\n pass\n if bad_format:\... |
gh_patches_debug_858 | rasdani/github-patches | git_diff | secdev__scapy-3016 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong message type for SOME/IP transport protocol responses
<!--
Things to consider
1. Please check that you are using the latest scapy version, e.g. installed via:
`pip install --upgrade git+git:... | diff --git a/scapy/contrib/automotive/someip.py b/scapy/contrib/automotive/someip.py
--- a/scapy/contrib/automotive/someip.py
+++ b/scapy/contrib/automotive/someip.py
@@ -64,8 +64,8 @@
TYPE_TP_REQUEST = 0x20
TYPE_TP_REQUEST_NO_RET = 0x21
TYPE_TP_NOTIFICATION = 0x22
- TYPE_TP_RESPONSE = 0x23
- TYPE_... | {"golden_diff": "diff --git a/scapy/contrib/automotive/someip.py b/scapy/contrib/automotive/someip.py\n--- a/scapy/contrib/automotive/someip.py\n+++ b/scapy/contrib/automotive/someip.py\n@@ -64,8 +64,8 @@\n TYPE_TP_REQUEST = 0x20\n TYPE_TP_REQUEST_NO_RET = 0x21\n TYPE_TP_NOTIFICATION = 0x22\n- TYPE_TP_RE... |
gh_patches_debug_859 | rasdani/github-patches | git_diff | pallets__click-2158 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to allow empty str in prompt when confirmation_prompt=True
When you use the `click.prompt()` method and you specify `confirmation_prompt=True`, there is no way to allow the user to just hit ENTER (empt... | diff --git a/src/click/termui.py b/src/click/termui.py
--- a/src/click/termui.py
+++ b/src/click/termui.py
@@ -181,7 +181,8 @@
return result
while True:
value2 = prompt_func(confirmation_prompt)
- if value2:
+ is_empty = not value and not value2
+ if v... | {"golden_diff": "diff --git a/src/click/termui.py b/src/click/termui.py\n--- a/src/click/termui.py\n+++ b/src/click/termui.py\n@@ -181,7 +181,8 @@\n return result\n while True:\n value2 = prompt_func(confirmation_prompt)\n- if value2:\n+ is_empty = not value and not... |
gh_patches_debug_860 | rasdani/github-patches | git_diff | frappe__frappe-15449 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pymysql.err.ProgrammingError: ('DocType', 'Webhook')
```
> bench --site all migrate --skip-failing
...
Migrating my-site
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 1... | diff --git a/frappe/integrations/doctype/webhook/__init__.py b/frappe/integrations/doctype/webhook/__init__.py
--- a/frappe/integrations/doctype/webhook/__init__.py
+++ b/frappe/integrations/doctype/webhook/__init__.py
@@ -7,7 +7,7 @@
def run_webhooks(doc, method):
'''Run webhooks for this method'''
- if frappe.fl... | {"golden_diff": "diff --git a/frappe/integrations/doctype/webhook/__init__.py b/frappe/integrations/doctype/webhook/__init__.py\n--- a/frappe/integrations/doctype/webhook/__init__.py\n+++ b/frappe/integrations/doctype/webhook/__init__.py\n@@ -7,7 +7,7 @@\n \n def run_webhooks(doc, method):\n \t'''Run webhooks for this ... |
gh_patches_debug_861 | rasdani/github-patches | git_diff | conan-io__conan-4380 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Virtualenv generator prepends duplicated values in env vars from profile
With a *conanfile.txt* empty and a profile with:
```
[env]
PREPEND_VAR = ['kk','pp']
```
Commands:
```
$ conan install . -... | diff --git a/conans/client/loader.py b/conans/client/loader.py
--- a/conans/client/loader.py
+++ b/conans/client/loader.py
@@ -174,7 +174,6 @@
# imports method
conanfile.imports = parser.imports_method(conanfile)
- conanfile._conan_env_values.update(processed_profile._env_values)
ret... | {"golden_diff": "diff --git a/conans/client/loader.py b/conans/client/loader.py\n--- a/conans/client/loader.py\n+++ b/conans/client/loader.py\n@@ -174,7 +174,6 @@\n \n # imports method\n conanfile.imports = parser.imports_method(conanfile)\n- conanfile._conan_env_values.update(processed_profile._... |
gh_patches_debug_862 | rasdani/github-patches | git_diff | adamchainz__django-perf-rec-22 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update setup.py to stop installing `tests` in `site-packages`
Actually when installing your (amazing, thanks a lot!!) lib via pip, twho packages are installed and visible in `site-packages`:
- `django_perf_r... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,7 @@
author='YPlan',
author_email='adam@yplanapp.com',
url='https://github.com/YPlan/django-perf-rec',
- packages=find_packages(exclude=['test', 'test.*']),
+ packages=find_packages(exclude=['tests', 'tests.*']),
inclu... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -56,7 +56,7 @@\n author='YPlan',\n author_email='adam@yplanapp.com',\n url='https://github.com/YPlan/django-perf-rec',\n- packages=find_packages(exclude=['test', 'test.*']),\n+ packages=find_packages(exclude=['tests'... |
gh_patches_debug_863 | rasdani/github-patches | git_diff | kivy__python-for-android-575 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
HTTP 302 recipe download file
Downloading from sourceforge autoselecting an mirror results in a HTTP 302 instead of a direct download.
Trying to build this clean recipe below results in:
```
RAN: '/bin/tar x... | diff --git a/pythonforandroid/util.py b/pythonforandroid/util.py
--- a/pythonforandroid/util.py
+++ b/pythonforandroid/util.py
@@ -21,12 +21,10 @@
unistr = unicode
-class ChromeDownloader(FancyURLopener):
- version = (
- 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 '
- '(KHTML, like Gec... | {"golden_diff": "diff --git a/pythonforandroid/util.py b/pythonforandroid/util.py\n--- a/pythonforandroid/util.py\n+++ b/pythonforandroid/util.py\n@@ -21,12 +21,10 @@\n unistr = unicode\n \n \n-class ChromeDownloader(FancyURLopener):\n- version = (\n- 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 '\... |
gh_patches_debug_864 | rasdani/github-patches | git_diff | zulip__zulip-27417 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Document option to paste URL to create a named link
We should document the new functionality in #18692.
I would add a "Via paste" tab to https://zulip.com/help/insert-a-link#insert-a-link_1, probably as th... | diff --git a/zerver/lib/markdown/tabbed_sections.py b/zerver/lib/markdown/tabbed_sections.py
--- a/zerver/lib/markdown/tabbed_sections.py
+++ b/zerver/lib/markdown/tabbed_sections.py
@@ -98,6 +98,7 @@
"user": "User",
"bot": "Bot",
"on-sign-up": "On sign-up",
+ "via-paste": "Via paste",
"via-markd... | {"golden_diff": "diff --git a/zerver/lib/markdown/tabbed_sections.py b/zerver/lib/markdown/tabbed_sections.py\n--- a/zerver/lib/markdown/tabbed_sections.py\n+++ b/zerver/lib/markdown/tabbed_sections.py\n@@ -98,6 +98,7 @@\n \"user\": \"User\",\n \"bot\": \"Bot\",\n \"on-sign-up\": \"On sign-up\",\n+ \"via... |
gh_patches_debug_865 | rasdani/github-patches | git_diff | mampfes__hacs_waste_collection_schedule-911 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
(Berliner Stadtreinigung) BSR not working
Hi there, since about a day or two BSR integration isn't pulling data into HA.
Any idea what might be wrong? Just FYI the data from abfall.io (ALBA Berlin) is worki... | diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/bsr_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/bsr_de.py
--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/bsr_de.py
+++ b/custom_components/waste_collecti... | {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/bsr_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/bsr_de.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/bsr_de.py\n+++ b/custom_compon... |
gh_patches_debug_866 | rasdani/github-patches | git_diff | zalando__patroni-468 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: 'KazooClient' object has no attribute '_retry'
Using `patronictl` to pause the cluster management, a configuration reload is triggered on nodes leading to the following exception with ZooKeepe... | diff --git a/patroni/dcs/zookeeper.py b/patroni/dcs/zookeeper.py
--- a/patroni/dcs/zookeeper.py
+++ b/patroni/dcs/zookeeper.py
@@ -116,7 +116,8 @@
return True
def set_retry_timeout(self, retry_timeout):
- self._client._retry.deadline = retry_timeout
+ retry = self._client.retry if isin... | {"golden_diff": "diff --git a/patroni/dcs/zookeeper.py b/patroni/dcs/zookeeper.py\n--- a/patroni/dcs/zookeeper.py\n+++ b/patroni/dcs/zookeeper.py\n@@ -116,7 +116,8 @@\n return True\n \n def set_retry_timeout(self, retry_timeout):\n- self._client._retry.deadline = retry_timeout\n+ retry = s... |
gh_patches_debug_867 | rasdani/github-patches | git_diff | scoutapp__scout_apm_python-433 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Don't crash the socket for unrecognized responses
Before #400 when testing against the core agent I discovered the python agent crashes when the core agent doesn't return the expected response, like:
```
... | diff --git a/src/scout_apm/core/socket.py b/src/scout_apm/core/socket.py
--- a/src/scout_apm/core/socket.py
+++ b/src/scout_apm/core/socket.py
@@ -179,6 +179,9 @@
def _read_response(self):
try:
raw_size = self.socket.recv(4)
+ if len(raw_size) != 4:
+ # Ignore invali... | {"golden_diff": "diff --git a/src/scout_apm/core/socket.py b/src/scout_apm/core/socket.py\n--- a/src/scout_apm/core/socket.py\n+++ b/src/scout_apm/core/socket.py\n@@ -179,6 +179,9 @@\n def _read_response(self):\n try:\n raw_size = self.socket.recv(4)\n+ if len(raw_size) != 4:\n+ ... |
gh_patches_debug_868 | rasdani/github-patches | git_diff | quantopian__zipline-1707 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
latest tutorial.ipynb has non working examples
Dear Zipline Maintainers,
Before I tell you about my issue, let me describe my environment:
# Environment
- Operating System: (MAC OS X El Capitan`)
- Python V... | diff --git a/zipline/examples/buyapple.py b/zipline/examples/buyapple.py
--- a/zipline/examples/buyapple.py
+++ b/zipline/examples/buyapple.py
@@ -18,12 +18,12 @@
def initialize(context):
- pass
+ context.asset = symbol('AAPL')
def handle_data(context, data):
- order(symbol('AAPL'), 10)
- record(A... | {"golden_diff": "diff --git a/zipline/examples/buyapple.py b/zipline/examples/buyapple.py\n--- a/zipline/examples/buyapple.py\n+++ b/zipline/examples/buyapple.py\n@@ -18,12 +18,12 @@\n \n \n def initialize(context):\n- pass\n+ context.asset = symbol('AAPL')\n \n \n def handle_data(context, data):\n- order(symb... |
gh_patches_debug_869 | rasdani/github-patches | git_diff | celery__kombu-400 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Django Kombu app conflicts with Django app with Django 1.7
``` python
Traceback (most recent call last):
File "manage.py", line 13, in <module>
execute_from_command_line(sys.argv)
File "/.../.env/lib/... | diff --git a/kombu/transport/django/__init__.py b/kombu/transport/django/__init__.py
--- a/kombu/transport/django/__init__.py
+++ b/kombu/transport/django/__init__.py
@@ -18,7 +18,7 @@
pass
else:
class KombuAppConfig(AppConfig):
- name = __name__
+ name = 'kombu.transport.django'
label... | {"golden_diff": "diff --git a/kombu/transport/django/__init__.py b/kombu/transport/django/__init__.py\n--- a/kombu/transport/django/__init__.py\n+++ b/kombu/transport/django/__init__.py\n@@ -18,7 +18,7 @@\n pass\n else:\n class KombuAppConfig(AppConfig):\n- name = __name__\n+ name = 'kombu.transpo... |
gh_patches_debug_870 | rasdani/github-patches | git_diff | SciTools__cartopy-1745 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing .prj for NaturalEarth data
### Description
With the current default downloader from ``cartopy``, not all elements from the NaturalEarth zip container are extracted.
Currently, [only shp, dbf, and ... | diff --git a/lib/cartopy/io/shapereader.py b/lib/cartopy/io/shapereader.py
--- a/lib/cartopy/io/shapereader.py
+++ b/lib/cartopy/io/shapereader.py
@@ -316,7 +316,7 @@
natural earth zip file.
"""
- for ext in ['.shp', '.dbf', '.shx']:
+ for ext in ['.shp', '.dbf', '.shx', '.prj', '.cpg'... | {"golden_diff": "diff --git a/lib/cartopy/io/shapereader.py b/lib/cartopy/io/shapereader.py\n--- a/lib/cartopy/io/shapereader.py\n+++ b/lib/cartopy/io/shapereader.py\n@@ -316,7 +316,7 @@\n natural earth zip file.\n \n \"\"\"\n- for ext in ['.shp', '.dbf', '.shx']:\n+ for ext in ['.shp', '.... |
gh_patches_debug_871 | rasdani/github-patches | git_diff | google-research__text-to-text-transfer-transformer-327 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Issue Running T5 in colab TPU
Hi Team,
I was trying to do a pre training of T5 from scratch on colab. I could see if i install t5 using (pip install t5[gcp]), and tried to connect to execute ` tf.tpu.expe... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,7 @@
'scipy',
'sentencepiece',
'six>=1.14', # TODO(adarob): Remove once rouge-score is updated.
- 'tensorflow-text<2.3', # TODO(adarob): Unpin once #320 is resolved.
+ 'tensorflow-text',
'tfds... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -56,7 +56,7 @@\n 'scipy',\n 'sentencepiece',\n 'six>=1.14', # TODO(adarob): Remove once rouge-score is updated.\n- 'tensorflow-text<2.3', # TODO(adarob): Unpin once #320 is resolved.\n+ 'tensorf... |
gh_patches_debug_872 | rasdani/github-patches | git_diff | getsentry__sentry-python-296 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tornado integration does not capture formdata
There is no obvious way to get just formdata from Tornado's request object (not mixed with other request params), but I haven't done a lot of research on that.
-... | diff --git a/sentry_sdk/integrations/tornado.py b/sentry_sdk/integrations/tornado.py
--- a/sentry_sdk/integrations/tornado.py
+++ b/sentry_sdk/integrations/tornado.py
@@ -173,8 +173,10 @@
def form(self):
# type: () -> Optional[Any]
- # TODO: Where to get formdata and nothing else?
- return... | {"golden_diff": "diff --git a/sentry_sdk/integrations/tornado.py b/sentry_sdk/integrations/tornado.py\n--- a/sentry_sdk/integrations/tornado.py\n+++ b/sentry_sdk/integrations/tornado.py\n@@ -173,8 +173,10 @@\n \n def form(self):\n # type: () -> Optional[Any]\n- # TODO: Where to get formdata and nothi... |
gh_patches_debug_873 | rasdani/github-patches | git_diff | vyperlang__vyper-293 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Need a .travis.yml file to properly run travis tests
^
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setu... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@
license=license,
packages=find_packages(exclude=('tests', 'docs')),
install_requires=[
- 'ethereum == 1.3.7',
+ 'ethereum==2.0.4',
'serpent',
'pytest-cov',
'pytest-runner', # Must be ... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -20,7 +20,7 @@\n license=license,\n packages=find_packages(exclude=('tests', 'docs')),\n install_requires=[\n- 'ethereum == 1.3.7',\n+ 'ethereum==2.0.4',\n 'serpent',\n 'pytest-cov',\n ... |
gh_patches_debug_874 | rasdani/github-patches | git_diff | qutebrowser__qutebrowser-4743 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Launching keyhint widget causes 100% usage of one CPU core
That's how it was for as long as I can remember, reproducible with all of my hardware (pressing _g_ or _;_ is enough). I don't think that's an intend... | diff --git a/qutebrowser/misc/keyhintwidget.py b/qutebrowser/misc/keyhintwidget.py
--- a/qutebrowser/misc/keyhintwidget.py
+++ b/qutebrowser/misc/keyhintwidget.py
@@ -71,6 +71,7 @@
self.hide()
self._show_timer = usertypes.Timer(self, 'keyhint_show')
self._show_timer.timeout.connect(self.show)... | {"golden_diff": "diff --git a/qutebrowser/misc/keyhintwidget.py b/qutebrowser/misc/keyhintwidget.py\n--- a/qutebrowser/misc/keyhintwidget.py\n+++ b/qutebrowser/misc/keyhintwidget.py\n@@ -71,6 +71,7 @@\n self.hide()\n self._show_timer = usertypes.Timer(self, 'keyhint_show')\n self._show_timer.tim... |
gh_patches_debug_875 | rasdani/github-patches | git_diff | hedyorg__hedy-962 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
It seems the server broken.
<img width="560" src="https://user-images.githubusercontent.com/12047524/136717701-3f93c7e7-45be-4fc2-9130-23407f3838b4.png">
--- END ISSUE ---
Below are some code segments, ea... | diff --git a/app.py b/app.py
--- a/app.py
+++ b/app.py
@@ -74,7 +74,9 @@
def load_adventures_in_all_languages():
adventures = {}
for lang in ALL_LANGUAGES.keys ():
- adventures[lang] = YamlFile.for_file(f'coursedata/adventures/{lang}.yaml')
+ filename = f'coursedata/adventures/{lang}.yaml'
+ ... | {"golden_diff": "diff --git a/app.py b/app.py\n--- a/app.py\n+++ b/app.py\n@@ -74,7 +74,9 @@\n def load_adventures_in_all_languages():\n adventures = {}\n for lang in ALL_LANGUAGES.keys ():\n- adventures[lang] = YamlFile.for_file(f'coursedata/adventures/{lang}.yaml')\n+ filename = f'coursedata/adv... |
gh_patches_debug_876 | rasdani/github-patches | git_diff | pwndbg__pwndbg-80 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
source code section unavailable if current line is in the first chunk of the list command
when debugging through code and the current function is indeed one that it at the top of a .c file (that does not use ... | diff --git a/pwndbg/commands/context.py b/pwndbg/commands/context.py
--- a/pwndbg/commands/context.py
+++ b/pwndbg/commands/context.py
@@ -157,7 +157,7 @@
# If it starts on line 1, it's not really using the
# correct source code.
- if not source or source.startswith('1\t'):
+ if not so... | {"golden_diff": "diff --git a/pwndbg/commands/context.py b/pwndbg/commands/context.py\n--- a/pwndbg/commands/context.py\n+++ b/pwndbg/commands/context.py\n@@ -157,7 +157,7 @@\n \n # If it starts on line 1, it's not really using the\n # correct source code.\n- if not source or source.startswith('1... |
gh_patches_debug_877 | rasdani/github-patches | git_diff | saleor__saleor-4062 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The voucher form doesn't show selected products
### Steps to reproduce the problem
1. Open Voucher form.
2. Set Discount type to specific product.
3. Choose the products you want.
4. Create the voucher.
... | diff --git a/saleor/dashboard/discount/forms.py b/saleor/dashboard/discount/forms.py
--- a/saleor/dashboard/discount/forms.py
+++ b/saleor/dashboard/discount/forms.py
@@ -173,6 +173,11 @@
model = Voucher
fields = ['products', 'apply_once_per_order']
+ def __init__(self, *args, **kwargs):
+ ... | {"golden_diff": "diff --git a/saleor/dashboard/discount/forms.py b/saleor/dashboard/discount/forms.py\n--- a/saleor/dashboard/discount/forms.py\n+++ b/saleor/dashboard/discount/forms.py\n@@ -173,6 +173,11 @@\n model = Voucher\n fields = ['products', 'apply_once_per_order']\n \n+ def __init__(self, *a... |
gh_patches_debug_878 | rasdani/github-patches | git_diff | scrapy__scrapy-2649 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
After adding request flags subclasses of logformatter that rely on 'flags' format string are broken
#2082 added flags to request but it also renamed formatting string key from flags to response_flags/request_... | diff --git a/scrapy/logformatter.py b/scrapy/logformatter.py
--- a/scrapy/logformatter.py
+++ b/scrapy/logformatter.py
@@ -43,6 +43,8 @@
'request_flags' : request_flags,
'referer': referer_str(request),
'response_flags': response_flags,
+ # backward comp... | {"golden_diff": "diff --git a/scrapy/logformatter.py b/scrapy/logformatter.py\n--- a/scrapy/logformatter.py\n+++ b/scrapy/logformatter.py\n@@ -43,6 +43,8 @@\n 'request_flags' : request_flags,\n 'referer': referer_str(request),\n 'response_flags': response_flags,\n+ ... |
gh_patches_debug_879 | rasdani/github-patches | git_diff | AUTOMATIC1111__stable-diffusion-webui-881 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Generate button doesn't change to Interrupt button when "show progressbar" is disabled in settings.
**Describe the bug**
With "show progressbar" off in settings, the Generate button doesn't change when gener... | diff --git a/modules/ui.py b/modules/ui.py
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -200,7 +200,7 @@
else:
preview_visibility = gr_show(True)
- return f"<span style='display: none'>{time.time()}</span><p>{progressbar}</p>", preview_visibility, image
+ return f"<span id='progressSpan'... | {"golden_diff": "diff --git a/modules/ui.py b/modules/ui.py\n--- a/modules/ui.py\n+++ b/modules/ui.py\n@@ -200,7 +200,7 @@\n else:\r\n preview_visibility = gr_show(True)\r\n \r\n- return f\"<span style='display: none'>{time.time()}</span><p>{progressbar}</p>\", preview_visibility, image\r\n+ r... |
gh_patches_debug_880 | rasdani/github-patches | git_diff | learningequality__kolibri-7685 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Delete channel or resources task fails when attempting to release an expired Redis lock
### Observed behavior
Both `Delete channel` and `Manage > Delete (all) resources` for that same channel are failing. ... | diff --git a/kolibri/core/utils/cache.py b/kolibri/core/utils/cache.py
--- a/kolibri/core/utils/cache.py
+++ b/kolibri/core/utils/cache.py
@@ -61,7 +61,12 @@
self._lock.acquire()
def release(self):
- self._lock.release()
+ try:
+ self._lock.release()
+ except AssertionErr... | {"golden_diff": "diff --git a/kolibri/core/utils/cache.py b/kolibri/core/utils/cache.py\n--- a/kolibri/core/utils/cache.py\n+++ b/kolibri/core/utils/cache.py\n@@ -61,7 +61,12 @@\n self._lock.acquire()\n \n def release(self):\n- self._lock.release()\n+ try:\n+ self._lock.release()\n+... |
gh_patches_debug_881 | rasdani/github-patches | git_diff | tiangolo__fastapi-493 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
FastAPI exceptions module mistakenly references the 'requests' package
**Describe the bug**
Starting up a FastAPI 0.38.0 app displays the following error:
```python
from fastapi import FastAPI
File ".... | diff --git a/fastapi/exceptions.py b/fastapi/exceptions.py
--- a/fastapi/exceptions.py
+++ b/fastapi/exceptions.py
@@ -2,8 +2,8 @@
from pydantic import ValidationError
from pydantic.error_wrappers import ErrorList
-from requests import Request
from starlette.exceptions import HTTPException as StarletteHTTPExceptio... | {"golden_diff": "diff --git a/fastapi/exceptions.py b/fastapi/exceptions.py\n--- a/fastapi/exceptions.py\n+++ b/fastapi/exceptions.py\n@@ -2,8 +2,8 @@\n \n from pydantic import ValidationError\n from pydantic.error_wrappers import ErrorList\n-from requests import Request\n from starlette.exceptions import HTTPException... |
gh_patches_debug_882 | rasdani/github-patches | git_diff | plone__Products.CMFPlone-3361 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Index location doesn't work for Dexterity content
## BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)
### What I did:
- I created a Dexterity type with the `location` field.
- I created a `location` index ... | diff --git a/Products/CMFPlone/CatalogTool.py b/Products/CMFPlone/CatalogTool.py
--- a/Products/CMFPlone/CatalogTool.py
+++ b/Products/CMFPlone/CatalogTool.py
@@ -255,11 +255,6 @@
return aq_base(obj).getPrimaryField().getContentType(obj)
-@indexer(Interface)
-def location(obj):
- return obj.getField('locati... | {"golden_diff": "diff --git a/Products/CMFPlone/CatalogTool.py b/Products/CMFPlone/CatalogTool.py\n--- a/Products/CMFPlone/CatalogTool.py\n+++ b/Products/CMFPlone/CatalogTool.py\n@@ -255,11 +255,6 @@\n return aq_base(obj).getPrimaryField().getContentType(obj)\n \n \n-@indexer(Interface)\n-def location(obj):\n- r... |
gh_patches_debug_883 | rasdani/github-patches | git_diff | kartoza__prj.app-293 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
We need to support animated GIF's
Using licecap or silentcast it is easy to make animated GIF's. When images are uploaded to django though they are resized and converted to PNG. We need to update the logic so... | diff --git a/django_project/base/templatetags/custom_markup.py b/django_project/base/templatetags/custom_markup.py
--- a/django_project/base/templatetags/custom_markup.py
+++ b/django_project/base/templatetags/custom_markup.py
@@ -16,3 +16,9 @@
extensions,
... | {"golden_diff": "diff --git a/django_project/base/templatetags/custom_markup.py b/django_project/base/templatetags/custom_markup.py\n--- a/django_project/base/templatetags/custom_markup.py\n+++ b/django_project/base/templatetags/custom_markup.py\n@@ -16,3 +16,9 @@\n extensions,\n ... |
gh_patches_debug_884 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-7566 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[CT-2552] Pin protobuf to greater than 4.0
Some users were seeing an error:
> ImportError: cannot import name 'builder' from 'google.protobuf.internal'.
The generated types_pb2.py file was built with prot... | diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -63,7 +63,7 @@
"typing-extensions>=3.7.4",
"werkzeug>=1,<3",
"pathspec>=0.9,<0.12",
- "protobuf>=3.18.3",
+ "protobuf>=4.0.0",
"pytz>=2015.7",
# the following are all to match... | {"golden_diff": "diff --git a/core/setup.py b/core/setup.py\n--- a/core/setup.py\n+++ b/core/setup.py\n@@ -63,7 +63,7 @@\n \"typing-extensions>=3.7.4\",\n \"werkzeug>=1,<3\",\n \"pathspec>=0.9,<0.12\",\n- \"protobuf>=3.18.3\",\n+ \"protobuf>=4.0.0\",\n \"pytz>=2015.7\",\n ... |
gh_patches_debug_885 | rasdani/github-patches | git_diff | zestedesavoir__zds-site-3325 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[beta][v16][rc1] Les contenus extra (pdf, epub, etc.) ne sont pas générés lors de la 2nde validation
Version 16 RC1.
Scénario de test :
- Je publie un tutoriel pris en zone de validation (J'ai pris celui su... | diff --git a/zds/tutorialv2/management/commands/publication_watchdog.py b/zds/tutorialv2/management/commands/publication_watchdog.py
--- a/zds/tutorialv2/management/commands/publication_watchdog.py
+++ b/zds/tutorialv2/management/commands/publication_watchdog.py
@@ -30,7 +30,7 @@
except Exception:
... | {"golden_diff": "diff --git a/zds/tutorialv2/management/commands/publication_watchdog.py b/zds/tutorialv2/management/commands/publication_watchdog.py\n--- a/zds/tutorialv2/management/commands/publication_watchdog.py\n+++ b/zds/tutorialv2/management/commands/publication_watchdog.py\n@@ -30,7 +30,7 @@\n excep... |
gh_patches_debug_886 | rasdani/github-patches | git_diff | fidals__shopelectro-291 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Добавь артикул в карту товара
В мобильной версии сайта, рядом с заголовком товара, не отображается артикул. Как в веб версии. Добавьте такой же элемент.
--- END ISSUE ---
Below are some code segments, each... | diff --git a/shopelectro/admin.py b/shopelectro/admin.py
--- a/shopelectro/admin.py
+++ b/shopelectro/admin.py
@@ -103,7 +103,7 @@
fieldsets = ((None, {
'classes': ('primary-chars', ),
'fields': (
- ('name', 'id'),
+ ('name', 'id', 'vendor_code'),
('category', '... | {"golden_diff": "diff --git a/shopelectro/admin.py b/shopelectro/admin.py\n--- a/shopelectro/admin.py\n+++ b/shopelectro/admin.py\n@@ -103,7 +103,7 @@\n fieldsets = ((None, {\n 'classes': ('primary-chars', ),\n 'fields': (\n- ('name', 'id'),\n+ ('name', 'id', 'vendor_code'),\n ... |
gh_patches_debug_887 | rasdani/github-patches | git_diff | mlflow__mlflow-10877 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Git version not logged when executable in current path.
### Issues Policy acknowledgement
- [X] I have read and agree to submit bug reports in accordance with the [issues policy](https://www.github.c... | diff --git a/mlflow/utils/git_utils.py b/mlflow/utils/git_utils.py
--- a/mlflow/utils/git_utils.py
+++ b/mlflow/utils/git_utils.py
@@ -44,7 +44,7 @@
return None
try:
if os.path.isfile(path):
- path = os.path.dirname(path)
+ path = os.path.dirname(os.path.abspath(path))
... | {"golden_diff": "diff --git a/mlflow/utils/git_utils.py b/mlflow/utils/git_utils.py\n--- a/mlflow/utils/git_utils.py\n+++ b/mlflow/utils/git_utils.py\n@@ -44,7 +44,7 @@\n return None\n try:\n if os.path.isfile(path):\n- path = os.path.dirname(path)\n+ path = os.path.dirname(os.... |
gh_patches_debug_888 | rasdani/github-patches | git_diff | quantumlib__Cirq-2374 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cirq should ship a py.typed file
[PEP 561](https://www.python.org/dev/peps/pep-0561/) says that any packages that ship with type information should have a py.typed file in their package. Otherwise, type check... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -70,6 +70,7 @@
long_description=long_description,
packages=cirq_packages,
package_data={
+ 'cirq': ['py.typed'],
'cirq.api.google.v1': ['*.proto'],
'cirq.api.google.v2': ['*.proto'],
'cirq.go... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -70,6 +70,7 @@\n long_description=long_description,\n packages=cirq_packages,\n package_data={\n+ 'cirq': ['py.typed'],\n 'cirq.api.google.v1': ['*.proto'],\n 'cirq.api.google.v2': ['*.pr... |
gh_patches_debug_889 | rasdani/github-patches | git_diff | TheAlgorithms__Python-564 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unnecessary Loop
https://github.com/TheAlgorithms/Python/blob/4e0184a41dd3e4838da484057d25e17234353da0/dynamic_programming/matrix_chain_order.py#L12-L15
`Line 12` creates a NxN Matrix that **contains 0**.... | diff --git a/dynamic_programming/matrix_chain_order.py b/dynamic_programming/matrix_chain_order.py
--- a/dynamic_programming/matrix_chain_order.py
+++ b/dynamic_programming/matrix_chain_order.py
@@ -11,8 +11,6 @@
N=len(array)
Matrix=[[0 for x in range(N)] for x in range(N)]
Sol=[[0 for x in range(N)] for... | {"golden_diff": "diff --git a/dynamic_programming/matrix_chain_order.py b/dynamic_programming/matrix_chain_order.py\n--- a/dynamic_programming/matrix_chain_order.py\n+++ b/dynamic_programming/matrix_chain_order.py\n@@ -11,8 +11,6 @@\n N=len(array)\n Matrix=[[0 for x in range(N)] for x in range(N)]\n Sol=[[0... |
gh_patches_debug_890 | rasdani/github-patches | git_diff | tobymao__sqlglot-2619 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DuckDB bracket operator is 1-indexed
**Before you file an issue**
- Make sure you specify the "read" dialect eg. parse_one(sql, read="spark") Bigquery, for example
- Check if the issue still exists on main ... | diff --git a/sqlglot/dialects/duckdb.py b/sqlglot/dialects/duckdb.py
--- a/sqlglot/dialects/duckdb.py
+++ b/sqlglot/dialects/duckdb.py
@@ -127,6 +127,7 @@
NULL_ORDERING = "nulls_are_last"
SUPPORTS_USER_DEFINED_TYPES = False
SAFE_DIVISION = True
+ INDEX_OFFSET = 1
# https://duckdb.org/docs/sql/i... | {"golden_diff": "diff --git a/sqlglot/dialects/duckdb.py b/sqlglot/dialects/duckdb.py\n--- a/sqlglot/dialects/duckdb.py\n+++ b/sqlglot/dialects/duckdb.py\n@@ -127,6 +127,7 @@\n NULL_ORDERING = \"nulls_are_last\"\n SUPPORTS_USER_DEFINED_TYPES = False\n SAFE_DIVISION = True\n+ INDEX_OFFSET = 1\n \n # h... |
gh_patches_debug_891 | rasdani/github-patches | git_diff | ipython__ipython-7492 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
nbformat v2 notebook with missing 'stream' key in stream outputs
@stefanv just sent me an nbformat 2 notebook which was missing the 'stream' keys in stream outputs, and failed to open in current master becaus... | diff --git a/IPython/nbformat/v4/convert.py b/IPython/nbformat/v4/convert.py
--- a/IPython/nbformat/v4/convert.py
+++ b/IPython/nbformat/v4/convert.py
@@ -186,7 +186,7 @@
elif output['output_type'] == 'pyerr':
output['output_type'] = 'error'
elif output['output_type'] == 'stream':
- output['na... | {"golden_diff": "diff --git a/IPython/nbformat/v4/convert.py b/IPython/nbformat/v4/convert.py\n--- a/IPython/nbformat/v4/convert.py\n+++ b/IPython/nbformat/v4/convert.py\n@@ -186,7 +186,7 @@\n elif output['output_type'] == 'pyerr':\n output['output_type'] = 'error'\n elif output['output_type'] == 'strea... |
gh_patches_debug_892 | rasdani/github-patches | git_diff | coala__coala-4215 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support neovim (`nvim`) as an editor
```
[WARNING][14:15:54] The editor "nvim" is unknown to coala. Files won't be opened at the correct positions and other quirks might occur. Consider opening an issue at h... | diff --git a/coalib/results/result_actions/OpenEditorAction.py b/coalib/results/result_actions/OpenEditorAction.py
--- a/coalib/results/result_actions/OpenEditorAction.py
+++ b/coalib/results/result_actions/OpenEditorAction.py
@@ -39,6 +39,10 @@
'file_arg_template': '{filename} +{line}',
'gui': False
... | {"golden_diff": "diff --git a/coalib/results/result_actions/OpenEditorAction.py b/coalib/results/result_actions/OpenEditorAction.py\n--- a/coalib/results/result_actions/OpenEditorAction.py\n+++ b/coalib/results/result_actions/OpenEditorAction.py\n@@ -39,6 +39,10 @@\n 'file_arg_template': '{filename} +{line}',\n... |
gh_patches_debug_893 | rasdani/github-patches | git_diff | redis__redis-py-1253 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix simple typo: recurrsion -> recursion
There is a small typo in redis/connection.py.
Should read recursion rather than recurrsion.
--- END ISSUE ---
Below are some code segments, each from a relevant fi... | diff --git a/redis/connection.py b/redis/connection.py
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -656,7 +656,7 @@
"Send an already packed command to the Redis server"
if not self._sock:
self.connect()
- # guard against health check recurrsion
+ # guard against h... | {"golden_diff": "diff --git a/redis/connection.py b/redis/connection.py\n--- a/redis/connection.py\n+++ b/redis/connection.py\n@@ -656,7 +656,7 @@\n \"Send an already packed command to the Redis server\"\n if not self._sock:\n self.connect()\n- # guard against health check recurrsion\... |
gh_patches_debug_894 | rasdani/github-patches | git_diff | facebookresearch__fairscale-881 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Auto wrapping Huggingface models with FullyShardedDataParallel can break them
## 🐛 Bug
If you auto wrap a HuggingFace model with `FullyShardedDataParallel`, depending on what sub-modules are wrapped, and ... | diff --git a/fairscale/utils/containers.py b/fairscale/utils/containers.py
--- a/fairscale/utils/containers.py
+++ b/fairscale/utils/containers.py
@@ -19,7 +19,7 @@
if torch.is_tensor(x):
return fn(x)
elif isinstance(x, OrderedDict):
- od = OrderedDict()
+ od = x.__c... | {"golden_diff": "diff --git a/fairscale/utils/containers.py b/fairscale/utils/containers.py\n--- a/fairscale/utils/containers.py\n+++ b/fairscale/utils/containers.py\n@@ -19,7 +19,7 @@\n if torch.is_tensor(x):\n return fn(x)\n elif isinstance(x, OrderedDict):\n- od = OrderedDict()... |
gh_patches_debug_895 | rasdani/github-patches | git_diff | pyqtgraph__pyqtgraph-1024 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Numpy FutureWarning when setting bins in ImageItem.getHistogram()
If I set the `bins` parameter of the `ImageItem.getHistogram()` method to a Numpy array, I get the following Future warning...
```
/Users/... | diff --git a/pyqtgraph/graphicsItems/ImageItem.py b/pyqtgraph/graphicsItems/ImageItem.py
--- a/pyqtgraph/graphicsItems/ImageItem.py
+++ b/pyqtgraph/graphicsItems/ImageItem.py
@@ -488,7 +488,7 @@
step = (step, step)
stepData = self.image[::step[0], ::step[1]]
- if 'auto' == bins:
+ ... | {"golden_diff": "diff --git a/pyqtgraph/graphicsItems/ImageItem.py b/pyqtgraph/graphicsItems/ImageItem.py\n--- a/pyqtgraph/graphicsItems/ImageItem.py\n+++ b/pyqtgraph/graphicsItems/ImageItem.py\n@@ -488,7 +488,7 @@\n step = (step, step)\n stepData = self.image[::step[0], ::step[1]]\n \n- if '... |
gh_patches_debug_896 | rasdani/github-patches | git_diff | ethereum__web3.py-2867 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ValueError in _dict_to_namedtuple on call contract function that returns
### What was wrong?
We are getting exception when we call function on contract with
When we use decode_tuple feature and call c... | diff --git a/web3/_utils/abi.py b/web3/_utils/abi.py
--- a/web3/_utils/abi.py
+++ b/web3/_utils/abi.py
@@ -957,7 +957,7 @@
if not isinstance(value, dict):
return value
- keys, values = zip(*value.items())
+ keys, values = zip(*value.items()) if value else ((), ())
return a... | {"golden_diff": "diff --git a/web3/_utils/abi.py b/web3/_utils/abi.py\n--- a/web3/_utils/abi.py\n+++ b/web3/_utils/abi.py\n@@ -957,7 +957,7 @@\n if not isinstance(value, dict):\n return value\n \n- keys, values = zip(*value.items())\n+ keys, values = zip(*value.items()) if value else (... |
gh_patches_debug_897 | rasdani/github-patches | git_diff | huggingface__peft-1046 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
add_weighted_adapter() is unusable, throws error: "Invalid type <class 'list'> found in target_modules"
### System Info
- `transformers` version: 4.34.0
- Platform: Linux-6.5.6-arch2-1-x86_64-with-glibc2.35... | diff --git a/src/peft/config.py b/src/peft/config.py
--- a/src/peft/config.py
+++ b/src/peft/config.py
@@ -130,12 +130,8 @@
else:
config_cls = cls
- config = config_cls(**class_kwargs)
-
- for key, value in loaded_attributes.items():
- if hasattr(config, key):
- ... | {"golden_diff": "diff --git a/src/peft/config.py b/src/peft/config.py\n--- a/src/peft/config.py\n+++ b/src/peft/config.py\n@@ -130,12 +130,8 @@\n else:\n config_cls = cls\n \n- config = config_cls(**class_kwargs)\n-\n- for key, value in loaded_attributes.items():\n- if hasat... |
gh_patches_debug_898 | rasdani/github-patches | git_diff | bentoml__BentoML-4455 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bug: bentoml.build API does not work on Windows 10 due to Invalid Tag Exception
### Describe the bug
I try to build my bento with
`bentoml.bentos.build_bentofile(bentofile="bentofile.yaml", build_ctx="src")... | diff --git a/src/bentoml/bentos.py b/src/bentoml/bentos.py
--- a/src/bentoml/bentos.py
+++ b/src/bentoml/bentos.py
@@ -402,7 +402,7 @@
raise BentoMLException(
f"Failed to find tag from output: {output}\nNote: Output from 'bentoml build' might not be correct. Please open an issue on GitHub."
... | {"golden_diff": "diff --git a/src/bentoml/bentos.py b/src/bentoml/bentos.py\n--- a/src/bentoml/bentos.py\n+++ b/src/bentoml/bentos.py\n@@ -402,7 +402,7 @@\n raise BentoMLException(\n f\"Failed to find tag from output: {output}\\nNote: Output from 'bentoml build' might not be correct. Please open an ... |
gh_patches_debug_899 | rasdani/github-patches | git_diff | qutebrowser__qutebrowser-3063 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Auto-use the first match in the completion
Requested by @Earnestly in IRC:
Typing, e.g. `:do`<kbd>Enter</kbd> should invoke `:download` automatically as that's the first-best match instead of showing an inva... | diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py
--- a/qutebrowser/commands/runners.py
+++ b/qutebrowser/commands/runners.py
@@ -220,6 +220,8 @@
matches.append(valid_command)
if len(matches) == 1:
cmdstr = matches[0]
+ elif len(matches) > 1 and... | {"golden_diff": "diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py\n--- a/qutebrowser/commands/runners.py\n+++ b/qutebrowser/commands/runners.py\n@@ -220,6 +220,8 @@\n matches.append(valid_command)\n if len(matches) == 1:\n cmdstr = matches[0]\n+ e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.