problem_id
stringlengths
18
22
source
stringclasses
1 value
task_type
stringclasses
1 value
in_source_id
stringlengths
13
58
prompt
stringlengths
1.1k
10.2k
golden_diff
stringlengths
151
4.94k
verification_info
stringlengths
582
21k
num_tokens
int64
271
2.05k
num_tokens_diff
int64
47
1.02k
gh_patches_debug_23432
rasdani/github-patches
git_diff
avocado-framework__avocado-5236
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support for codecoverage when running Python tests Avocado doesn't have a documented and/or supported way for generating code coverage information when running Python based tests. The first objective is to...
diff --git a/avocado/core/runners/avocado_instrumented.py b/avocado/core/runners/avocado_instrumented.py --- a/avocado/core/runners/avocado_instrumented.py +++ b/avocado/core/runners/avocado_instrumented.py @@ -1,4 +1,5 @@ import multiprocessing +import os import tempfile import time import traceback @@ -70,11 +71,...
{"golden_diff": "diff --git a/avocado/core/runners/avocado_instrumented.py b/avocado/core/runners/avocado_instrumented.py\n--- a/avocado/core/runners/avocado_instrumented.py\n+++ b/avocado/core/runners/avocado_instrumented.py\n@@ -1,4 +1,5 @@\n import multiprocessing\n+import os\n import tempfile\n import time\n import...
1,758
244
gh_patches_debug_34104
rasdani/github-patches
git_diff
pallets__werkzeug-2777
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Elapsed and timestamp values are not available to filename_format function When the `ProfilerMiddleware` `filename_format` argument is a callable, the callable will only receive the WSGI environ variable. How...
diff --git a/src/werkzeug/middleware/profiler.py b/src/werkzeug/middleware/profiler.py --- a/src/werkzeug/middleware/profiler.py +++ b/src/werkzeug/middleware/profiler.py @@ -44,11 +44,16 @@ - ``{method}`` - The request method; GET, POST, etc. - ``{path}`` - The request path or 'root' should one not exi...
{"golden_diff": "diff --git a/src/werkzeug/middleware/profiler.py b/src/werkzeug/middleware/profiler.py\n--- a/src/werkzeug/middleware/profiler.py\n+++ b/src/werkzeug/middleware/profiler.py\n@@ -44,11 +44,16 @@\n \n - ``{method}`` - The request method; GET, POST, etc.\n - ``{path}`` - The request path or 'r...
1,974
542
gh_patches_debug_16133
rasdani/github-patches
git_diff
pyscript__pyscript-1017
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Antigravity example is broken after stdout/display changes ### Checklist - [X] I added a descriptive title - [X] I searched for other issues and couldn't find a solution or duplication - [X] I already search...
diff --git a/examples/antigravity.py b/examples/antigravity.py --- a/examples/antigravity.py +++ b/examples/antigravity.py @@ -1,5 +1,4 @@ import random -import sys from js import DOMParser, document, setInterval from pyodide.ffi import create_proxy @@ -11,9 +10,10 @@ url = "./antigravity.svg" def __in...
{"golden_diff": "diff --git a/examples/antigravity.py b/examples/antigravity.py\n--- a/examples/antigravity.py\n+++ b/examples/antigravity.py\n@@ -1,5 +1,4 @@\n import random\n-import sys\n \n from js import DOMParser, document, setInterval\n from pyodide.ffi import create_proxy\n@@ -11,9 +10,10 @@\n url = \"./anti...
1,042
192
gh_patches_debug_1660
rasdani/github-patches
git_diff
e2nIEE__pandapower-2106
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [bug] Pandapower interferes with matplotlib savefig ### Bug report checklis - [X] Searched the [issues page](https://github.com/e2nIEE/pandapower/issues) for similar reports - [X] Read the relevant sections...
diff --git a/pandapower/plotting/__init__.py b/pandapower/plotting/__init__.py --- a/pandapower/plotting/__init__.py +++ b/pandapower/plotting/__init__.py @@ -16,7 +16,7 @@ class GC(GraphicsContextBase): def __init__(self): super().__init__() - self._capstyle = 'round' + ...
{"golden_diff": "diff --git a/pandapower/plotting/__init__.py b/pandapower/plotting/__init__.py\n--- a/pandapower/plotting/__init__.py\n+++ b/pandapower/plotting/__init__.py\n@@ -16,7 +16,7 @@\n class GC(GraphicsContextBase):\n def __init__(self):\n super().__init__()\n- self._capstyl...
2,025
118
gh_patches_debug_34258
rasdani/github-patches
git_diff
beetbox__beets-4197
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- kodiupdate: support updating multiple Kodi instances Pretty straitforward ask, it would be nice if when running beets using the Kodi update client that you could enter multiple clients syntax would be some...
diff --git a/beetsplug/kodiupdate.py b/beetsplug/kodiupdate.py --- a/beetsplug/kodiupdate.py +++ b/beetsplug/kodiupdate.py @@ -54,11 +54,12 @@ super().__init__() # Adding defaults. - config['kodi'].add({ + config['kodi'].add([{ 'host': 'localhost', 'port': 808...
{"golden_diff": "diff --git a/beetsplug/kodiupdate.py b/beetsplug/kodiupdate.py\n--- a/beetsplug/kodiupdate.py\n+++ b/beetsplug/kodiupdate.py\n@@ -54,11 +54,12 @@\n super().__init__()\n \n # Adding defaults.\n- config['kodi'].add({\n+ config['kodi'].add([{\n 'host': 'localhost'...
1,285
584
gh_patches_debug_27570
rasdani/github-patches
git_diff
rotki__rotki-62
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Etherscan balance query for more than 20 accounts won't work Etherscan has a 20 account limit per query. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files...
diff --git a/rotkehlchen/ethchain.py b/rotkehlchen/ethchain.py --- a/rotkehlchen/ethchain.py +++ b/rotkehlchen/ethchain.py @@ -90,19 +90,25 @@ def get_multieth_balance(self, accounts): """Returns a dict with keys being accounts and balances in ETH""" balances = {} + if not self.connected...
{"golden_diff": "diff --git a/rotkehlchen/ethchain.py b/rotkehlchen/ethchain.py\n--- a/rotkehlchen/ethchain.py\n+++ b/rotkehlchen/ethchain.py\n@@ -90,19 +90,25 @@\n def get_multieth_balance(self, accounts):\n \"\"\"Returns a dict with keys being accounts and balances in ETH\"\"\"\n balances = {}\n+\...
2,014
424
gh_patches_debug_340
rasdani/github-patches
git_diff
facebookresearch__nevergrad-705
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Wrong dates in changelog All the dates at https://github.com/facebookresearch/nevergrad/blob/master/CHANGELOG.md shows 2019, but seems it should be 2020. --- END ISSUE --- Below are some code segments, each...
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -70,4 +70,5 @@ html_static_path = [] # -- Other -- -linkcheck_ignore = [r'https://gecco-2020.sigevo.org/*'] +linkcheck_ignore = [r'https://gecco-2020.sigevo.org/*', + r'https://arxiv.org/abs/*'] # Transient certifi...
{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -70,4 +70,5 @@\n html_static_path = []\n \n # -- Other --\n-linkcheck_ignore = [r'https://gecco-2020.sigevo.org/*']\n+linkcheck_ignore = [r'https://gecco-2020.sigevo.org/*',\n+ r'https://arxiv.org/ab...
988
109
gh_patches_debug_13293
rasdani/github-patches
git_diff
ray-project__ray-8842
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Asyncio] InvalidStateError when multiple awaits on same oid <!--Please include [tune], [rllib], [autoscaler] etc. in the issue title if relevant--> ### What is the problem? *Ray version and other syste...
diff --git a/python/ray/async_compat.py b/python/ray/async_compat.py --- a/python/ray/async_compat.py +++ b/python/ray/async_compat.py @@ -75,6 +75,11 @@ # Result from direct call. assert isinstance(result, AsyncGetResponse), result if result.plasma_fallback_id is None: + ...
{"golden_diff": "diff --git a/python/ray/async_compat.py b/python/ray/async_compat.py\n--- a/python/ray/async_compat.py\n+++ b/python/ray/async_compat.py\n@@ -75,6 +75,11 @@\n # Result from direct call.\n assert isinstance(result, AsyncGetResponse), result\n if result.plasma_fallback...
1,726
152
gh_patches_debug_675
rasdani/github-patches
git_diff
joke2k__faker-1423
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Faker adds path objects to sys.path_importer_cache, breaking other packages * Faker version: 6.6.3 * OS: Gentoo Linux After importing `faker`, entries with `PosixPath` objects are added as keys to `sys.pa...
diff --git a/faker/utils/loading.py b/faker/utils/loading.py --- a/faker/utils/loading.py +++ b/faker/utils/loading.py @@ -22,7 +22,7 @@ else: # unfrozen path = Path(module.__file__).parent - return path + return str(path) def list_module(module: ModuleType) -> List[str]:
{"golden_diff": "diff --git a/faker/utils/loading.py b/faker/utils/loading.py\n--- a/faker/utils/loading.py\n+++ b/faker/utils/loading.py\n@@ -22,7 +22,7 @@\n else:\n # unfrozen\n path = Path(module.__file__).parent\n- return path\n+ return str(path)\n \n \n def list_module(module: ModuleType)...
1,148
86
gh_patches_debug_33060
rasdani/github-patches
git_diff
pypa__virtualenv-1794
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- activate_this.py failed for python2 virtualenvs **Issue** It seems recently pipenv introduced a new type of activate_this.py. On windows the content of activate_this.py has something like this: ``` prev_...
diff --git a/src/virtualenv/activation/python/__init__.py b/src/virtualenv/activation/python/__init__.py --- a/src/virtualenv/activation/python/__init__.py +++ b/src/virtualenv/activation/python/__init__.py @@ -1,6 +1,7 @@ from __future__ import absolute_import, unicode_literals import os +import sys from collecti...
{"golden_diff": "diff --git a/src/virtualenv/activation/python/__init__.py b/src/virtualenv/activation/python/__init__.py\n--- a/src/virtualenv/activation/python/__init__.py\n+++ b/src/virtualenv/activation/python/__init__.py\n@@ -1,6 +1,7 @@\n from __future__ import absolute_import, unicode_literals\n \n import os\n+i...
1,799
454
gh_patches_debug_49907
rasdani/github-patches
git_diff
CTFd__CTFd-1101
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- CTFd crash right after install ## Git + python 3.7.2 (3b1b82b9a0fbcb8731d7a3a3bbac99499c466c99) [![asciicast](https://asciinema.org/a/iHDMVNRWSYJDTZUgIy4wIBsOK.svg)](https://asciinema.org/a/iHDMVNRWSYJDTZU...
diff --git a/wsgi.py b/wsgi.py --- a/wsgi.py +++ b/wsgi.py @@ -1,8 +1,14 @@ -from gevent import monkey -monkey.patch_all() +import os + +# Detect if we're running via `flask run` and don't monkey patch +if not os.getenv("FLASK_RUN_FROM_CLI"): + from gevent import monkey + + monkey.patch_all() + from CTFd import ...
{"golden_diff": "diff --git a/wsgi.py b/wsgi.py\n--- a/wsgi.py\n+++ b/wsgi.py\n@@ -1,8 +1,14 @@\n-from gevent import monkey\n-monkey.patch_all()\n+import os\n+\n+# Detect if we're running via `flask run` and don't monkey patch\n+if not os.getenv(\"FLASK_RUN_FROM_CLI\"):\n+ from gevent import monkey\n+\n+ monkey.p...
763
156
gh_patches_debug_31995
rasdani/github-patches
git_diff
nvaccess__nvda-10182
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Screen curtain reveals mouse position Note, this was reported to me by my wife, so it would help to have at least one sighted person who can verify this. ### Steps to reproduce: 1. Enable the screen curta...
diff --git a/source/visionEnhancementProviders/screenCurtain.py b/source/visionEnhancementProviders/screenCurtain.py --- a/source/visionEnhancementProviders/screenCurtain.py +++ b/source/visionEnhancementProviders/screenCurtain.py @@ -38,6 +38,8 @@ _MagSetFullscreenColorEffectArgTypes = ((1, "effect"),) _MagGetFul...
{"golden_diff": "diff --git a/source/visionEnhancementProviders/screenCurtain.py b/source/visionEnhancementProviders/screenCurtain.py\n--- a/source/visionEnhancementProviders/screenCurtain.py\n+++ b/source/visionEnhancementProviders/screenCurtain.py\n@@ -38,6 +38,8 @@\n \t_MagSetFullscreenColorEffectArgTypes = ((1, \"e...
1,372
425
gh_patches_debug_12450
rasdani/github-patches
git_diff
mathesar-foundation__mathesar-3265
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add OpenAPI Specification for /queries/ endpoint and fix the incorrect specs This is a part of the API Documentation project #2888 ## Problem To ensure the accuracy of the specs generated by drf-spectacul...
diff --git a/config/settings/openapi.py b/config/settings/openapi.py --- a/config/settings/openapi.py +++ b/config/settings/openapi.py @@ -2,7 +2,7 @@ filtered = [] for (path, path_regex, method, callback) in endpoints: # Remove all but DRF API endpoints - if path.startswith("/api/db/v0/databa...
{"golden_diff": "diff --git a/config/settings/openapi.py b/config/settings/openapi.py\n--- a/config/settings/openapi.py\n+++ b/config/settings/openapi.py\n@@ -2,7 +2,7 @@\n filtered = []\n for (path, path_regex, method, callback) in endpoints:\n # Remove all but DRF API endpoints\n- if path.start...
670
204
gh_patches_debug_10650
rasdani/github-patches
git_diff
enthought__chaco-499
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Demo noninteractive.py, Errors after <ENTER> **Problem Description** Errors after <ENTER> **Reproduction Steps:** Run noninteractive.py and hit ENTER **Expected behavior:** ``` Please enter a path ...
diff --git a/examples/demo/noninteractive.py b/examples/demo/noninteractive.py --- a/examples/demo/noninteractive.py +++ b/examples/demo/noninteractive.py @@ -87,7 +87,14 @@ def get_directory(filename): print('Please enter a path in which to place generated plots.') print('Press <ENTER> to generate in the cu...
{"golden_diff": "diff --git a/examples/demo/noninteractive.py b/examples/demo/noninteractive.py\n--- a/examples/demo/noninteractive.py\n+++ b/examples/demo/noninteractive.py\n@@ -87,7 +87,14 @@\n def get_directory(filename):\n print('Please enter a path in which to place generated plots.')\n print('Press <ENTER...
1,535
173
gh_patches_debug_172
rasdani/github-patches
git_diff
ManageIQ__integration_tests-471
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Paginator returns wrong rec_end() result When record is last one on it's own on the last page, rec_end() incorrectly shows 1, instead of rec_total() value. --- END ISSUE --- Below are some code segments, e...
diff --git a/cfme/web_ui/paginator.py b/cfme/web_ui/paginator.py --- a/cfme/web_ui/paginator.py +++ b/cfme/web_ui/paginator.py @@ -78,7 +78,7 @@ if offset: return offset.groups()[0] else: - return '1' + return rec_total() def rec_total():
{"golden_diff": "diff --git a/cfme/web_ui/paginator.py b/cfme/web_ui/paginator.py\n--- a/cfme/web_ui/paginator.py\n+++ b/cfme/web_ui/paginator.py\n@@ -78,7 +78,7 @@\n if offset:\n return offset.groups()[0]\n else:\n- return '1'\n+ return rec_total()\n \n \n def rec_total():\n", "issue": "P...
1,021
87
gh_patches_debug_37039
rasdani/github-patches
git_diff
microsoft__nni-1640
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- nnictl package install not working for venv It seems that `nnictl package install` makes the package going to user level, which makes it not accessible from a venv. Warning: ``` Installing collected pa...
diff --git a/tools/nni_cmd/command_utils.py b/tools/nni_cmd/command_utils.py --- a/tools/nni_cmd/command_utils.py +++ b/tools/nni_cmd/command_utils.py @@ -3,10 +3,11 @@ import os import signal import psutil -from .common_utils import print_error, print_normal, print_warning +from .common_utils import print_error, p...
{"golden_diff": "diff --git a/tools/nni_cmd/command_utils.py b/tools/nni_cmd/command_utils.py\n--- a/tools/nni_cmd/command_utils.py\n+++ b/tools/nni_cmd/command_utils.py\n@@ -3,10 +3,11 @@\n import os\n import signal\n import psutil\n-from .common_utils import print_error, print_normal, print_warning\n+from .common_ut...
1,190
719
gh_patches_debug_10219
rasdani/github-patches
git_diff
docker__docker-py-1736
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- exec_start does not return command output I encountered this problem in my work and managed to write an isolated exposing test case attached to this issue. This program works well on Linux Mint 18.3 and Do...
diff --git a/docker/utils/socket.py b/docker/utils/socket.py --- a/docker/utils/socket.py +++ b/docker/utils/socket.py @@ -59,7 +59,7 @@ try: data = read_exactly(socket, 8) except SocketError: - return 0 + return -1 _, actual = struct.unpack('>BxxxL', data) return actual @@ ...
{"golden_diff": "diff --git a/docker/utils/socket.py b/docker/utils/socket.py\n--- a/docker/utils/socket.py\n+++ b/docker/utils/socket.py\n@@ -59,7 +59,7 @@\n try:\n data = read_exactly(socket, 8)\n except SocketError:\n- return 0\n+ return -1\n \n _, actual = struct.unpack('>BxxxL', d...
1,125
148
gh_patches_debug_36428
rasdani/github-patches
git_diff
googleapis__python-bigquery-258
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Improve guidance for streaming inserts Suggesting we update the insert_rows.py code to showcase how to explicitly define a schema to avoid excessive calls to get_table(). --- END ISSUE --- Below are some co...
diff --git a/samples/table_insert_rows.py b/samples/table_insert_rows.py --- a/samples/table_insert_rows.py +++ b/samples/table_insert_rows.py @@ -16,19 +16,22 @@ def table_insert_rows(table_id): # [START bigquery_table_insert_rows] - from google.cloud import bigquery # Construct a BigQuery client o...
{"golden_diff": "diff --git a/samples/table_insert_rows.py b/samples/table_insert_rows.py\n--- a/samples/table_insert_rows.py\n+++ b/samples/table_insert_rows.py\n@@ -16,19 +16,22 @@\n def table_insert_rows(table_id):\n \n # [START bigquery_table_insert_rows]\n-\n from google.cloud import bigquery\n \n # Co...
1,078
750
gh_patches_debug_1717
rasdani/github-patches
git_diff
open-telemetry__opentelemetry-python-2016
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update OTLP HTTP port As per spec change here: https://github.com/open-telemetry/opentelemetry-specification/pull/1839 The OTLP HTTP port should be 4318. --- END ISSUE --- Below are some code segments...
diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py --- a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemet...
{"golden_diff": "diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py\n--- a/exporter/opentelemetry-exporter-otlp-proto-ht...
2,008
209
gh_patches_debug_31931
rasdani/github-patches
git_diff
Azure__azure-cli-extensions-1181
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- app-insights az cli extension seems not working properly in AzureChinaCloud (China East 2) - If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at [Azure/azure-cli](https://github.co...
diff --git a/src/application-insights/azext_applicationinsights/_client_factory.py b/src/application-insights/azext_applicationinsights/_client_factory.py --- a/src/application-insights/azext_applicationinsights/_client_factory.py +++ b/src/application-insights/azext_applicationinsights/_client_factory.py @@ -10,7 +10,...
{"golden_diff": "diff --git a/src/application-insights/azext_applicationinsights/_client_factory.py b/src/application-insights/azext_applicationinsights/_client_factory.py\n--- a/src/application-insights/azext_applicationinsights/_client_factory.py\n+++ b/src/application-insights/azext_applicationinsights/_client_facto...
1,726
472
gh_patches_debug_64261
rasdani/github-patches
git_diff
pyjanitor-devs__pyjanitor-574
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [INF] Allow `import_message()` to be Python distribution flexible # Brief Description <!-- Please provide a brief description of what you'd like to propose. --> Currently, if a user attempts to user a f...
diff --git a/janitor/spark/functions.py b/janitor/spark/functions.py --- a/janitor/spark/functions.py +++ b/janitor/spark/functions.py @@ -11,7 +11,7 @@ try: from pyspark.sql import DataFrame except ImportError: - import_message( + janitor_utils.import_message( submodule="spark", package=...
{"golden_diff": "diff --git a/janitor/spark/functions.py b/janitor/spark/functions.py\n--- a/janitor/spark/functions.py\n+++ b/janitor/spark/functions.py\n@@ -11,7 +11,7 @@\n try:\n from pyspark.sql import DataFrame\n except ImportError:\n- import_message(\n+ janitor_utils.import_message(\n submodule=...
1,485
99
gh_patches_debug_737
rasdani/github-patches
git_diff
graspologic-org__graspologic-176
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- change semipar and nonpar names? What do people think? @jovo brought up that the current names are uninformative. I agree, but don't really have a strong opinion on it --- END ISSUE --- Below are some code...
diff --git a/graspy/inference/__init__.py b/graspy/inference/__init__.py --- a/graspy/inference/__init__.py +++ b/graspy/inference/__init__.py @@ -1,4 +1,4 @@ -from .semipar import SemiparametricTest -from .nonpar import NonparametricTest +from .latent_position_test import LatentPositionTest +from .latent_distribution_...
{"golden_diff": "diff --git a/graspy/inference/__init__.py b/graspy/inference/__init__.py\n--- a/graspy/inference/__init__.py\n+++ b/graspy/inference/__init__.py\n@@ -1,4 +1,4 @@\n-from .semipar import SemiparametricTest\n-from .nonpar import NonparametricTest\n+from .latent_position_test import LatentPositionTest\n+fr...
350
139
gh_patches_debug_57590
rasdani/github-patches
git_diff
joke2k__faker-305
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Fail to run the tests Another problem I have when building the RPM is when I try to run the tests. This is in a minimal build environment, so maybe some library is missing. I have tried to use PYTHONPATH like...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ author_email='joke2k@gmail.com', url='http://github.com/joke2k/faker', license='MIT License', - packages=find_packages(exclude=['*.tests']), + packages=find_packages(), platforms=["any"], test_suite='faker.te...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -49,7 +49,7 @@\n author_email='joke2k@gmail.com',\n url='http://github.com/joke2k/faker',\n license='MIT License',\n- packages=find_packages(exclude=['*.tests']),\n+ packages=find_packages(),\n platforms=[\"any\"...
1,488
99
gh_patches_debug_54121
rasdani/github-patches
git_diff
open-telemetry__opentelemetry-python-contrib-1439
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- System metrics instrumentation not working with custom defined configuration System metric instrumentation is not functional if configuration on which metrics to be exported is explicitly provided. As a minim...
diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instr...
{"golden_diff": "diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py\n--- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py\n+++ b/opentelemetry-instrumentation/src/...
1,789
151
gh_patches_debug_1319
rasdani/github-patches
git_diff
zenml-io__zenml-2271
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update `sklearn` Integration to Support Versions >1.3.0 and Resolve MLflow Autologging Issues ## Open Source Contributors Welcomed! Please comment below if you would like to work on this issue! ### Contac...
diff --git a/src/zenml/integrations/sklearn/__init__.py b/src/zenml/integrations/sklearn/__init__.py --- a/src/zenml/integrations/sklearn/__init__.py +++ b/src/zenml/integrations/sklearn/__init__.py @@ -21,7 +21,7 @@ """Definition of sklearn integration for ZenML.""" NAME = SKLEARN - REQUIREMENTS = ["sci...
{"golden_diff": "diff --git a/src/zenml/integrations/sklearn/__init__.py b/src/zenml/integrations/sklearn/__init__.py\n--- a/src/zenml/integrations/sklearn/__init__.py\n+++ b/src/zenml/integrations/sklearn/__init__.py\n@@ -21,7 +21,7 @@\n \"\"\"Definition of sklearn integration for ZenML.\"\"\"\n \n NAME = SKLE...
1,017
141
gh_patches_debug_1995
rasdani/github-patches
git_diff
RedHatInsights__insights-core-1641
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- RedhatRelease parser failed to parse minor release version in some scenarios In few cases where redhat_release content is something similar to below, RedhatRelease parser fails to get the minor version extrac...
diff --git a/insights/parsers/redhat_release.py b/insights/parsers/redhat_release.py --- a/insights/parsers/redhat_release.py +++ b/insights/parsers/redhat_release.py @@ -54,7 +54,7 @@ @property def minor(self): """int: the minor version of this OS.""" - s = self.parsed["version"].split(".") +...
{"golden_diff": "diff --git a/insights/parsers/redhat_release.py b/insights/parsers/redhat_release.py\n--- a/insights/parsers/redhat_release.py\n+++ b/insights/parsers/redhat_release.py\n@@ -54,7 +54,7 @@\n @property\n def minor(self):\n \"\"\"int: the minor version of this OS.\"\"\"\n- s = self....
1,228
129
gh_patches_debug_10667
rasdani/github-patches
git_diff
saleor__saleor-730
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- no_query_found method is missing. Hello, the user gets an error if he submits the search form without a query. There is not "no_query_found" method inside SearchForm. https://github.com/mirumee/saleor/bl...
diff --git a/saleor/search/views.py b/saleor/search/views.py --- a/saleor/search/views.py +++ b/saleor/search/views.py @@ -23,10 +23,11 @@ if form.is_valid(): visible_products = products_with_details(request.user) results = form.search(model_or_queryset=visible_products) - page = paginate_...
{"golden_diff": "diff --git a/saleor/search/views.py b/saleor/search/views.py\n--- a/saleor/search/views.py\n+++ b/saleor/search/views.py\n@@ -23,10 +23,11 @@\n if form.is_valid():\n visible_products = products_with_details(request.user)\n results = form.search(model_or_queryset=visible_products)\n-...
668
174
gh_patches_debug_11214
rasdani/github-patches
git_diff
hpcaitech__ColossalAI-2737
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs....
diff --git a/colossalai/auto_parallel/tensor_shard/deprecated/graph_analysis.py b/colossalai/auto_parallel/tensor_shard/deprecated/graph_analysis.py --- a/colossalai/auto_parallel/tensor_shard/deprecated/graph_analysis.py +++ b/colossalai/auto_parallel/tensor_shard/deprecated/graph_analysis.py @@ -1,9 +1,11 @@ +from co...
{"golden_diff": "diff --git a/colossalai/auto_parallel/tensor_shard/deprecated/graph_analysis.py b/colossalai/auto_parallel/tensor_shard/deprecated/graph_analysis.py\n--- a/colossalai/auto_parallel/tensor_shard/deprecated/graph_analysis.py\n+++ b/colossalai/auto_parallel/tensor_shard/deprecated/graph_analysis.py\n@@ -1...
1,872
197
gh_patches_debug_36427
rasdani/github-patches
git_diff
strawberry-graphql__strawberry-1116
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Type resolver not called when extending from pydantic model I have 2 types, Category and Articles, and I want the Category type to return its related Articles(I have tried with other simpler types too), but w...
diff --git a/strawberry/experimental/pydantic/object_type.py b/strawberry/experimental/pydantic/object_type.py --- a/strawberry/experimental/pydantic/object_type.py +++ b/strawberry/experimental/pydantic/object_type.py @@ -12,7 +12,8 @@ ) from strawberry.experimental.pydantic.fields import get_basic_type from strawb...
{"golden_diff": "diff --git a/strawberry/experimental/pydantic/object_type.py b/strawberry/experimental/pydantic/object_type.py\n--- a/strawberry/experimental/pydantic/object_type.py\n+++ b/strawberry/experimental/pydantic/object_type.py\n@@ -12,7 +12,8 @@\n )\n from strawberry.experimental.pydantic.fields import get_b...
1,870
549
gh_patches_debug_17800
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-3618
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Spider western_family is broken During the global build at 2021-08-04-14-42-45, spider **western_family** failed with **0 features** and **0 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021...
diff --git a/locations/spiders/western_family.py b/locations/spiders/western_family.py deleted file mode 100644 --- a/locations/spiders/western_family.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -import scrapy - -from locations.items import GeojsonPointItem - - -class WesternFamilySpider(scrapy.Spider): ...
{"golden_diff": "diff --git a/locations/spiders/western_family.py b/locations/spiders/western_family.py\ndeleted file mode 100644\n--- a/locations/spiders/western_family.py\n+++ /dev/null\n@@ -1,33 +0,0 @@\n-# -*- coding: utf-8 -*-\n-import scrapy\n-\n-from locations.items import GeojsonPointItem\n-\n-\n-class WesternF...
777
357
gh_patches_debug_49884
rasdani/github-patches
git_diff
scikit-hep__awkward-895
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Typo in `identifier.py` https://github.com/scikit-hep/awkward-1.0/blob/a0ec3bcacacc81a47fe61a1d99b0bc512a8bb3cf/src/awkward/_v2/identifier.py#L30 --- END ISSUE --- Below are some code segments, each from a ...
diff --git a/src/awkward/_v2/identifier.py b/src/awkward/_v2/identifier.py --- a/src/awkward/_v2/identifier.py +++ b/src/awkward/_v2/identifier.py @@ -27,7 +27,7 @@ self._data = self._nplike.asarray(data, order="C") if len(self._data.shape) != 2: - raise TypeError("Identifer data must be ...
{"golden_diff": "diff --git a/src/awkward/_v2/identifier.py b/src/awkward/_v2/identifier.py\n--- a/src/awkward/_v2/identifier.py\n+++ b/src/awkward/_v2/identifier.py\n@@ -27,7 +27,7 @@\n \n self._data = self._nplike.asarray(data, order=\"C\")\n if len(self._data.shape) != 2:\n- raise TypeErro...
1,463
139
gh_patches_debug_37345
rasdani/github-patches
git_diff
kymatio__kymatio-1001
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- JTFS needs a JAX frontend v0.4.0 Already addressed by #1001 (@cyrusvahidi) --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGI...
diff --git a/kymatio/scattering1d/frontend/jax_frontend.py b/kymatio/scattering1d/frontend/jax_frontend.py --- a/kymatio/scattering1d/frontend/jax_frontend.py +++ b/kymatio/scattering1d/frontend/jax_frontend.py @@ -1,6 +1,7 @@ from ...frontend.jax_frontend import ScatteringJax -from .numpy_frontend import ScatteringNu...
{"golden_diff": "diff --git a/kymatio/scattering1d/frontend/jax_frontend.py b/kymatio/scattering1d/frontend/jax_frontend.py\n--- a/kymatio/scattering1d/frontend/jax_frontend.py\n+++ b/kymatio/scattering1d/frontend/jax_frontend.py\n@@ -1,6 +1,7 @@\n from ...frontend.jax_frontend import ScatteringJax\n-from .numpy_fronte...
613
860
gh_patches_debug_30558
rasdani/github-patches
git_diff
ManimCommunity__manim-1847
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Allow `Cross` to be initialized without being based on an existing Mobject. ## Enhancement proposal <!-- Add a clear and concise description of your enhancement proposal. In particular, if your enhance...
diff --git a/manim/mobject/shape_matchers.py b/manim/mobject/shape_matchers.py --- a/manim/mobject/shape_matchers.py +++ b/manim/mobject/shape_matchers.py @@ -2,10 +2,12 @@ __all__ = ["SurroundingRectangle", "BackgroundRectangle", "Cross", "Underline"] +from typing import Optional from ..constants import * fro...
{"golden_diff": "diff --git a/manim/mobject/shape_matchers.py b/manim/mobject/shape_matchers.py\n--- a/manim/mobject/shape_matchers.py\n+++ b/manim/mobject/shape_matchers.py\n@@ -2,10 +2,12 @@\n \n __all__ = [\"SurroundingRectangle\", \"BackgroundRectangle\", \"Cross\", \"Underline\"]\n \n+from typing import Optional\n...
1,840
541
gh_patches_debug_15397
rasdani/github-patches
git_diff
crytic__slither-1945
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- similar variables detector is extremely slow This detector makes up the majority of runtime on large codebases ``` ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 ...
diff --git a/slither/detectors/variables/similar_variables.py b/slither/detectors/variables/similar_variables.py --- a/slither/detectors/variables/similar_variables.py +++ b/slither/detectors/variables/similar_variables.py @@ -65,12 +65,16 @@ contract_var = contract.variables - all_var = set(all_var...
{"golden_diff": "diff --git a/slither/detectors/variables/similar_variables.py b/slither/detectors/variables/similar_variables.py\n--- a/slither/detectors/variables/similar_variables.py\n+++ b/slither/detectors/variables/similar_variables.py\n@@ -65,12 +65,16 @@\n \n contract_var = contract.variables\n \n- ...
1,704
258
gh_patches_debug_28132
rasdani/github-patches
git_diff
bokeh__bokeh-5457
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- If main.py is run by bokeh serve, warn about running with directory name instead Lots of reports of people running, e.g. ``` bokeh serve --show crossfilter/main.py ``` Which prevents all the features of "...
diff --git a/bokeh/command/util.py b/bokeh/command/util.py --- a/bokeh/command/util.py +++ b/bokeh/command/util.py @@ -5,6 +5,7 @@ import os import sys +import warnings from bokeh.application import Application from bokeh.application.handlers import ScriptHandler, DirectoryHandler, NotebookHandler @@ -19,6 +20,...
{"golden_diff": "diff --git a/bokeh/command/util.py b/bokeh/command/util.py\n--- a/bokeh/command/util.py\n+++ b/bokeh/command/util.py\n@@ -5,6 +5,7 @@\n \n import os\n import sys\n+import warnings\n \n from bokeh.application import Application\n from bokeh.application.handlers import ScriptHandler, DirectoryHandler, No...
1,037
326
gh_patches_debug_28736
rasdani/github-patches
git_diff
opsdroid__opsdroid-183
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Change default log location Logs by default are written to `./opsdroid.log`. So they end up being written wherever you run the command. Logs should either be written to `/var/log/opsdroid.log` or as that m...
diff --git a/opsdroid/__main__.py b/opsdroid/__main__.py --- a/opsdroid/__main__.py +++ b/opsdroid/__main__.py @@ -1,11 +1,12 @@ """Starts opsdroid.""" +import os import sys import logging import argparse from opsdroid.core import OpsDroid -from opsdroid.const import LOG_FILENAME, EXAMPLE_CONFIG_FILE +from ops...
{"golden_diff": "diff --git a/opsdroid/__main__.py b/opsdroid/__main__.py\n--- a/opsdroid/__main__.py\n+++ b/opsdroid/__main__.py\n@@ -1,11 +1,12 @@\n \"\"\"Starts opsdroid.\"\"\"\n \n+import os\n import sys\n import logging\n import argparse\n \n from opsdroid.core import OpsDroid\n-from opsdroid.const import LOG_FILE...
1,373
423
gh_patches_debug_25413
rasdani/github-patches
git_diff
getsentry__sentry-27105
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Upgrade from 21.6.1 to 21.6.2 migration error, relation already exists ### Environment self-hosted (`onpremise` deployment) ### Version 21.6.1 upgrade to 21.6.1 ### Steps to Reproduce 1. git fetch tags/2...
diff --git a/src/sentry/migrations/0216_cdc_setup_replication_index.py b/src/sentry/migrations/0216_cdc_setup_replication_index.py --- a/src/sentry/migrations/0216_cdc_setup_replication_index.py +++ b/src/sentry/migrations/0216_cdc_setup_replication_index.py @@ -29,9 +29,33 @@ ] operations = [ - migr...
{"golden_diff": "diff --git a/src/sentry/migrations/0216_cdc_setup_replication_index.py b/src/sentry/migrations/0216_cdc_setup_replication_index.py\n--- a/src/sentry/migrations/0216_cdc_setup_replication_index.py\n+++ b/src/sentry/migrations/0216_cdc_setup_replication_index.py\n@@ -29,9 +29,33 @@\n ]\n \n opera...
1,100
444
gh_patches_debug_14886
rasdani/github-patches
git_diff
DDMAL__CantusDB-582
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- On Century Detail pages, sometimes unpublished sources are listed Visiting century/3863 while not logged in, there's a link to source/672452. When I click on it, I get a 403 Access Denied error. We need to en...
diff --git a/django/cantusdb_project/main_app/views/century.py b/django/cantusdb_project/main_app/views/century.py --- a/django/cantusdb_project/main_app/views/century.py +++ b/django/cantusdb_project/main_app/views/century.py @@ -1,7 +1,20 @@ from django.views.generic import DetailView -from main_app.models import Ce...
{"golden_diff": "diff --git a/django/cantusdb_project/main_app/views/century.py b/django/cantusdb_project/main_app/views/century.py\n--- a/django/cantusdb_project/main_app/views/century.py\n+++ b/django/cantusdb_project/main_app/views/century.py\n@@ -1,7 +1,20 @@\n from django.views.generic import DetailView\n-from mai...
404
265
gh_patches_debug_36629
rasdani/github-patches
git_diff
svthalia__concrexit-3382
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Facedetection admin resubmit action Sometimes the facedetection lambda can fail randomly. Photos are resubmitted nightly if that happens, but it may be nice to have an alternative for that to do it sooner, wi...
diff --git a/website/facedetection/admin.py b/website/facedetection/admin.py --- a/website/facedetection/admin.py +++ b/website/facedetection/admin.py @@ -1,9 +1,11 @@ -from django.contrib import admin +from django.contrib import admin, messages from django.db.models.query import Prefetch from django.urls import reve...
{"golden_diff": "diff --git a/website/facedetection/admin.py b/website/facedetection/admin.py\n--- a/website/facedetection/admin.py\n+++ b/website/facedetection/admin.py\n@@ -1,9 +1,11 @@\n-from django.contrib import admin\n+from django.contrib import admin, messages\n from django.db.models.query import Prefetch\n from...
1,371
549
gh_patches_debug_8484
rasdani/github-patches
git_diff
pre-commit__pre-commit-1789
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- recursive submodule support for `language: golang` I added this hook in `pre-commit-hooks.yaml` in `https://github.com/google/go-jsonnet`, and then when I try to use this hook as: ``` repos: - repo: http...
diff --git a/pre_commit/languages/golang.py b/pre_commit/languages/golang.py --- a/pre_commit/languages/golang.py +++ b/pre_commit/languages/golang.py @@ -69,7 +69,8 @@ repo_src_dir = os.path.join(directory, 'src', guess_go_dir(remote)) # Clone into the goenv we'll create - helpers.run_setup_...
{"golden_diff": "diff --git a/pre_commit/languages/golang.py b/pre_commit/languages/golang.py\n--- a/pre_commit/languages/golang.py\n+++ b/pre_commit/languages/golang.py\n@@ -69,7 +69,8 @@\n repo_src_dir = os.path.join(directory, 'src', guess_go_dir(remote))\n \n # Clone into the goenv we'll create\n- ...
1,938
166
gh_patches_debug_23810
rasdani/github-patches
git_diff
translate__pootle-5915
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dates not getting localised in browse tables seems like the dates are not getting localised as they should --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these fil...
diff --git a/pootle/apps/pootle_app/panels.py b/pootle/apps/pootle_app/panels.py --- a/pootle/apps/pootle_app/panels.py +++ b/pootle/apps/pootle_app/panels.py @@ -58,11 +58,15 @@ if not child.get("stats"): continue last_created_unit = ( - timesince(child["stats"...
{"golden_diff": "diff --git a/pootle/apps/pootle_app/panels.py b/pootle/apps/pootle_app/panels.py\n--- a/pootle/apps/pootle_app/panels.py\n+++ b/pootle/apps/pootle_app/panels.py\n@@ -58,11 +58,15 @@\n if not child.get(\"stats\"):\n continue\n last_created_unit = (\n- ...
1,538
317
gh_patches_debug_3513
rasdani/github-patches
git_diff
cookiecutter__cookiecutter-578
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cookiecutter needs to always use utf-8 for writing files I get this on Windows (pitty me): ``` File "c:\program files\python 3.5\lib\site-packages\cookiecutter\generate.py", line 318, in generate_files ...
diff --git a/cookiecutter/hooks.py b/cookiecutter/hooks.py --- a/cookiecutter/hooks.py +++ b/cookiecutter/hooks.py @@ -90,10 +90,11 @@ with tempfile.NamedTemporaryFile( delete=False, - mode='w', + mode='wb', suffix=extension ) as temp: - temp.write(Template(contents).r...
{"golden_diff": "diff --git a/cookiecutter/hooks.py b/cookiecutter/hooks.py\n--- a/cookiecutter/hooks.py\n+++ b/cookiecutter/hooks.py\n@@ -90,10 +90,11 @@\n \n with tempfile.NamedTemporaryFile(\n delete=False,\n- mode='w',\n+ mode='wb',\n suffix=extension\n ) as temp:\n- tem...
1,528
127
gh_patches_debug_2185
rasdani/github-patches
git_diff
googleapis__google-auth-library-python-913
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Setuptools as dependency is problematic w/ pip-tools https://github.com/googleapis/google-auth-library-python/commit/908da752d01fef728bd5cb3eb5b13f2b5c335e51 (#322) added `setuptools` as a dependency in this ...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -28,7 +28,6 @@ 'rsa>=3.1.4,<5; python_version >= "3.6"', # install enum34 to support 2.7. enum34 only works up to python version 3.3. 'enum34>=1.1.10; python_version < "3.4"', - "setuptools>=40.3.0", "six>=1.9.0", )
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -28,7 +28,6 @@\n 'rsa>=3.1.4,<5; python_version >= \"3.6\"',\n # install enum34 to support 2.7. enum34 only works up to python version 3.3.\n 'enum34>=1.1.10; python_version < \"3.4\"',\n- \"setuptools>=40.3.0\",\n ...
1,772
124
gh_patches_debug_15572
rasdani/github-patches
git_diff
scrapy__scrapy-4042
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Error 302 redirection with headers location starts with 3 slash ### Description when the 302 response return a headers's location startswith 3 slash, the scrapy redirect to a url different from what the ...
diff --git a/scrapy/downloadermiddlewares/redirect.py b/scrapy/downloadermiddlewares/redirect.py --- a/scrapy/downloadermiddlewares/redirect.py +++ b/scrapy/downloadermiddlewares/redirect.py @@ -1,5 +1,5 @@ import logging -from six.moves.urllib.parse import urljoin +from six.moves.urllib.parse import urljoin, urlparse...
{"golden_diff": "diff --git a/scrapy/downloadermiddlewares/redirect.py b/scrapy/downloadermiddlewares/redirect.py\n--- a/scrapy/downloadermiddlewares/redirect.py\n+++ b/scrapy/downloadermiddlewares/redirect.py\n@@ -1,5 +1,5 @@\n import logging\n-from six.moves.urllib.parse import urljoin\n+from six.moves.urllib.parse i...
1,964
198
gh_patches_debug_50089
rasdani/github-patches
git_diff
python-telegram-bot__python-telegram-bot-1228
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Can't change filename when send document after upgrading to v11.1.0 ### Steps to reproduce 1. Generate a pickle file "test" (I didn't test other common files yet) 2. Send this file to user `bot.send_do...
diff --git a/telegram/files/inputfile.py b/telegram/files/inputfile.py --- a/telegram/files/inputfile.py +++ b/telegram/files/inputfile.py @@ -70,7 +70,7 @@ self.filename)[0] or DEFAULT_MIME_TYPE else: self.mimetype = DEFAULT_MIME_TYPE - if not self.filename or ...
{"golden_diff": "diff --git a/telegram/files/inputfile.py b/telegram/files/inputfile.py\n--- a/telegram/files/inputfile.py\n+++ b/telegram/files/inputfile.py\n@@ -70,7 +70,7 @@\n self.filename)[0] or DEFAULT_MIME_TYPE\n else:\n self.mimetype = DEFAULT_MIME_TYPE\n- ...
1,702
109
gh_patches_debug_26
rasdani/github-patches
git_diff
nautobot__nautobot-3317
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Remove legacy `manage.py` <!-- NOTE: This template is for use by maintainers only. Please do not submit an issue using this template unless you have been specifically asked to do so. --> ###...
diff --git a/manage.py b/manage.py deleted file mode 100755 --- a/manage.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -from nautobot.core.cli import main - - -if __name__ == "__main__": - main()
{"golden_diff": "diff --git a/manage.py b/manage.py\ndeleted file mode 100755\n--- a/manage.py\n+++ /dev/null\n@@ -1,9 +0,0 @@\n-#!/usr/bin/env python3\n-\n-import sys\n-\n-from nautobot.core.cli import main\n-\n-\n-if __name__ == \"__main__\":\n- main()\n", "issue": "Remove legacy `manage.py` \n<!--\r\n NOTE: Th...
401
77
gh_patches_debug_7304
rasdani/github-patches
git_diff
uccser__cs-unplugged-225
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Complete folder structure for test suite Each file should have a docstring explaining it's intended purpose. Add a code coverage tool --- END ISSUE --- Below are some code segments, each from a relevant fi...
diff --git a/csunplugged/utils/BaseLoader.py b/csunplugged/utils/BaseLoader.py --- a/csunplugged/utils/BaseLoader.py +++ b/csunplugged/utils/BaseLoader.py @@ -10,7 +10,6 @@ from verto import Verto from .check_required_files import check_converter_required_files - from utils.errors.CouldNotFindMarkdownFileError imp...
{"golden_diff": "diff --git a/csunplugged/utils/BaseLoader.py b/csunplugged/utils/BaseLoader.py\n--- a/csunplugged/utils/BaseLoader.py\n+++ b/csunplugged/utils/BaseLoader.py\n@@ -10,7 +10,6 @@\n from verto import Verto\n \n from .check_required_files import check_converter_required_files\n-\n from utils.errors.CouldNot...
1,813
119
gh_patches_debug_22951
rasdani/github-patches
git_diff
ydataai__ydata-profiling-829
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Phi K correlation variable order For me all correlation plots show variables in the (domain-specific sensible) order of the columns in my data frame. Only Phi K shows them in some other order. Is this a...
diff --git a/src/pandas_profiling/model/pandas/correlations_pandas.py b/src/pandas_profiling/model/pandas/correlations_pandas.py --- a/src/pandas_profiling/model/pandas/correlations_pandas.py +++ b/src/pandas_profiling/model/pandas/correlations_pandas.py @@ -104,6 +104,8 @@ def pandas_phik_compute( config: Settin...
{"golden_diff": "diff --git a/src/pandas_profiling/model/pandas/correlations_pandas.py b/src/pandas_profiling/model/pandas/correlations_pandas.py\n--- a/src/pandas_profiling/model/pandas/correlations_pandas.py\n+++ b/src/pandas_profiling/model/pandas/correlations_pandas.py\n@@ -104,6 +104,8 @@\n def pandas_phik_compute...
1,891
305
gh_patches_debug_439
rasdani/github-patches
git_diff
localstack__localstack-1075
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update code climate and badge https://codeclimate.com/github/atlassian/localstack is the old repo, is there a new code climate check for the new repo? The README is pointing to this old code climate project....
diff --git a/localstack/constants.py b/localstack/constants.py --- a/localstack/constants.py +++ b/localstack/constants.py @@ -2,7 +2,7 @@ import localstack_client.config # LocalStack version -VERSION = '0.8.9' +VERSION = '0.8.10' # default AWS region if 'DEFAULT_REGION' not in os.environ:
{"golden_diff": "diff --git a/localstack/constants.py b/localstack/constants.py\n--- a/localstack/constants.py\n+++ b/localstack/constants.py\n@@ -2,7 +2,7 @@\n import localstack_client.config\n \n # LocalStack version\n-VERSION = '0.8.9'\n+VERSION = '0.8.10'\n \n # default AWS region\n if 'DEFAULT_REGION' not in os.en...
1,251
86
gh_patches_debug_13138
rasdani/github-patches
git_diff
ivy-llc__ivy-15454
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- cosh --- 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 @@ -18,16 +18,19 @@ return ivy.cos(x) - @with_unsupported_dtypes({"2.4.2 and below": ("float16"...
{"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@@ -18,16 +18,19 @@\n return ivy.cos(x)\n \n \n-\n @with_unsupported_dtypes({\"2....
593
255
gh_patches_debug_569
rasdani/github-patches
git_diff
pex-tool__pex-945
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Release 2.1.8 On the docket: + [x] Cache pip.pex. #937 + [x] Ensure the interpreter path is a file #938 + [x] Support an unzip toggle for PEXes. #939 + [x] Better support unzip mode PEXes. #941 --- END I...
diff --git a/pex/version.py b/pex/version.py --- a/pex/version.py +++ b/pex/version.py @@ -1,4 +1,4 @@ # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -__version__ = '2.1.7' +__version__ = '2.1.8'
{"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = '2.1.7'\n+__version__ = '2.1.8'\n", "issue"...
384
94
gh_patches_debug_8594
rasdani/github-patches
git_diff
mozilla__bugbug-1094
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support multiclass classifiers in bug_classifier script The bug_classifier script at scripts/bug_classifier.py currently assumes the model is a binary model. We need to make it work for multiclass models too ...
diff --git a/scripts/bug_classifier.py b/scripts/bug_classifier.py --- a/scripts/bug_classifier.py +++ b/scripts/bug_classifier.py @@ -69,10 +69,13 @@ else: probas = model.classify(bug, probabilities=True, importances=False) - if np.argmax(probas) == 1: - print(f"Positive! {pro...
{"golden_diff": "diff --git a/scripts/bug_classifier.py b/scripts/bug_classifier.py\n--- a/scripts/bug_classifier.py\n+++ b/scripts/bug_classifier.py\n@@ -69,10 +69,13 @@\n else:\n probas = model.classify(bug, probabilities=True, importances=False)\n \n- if np.argmax(probas) == 1:\n- ...
1,276
181
gh_patches_debug_19749
rasdani/github-patches
git_diff
openstates__openstates-scrapers-2162
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- OH: `get_session_list` cannot "see" current session Ohio's `get_session_list` appears to have the current session _manually appended_. Not to mention, it hasn't been updated in a year. This should be fixed, t...
diff --git a/openstates/oh/__init__.py b/openstates/oh/__init__.py --- a/openstates/oh/__init__.py +++ b/openstates/oh/__init__.py @@ -46,14 +46,7 @@ "end_date": "2017-12-31" } ] - ignored_scraped_sessions = [ - "127", - "126", - "125", - "124", - "123", ...
{"golden_diff": "diff --git a/openstates/oh/__init__.py b/openstates/oh/__init__.py\n--- a/openstates/oh/__init__.py\n+++ b/openstates/oh/__init__.py\n@@ -46,14 +46,7 @@\n \"end_date\": \"2017-12-31\"\n }\n ]\n- ignored_scraped_sessions = [\n- \"127\",\n- \"126\",\n- \"12...
1,321
294
gh_patches_debug_13150
rasdani/github-patches
git_diff
comic__grand-challenge.org-1631
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Show domain name of the email address that was used to verify the account Google Scholar shows on profiles instead of the entire email address only the domain name. Something like "Verified email address at r...
diff --git a/app/grandchallenge/profiles/templatetags/profiles.py b/app/grandchallenge/profiles/templatetags/profiles.py --- a/app/grandchallenge/profiles/templatetags/profiles.py +++ b/app/grandchallenge/profiles/templatetags/profiles.py @@ -33,9 +33,15 @@ try: if user.verification.is_verified:...
{"golden_diff": "diff --git a/app/grandchallenge/profiles/templatetags/profiles.py b/app/grandchallenge/profiles/templatetags/profiles.py\n--- a/app/grandchallenge/profiles/templatetags/profiles.py\n+++ b/app/grandchallenge/profiles/templatetags/profiles.py\n@@ -33,9 +33,15 @@\n \n try:\n if user.ve...
889
194
gh_patches_debug_7871
rasdani/github-patches
git_diff
explosion__spaCy-1905
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dummy command argument wasn't removed from auto-link after download Auto-linking of downloaded languages was broken in https://github.com/explosion/spaCy/commit/7f0ab145e95036a55af4802184a4b1c496557d0a. The d...
diff --git a/spacy/cli/download.py b/spacy/cli/download.py --- a/spacy/cli/download.py +++ b/spacy/cli/download.py @@ -41,7 +41,7 @@ # package, which fails if model was just installed via # subprocess package_path = get_package_path(model_name) - link(None, model_name, ...
{"golden_diff": "diff --git a/spacy/cli/download.py b/spacy/cli/download.py\n--- a/spacy/cli/download.py\n+++ b/spacy/cli/download.py\n@@ -41,7 +41,7 @@\n # package, which fails if model was just installed via\n # subprocess\n package_path = get_package_path(model_name)\n- ...
1,424
121
gh_patches_debug_30536
rasdani/github-patches
git_diff
mdn__kuma-7776
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Search results presents the locale in the wrong case **Summary** E.g. https://developer.mozilla.org/en-US/search?q=mdn+contribute+ See screenshot: <img width="932" alt="Screen Shot 2021-02-04 at 10 59 44 A...
diff --git a/kuma/search/views.py b/kuma/search/views.py --- a/kuma/search/views.py +++ b/kuma/search/views.py @@ -89,6 +89,21 @@ query_string_parsed["page"] = f"{page - 1}" previous_url = f"?{urlencode(query_string_parsed, True)}" + def package_document(document): + ...
{"golden_diff": "diff --git a/kuma/search/views.py b/kuma/search/views.py\n--- a/kuma/search/views.py\n+++ b/kuma/search/views.py\n@@ -89,6 +89,21 @@\n query_string_parsed[\"page\"] = f\"{page - 1}\"\n previous_url = f\"?{urlencode(query_string_parsed, True)}\"\n \n+ def p...
2,028
417
gh_patches_debug_13436
rasdani/github-patches
git_diff
pyca__cryptography-3584
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Deprecate Whirlpool and RIPEMD --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `src/cryptography/hazmat/pri...
diff --git a/src/cryptography/hazmat/primitives/hashes.py b/src/cryptography/hazmat/primitives/hashes.py --- a/src/cryptography/hazmat/primitives/hashes.py +++ b/src/cryptography/hazmat/primitives/hashes.py @@ -149,6 +149,14 @@ block_size = 64 +RIPEMD160 = utils.deprecated( + RIPEMD160, + __name__, + ...
{"golden_diff": "diff --git a/src/cryptography/hazmat/primitives/hashes.py b/src/cryptography/hazmat/primitives/hashes.py\n--- a/src/cryptography/hazmat/primitives/hashes.py\n+++ b/src/cryptography/hazmat/primitives/hashes.py\n@@ -149,6 +149,14 @@\n block_size = 64\n \n \n+RIPEMD160 = utils.deprecated(\n+ RIPEMD...
2,030
255
gh_patches_debug_7920
rasdani/github-patches
git_diff
mitmproxy__mitmproxy-2888
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Verbose mode not working in v3.0.0 RC2 ##### Steps to reproduce the problem: 1. Start mitmdump with -v or --verbose flag 2. No DEBUG level logs prints on standard output ##### Any other comments? What ...
diff --git a/mitmproxy/tools/main.py b/mitmproxy/tools/main.py --- a/mitmproxy/tools/main.py +++ b/mitmproxy/tools/main.py @@ -44,8 +44,13 @@ print(debug.dump_system_info()) sys.exit(0) if args.quiet or args.options or args.commands: + # also reduce log verbosity if --options or --commands...
{"golden_diff": "diff --git a/mitmproxy/tools/main.py b/mitmproxy/tools/main.py\n--- a/mitmproxy/tools/main.py\n+++ b/mitmproxy/tools/main.py\n@@ -44,8 +44,13 @@\n print(debug.dump_system_info())\n sys.exit(0)\n if args.quiet or args.options or args.commands:\n+ # also reduce log verbosity if...
1,981
156
gh_patches_debug_33436
rasdani/github-patches
git_diff
DataDog__dd-trace-py-281
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- dd-trace-py messes with the root logger ``` has anyone else run into the issue of ddtrace-py turning on all default loggers for everything when running `patch_all()`? Weirdly, I can only replicate it within ...
diff --git a/ddtrace/contrib/mysql/__init__.py b/ddtrace/contrib/mysql/__init__.py --- a/ddtrace/contrib/mysql/__init__.py +++ b/ddtrace/contrib/mysql/__init__.py @@ -28,13 +28,16 @@ from ..util import require_modules + +log = logging.getLogger(__name__) + # check `MySQL-python` availability required_modules = [...
{"golden_diff": "diff --git a/ddtrace/contrib/mysql/__init__.py b/ddtrace/contrib/mysql/__init__.py\n--- a/ddtrace/contrib/mysql/__init__.py\n+++ b/ddtrace/contrib/mysql/__init__.py\n@@ -28,13 +28,16 @@\n \n from ..util import require_modules\n \n+\n+log = logging.getLogger(__name__)\n+\n # check `MySQL-python` availab...
2,034
465
gh_patches_debug_433
rasdani/github-patches
git_diff
kornia__kornia-2476
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Next release? ## 🚀 Feature Hi, when will the next kornia release on conda or pypi be? ## Motivation Last conda release was in April, and new features have landed since then, but are unavailable in whe...
diff --git a/kornia/__init__.py b/kornia/__init__.py --- a/kornia/__init__.py +++ b/kornia/__init__.py @@ -13,4 +13,4 @@ from kornia.utils import eye_like, vec_like, create_meshgrid, image_to_tensor, tensor_to_image # Version variable -__version__ = "0.6.13-dev" +__version__ = "0.7.0"
{"golden_diff": "diff --git a/kornia/__init__.py b/kornia/__init__.py\n--- a/kornia/__init__.py\n+++ b/kornia/__init__.py\n@@ -13,4 +13,4 @@\n from kornia.utils import eye_like, vec_like, create_meshgrid, image_to_tensor, tensor_to_image\n \n # Version variable\n-__version__ = \"0.6.13-dev\"\n+__version__ = \"0.7.0\"\n...
507
106
gh_patches_debug_22898
rasdani/github-patches
git_diff
gratipay__gratipay.com-3485
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- revenue model is '' for everyone cf. #3479 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `gratipay/models...
diff --git a/gratipay/models/team.py b/gratipay/models/team.py --- a/gratipay/models/team.py +++ b/gratipay/models/team.py @@ -47,18 +47,22 @@ """.format(thing), (value,)) @classmethod - def create_new(cls, owner, fields): + def insert(cls, owner, **fields): + fields['slug_lower'] = fields[...
{"golden_diff": "diff --git a/gratipay/models/team.py b/gratipay/models/team.py\n--- a/gratipay/models/team.py\n+++ b/gratipay/models/team.py\n@@ -47,18 +47,22 @@\n \"\"\".format(thing), (value,))\n \n @classmethod\n- def create_new(cls, owner, fields):\n+ def insert(cls, owner, **fields):\n+ f...
949
337
gh_patches_debug_22373
rasdani/github-patches
git_diff
zulip__zulip-10098
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- slash commands: Add /dark and /light commands. We have /night and /day, and people are starting to use them. We should add the aliases /dark and /light. --- END ISSUE --- Below are some code segments, each...
diff --git a/zerver/lib/zcommand.py b/zerver/lib/zcommand.py --- a/zerver/lib/zcommand.py +++ b/zerver/lib/zcommand.py @@ -14,18 +14,21 @@ ret = dict() # type: Dict[str, Any] return ret - if command == 'night': + night_commands = ['night', 'dark'] + day_commands = ['day', 'light'] + + i...
{"golden_diff": "diff --git a/zerver/lib/zcommand.py b/zerver/lib/zcommand.py\n--- a/zerver/lib/zcommand.py\n+++ b/zerver/lib/zcommand.py\n@@ -14,18 +14,21 @@\n ret = dict() # type: Dict[str, Any]\n return ret\n \n- if command == 'night':\n+ night_commands = ['night', 'dark']\n+ day_commands =...
654
296
gh_patches_debug_39460
rasdani/github-patches
git_diff
mathesar-foundation__mathesar-151
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Get filtered set of records from table **Problem** <!-- Please provide a clear and concise description of the problem that this feature request is designed to solve.--> At the moment, when we request reco...
diff --git a/db/records.py b/db/records.py --- a/db/records.py +++ b/db/records.py @@ -1,6 +1,9 @@ -from sqlalchemy import delete, select +import logging +from sqlalchemy import delete, select, and_, Column from sqlalchemy.inspection import inspect +logger = logging.getLogger(__name__) + def _get_primary_key_colu...
{"golden_diff": "diff --git a/db/records.py b/db/records.py\n--- a/db/records.py\n+++ b/db/records.py\n@@ -1,6 +1,9 @@\n-from sqlalchemy import delete, select\n+import logging\n+from sqlalchemy import delete, select, and_, Column\n from sqlalchemy.inspection import inspect\n \n+logger = logging.getLogger(__name__)\n+\n...
1,350
798
gh_patches_debug_2891
rasdani/github-patches
git_diff
getsentry__sentry-5094
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Webhook data does not have event id Webhook data contains issue id only. It would be nice to have event id as well. Discussed with @mattrobenolt on IRC. Documenting it here with this issue. --- END ISSUE ...
diff --git a/src/sentry/plugins/sentry_webhooks/plugin.py b/src/sentry/plugins/sentry_webhooks/plugin.py --- a/src/sentry/plugins/sentry_webhooks/plugin.py +++ b/src/sentry/plugins/sentry_webhooks/plugin.py @@ -87,6 +87,8 @@ } data['event'] = dict(event.data or {}) data['event']['tags'] = eve...
{"golden_diff": "diff --git a/src/sentry/plugins/sentry_webhooks/plugin.py b/src/sentry/plugins/sentry_webhooks/plugin.py\n--- a/src/sentry/plugins/sentry_webhooks/plugin.py\n+++ b/src/sentry/plugins/sentry_webhooks/plugin.py\n@@ -87,6 +87,8 @@\n }\n data['event'] = dict(event.data or {})\n data...
1,350
129
gh_patches_debug_604
rasdani/github-patches
git_diff
pex-tool__pex-1419
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Release 2.1.46 On the docket: + [x] Fix Pip proprietary URL env marker handling. #1417 + [x] Un-reify installed wheel script shebangs. #1410 + [x] Support deterministic repository extract tool. #1411 + [...
diff --git a/pex/version.py b/pex/version.py --- a/pex/version.py +++ b/pex/version.py @@ -1,4 +1,4 @@ # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -__version__ = "2.1.45" +__version__ = "2.1.46"
{"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = \"2.1.45\"\n+__version__ = \"2.1.46\"\n", "...
389
96
gh_patches_debug_17600
rasdani/github-patches
git_diff
akvo__akvo-rsr-3513
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Creating new organisations from the project editor fails --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `a...
diff --git a/akvo/rest/views/organisation.py b/akvo/rest/views/organisation.py --- a/akvo/rest/views/organisation.py +++ b/akvo/rest/views/organisation.py @@ -9,8 +9,8 @@ from django.utils import six from rest_framework.decorators import api_view from rest_framework.exceptions import ParseError -from rest_framework....
{"golden_diff": "diff --git a/akvo/rest/views/organisation.py b/akvo/rest/views/organisation.py\n--- a/akvo/rest/views/organisation.py\n+++ b/akvo/rest/views/organisation.py\n@@ -9,8 +9,8 @@\n from django.utils import six\n from rest_framework.decorators import api_view\n from rest_framework.exceptions import ParseErro...
1,851
186
gh_patches_debug_22416
rasdani/github-patches
git_diff
privacyidea__privacyidea-2563
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Container audit fails in 3.5 The container audit will fail in version 3.5 due to a missing parameter in the constructor. https://community.privacyidea.org/t/logging-error-after-update-to-3-5/1811/2 --- EN...
diff --git a/privacyidea/lib/auditmodules/containeraudit.py b/privacyidea/lib/auditmodules/containeraudit.py --- a/privacyidea/lib/auditmodules/containeraudit.py +++ b/privacyidea/lib/auditmodules/containeraudit.py @@ -46,14 +46,15 @@ to a list of audit modules. """ - def __init__(self, config=None): - ...
{"golden_diff": "diff --git a/privacyidea/lib/auditmodules/containeraudit.py b/privacyidea/lib/auditmodules/containeraudit.py\n--- a/privacyidea/lib/auditmodules/containeraudit.py\n+++ b/privacyidea/lib/auditmodules/containeraudit.py\n@@ -46,14 +46,15 @@\n to a list of audit modules.\n \"\"\"\n \n- def __ini...
1,583
312
gh_patches_debug_47859
rasdani/github-patches
git_diff
saleor__saleor-903
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Server Error (500) when adding attribute Hi, First of all thanks for this excellent software, makes my life easier. I deployed it on heroku using the heroku elements (https://elements.heroku.com/buttons...
diff --git a/saleor/product/models/utils.py b/saleor/product/models/utils.py --- a/saleor/product/models/utils.py +++ b/saleor/product/models/utils.py @@ -11,5 +11,5 @@ if choice_obj: display_map[attribute.pk] = choice_obj else: - display_map[attribute.pk] = val...
{"golden_diff": "diff --git a/saleor/product/models/utils.py b/saleor/product/models/utils.py\n--- a/saleor/product/models/utils.py\n+++ b/saleor/product/models/utils.py\n@@ -11,5 +11,5 @@\n if choice_obj:\n display_map[attribute.pk] = choice_obj\n else:\n- display...
493
99
gh_patches_debug_48735
rasdani/github-patches
git_diff
microsoft__torchgeo-309
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Open in Colab URL broken in 0.1.1 The latest 0.1.1 release broke the "Open in Colab" URL in our tutorials. Still trying to fix this. --- END ISSUE --- Below are some code segments, each from a relevant file...
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -118,7 +118,11 @@ nbsphinx_prolog = """ {% set colab = "https://colab.research.google.com" %} {% set repo = "microsoft/torchgeo" %} -{% set branch = "main" %} +{% if "dev" in env.config.release %} + {% set branch = "main" %} +{% els...
{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -118,7 +118,11 @@\n nbsphinx_prolog = \"\"\"\n {% set colab = \"https://colab.research.google.com\" %}\n {% set repo = \"microsoft/torchgeo\" %}\n-{% set branch = \"main\" %}\n+{% if \"dev\" in env.config.release %}\n+...
1,697
151
gh_patches_debug_18980
rasdani/github-patches
git_diff
mne-tools__mne-bids-320
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [joss] list supported python versions in pypi piggy-backing off of one of @TomDonoghue's comments: > Is there a minimum version of Python3 required? I guess that there is some minimum required sub-version of...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -37,6 +37,7 @@ download_url=DOWNLOAD_URL, long_description=open('README.rst').read(), long_description_content_type='text/x-rst', + python_requires='~=3.5', classifiers=[ 'Intended Audie...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -37,6 +37,7 @@\n download_url=DOWNLOAD_URL,\n long_description=open('README.rst').read(),\n long_description_content_type='text/x-rst',\n+ python_requires='~=3.5',\n classifiers=[\n ...
1,093
176
gh_patches_debug_25171
rasdani/github-patches
git_diff
fidals__shopelectro-778
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cart issues on prod This is PO comments: ----- заходишь на сайт, переходишь в товар. добавляешь его в корзину. уходишь на другой товар, добавляешь его и переходишь. в корзину. ..., а его там нет ---...
diff --git a/shopelectro/urls.py b/shopelectro/urls.py --- a/shopelectro/urls.py +++ b/shopelectro/urls.py @@ -5,7 +5,7 @@ from django.conf.urls import url, include from django.conf.urls.static import static from django.contrib.sitemaps.views import sitemap -from django.views.decorators.cache import cache_page +from...
{"golden_diff": "diff --git a/shopelectro/urls.py b/shopelectro/urls.py\n--- a/shopelectro/urls.py\n+++ b/shopelectro/urls.py\n@@ -5,7 +5,7 @@\n from django.conf.urls import url, include\n from django.conf.urls.static import static\n from django.contrib.sitemaps.views import sitemap\n-from django.views.decorators.cache...
2,006
335
gh_patches_debug_31138
rasdani/github-patches
git_diff
learningequality__kolibri-11049
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Catch and handle EmptyResultSet error when trying to cache metadata labels EmptyResultSet Sentry Issue: [KOLIBRI-BACKEND-2E9](https://learningequality.sentry.io/issues/4005137733/?referrer=github_integration...
diff --git a/kolibri/core/content/utils/search.py b/kolibri/core/content/utils/search.py --- a/kolibri/core/content/utils/search.py +++ b/kolibri/core/content/utils/search.py @@ -9,6 +9,7 @@ except ImportError: BitOr = None +from django.core.exceptions import EmptyResultSet from django.db import connections f...
{"golden_diff": "diff --git a/kolibri/core/content/utils/search.py b/kolibri/core/content/utils/search.py\n--- a/kolibri/core/content/utils/search.py\n+++ b/kolibri/core/content/utils/search.py\n@@ -9,6 +9,7 @@\n except ImportError:\n BitOr = None\n \n+from django.core.exceptions import EmptyResultSet\n from django...
1,983
392
gh_patches_debug_18943
rasdani/github-patches
git_diff
ansible__ansible-lint-996
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- E208 is too aggressive ##### Summary When E208 is triggered, it should be sure that a file is being created. There are modules which only optionally create the file and, when not used in that form, then they...
diff --git a/lib/ansiblelint/rules/MissingFilePermissionsRule.py b/lib/ansiblelint/rules/MissingFilePermissionsRule.py --- a/lib/ansiblelint/rules/MissingFilePermissionsRule.py +++ b/lib/ansiblelint/rules/MissingFilePermissionsRule.py @@ -35,17 +35,28 @@ version_added = 'v4.3.0' _modules = ( + 'assem...
{"golden_diff": "diff --git a/lib/ansiblelint/rules/MissingFilePermissionsRule.py b/lib/ansiblelint/rules/MissingFilePermissionsRule.py\n--- a/lib/ansiblelint/rules/MissingFilePermissionsRule.py\n+++ b/lib/ansiblelint/rules/MissingFilePermissionsRule.py\n@@ -35,17 +35,28 @@\n version_added = 'v4.3.0'\n \n _modu...
1,422
290
gh_patches_debug_22774
rasdani/github-patches
git_diff
vispy__vispy-1596
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- XYZAxisVisuals Override Defaults It looks like XYZAxisVisual is not overridable in the **init** function for the verts and color arguments? Passing in `pos=my_custom_verts` results in `TypeError: __init__() ...
diff --git a/vispy/visuals/xyz_axis.py b/vispy/visuals/xyz_axis.py --- a/vispy/visuals/xyz_axis.py +++ b/vispy/visuals/xyz_axis.py @@ -10,17 +10,24 @@ x=red, y=green, z=blue. """ def __init__(self, **kwargs): - verts = np.array([[0, 0, 0], - [1, 0, 0], - ...
{"golden_diff": "diff --git a/vispy/visuals/xyz_axis.py b/vispy/visuals/xyz_axis.py\n--- a/vispy/visuals/xyz_axis.py\n+++ b/vispy/visuals/xyz_axis.py\n@@ -10,17 +10,24 @@\n x=red, y=green, z=blue.\n \"\"\"\n def __init__(self, **kwargs):\n- verts = np.array([[0, 0, 0],\n- [1,...
673
406
gh_patches_debug_30150
rasdani/github-patches
git_diff
ocf__ocfweb-141
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Docs don't auto-reload in dev Because we only read docs once, changes to the Markdown files require manually killing and restarting the server. --- END ISSUE --- Below are some code segments, each from a r...
diff --git a/ocfweb/docs/markdown_based.py b/ocfweb/docs/markdown_based.py --- a/ocfweb/docs/markdown_based.py +++ b/ocfweb/docs/markdown_based.py @@ -1,6 +1,6 @@ """Documents backed by Markdown. -This is the most common type of doc. It reads a Markdown fil and renders it in +This is the most common type of doc. It ...
{"golden_diff": "diff --git a/ocfweb/docs/markdown_based.py b/ocfweb/docs/markdown_based.py\n--- a/ocfweb/docs/markdown_based.py\n+++ b/ocfweb/docs/markdown_based.py\n@@ -1,6 +1,6 @@\n \"\"\"Documents backed by Markdown.\n \n-This is the most common type of doc. It reads a Markdown fil and renders it in\n+This is the m...
793
390
gh_patches_debug_12226
rasdani/github-patches
git_diff
googleapis__python-bigquery-643
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- deps: expand extras to support pyarrow v4 We're actually already testing with pyarrow v4 in some of the samples tests, so this should be safe to expand in our `setup.py` --- END ISSUE --- Below are some cod...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -47,10 +47,10 @@ # grpc.Channel.close() method isn't added until 1.32.0. # https://github.com/grpc/grpc/pull/15254 "grpcio >= 1.32.0, < 2.0dev", - "pyarrow >= 1.0.0, < 4.0dev", + "pyarrow >= 1.0.0, < 5.0dev", ...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -47,10 +47,10 @@\n # grpc.Channel.close() method isn't added until 1.32.0.\n # https://github.com/grpc/grpc/pull/15254\n \"grpcio >= 1.32.0, < 2.0dev\",\n- \"pyarrow >= 1.0.0, < 4.0dev\",\n+ \"pya...
1,756
302
gh_patches_debug_15693
rasdani/github-patches
git_diff
pypa__pip-2396
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- pip.utils.filesystem.check_path_owner should treat group membership properly I have two users who share same .pip/cache directory: `a` and `b`. Both users are members of the group `pip`. There is third user, ...
diff --git a/pip/utils/filesystem.py b/pip/utils/filesystem.py --- a/pip/utils/filesystem.py +++ b/pip/utils/filesystem.py @@ -13,12 +13,16 @@ previous = None while path != previous: if os.path.lexists(path): - # Actually do the ownership check - try: - if get_pat...
{"golden_diff": "diff --git a/pip/utils/filesystem.py b/pip/utils/filesystem.py\n--- a/pip/utils/filesystem.py\n+++ b/pip/utils/filesystem.py\n@@ -13,12 +13,16 @@\n previous = None\n while path != previous:\n if os.path.lexists(path):\n- # Actually do the ownership check\n- try:\n-...
632
224
gh_patches_debug_1046
rasdani/github-patches
git_diff
enthought__chaco-424
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Demo quiver.py not working **Problem Description** Zooming in will ends with the following and blank plot. **Reproduction Steps:** Run the file and zoom in until the plot breaks. **Expected behavior...
diff --git a/chaco/quiverplot.py b/chaco/quiverplot.py --- a/chaco/quiverplot.py +++ b/chaco/quiverplot.py @@ -69,6 +69,9 @@ def _render(self, gc, points, icon_mode=False): + if len(points) < 1: + return + with gc: gc.clip_to_rect(self.x, self.y, self.width, self.height)...
{"golden_diff": "diff --git a/chaco/quiverplot.py b/chaco/quiverplot.py\n--- a/chaco/quiverplot.py\n+++ b/chaco/quiverplot.py\n@@ -69,6 +69,9 @@\n \n \n def _render(self, gc, points, icon_mode=False):\n+ if len(points) < 1:\n+ return\n+\n with gc:\n gc.clip_to_rect(self.x, self...
1,921
99
gh_patches_debug_21949
rasdani/github-patches
git_diff
scoutapp__scout_apm_python-205
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Capture Celery Queue Name --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `src/scout_apm/celery.py` Content...
diff --git a/src/scout_apm/celery.py b/src/scout_apm/celery.py --- a/src/scout_apm/celery.py +++ b/src/scout_apm/celery.py @@ -7,20 +7,22 @@ from scout_apm.core.tracked_request import TrackedRequest -# TODO: Capture queue. -# https://stackoverflow.com/questions/22385297/how-to-get-the-queue-in-which-a-task-was-run...
{"golden_diff": "diff --git a/src/scout_apm/celery.py b/src/scout_apm/celery.py\n--- a/src/scout_apm/celery.py\n+++ b/src/scout_apm/celery.py\n@@ -7,20 +7,22 @@\n from scout_apm.core.tracked_request import TrackedRequest\n \n \n-# TODO: Capture queue.\n-# https://stackoverflow.com/questions/22385297/how-to-get-the-queu...
621
397
gh_patches_debug_2698
rasdani/github-patches
git_diff
learningequality__kolibri-4343
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Enable ePUB plugin to run by default ### Observed behavior ePUB plugin is not enabled by default, and it prevents from importing & viewing ePUB files, until the command `kolibri plugin kolibri.plugins.do...
diff --git a/kolibri/utils/conf.py b/kolibri/utils/conf.py --- a/kolibri/utils/conf.py +++ b/kolibri/utils/conf.py @@ -68,6 +68,7 @@ "kolibri.plugins.user", "kolibri_exercise_perseus_plugin", "kolibri.plugins.style_guide", + "kolibri.plugins.document_epub_render", ] #: Everythi...
{"golden_diff": "diff --git a/kolibri/utils/conf.py b/kolibri/utils/conf.py\n--- a/kolibri/utils/conf.py\n+++ b/kolibri/utils/conf.py\n@@ -68,6 +68,7 @@\n \"kolibri.plugins.user\",\n \"kolibri_exercise_perseus_plugin\",\n \"kolibri.plugins.style_guide\",\n+ \"kolibri.plugins.document_epub...
1,976
104
gh_patches_debug_2999
rasdani/github-patches
git_diff
iterative__dvc-2457
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- dvc remove CLI documentation inconsistency `dvc remove` (without `targets`) prints help which states that `targets` are optional, and if not specified will remove all DVC-files. Clearly not the case. ```ba...
diff --git a/dvc/command/remove.py b/dvc/command/remove.py --- a/dvc/command/remove.py +++ b/dvc/command/remove.py @@ -74,9 +74,6 @@ help="Force purge.", ) remove_parser.add_argument( - "targets", - nargs="+", - help="DVC-files to remove. Optional. " - "(Finds all DVC-file...
{"golden_diff": "diff --git a/dvc/command/remove.py b/dvc/command/remove.py\n--- a/dvc/command/remove.py\n+++ b/dvc/command/remove.py\n@@ -74,9 +74,6 @@\n help=\"Force purge.\",\n )\n remove_parser.add_argument(\n- \"targets\",\n- nargs=\"+\",\n- help=\"DVC-files to remove. Optional...
982
125
gh_patches_debug_82
rasdani/github-patches
git_diff
fidals__shopelectro-719
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add canonicals to category page For example this two pages contains no canonicals: - https://www.shopelectro.ru/catalog/categories/akkumuliatory-270/tags/li-ro_hbced/?page=2 - ~https://www.shopelectro.ru/ca...
diff --git a/shopelectro/context.py b/shopelectro/context.py --- a/shopelectro/context.py +++ b/shopelectro/context.py @@ -24,5 +24,4 @@ return { 'page': self._page, - 'skip_canonical': tags_qs.exists(), }
{"golden_diff": "diff --git a/shopelectro/context.py b/shopelectro/context.py\n--- a/shopelectro/context.py\n+++ b/shopelectro/context.py\n@@ -24,5 +24,4 @@\n \n return {\n 'page': self._page,\n- 'skip_canonical': tags_qs.exists(),\n }\n", "issue": "Add canonicals to category page...
624
73
gh_patches_debug_17860
rasdani/github-patches
git_diff
readthedocs__readthedocs.org-6112
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cleanup exception that are not logged as error After #4495 got merged @agjohnson suggested to have an attribute in the Exception class and check for that attribute before log the exception, instead of definin...
diff --git a/readthedocs/vcs_support/base.py b/readthedocs/vcs_support/base.py --- a/readthedocs/vcs_support/base.py +++ b/readthedocs/vcs_support/base.py @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- - """Base classes for VCS backends.""" import logging import os import shutil +from readthedocs.doc_builder.exceptio...
{"golden_diff": "diff --git a/readthedocs/vcs_support/base.py b/readthedocs/vcs_support/base.py\n--- a/readthedocs/vcs_support/base.py\n+++ b/readthedocs/vcs_support/base.py\n@@ -1,10 +1,11 @@\n-# -*- coding: utf-8 -*-\n-\n \"\"\"Base classes for VCS backends.\"\"\"\n import logging\n import os\n import shutil\n \n+fro...
1,697
236
gh_patches_debug_42123
rasdani/github-patches
git_diff
scrapy__scrapy-2400
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cookies from the Cookie request header are not processed I am new in scrapy, and I meet some problems which I can not get answer from google, so I post it here: 1 Cookie not work even set in DEFAULT_REQUEST_...
diff --git a/scrapy/downloadermiddlewares/cookies.py b/scrapy/downloadermiddlewares/cookies.py --- a/scrapy/downloadermiddlewares/cookies.py +++ b/scrapy/downloadermiddlewares/cookies.py @@ -29,8 +29,7 @@ cookiejarkey = request.meta.get("cookiejar") jar = self.jars[cookiejarkey] - cookies = s...
{"golden_diff": "diff --git a/scrapy/downloadermiddlewares/cookies.py b/scrapy/downloadermiddlewares/cookies.py\n--- a/scrapy/downloadermiddlewares/cookies.py\n+++ b/scrapy/downloadermiddlewares/cookies.py\n@@ -29,8 +29,7 @@\n \n cookiejarkey = request.meta.get(\"cookiejar\")\n jar = self.jars[cookiejar...
1,854
996
gh_patches_debug_19309
rasdani/github-patches
git_diff
mitmproxy__mitmproxy-2048
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support absolute-form HTTP requests with IPv6 addresses ##### Steps to reproduce the problem: 1. MITMDump proxy IPv6 flow 2. Log ``` 172.17.15.1:53074: HTTP protocol error in client request: Bad HTTP re...
diff --git a/mitmproxy/net/check.py b/mitmproxy/net/check.py --- a/mitmproxy/net/check.py +++ b/mitmproxy/net/check.py @@ -1,3 +1,4 @@ +import ipaddress import re # Allow underscore in host name @@ -6,17 +7,26 @@ def is_valid_host(host: bytes) -> bool: """ - Checks if a hostname is valid. + Checks...
{"golden_diff": "diff --git a/mitmproxy/net/check.py b/mitmproxy/net/check.py\n--- a/mitmproxy/net/check.py\n+++ b/mitmproxy/net/check.py\n@@ -1,3 +1,4 @@\n+import ipaddress\n import re\n \n # Allow underscore in host name\n@@ -6,17 +7,26 @@\n \n def is_valid_host(host: bytes) -> bool:\n \"\"\"\n- Checks if ...
940
283
gh_patches_debug_16329
rasdani/github-patches
git_diff
gratipay__gratipay.com-3934
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Can't submit new team after changing image. Can't believe this didn't come up yet. I noticed this while exploring [create.json.spt](https://github.com/gratipay/gratipay.com/blob/master/www/teams/create.json.s...
diff --git a/gratipay/utils/images.py b/gratipay/utils/images.py --- a/gratipay/utils/images.py +++ b/gratipay/utils/images.py @@ -8,11 +8,22 @@ small = None crops = requests.post( 'http://gip.rocks/v1', data=image, - headers={'Content-Type': image_type} -...
{"golden_diff": "diff --git a/gratipay/utils/images.py b/gratipay/utils/images.py\n--- a/gratipay/utils/images.py\n+++ b/gratipay/utils/images.py\n@@ -8,11 +8,22 @@\n small = None\n crops = requests.post( 'http://gip.rocks/v1',\n data=image,\n- headers={'Cont...
638
247
gh_patches_debug_8456
rasdani/github-patches
git_diff
microsoft__ptvsd-797
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add ability to launch the debugger in non-debug mode Currently we can only launch the debugger in non-debug mode when using `-m`. I'd like to have the same feature by importing PTVSD and invoking a function,...
diff --git a/ptvsd/debugger.py b/ptvsd/debugger.py --- a/ptvsd/debugger.py +++ b/ptvsd/debugger.py @@ -4,7 +4,7 @@ import sys -from ptvsd._local import run_module, run_file +from ptvsd._local import run_module, run_file, run_main # TODO: not needed? @@ -35,3 +35,9 @@ args = _extra + list(args) k...
{"golden_diff": "diff --git a/ptvsd/debugger.py b/ptvsd/debugger.py\n--- a/ptvsd/debugger.py\n+++ b/ptvsd/debugger.py\n@@ -4,7 +4,7 @@\n \n import sys\n \n-from ptvsd._local import run_module, run_file\n+from ptvsd._local import run_module, run_file, run_main\n \n \n # TODO: not needed?\n@@ -35,3 +35,9 @@\n arg...
677
183
gh_patches_debug_1811
rasdani/github-patches
git_diff
iterative__dvc-2364
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- status: change nothing to reproduce message If I use DVC only to version data/models and don't care about pipelines, this message: `Pipelines are up to date. Nothing to reproduce.` looks really strange...
diff --git a/dvc/command/status.py b/dvc/command/status.py --- a/dvc/command/status.py +++ b/dvc/command/status.py @@ -12,7 +12,7 @@ class CmdDataStatus(CmdDataBase): STATUS_LEN = 20 STATUS_INDENT = "\t" - UP_TO_DATE_MSG = "Pipelines are up to date. Nothing to reproduce." + UP_TO_DATE_MSG = "Data and p...
{"golden_diff": "diff --git a/dvc/command/status.py b/dvc/command/status.py\n--- a/dvc/command/status.py\n+++ b/dvc/command/status.py\n@@ -12,7 +12,7 @@\n class CmdDataStatus(CmdDataBase):\n STATUS_LEN = 20\n STATUS_INDENT = \"\\t\"\n- UP_TO_DATE_MSG = \"Pipelines are up to date. Nothing to reproduce.\"\n+ ...
857
117
gh_patches_debug_16628
rasdani/github-patches
git_diff
jazzband__pip-tools-595
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- README broken on PyPI (must be reStructuredText) The [package description](https://pypi.python.org/pypi/pip-tools/) on PyPI is unreadable since PyPI expects the README in [reStructuredText](http://www.sphinx-...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1,8 +1,14 @@ """ pip-tools keeps your pinned dependencies fresh. """ +from os.path import abspath, dirname, join from setuptools import find_packages, setup +def read_file(filename): + """Read the contents of a file located relative to setup.py...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,8 +1,14 @@\n \"\"\"\n pip-tools keeps your pinned dependencies fresh.\n \"\"\"\n+from os.path import abspath, dirname, join\n from setuptools import find_packages, setup\n \n+def read_file(filename):\n+ \"\"\"Read the contents o...
1,066
192
gh_patches_debug_21303
rasdani/github-patches
git_diff
nltk__nltk-2819
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- WordNetLemmatizer in nltk.stem module What's the parameter of WordNetLemmatizer.lemmatize() in nltk.stem module? Turn to the document, what are the candidate value of the parameter **'pos'**? ![image](https...
diff --git a/nltk/stem/wordnet.py b/nltk/stem/wordnet.py --- a/nltk/stem/wordnet.py +++ b/nltk/stem/wordnet.py @@ -6,8 +6,7 @@ # URL: <http://nltk.org/> # For license information, see LICENSE.TXT -from nltk.corpus import wordnet -from nltk.corpus.reader.wordnet import NOUN +from nltk.corpus import wordnet as wn ...
{"golden_diff": "diff --git a/nltk/stem/wordnet.py b/nltk/stem/wordnet.py\n--- a/nltk/stem/wordnet.py\n+++ b/nltk/stem/wordnet.py\n@@ -6,8 +6,7 @@\n # URL: <http://nltk.org/>\n # For license information, see LICENSE.TXT\n \n-from nltk.corpus import wordnet\n-from nltk.corpus.reader.wordnet import NOUN\n+from nltk.corpu...
817
376
gh_patches_debug_21029
rasdani/github-patches
git_diff
PlasmaPy__PlasmaPy-655
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Create classes to represent ionization state distributions My plan for this PR is to create classes to represent the ionization state distributions of one or more elements. I am going to add in a bunch of du...
diff --git a/plasmapy/examples/plot_dispersion_function.py b/plasmapy/examples/plot_dispersion_function.py --- a/plasmapy/examples/plot_dispersion_function.py +++ b/plasmapy/examples/plot_dispersion_function.py @@ -10,7 +10,6 @@ import matplotlib.pyplot as plt import plasmapy - ####################################...
{"golden_diff": "diff --git a/plasmapy/examples/plot_dispersion_function.py b/plasmapy/examples/plot_dispersion_function.py\n--- a/plasmapy/examples/plot_dispersion_function.py\n+++ b/plasmapy/examples/plot_dispersion_function.py\n@@ -10,7 +10,6 @@\n import matplotlib.pyplot as plt\n import plasmapy\n \n-\n ###########...
1,404
239
gh_patches_debug_10872
rasdani/github-patches
git_diff
aws-cloudformation__cfn-lint-1887
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Exception processing E3037 for AWS::S3::Bucket.Transition.TransitionDate ``` $ cfn-lint --version cfn-lint 0.44.5 ``` The `TransitionDate` property is defined with `PrimitiveType: "Timestamp"`: ```ya...
diff --git a/src/cfnlint/rules/resources/properties/ListDuplicates.py b/src/cfnlint/rules/resources/properties/ListDuplicates.py --- a/src/cfnlint/rules/resources/properties/ListDuplicates.py +++ b/src/cfnlint/rules/resources/properties/ListDuplicates.py @@ -34,7 +34,7 @@ if isinstance(values, list): ...
{"golden_diff": "diff --git a/src/cfnlint/rules/resources/properties/ListDuplicates.py b/src/cfnlint/rules/resources/properties/ListDuplicates.py\n--- a/src/cfnlint/rules/resources/properties/ListDuplicates.py\n+++ b/src/cfnlint/rules/resources/properties/ListDuplicates.py\n@@ -34,7 +34,7 @@\n if isinstance(val...
1,674
155
gh_patches_debug_33558
rasdani/github-patches
git_diff
wagtail__wagtail-170
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Broken URL for jquery.ui.datepicker when 'en-US' used as lang This isn't a big deal at all, but wanted to post just in case anyone wants to take a look. When loading a page with `jquery.ui.datepicker.js`, I...
diff --git a/wagtail/wagtailadmin/templatetags/localize.py b/wagtail/wagtailadmin/templatetags/localize.py --- a/wagtail/wagtailadmin/templatetags/localize.py +++ b/wagtail/wagtailadmin/templatetags/localize.py @@ -1,5 +1,6 @@ from django import template from django.conf import settings +from django.templatetags.stat...
{"golden_diff": "diff --git a/wagtail/wagtailadmin/templatetags/localize.py b/wagtail/wagtailadmin/templatetags/localize.py\n--- a/wagtail/wagtailadmin/templatetags/localize.py\n+++ b/wagtail/wagtailadmin/templatetags/localize.py\n@@ -1,5 +1,6 @@\n from django import template\n from django.conf import settings\n+from d...
1,086
735
gh_patches_debug_6828
rasdani/github-patches
git_diff
kartoza__prj.app-162
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Landing page gives a 404 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `django_project/base/views/error_v...
diff --git a/django_project/base/views/error_views.py b/django_project/base/views/error_views.py --- a/django_project/base/views/error_views.py +++ b/django_project/base/views/error_views.py @@ -21,7 +21,11 @@ """ public_projects = Project.objects.filter(approved=True, private=False) - return render_to_r...
{"golden_diff": "diff --git a/django_project/base/views/error_views.py b/django_project/base/views/error_views.py\n--- a/django_project/base/views/error_views.py\n+++ b/django_project/base/views/error_views.py\n@@ -21,7 +21,11 @@\n \n \"\"\"\n public_projects = Project.objects.filter(approved=True, private=Fals...
503
169
gh_patches_debug_38348
rasdani/github-patches
git_diff
PaddlePaddle__models-312
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- resnet模型配置的问题 目前resnet的配置有一些问题,可见 https://github.com/PaddlePaddle/models/issues/308#issuecomment-331384031 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these fil...
diff --git a/image_classification/resnet.py b/image_classification/resnet.py --- a/image_classification/resnet.py +++ b/image_classification/resnet.py @@ -22,24 +22,24 @@ return paddle.layer.batch_norm(input=tmp, act=active_type) -def shortcut(input, ch_in, ch_out, stride): - if ch_in != ch_out: +def shortc...
{"golden_diff": "diff --git a/image_classification/resnet.py b/image_classification/resnet.py\n--- a/image_classification/resnet.py\n+++ b/image_classification/resnet.py\n@@ -22,24 +22,24 @@\n return paddle.layer.batch_norm(input=tmp, act=active_type)\n \n \n-def shortcut(input, ch_in, ch_out, stride):\n- if ch_...
1,603
850
gh_patches_debug_30359
rasdani/github-patches
git_diff
apluslms__a-plus-1293
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Course staff may create duplicate student groups Course staff may create student groups (course/models.py class StudentGroup) that contain exactly the same group members as an existing group. Duplicate groups...
diff --git a/course/forms.py b/course/forms.py --- a/course/forms.py +++ b/course/forms.py @@ -5,6 +5,7 @@ from django.utils.safestring import mark_safe from django.utils.text import format_lazy from django.utils.translation import gettext_lazy as _ +from django.db.models import Count from aplus.api import api_re...
{"golden_diff": "diff --git a/course/forms.py b/course/forms.py\n--- a/course/forms.py\n+++ b/course/forms.py\n@@ -5,6 +5,7 @@\n from django.utils.safestring import mark_safe\n from django.utils.text import format_lazy\n from django.utils.translation import gettext_lazy as _\n+from django.db.models import Count\n \n fr...
1,768
399
gh_patches_debug_24936
rasdani/github-patches
git_diff
DDMAL__CantusDB-733
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Links to unpublished sources should not appear on Provenance detail pages Example: visit http://206.12.93.196/provenance/3665 (while logged out), click on first link. We get a 403 Forbidden error, since the s...
diff --git a/django/cantusdb_project/main_app/views/century.py b/django/cantusdb_project/main_app/views/century.py --- a/django/cantusdb_project/main_app/views/century.py +++ b/django/cantusdb_project/main_app/views/century.py @@ -16,6 +16,6 @@ sources = Source.objects.filter(century=century) if not d...
{"golden_diff": "diff --git a/django/cantusdb_project/main_app/views/century.py b/django/cantusdb_project/main_app/views/century.py\n--- a/django/cantusdb_project/main_app/views/century.py\n+++ b/django/cantusdb_project/main_app/views/century.py\n@@ -16,6 +16,6 @@\n sources = Source.objects.filter(century=centu...
650
425
gh_patches_debug_39481
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-3317
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Spider lowes is broken During the global build at 2021-06-02-14-42-40, spider **lowes** failed with **0 features** and **0 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021-06-02-14-42-40/lo...
diff --git a/locations/spiders/lowes.py b/locations/spiders/lowes.py --- a/locations/spiders/lowes.py +++ b/locations/spiders/lowes.py @@ -6,16 +6,23 @@ from locations.hours import OpeningHours -day_mapping = {'Monday': 'Mo', 'Tuesday': 'Tu', 'Wednesday': 'We', 'Thursday': 'Th', 'Friday': 'Fr', 'Saturday': 'Sa', -...
{"golden_diff": "diff --git a/locations/spiders/lowes.py b/locations/spiders/lowes.py\n--- a/locations/spiders/lowes.py\n+++ b/locations/spiders/lowes.py\n@@ -6,16 +6,23 @@\n from locations.hours import OpeningHours\n \n \n-day_mapping = {'Monday': 'Mo', 'Tuesday': 'Tu', 'Wednesday': 'We', 'Thursday': 'Th', 'Friday': '...
1,487
830
gh_patches_debug_28882
rasdani/github-patches
git_diff
GeotrekCE__Geotrek-admin-1391
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- WYSIWYG for static pages Client-side WYSIWYG : - http://sofish.github.io/pen/ - https://github.com/mduvall/grande.js - http://imperavi.com/redactor/ - https://github.com/tholman/zenpen --- END ISSUE --- B...
diff --git a/geotrek/flatpages/admin.py b/geotrek/flatpages/admin.py --- a/geotrek/flatpages/admin.py +++ b/geotrek/flatpages/admin.py @@ -2,6 +2,7 @@ from django.conf import settings from modeltranslation.admin import TranslationAdmin +from tinymce.widgets import TinyMCE from geotrek.flatpages import models as ...
{"golden_diff": "diff --git a/geotrek/flatpages/admin.py b/geotrek/flatpages/admin.py\n--- a/geotrek/flatpages/admin.py\n+++ b/geotrek/flatpages/admin.py\n@@ -2,6 +2,7 @@\n from django.conf import settings\n \n from modeltranslation.admin import TranslationAdmin\n+from tinymce.widgets import TinyMCE\n \n from geotrek.f...
559
400
gh_patches_debug_7795
rasdani/github-patches
git_diff
cloud-custodian__cloud-custodian-4076
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- azure - unpinn EventGrid SDK version We need AdvancedFilters to be added to the stable version. https://pypi.org/project/azure-mgmt-eventgrid/ --- END ISSUE --- Below are some code segments, each from a ...
diff --git a/tools/c7n_azure/setup.py b/tools/c7n_azure/setup.py --- a/tools/c7n_azure/setup.py +++ b/tools/c7n_azure/setup.py @@ -63,7 +63,7 @@ "azure-mgmt-web", "azure-mgmt-monitor", "azure-mgmt-policyinsights", - "azure-mgmt-ev...
{"golden_diff": "diff --git a/tools/c7n_azure/setup.py b/tools/c7n_azure/setup.py\n--- a/tools/c7n_azure/setup.py\n+++ b/tools/c7n_azure/setup.py\n@@ -63,7 +63,7 @@\n \"azure-mgmt-web\",\n \"azure-mgmt-monitor\",\n \"azure-mgmt-policyinsights\",\n- ...
1,147
133