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_600 | rasdani/github-patches | git_diff | ivy-llc__ivy-16195 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
argmax
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/paddle/tensor/tensor.py`
C... | diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py
--- a/ivy/functional/frontends/paddle/tensor/tensor.py
+++ b/ivy/functional/frontends/paddle/tensor/tensor.py
@@ -114,3 +114,6 @@
def sin(self, name=None):
return ivy.sin(self._ivy_array)
... | {"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py\n--- a/ivy/functional/frontends/paddle/tensor/tensor.py\n+++ b/ivy/functional/frontends/paddle/tensor/tensor.py\n@@ -114,3 +114,6 @@\n def sin(self, name=None):\r\n return ivy.si... |
gh_patches_debug_601 | rasdani/github-patches | git_diff | Textualize__textual-3531 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing link styles in `Toast` notifcations
This follows on from discussion #3526 about adding a clickable link in a notification.
The `Toast` widget doesn't inherit the styling from the base class, so th... | diff --git a/src/textual/widgets/_toast.py b/src/textual/widgets/_toast.py
--- a/src/textual/widgets/_toast.py
+++ b/src/textual/widgets/_toast.py
@@ -45,6 +45,12 @@
padding: 1 1;
background: $panel;
tint: white 5%;
+ link-background:;
+ link-color: $text;
+ link-style: u... | {"golden_diff": "diff --git a/src/textual/widgets/_toast.py b/src/textual/widgets/_toast.py\n--- a/src/textual/widgets/_toast.py\n+++ b/src/textual/widgets/_toast.py\n@@ -45,6 +45,12 @@\n padding: 1 1;\n background: $panel;\n tint: white 5%;\n+ link-background:;\n+ link-color: $tex... |
gh_patches_debug_602 | rasdani/github-patches | git_diff | AUTOMATIC1111__stable-diffusion-webui-378 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error in extras tab when resizing images
**Describe the bug**
Get error "AttributeError: 'int' object has no attribute 'encode'" on trying to upscale an image in the "extras" tab.
**To Reproduce**
1. Go... | diff --git a/modules/images.py b/modules/images.py
--- a/modules/images.py
+++ b/modules/images.py
@@ -299,7 +299,7 @@
if existing_info is not None:
for k, v in existing_info.items():
- pnginfo.add_text(k, v)
+ pnginfo.add_text(k, str(v))
pnginfo.ad... | {"golden_diff": "diff --git a/modules/images.py b/modules/images.py\n--- a/modules/images.py\n+++ b/modules/images.py\n@@ -299,7 +299,7 @@\n \r\n if existing_info is not None:\r\n for k, v in existing_info.items():\r\n- pnginfo.add_text(k, v)\r\n+ pnginfo.add_text(k, st... |
gh_patches_debug_603 | rasdani/github-patches | git_diff | aimhubio__aim-1703 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pylance reports code is unreachable
## 🐛 Bug
****
Pylance reports code is unreachable after... | diff --git a/aim/sdk/repo.py b/aim/sdk/repo.py
--- a/aim/sdk/repo.py
+++ b/aim/sdk/repo.py
@@ -92,7 +92,7 @@
tracking_queue = _get_tracking_queue()
- def __init__(self, path: str, *, read_only: bool = None, init: bool = False):
+ def __init__(self, path: str, *, read_only: Optional[bool] = None, init: Op... | {"golden_diff": "diff --git a/aim/sdk/repo.py b/aim/sdk/repo.py\n--- a/aim/sdk/repo.py\n+++ b/aim/sdk/repo.py\n@@ -92,7 +92,7 @@\n \n tracking_queue = _get_tracking_queue()\n \n- def __init__(self, path: str, *, read_only: bool = None, init: bool = False):\n+ def __init__(self, path: str, *, read_only: Option... |
gh_patches_debug_604 | rasdani/github-patches | git_diff | opsdroid__opsdroid-737 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot disconnect from SQLite
<!-- Before you post an issue or if you are unsure about something join our gitter channel https://gitter.im/opsdroid/ and ask away! We are more than happy to help you. -->
# De... | diff --git a/opsdroid/database/__init__.py b/opsdroid/database/__init__.py
--- a/opsdroid/database/__init__.py
+++ b/opsdroid/database/__init__.py
@@ -40,7 +40,7 @@
"""
raise NotImplementedError
- async def disconnect(self):
+ async def disconnect(self, opsdroid):
"""Disconnect from t... | {"golden_diff": "diff --git a/opsdroid/database/__init__.py b/opsdroid/database/__init__.py\n--- a/opsdroid/database/__init__.py\n+++ b/opsdroid/database/__init__.py\n@@ -40,7 +40,7 @@\n \"\"\"\n raise NotImplementedError\n \n- async def disconnect(self):\n+ async def disconnect(self, opsdroid):\n... |
gh_patches_debug_605 | rasdani/github-patches | git_diff | netbox-community__netbox-13667 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Uploading report without test method yields "Server Error"
### NetBox version
v3.6.0 (But reproducible in 3.6.1-dev, too)
### Python version
3.11
### Steps to Reproduce
1.Create `a.py`:
```py
from extr... | diff --git a/netbox/extras/reports.py b/netbox/extras/reports.py
--- a/netbox/extras/reports.py
+++ b/netbox/extras/reports.py
@@ -106,8 +106,6 @@
'failure': 0,
'log': [],
}
- if not test_methods:
- raise Exception("A report must contain at le... | {"golden_diff": "diff --git a/netbox/extras/reports.py b/netbox/extras/reports.py\n--- a/netbox/extras/reports.py\n+++ b/netbox/extras/reports.py\n@@ -106,8 +106,6 @@\n 'failure': 0,\n 'log': [],\n }\n- if not test_methods:\n- raise Exception(\"A... |
gh_patches_debug_606 | rasdani/github-patches | git_diff | getmoto__moto-921 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Metadata being returned with some keys with wrong format
**Problem description**
When using AWS Java SDK against Moto an issue was uncovered. Metadata is being returned with keys like "Etag" when they should... | diff --git a/moto/s3/models.py b/moto/s3/models.py
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -91,7 +91,7 @@
@property
def response_dict(self):
res = {
- 'Etag': self.etag,
+ 'ETag': self.etag,
'last-modified': self.last_modified_RFC1123,
'conte... | {"golden_diff": "diff --git a/moto/s3/models.py b/moto/s3/models.py\n--- a/moto/s3/models.py\n+++ b/moto/s3/models.py\n@@ -91,7 +91,7 @@\n @property\n def response_dict(self):\n res = {\n- 'Etag': self.etag,\n+ 'ETag': self.etag,\n 'last-modified': self.last_modified_RF... |
gh_patches_debug_607 | rasdani/github-patches | git_diff | mlcommons__GaNDLF-346 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Link original arch papers in the README of `GANDLF.models`
**Is your feature request related to a problem? Please describe.**
Currently, we don't have a centralized location for the main links to the arch pa... | diff --git a/GANDLF/compute/training_loop.py b/GANDLF/compute/training_loop.py
--- a/GANDLF/compute/training_loop.py
+++ b/GANDLF/compute/training_loop.py
@@ -470,7 +470,8 @@
best_model_path,
)
first_model_saved = True
- print("Best epoch: ", best_train_idx)
+
+ ... | {"golden_diff": "diff --git a/GANDLF/compute/training_loop.py b/GANDLF/compute/training_loop.py\n--- a/GANDLF/compute/training_loop.py\n+++ b/GANDLF/compute/training_loop.py\n@@ -470,7 +470,8 @@\n best_model_path,\n )\n first_model_saved = True\n- print(\"Best epoch: \... |
gh_patches_debug_608 | rasdani/github-patches | git_diff | tensorflow__addons-1213 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Proposal: Upload the nightlies at each commit on the master branch
We already build the wheels already anyway. It's just missing the push to pypi. Yes/No?
--- END ISSUE ---
Below are some code segments, eac... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -52,7 +52,7 @@
exec(fp.read(), version)
if project_name == TFA_NIGHTLY:
- version["__version__"] += datetime.strftime(datetime.today(), "%Y%m%d")
+ version["__version__"] += datetime.now().strftime("%Y%m%d%H%M%S")
with open("requirements... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -52,7 +52,7 @@\n exec(fp.read(), version)\n \n if project_name == TFA_NIGHTLY:\n- version[\"__version__\"] += datetime.strftime(datetime.today(), \"%Y%m%d\")\n+ version[\"__version__\"] += datetime.now().strftime(\"%Y%m%d%H%... |
gh_patches_debug_609 | rasdani/github-patches | git_diff | python-discord__bot-875 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tag cog crashes bot on systems with non utf8 default encoding.
The tag cog leaves out encoding when opening files, assuming the default is UTF8 but that is not the case on some OSs and fails with the `Unicod... | diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py
--- a/bot/cogs/tags.py
+++ b/bot/cogs/tags.py
@@ -43,7 +43,7 @@
tag = {
"title": tag_title,
"embed": {
- "description": file.read_text()
+ "description": file.read_text(encoding="utf-8")... | {"golden_diff": "diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py\n--- a/bot/cogs/tags.py\n+++ b/bot/cogs/tags.py\n@@ -43,7 +43,7 @@\n tag = {\n \"title\": tag_title,\n \"embed\": {\n- \"description\": file.read_text()\n+ \"description\":... |
gh_patches_debug_610 | rasdani/github-patches | git_diff | apache__tvm-6963 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Frontend][Relay] YOLO module is unparsable
The module generated from the code in this tutorial: https://tvm.apache.org/docs/tutorials/frontend/from_darknet.html
causes the following error when parsed by:
... | diff --git a/python/tvm/relay/frontend/darknet.py b/python/tvm/relay/frontend/darknet.py
--- a/python/tvm/relay/frontend/darknet.py
+++ b/python/tvm/relay/frontend/darknet.py
@@ -40,7 +40,7 @@
def _get_params_prefix(opname, layer_num):
"""Makes the params prefix name from opname and layer number."""
- return... | {"golden_diff": "diff --git a/python/tvm/relay/frontend/darknet.py b/python/tvm/relay/frontend/darknet.py\n--- a/python/tvm/relay/frontend/darknet.py\n+++ b/python/tvm/relay/frontend/darknet.py\n@@ -40,7 +40,7 @@\n \n def _get_params_prefix(opname, layer_num):\n \"\"\"Makes the params prefix name from opname and la... |
gh_patches_debug_611 | rasdani/github-patches | git_diff | getmoto__moto-744 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dynamodb has_item causes scan problems
Calling `has_item` for an item that doesn't exist, and then calling `scan()` causes `AttributeError: 'dict' object has no attribute 'attrs'`
Example of behaviour that c... | diff --git a/moto/dynamodb/responses.py b/moto/dynamodb/responses.py
--- a/moto/dynamodb/responses.py
+++ b/moto/dynamodb/responses.py
@@ -278,7 +278,7 @@
result = {
"Count": len(items),
- "Items": [item.attrs for item in items],
+ "Items": [item.attrs for item in items if ... | {"golden_diff": "diff --git a/moto/dynamodb/responses.py b/moto/dynamodb/responses.py\n--- a/moto/dynamodb/responses.py\n+++ b/moto/dynamodb/responses.py\n@@ -278,7 +278,7 @@\n \n result = {\n \"Count\": len(items),\n- \"Items\": [item.attrs for item in items],\n+ \"Items\": [i... |
gh_patches_debug_612 | rasdani/github-patches | git_diff | Nitrate__Nitrate-319 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix filter calls
Similar with the calls to `map`, these calls must be fixed as well.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
-... | diff --git a/tcms/testplans/helpers/email.py b/tcms/testplans/helpers/email.py
--- a/tcms/testplans/helpers/email.py
+++ b/tcms/testplans/helpers/email.py
@@ -36,4 +36,4 @@
case_testers = plan.case.values_list('default_tester__email',
flat=True)
recipients... | {"golden_diff": "diff --git a/tcms/testplans/helpers/email.py b/tcms/testplans/helpers/email.py\n--- a/tcms/testplans/helpers/email.py\n+++ b/tcms/testplans/helpers/email.py\n@@ -36,4 +36,4 @@\n case_testers = plan.case.values_list('default_tester__email',\n flat=Tru... |
gh_patches_debug_613 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-3241 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`strawberry.field` does not type check properly for async resolvers, but `strawberry.field()` does
## Describe the Bug
An example speaks a thousand words. Given the following minimal test case:
```pytho... | diff --git a/strawberry/field.py b/strawberry/field.py
--- a/strawberry/field.py
+++ b/strawberry/field.py
@@ -49,7 +49,7 @@
_RESOLVER_TYPE = Union[
StrawberryResolver[T],
Callable[..., T],
- Callable[..., Coroutine[T, Any, Any]],
+ Callable[..., Coroutine[Any, Any, T]],
Callable[..., Awaitable[T]... | {"golden_diff": "diff --git a/strawberry/field.py b/strawberry/field.py\n--- a/strawberry/field.py\n+++ b/strawberry/field.py\n@@ -49,7 +49,7 @@\n _RESOLVER_TYPE = Union[\n StrawberryResolver[T],\n Callable[..., T],\n- Callable[..., Coroutine[T, Any, Any]],\n+ Callable[..., Coroutine[Any, Any, T]],\n ... |
gh_patches_debug_614 | rasdani/github-patches | git_diff | pypa__pip-12373 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
After uprade pip to version 23.3+ cant use hg+http with current branch
### Description
After uprade pip to version 23.3+ can`t isntall my package from repository with current branch
if i use older version ... | diff --git a/src/pip/_internal/vcs/mercurial.py b/src/pip/_internal/vcs/mercurial.py
--- a/src/pip/_internal/vcs/mercurial.py
+++ b/src/pip/_internal/vcs/mercurial.py
@@ -31,7 +31,7 @@
@staticmethod
def get_base_rev_args(rev: str) -> List[str]:
- return [f"-r={rev}"]
+ return [f"--rev={rev}"]
... | {"golden_diff": "diff --git a/src/pip/_internal/vcs/mercurial.py b/src/pip/_internal/vcs/mercurial.py\n--- a/src/pip/_internal/vcs/mercurial.py\n+++ b/src/pip/_internal/vcs/mercurial.py\n@@ -31,7 +31,7 @@\n \n @staticmethod\n def get_base_rev_args(rev: str) -> List[str]:\n- return [f\"-r={rev}\"]\n+ ... |
gh_patches_debug_615 | rasdani/github-patches | git_diff | jazzband__pip-tools-1572 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[6.5.0] Packages needlessly uninstalled during sync due to non-canonicalized names (dots vs dashes)
Packages with dots in them are not compiled to the same file in version 6.4.0 and 6.5.0, where dots are repl... | diff --git a/piptools/utils.py b/piptools/utils.py
--- a/piptools/utils.py
+++ b/piptools/utils.py
@@ -69,9 +69,7 @@
else:
# from packaging, such as install requirements from requirements.txt
key = req.name
- assert isinstance(key, str)
- key = key.replace("_", "-").lower()
- return key
... | {"golden_diff": "diff --git a/piptools/utils.py b/piptools/utils.py\n--- a/piptools/utils.py\n+++ b/piptools/utils.py\n@@ -69,9 +69,7 @@\n else:\n # from packaging, such as install requirements from requirements.txt\n key = req.name\n- assert isinstance(key, str)\n- key = key.replace(\"_\", \"... |
gh_patches_debug_616 | rasdani/github-patches | git_diff | django-wiki__django-wiki-1229 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Warning of illegal attachment types are auto collapsed and thus invisible
I am reporting a bug in the attachment plugin.
When you try to upload something illegal (SVG, jpg), it used to (just upgrade from 0... | diff --git a/testproject/testproject/settings/dev.py b/testproject/testproject/settings/dev.py
--- a/testproject/testproject/settings/dev.py
+++ b/testproject/testproject/settings/dev.py
@@ -9,6 +9,15 @@
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
+INTERNAL_IPS = ["127.0.0.1"]
+ALLOWED_HOSTS =... | {"golden_diff": "diff --git a/testproject/testproject/settings/dev.py b/testproject/testproject/settings/dev.py\n--- a/testproject/testproject/settings/dev.py\n+++ b/testproject/testproject/settings/dev.py\n@@ -9,6 +9,15 @@\n \n EMAIL_BACKEND = \"django.core.mail.backends.console.EmailBackend\"\n \n+INTERNAL_IPS = [\"1... |
gh_patches_debug_617 | rasdani/github-patches | git_diff | zostera__django-bootstrap5-124 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Rendering form with exclude is broken
Example:
```
{% bootstrap_form form exclude="ignore_field" %}
```
field renderer returns empty (unsafe) string when encountering the ignored field. When concatenate... | diff --git a/src/django_bootstrap5/renderers.py b/src/django_bootstrap5/renderers.py
--- a/src/django_bootstrap5/renderers.py
+++ b/src/django_bootstrap5/renderers.py
@@ -464,7 +464,7 @@
def render(self):
if self.field.name in self.exclude.replace(" ", "").split(","):
- return ""
+ ... | {"golden_diff": "diff --git a/src/django_bootstrap5/renderers.py b/src/django_bootstrap5/renderers.py\n--- a/src/django_bootstrap5/renderers.py\n+++ b/src/django_bootstrap5/renderers.py\n@@ -464,7 +464,7 @@\n \n def render(self):\n if self.field.name in self.exclude.replace(\" \", \"\").split(\",\"):\n- ... |
gh_patches_debug_618 | rasdani/github-patches | git_diff | ManimCommunity__manim-3108 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The documentation for the `--resolution` flag in the cli is wrong
The current documentation of the `--resolution` flag says the format is `(W,H)` which is confusing because the passed value needs to be of the... | diff --git a/manim/cli/render/render_options.py b/manim/cli/render/render_options.py
--- a/manim/cli/render/render_options.py
+++ b/manim/cli/render/render_options.py
@@ -83,7 +83,7 @@
"--resolution",
callback=validate_resolution,
default=None,
- help="Resolution in (W,H) for when 16:9... | {"golden_diff": "diff --git a/manim/cli/render/render_options.py b/manim/cli/render/render_options.py\n--- a/manim/cli/render/render_options.py\n+++ b/manim/cli/render/render_options.py\n@@ -83,7 +83,7 @@\n \"--resolution\",\n callback=validate_resolution,\n default=None,\n- help=\"Resolu... |
gh_patches_debug_619 | rasdani/github-patches | git_diff | comic__grand-challenge.org-2885 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The Phase (algorithm) input and output selects are annoying to use in the admin
A select 2 widget would be better.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of t... | diff --git a/app/grandchallenge/evaluation/admin.py b/app/grandchallenge/evaluation/admin.py
--- a/app/grandchallenge/evaluation/admin.py
+++ b/app/grandchallenge/evaluation/admin.py
@@ -93,6 +93,13 @@
"submission_kind",
"challenge__short_name",
)
+ autocomplete_fields = (
+ "inputs",
+... | {"golden_diff": "diff --git a/app/grandchallenge/evaluation/admin.py b/app/grandchallenge/evaluation/admin.py\n--- a/app/grandchallenge/evaluation/admin.py\n+++ b/app/grandchallenge/evaluation/admin.py\n@@ -93,6 +93,13 @@\n \"submission_kind\",\n \"challenge__short_name\",\n )\n+ autocomplete_fie... |
gh_patches_debug_620 | rasdani/github-patches | git_diff | microsoft__botbuilder-python-1387 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[PORT] Fix LuisRecognizer to not return intents if there is no utterance
> Port this change from botbuilder-dotnet/master branch:
https://github.com/microsoft/botbuilder-dotnet/pull/4129
Fixes #4117
## D... | diff --git a/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer.py b/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer.py
--- a/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer.py
+++ b/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer.py
@@ -272,7 +272,7 @@
if not utteran... | {"golden_diff": "diff --git a/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer.py b/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer.py\n--- a/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer.py\n+++ b/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer.py\n@@ -272,7 +272,7 @@\n \n ... |
gh_patches_debug_621 | rasdani/github-patches | git_diff | cal-itp__benefits-922 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: Spanish translations on all error pages are not showing up.
## To Reproduce
Steps to reproduce the behavior:
1. Go to benefits.calitp.org/
2. Click on Spanish
3. Go to benefits.calitp.org/asfaklj... | diff --git a/benefits/core/viewmodels.py b/benefits/core/viewmodels.py
--- a/benefits/core/viewmodels.py
+++ b/benefits/core/viewmodels.py
@@ -1,7 +1,7 @@
"""
The core application: view model definitions for the root of the webapp.
"""
-from django.utils.translation import pgettext, gettext as _
+from django.utils.t... | {"golden_diff": "diff --git a/benefits/core/viewmodels.py b/benefits/core/viewmodels.py\n--- a/benefits/core/viewmodels.py\n+++ b/benefits/core/viewmodels.py\n@@ -1,7 +1,7 @@\n \"\"\"\n The core application: view model definitions for the root of the webapp.\n \"\"\"\n-from django.utils.translation import pgettext, get... |
gh_patches_debug_622 | rasdani/github-patches | git_diff | pyro-ppl__pyro-388 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Test batch_size parameter is correctly applied for all distributions
With #323, we are now supporting `batch_size` parameter for both the class and functional forms of both the distributions. Let us add a sim... | diff --git a/pyro/distributions/log_normal.py b/pyro/distributions/log_normal.py
--- a/pyro/distributions/log_normal.py
+++ b/pyro/distributions/log_normal.py
@@ -49,7 +49,7 @@
"""
Reparameterized log-normal sampler.
"""
- eps = Variable(torch.randn(1).type_as(self.mu.data))
+ e... | {"golden_diff": "diff --git a/pyro/distributions/log_normal.py b/pyro/distributions/log_normal.py\n--- a/pyro/distributions/log_normal.py\n+++ b/pyro/distributions/log_normal.py\n@@ -49,7 +49,7 @@\n \"\"\"\n Reparameterized log-normal sampler.\n \"\"\"\n- eps = Variable(torch.randn(1).typ... |
gh_patches_debug_623 | rasdani/github-patches | git_diff | ansible-collections__community.general-5386 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
community.general.xenserver_facts module error __init__() missing 1 required positional argument: 'argument_spec'
### Summary
When I try to use the [community.general.xenserver_facts module](https://docs.ans... | diff --git a/plugins/modules/cloud/misc/xenserver_facts.py b/plugins/modules/cloud/misc/xenserver_facts.py
--- a/plugins/modules/cloud/misc/xenserver_facts.py
+++ b/plugins/modules/cloud/misc/xenserver_facts.py
@@ -161,9 +161,7 @@
def main():
- module = AnsibleModule(
- supports_check_mode=True,
- )
+... | {"golden_diff": "diff --git a/plugins/modules/cloud/misc/xenserver_facts.py b/plugins/modules/cloud/misc/xenserver_facts.py\n--- a/plugins/modules/cloud/misc/xenserver_facts.py\n+++ b/plugins/modules/cloud/misc/xenserver_facts.py\n@@ -161,9 +161,7 @@\n \n \n def main():\n- module = AnsibleModule(\n- supports_... |
gh_patches_debug_624 | rasdani/github-patches | git_diff | scikit-hep__awkward-1835 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Awkward v2 mixins not propagated upwards
### Version of Awkward Array
2.0.0rc1
### Description and code to reproduce
Coffea tests with awkwardv2 fail with: `E AttributeError: module 'awkward.behavi... | diff --git a/src/awkward/__init__.py b/src/awkward/__init__.py
--- a/src/awkward/__init__.py
+++ b/src/awkward/__init__.py
@@ -39,8 +39,8 @@
# behaviors
import awkward.behaviors.categorical
-import awkward.behaviors.mixins
import awkward.behaviors.string
+from awkward.behaviors.mixins import mixin_class, mixin_cla... | {"golden_diff": "diff --git a/src/awkward/__init__.py b/src/awkward/__init__.py\n--- a/src/awkward/__init__.py\n+++ b/src/awkward/__init__.py\n@@ -39,8 +39,8 @@\n \n # behaviors\n import awkward.behaviors.categorical\n-import awkward.behaviors.mixins\n import awkward.behaviors.string\n+from awkward.behaviors.mixins imp... |
gh_patches_debug_625 | rasdani/github-patches | git_diff | networkx__networkx-3339 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug in networkx/algorithms/shortest_paths/unweighted.py
Line 415/416 of **networkc/algorithms/shortest_paths/unweighted.py** reads
` if target not in G:
raise nx.NodeNotFound("Target {} not in ... | diff --git a/networkx/algorithms/shortest_paths/unweighted.py b/networkx/algorithms/shortest_paths/unweighted.py
--- a/networkx/algorithms/shortest_paths/unweighted.py
+++ b/networkx/algorithms/shortest_paths/unweighted.py
@@ -413,7 +413,7 @@
shortest_path, single_source_shortest_path
"""
if target not i... | {"golden_diff": "diff --git a/networkx/algorithms/shortest_paths/unweighted.py b/networkx/algorithms/shortest_paths/unweighted.py\n--- a/networkx/algorithms/shortest_paths/unweighted.py\n+++ b/networkx/algorithms/shortest_paths/unweighted.py\n@@ -413,7 +413,7 @@\n shortest_path, single_source_shortest_path\n \"... |
gh_patches_debug_626 | rasdani/github-patches | git_diff | sunpy__sunpy-4791 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
You have to specify seconds on the time string arguments to a.Time now
I could have sworn you didn't used to have to do this.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One o... | diff --git a/sunpy/time/time.py b/sunpy/time/time.py
--- a/sunpy/time/time.py
+++ b/sunpy/time/time.py
@@ -61,6 +61,7 @@
"%Y:%j:%H:%M:%S.%f", # Example 2012:124:21:08:12.999999
"%Y%m%d%H%M%S", # Example 20140101000001 (JSOC / VSO)
"%Y.%m.%d_%H:%M:%S_TAI", # Example 2016.05.04_21:08:12_TAI
+ "%Y/%m/... | {"golden_diff": "diff --git a/sunpy/time/time.py b/sunpy/time/time.py\n--- a/sunpy/time/time.py\n+++ b/sunpy/time/time.py\n@@ -61,6 +61,7 @@\n \"%Y:%j:%H:%M:%S.%f\", # Example 2012:124:21:08:12.999999\n \"%Y%m%d%H%M%S\", # Example 20140101000001 (JSOC / VSO)\n \"%Y.%m.%d_%H:%M:%S_TAI\", # Example 2016.05... |
gh_patches_debug_627 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-2150 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider tmobile_us is broken
During the global build at 2021-06-30-14-42-26, spider **tmobile_us** failed with **7563 features** and **2 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-06-3... | diff --git a/locations/spiders/tmobile_us.py b/locations/spiders/tmobile_us.py
--- a/locations/spiders/tmobile_us.py
+++ b/locations/spiders/tmobile_us.py
@@ -15,7 +15,7 @@
'Saturday': 'Sa',
'Sunday': 'Su'}
-BASE_URL = 'https://onmyj41p3c.execute-api.us-west-2.amazonaws.com/prod/getSto... | {"golden_diff": "diff --git a/locations/spiders/tmobile_us.py b/locations/spiders/tmobile_us.py\n--- a/locations/spiders/tmobile_us.py\n+++ b/locations/spiders/tmobile_us.py\n@@ -15,7 +15,7 @@\n 'Saturday': 'Sa',\n 'Sunday': 'Su'}\n \n-BASE_URL = 'https://onmyj41p3c.execute-api.us-west-2.a... |
gh_patches_debug_628 | rasdani/github-patches | git_diff | readthedocs__readthedocs.org-4831 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Provide an API to query the build status by commit
In order to do a check before release that everything is ok, I would like to have a way to obtain the current build status for a given commit. So, in additio... | diff --git a/readthedocs/restapi/views/model_views.py b/readthedocs/restapi/views/model_views.py
--- a/readthedocs/restapi/views/model_views.py
+++ b/readthedocs/restapi/views/model_views.py
@@ -243,7 +243,7 @@
serializer_class = BuildSerializer
admin_serializer_class = BuildAdminSerializer
model = Build... | {"golden_diff": "diff --git a/readthedocs/restapi/views/model_views.py b/readthedocs/restapi/views/model_views.py\n--- a/readthedocs/restapi/views/model_views.py\n+++ b/readthedocs/restapi/views/model_views.py\n@@ -243,7 +243,7 @@\n serializer_class = BuildSerializer\n admin_serializer_class = BuildAdminSeriali... |
gh_patches_debug_629 | rasdani/github-patches | git_diff | pytorch__vision-762 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
to_pil_image mutates a 2-d tensor
@fmassa is this intended ?
I feel this might create a problem if we have a batch of images as 2d tensor and we just want to generate the images by keeping the tensor as it ... | diff --git a/torchvision/transforms/functional.py b/torchvision/transforms/functional.py
--- a/torchvision/transforms/functional.py
+++ b/torchvision/transforms/functional.py
@@ -117,7 +117,7 @@
elif pic.ndimension() == 2:
# if 2D image, add channel dimension (CHW)
- pic.unsqueeze_(0)... | {"golden_diff": "diff --git a/torchvision/transforms/functional.py b/torchvision/transforms/functional.py\n--- a/torchvision/transforms/functional.py\n+++ b/torchvision/transforms/functional.py\n@@ -117,7 +117,7 @@\n \n elif pic.ndimension() == 2:\n # if 2D image, add channel dimension (CHW)\n- ... |
gh_patches_debug_630 | rasdani/github-patches | git_diff | pypi__warehouse-6747 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add Brazilian Portugese to localization footer
https://hosted.weblate.org/projects/pypa/warehouse/#translations says that we're now at 100% translated for Brazilian Portugese. Therefore, let's insert the foot... | diff --git a/warehouse/i18n/__init__.py b/warehouse/i18n/__init__.py
--- a/warehouse/i18n/__init__.py
+++ b/warehouse/i18n/__init__.py
@@ -14,7 +14,7 @@
from pyramid.i18n import TranslationStringFactory, default_locale_negotiator
from pyramid.threadlocal import get_current_request
-KNOWN_LOCALES = {"en": "English"}... | {"golden_diff": "diff --git a/warehouse/i18n/__init__.py b/warehouse/i18n/__init__.py\n--- a/warehouse/i18n/__init__.py\n+++ b/warehouse/i18n/__init__.py\n@@ -14,7 +14,7 @@\n from pyramid.i18n import TranslationStringFactory, default_locale_negotiator\n from pyramid.threadlocal import get_current_request\n \n-KNOWN_LOC... |
gh_patches_debug_631 | rasdani/github-patches | git_diff | certbot__certbot-311 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Lost Vagrant docs
ce2a6b7c5a3549ce5a1a04fb33d4254f78bd1b1f removed documentation for Vagrant in `CONTRIBUTING.rst`
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of ... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -101,7 +101,7 @@
# The reST default role (used for this markup: `text`) to use for all
# documents.
-#default_role = None
+default_role = 'py:obj'
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function... | {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -101,7 +101,7 @@\n \n # The reST default role (used for this markup: `text`) to use for all\n # documents.\n-#default_role = None\n+default_role = 'py:obj'\n \n # If true, '()' will be appended to :func: etc. cross-ref... |
gh_patches_debug_632 | rasdani/github-patches | git_diff | pytorch__ignite-930 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Metrics objects are not pickleable
Pickling Metrics objects fails due to infinite loop.
The reason for that is the following:
To make metrics composable, the base class Metric has [methods](https://gith... | diff --git a/ignite/metrics/metric.py b/ignite/metrics/metric.py
--- a/ignite/metrics/metric.py
+++ b/ignite/metrics/metric.py
@@ -292,6 +292,12 @@
return MetricsLambda(lambda x: x[index], self)
+ def __getstate__(self):
+ return self.__dict__
+
+ def __setstate__(self, d):
+ self.__dic... | {"golden_diff": "diff --git a/ignite/metrics/metric.py b/ignite/metrics/metric.py\n--- a/ignite/metrics/metric.py\n+++ b/ignite/metrics/metric.py\n@@ -292,6 +292,12 @@\n \n return MetricsLambda(lambda x: x[index], self)\n \n+ def __getstate__(self):\n+ return self.__dict__\n+\n+ def __setstate__(se... |
gh_patches_debug_633 | rasdani/github-patches | git_diff | getsentry__sentry-python-2069 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot import appengine
### How do you use Sentry?
Sentry Saas (sentry.io)
### Version
1.18.0
### Steps to Reproduce
Install the SDK within any project that is not pinning urllib3 < 2.0.0
### Expected R... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -41,6 +41,7 @@
'urllib3>=1.25.7; python_version<="3.4"',
'urllib3>=1.26.9; python_version=="3.5"',
'urllib3>=1.26.11; python_version >="3.6"',
+ 'urllib3<2.0.0',
"certifi",
],
extras_require={
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -41,6 +41,7 @@\n 'urllib3>=1.25.7; python_version<=\"3.4\"',\n 'urllib3>=1.26.9; python_version==\"3.5\"',\n 'urllib3>=1.26.11; python_version >=\"3.6\"',\n+ 'urllib3<2.0.0',\n \"certifi\",\n ... |
gh_patches_debug_634 | rasdani/github-patches | git_diff | pypa__pipenv-5591 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pipenv `install` throws `Value is not a valid boolean-like` error for truthy `CI` environment variables
### Issue description
When installing dependencies with pipenv inside a [Woodpecker](https://woodpeck... | diff --git a/pipenv/environments.py b/pipenv/environments.py
--- a/pipenv/environments.py
+++ b/pipenv/environments.py
@@ -76,7 +76,9 @@
SESSION_IS_INTERACTIVE = _isatty(sys.stdout)
# TF_BUILD indicates to Azure pipelines it is a build step
-PIPENV_IS_CI = is_env_truthy("CI") or is_env_truthy("TF_BUILD")
+PIPENV_IS... | {"golden_diff": "diff --git a/pipenv/environments.py b/pipenv/environments.py\n--- a/pipenv/environments.py\n+++ b/pipenv/environments.py\n@@ -76,7 +76,9 @@\n SESSION_IS_INTERACTIVE = _isatty(sys.stdout)\n \n # TF_BUILD indicates to Azure pipelines it is a build step\n-PIPENV_IS_CI = is_env_truthy(\"CI\") or is_env_tru... |
gh_patches_debug_635 | rasdani/github-patches | git_diff | ansible__awx-12242 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Websocket not working at non-root path
### Please confirm the following
- [X] I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
- [X]... | diff --git a/awx/main/routing.py b/awx/main/routing.py
--- a/awx/main/routing.py
+++ b/awx/main/routing.py
@@ -27,8 +27,8 @@
websocket_urlpatterns = [
- re_path(r'websocket/$', consumers.EventConsumer.as_asgi()),
- re_path(r'websocket/broadcast/$', consumers.BroadcastConsumer.as_asgi()),
+ re_path(r'webso... | {"golden_diff": "diff --git a/awx/main/routing.py b/awx/main/routing.py\n--- a/awx/main/routing.py\n+++ b/awx/main/routing.py\n@@ -27,8 +27,8 @@\n \n \n websocket_urlpatterns = [\n- re_path(r'websocket/$', consumers.EventConsumer.as_asgi()),\n- re_path(r'websocket/broadcast/$', consumers.BroadcastConsumer.as_asgi... |
gh_patches_debug_636 | rasdani/github-patches | git_diff | ivy-llc__ivy-14373 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
take
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/torch/indexing_slicing_joini... | diff --git a/ivy/functional/frontends/torch/indexing_slicing_joining_mutating_ops.py b/ivy/functional/frontends/torch/indexing_slicing_joining_mutating_ops.py
--- a/ivy/functional/frontends/torch/indexing_slicing_joining_mutating_ops.py
+++ b/ivy/functional/frontends/torch/indexing_slicing_joining_mutating_ops.py
@@ -3... | {"golden_diff": "diff --git a/ivy/functional/frontends/torch/indexing_slicing_joining_mutating_ops.py b/ivy/functional/frontends/torch/indexing_slicing_joining_mutating_ops.py\n--- a/ivy/functional/frontends/torch/indexing_slicing_joining_mutating_ops.py\n+++ b/ivy/functional/frontends/torch/indexing_slicing_joining_mu... |
gh_patches_debug_637 | rasdani/github-patches | git_diff | litestar-org__litestar-1377 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
StaticFilesConfig and virtual directories
I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/usin... | diff --git a/starlite/events/emitter.py b/starlite/events/emitter.py
--- a/starlite/events/emitter.py
+++ b/starlite/events/emitter.py
@@ -93,7 +93,7 @@
"""
while self._queue:
fn, args, kwargs = await self._queue.get()
- await fn(*args, *kwargs)
+ await fn(*args, **k... | {"golden_diff": "diff --git a/starlite/events/emitter.py b/starlite/events/emitter.py\n--- a/starlite/events/emitter.py\n+++ b/starlite/events/emitter.py\n@@ -93,7 +93,7 @@\n \"\"\"\n while self._queue:\n fn, args, kwargs = await self._queue.get()\n- await fn(*args, *kwargs)\n+ ... |
gh_patches_debug_638 | rasdani/github-patches | git_diff | rucio__rucio-3991 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Duplicate prometheus metrics when testing/importing hermes, hermes2
Motivation
----------
Importing hermes and hermes2 at the same time now fails in testing, because the prometheus metrics are named the sam... | diff --git a/lib/rucio/daemons/hermes/hermes2.py b/lib/rucio/daemons/hermes/hermes2.py
--- a/lib/rucio/daemons/hermes/hermes2.py
+++ b/lib/rucio/daemons/hermes/hermes2.py
@@ -70,7 +70,7 @@
GRACEFUL_STOP = threading.Event()
-RECONNECT_COUNTER = Counter('rucio_daemons_hermes_reconnect', 'Counts Hermes reconnects to ... | {"golden_diff": "diff --git a/lib/rucio/daemons/hermes/hermes2.py b/lib/rucio/daemons/hermes/hermes2.py\n--- a/lib/rucio/daemons/hermes/hermes2.py\n+++ b/lib/rucio/daemons/hermes/hermes2.py\n@@ -70,7 +70,7 @@\n \n GRACEFUL_STOP = threading.Event()\n \n-RECONNECT_COUNTER = Counter('rucio_daemons_hermes_reconnect', 'Coun... |
gh_patches_debug_639 | rasdani/github-patches | git_diff | Pycord-Development__pycord-1369 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`scheduled_events` method of Guild Object isn't working as it should
### Summary
It gives TypeError where it should return the list of scheduled events
### Reproduction Steps
I used jishaku and did the fol... | diff --git a/discord/scheduled_events.py b/discord/scheduled_events.py
--- a/discord/scheduled_events.py
+++ b/discord/scheduled_events.py
@@ -99,7 +99,7 @@
self.value = value
def __repr__(self) -> str:
- return f"<ScheduledEventLocation value={self.value} type={self.type}>"
+ return f... | {"golden_diff": "diff --git a/discord/scheduled_events.py b/discord/scheduled_events.py\n--- a/discord/scheduled_events.py\n+++ b/discord/scheduled_events.py\n@@ -99,7 +99,7 @@\n self.value = value\n \n def __repr__(self) -> str:\n- return f\"<ScheduledEventLocation value={self.value} type={self.... |
gh_patches_debug_640 | rasdani/github-patches | git_diff | geopandas__geopandas-1618 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: to_crs() fails if there's None in geometry
With shapely backend, `to_crs()` fails on `None` in geometry column.
```py
import pandas as pd
import geopandas as gpd
from shapely.geometry import Point
... | diff --git a/geopandas/_vectorized.py b/geopandas/_vectorized.py
--- a/geopandas/_vectorized.py
+++ b/geopandas/_vectorized.py
@@ -886,6 +886,9 @@
result = np.empty(n, dtype=object)
for i in range(n):
geom = data[i]
- result[i] = transform(func, geom)
+ if _isna(geom... | {"golden_diff": "diff --git a/geopandas/_vectorized.py b/geopandas/_vectorized.py\n--- a/geopandas/_vectorized.py\n+++ b/geopandas/_vectorized.py\n@@ -886,6 +886,9 @@\n result = np.empty(n, dtype=object)\n for i in range(n):\n geom = data[i]\n- result[i] = transform(func, geom)\n+... |
gh_patches_debug_641 | rasdani/github-patches | git_diff | StackStorm__st2-4083 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`st2 pack search` is broken in 2.7
EDIT: Added full debug output
```shell
root@EWC:~/.ssh# st2 --debug pack search clicrud
2018-04-13 17:12:20,760 DEBUG - Using cached token from file "/root/.st2/token-st... | diff --git a/st2client/st2client/models/core.py b/st2client/st2client/models/core.py
--- a/st2client/st2client/models/core.py
+++ b/st2client/st2client/models/core.py
@@ -506,7 +506,7 @@
else:
payload = {'pack': args.pack}
- response = self.client.post(url, payload, **kwargs)
+ ... | {"golden_diff": "diff --git a/st2client/st2client/models/core.py b/st2client/st2client/models/core.py\n--- a/st2client/st2client/models/core.py\n+++ b/st2client/st2client/models/core.py\n@@ -506,7 +506,7 @@\n else:\n payload = {'pack': args.pack}\n \n- response = self.client.post(url, pay... |
gh_patches_debug_642 | rasdani/github-patches | git_diff | deepset-ai__haystack-3065 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`OpensearchDocumentStore.custom_mapping` fails validation
**Describe the bug**
Trying to load an OpensearchDocumentStore with a JSON string as value for the `custom_mapping` field fails.
**Error message**... | diff --git a/haystack/pipelines/config.py b/haystack/pipelines/config.py
--- a/haystack/pipelines/config.py
+++ b/haystack/pipelines/config.py
@@ -97,7 +97,10 @@
return yaml.safe_load(stream)
-JSON_FIELDS = ["custom_query"] # ElasticsearchDocumentStore.custom_query
+JSON_FIELDS = [
+ "custom_query", #... | {"golden_diff": "diff --git a/haystack/pipelines/config.py b/haystack/pipelines/config.py\n--- a/haystack/pipelines/config.py\n+++ b/haystack/pipelines/config.py\n@@ -97,7 +97,10 @@\n return yaml.safe_load(stream)\n \n \n-JSON_FIELDS = [\"custom_query\"] # ElasticsearchDocumentStore.custom_query\n+JSON_FIELDS ... |
gh_patches_debug_643 | rasdani/github-patches | git_diff | ivy-llc__ivy-12830 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
multi_dot
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/torch/linalg.py`
Conten... | diff --git a/ivy/functional/frontends/torch/linalg.py b/ivy/functional/frontends/torch/linalg.py
--- a/ivy/functional/frontends/torch/linalg.py
+++ b/ivy/functional/frontends/torch/linalg.py
@@ -236,3 +236,9 @@
output = ivy.reshape(output, (*original_shape, N))
output = ivy.astype(output, x.dtype)
return... | {"golden_diff": "diff --git a/ivy/functional/frontends/torch/linalg.py b/ivy/functional/frontends/torch/linalg.py\n--- a/ivy/functional/frontends/torch/linalg.py\n+++ b/ivy/functional/frontends/torch/linalg.py\n@@ -236,3 +236,9 @@\n output = ivy.reshape(output, (*original_shape, N))\n output = ivy.astype(output... |
gh_patches_debug_644 | rasdani/github-patches | git_diff | svthalia__concrexit-1677 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: 'view site' from event detail admin forwards to wrong url
In GitLab by @JobDoesburg on Dec 4, 2019, 19:43
<!--
You want something new.
-->
### One-sentence description
Improve navigation between a... | diff --git a/website/events/admin_views.py b/website/events/admin_views.py
--- a/website/events/admin_views.py
+++ b/website/events/admin_views.py
@@ -37,7 +37,7 @@
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
- context.update({"payment": Payment, "has_permis... | {"golden_diff": "diff --git a/website/events/admin_views.py b/website/events/admin_views.py\n--- a/website/events/admin_views.py\n+++ b/website/events/admin_views.py\n@@ -37,7 +37,7 @@\n def get_context_data(self, **kwargs):\n context = super().get_context_data(**kwargs)\n \n- context.update({\"payme... |
gh_patches_debug_645 | rasdani/github-patches | git_diff | interlegis__sapl-1564 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pesquisa matérias legislativas
Ao preencher alguns dados no form de pesquisa de matéria legislativa e clicar em pesquisar, ocorre o seguinte:
No chrome o botão desabilita e a seta do mouse vira um sinal de p... | diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py
--- a/sapl/crispy_layout_mixin.py
+++ b/sapl/crispy_layout_mixin.py
@@ -38,7 +38,7 @@
return FormActions(
Submit('salvar', save_label, css_class='pull-right',
# para impedir resubmissão do form
- onclick='... | {"golden_diff": "diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py\n--- a/sapl/crispy_layout_mixin.py\n+++ b/sapl/crispy_layout_mixin.py\n@@ -38,7 +38,7 @@\n return FormActions(\n Submit('salvar', save_label, css_class='pull-right',\n # para impedir resubmiss\u00e3o do fo... |
gh_patches_debug_646 | rasdani/github-patches | git_diff | django-oscar__django-oscar-2684 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ImportError: No module named 'phonenumbers'
Hi!
I'm trying to start a project from the beginning with `1.6rc1` version with python 3.5.0
```
virtualenv venv
source venv/bin/activate
pip install django... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -37,6 +37,7 @@
# For manipulating search URLs
'purl>=0.7',
# For phone number field
+ 'phonenumbers',
'django-phonenumber-field>=2.0,<2.1',
# Used for oscar.test.contextmanagers.mock_signal_receiver
'mock>=1.0.1,<3.0',
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -37,6 +37,7 @@\n # For manipulating search URLs\n 'purl>=0.7',\n # For phone number field\n+ 'phonenumbers',\n 'django-phonenumber-field>=2.0,<2.1',\n # Used for oscar.test.contextmanagers.mock_signal_receiver\n... |
gh_patches_debug_647 | rasdani/github-patches | git_diff | psychopy__psychopy-667 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Inconsistent method signature (or missing hook?)
Windows XP, Psychopy 1.80.06
window.flip calls dispatch_events() for each _eventDispatchers (pyglet winType), but DirectInputDevice (hardware/joystick/pyglet_... | diff --git a/psychopy/hardware/joystick/pyglet_input/directinput.py b/psychopy/hardware/joystick/pyglet_input/directinput.py
--- a/psychopy/hardware/joystick/pyglet_input/directinput.py
+++ b/psychopy/hardware/joystick/pyglet_input/directinput.py
@@ -162,6 +162,10 @@
index = event.dwOfs // 4
s... | {"golden_diff": "diff --git a/psychopy/hardware/joystick/pyglet_input/directinput.py b/psychopy/hardware/joystick/pyglet_input/directinput.py\n--- a/psychopy/hardware/joystick/pyglet_input/directinput.py\n+++ b/psychopy/hardware/joystick/pyglet_input/directinput.py\n@@ -162,6 +162,10 @@\n index = event.dwOf... |
gh_patches_debug_648 | rasdani/github-patches | git_diff | napari__napari-6901 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deprecate/Remove `CallDefault`
## 🧰 Task
In `napari/utils/misc.py`, `CallDefault` seem to not be used since #2266. We should investigate adding a deprecation message and thinking about removal if this is ... | diff --git a/napari/utils/misc.py b/napari/utils/misc.py
--- a/napari/utils/misc.py
+++ b/napari/utils/misc.py
@@ -398,6 +398,13 @@
class CallDefault(inspect.Parameter):
+ warnings.warn(
+ trans._(
+ '`CallDefault` in napari v0.5.0 and will be removed in v0.6.0.',
+ ),
+ category... | {"golden_diff": "diff --git a/napari/utils/misc.py b/napari/utils/misc.py\n--- a/napari/utils/misc.py\n+++ b/napari/utils/misc.py\n@@ -398,6 +398,13 @@\n \n \n class CallDefault(inspect.Parameter):\n+ warnings.warn(\n+ trans._(\n+ '`CallDefault` in napari v0.5.0 and will be removed in v0.6.0.',\n+ ... |
gh_patches_debug_649 | rasdani/github-patches | git_diff | wagtail__wagtail-10633 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add support for Pillow 10.0.0
### Is your proposal related to a problem?
Pillow 10.0.0 [has just been released.](https://github.com/python-pillow/Pillow/releases/tag/10.0.0) Wagtail 5.0.2 [restricts Pillow... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@
"djangorestframework>=3.11.1,<4.0",
"django-filter>=2.2,<24",
"draftjs_exporter>=2.1.5,<3.0",
- "Pillow>=4.0.0,<10.0.0",
+ "Pillow>=9.1.0,<11.0.0",
"beautifulsoup4>=4.8,<4.12",
"html5lib>=0.999,<2",
"Wil... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -27,7 +27,7 @@\n \"djangorestframework>=3.11.1,<4.0\",\n \"django-filter>=2.2,<24\",\n \"draftjs_exporter>=2.1.5,<3.0\",\n- \"Pillow>=4.0.0,<10.0.0\",\n+ \"Pillow>=9.1.0,<11.0.0\",\n \"beautifulsoup4>=4.8,<4.12\"... |
gh_patches_debug_650 | rasdani/github-patches | git_diff | docker__docker-py-2793 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Couldn't create secret object
I couldn't create secret object, the problem seemed to boil down to the way that a secret was being created from the docker daemon response.
https://github.com/docker/docker-... | diff --git a/docker/models/secrets.py b/docker/models/secrets.py
--- a/docker/models/secrets.py
+++ b/docker/models/secrets.py
@@ -30,6 +30,7 @@
def create(self, **kwargs):
obj = self.client.api.create_secret(**kwargs)
+ obj.setdefault("Spec", {})["Name"] = kwargs.get("name")
return self... | {"golden_diff": "diff --git a/docker/models/secrets.py b/docker/models/secrets.py\n--- a/docker/models/secrets.py\n+++ b/docker/models/secrets.py\n@@ -30,6 +30,7 @@\n \n def create(self, **kwargs):\n obj = self.client.api.create_secret(**kwargs)\n+ obj.setdefault(\"Spec\", {})[\"Name\"] = kwargs.get(... |
gh_patches_debug_651 | rasdani/github-patches | git_diff | mindee__doctr-929 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix encode_string function
### Bug description
Currently there is no check if the single characters are also available in the given vocabulary.
We need a check for this :)
TODO's:
- [ ] check that in... | diff --git a/doctr/datasets/utils.py b/doctr/datasets/utils.py
--- a/doctr/datasets/utils.py
+++ b/doctr/datasets/utils.py
@@ -72,7 +72,10 @@
Returns:
A list encoding the input_string"""
- return list(map(vocab.index, input_string)) # type: ignore[arg-type]
+ try:
+ return list(map(vocab.i... | {"golden_diff": "diff --git a/doctr/datasets/utils.py b/doctr/datasets/utils.py\n--- a/doctr/datasets/utils.py\n+++ b/doctr/datasets/utils.py\n@@ -72,7 +72,10 @@\n Returns:\n A list encoding the input_string\"\"\"\n \n- return list(map(vocab.index, input_string)) # type: ignore[arg-type]\n+ try:\n+ ... |
gh_patches_debug_652 | rasdani/github-patches | git_diff | pre-commit__pre-commit-933 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pre-commit autoupdate fails when config is empty
Running `pre-commit autoupdate` with an empty `.pre-commit-config.yaml` results in the below error:
```An unexpected error has occurred: IndexError: list inde... | diff --git a/pre_commit/commands/migrate_config.py b/pre_commit/commands/migrate_config.py
--- a/pre_commit/commands/migrate_config.py
+++ b/pre_commit/commands/migrate_config.py
@@ -21,7 +21,8 @@
# Find the first non-header line
lines = contents.splitlines(True)
i = 0
- while _is_header_line(lines[i]... | {"golden_diff": "diff --git a/pre_commit/commands/migrate_config.py b/pre_commit/commands/migrate_config.py\n--- a/pre_commit/commands/migrate_config.py\n+++ b/pre_commit/commands/migrate_config.py\n@@ -21,7 +21,8 @@\n # Find the first non-header line\n lines = contents.splitlines(True)\n i = 0\n- while ... |
gh_patches_debug_653 | rasdani/github-patches | git_diff | spack__spack-10720 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
git-lfs aborts (sometimes), fix in progress upstream
This is mostly an FYI.
Starting with `git-lfs@2.7.0` we frequently had `git-lfs` aborting. In some situations it ran successfully, in others it didn't.... | diff --git a/var/spack/repos/builtin/packages/git-lfs/package.py b/var/spack/repos/builtin/packages/git-lfs/package.py
--- a/var/spack/repos/builtin/packages/git-lfs/package.py
+++ b/var/spack/repos/builtin/packages/git-lfs/package.py
@@ -22,6 +22,8 @@
depends_on('go@1.5:', type='build')
depends_on('git@1.8.2... | {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/git-lfs/package.py b/var/spack/repos/builtin/packages/git-lfs/package.py\n--- a/var/spack/repos/builtin/packages/git-lfs/package.py\n+++ b/var/spack/repos/builtin/packages/git-lfs/package.py\n@@ -22,6 +22,8 @@\n depends_on('go@1.5:', type='build')\n ... |
gh_patches_debug_654 | rasdani/github-patches | git_diff | pre-commit__pre-commit-438 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cygwin python checking should happen after setup code
Regressed as part of #436
Before:
```
$ ./pre-commit/venv_cygwin_python/bin/pre-commit clean
An error has occurred: FatalError: git failed. Is it ... | diff --git a/pre_commit/main.py b/pre_commit/main.py
--- a/pre_commit/main.py
+++ b/pre_commit/main.py
@@ -152,8 +152,8 @@
with error_handler():
add_logging_handler(args.color)
- git.check_for_cygwin_mismatch()
runner = Runner.create()
+ git.check_for_cygwin_mismatch()
... | {"golden_diff": "diff --git a/pre_commit/main.py b/pre_commit/main.py\n--- a/pre_commit/main.py\n+++ b/pre_commit/main.py\n@@ -152,8 +152,8 @@\n \n with error_handler():\n add_logging_handler(args.color)\n- git.check_for_cygwin_mismatch()\n runner = Runner.create()\n+ git.check_for_cyg... |
gh_patches_debug_655 | rasdani/github-patches | git_diff | jazzband__django-debug-toolbar-181 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
template context dicts are not showing with django 1.3.0
Here is what I got inspecting all of my pages:
```
{}
{'csrf_token': <django.utils.functional.__proxy__ object at 0x101fba050>}
{}
{'LANGUAGES': '<<la... | diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py
--- a/debug_toolbar/panels/template.py
+++ b/debug_toolbar/panels/template.py
@@ -47,6 +47,7 @@
template_rendered.connect(self._store_template_info)
def _store_template_info(self, sender, **kwargs):
+ kwargs['context... | {"golden_diff": "diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py\n--- a/debug_toolbar/panels/template.py\n+++ b/debug_toolbar/panels/template.py\n@@ -47,6 +47,7 @@\n template_rendered.connect(self._store_template_info)\n \n def _store_template_info(self, sender, **kwargs):\n... |
gh_patches_debug_656 | rasdani/github-patches | git_diff | xonsh__xonsh-3527 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Weird completion issue
<!--- Provide a general summary of the issue in the Title above -->
<!--- If you have a question along the lines of "How do I do this Bash command in xonsh"
please first look over the... | diff --git a/xonsh/completers/pip.py b/xonsh/completers/pip.py
--- a/xonsh/completers/pip.py
+++ b/xonsh/completers/pip.py
@@ -9,12 +9,12 @@
@xl.lazyobject
def PIP_RE():
- return re.compile(r"\bx?pip(?:\d|\.)*")
+ return re.compile(r"\bx?pip(?:\d|\.)*\b")
@xl.lazyobject
def PIP_LIST_RE():
- return re... | {"golden_diff": "diff --git a/xonsh/completers/pip.py b/xonsh/completers/pip.py\n--- a/xonsh/completers/pip.py\n+++ b/xonsh/completers/pip.py\n@@ -9,12 +9,12 @@\n \n @xl.lazyobject\n def PIP_RE():\n- return re.compile(r\"\\bx?pip(?:\\d|\\.)*\")\n+ return re.compile(r\"\\bx?pip(?:\\d|\\.)*\\b\")\n \n \n @xl.lazyob... |
gh_patches_debug_657 | rasdani/github-patches | git_diff | matrix-org__synapse-10968 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`/admin/whois` broken in v1.44.0rc1
### Description
`/_matrix/client/r0/admin/whois/{user_id}` is broken and returns `{"errcode":"M_UNKNOWN","error":"Internal server error"}`
https://sentry.matrix.org/s... | diff --git a/synapse/storage/databases/main/client_ips.py b/synapse/storage/databases/main/client_ips.py
--- a/synapse/storage/databases/main/client_ips.py
+++ b/synapse/storage/databases/main/client_ips.py
@@ -591,8 +591,8 @@
)
results.update(
- ((row["access_token"], row["ip"]), (row["u... | {"golden_diff": "diff --git a/synapse/storage/databases/main/client_ips.py b/synapse/storage/databases/main/client_ips.py\n--- a/synapse/storage/databases/main/client_ips.py\n+++ b/synapse/storage/databases/main/client_ips.py\n@@ -591,8 +591,8 @@\n )\n \n results.update(\n- ((row[\"access_tok... |
gh_patches_debug_658 | rasdani/github-patches | git_diff | codespell-project__codespell-1517 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
dictionary_rare missing
`codespell_lib/data/dictionary_rare.txt` is missing in the 1.17.0 PyPI source package causing a crash when all builtin dictionaries are used.
--- END ISSUE ---
Below are some code se... | diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py
--- a/codespell_lib/_codespell.py
+++ b/codespell_lib/_codespell.py
@@ -31,7 +31,7 @@
USAGE = """
\t%prog [OPTIONS] [file1 file2 ... fileN]
"""
-VERSION = '1.17.0'
+VERSION = '1.17.1'
# Users might want to link this file into /usr/local/bin, s... | {"golden_diff": "diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py\n--- a/codespell_lib/_codespell.py\n+++ b/codespell_lib/_codespell.py\n@@ -31,7 +31,7 @@\n USAGE = \"\"\"\n \\t%prog [OPTIONS] [file1 file2 ... fileN]\n \"\"\"\n-VERSION = '1.17.0'\n+VERSION = '1.17.1'\n \n # Users might want to lin... |
gh_patches_debug_659 | rasdani/github-patches | git_diff | vaexio__vaex-2066 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG-REPORT] (Major) vaex hdf5 incompatible with number 1.22.4
Thank you for reaching out and helping us improve Vaex!
Before you submit a new Issue, please read through the [documentation](https://docs.va... | diff --git a/packages/vaex-hdf5/vaex/hdf5/writer.py b/packages/vaex-hdf5/vaex/hdf5/writer.py
--- a/packages/vaex-hdf5/vaex/hdf5/writer.py
+++ b/packages/vaex-hdf5/vaex/hdf5/writer.py
@@ -30,6 +30,8 @@
self._layout_called = False
def close(self):
+ # make sure we don't have references to the numpy... | {"golden_diff": "diff --git a/packages/vaex-hdf5/vaex/hdf5/writer.py b/packages/vaex-hdf5/vaex/hdf5/writer.py\n--- a/packages/vaex-hdf5/vaex/hdf5/writer.py\n+++ b/packages/vaex-hdf5/vaex/hdf5/writer.py\n@@ -30,6 +30,8 @@\n self._layout_called = False\n \n def close(self):\n+ # make sure we don't have... |
gh_patches_debug_660 | rasdani/github-patches | git_diff | pypa__pip-3003 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Verbose log should mention that the installation is using a cached wheel
I was working on the final details of the coverage 4.0b1 kit, and had to tweak things. This meant trying to install 4.0b1 a number of ... | diff --git a/pip/req/req_install.py b/pip/req/req_install.py
--- a/pip/req/req_install.py
+++ b/pip/req/req_install.py
@@ -260,6 +260,8 @@
self._link = link
else:
self._link = self._wheel_cache.cached_wheel(link, self.name)
+ if self._link != link:
+ logger.d... | {"golden_diff": "diff --git a/pip/req/req_install.py b/pip/req/req_install.py\n--- a/pip/req/req_install.py\n+++ b/pip/req/req_install.py\n@@ -260,6 +260,8 @@\n self._link = link\n else:\n self._link = self._wheel_cache.cached_wheel(link, self.name)\n+ if self._link != link:\n... |
gh_patches_debug_661 | rasdani/github-patches | git_diff | pymedusa__Medusa-3545 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[APP SUBMITTED]: IndexError: tuple index out of range
### INFO
**Python Version**: `2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2]`
**Operating System**: `Linux-4.9.35-v7+-armv7l-with-debian-8.0`
**Locale... | diff --git a/medusa/indexers/indexer_base.py b/medusa/indexers/indexer_base.py
--- a/medusa/indexers/indexer_base.py
+++ b/medusa/indexers/indexer_base.py
@@ -257,6 +257,9 @@
}
)
+ if not images_by_rating:
+ continue
+
# Get the highest rated image
... | {"golden_diff": "diff --git a/medusa/indexers/indexer_base.py b/medusa/indexers/indexer_base.py\n--- a/medusa/indexers/indexer_base.py\n+++ b/medusa/indexers/indexer_base.py\n@@ -257,6 +257,9 @@\n }\n )\n \n+ if not images_by_rating:\n+ continue\n+\n # G... |
gh_patches_debug_662 | rasdani/github-patches | git_diff | pyro-ppl__pyro-2846 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[bug] Runtime error during SVI inference when using poutine.do()
### Issue Description
Setting: a simple model with 2 latent Gaussians z1 and z2, giving rise to x ~ N( z1+z2, I).
In this setting p(z2 | ... | diff --git a/pyro/poutine/do_messenger.py b/pyro/poutine/do_messenger.py
--- a/pyro/poutine/do_messenger.py
+++ b/pyro/poutine/do_messenger.py
@@ -66,6 +66,7 @@
# split node, avoid reapplying self recursively to new node
new_msg = msg.copy()
+ new_msg["cond_indep_stack"] = () # a... | {"golden_diff": "diff --git a/pyro/poutine/do_messenger.py b/pyro/poutine/do_messenger.py\n--- a/pyro/poutine/do_messenger.py\n+++ b/pyro/poutine/do_messenger.py\n@@ -66,6 +66,7 @@\n \n # split node, avoid reapplying self recursively to new node\n new_msg = msg.copy()\n+ new_msg[\"con... |
gh_patches_debug_663 | rasdani/github-patches | git_diff | getredash__redash-2951 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Users who are already disabled still appear on CLI
<!--
#####################################################################
#
# Need support? USE THE FORUM! https://discuss.redash.io/c/support.
#
# Don... | diff --git a/redash/cli/users.py b/redash/cli/users.py
--- a/redash/cli/users.py
+++ b/redash/cli/users.py
@@ -245,5 +245,5 @@
if i > 0:
print("-" * 20)
- print("Id: {}\nName: {}\nEmail: {}\nOrganization: {}".format(
- user.id, user.name.encode('utf-8'), user.email, user.org.na... | {"golden_diff": "diff --git a/redash/cli/users.py b/redash/cli/users.py\n--- a/redash/cli/users.py\n+++ b/redash/cli/users.py\n@@ -245,5 +245,5 @@\n if i > 0:\n print(\"-\" * 20)\n \n- print(\"Id: {}\\nName: {}\\nEmail: {}\\nOrganization: {}\".format(\n- user.id, user.name.encode('... |
gh_patches_debug_664 | rasdani/github-patches | git_diff | iterative__dvc-1859 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Repro: logger doesn't work correctly on exception
DVC version: 0.35.5+d80137,
Platform: Linux
Method of installation: pip install from git
https://github.com/iterative/dvc/blob/54072d70b542115a78a374fa70... | diff --git a/dvc/command/repro.py b/dvc/command/repro.py
--- a/dvc/command/repro.py
+++ b/dvc/command/repro.py
@@ -48,7 +48,7 @@
metrics = self.repo.metrics.show()
show_metrics(metrics)
except DvcException:
- logger.exception()
+ logge... | {"golden_diff": "diff --git a/dvc/command/repro.py b/dvc/command/repro.py\n--- a/dvc/command/repro.py\n+++ b/dvc/command/repro.py\n@@ -48,7 +48,7 @@\n metrics = self.repo.metrics.show()\n show_metrics(metrics)\n except DvcException:\n- logger.exception(... |
gh_patches_debug_665 | rasdani/github-patches | git_diff | pyca__cryptography-5648 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Testing with tar bundle complains about unknown pytest markers
The source bundle ``cryptography-3.3.1.tar.gz`` does not include tox.ini. The ini file is also used to define pytest markers and pytest configura... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -72,7 +72,7 @@
setup_requires=setup_requirements,
extras_require={
"test": [
- "pytest>=4.4.0",
+ "pytest>=6.0",
"pytest-cov",
"pytest-subtests",
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -72,7 +72,7 @@\n setup_requires=setup_requirements,\n extras_require={\n \"test\": [\n- \"pytest>=4.4.0\",\n+ \"pytest>=6.0\",\n \"pytest-cov\",\n ... |
gh_patches_debug_666 | rasdani/github-patches | git_diff | scikit-image__scikit-image-2643 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
module 'skimage.filters' has no attribute 'denoise_tv_chambolle'
There are a couple of undefined symbols in [`filters` module](https://github.com/scikit-image/scikit-image/blob/master/skimage/filters/__init_... | diff --git a/skimage/filters/__init__.py b/skimage/filters/__init__.py
--- a/skimage/filters/__init__.py
+++ b/skimage/filters/__init__.py
@@ -43,9 +43,6 @@
'roberts_pos_diag',
'roberts_neg_diag',
'laplace',
- 'denoise_tv_chambolle',
- 'denoise_bilateral',
- ... | {"golden_diff": "diff --git a/skimage/filters/__init__.py b/skimage/filters/__init__.py\n--- a/skimage/filters/__init__.py\n+++ b/skimage/filters/__init__.py\n@@ -43,9 +43,6 @@\n 'roberts_pos_diag',\n 'roberts_neg_diag',\n 'laplace',\n- 'denoise_tv_chambolle',\n- 'de... |
gh_patches_debug_667 | rasdani/github-patches | git_diff | apache__airflow-8165 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Security Views broken
Thanks, @KostyaEsmukov for finding this bug. I was able to replicate this bug.
**Apache Airflow version**: 1.10.10.rc3
**Environment**:
- **OS** (e.g. from /etc/os-release):... | diff --git a/airflow/www/utils.py b/airflow/www/utils.py
--- a/airflow/www/utils.py
+++ b/airflow/www/utils.py
@@ -406,8 +406,8 @@
'_' from the key to lookup the column names.
"""
- def __init__(self, obj):
- super().__init__(obj)
+ def __init__(self, obj, session=None):
+ super().__init... | {"golden_diff": "diff --git a/airflow/www/utils.py b/airflow/www/utils.py\n--- a/airflow/www/utils.py\n+++ b/airflow/www/utils.py\n@@ -406,8 +406,8 @@\n '_' from the key to lookup the column names.\n \n \"\"\"\n- def __init__(self, obj):\n- super().__init__(obj)\n+ def __init__(self, obj, session=N... |
gh_patches_debug_668 | rasdani/github-patches | git_diff | translate__pootle-5447 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Suggestion review breaks with edited units
Reported initially by @bellayet and we did the following test to replicate:
1. @bellayet submitted a Bengali suggestion to [an untranslated en_ZA units](https://mozi... | diff --git a/pootle/apps/pootle_store/views.py b/pootle/apps/pootle_store/views.py
--- a/pootle/apps/pootle_store/views.py
+++ b/pootle/apps/pootle_store/views.py
@@ -556,6 +556,7 @@
json['checks'] = _get_critical_checks_snippet(request, unit)
json['user_score'] = request.user.public_score
+ ... | {"golden_diff": "diff --git a/pootle/apps/pootle_store/views.py b/pootle/apps/pootle_store/views.py\n--- a/pootle/apps/pootle_store/views.py\n+++ b/pootle/apps/pootle_store/views.py\n@@ -556,6 +556,7 @@\n json['checks'] = _get_critical_checks_snippet(request, unit)\n \n json['user_score'] = request.... |
gh_patches_debug_669 | rasdani/github-patches | git_diff | svthalia__concrexit-3642 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unexpected description/clarification on form field in registration form
### Describe the bug
On the page to register as a Thalia member, there is a form field with an explanation/clarification saying 'Warn... | diff --git a/website/registrations/forms.py b/website/registrations/forms.py
--- a/website/registrations/forms.py
+++ b/website/registrations/forms.py
@@ -47,6 +47,7 @@
)
)
self.fields["birthday"].widget.input_type = "date"
+ self.fields["length"].help_text = None
def clean(... | {"golden_diff": "diff --git a/website/registrations/forms.py b/website/registrations/forms.py\n--- a/website/registrations/forms.py\n+++ b/website/registrations/forms.py\n@@ -47,6 +47,7 @@\n )\n )\n self.fields[\"birthday\"].widget.input_type = \"date\"\n+ self.fields[\"length\"].help... |
gh_patches_debug_670 | rasdani/github-patches | git_diff | ManageIQ__integration_tests-204 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Model up yaml configs from the DB
Various yaml configs are stored in the database, including the one we'll most likely want to imspect, which is the vmdb config.
The schema, for our purposes, is two fields i... | diff --git a/fixtures/cfmedb.py b/fixtures/cfmedb.py
--- a/fixtures/cfmedb.py
+++ b/fixtures/cfmedb.py
@@ -70,3 +70,13 @@
Session = sessionmaker(bind=db.engine)
return Session()
+@pytest.fixture
+def db_yamls(db_session):
+ '''Returns the yamls from the db configuration table as a dict'''
+
+ import d... | {"golden_diff": "diff --git a/fixtures/cfmedb.py b/fixtures/cfmedb.py\n--- a/fixtures/cfmedb.py\n+++ b/fixtures/cfmedb.py\n@@ -70,3 +70,13 @@\n Session = sessionmaker(bind=db.engine)\n return Session()\n \n+@pytest.fixture\n+def db_yamls(db_session):\n+ '''Returns the yamls from the db configuration table as... |
gh_patches_debug_671 | rasdani/github-patches | git_diff | pypi__warehouse-12139 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
2FA giveaway lists critical + 2FA required projects, should only list critical
<!--
NOTE: This issue should be for problems with PyPI itself, including:
* pypi.org
* test.pypi.org
* files.... | diff --git a/warehouse/views.py b/warehouse/views.py
--- a/warehouse/views.py
+++ b/warehouse/views.py
@@ -485,6 +485,7 @@
return set(
project.name
for project in user_projects(self.request)["projects_requiring_2fa"]
+ if project.pypi_mandates_2fa
... | {"golden_diff": "diff --git a/warehouse/views.py b/warehouse/views.py\n--- a/warehouse/views.py\n+++ b/warehouse/views.py\n@@ -485,6 +485,7 @@\n return set(\n project.name\n for project in user_projects(self.request)[\"projects_requiring_2fa\"]\n+ if project.py... |
gh_patches_debug_672 | rasdani/github-patches | git_diff | xonsh__xonsh-3330 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
xonsh doesn't play well with percol
<!--- Provide a general summary of the issue in the Title above -->
<!--- If you have a question along the lines of "How do I do this Bash command in xonsh"
please first ... | diff --git a/xonsh/commands_cache.py b/xonsh/commands_cache.py
--- a/xonsh/commands_cache.py
+++ b/xonsh/commands_cache.py
@@ -474,6 +474,7 @@
"nano": predict_help_ver,
"nmcli": predict_true,
"nvim": predict_false,
+ "percol": predict_false,
"ponysay": predict_help_ver,
... | {"golden_diff": "diff --git a/xonsh/commands_cache.py b/xonsh/commands_cache.py\n--- a/xonsh/commands_cache.py\n+++ b/xonsh/commands_cache.py\n@@ -474,6 +474,7 @@\n \"nano\": predict_help_ver,\n \"nmcli\": predict_true,\n \"nvim\": predict_false,\n+ \"percol\": predict_false,\n \"... |
gh_patches_debug_673 | rasdani/github-patches | git_diff | pypa__pipenv-1662 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ImportError: No module named shutil_get_terminal_size
Describe the issue briefly here.
```
$ pipenv run python
Creating a virtualenv for this project…
Using /usr/bin/python (2.7.14) to create virtualenv... | diff --git a/pipenv/pew/__main__.py b/pipenv/pew/__main__.py
--- a/pipenv/pew/__main__.py
+++ b/pipenv/pew/__main__.py
@@ -1,4 +1,13 @@
from pipenv.patched import pew
+import os
+import sys
+
+pipenv_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+pipenv_vendor = os.sep.join([pipenv_root, 'vendor']... | {"golden_diff": "diff --git a/pipenv/pew/__main__.py b/pipenv/pew/__main__.py\n--- a/pipenv/pew/__main__.py\n+++ b/pipenv/pew/__main__.py\n@@ -1,4 +1,13 @@\n from pipenv.patched import pew\n+import os\n+import sys\n+\n+pipenv_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n+pipenv_vendor = os.sep.jo... |
gh_patches_debug_674 | rasdani/github-patches | git_diff | kivy__kivy-1361 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
kivy.network.urlrequest: No callback parameter: on_failure
Documentation for urlrequest shows a parameter
on_failure: callback(request, result)
which haven't been implementet.
--- END ISSUE ---
Below are s... | diff --git a/kivy/network/urlrequest.py b/kivy/network/urlrequest.py
--- a/kivy/network/urlrequest.py
+++ b/kivy/network/urlrequest.py
@@ -138,6 +138,8 @@
.. versionadded:: 1.8.0
Parameter `decode` added.
Parameter `file_path` added.
+ Parameter `on_redirect` added.
+ Parameter `on_... | {"golden_diff": "diff --git a/kivy/network/urlrequest.py b/kivy/network/urlrequest.py\n--- a/kivy/network/urlrequest.py\n+++ b/kivy/network/urlrequest.py\n@@ -138,6 +138,8 @@\n .. versionadded:: 1.8.0\n Parameter `decode` added.\n Parameter `file_path` added.\n+ Parameter `on_redirect` added.... |
gh_patches_debug_675 | rasdani/github-patches | git_diff | holoviz__panel-3157 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add files to `__init__` for autocomplete in VS Code
When writing in vs code the autocomplete only works for modules imported in an `__init__.py` file, e.g. `pn.widgets.IntSlider` work but `pn.viewable.Viewer`... | diff --git a/panel/__init__.py b/panel/__init__.py
--- a/panel/__init__.py
+++ b/panel/__init__.py
@@ -3,6 +3,8 @@
from . import pane # noqa
from . import param # noqa
from . import pipeline # noqa
+from . import reactive # noqa
+from . import viewable # noqa
from . import widgets # noqa
from .config import conf... | {"golden_diff": "diff --git a/panel/__init__.py b/panel/__init__.py\n--- a/panel/__init__.py\n+++ b/panel/__init__.py\n@@ -3,6 +3,8 @@\n from . import pane # noqa\n from . import param # noqa\n from . import pipeline # noqa\n+from . import reactive # noqa\n+from . import viewable # noqa\n from . import widgets # noqa\n... |
gh_patches_debug_676 | rasdani/github-patches | git_diff | WeblateOrg__weblate-2672 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Gerrit tests are failing on openSUSE
Gerrit tests are failing in openSUSE build, regardless of version since 3.1 release:
```
[ 927s] ERROR: test_merge_both (weblate.vcs.tests.test_vcs.VCSGerritTest)
[ 9... | diff --git a/weblate/vcs/git.py b/weblate/vcs/git.py
--- a/weblate/vcs/git.py
+++ b/weblate/vcs/git.py
@@ -378,7 +378,8 @@
return cls._popen(['review', '--version'], err=True).split()[-1]
def push(self):
- self.execute(['review', '--yes', self.branch])
+ if self.needs_push():
+ ... | {"golden_diff": "diff --git a/weblate/vcs/git.py b/weblate/vcs/git.py\n--- a/weblate/vcs/git.py\n+++ b/weblate/vcs/git.py\n@@ -378,7 +378,8 @@\n return cls._popen(['review', '--version'], err=True).split()[-1]\n \n def push(self):\n- self.execute(['review', '--yes', self.branch])\n+ if self.ne... |
gh_patches_debug_677 | rasdani/github-patches | git_diff | pytorch__pytorch-2073 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Why there is a `device_id` parameter in `nn.module.cpu()` call?
`pytorch/torch/nn/modules/modules.py`
```python
def cpu(self, device_id=None):
"""Moves all model parameters and buffers to the CPU."""
... | diff --git a/torch/nn/modules/module.py b/torch/nn/modules/module.py
--- a/torch/nn/modules/module.py
+++ b/torch/nn/modules/module.py
@@ -147,7 +147,7 @@
"""
return self._apply(lambda t: t.cuda(device_id))
- def cpu(self, device_id=None):
+ def cpu(self):
"""Moves all model parameter... | {"golden_diff": "diff --git a/torch/nn/modules/module.py b/torch/nn/modules/module.py\n--- a/torch/nn/modules/module.py\n+++ b/torch/nn/modules/module.py\n@@ -147,7 +147,7 @@\n \"\"\"\n return self._apply(lambda t: t.cuda(device_id))\n \n- def cpu(self, device_id=None):\n+ def cpu(self):\n ... |
gh_patches_debug_678 | rasdani/github-patches | git_diff | getsentry__sentry-6037 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unicode error in logging module
## Reporting Bugs
Sentry version: 8.19
Installation: 8.19 onpremise Docker images with docker-compose
Stacktrace:
```
web_1 | Traceback (most recent call last):... | diff --git a/src/sentry/runner/initializer.py b/src/sentry/runner/initializer.py
--- a/src/sentry/runner/initializer.py
+++ b/src/sentry/runner/initializer.py
@@ -198,6 +198,7 @@
structlog.stdlib.PositionalArgumentsFormatter(),
structlog.processors.format_exc_info,
structlog.proce... | {"golden_diff": "diff --git a/src/sentry/runner/initializer.py b/src/sentry/runner/initializer.py\n--- a/src/sentry/runner/initializer.py\n+++ b/src/sentry/runner/initializer.py\n@@ -198,6 +198,7 @@\n structlog.stdlib.PositionalArgumentsFormatter(),\n structlog.processors.format_exc_info,\n ... |
gh_patches_debug_679 | rasdani/github-patches | git_diff | conda-forge__conda-smithy-1269 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
feedstock created with essentially blank conda-forge.yml
<!--
Thanks for reporting your issue.
Please fill out the sections below.
-->
Issue:
The [proj-data-feedstock](https://github.com/conda-forge/pr... | diff --git a/conda_smithy/cli.py b/conda_smithy/cli.py
--- a/conda_smithy/cli.py
+++ b/conda_smithy/cli.py
@@ -43,7 +43,7 @@
forge_yml = os.path.join(target_directory, "conda-forge.yml")
if not os.path.exists(forge_yml):
with feedstock_io.write_file(forge_yml) as fh:
- fh.write(u"[]")
+ ... | {"golden_diff": "diff --git a/conda_smithy/cli.py b/conda_smithy/cli.py\n--- a/conda_smithy/cli.py\n+++ b/conda_smithy/cli.py\n@@ -43,7 +43,7 @@\n forge_yml = os.path.join(target_directory, \"conda-forge.yml\")\n if not os.path.exists(forge_yml):\n with feedstock_io.write_file(forge_yml) as fh:\n- ... |
gh_patches_debug_680 | rasdani/github-patches | git_diff | cisagov__manage.get.gov-1985 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Provide documentation about user_groups and permission changes
### Issue description
If we edit permissions for User Groups, such as to make different items viewable on django admin, this requires a very s... | diff --git a/src/registrar/models/user_group.py b/src/registrar/models/user_group.py
--- a/src/registrar/models/user_group.py
+++ b/src/registrar/models/user_group.py
@@ -5,6 +5,11 @@
class UserGroup(Group):
+ """
+ UserGroup sets read and write permissions for superusers (who have full access)
+ and anal... | {"golden_diff": "diff --git a/src/registrar/models/user_group.py b/src/registrar/models/user_group.py\n--- a/src/registrar/models/user_group.py\n+++ b/src/registrar/models/user_group.py\n@@ -5,6 +5,11 @@\n \n \n class UserGroup(Group):\n+ \"\"\"\n+ UserGroup sets read and write permissions for superusers (who hav... |
gh_patches_debug_681 | rasdani/github-patches | git_diff | gratipay__gratipay.com-2595 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Member page broken during payday
https://app.getsentry.com/gittip/gittip/group/26715022/
```
TooMany: Got 2 rows; expecting 0 or 1.
Stacktrace (most recent call last):
File "site-packages/algorithm.py", ... | diff --git a/gittip/models/_mixin_team.py b/gittip/models/_mixin_team.py
--- a/gittip/models/_mixin_team.py
+++ b/gittip/models/_mixin_team.py
@@ -87,6 +87,7 @@
WHERE ts_end > ts_start
ORDER BY ts_start DESC LIMIT 1
)
+ ORDER BY timestamp ASC L... | {"golden_diff": "diff --git a/gittip/models/_mixin_team.py b/gittip/models/_mixin_team.py\n--- a/gittip/models/_mixin_team.py\n+++ b/gittip/models/_mixin_team.py\n@@ -87,6 +87,7 @@\n WHERE ts_end > ts_start\n ORDER BY ts_start DESC LIMIT 1\n )\n+ ... |
gh_patches_debug_682 | rasdani/github-patches | git_diff | dask__dask-9653 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
padding datetime arrays with missing values
**Describe the issue**:
Trying to pad with `NaT` (the `nan`-equivalent for datetime dtypes) results in a `TypeError`:
```pytb
TypeError: `pad_value` must be co... | diff --git a/dask/array/creation.py b/dask/array/creation.py
--- a/dask/array/creation.py
+++ b/dask/array/creation.py
@@ -905,7 +905,7 @@
def expand_pad_value(array, pad_value):
- if isinstance(pad_value, Number):
+ if isinstance(pad_value, Number) or getattr(pad_value, "ndim", None) == 0:
pad_valu... | {"golden_diff": "diff --git a/dask/array/creation.py b/dask/array/creation.py\n--- a/dask/array/creation.py\n+++ b/dask/array/creation.py\n@@ -905,7 +905,7 @@\n \n \n def expand_pad_value(array, pad_value):\n- if isinstance(pad_value, Number):\n+ if isinstance(pad_value, Number) or getattr(pad_value, \"ndim\", No... |
gh_patches_debug_683 | rasdani/github-patches | git_diff | openai__gym-1551 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
VectorEnv keeps process from exiting
The following script hangs forever:
```
from gym.vector import make
def main():
venv = make("PongNoFrameskip-v4", num_envs=3)
venv.reset()
while True... | diff --git a/gym/vector/async_vector_env.py b/gym/vector/async_vector_env.py
--- a/gym/vector/async_vector_env.py
+++ b/gym/vector/async_vector_env.py
@@ -97,7 +97,7 @@
self.parent_pipes.append(parent_pipe)
self.processes.append(process)
- process.deamon = True
+ ... | {"golden_diff": "diff --git a/gym/vector/async_vector_env.py b/gym/vector/async_vector_env.py\n--- a/gym/vector/async_vector_env.py\n+++ b/gym/vector/async_vector_env.py\n@@ -97,7 +97,7 @@\n self.parent_pipes.append(parent_pipe)\n self.processes.append(process)\n \n- proce... |
gh_patches_debug_684 | rasdani/github-patches | git_diff | netbox-community__netbox-15890 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
OpenIDC SSO through apache stopped working after update to 3.7.6
### Deployment Type
Self-hosted
### NetBox Version
v3.7.6
### Python Version
3.9
### Steps to Reproduce
This is a longstanding NetBox in... | diff --git a/contrib/gunicorn.py b/contrib/gunicorn.py
--- a/contrib/gunicorn.py
+++ b/contrib/gunicorn.py
@@ -14,3 +14,7 @@
# The maximum number of requests a worker can handle before being respawned
max_requests = 5000
max_requests_jitter = 500
+
+# Uncomment this line to accept HTTP headers containing underscores... | {"golden_diff": "diff --git a/contrib/gunicorn.py b/contrib/gunicorn.py\n--- a/contrib/gunicorn.py\n+++ b/contrib/gunicorn.py\n@@ -14,3 +14,7 @@\n # The maximum number of requests a worker can handle before being respawned\n max_requests = 5000\n max_requests_jitter = 500\n+\n+# Uncomment this line to accept HTTP heade... |
gh_patches_debug_685 | rasdani/github-patches | git_diff | Rapptz__discord.py-9457 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PartialEmoji.from_str incorrectly assumes emojis starting with `a` but not including `:` are animated
### Summary
PartialEmoji.from_str incorrectly assumes emojis starting with `a` but not including `:` ar... | diff --git a/discord/partial_emoji.py b/discord/partial_emoji.py
--- a/discord/partial_emoji.py
+++ b/discord/partial_emoji.py
@@ -94,7 +94,7 @@
__slots__ = ('animated', 'name', 'id', '_state')
- _CUSTOM_EMOJI_RE = re.compile(r'<?(?P<animated>a)?:?(?P<name>[A-Za-z0-9\_]+):(?P<id>[0-9]{13,20})>?')
+ _CUST... | {"golden_diff": "diff --git a/discord/partial_emoji.py b/discord/partial_emoji.py\n--- a/discord/partial_emoji.py\n+++ b/discord/partial_emoji.py\n@@ -94,7 +94,7 @@\n \n __slots__ = ('animated', 'name', 'id', '_state')\n \n- _CUSTOM_EMOJI_RE = re.compile(r'<?(?P<animated>a)?:?(?P<name>[A-Za-z0-9\\_]+):(?P<id>[0-... |
gh_patches_debug_686 | rasdani/github-patches | git_diff | scrapy__scrapy-809 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
get_func_args maximum recursion
https://github.com/scrapy/scrapy/blob/master/scrapy/utils/python.py#L149
Today I was working on a project were I have to skip the first item of a list, and then join the rest.... | diff --git a/scrapy/utils/python.py b/scrapy/utils/python.py
--- a/scrapy/utils/python.py
+++ b/scrapy/utils/python.py
@@ -147,6 +147,8 @@
elif hasattr(func, '__call__'):
if inspect.isroutine(func):
return []
+ elif getattr(func, '__name__', None) == '__call__':
+ return []
... | {"golden_diff": "diff --git a/scrapy/utils/python.py b/scrapy/utils/python.py\n--- a/scrapy/utils/python.py\n+++ b/scrapy/utils/python.py\n@@ -147,6 +147,8 @@\n elif hasattr(func, '__call__'):\n if inspect.isroutine(func):\n return []\n+ elif getattr(func, '__name__', None) == '__call__':... |
gh_patches_debug_687 | rasdani/github-patches | git_diff | pydantic__pydantic-1605 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
JavaScript negative timestamp are not supported
# Bug
When parsing a JavaScript positive timestamp (number of milliseconds since EPOCH), pydantic parses it properly. However, for a negative JavaScript time... | diff --git a/pydantic/datetime_parse.py b/pydantic/datetime_parse.py
--- a/pydantic/datetime_parse.py
+++ b/pydantic/datetime_parse.py
@@ -75,7 +75,7 @@
def from_unix_seconds(seconds: Union[int, float]) -> datetime:
- while seconds > MS_WATERSHED:
+ while abs(seconds) > MS_WATERSHED:
seconds /= 1000... | {"golden_diff": "diff --git a/pydantic/datetime_parse.py b/pydantic/datetime_parse.py\n--- a/pydantic/datetime_parse.py\n+++ b/pydantic/datetime_parse.py\n@@ -75,7 +75,7 @@\n \n \n def from_unix_seconds(seconds: Union[int, float]) -> datetime:\n- while seconds > MS_WATERSHED:\n+ while abs(seconds) > MS_WATERSHED:... |
gh_patches_debug_688 | rasdani/github-patches | git_diff | ivy-llc__ivy-18929 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bincount
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/paddle/tensor/linalg.py`... | diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py
--- a/ivy/functional/frontends/paddle/tensor/linalg.py
+++ b/ivy/functional/frontends/paddle/tensor/linalg.py
@@ -170,3 +170,9 @@
@to_ivy_arrays_and_back
def transpose(x, perm, name=None):
return ivy.... | {"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py\n--- a/ivy/functional/frontends/paddle/tensor/linalg.py\n+++ b/ivy/functional/frontends/paddle/tensor/linalg.py\n@@ -170,3 +170,9 @@\n @to_ivy_arrays_and_back\n def transpose(x, perm, name=N... |
gh_patches_debug_689 | rasdani/github-patches | git_diff | cloud-custodian__cloud-custodian-2355 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
How to detect unused application-elbs reliably?
I'm having a tough time trying to get Cloud Custodian to flag unused application ELBs, after some Googling I'm trying this approach:
```
- name: find-unused... | diff --git a/c7n/resources/appelb.py b/c7n/resources/appelb.py
--- a/c7n/resources/appelb.py
+++ b/c7n/resources/appelb.py
@@ -59,7 +59,7 @@
id = 'LoadBalancerArn'
filter_name = None
filter_type = None
- dimension = None
+ dimension = "LoadBalancer"
date = 'CreatedTime'... | {"golden_diff": "diff --git a/c7n/resources/appelb.py b/c7n/resources/appelb.py\n--- a/c7n/resources/appelb.py\n+++ b/c7n/resources/appelb.py\n@@ -59,7 +59,7 @@\n id = 'LoadBalancerArn'\n filter_name = None\n filter_type = None\n- dimension = None\n+ dimension = \"LoadBalancer\"\n ... |
gh_patches_debug_690 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-2832 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
set colorama upper bound to <0.4.4
colorama v0.4.4 (released in the last 24 hours) is missing an sdist, which trips up the homebrew packaging step of our [dbt release flow](https://github.com/fishtown-analyti... | diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -64,7 +64,7 @@
'sqlparse>=0.2.3,<0.4',
'networkx>=2.3,<3',
'minimal-snowplow-tracker==0.0.2',
- 'colorama>=0.3.9,<0.5',
+ 'colorama>=0.3.9,<0.4.4',
'agate>=1.6,<2',
'isodate>=... | {"golden_diff": "diff --git a/core/setup.py b/core/setup.py\n--- a/core/setup.py\n+++ b/core/setup.py\n@@ -64,7 +64,7 @@\n 'sqlparse>=0.2.3,<0.4',\n 'networkx>=2.3,<3',\n 'minimal-snowplow-tracker==0.0.2',\n- 'colorama>=0.3.9,<0.5',\n+ 'colorama>=0.3.9,<0.4.4',\n 'agate>=1.... |
gh_patches_debug_691 | rasdani/github-patches | git_diff | PyGithub__PyGithub-1922 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hashable classes
Hello people!
I wonder if entities like Repository, Issue, PullRequest and etc. could be hashable in future, i.e. using them in structures like dictionary or sets would be possible?
--- E... | diff --git a/github/GithubObject.py b/github/GithubObject.py
--- a/github/GithubObject.py
+++ b/github/GithubObject.py
@@ -286,6 +286,9 @@
def __eq__(self, other):
return other.__class__ is self.__class__ and other._url.value == self._url.value
+ def __hash__(self):
+ return hash(self._url.val... | {"golden_diff": "diff --git a/github/GithubObject.py b/github/GithubObject.py\n--- a/github/GithubObject.py\n+++ b/github/GithubObject.py\n@@ -286,6 +286,9 @@\n def __eq__(self, other):\n return other.__class__ is self.__class__ and other._url.value == self._url.value\n \n+ def __hash__(self):\n+ ... |
gh_patches_debug_692 | rasdani/github-patches | git_diff | pymodbus-dev__pymodbus-1288 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
REPL client Remove `unit` argument
<!--
Please use the Pymodbus gitter channel at https://gitter.im/pymodbus_dev/Lobby or Stack Overflow(tag [pymodbus](https://stackoverflow.com/questions/tagged/pymodbus) fo... | diff --git a/pymodbus/repl/client/helper.py b/pymodbus/repl/client/helper.py
--- a/pymodbus/repl/client/helper.py
+++ b/pymodbus/repl/client/helper.py
@@ -164,7 +164,7 @@
)
commands = {
f"client.{c[0]}": Command(
- f"client.{c[0]}", argspec(c[1]), inspect.getdoc(c[1]), unit=True
+ ... | {"golden_diff": "diff --git a/pymodbus/repl/client/helper.py b/pymodbus/repl/client/helper.py\n--- a/pymodbus/repl/client/helper.py\n+++ b/pymodbus/repl/client/helper.py\n@@ -164,7 +164,7 @@\n )\n commands = {\n f\"client.{c[0]}\": Command(\n- f\"client.{c[0]}\", argspec(c[1]), inspect.getdoc... |
gh_patches_debug_693 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-566 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Feature request - block quote formatting in reviews
I published [a review](https://bookwyrm.social/user/darius/review/14497) just now with a markdown-style block quote in it. The second-to-last paragraph is f... | diff --git a/bookwyrm/sanitize_html.py b/bookwyrm/sanitize_html.py
--- a/bookwyrm/sanitize_html.py
+++ b/bookwyrm/sanitize_html.py
@@ -7,7 +7,7 @@
def __init__(self):
HTMLParser.__init__(self)
self.allowed_tags = [
- 'p', 'br',
+ 'p', 'blockquote', 'br',
'b', 'i... | {"golden_diff": "diff --git a/bookwyrm/sanitize_html.py b/bookwyrm/sanitize_html.py\n--- a/bookwyrm/sanitize_html.py\n+++ b/bookwyrm/sanitize_html.py\n@@ -7,7 +7,7 @@\n def __init__(self):\n HTMLParser.__init__(self)\n self.allowed_tags = [\n- 'p', 'br',\n+ 'p', 'blockquote', '... |
gh_patches_debug_694 | rasdani/github-patches | git_diff | djangopackages__djangopackages-865 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Invalidate Cloudflare cache when a static file changes
**Describe the bug**
On the #719 the [grid css](https://github.com/djangopackages/djangopackages/blob/930c7565ea216e42380694d32f1311b6d64e78b9/static/... | diff --git a/fabfile.py b/fabfile.py
--- a/fabfile.py
+++ b/fabfile.py
@@ -152,6 +152,10 @@
docker_compose(f"exec {service} python manage.py maintenance_mode off")
+def purge_cache(service):
+ docker_compose(f"exec {service} cli4 --delete purge_everything=true /zones/:djangopackages.org/purge_cache")
+
+
d... | {"golden_diff": "diff --git a/fabfile.py b/fabfile.py\n--- a/fabfile.py\n+++ b/fabfile.py\n@@ -152,6 +152,10 @@\n docker_compose(f\"exec {service} python manage.py maintenance_mode off\")\n \n \n+def purge_cache(service):\n+ docker_compose(f\"exec {service} cli4 --delete purge_everything=true /zones/:djangopacka... |
gh_patches_debug_695 | rasdani/github-patches | git_diff | hylang__hy-1322 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The lexer hits the maximum recursion depth given a file with too many comment lines
$ yes ';' | head -n 500 >/tmp/foo.hy
$ hy /tmp/foo.hy
Traceback (most recent call last):
File "/hom... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@
"." + filename[:-len(".hy")])
install.run(self)
-install_requires = ['rply>=0.7.0', 'astor>=0.5', 'clint>=0.4']
+install_requires = ['rply>=0.7.5', 'astor>=0.5', 'clint>=0.4']
if os.name == 'nt':
i... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -30,7 +30,7 @@\n \".\" + filename[:-len(\".hy\")])\n install.run(self)\n \n-install_requires = ['rply>=0.7.0', 'astor>=0.5', 'clint>=0.4']\n+install_requires = ['rply>=0.7.5', 'astor>=0.5', 'clint>=0.4'... |
gh_patches_debug_696 | rasdani/github-patches | git_diff | alibaba__FederatedScope-496 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Message asked for local pretraining is missing the "content" para when train a graph model in distributed mode?
If no "content" para, there will raise ValueError('The data type {} has not been supported.'.f... | diff --git a/federatedscope/core/message.py b/federatedscope/core/message.py
--- a/federatedscope/core/message.py
+++ b/federatedscope/core/message.py
@@ -21,7 +21,7 @@
sender=0,
receiver=0,
state=0,
- content=None,
+ content='None',
... | {"golden_diff": "diff --git a/federatedscope/core/message.py b/federatedscope/core/message.py\n--- a/federatedscope/core/message.py\n+++ b/federatedscope/core/message.py\n@@ -21,7 +21,7 @@\n sender=0,\n receiver=0,\n state=0,\n- content=None,\n+ ... |
gh_patches_debug_697 | rasdani/github-patches | git_diff | privacyidea__privacyidea-2009 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Initialize the resolver type of user object
It seems like that in certain corner cases (like with the token janitor and orphaned tokens) it can happen that the resolver type (``self.rtype``) of a user object ... | diff --git a/privacyidea/lib/user.py b/privacyidea/lib/user.py
--- a/privacyidea/lib/user.py
+++ b/privacyidea/lib/user.py
@@ -94,6 +94,7 @@
resolver = ""
self.resolver = resolver or ""
self.uid = None
+ self.rtype = None
# Enrich user object with information from the user... | {"golden_diff": "diff --git a/privacyidea/lib/user.py b/privacyidea/lib/user.py\n--- a/privacyidea/lib/user.py\n+++ b/privacyidea/lib/user.py\n@@ -94,6 +94,7 @@\n resolver = \"\"\n self.resolver = resolver or \"\"\n self.uid = None\n+ self.rtype = None\n # Enrich user object w... |
gh_patches_debug_698 | rasdani/github-patches | git_diff | docker__docker-py-592 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
How to set the create_container --cpuset-cpus arameters?
VERSION
1.2.1
create_container(..., cpuset=0) doesn't seem to work
--- END ISSUE ---
Below are some code segments, each from a relevant file. O... | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -577,6 +577,7 @@
'Entrypoint': entrypoint,
'CpuShares': cpu_shares,
'Cpuset': cpuset,
+ 'CpusetCpus': cpuset,
'WorkingDir': working_dir,
'MemorySwap':... | {"golden_diff": "diff --git a/docker/utils/utils.py b/docker/utils/utils.py\n--- a/docker/utils/utils.py\n+++ b/docker/utils/utils.py\n@@ -577,6 +577,7 @@\n 'Entrypoint': entrypoint,\n 'CpuShares': cpu_shares,\n 'Cpuset': cpuset,\n+ 'CpusetCpus': cpuset,\n 'WorkingDir': working_di... |
gh_patches_debug_699 | rasdani/github-patches | git_diff | vllm-project__vllm-402 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Input and output orders are different
I was trying to do batch inference by feeding a list of texts into `llm.generate()`. But I found that the outputs have different orders from examples in the input list. F... | diff --git a/vllm/entrypoints/llm.py b/vllm/entrypoints/llm.py
--- a/vllm/entrypoints/llm.py
+++ b/vllm/entrypoints/llm.py
@@ -155,4 +155,8 @@
pbar.update(1)
if use_tqdm:
pbar.close()
+ # Sort the outputs by request ID.
+ # This is necessary because some requ... | {"golden_diff": "diff --git a/vllm/entrypoints/llm.py b/vllm/entrypoints/llm.py\n--- a/vllm/entrypoints/llm.py\n+++ b/vllm/entrypoints/llm.py\n@@ -155,4 +155,8 @@\n pbar.update(1)\n if use_tqdm:\n pbar.close()\n+ # Sort the outputs by request ID.\n+ # This is ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.