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_1200 | rasdani/github-patches | git_diff | Cog-Creators__Red-DiscordBot-2889 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Removing commands on bot load
# Other bugs
Loading a cog with bot.remove_command statements in init causes it to error out and not load.
#### What were you trying to do?
I have a cog that has sta... | diff --git a/redbot/core/bot.py b/redbot/core/bot.py
--- a/redbot/core/bot.py
+++ b/redbot/core/bot.py
@@ -461,6 +461,8 @@
def remove_command(self, name: str) -> None:
command = super().remove_command(name)
+ if not command:
+ return
command.requires.reset()
if isinst... | {"golden_diff": "diff --git a/redbot/core/bot.py b/redbot/core/bot.py\n--- a/redbot/core/bot.py\n+++ b/redbot/core/bot.py\n@@ -461,6 +461,8 @@\n \n def remove_command(self, name: str) -> None:\n command = super().remove_command(name)\n+ if not command:\n+ return\n command.requires.... |
gh_patches_debug_1201 | rasdani/github-patches | git_diff | openedx__ecommerce-348 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Running migrations for Travis builds
We run migrations to ensure no migrations are missing, and they work on fresh installs.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One o... | diff --git a/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py b/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py
--- a/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py
+++ b/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py
@@ -13,8 +13,7 @@
"""
#... | {"golden_diff": "diff --git a/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py b/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py\n--- a/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py\n+++ b/ecommerce/extensions/order/migrations/0003_auto_20150224_1520.py\n@@ -13,8 +13,... |
gh_patches_debug_1202 | rasdani/github-patches | git_diff | apluslms__a-plus-964 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove the HTML attribute id="exercise" when chapters and exercises are rendered in the A+ frontend
HTML id attributes must be unique. However, currently, the `id="exercise"` is used multiple times. It seems ... | diff --git a/lib/remote_page.py b/lib/remote_page.py
--- a/lib/remote_page.py
+++ b/lib/remote_page.py
@@ -175,6 +175,8 @@
def element_or_body(self, search_attributes):
element = self.select_element_or_body(search_attributes)
+ if element.get('id') == 'exercise':
+ del element['id']
... | {"golden_diff": "diff --git a/lib/remote_page.py b/lib/remote_page.py\n--- a/lib/remote_page.py\n+++ b/lib/remote_page.py\n@@ -175,6 +175,8 @@\n \n def element_or_body(self, search_attributes):\n element = self.select_element_or_body(search_attributes)\n+ if element.get('id') == 'exercise':\n+ ... |
gh_patches_debug_1203 | rasdani/github-patches | git_diff | qutip__qutip-2183 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot import qutip after latest scipy release
### Bug Description
I've encountered this bug when creating a clean environment, and installing `qutip` (and IPython as console) through mamba.
Next, I've open... | diff --git a/qutip/fastsparse.py b/qutip/fastsparse.py
--- a/qutip/fastsparse.py
+++ b/qutip/fastsparse.py
@@ -52,7 +52,11 @@
self._shape = tuple(int(s) for s in shape)
self.dtype = complex
self.maxprint = 50
- self.format = 'csr'
+ if hasattr(self, "_format"):
+ ... | {"golden_diff": "diff --git a/qutip/fastsparse.py b/qutip/fastsparse.py\n--- a/qutip/fastsparse.py\n+++ b/qutip/fastsparse.py\n@@ -52,7 +52,11 @@\n self._shape = tuple(int(s) for s in shape)\n self.dtype = complex\n self.maxprint = 50\n- self.format = 'csr'\n+ if hasattr(se... |
gh_patches_debug_1204 | rasdani/github-patches | git_diff | qtile__qtile-2641 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bar moves when screen wakes up
<!--
Please do not ask general questions here! There are [community
contact](https://github.com/qtile/qtile#community) options for that.
-->
# Issue description
<!--
A... | diff --git a/libqtile/bar.py b/libqtile/bar.py
--- a/libqtile/bar.py
+++ b/libqtile/bar.py
@@ -65,6 +65,7 @@
def _configure(self, qtile, screen):
self.qtile = qtile
self.screen = screen
+ self.size = self.initial_size
# If both horizontal and vertical gaps are present, screen corn... | {"golden_diff": "diff --git a/libqtile/bar.py b/libqtile/bar.py\n--- a/libqtile/bar.py\n+++ b/libqtile/bar.py\n@@ -65,6 +65,7 @@\n def _configure(self, qtile, screen):\n self.qtile = qtile\n self.screen = screen\n+ self.size = self.initial_size\n # If both horizontal and vertical gaps... |
gh_patches_debug_1205 | rasdani/github-patches | git_diff | sublimelsp__LSP-555 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TypeError: expected string or buffer
https://github.com/tomv564/LSP/blob/e37c4e6d7d959890c465cada35dff7fef22feb6e/plugin/core/types.py#L50-L54
It happened only once so far, when `plugin_loaded` was called ... | diff --git a/plugin/completion.py b/plugin/completion.py
--- a/plugin/completion.py
+++ b/plugin/completion.py
@@ -51,10 +51,7 @@
@classmethod
def is_applicable(cls, settings):
syntax = settings.get('syntax')
- if syntax is not None:
- return is_supported_syntax(syntax, client_confi... | {"golden_diff": "diff --git a/plugin/completion.py b/plugin/completion.py\n--- a/plugin/completion.py\n+++ b/plugin/completion.py\n@@ -51,10 +51,7 @@\n @classmethod\n def is_applicable(cls, settings):\n syntax = settings.get('syntax')\n- if syntax is not None:\n- return is_supported_sy... |
gh_patches_debug_1206 | rasdani/github-patches | git_diff | facebookresearch__ParlAI-1428 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pytorch Data Teacher seems to hang
I observe a weird hang when using the pytorch data teacher:
```
doesn't hang
PYTHONPATH=. python examples/display_data.py -t wizard_of_wikipedia:WizardDialogKnowledgeTe... | diff --git a/parlai/core/pytorch_data_teacher.py b/parlai/core/pytorch_data_teacher.py
--- a/parlai/core/pytorch_data_teacher.py
+++ b/parlai/core/pytorch_data_teacher.py
@@ -29,6 +29,13 @@
from threading import Thread, Condition, RLock
+if torch.version.__version__.startswith('0.'):
+ raise ImportError(
+ ... | {"golden_diff": "diff --git a/parlai/core/pytorch_data_teacher.py b/parlai/core/pytorch_data_teacher.py\n--- a/parlai/core/pytorch_data_teacher.py\n+++ b/parlai/core/pytorch_data_teacher.py\n@@ -29,6 +29,13 @@\n from threading import Thread, Condition, RLock\n \n \n+if torch.version.__version__.startswith('0.'):\n+ ... |
gh_patches_debug_1207 | rasdani/github-patches | git_diff | litestar-org__litestar-1327 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Rule exceptions using noqa should be very specific
I think this would ignore all linting here instead of maybe the one we want. May be best to be specific?
https://beta.ruff.rs/docs/configuration/#error-s... | diff --git a/starlite/contrib/sqlalchemy_1/config.py b/starlite/contrib/sqlalchemy_1/config.py
--- a/starlite/contrib/sqlalchemy_1/config.py
+++ b/starlite/contrib/sqlalchemy_1/config.py
@@ -265,7 +265,7 @@
)
return cast("sessionmaker", self.session_maker_instance)
- def create_db_session_dep... | {"golden_diff": "diff --git a/starlite/contrib/sqlalchemy_1/config.py b/starlite/contrib/sqlalchemy_1/config.py\n--- a/starlite/contrib/sqlalchemy_1/config.py\n+++ b/starlite/contrib/sqlalchemy_1/config.py\n@@ -265,7 +265,7 @@\n )\n return cast(\"sessionmaker\", self.session_maker_instance)\n \n- ... |
gh_patches_debug_1208 | rasdani/github-patches | git_diff | docker__docker-py-2213 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
swarm.init() does not return a value
No return value unlike as specified in documentation.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain ... | diff --git a/docker/models/swarm.py b/docker/models/swarm.py
--- a/docker/models/swarm.py
+++ b/docker/models/swarm.py
@@ -112,6 +112,7 @@
init_kwargs['swarm_spec'] = self.client.api.create_swarm_spec(**kwargs)
self.client.api.init_swarm(**init_kwargs)
self.reload()
+ return True
... | {"golden_diff": "diff --git a/docker/models/swarm.py b/docker/models/swarm.py\n--- a/docker/models/swarm.py\n+++ b/docker/models/swarm.py\n@@ -112,6 +112,7 @@\n init_kwargs['swarm_spec'] = self.client.api.create_swarm_spec(**kwargs)\n self.client.api.init_swarm(**init_kwargs)\n self.reload()\n+ ... |
gh_patches_debug_1209 | rasdani/github-patches | git_diff | open-mmlab__mmcv-474 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug feedback.
Thanks for your codes.
In [mmcv/runner/base_runner](https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/base_runner.py#L385),
` def register_logger_hooks(self, log_config):
... | diff --git a/mmcv/runner/iter_based_runner.py b/mmcv/runner/iter_based_runner.py
--- a/mmcv/runner/iter_based_runner.py
+++ b/mmcv/runner/iter_based_runner.py
@@ -222,5 +222,6 @@
self.register_checkpoint_hook(checkpoint_config)
self.register_hook(IterTimerHook())
if log_config is not None:
- ... | {"golden_diff": "diff --git a/mmcv/runner/iter_based_runner.py b/mmcv/runner/iter_based_runner.py\n--- a/mmcv/runner/iter_based_runner.py\n+++ b/mmcv/runner/iter_based_runner.py\n@@ -222,5 +222,6 @@\n self.register_checkpoint_hook(checkpoint_config)\n self.register_hook(IterTimerHook())\n if log... |
gh_patches_debug_1210 | rasdani/github-patches | git_diff | kserve__kserve-3005 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Load kubeconfig from dict
/kind feature
**Allow loading of kubeconfig from dictionary in KServe python client**
The Kubernetes python client has a function to load kubeconfigs from dict which is quite han... | diff --git a/python/kserve/kserve/api/kserve_client.py b/python/kserve/kserve/api/kserve_client.py
--- a/python/kserve/kserve/api/kserve_client.py
+++ b/python/kserve/kserve/api/kserve_client.py
@@ -43,7 +43,7 @@
config_dict=config_dict,
context=context,
cl... | {"golden_diff": "diff --git a/python/kserve/kserve/api/kserve_client.py b/python/kserve/kserve/api/kserve_client.py\n--- a/python/kserve/kserve/api/kserve_client.py\n+++ b/python/kserve/kserve/api/kserve_client.py\n@@ -43,7 +43,7 @@\n config_dict=config_dict,\n context=context,\n... |
gh_patches_debug_1211 | rasdani/github-patches | git_diff | openmc-dev__openmc-678 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tally with cell filter assumes the cells tallied to are mutually exclusive
If a tally is created with a cell filter, the bins (i.e. cells) are assumed to be mutually exclusive. For instance, we can modify the... | diff --git a/openmc/filter.py b/openmc/filter.py
--- a/openmc/filter.py
+++ b/openmc/filter.py
@@ -162,6 +162,11 @@
if not isinstance(bins, Iterable):
bins = [bins]
+ # If the bin is 0D numpy array, promote to 1D
+ elif isinstance(bins, np.ndarray):
+ if bins.shape == ()... | {"golden_diff": "diff --git a/openmc/filter.py b/openmc/filter.py\n--- a/openmc/filter.py\n+++ b/openmc/filter.py\n@@ -162,6 +162,11 @@\n if not isinstance(bins, Iterable):\n bins = [bins]\n \n+ # If the bin is 0D numpy array, promote to 1D\n+ elif isinstance(bins, np.ndarray):\n+ ... |
gh_patches_debug_1212 | rasdani/github-patches | git_diff | google__jax-19166 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unexpected behavior of `jax.scipy.stats.binom.pmf`
### Description
pmf of a random variable should be zero outside of its range. While plotting the graph for `jax.scipy.stats.binom.pmf`, I notice that for ... | diff --git a/jax/_src/scipy/stats/binom.py b/jax/_src/scipy/stats/binom.py
--- a/jax/_src/scipy/stats/binom.py
+++ b/jax/_src/scipy/stats/binom.py
@@ -33,7 +33,7 @@
)
log_linear_term = lax.add(xlogy(y, p), xlog1py(lax.sub(n, y), lax.neg(p)))
log_probs = lax.add(comb_term, log_linear_term)
- return jnp... | {"golden_diff": "diff --git a/jax/_src/scipy/stats/binom.py b/jax/_src/scipy/stats/binom.py\n--- a/jax/_src/scipy/stats/binom.py\n+++ b/jax/_src/scipy/stats/binom.py\n@@ -33,7 +33,7 @@\n )\n log_linear_term = lax.add(xlogy(y, p), xlog1py(lax.sub(n, y), lax.neg(p)))\n log_probs = lax.add(comb_term, log_linea... |
gh_patches_debug_1213 | rasdani/github-patches | git_diff | xonsh__xonsh-4622 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Valid Python fails when invoked inside a function
This simple code should return the same list as it is provided with:
```python3
def _fail(x):
return [i for i in x if i is not None and i < 10]
```
H... | diff --git a/xonsh/ast.py b/xonsh/ast.py
--- a/xonsh/ast.py
+++ b/xonsh/ast.py
@@ -521,6 +521,11 @@
node.values[i] = self.try_subproc_toks(val, strip_expr=True)
return node
+ def visit_comprehension(self, node):
+ """Handles visiting list comprehensions, set comprehensions,
+ ... | {"golden_diff": "diff --git a/xonsh/ast.py b/xonsh/ast.py\n--- a/xonsh/ast.py\n+++ b/xonsh/ast.py\n@@ -521,6 +521,11 @@\n node.values[i] = self.try_subproc_toks(val, strip_expr=True)\n return node\n \n+ def visit_comprehension(self, node):\n+ \"\"\"Handles visiting list comprehensions,... |
gh_patches_debug_1214 | rasdani/github-patches | git_diff | scikit-hep__pyhf-1261 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove duplicated libraries in setup.py
# Description
In `setup.py` and `setup.cfg` there are some duplicated libraries that should be removed from `setup.py`.
https://github.com/scikit-hep/pyhf/blob/75... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -39,12 +39,10 @@
'pytest-console-scripts',
'pytest-mpl',
'pydocstyle',
- 'coverage>=4.0', # coveralls
'papermill~=2.0',
'nteract-scrapbook~=0.2',
'jupyter',
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -39,12 +39,10 @@\n 'pytest-console-scripts',\n 'pytest-mpl',\n 'pydocstyle',\n- 'coverage>=4.0', # coveralls\n 'papermill~=2.0',\n 'nteract-scrapbook~=0.2',\n ... |
gh_patches_debug_1215 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-10076 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Synthesis failed for recommender
Hello! Autosynth couldn't regenerate recommender. :broken_heart:
Here's the output from running `synth.py`:
```
Cloning into 'working_repo'...
Switched to branch 'autosynth-... | diff --git a/recommender/synth.py b/recommender/synth.py
--- a/recommender/synth.py
+++ b/recommender/synth.py
@@ -29,7 +29,8 @@
for version in versions:
library = gapic.py_library(
"recommender", version,
- include_protos=True
+ include_protos=True,
+ config_path="/google/cloud/reco... | {"golden_diff": "diff --git a/recommender/synth.py b/recommender/synth.py\n--- a/recommender/synth.py\n+++ b/recommender/synth.py\n@@ -29,7 +29,8 @@\n for version in versions:\n library = gapic.py_library(\n \"recommender\", version,\n- include_protos=True\n+ include_protos=True,\n+ con... |
gh_patches_debug_1216 | rasdani/github-patches | git_diff | python-telegram-bot__python-telegram-bot-1216 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Typo in comment in conversationbot2.py
<!--
Thanks for reporting issues of python-telegram-bot!
Use this template to notify us if you found a bug, or if you want to request a new feature.
If you're looki... | diff --git a/examples/conversationbot2.py b/examples/conversationbot2.py
--- a/examples/conversationbot2.py
+++ b/examples/conversationbot2.py
@@ -109,7 +109,7 @@
# Get the dispatcher to register handlers
dp = updater.dispatcher
- # Add conversation handler with the states GENDER, PHOTO, LOCATION and BIO... | {"golden_diff": "diff --git a/examples/conversationbot2.py b/examples/conversationbot2.py\n--- a/examples/conversationbot2.py\n+++ b/examples/conversationbot2.py\n@@ -109,7 +109,7 @@\n # Get the dispatcher to register handlers\n dp = updater.dispatcher\n \n- # Add conversation handler with the states GENDER,... |
gh_patches_debug_1217 | rasdani/github-patches | git_diff | StackStorm__st2-3843 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Action 'linux.service' fails on Centos7
When I tried to execute restart some service on the Centos7 server got the following error:
```
Traceback (most recent call last):
File "/tmp/5a0459bc07ac686fb813a... | diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py
--- a/contrib/linux/actions/service.py
+++ b/contrib/linux/actions/service.py
@@ -18,7 +18,8 @@
else:
print("Unknown service")
sys.exit(2)
-elif re.search(distro, 'Redhat') or re.search(distro, 'Fedora'):
+elif re.se... | {"golden_diff": "diff --git a/contrib/linux/actions/service.py b/contrib/linux/actions/service.py\n--- a/contrib/linux/actions/service.py\n+++ b/contrib/linux/actions/service.py\n@@ -18,7 +18,8 @@\n else:\n print(\"Unknown service\")\n sys.exit(2)\n-elif re.search(distro, 'Redhat') or re.search(dist... |
gh_patches_debug_1218 | rasdani/github-patches | git_diff | pytorch__vision-4283 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
a little problem when using some pretrained models
## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
A little problem.
I used some pretrained models to do object detection.
How... | diff --git a/torchvision/models/segmentation/segmentation.py b/torchvision/models/segmentation/segmentation.py
--- a/torchvision/models/segmentation/segmentation.py
+++ b/torchvision/models/segmentation/segmentation.py
@@ -186,6 +186,8 @@
raise NotImplementedError('This model does not use auxiliary loss')
... | {"golden_diff": "diff --git a/torchvision/models/segmentation/segmentation.py b/torchvision/models/segmentation/segmentation.py\n--- a/torchvision/models/segmentation/segmentation.py\n+++ b/torchvision/models/segmentation/segmentation.py\n@@ -186,6 +186,8 @@\n raise NotImplementedError('This model does not use ... |
gh_patches_debug_1219 | rasdani/github-patches | git_diff | kornia__kornia-1761 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ValueError when applying flip augmentations to boxes
### Describe the bug
Came across a strange bug while applying flip augmentations with bboxes. Running the below code snippet produces the following erro... | diff --git a/kornia/augmentation/container/utils.py b/kornia/augmentation/container/utils.py
--- a/kornia/augmentation/container/utils.py
+++ b/kornia/augmentation/container/utils.py
@@ -100,7 +100,7 @@
# If any inputs need to be transformed.
if mat is not None and to_apply is not None and to_apply.... | {"golden_diff": "diff --git a/kornia/augmentation/container/utils.py b/kornia/augmentation/container/utils.py\n--- a/kornia/augmentation/container/utils.py\n+++ b/kornia/augmentation/container/utils.py\n@@ -100,7 +100,7 @@\n \n # If any inputs need to be transformed.\n if mat is not None and to_apply is... |
gh_patches_debug_1220 | rasdani/github-patches | git_diff | sunpy__sunpy-2572 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pandas dataframe values return as numpy.datetime64 objects in local time zone. parse_time does not understand these objects.
Came across this issue today when using a pandas DataFrame. When you explicitly as... | diff --git a/sunpy/time/time.py b/sunpy/time/time.py
--- a/sunpy/time/time.py
+++ b/sunpy/time/time.py
@@ -129,8 +129,8 @@
"""
Parse a single numpy datetime64 object
"""
- # Validate (in an agnostic way) that we are getting a datetime rather than a date
- return datetime(*(dt.astype(datetime).timet... | {"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@@ -129,8 +129,8 @@\n \"\"\"\n Parse a single numpy datetime64 object\n \"\"\"\n- # Validate (in an agnostic way) that we are getting a datetime rather than a date\n- return datet... |
gh_patches_debug_1221 | rasdani/github-patches | git_diff | django-cms__django-filer-1378 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Field verbose_name should use gettext_lazy
Hi,
model field verbose_names should use gettext_lazy, because it creates migrations based on user language settings.
https://github.com/django-cms/django-file... | diff --git a/filer/models/foldermodels.py b/filer/models/foldermodels.py
--- a/filer/models/foldermodels.py
+++ b/filer/models/foldermodels.py
@@ -6,7 +6,7 @@
from django.urls import reverse
from django.utils.functional import cached_property
from django.utils.html import format_html, format_html_join
-from django.u... | {"golden_diff": "diff --git a/filer/models/foldermodels.py b/filer/models/foldermodels.py\n--- a/filer/models/foldermodels.py\n+++ b/filer/models/foldermodels.py\n@@ -6,7 +6,7 @@\n from django.urls import reverse\n from django.utils.functional import cached_property\n from django.utils.html import format_html, format_h... |
gh_patches_debug_1222 | rasdani/github-patches | git_diff | nonebot__nonebot2-561 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: Nonebot2通过正向Websocket连接go-cqhttp报错400
**描述问题:**
在目前最新的Nonebot2的release中使用websocket与go-cqhttp进行连接会报错400。
这个问题仅出现在了Linux端上,在Win环境下并不会出现400错误(无论是go-cqhttp运行在linux还是win下)。
此问题已经在私下测试完成复现了很多次。
**如何复现?... | diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py
--- a/nonebot/drivers/fastapi.py
+++ b/nonebot/drivers/fastapi.py
@@ -480,7 +480,7 @@
)
return
- headers = {**setup_.headers, "host": url.netloc.decode("ascii")}
+ headers = set... | {"golden_diff": "diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py\n--- a/nonebot/drivers/fastapi.py\n+++ b/nonebot/drivers/fastapi.py\n@@ -480,7 +480,7 @@\n )\n return\n \n- headers = {**setup_.headers, \"host\": url.netloc.decode(\"ascii\")}\n+... |
gh_patches_debug_1223 | rasdani/github-patches | git_diff | translate__pootle-6098 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
String needs to use plural form
Reported by @milupo in https://github.com/translate/pootle/issues/6061#issuecomment-284076850
There is one string more:
templates/includes/formtable.html:27
Showing %(co... | diff --git a/pootle/apps/pootle_store/forms.py b/pootle/apps/pootle_store/forms.py
--- a/pootle/apps/pootle_store/forms.py
+++ b/pootle/apps/pootle_store/forms.py
@@ -540,7 +540,7 @@
self.add_error(
"action",
forms.ValidationError(
- _("Suggestion '%s' c... | {"golden_diff": "diff --git a/pootle/apps/pootle_store/forms.py b/pootle/apps/pootle_store/forms.py\n--- a/pootle/apps/pootle_store/forms.py\n+++ b/pootle/apps/pootle_store/forms.py\n@@ -540,7 +540,7 @@\n self.add_error(\n \"action\",\n forms.ValidationError(\n- ... |
gh_patches_debug_1224 | rasdani/github-patches | git_diff | celery__celery-3997 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Request on_timeout should ignore soft time limit exception
When Request.on_timeout receive a soft timeout from billiard, it does the same as if it was receiving a hard time limit exception. This is ran by the... | diff --git a/celery/app/defaults.py b/celery/app/defaults.py
--- a/celery/app/defaults.py
+++ b/celery/app/defaults.py
@@ -285,7 +285,7 @@
'WARNING', old={'celery_redirect_stdouts_level'},
),
send_task_events=Option(
- False, type='bool', old={'celeryd_send_events'},
+ ... | {"golden_diff": "diff --git a/celery/app/defaults.py b/celery/app/defaults.py\n--- a/celery/app/defaults.py\n+++ b/celery/app/defaults.py\n@@ -285,7 +285,7 @@\n 'WARNING', old={'celery_redirect_stdouts_level'},\n ),\n send_task_events=Option(\n- False, type='bool', old={'celeryd_s... |
gh_patches_debug_1225 | rasdani/github-patches | git_diff | ivy-llc__ivy-19405 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Einsum
--- 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/tensorflow/raw_ops.py`
Con... | diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py
--- a/ivy/functional/frontends/tensorflow/raw_ops.py
+++ b/ivy/functional/frontends/tensorflow/raw_ops.py
@@ -920,3 +920,22 @@
"complex128",
),
}
+
+
+Einsum = to_ivy_arrays_and_back(
+ with_su... | {"golden_diff": "diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py\n--- a/ivy/functional/frontends/tensorflow/raw_ops.py\n+++ b/ivy/functional/frontends/tensorflow/raw_ops.py\n@@ -920,3 +920,22 @@\n \"complex128\",\n ),\n }\n+\n+\n+Einsum = to_ivy_a... |
gh_patches_debug_1226 | rasdani/github-patches | git_diff | jazzband__django-oauth-toolkit-948 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Token introspection always uses time-zone-aware datetimes
Hi,
I'm attempting to use the new token introspection and ran into a bit of a snag. Our app is using USE_TZ=False, which results in the following:... | diff --git a/oauth2_provider/oauth2_validators.py b/oauth2_provider/oauth2_validators.py
--- a/oauth2_provider/oauth2_validators.py
+++ b/oauth2_provider/oauth2_validators.py
@@ -357,7 +357,7 @@
expires = max_caching_time
scope = content.get("scope", "")
- expires = make_aware... | {"golden_diff": "diff --git a/oauth2_provider/oauth2_validators.py b/oauth2_provider/oauth2_validators.py\n--- a/oauth2_provider/oauth2_validators.py\n+++ b/oauth2_provider/oauth2_validators.py\n@@ -357,7 +357,7 @@\n expires = max_caching_time\n \n scope = content.get(\"scope\", \"\")\n- ... |
gh_patches_debug_1227 | rasdani/github-patches | git_diff | mitmproxy__mitmproxy-1463 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't view options
##### Steps to reproduce the problem:
1. `mitmproxy`
2. Press `o`
##### What is the expected behavior?
No Crash!
##### What went wrong?
mitmproxy crashed!
```
~/dev/mitmproxy (master) > ... | diff --git a/mitmproxy/proxy/config.py b/mitmproxy/proxy/config.py
--- a/mitmproxy/proxy/config.py
+++ b/mitmproxy/proxy/config.py
@@ -78,6 +78,7 @@
self.check_tcp = None
self.certstore = None
self.clientcerts = None
+ self.ssl_insecure = False
self.openssl_verification_mode_s... | {"golden_diff": "diff --git a/mitmproxy/proxy/config.py b/mitmproxy/proxy/config.py\n--- a/mitmproxy/proxy/config.py\n+++ b/mitmproxy/proxy/config.py\n@@ -78,6 +78,7 @@\n self.check_tcp = None\n self.certstore = None\n self.clientcerts = None\n+ self.ssl_insecure = False\n self.op... |
gh_patches_debug_1228 | rasdani/github-patches | git_diff | cisagov__manage.get.gov-963 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Implement (isActive)
### Issue Description
Requires #851
isActive will return true if the domain has a state of CREATED
Note: check the domain status
### Additional Context (optional)
separate fun... | diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -338,6 +338,9 @@
help_text="Very basic info about the lifecycle of this domain object",
)
+ def isActive(self):
+ return self.state == Domai... | {"golden_diff": "diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py\n--- a/src/registrar/models/domain.py\n+++ b/src/registrar/models/domain.py\n@@ -338,6 +338,9 @@\n help_text=\"Very basic info about the lifecycle of this domain object\",\n )\n \n+ def isActive(self):\n+ ... |
gh_patches_debug_1229 | rasdani/github-patches | git_diff | deepset-ai__haystack-7086 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pipeline drawings in Colab have black background
**Describe the bug**
Since Haystack 2.0-beta8, Pipeline drawings in Colab and other environments (VS Code/Pycharm) randomly
have a black background.
![ima... | diff --git a/haystack/core/pipeline/draw.py b/haystack/core/pipeline/draw.py
--- a/haystack/core/pipeline/draw.py
+++ b/haystack/core/pipeline/draw.py
@@ -70,7 +70,7 @@
graphbytes = graph_styled.encode("ascii")
base64_bytes = base64.b64encode(graphbytes)
base64_string = base64_bytes.decode("ascii")
- ... | {"golden_diff": "diff --git a/haystack/core/pipeline/draw.py b/haystack/core/pipeline/draw.py\n--- a/haystack/core/pipeline/draw.py\n+++ b/haystack/core/pipeline/draw.py\n@@ -70,7 +70,7 @@\n graphbytes = graph_styled.encode(\"ascii\")\n base64_bytes = base64.b64encode(graphbytes)\n base64_string = base64_by... |
gh_patches_debug_1230 | rasdani/github-patches | git_diff | facebookresearch__ParlAI-1447 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error when running DrQA PyTorch 1.0.0
When running the basic example on SQUAD
```python examples/train_model.py -m drqa -t squad -bs 32```
Throwing this.
```[ training... ]
/content/DuReader/data/ParlAI... | diff --git a/parlai/agents/drqa/model.py b/parlai/agents/drqa/model.py
--- a/parlai/agents/drqa/model.py
+++ b/parlai/agents/drqa/model.py
@@ -99,7 +99,7 @@
# Compute loss and accuracies
loss = F.nll_loss(score_s, target_s) + F.nll_loss(score_e, target_e)
- self.train_loss.update(loss.data[0]... | {"golden_diff": "diff --git a/parlai/agents/drqa/model.py b/parlai/agents/drqa/model.py\n--- a/parlai/agents/drqa/model.py\n+++ b/parlai/agents/drqa/model.py\n@@ -99,7 +99,7 @@\n \n # Compute loss and accuracies\n loss = F.nll_loss(score_s, target_s) + F.nll_loss(score_e, target_e)\n- self.train_... |
gh_patches_debug_1231 | rasdani/github-patches | git_diff | svthalia__concrexit-1036 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: 'NoneType' object has no attribute 'is_authenticated'
In GitLab by _thaliatechnicie on Mar 11, 2020, 23:02
Sentry Issue: [CONCREXIT-2A](https://sentry.io/organizations/thalia/issues/156043824... | diff --git a/website/events/api/serializers.py b/website/events/api/serializers.py
--- a/website/events/api/serializers.py
+++ b/website/events/api/serializers.py
@@ -83,7 +83,9 @@
def _class_names(self, instance):
class_names = ["regular-event"]
- if services.is_user_registered(self.context["mem... | {"golden_diff": "diff --git a/website/events/api/serializers.py b/website/events/api/serializers.py\n--- a/website/events/api/serializers.py\n+++ b/website/events/api/serializers.py\n@@ -83,7 +83,9 @@\n \n def _class_names(self, instance):\n class_names = [\"regular-event\"]\n- if services.is_user_re... |
gh_patches_debug_1232 | rasdani/github-patches | git_diff | kivy__kivy-2714 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Scatter crash on windows
I just tested BETA-1 with showcase, and when i tried to move the cat:
```
running "python.exe C:\Users\tito\Desktop\Kivy-1.9.0-dev-py3.3-win32\kivy\exampl
es\demo\showcase\main.py" \... | diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py
--- a/kivy/uix/scrollview.py
+++ b/kivy/uix/scrollview.py
@@ -669,6 +669,9 @@
if touch.grab_current is not self:
return True
+ if not (self.do_scroll_y or self.do_scroll_x):
+ return super(ScrollView, self).on_touch_m... | {"golden_diff": "diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py\n--- a/kivy/uix/scrollview.py\n+++ b/kivy/uix/scrollview.py\n@@ -669,6 +669,9 @@\n if touch.grab_current is not self:\n return True\n \n+ if not (self.do_scroll_y or self.do_scroll_x):\n+ return super(Scr... |
gh_patches_debug_1233 | rasdani/github-patches | git_diff | kivy__kivy-7383 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dropdown opening from data item in RecycleView is jumping down at refresh of RV-data/-layout
**Software Versions**
* Python: 3.6.9
* OS: Ubuntu 18.04
* Kivy: 2.0.0
* Kivy installation method: pip
A `Dr... | diff --git a/kivy/uix/dropdown.py b/kivy/uix/dropdown.py
--- a/kivy/uix/dropdown.py
+++ b/kivy/uix/dropdown.py
@@ -321,7 +321,7 @@
# coordinate system
win = self._win
widget = self.attach_to
- if not widget or not win:
+ if not widget or not widget.parent or not win:
... | {"golden_diff": "diff --git a/kivy/uix/dropdown.py b/kivy/uix/dropdown.py\n--- a/kivy/uix/dropdown.py\n+++ b/kivy/uix/dropdown.py\n@@ -321,7 +321,7 @@\n # coordinate system\n win = self._win\n widget = self.attach_to\n- if not widget or not win:\n+ if not widget or not widget.paren... |
gh_patches_debug_1234 | rasdani/github-patches | git_diff | ipython__ipython-3901 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
under Windows, "ipython3 nbconvert "C:/blabla/first_try.ipynb" --to latex --post PDF" POST processing action fails because of a bad parameter
Hello,
The "one single step" option to create a ".pdf" from a .ip... | diff --git a/IPython/nbconvert/writers/files.py b/IPython/nbconvert/writers/files.py
--- a/IPython/nbconvert/writers/files.py
+++ b/IPython/nbconvert/writers/files.py
@@ -30,7 +30,7 @@
"""Consumes nbconvert output and produces files."""
- build_directory = Unicode(".", config=True,
+ build_directory = U... | {"golden_diff": "diff --git a/IPython/nbconvert/writers/files.py b/IPython/nbconvert/writers/files.py\n--- a/IPython/nbconvert/writers/files.py\n+++ b/IPython/nbconvert/writers/files.py\n@@ -30,7 +30,7 @@\n \"\"\"Consumes nbconvert output and produces files.\"\"\"\n \n \n- build_directory = Unicode(\".\", config... |
gh_patches_debug_1235 | rasdani/github-patches | git_diff | pymedusa__Medusa-3813 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unnecessary warning for "Multiple posters at highest weighted score"
I get these "Multiple posters at highest weighted score" warnings too often, and they are a nuisance since they are not important enough to... | 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
@@ -327,7 +327,7 @@
if item[0] >= best_result[0]
]
if len(best_results) > 1:
- log.warning(
+ log.debug(
... | {"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@@ -327,7 +327,7 @@\n if item[0] >= best_result[0]\n ]\n if len(best_results) > 1:\n- log.warning(\n+ ... |
gh_patches_debug_1236 | rasdani/github-patches | git_diff | PennyLaneAI__pennylane-3856 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] Inconsistent ordering in datasets for lists of parameters
The ordering of lists of datasets when passed lists of parameters is of no canonical ordering, but appears to be random:
```python
bondlengt... | diff --git a/pennylane/data/data_manager.py b/pennylane/data/data_manager.py
--- a/pennylane/data/data_manager.py
+++ b/pennylane/data/data_manager.py
@@ -197,7 +197,11 @@
"""
next_folders = folders[1:]
- folders = set(node) if folders[0] == ["full"] else set(folders[0]).intersection(set(node))
+ if f... | {"golden_diff": "diff --git a/pennylane/data/data_manager.py b/pennylane/data/data_manager.py\n--- a/pennylane/data/data_manager.py\n+++ b/pennylane/data/data_manager.py\n@@ -197,7 +197,11 @@\n \"\"\"\n \n next_folders = folders[1:]\n- folders = set(node) if folders[0] == [\"full\"] else set(folders[0]).inte... |
gh_patches_debug_1237 | rasdani/github-patches | git_diff | ivy-llc__ivy-18274 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
diff
--- 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/math.py`
Conte... | diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -398,3 +398,11 @@
@to_ivy_arrays_and_back
def any(x, axis=None, keepdim=False, name=None):
retu... | {"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py\n--- a/ivy/functional/frontends/paddle/tensor/math.py\n+++ b/ivy/functional/frontends/paddle/tensor/math.py\n@@ -398,3 +398,11 @@\n @to_ivy_arrays_and_back\n def any(x, axis=None, keepdim=False,... |
gh_patches_debug_1238 | rasdani/github-patches | git_diff | bokeh__bokeh-1923 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
app_reveal fails importing old plotting stuff
```
(py34devel)[damian@damian-S400CA][slideshow](master)$ python app_reveal.py
Traceback (most recent call last):
File "app_reveal.py", line 19, in <module>
... | diff --git a/examples/embed/slideshow/app_reveal.py b/examples/embed/slideshow/app_reveal.py
--- a/examples/embed/slideshow/app_reveal.py
+++ b/examples/embed/slideshow/app_reveal.py
@@ -16,8 +16,7 @@
from bokeh.embed import autoload_server
from bokeh.models import GlyphRenderer
-from bokeh.plotting import (annular... | {"golden_diff": "diff --git a/examples/embed/slideshow/app_reveal.py b/examples/embed/slideshow/app_reveal.py\n--- a/examples/embed/slideshow/app_reveal.py\n+++ b/examples/embed/slideshow/app_reveal.py\n@@ -16,8 +16,7 @@\n \n from bokeh.embed import autoload_server\n from bokeh.models import GlyphRenderer\n-from bokeh.... |
gh_patches_debug_1239 | rasdani/github-patches | git_diff | liqd__a4-product-66 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Internal server error when editing poll question
Internal server error when editing poll question in creating poll in dashboard
--- END ISSUE ---
Below are some code segments, each from a relevant file. One... | diff --git a/liqd_product/config/settings/base.py b/liqd_product/config/settings/base.py
--- a/liqd_product/config/settings/base.py
+++ b/liqd_product/config/settings/base.py
@@ -49,6 +49,7 @@
'adhocracy4.projects.apps.ProjectsConfig',
'adhocracy4.ratings.apps.RatingsConfig',
'adhocracy4.reports.apps.Rep... | {"golden_diff": "diff --git a/liqd_product/config/settings/base.py b/liqd_product/config/settings/base.py\n--- a/liqd_product/config/settings/base.py\n+++ b/liqd_product/config/settings/base.py\n@@ -49,6 +49,7 @@\n 'adhocracy4.projects.apps.ProjectsConfig',\n 'adhocracy4.ratings.apps.RatingsConfig',\n 'adho... |
gh_patches_debug_1240 | rasdani/github-patches | git_diff | ckan__ckan-4657 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
exception after upgrade to 2.8.1 - Popped wrong app context
After upgrade from 2.7 to 2.8.1 - I'm seeing some exceptions in a production server log, couldn't reproduce the error locally
### CKAN Version if... | diff --git a/ckan/config/middleware/pylons_app.py b/ckan/config/middleware/pylons_app.py
--- a/ckan/config/middleware/pylons_app.py
+++ b/ckan/config/middleware/pylons_app.py
@@ -138,10 +138,7 @@
)
# Establish the Registry for this application
- # The RegistryManager includes code to pop
- # registry ... | {"golden_diff": "diff --git a/ckan/config/middleware/pylons_app.py b/ckan/config/middleware/pylons_app.py\n--- a/ckan/config/middleware/pylons_app.py\n+++ b/ckan/config/middleware/pylons_app.py\n@@ -138,10 +138,7 @@\n )\n \n # Establish the Registry for this application\n- # The RegistryManager includes code... |
gh_patches_debug_1241 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-2094 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Logging system tests: gRPC/GaxError for 'NotFound' in tearDown / logger.delete
From: https://travis-ci.org/GoogleCloudPlatform/gcloud-python/builds/151551907#L647-L675
``` python
===========================... | diff --git a/gcloud/logging/_gax.py b/gcloud/logging/_gax.py
--- a/gcloud/logging/_gax.py
+++ b/gcloud/logging/_gax.py
@@ -120,7 +120,12 @@
"""
options = None
path = 'projects/%s/logs/%s' % (project, logger_name)
- self._gax_api.delete_log(path, options)
+ try:
+ self... | {"golden_diff": "diff --git a/gcloud/logging/_gax.py b/gcloud/logging/_gax.py\n--- a/gcloud/logging/_gax.py\n+++ b/gcloud/logging/_gax.py\n@@ -120,7 +120,12 @@\n \"\"\"\n options = None\n path = 'projects/%s/logs/%s' % (project, logger_name)\n- self._gax_api.delete_log(path, options)\n+ ... |
gh_patches_debug_1242 | rasdani/github-patches | git_diff | joke2k__faker-1743 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing return in faker-master\faker\providers\address\en_US\__init__.py
* Faker version: current
* OS: Windows 10 x64
Brief summary of the issue goes here.
Missing return on row 496 (def state_abbr(self... | diff --git a/faker/providers/address/en_US/__init__.py b/faker/providers/address/en_US/__init__.py
--- a/faker/providers/address/en_US/__init__.py
+++ b/faker/providers/address/en_US/__init__.py
@@ -493,7 +493,7 @@
If False, only states will be returned.
"""
if include_territories:
- ... | {"golden_diff": "diff --git a/faker/providers/address/en_US/__init__.py b/faker/providers/address/en_US/__init__.py\n--- a/faker/providers/address/en_US/__init__.py\n+++ b/faker/providers/address/en_US/__init__.py\n@@ -493,7 +493,7 @@\n If False, only states will be returned.\n \"\"\"\n if i... |
gh_patches_debug_1243 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-5886 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
name=Bankomat should not be added for amenity=atm
It is like `name=ATM`
The same goes for `name=Wpłatomat` (for ATM accepting cash)
https://www.alltheplaces.xyz/map/#16.82/50.072257/20.036549
![scree... | diff --git a/locations/spiders/santander_pl.py b/locations/spiders/santander_pl.py
--- a/locations/spiders/santander_pl.py
+++ b/locations/spiders/santander_pl.py
@@ -39,6 +39,9 @@
start_time, end_time = hours.split("-")
item["opening_hours"].add_range(DAYS[int(day) - 2], start_time.st... | {"golden_diff": "diff --git a/locations/spiders/santander_pl.py b/locations/spiders/santander_pl.py\n--- a/locations/spiders/santander_pl.py\n+++ b/locations/spiders/santander_pl.py\n@@ -39,6 +39,9 @@\n start_time, end_time = hours.split(\"-\")\n item[\"opening_hours\"].add_range(DAYS[in... |
gh_patches_debug_1244 | rasdani/github-patches | git_diff | pantsbuild__pants-16113 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pants poetry-based lockfiles fail to include hashes.
This was detected in a unit test in the Pants repo, but is a wider problem for all versions of Pants that support generating lockfiles using Poetry.
The... | diff --git a/src/python/pants/backend/python/subsystems/poetry.py b/src/python/pants/backend/python/subsystems/poetry.py
--- a/src/python/pants/backend/python/subsystems/poetry.py
+++ b/src/python/pants/backend/python/subsystems/poetry.py
@@ -24,7 +24,7 @@
options_scope = "poetry"
help = "Used to generate loc... | {"golden_diff": "diff --git a/src/python/pants/backend/python/subsystems/poetry.py b/src/python/pants/backend/python/subsystems/poetry.py\n--- a/src/python/pants/backend/python/subsystems/poetry.py\n+++ b/src/python/pants/backend/python/subsystems/poetry.py\n@@ -24,7 +24,7 @@\n options_scope = \"poetry\"\n help... |
gh_patches_debug_1245 | rasdani/github-patches | git_diff | saleor__saleor-4008 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Duplicate choices in shipping address
### What I'm trying to achieve
I'm trying to set shipping user for Russian user and there are duplicate values in "Oblast" selector.
### Steps to reproduce the proble... | diff --git a/saleor/account/forms.py b/saleor/account/forms.py
--- a/saleor/account/forms.py
+++ b/saleor/account/forms.py
@@ -46,6 +46,11 @@
not preview and data or None,
initial=initial_address,
**kwargs)
+
+ if hasattr(address_form.fields['country_area'], 'choices'):
+ ... | {"golden_diff": "diff --git a/saleor/account/forms.py b/saleor/account/forms.py\n--- a/saleor/account/forms.py\n+++ b/saleor/account/forms.py\n@@ -46,6 +46,11 @@\n not preview and data or None,\n initial=initial_address,\n **kwargs)\n+\n+ if hasattr(address_form.fields['country_ar... |
gh_patches_debug_1246 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-2411 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
App breaking when using Enum as field for Generic
<!-- Provide a general summary of the bug in the title above. -->
When using an Enum as a field on a Generic, the app breaks, throwing a `NotImplementedError... | diff --git a/strawberry/enum.py b/strawberry/enum.py
--- a/strawberry/enum.py
+++ b/strawberry/enum.py
@@ -41,7 +41,8 @@
def copy_with(
self, type_var_map: Mapping[TypeVar, Union[StrawberryType, type]]
) -> Union[StrawberryType, type]:
- return super().copy_with(type_var_map) # type: ignore[s... | {"golden_diff": "diff --git a/strawberry/enum.py b/strawberry/enum.py\n--- a/strawberry/enum.py\n+++ b/strawberry/enum.py\n@@ -41,7 +41,8 @@\n def copy_with(\n self, type_var_map: Mapping[TypeVar, Union[StrawberryType, type]]\n ) -> Union[StrawberryType, type]:\n- return super().copy_with(type_va... |
gh_patches_debug_1247 | rasdani/github-patches | git_diff | PennyLaneAI__pennylane-3182 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Inline transforms vs. Decorator transforms
### Expected behavior
This script:
```
def circuit(circuit_param):
qml.RY(circuit_param, wires=0)
qml.Hadamard(wires=0)
qml.T(wires=0)
... | diff --git a/pennylane/queuing.py b/pennylane/queuing.py
--- a/pennylane/queuing.py
+++ b/pennylane/queuing.py
@@ -145,7 +145,11 @@
"""
previously_active_contexts = cls._active_contexts
cls._active_contexts = []
- yield
+ try:
+ yield
+ except Exception as e:
+... | {"golden_diff": "diff --git a/pennylane/queuing.py b/pennylane/queuing.py\n--- a/pennylane/queuing.py\n+++ b/pennylane/queuing.py\n@@ -145,7 +145,11 @@\n \"\"\"\n previously_active_contexts = cls._active_contexts\n cls._active_contexts = []\n- yield\n+ try:\n+ yield\n+ ... |
gh_patches_debug_1248 | rasdani/github-patches | git_diff | pyqtgraph__pyqtgraph-696 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
update version for new development and PlotDataItem stepMode fix
### Version
PyPI version is 0.10.0 and uses the release code from november 2016, however the documentation (http://www.pyqtgraph.org/document... | diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py
--- a/pyqtgraph/graphicsItems/PlotDataItem.py
+++ b/pyqtgraph/graphicsItems/PlotDataItem.py
@@ -490,6 +490,9 @@
self.curve.hide()
if scatterArgs['symbol'] is not None:
+
+ ... | {"golden_diff": "diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py\n--- a/pyqtgraph/graphicsItems/PlotDataItem.py\n+++ b/pyqtgraph/graphicsItems/PlotDataItem.py\n@@ -490,6 +490,9 @@\n self.curve.hide()\n \n if scatterArgs['symbol'] is not None:\n+... |
gh_patches_debug_1249 | rasdani/github-patches | git_diff | edgedb__edgedb-6797 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Attempting to switch index type fails with `InternalServerError`
```
edgedb error: InternalServerError: AssertionError:
Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket a... | diff --git a/edb/schema/indexes.py b/edb/schema/indexes.py
--- a/edb/schema/indexes.py
+++ b/edb/schema/indexes.py
@@ -163,6 +163,15 @@
qlkind=qltypes.SchemaObjectClass.INDEX,
data_safe=True,
):
+ # redefine, so we can change compcoef
+ bases = so.SchemaField(
+ so.ObjectList['Index'], # type: ... | {"golden_diff": "diff --git a/edb/schema/indexes.py b/edb/schema/indexes.py\n--- a/edb/schema/indexes.py\n+++ b/edb/schema/indexes.py\n@@ -163,6 +163,15 @@\n qlkind=qltypes.SchemaObjectClass.INDEX,\n data_safe=True,\n ):\n+ # redefine, so we can change compcoef\n+ bases = so.SchemaField(\n+ so.Obje... |
gh_patches_debug_1250 | rasdani/github-patches | git_diff | zestedesavoir__zds-site-6181 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bouton "Comparer avec la version en ligne" quand les versions sont identiques
**Description du bug**
Dans un tutoriel publié j'ai le bouton "Comparer avec la version en ligne" dans la sidebar "Actions" (à ... | diff --git a/zds/tutorialv2/mixins.py b/zds/tutorialv2/mixins.py
--- a/zds/tutorialv2/mixins.py
+++ b/zds/tutorialv2/mixins.py
@@ -221,7 +221,7 @@
class SingleContentDetailViewMixin(SingleContentViewMixin, DetailView):
"""
- This enhanced DetailView ensure,
+ This enhanced DetailView ensures,
- by ... | {"golden_diff": "diff --git a/zds/tutorialv2/mixins.py b/zds/tutorialv2/mixins.py\n--- a/zds/tutorialv2/mixins.py\n+++ b/zds/tutorialv2/mixins.py\n@@ -221,7 +221,7 @@\n \n class SingleContentDetailViewMixin(SingleContentViewMixin, DetailView):\n \"\"\"\n- This enhanced DetailView ensure,\n+ This enhanced Deta... |
gh_patches_debug_1251 | rasdani/github-patches | git_diff | tensorflow__tensor2tensor-360 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error with `.decode` on `str` object when generating `summarize_cnn_dailymail32k` data
## CMD
```
t2t-trainer \
--generate_data \
--data_dir="$data" \
--problems=summarize_cnn_dailymail32k \
--... | diff --git a/tensor2tensor/data_generators/cnn_dailymail.py b/tensor2tensor/data_generators/cnn_dailymail.py
--- a/tensor2tensor/data_generators/cnn_dailymail.py
+++ b/tensor2tensor/data_generators/cnn_dailymail.py
@@ -74,7 +74,7 @@
for path in paths:
for story_file in tf.gfile.Glob(path + "*"):
story = ... | {"golden_diff": "diff --git a/tensor2tensor/data_generators/cnn_dailymail.py b/tensor2tensor/data_generators/cnn_dailymail.py\n--- a/tensor2tensor/data_generators/cnn_dailymail.py\n+++ b/tensor2tensor/data_generators/cnn_dailymail.py\n@@ -74,7 +74,7 @@\n for path in paths:\n for story_file in tf.gfile.Glob(path +... |
gh_patches_debug_1252 | rasdani/github-patches | git_diff | akvo__akvo-rsr-1858 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Akvo Pages with hostnames in uppercase does not work properly
## Test plan
1. Go to 'old' RSR admin: `/en/admin/rsr/partnersite/add/`
2. Add an Akvo Page with capitals in the hostname
3. Save
4. The hostname ... | diff --git a/akvo/rsr/models/partner_site.py b/akvo/rsr/models/partner_site.py
--- a/akvo/rsr/models/partner_site.py
+++ b/akvo/rsr/models/partner_site.py
@@ -161,6 +161,12 @@
"""Unicode representation."""
return _(u'Akvo page for {}').format(self.organisation.name)
+ def save(self, *args, **kwar... | {"golden_diff": "diff --git a/akvo/rsr/models/partner_site.py b/akvo/rsr/models/partner_site.py\n--- a/akvo/rsr/models/partner_site.py\n+++ b/akvo/rsr/models/partner_site.py\n@@ -161,6 +161,12 @@\n \"\"\"Unicode representation.\"\"\"\n return _(u'Akvo page for {}').format(self.organisation.name)\n \n+ ... |
gh_patches_debug_1253 | rasdani/github-patches | git_diff | uccser__cs-unplugged-717 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Workaround Crowdin bug where integer yaml keys are not preserved
When downloading in-context localisation files, integer keys in YAML files are not preserved. This is only an issue in the file `topics/content... | diff --git a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py b/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py
--- a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py
+++ b/csunplugged/topics/management/commands/_ProgrammingCh... | {"golden_diff": "diff --git a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py b/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py\n--- a/csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py\n+++ b/csunplugged/topics/management/comm... |
gh_patches_debug_1254 | rasdani/github-patches | git_diff | pre-commit__pre-commit-1467 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Expose an env variable that indicates if pre-commit is running
In some circumstances, it could be helpful to know inside an executable / function / script if it was invoked from pre-commit or from some other ... | diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py
--- a/pre_commit/commands/run.py
+++ b/pre_commit/commands/run.py
@@ -347,6 +347,9 @@
if args.checkout_type:
environ['PRE_COMMIT_CHECKOUT_TYPE'] = args.checkout_type
+ # Set pre_commit flag
+ environ['PRE_COMMIT'] = '1'
+
wi... | {"golden_diff": "diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py\n--- a/pre_commit/commands/run.py\n+++ b/pre_commit/commands/run.py\n@@ -347,6 +347,9 @@\n if args.checkout_type:\n environ['PRE_COMMIT_CHECKOUT_TYPE'] = args.checkout_type\n \n+ # Set pre_commit flag\n+ environ['PRE... |
gh_patches_debug_1255 | rasdani/github-patches | git_diff | conda__conda-build-2451 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Invalid cross-device-link
Example output:
```bash
INFO:conda_build.build:Packaging <...>
number of files: 63
Fixing permissions
Traceback (most recent call last):
File "./build.py", line 599, in build... | diff --git a/conda_build/post.py b/conda_build/post.py
--- a/conda_build/post.py
+++ b/conda_build/post.py
@@ -514,7 +514,9 @@
# remove old file
utils.rm_rf(path)
# rename copy to original filename
- os.rename(os.path.join(dest, fn), path)
+ # It is essenti... | {"golden_diff": "diff --git a/conda_build/post.py b/conda_build/post.py\n--- a/conda_build/post.py\n+++ b/conda_build/post.py\n@@ -514,7 +514,9 @@\n # remove old file\n utils.rm_rf(path)\n # rename copy to original filename\n- os.rename(os.path.join(dest, fn), path)\n+ ... |
gh_patches_debug_1256 | rasdani/github-patches | git_diff | kserve__kserve-3034 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
option to load credentials directly from a secret for s3
Currently to download from a private S3 bucket [you create both a secret and a service account that you link it to](https://github.com/kubeflow/kfservi... | diff --git a/python/kserve/kserve/api_client.py b/python/kserve/kserve/api_client.py
--- a/python/kserve/kserve/api_client.py
+++ b/python/kserve/kserve/api_client.py
@@ -304,7 +304,7 @@
if data is None:
return None
- if type(klass) == str:
+ if type(klass) is str:
if ... | {"golden_diff": "diff --git a/python/kserve/kserve/api_client.py b/python/kserve/kserve/api_client.py\n--- a/python/kserve/kserve/api_client.py\n+++ b/python/kserve/kserve/api_client.py\n@@ -304,7 +304,7 @@\n if data is None:\n return None\n \n- if type(klass) == str:\n+ if type(klass)... |
gh_patches_debug_1257 | rasdani/github-patches | git_diff | canonical__microk8s-3535 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TypeError: sequence item 10: expected str instance, NoneType found (microk8s dashboard-proxy)
#### Summary
I installed MicroK8s on Windows 10 [Version 10.0.19043.2130]. I can run `microk8s dashboard-proxy`... | diff --git a/installer/cli/microk8s.py b/installer/cli/microk8s.py
--- a/installer/cli/microk8s.py
+++ b/installer/cli/microk8s.py
@@ -309,7 +309,7 @@
output = instance.run(command, hide_output=True)
secret_name = None
for line in output.split(b"\n"):
- if line.startswith(b"default... | {"golden_diff": "diff --git a/installer/cli/microk8s.py b/installer/cli/microk8s.py\n--- a/installer/cli/microk8s.py\n+++ b/installer/cli/microk8s.py\n@@ -309,7 +309,7 @@\n output = instance.run(command, hide_output=True)\n secret_name = None\n for line in output.split(b\"\\n\"):\n- i... |
gh_patches_debug_1258 | rasdani/github-patches | git_diff | facebookresearch__ParlAI-1956 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Quickstart AttributeError: 'HogwildWorld' object has no attribute 'acts'
**Bug description**
When going through the ParlAI [quickstart](https://parl.ai/docs/tutorial_quick.html#install), I got the following ... | diff --git a/parlai/scripts/build_candidates.py b/parlai/scripts/build_candidates.py
--- a/parlai/scripts/build_candidates.py
+++ b/parlai/scripts/build_candidates.py
@@ -23,6 +23,9 @@
def build_cands(opt):
# create repeat label agent and assign it to the specified task
+ if opt['numthreads'] > 1:
+ #... | {"golden_diff": "diff --git a/parlai/scripts/build_candidates.py b/parlai/scripts/build_candidates.py\n--- a/parlai/scripts/build_candidates.py\n+++ b/parlai/scripts/build_candidates.py\n@@ -23,6 +23,9 @@\n \n def build_cands(opt):\n # create repeat label agent and assign it to the specified task\n+ if opt['numt... |
gh_patches_debug_1259 | rasdani/github-patches | git_diff | adamchainz__django-cors-headers-232 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
test_get_replaces_referer_when_secure() failing under Django 1.11
Running the django-cors-headers test suite under Django 1.11a1 results in one test failure:
```
________________ RefererReplacementCorsMiddl... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -44,6 +44,7 @@
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
+ 'Framework :: Django :: 1.11',
'Intended Audience :: Developers',
'License :: OSI Approved :: ... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -44,6 +44,7 @@\n 'Framework :: Django :: 1.8',\n 'Framework :: Django :: 1.9',\n 'Framework :: Django :: 1.10',\n+ 'Framework :: Django :: 1.11',\n 'Intended Audience :: Developers',\n 'L... |
gh_patches_debug_1260 | rasdani/github-patches | git_diff | tobymao__sqlglot-2739 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`explode_to_unnest` transformation generates query that cannot be executed with trino
sqlglot code:
```
In [8]: import sqlglot as sg
In [9]: print(
...: sg.parse_one(
...: "select u... | diff --git a/sqlglot/transforms.py b/sqlglot/transforms.py
--- a/sqlglot/transforms.py
+++ b/sqlglot/transforms.py
@@ -255,7 +255,7 @@
if not arrays:
if expression.args.get("from"):
- expression.join(series, copy=False)
+ ... | {"golden_diff": "diff --git a/sqlglot/transforms.py b/sqlglot/transforms.py\n--- a/sqlglot/transforms.py\n+++ b/sqlglot/transforms.py\n@@ -255,7 +255,7 @@\n \n if not arrays:\n if expression.args.get(\"from\"):\n- expression.join(series, copy=False)... |
gh_patches_debug_1261 | rasdani/github-patches | git_diff | zestedesavoir__zds-site-2285 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Incohérence sur le nombre de messages d'un membre
Les 2 pages en questions : https://zestedesavoir.com/membres/voir/Iris13/ https://zestedesavoir.com/forums/messages/1927/.
On a 3 messages alors que aucun n'... | diff --git a/zds/member/models.py b/zds/member/models.py
--- a/zds/member/models.py
+++ b/zds/member/models.py
@@ -133,6 +133,10 @@
def get_post_count(self):
"""Number of messages posted."""
+ return Post.objects.filter(author__pk=self.user.pk, is_visible=True).count()
+
+ def get_post_count_a... | {"golden_diff": "diff --git a/zds/member/models.py b/zds/member/models.py\n--- a/zds/member/models.py\n+++ b/zds/member/models.py\n@@ -133,6 +133,10 @@\n \n def get_post_count(self):\n \"\"\"Number of messages posted.\"\"\"\n+ return Post.objects.filter(author__pk=self.user.pk, is_visible=True).count... |
gh_patches_debug_1262 | rasdani/github-patches | git_diff | Pyomo__pyomo-526 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ExternalFunction and DAE Transformation
I think there is a problem applying DAE transformations to Pyomo models with ExternalFunction objects. I can come up with a simpler demonstration, but hopefully the tr... | diff --git a/pyomo/dae/misc.py b/pyomo/dae/misc.py
--- a/pyomo/dae/misc.py
+++ b/pyomo/dae/misc.py
@@ -202,6 +202,12 @@
if comp.type() is Param:
return
+ # Skip components that do not have a 'dim' attribute. This assumes that
+ # all components that could be indexed by a ContinuousSet have the 'di... | {"golden_diff": "diff --git a/pyomo/dae/misc.py b/pyomo/dae/misc.py\n--- a/pyomo/dae/misc.py\n+++ b/pyomo/dae/misc.py\n@@ -202,6 +202,12 @@\n if comp.type() is Param:\n return\n \n+ # Skip components that do not have a 'dim' attribute. This assumes that\n+ # all components that could be indexed by a C... |
gh_patches_debug_1263 | rasdani/github-patches | git_diff | urllib3__urllib3-2656 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Retry retries on fruitless ssl ImportError
### Subject
Describe the issue here.
### Environment
Describe your environment.
At least, paste here the output of:
```python
import platform
import u... | diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py
--- a/src/urllib3/connectionpool.py
+++ b/src/urllib3/connectionpool.py
@@ -1020,7 +1020,7 @@
)
if not self.ConnectionCls or self.ConnectionCls is DummyConnection: # type: ignore[comparison-overlap]
- raise SSLErr... | {"golden_diff": "diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py\n--- a/src/urllib3/connectionpool.py\n+++ b/src/urllib3/connectionpool.py\n@@ -1020,7 +1020,7 @@\n )\n \n if not self.ConnectionCls or self.ConnectionCls is DummyConnection: # type: ignore[comparison-overlap]\n-... |
gh_patches_debug_1264 | rasdani/github-patches | git_diff | sopel-irc__sopel-611 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[search].duck is horribly broken.
It appears we're scraping the page wrong, since ".duck wikipedia" returns an ad page.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or mor... | diff --git a/willie/modules/search.py b/willie/modules/search.py
--- a/willie/modules/search.py
+++ b/willie/modules/search.py
@@ -127,6 +127,8 @@
query = query.replace('!', '')
uri = 'http://duckduckgo.com/html/?q=%s&kl=uk-en' % query
bytes = web.get(uri)
+ if 'web-result"' in bytes: #filter out the ... | {"golden_diff": "diff --git a/willie/modules/search.py b/willie/modules/search.py\n--- a/willie/modules/search.py\n+++ b/willie/modules/search.py\n@@ -127,6 +127,8 @@\n query = query.replace('!', '')\n uri = 'http://duckduckgo.com/html/?q=%s&kl=uk-en' % query\n bytes = web.get(uri)\n+ if 'web-result\"' i... |
gh_patches_debug_1265 | rasdani/github-patches | git_diff | cocotb__cocotb-1145 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Packaging: Add python_requires to manifest
Define our Python version requirements in our package manifest, as described here: https://packaging.python.org/guides/distributing-packages-using-setuptools/#python... | diff --git a/setup.py b/setup.py
old mode 100644
new mode 100755
--- a/setup.py
+++ b/setup.py
@@ -55,6 +55,7 @@
author='Chris Higgs, Stuart Hodgson',
author_email='cocotb@potentialventures.com',
install_requires=[],
+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
packages... | {"golden_diff": "diff --git a/setup.py b/setup.py\nold mode 100644\nnew mode 100755\n--- a/setup.py\n+++ b/setup.py\n@@ -55,6 +55,7 @@\n author='Chris Higgs, Stuart Hodgson',\n author_email='cocotb@potentialventures.com',\n install_requires=[],\n+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.... |
gh_patches_debug_1266 | rasdani/github-patches | git_diff | scikit-hep__pyhf-915 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cloudpickle v1.5.0 breaks testing
# Description
With the release of [`cloudpickle` `v1.5.0`](https://pypi.org/project/cloudpickle/1.5.0/) on 2020-07-01 the CI is broken in testing as the following error is... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,11 @@
from setuptools import setup
extras_require = {
- 'tensorflow': ['tensorflow~=2.0', 'tensorflow-probability~=0.8'],
+ 'tensorflow': [
+ 'tensorflow~=2.0',
+ 'tensorflow-probability~=0.8',
+ 'cloudpickle!=1.5.0... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,7 +1,11 @@\n from setuptools import setup\n \n extras_require = {\n- 'tensorflow': ['tensorflow~=2.0', 'tensorflow-probability~=0.8'],\n+ 'tensorflow': [\n+ 'tensorflow~=2.0',\n+ 'tensorflow-probability~=0.8',\n... |
gh_patches_debug_1267 | rasdani/github-patches | git_diff | ansible__molecule-4038 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
created: true is ignored in state.yml
# Issue Type
- Bug report
# Molecule and Ansible details
```
ansible --version && molecule --version
ansible [core 2.15.3]
config file = None
configured ... | diff --git a/src/molecule/command/create.py b/src/molecule/command/create.py
--- a/src/molecule/command/create.py
+++ b/src/molecule/command/create.py
@@ -41,6 +41,11 @@
"""
self._config.state.change_state("driver", self._config.driver.name)
+ if self._config.state.created:
+ msg =... | {"golden_diff": "diff --git a/src/molecule/command/create.py b/src/molecule/command/create.py\n--- a/src/molecule/command/create.py\n+++ b/src/molecule/command/create.py\n@@ -41,6 +41,11 @@\n \"\"\"\n self._config.state.change_state(\"driver\", self._config.driver.name)\n \n+ if self._config.stat... |
gh_patches_debug_1268 | rasdani/github-patches | git_diff | canonical__microk8s-2478 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[dashboard] should be exposed via ingress
When running microk8s on the server, rather than doing port forwarding it should be possible to access the dashboard via ingress (similar to kubeflow dashboard)
--- ... | diff --git a/scripts/wrappers/status.py b/scripts/wrappers/status.py
--- a/scripts/wrappers/status.py
+++ b/scripts/wrappers/status.py
@@ -154,7 +154,8 @@
enabled = []
disabled = []
if isReady:
- kube_output = kubectl_get("all")
+ # 'all' does not include ingress
+ kube_output = kube... | {"golden_diff": "diff --git a/scripts/wrappers/status.py b/scripts/wrappers/status.py\n--- a/scripts/wrappers/status.py\n+++ b/scripts/wrappers/status.py\n@@ -154,7 +154,8 @@\n enabled = []\n disabled = []\n if isReady:\n- kube_output = kubectl_get(\"all\")\n+ # 'all' does not include ingress\... |
gh_patches_debug_1269 | rasdani/github-patches | git_diff | napari__napari-6226 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
property in labels layer does not understand objects of different lengths
## 🐛 Bug
I am trying to use the properties attribute of `add_labels` to add a dictionary of properties that contains a self define... | diff --git a/napari/layers/utils/layer_utils.py b/napari/layers/utils/layer_utils.py
--- a/napari/layers/utils/layer_utils.py
+++ b/napari/layers/utils/layer_utils.py
@@ -948,7 +948,7 @@
# store missing values, so passing None creates an np.float64 series
# containing NaN. Therefore, use a default of ... | {"golden_diff": "diff --git a/napari/layers/utils/layer_utils.py b/napari/layers/utils/layer_utils.py\n--- a/napari/layers/utils/layer_utils.py\n+++ b/napari/layers/utils/layer_utils.py\n@@ -948,7 +948,7 @@\n # store missing values, so passing None creates an np.float64 series\n # containing NaN. Theref... |
gh_patches_debug_1270 | rasdani/github-patches | git_diff | vyperlang__vyper-3936 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`vyper-serve` is still lingering in `setup.py`
### Version Information
* vyper Version (output of `vyper --version`): doesn't matter
* OS: doesn't matter
* Python Version (output of `python --version`): ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -103,7 +103,6 @@
entry_points={
"console_scripts": [
"vyper=vyper.cli.vyper_compile:_parse_cli_args",
- "vyper-serve=vyper.cli.vyper_serve:_parse_cli_args",
"fang=vyper.cli.vyper_ir:_parse_cli_args",
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -103,7 +103,6 @@\n entry_points={\n \"console_scripts\": [\n \"vyper=vyper.cli.vyper_compile:_parse_cli_args\",\n- \"vyper-serve=vyper.cli.vyper_serve:_parse_cli_args\",\n \"fang=vyper.cl... |
gh_patches_debug_1271 | rasdani/github-patches | git_diff | scverse__scanpy-783 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
get.rank_genes_groups() key argument not used
`rank_genes_groups_df` takes `key` as an argument and the docs says it is the key differential expression groups were stored under. However, the function does... | diff --git a/scanpy/get.py b/scanpy/get.py
--- a/scanpy/get.py
+++ b/scanpy/get.py
@@ -52,7 +52,7 @@
"""
d = pd.DataFrame()
for k in ['scores', 'names', 'logfoldchanges', 'pvals', 'pvals_adj']:
- d[k] = adata.uns["rank_genes_groups"][k][group]
+ d[k] = adata.uns[key][k][group]
if pval_... | {"golden_diff": "diff --git a/scanpy/get.py b/scanpy/get.py\n--- a/scanpy/get.py\n+++ b/scanpy/get.py\n@@ -52,7 +52,7 @@\n \"\"\"\n d = pd.DataFrame()\n for k in ['scores', 'names', 'logfoldchanges', 'pvals', 'pvals_adj']:\n- d[k] = adata.uns[\"rank_genes_groups\"][k][group]\n+ d[k] = adata.un... |
gh_patches_debug_1272 | rasdani/github-patches | git_diff | doccano__doccano-841 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Signup verification email not received
How to reproduce the behaviour
---------
I setup the project using AWS one-click deployment button. Everything works fine, but when a new user sign ups, email verifica... | diff --git a/app/app/settings.py b/app/app/settings.py
--- a/app/app/settings.py
+++ b/app/app/settings.py
@@ -314,6 +314,7 @@
EMAIL_HOST_USER = env('EMAIL_HOST_USER', None)
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', None)
EMAIL_PORT = env.int('EMAIL_PORT', 587)
+DEFAULT_FROM_EMAIL = env('DEFAULT_FROM_EMAIL', ... | {"golden_diff": "diff --git a/app/app/settings.py b/app/app/settings.py\n--- a/app/app/settings.py\n+++ b/app/app/settings.py\n@@ -314,6 +314,7 @@\n EMAIL_HOST_USER = env('EMAIL_HOST_USER', None)\n EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', None)\n EMAIL_PORT = env.int('EMAIL_PORT', 587)\n+DEFAULT_FROM_EMAIL = en... |
gh_patches_debug_1273 | rasdani/github-patches | git_diff | streamlink__streamlink-2229 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
powerapp.py No plugin can handle URL
## Error Report
- [X] This is a bug report and I have read the Posting Guidelines.
### Description
powerapp.com.tr should be able to play the stations
### E... | diff --git a/src/streamlink/plugins/powerapp.py b/src/streamlink/plugins/powerapp.py
--- a/src/streamlink/plugins/powerapp.py
+++ b/src/streamlink/plugins/powerapp.py
@@ -7,7 +7,7 @@
class PowerApp(Plugin):
- url_re = re.compile(r"https?://(?:www.)?powerapp.com.tr/tv/(\w+)")
+ url_re = re.compile(r"https?://... | {"golden_diff": "diff --git a/src/streamlink/plugins/powerapp.py b/src/streamlink/plugins/powerapp.py\n--- a/src/streamlink/plugins/powerapp.py\n+++ b/src/streamlink/plugins/powerapp.py\n@@ -7,7 +7,7 @@\n \n \n class PowerApp(Plugin):\n- url_re = re.compile(r\"https?://(?:www.)?powerapp.com.tr/tv/(\\w+)\")\n+ url... |
gh_patches_debug_1274 | rasdani/github-patches | git_diff | getredash__redash-784 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: 'datetime.timedelta' object has no attribute 'isoformat'
On the latest 0.9.2-rc:
```
[2016-01-21 14:30:36,838: ERROR/MainProcess] Task redash.tasks.execute_query[766d3f9f-68a6-4a64-8cd9-b7e4e... | diff --git a/redash/utils.py b/redash/utils.py
--- a/redash/utils.py
+++ b/redash/utils.py
@@ -53,9 +53,12 @@
if isinstance(o, decimal.Decimal):
return float(o)
- if isinstance(o, (datetime.date, datetime.time, datetime.timedelta)):
+ if isinstance(o, (datetime.date, datetime.time)... | {"golden_diff": "diff --git a/redash/utils.py b/redash/utils.py\n--- a/redash/utils.py\n+++ b/redash/utils.py\n@@ -53,9 +53,12 @@\n if isinstance(o, decimal.Decimal):\n return float(o)\n \n- if isinstance(o, (datetime.date, datetime.time, datetime.timedelta)):\n+ if isinstance(o, (date... |
gh_patches_debug_1275 | rasdani/github-patches | git_diff | pypa__setuptools-2538 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Newlines in the `description` field produce a malformed PKG-INFO
We discovered this accidentally by way of https://github.com/zopefoundation/zc.relation/issues/4#issuecomment-397532224: if you pass a string c... | diff --git a/setuptools/dist.py b/setuptools/dist.py
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -121,7 +121,9 @@
def single_line(val):
# quick and dirty validation for description pypa/setuptools#1390
if '\n' in val:
- raise ValueError("newlines not allowed")
+ # TODO after 2021-07-31... | {"golden_diff": "diff --git a/setuptools/dist.py b/setuptools/dist.py\n--- a/setuptools/dist.py\n+++ b/setuptools/dist.py\n@@ -121,7 +121,9 @@\n def single_line(val):\n # quick and dirty validation for description pypa/setuptools#1390\n if '\\n' in val:\n- raise ValueError(\"newlines not allowed\")\n+ ... |
gh_patches_debug_1276 | rasdani/github-patches | git_diff | encode__django-rest-framework-2948 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`max_decimal_places` in Decimal field are wrong calculated
We got an issue when number is formatted as `decimal.Decimal('2E+9')`.
How `DecimalField` counts decimals:
```
sign, digittuple, exponent = val... | diff --git a/rest_framework/fields.py b/rest_framework/fields.py
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -782,7 +782,8 @@
self.fail('invalid')
sign, digittuple, exponent = value.as_tuple()
- decimals = abs(exponent)
+ decimals = exponent * decimal.Decimal(-... | {"golden_diff": "diff --git a/rest_framework/fields.py b/rest_framework/fields.py\n--- a/rest_framework/fields.py\n+++ b/rest_framework/fields.py\n@@ -782,7 +782,8 @@\n self.fail('invalid')\n \n sign, digittuple, exponent = value.as_tuple()\n- decimals = abs(exponent)\n+ decimals = exp... |
gh_patches_debug_1277 | rasdani/github-patches | git_diff | bokeh__bokeh-6380 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
remove the hover menu item, and keep the hover function working
Feature request.
I would like to remove the hover menu item, and keep the hover function working
--- END ISSUE ---
Below are some cod... | diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -90,7 +90,11 @@
''' A base class for tools that perform "inspections", e.g. ``HoverTool``.
'''
- pass
+ toggleable = Bool(True, help="""
+ Whether an on/off toggle button should app... | {"golden_diff": "diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py\n--- a/bokeh/models/tools.py\n+++ b/bokeh/models/tools.py\n@@ -90,7 +90,11 @@\n ''' A base class for tools that perform \"inspections\", e.g. ``HoverTool``.\n \n '''\n- pass\n+ toggleable = Bool(True, help=\"\"\"\n+ Whether an ... |
gh_patches_debug_1278 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-3328 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider longhorn_steakhouse is broken
During the global build at 2021-10-20-14-42-48, spider **longhorn_steakhouse** failed with **0 features** and **0 errors**.
Here's [the log](https://data.alltheplaces.xyz... | diff --git a/locations/spiders/longhorn_steakhouse.py b/locations/spiders/longhorn_steakhouse.py
--- a/locations/spiders/longhorn_steakhouse.py
+++ b/locations/spiders/longhorn_steakhouse.py
@@ -18,7 +18,7 @@
custom_settings = {
'USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, lik... | {"golden_diff": "diff --git a/locations/spiders/longhorn_steakhouse.py b/locations/spiders/longhorn_steakhouse.py\n--- a/locations/spiders/longhorn_steakhouse.py\n+++ b/locations/spiders/longhorn_steakhouse.py\n@@ -18,7 +18,7 @@\n custom_settings = {\n 'USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWeb... |
gh_patches_debug_1279 | rasdani/github-patches | git_diff | carltongibson__django-filter-199 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Incompatible with django-debug-toolbar versions panel
django-debug-toolbar versions panel expects a parameterless get_version() method.
https://github.com/django-debug-toolbar/django-debug-toolbar/blob/maste... | diff --git a/django_filters/__init__.py b/django_filters/__init__.py
--- a/django_filters/__init__.py
+++ b/django_filters/__init__.py
@@ -6,7 +6,7 @@
__version__ = '0.9.0'
-def get_version(version):
+def parse_version(version):
'''
'0.1.2-dev' -> (0, 1, 2, 'dev')
'0.1.2' -> (0, 1, 2)
@@ -21,4 +21,4... | {"golden_diff": "diff --git a/django_filters/__init__.py b/django_filters/__init__.py\n--- a/django_filters/__init__.py\n+++ b/django_filters/__init__.py\n@@ -6,7 +6,7 @@\n __version__ = '0.9.0'\n \n \n-def get_version(version):\n+def parse_version(version):\n '''\n '0.1.2-dev' -> (0, 1, 2, 'dev')\n '0.1.2'... |
gh_patches_debug_1280 | rasdani/github-patches | git_diff | Lightning-Universe__lightning-flash-1243 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Docs page describing Beta meaning
## 📚 Documentation
Add a page in our docs describing that beta means that one or all of the following are true:
- the feature has unstable dependencies
- the feature ma... | diff --git a/docs/extensions/stability.py b/docs/extensions/stability.py
--- a/docs/extensions/stability.py
+++ b/docs/extensions/stability.py
@@ -20,8 +20,14 @@
<div class="admonition warning {type}">
<p class="admonition-title">{title}</p>
- <p>This {scope} is currently in Beta. The interfaces and func... | {"golden_diff": "diff --git a/docs/extensions/stability.py b/docs/extensions/stability.py\n--- a/docs/extensions/stability.py\n+++ b/docs/extensions/stability.py\n@@ -20,8 +20,14 @@\n \n <div class=\"admonition warning {type}\">\n <p class=\"admonition-title\">{title}</p>\n- <p>This {scope} is currently in B... |
gh_patches_debug_1281 | rasdani/github-patches | git_diff | iterative__dvc-1325 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
gitignore: use unambiguous paths
E.g. `/dir` instead of `dir`.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Pat... | diff --git a/dvc/scm.py b/dvc/scm.py
--- a/dvc/scm.py
+++ b/dvc/scm.py
@@ -151,7 +151,8 @@
def _get_gitignore(self, path):
assert os.path.isabs(path)
- entry = os.path.basename(path)
+ # NOTE: using '/' prefix to make path unambiguous
+ entry = '/' + os.path.basename(path)
... | {"golden_diff": "diff --git a/dvc/scm.py b/dvc/scm.py\n--- a/dvc/scm.py\n+++ b/dvc/scm.py\n@@ -151,7 +151,8 @@\n \n def _get_gitignore(self, path):\n assert os.path.isabs(path)\n- entry = os.path.basename(path)\n+ # NOTE: using '/' prefix to make path unambiguous\n+ entry = '/' + os.pat... |
gh_patches_debug_1282 | rasdani/github-patches | git_diff | fidals__shopelectro-415 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Убери пункт меню
Убери mp3 колонки из меню. Их больше не будет.
Я зашел в админку и выключил категорию. Надеюсь правильно )
http://prntscr.com/k553lt
--- END ISSUE ---
Below are some code segments, each ... | diff --git a/shopelectro/templatetags/se_extras.py b/shopelectro/templatetags/se_extras.py
--- a/shopelectro/templatetags/se_extras.py
+++ b/shopelectro/templatetags/se_extras.py
@@ -20,10 +20,13 @@
@register.simple_tag
def roots():
return sorted(
- Category.objects
- .select_related('page')
- ... | {"golden_diff": "diff --git a/shopelectro/templatetags/se_extras.py b/shopelectro/templatetags/se_extras.py\n--- a/shopelectro/templatetags/se_extras.py\n+++ b/shopelectro/templatetags/se_extras.py\n@@ -20,10 +20,13 @@\n @register.simple_tag\n def roots():\n return sorted(\n- Category.objects\n- .sele... |
gh_patches_debug_1283 | rasdani/github-patches | git_diff | Lightning-AI__torchmetrics-1288 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
inplace operation in pairwise_cosine_similarity
## 🐛 Bug
Hello !
The x, y values are modified inplace in the `pairwise_cosine_similarity` function.
This is not documented and may cause bugs that are diff... | diff --git a/src/torchmetrics/functional/pairwise/cosine.py b/src/torchmetrics/functional/pairwise/cosine.py
--- a/src/torchmetrics/functional/pairwise/cosine.py
+++ b/src/torchmetrics/functional/pairwise/cosine.py
@@ -34,9 +34,9 @@
x, y, zero_diagonal = _check_input(x, y, zero_diagonal)
norm = torch.norm(x... | {"golden_diff": "diff --git a/src/torchmetrics/functional/pairwise/cosine.py b/src/torchmetrics/functional/pairwise/cosine.py\n--- a/src/torchmetrics/functional/pairwise/cosine.py\n+++ b/src/torchmetrics/functional/pairwise/cosine.py\n@@ -34,9 +34,9 @@\n x, y, zero_diagonal = _check_input(x, y, zero_diagonal)\n \n ... |
gh_patches_debug_1284 | rasdani/github-patches | git_diff | Pycord-Development__pycord-576 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SlashCommand Groups Issues
This issue is to keep track of the issues since we reworked groups.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may conta... | diff --git a/examples/app_commands/slash_groups.py b/examples/app_commands/slash_groups.py
--- a/examples/app_commands/slash_groups.py
+++ b/examples/app_commands/slash_groups.py
@@ -5,7 +5,7 @@
# If you use commands.Bot, @bot.slash_command should be used for
# slash commands. You can use @bot.slash_command with dis... | {"golden_diff": "diff --git a/examples/app_commands/slash_groups.py b/examples/app_commands/slash_groups.py\n--- a/examples/app_commands/slash_groups.py\n+++ b/examples/app_commands/slash_groups.py\n@@ -5,7 +5,7 @@\n # If you use commands.Bot, @bot.slash_command should be used for\r\n # slash commands. You can use @bot... |
gh_patches_debug_1285 | rasdani/github-patches | git_diff | deis__deis-3403 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
deis run cannot handle large output
I need to get a large generated text file from deis. I do the following
`deis run -- cat foo`
If foo is large enough, in my case is (7468 lines 26438 words 186989 byte... | diff --git a/controller/scheduler/fleet.py b/controller/scheduler/fleet.py
--- a/controller/scheduler/fleet.py
+++ b/controller/scheduler/fleet.py
@@ -268,7 +268,8 @@
chan.get_pty()
out = chan.makefile()
chan.exec_command(cmd)
- rc, output = chan.recv_ex... | {"golden_diff": "diff --git a/controller/scheduler/fleet.py b/controller/scheduler/fleet.py\n--- a/controller/scheduler/fleet.py\n+++ b/controller/scheduler/fleet.py\n@@ -268,7 +268,8 @@\n chan.get_pty()\n out = chan.makefile()\n chan.exec_command(cmd)\n- r... |
gh_patches_debug_1286 | rasdani/github-patches | git_diff | interlegis__sapl-3164 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Não permitir que se altere campos rotulo_prefixo_texto e rotulo_sufixo_texto via interface admin
<!--- Forneça um resumo geral da _issue_ no título acima -->
## Comportamento Esperado
<!--- Se você está d... | diff --git a/sapl/compilacao/admin.py b/sapl/compilacao/admin.py
--- a/sapl/compilacao/admin.py
+++ b/sapl/compilacao/admin.py
@@ -1,3 +1,12 @@
+from django.contrib import admin
+from sapl.compilacao.models import TipoDispositivo
from sapl.utils import register_all_models_in_admin
register_all_models_in_admin(__nam... | {"golden_diff": "diff --git a/sapl/compilacao/admin.py b/sapl/compilacao/admin.py\n--- a/sapl/compilacao/admin.py\n+++ b/sapl/compilacao/admin.py\n@@ -1,3 +1,12 @@\n+from django.contrib import admin\n+from sapl.compilacao.models import TipoDispositivo\n from sapl.utils import register_all_models_in_admin\n \n register_... |
gh_patches_debug_1287 | rasdani/github-patches | git_diff | tobymao__sqlglot-3482 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[bug] pgsql to mysql special character || Semantic mismatch
**Before you file an issue**
- Make sure you specify the "read" dialect eg. `parse_one(sql, read="spark")`
- Make sure you specify the "write" dia... | diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py
--- a/sqlglot/dialects/mysql.py
+++ b/sqlglot/dialects/mysql.py
@@ -805,6 +805,9 @@
exp.DataType.Type.TIMESTAMPLTZ,
}
+ def dpipe_sql(self, expression: exp.DPipe) -> str:
+ return self.func("CONCAT", *expression... | {"golden_diff": "diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py\n--- a/sqlglot/dialects/mysql.py\n+++ b/sqlglot/dialects/mysql.py\n@@ -805,6 +805,9 @@\n exp.DataType.Type.TIMESTAMPLTZ,\n }\n \n+ def dpipe_sql(self, expression: exp.DPipe) -> str:\n+ return self.f... |
gh_patches_debug_1288 | rasdani/github-patches | git_diff | open-mmlab__mmpose-267 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pylint: R1719
```bash
mmpose/models/backbones/shufflenet_v1.py:238:26: R1719: The if expression can be replaced with 'test' (simplifiable-if-expression)
```
--- END ISSUE ---
Below are some code segments,... | diff --git a/mmpose/models/backbones/shufflenet_v1.py b/mmpose/models/backbones/shufflenet_v1.py
--- a/mmpose/models/backbones/shufflenet_v1.py
+++ b/mmpose/models/backbones/shufflenet_v1.py
@@ -235,7 +235,7 @@
self.layers = nn.ModuleList()
for i, num_blocks in enumerate(self.stage_blocks):
- ... | {"golden_diff": "diff --git a/mmpose/models/backbones/shufflenet_v1.py b/mmpose/models/backbones/shufflenet_v1.py\n--- a/mmpose/models/backbones/shufflenet_v1.py\n+++ b/mmpose/models/backbones/shufflenet_v1.py\n@@ -235,7 +235,7 @@\n \n self.layers = nn.ModuleList()\n for i, num_blocks in enumerate(self.... |
gh_patches_debug_1289 | rasdani/github-patches | git_diff | lutris__lutris-998 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Prevent crash when saving wine game without appid
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/lutris/gui/config_dialogs.py", line 369, in on_save
self.game.steamid = self... | diff --git a/lutris/gui/config_dialogs.py b/lutris/gui/config_dialogs.py
--- a/lutris/gui/config_dialogs.py
+++ b/lutris/gui/config_dialogs.py
@@ -335,6 +335,9 @@
if not name:
ErrorDialog("Please fill in the name")
return False
+ if self.runner_name in ('steam', 'winesteam') an... | {"golden_diff": "diff --git a/lutris/gui/config_dialogs.py b/lutris/gui/config_dialogs.py\n--- a/lutris/gui/config_dialogs.py\n+++ b/lutris/gui/config_dialogs.py\n@@ -335,6 +335,9 @@\n if not name:\n ErrorDialog(\"Please fill in the name\")\n return False\n+ if self.runner_name in... |
gh_patches_debug_1290 | rasdani/github-patches | git_diff | beetbox__beets-3868 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
web: GET /album/<n> hides artpath even when INCLUDE_PATHS is set
### Problem
`beet web` provides GET operations to fetch track items and albums. By default this removes paths
from the returned data, but t... | diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py
--- a/beetsplug/web/__init__.py
+++ b/beetsplug/web/__init__.py
@@ -59,7 +59,10 @@
return out
elif isinstance(obj, beets.library.Album):
- del out['artpath']
+ if app.config.get('INCLUDE_PATHS', False):
+ out['ar... | {"golden_diff": "diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py\n--- a/beetsplug/web/__init__.py\n+++ b/beetsplug/web/__init__.py\n@@ -59,7 +59,10 @@\n return out\n \n elif isinstance(obj, beets.library.Album):\n- del out['artpath']\n+ if app.config.get('INCLUDE_PATHS', Fal... |
gh_patches_debug_1291 | rasdani/github-patches | git_diff | dj-stripe__dj-stripe-701 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
1.1.0 not compatible with python 2
First of all, thanks a lot for your hard work! We've been using dj-stripe for a long time and it has served us well. Now we're ready to upgrade! Let the fun begin ;).
We'... | diff --git a/djstripe/fields.py b/djstripe/fields.py
--- a/djstripe/fields.py
+++ b/djstripe/fields.py
@@ -174,7 +174,7 @@
super(StripeEnumField, self).__init__(*args, **defaults)
def deconstruct(self):
- name, path, args, kwargs = super().deconstruct()
+ name, path, args, kwargs = super(S... | {"golden_diff": "diff --git a/djstripe/fields.py b/djstripe/fields.py\n--- a/djstripe/fields.py\n+++ b/djstripe/fields.py\n@@ -174,7 +174,7 @@\n super(StripeEnumField, self).__init__(*args, **defaults)\n \n def deconstruct(self):\n- name, path, args, kwargs = super().deconstruct()\n+ name, pat... |
gh_patches_debug_1292 | rasdani/github-patches | git_diff | pwr-Solaar__Solaar-1504 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow scrolling over tray icon to switch between icons when there are fewer than 4 devices
**Information**
<!-- Please update to Solaar from this repository before asking for a new feature. -->
- Solaar ver... | diff --git a/lib/solaar/ui/tray.py b/lib/solaar/ui/tray.py
--- a/lib/solaar/ui/tray.py
+++ b/lib/solaar/ui/tray.py
@@ -84,9 +84,7 @@
# ignore all other directions
return
- if len(_devices_info) < 4:
- # don't bother with scrolling when there's only one receiver
- # with only one or ... | {"golden_diff": "diff --git a/lib/solaar/ui/tray.py b/lib/solaar/ui/tray.py\n--- a/lib/solaar/ui/tray.py\n+++ b/lib/solaar/ui/tray.py\n@@ -84,9 +84,7 @@\n # ignore all other directions\n return\n \n- if len(_devices_info) < 4:\n- # don't bother with scrolling when there's only one receiver\n- ... |
gh_patches_debug_1293 | rasdani/github-patches | git_diff | aio-libs__aiohttp-1752 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Encoding is always UTF-8 in POST data
## Long story short
I'm doing a `POST` request via `client.post`:
```
data = aiohttp.FormData({
'FindText': name,
}, charset='windows-1251')
... | diff --git a/aiohttp/formdata.py b/aiohttp/formdata.py
--- a/aiohttp/formdata.py
+++ b/aiohttp/formdata.py
@@ -96,7 +96,7 @@
charset = self._charset if self._charset is not None else 'utf-8'
return payload.BytesPayload(
- urlencode(data, doseq=True).encode(charset),
+ urlencode... | {"golden_diff": "diff --git a/aiohttp/formdata.py b/aiohttp/formdata.py\n--- a/aiohttp/formdata.py\n+++ b/aiohttp/formdata.py\n@@ -96,7 +96,7 @@\n \n charset = self._charset if self._charset is not None else 'utf-8'\n return payload.BytesPayload(\n- urlencode(data, doseq=True).encode(charset)... |
gh_patches_debug_1294 | rasdani/github-patches | git_diff | psf__black-4028 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Conflict in blank lines after module docstring and before function
Using macOS:
```sh
$ black --version
black, 23.10.1 (compiled: yes)
Python (CPython) 3.10.12
```
Take this code:
```python
"""T... | diff --git a/src/black/lines.py b/src/black/lines.py
--- a/src/black/lines.py
+++ b/src/black/lines.py
@@ -578,6 +578,7 @@
and self.previous_block.previous_block is None
and len(self.previous_block.original_line.leaves) == 1
and self.previous_block.original_line.is_triple_quoted_s... | {"golden_diff": "diff --git a/src/black/lines.py b/src/black/lines.py\n--- a/src/black/lines.py\n+++ b/src/black/lines.py\n@@ -578,6 +578,7 @@\n and self.previous_block.previous_block is None\n and len(self.previous_block.original_line.leaves) == 1\n and self.previous_block.original_... |
gh_patches_debug_1295 | rasdani/github-patches | git_diff | TheAlgorithms__Python-295 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ProjectEuler -- Problem 1 -- solv2.py -- Error
For the Input ```1000``` I get ```233366.4```. The correct answer should be ```233168```
See [file](https://github.com/TheAlgorithms/Python/blob/master/Project... | diff --git a/Project Euler/Problem 01/sol2.py b/Project Euler/Problem 01/sol2.py
--- a/Project Euler/Problem 01/sol2.py
+++ b/Project Euler/Problem 01/sol2.py
@@ -11,10 +11,10 @@
raw_input = input # Python 3
n = int(raw_input().strip())
sum = 0
-terms = (n-1)/3
-sum+= ((terms)*(6+(terms-1)*3))/2 #sum of an A.... | {"golden_diff": "diff --git a/Project Euler/Problem 01/sol2.py b/Project Euler/Problem 01/sol2.py\n--- a/Project Euler/Problem 01/sol2.py\t\n+++ b/Project Euler/Problem 01/sol2.py\t\n@@ -11,10 +11,10 @@\n raw_input = input # Python 3\n n = int(raw_input().strip())\n sum = 0\n-terms = (n-1)/3\n-sum+= ((terms)*(6+(t... |
gh_patches_debug_1296 | rasdani/github-patches | git_diff | mars-project__mars-284 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Fuse operand's sparse value is wrong
<!--
Thank you for your contribution!
Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->
**Describe... | diff --git a/mars/tensor/expressions/fuse/core.py b/mars/tensor/expressions/fuse/core.py
--- a/mars/tensor/expressions/fuse/core.py
+++ b/mars/tensor/expressions/fuse/core.py
@@ -20,8 +20,8 @@
class TensorFuseChunk(operands.Fuse, TensorOperandMixin):
- def __init__(self, dtype=None, **kw):
- super(Tensor... | {"golden_diff": "diff --git a/mars/tensor/expressions/fuse/core.py b/mars/tensor/expressions/fuse/core.py\n--- a/mars/tensor/expressions/fuse/core.py\n+++ b/mars/tensor/expressions/fuse/core.py\n@@ -20,8 +20,8 @@\n \n \n class TensorFuseChunk(operands.Fuse, TensorOperandMixin):\n- def __init__(self, dtype=None, **kw... |
gh_patches_debug_1297 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-505 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
urls in parens don't parse as links
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `bookwyrm/outgoing.py`
... | diff --git a/bookwyrm/outgoing.py b/bookwyrm/outgoing.py
--- a/bookwyrm/outgoing.py
+++ b/bookwyrm/outgoing.py
@@ -296,7 +296,7 @@
def format_links(content):
''' detect and format links '''
return re.sub(
- r'([^(href=")]|^)(https?:\/\/(%s([\w\.\-_\/+&\?=:;,])*))' % \
+ r'([^(href=")]|^|\()(htt... | {"golden_diff": "diff --git a/bookwyrm/outgoing.py b/bookwyrm/outgoing.py\n--- a/bookwyrm/outgoing.py\n+++ b/bookwyrm/outgoing.py\n@@ -296,7 +296,7 @@\n def format_links(content):\n ''' detect and format links '''\n return re.sub(\n- r'([^(href=\")]|^)(https?:\\/\\/(%s([\\w\\.\\-_\\/+&\\?=:;,])*))' % \\\... |
gh_patches_debug_1298 | rasdani/github-patches | git_diff | modin-project__modin-2171 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[REFACTOR] Concat for a single frame shouldn't cause additional operations
Currently, in OmniSci engine concat execution for a single frame adds an additional projection (which ais basically NOP). In some cor... | diff --git a/modin/experimental/engines/omnisci_on_ray/frame/data.py b/modin/experimental/engines/omnisci_on_ray/frame/data.py
--- a/modin/experimental/engines/omnisci_on_ray/frame/data.py
+++ b/modin/experimental/engines/omnisci_on_ray/frame/data.py
@@ -562,6 +562,9 @@
def _concat(
self, axis, other_modi... | {"golden_diff": "diff --git a/modin/experimental/engines/omnisci_on_ray/frame/data.py b/modin/experimental/engines/omnisci_on_ray/frame/data.py\n--- a/modin/experimental/engines/omnisci_on_ray/frame/data.py\n+++ b/modin/experimental/engines/omnisci_on_ray/frame/data.py\n@@ -562,6 +562,9 @@\n def _concat(\n ... |
gh_patches_debug_1299 | rasdani/github-patches | git_diff | ckan__ckan-7353 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
No default for WTF_CSRF_SECRET_KEY config option
## CKAN version
2.10
## Describe the bug
The `WTF_CSRF_SECRET_KEY` config option, used to generate the CSRF tokens is defined as such in the declaratio... | diff --git a/ckan/config/middleware/flask_app.py b/ckan/config/middleware/flask_app.py
--- a/ckan/config/middleware/flask_app.py
+++ b/ckan/config/middleware/flask_app.py
@@ -262,7 +262,10 @@
_register_error_handler(app)
# CSRF
- app.config['WTF_CSRF_FIELD_NAME'] = "_csrf_token"
+ wtf_key = "WTF_CSRF_... | {"golden_diff": "diff --git a/ckan/config/middleware/flask_app.py b/ckan/config/middleware/flask_app.py\n--- a/ckan/config/middleware/flask_app.py\n+++ b/ckan/config/middleware/flask_app.py\n@@ -262,7 +262,10 @@\n _register_error_handler(app)\n \n # CSRF\n- app.config['WTF_CSRF_FIELD_NAME'] = \"_csrf_token\"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.