problem_id stringlengths 18 21 | source stringclasses 1
value | task_type stringclasses 1
value | in_source_id stringlengths 13 54 | prompt stringlengths 1.28k 64.2k | golden_diff stringlengths 166 811 | verification_info stringlengths 604 118k |
|---|---|---|---|---|---|---|
gh_patches_debug_1500 | rasdani/github-patches | git_diff | aws__aws-cli-4397 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
codecommit: tag-resource does not permit `:` character in tag key
The following command incorrectly returns an error even though colon characters (`:`) in tag keys are legal:
```
aws codecommit tag-resour... | diff --git a/awscli/shorthand.py b/awscli/shorthand.py
--- a/awscli/shorthand.py
+++ b/awscli/shorthand.py
@@ -163,7 +163,7 @@
def _key(self):
# key = 1*(alpha / %x30-39 / %x5f / %x2e / %x23) ; [a-zA-Z0-9\-_.#/]
- valid_chars = string.ascii_letters + string.digits + '-_.#/'
+ valid_chars ... | {"golden_diff": "diff --git a/awscli/shorthand.py b/awscli/shorthand.py\n--- a/awscli/shorthand.py\n+++ b/awscli/shorthand.py\n@@ -163,7 +163,7 @@\n \n def _key(self):\n # key = 1*(alpha / %x30-39 / %x5f / %x2e / %x23) ; [a-zA-Z0-9\\-_.#/]\n- valid_chars = string.ascii_letters + string.digits + '-_.... |
gh_patches_debug_1501 | rasdani/github-patches | git_diff | localstack__localstack-3366 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Usage of `docker inspect ..` is fragile, depends on how and what built the docker image
[x] bug report
[ ] feature request
# Detailed description
`lambda_executor.py` current retrieves the container entrypoi... | diff --git a/localstack/services/awslambda/lambda_executors.py b/localstack/services/awslambda/lambda_executors.py
--- a/localstack/services/awslambda/lambda_executors.py
+++ b/localstack/services/awslambda/lambda_executors.py
@@ -469,7 +469,7 @@
LOG.debug('Getting the entrypoint for image: %s' % (docker_i... | {"golden_diff": "diff --git a/localstack/services/awslambda/lambda_executors.py b/localstack/services/awslambda/lambda_executors.py\n--- a/localstack/services/awslambda/lambda_executors.py\n+++ b/localstack/services/awslambda/lambda_executors.py\n@@ -469,7 +469,7 @@\n LOG.debug('Getting the entrypoint for i... |
gh_patches_debug_1502 | rasdani/github-patches | git_diff | ckan__ckan-4249 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
'_Globals' has no attribute 'user' : exception when using an IAuthenticator on CKAN 2.8.0
I'm putting together a new deployment based on the new CKAN v2.8.0 release. I'm using ckanext-ldap as an authenticator... | diff --git a/ckan/views/__init__.py b/ckan/views/__init__.py
--- a/ckan/views/__init__.py
+++ b/ckan/views/__init__.py
@@ -98,8 +98,11 @@
if authenticators:
for item in authenticators:
item.identify()
- if g.user:
- break
+ try:
+ if g.user:... | {"golden_diff": "diff --git a/ckan/views/__init__.py b/ckan/views/__init__.py\n--- a/ckan/views/__init__.py\n+++ b/ckan/views/__init__.py\n@@ -98,8 +98,11 @@\n if authenticators:\n for item in authenticators:\n item.identify()\n- if g.user:\n- break\n+ try:\n... |
gh_patches_debug_1503 | rasdani/github-patches | git_diff | aio-libs__aiohttp-4040 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Client-sent Host header can include port as "None"
## Long story short
<!-- Please describe your problem and why the fix is important. -->
When the client forms the Host header, it is possible for it to i... | diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py
--- a/aiohttp/client_reqrep.py
+++ b/aiohttp/client_reqrep.py
@@ -315,7 +315,7 @@
netloc = cast(str, self.url.raw_host)
if helpers.is_ipv6_address(netloc):
netloc = '[{}]'.format(netloc)
- if not self.url.is_default_p... | {"golden_diff": "diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py\n--- a/aiohttp/client_reqrep.py\n+++ b/aiohttp/client_reqrep.py\n@@ -315,7 +315,7 @@\n netloc = cast(str, self.url.raw_host)\n if helpers.is_ipv6_address(netloc):\n netloc = '[{}]'.format(netloc)\n- if n... |
gh_patches_debug_1504 | rasdani/github-patches | git_diff | aws-cloudformation__cfn-lint-2466 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot list all the rules
### CloudFormation Lint Version
0.70.0
### What operating system are you using?
Windows
### Describe the bug
`cfn-lint --list-rules` throws below Error.(username is masked.)
... | diff --git a/src/cfnlint/rules/__init__.py b/src/cfnlint/rules/__init__.py
--- a/src/cfnlint/rules/__init__.py
+++ b/src/cfnlint/rules/__init__.py
@@ -302,9 +302,7 @@
self.register(rule)
def __repr__(self):
- return '\n'.join(
- [rule.verbose() for rule in sorted(self.rules, key=la... | {"golden_diff": "diff --git a/src/cfnlint/rules/__init__.py b/src/cfnlint/rules/__init__.py\n--- a/src/cfnlint/rules/__init__.py\n+++ b/src/cfnlint/rules/__init__.py\n@@ -302,9 +302,7 @@\n self.register(rule)\n \n def __repr__(self):\n- return '\\n'.join(\n- [rule.verbose() for rule in... |
gh_patches_debug_1505 | rasdani/github-patches | git_diff | flask-admin__flask-admin-434 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
form_overrides does not work with Peewee model backend
I assume this is the same reason as the others -- that the Peewee backend's not quite as up-to-date?
Looking through the code, it appears that form_over... | diff --git a/flask_admin/contrib/peewee/form.py b/flask_admin/contrib/peewee/form.py
--- a/flask_admin/contrib/peewee/form.py
+++ b/flask_admin/contrib/peewee/form.py
@@ -90,6 +90,8 @@
self.converters[DateField] = self.handle_date
self.converters[TimeField] = self.handle_time
+ self.overrides... | {"golden_diff": "diff --git a/flask_admin/contrib/peewee/form.py b/flask_admin/contrib/peewee/form.py\n--- a/flask_admin/contrib/peewee/form.py\n+++ b/flask_admin/contrib/peewee/form.py\n@@ -90,6 +90,8 @@\n self.converters[DateField] = self.handle_date\n self.converters[TimeField] = self.handle_time\n \... |
gh_patches_debug_1506 | rasdani/github-patches | git_diff | google__turbinia-323 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
turbiniactl -a status breaks on local installations
When running `turbiniactl -a status` with local tasks, there is an error, and a stack trace gets thrown here and `saved_paths` is incorrectly set to None:
... | diff --git a/turbinia/client.py b/turbinia/client.py
--- a/turbinia/client.py
+++ b/turbinia/client.py
@@ -282,6 +282,8 @@
task.get('name'), task.get('user'), task.get('worker_name'),
success, status))
saved_paths = task.get('saved_paths', [])
+ if saved_paths is None:
... | {"golden_diff": "diff --git a/turbinia/client.py b/turbinia/client.py\n--- a/turbinia/client.py\n+++ b/turbinia/client.py\n@@ -282,6 +282,8 @@\n task.get('name'), task.get('user'), task.get('worker_name'),\n success, status))\n saved_paths = task.get('saved_paths', [])\n+ ... |
gh_patches_debug_1507 | rasdani/github-patches | git_diff | akvo__akvo-rsr-1704 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
User permissions for deleting employments
Currently the organisation Admins and User Managers do not have the right to delete an employment. As they are managing these employments, they should be able to do s... | diff --git a/akvo/rsr/models/__init__.py b/akvo/rsr/models/__init__.py
--- a/akvo/rsr/models/__init__.py
+++ b/akvo/rsr/models/__init__.py
@@ -265,6 +265,7 @@
rules.add_perm('rsr.add_employment', is_rsr_admin)
rules.add_perm('rsr.change_employment', is_rsr_admin | is_org_admin | is_org_user_manager)
+rules.add_perm... | {"golden_diff": "diff --git a/akvo/rsr/models/__init__.py b/akvo/rsr/models/__init__.py\n--- a/akvo/rsr/models/__init__.py\n+++ b/akvo/rsr/models/__init__.py\n@@ -265,6 +265,7 @@\n \n rules.add_perm('rsr.add_employment', is_rsr_admin)\n rules.add_perm('rsr.change_employment', is_rsr_admin | is_org_admin | is_org_user_m... |
gh_patches_debug_1508 | rasdani/github-patches | git_diff | deis__deis-1332 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
deis auth:cancel doesn't delete the account
steps to reproduce the issue
```
deis register http://deis.54.193.35.8.xip.io --username=Test --password=asdf1234 --email=test@test.co.nz
Registered Test
Logged ... | diff --git a/controller/api/models.py b/controller/api/models.py
--- a/controller/api/models.py
+++ b/controller/api/models.py
@@ -618,7 +618,12 @@
def _etcd_purge_user(**kwargs):
username = kwargs['instance'].username
- _etcd_client.delete('/deis/builder/users/{}'.format(username), dir=True, recursive=True)... | {"golden_diff": "diff --git a/controller/api/models.py b/controller/api/models.py\n--- a/controller/api/models.py\n+++ b/controller/api/models.py\n@@ -618,7 +618,12 @@\n \n def _etcd_purge_user(**kwargs):\n username = kwargs['instance'].username\n- _etcd_client.delete('/deis/builder/users/{}'.format(username), d... |
gh_patches_debug_1509 | rasdani/github-patches | git_diff | xonsh__xonsh-5328 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unexpected exception while updating completions
<!--- Provide a general summary of the issue in the Title above -->
When I set $UPDATE_COMPLETIONS_ON_KEYPRESS = True and type for instance /usr/bin/ls -a in t... | diff --git a/xonsh/completers/man.py b/xonsh/completers/man.py
--- a/xonsh/completers/man.py
+++ b/xonsh/completers/man.py
@@ -114,7 +114,7 @@
@functools.lru_cache(maxsize=10)
def _parse_man_page_options(cmd: str) -> "dict[str, tuple[str, ...]]":
- path = get_man_completions_path() / f"{cmd}.json"
+ path = ge... | {"golden_diff": "diff --git a/xonsh/completers/man.py b/xonsh/completers/man.py\n--- a/xonsh/completers/man.py\n+++ b/xonsh/completers/man.py\n@@ -114,7 +114,7 @@\n \n @functools.lru_cache(maxsize=10)\n def _parse_man_page_options(cmd: str) -> \"dict[str, tuple[str, ...]]\":\n- path = get_man_completions_path() / f\... |
gh_patches_debug_1510 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-3351 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
'NoneType' object has no attribute 'job_label'
I am trying to configure the bigquery connection profile. Somehow get the following error message after "dbt debug".
>'NoneType' object has no attribute 'job... | diff --git a/plugins/bigquery/dbt/adapters/bigquery/connections.py b/plugins/bigquery/dbt/adapters/bigquery/connections.py
--- a/plugins/bigquery/dbt/adapters/bigquery/connections.py
+++ b/plugins/bigquery/dbt/adapters/bigquery/connections.py
@@ -309,7 +309,7 @@
logger.debug('On {}: {}', conn.name, sql)
- ... | {"golden_diff": "diff --git a/plugins/bigquery/dbt/adapters/bigquery/connections.py b/plugins/bigquery/dbt/adapters/bigquery/connections.py\n--- a/plugins/bigquery/dbt/adapters/bigquery/connections.py\n+++ b/plugins/bigquery/dbt/adapters/bigquery/connections.py\n@@ -309,7 +309,7 @@\n \n logger.debug('On {}: {}'... |
gh_patches_debug_1511 | rasdani/github-patches | git_diff | dj-stripe__dj-stripe-980 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PaymentMethod detachment doesn't work because it doesn't unset customer
**Describe the bug**
I'm using 4a828a48092a3904094917776ce725ec9aa3fce5 (after the #914 merge) and trying to set up an SCA complaint fl... | diff --git a/djstripe/models/payment_methods.py b/djstripe/models/payment_methods.py
--- a/djstripe/models/payment_methods.py
+++ b/djstripe/models/payment_methods.py
@@ -527,6 +527,13 @@
stripe_class = stripe.PaymentMethod
+ def _attach_objects_hook(self, cls, data):
+ customer = cls._stripe_object_... | {"golden_diff": "diff --git a/djstripe/models/payment_methods.py b/djstripe/models/payment_methods.py\n--- a/djstripe/models/payment_methods.py\n+++ b/djstripe/models/payment_methods.py\n@@ -527,6 +527,13 @@\n \n stripe_class = stripe.PaymentMethod\n \n+ def _attach_objects_hook(self, cls, data):\n+ custo... |
gh_patches_debug_1512 | rasdani/github-patches | git_diff | ansible__ansible-modules-extras-3417 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ec2_lc_find not returning AssociatePublicIpAddress
##### ISSUE TYPE
Bug Report
##### COMPONENT NAME
ec2_lc_find
##### ANSIBLE VERSION
```
ansible 2.2.0.0
config file = /home/centos/ansiblebase/an... | diff --git a/cloud/amazon/ec2_lc_find.py b/cloud/amazon/ec2_lc_find.py
--- a/cloud/amazon/ec2_lc_find.py
+++ b/cloud/amazon/ec2_lc_find.py
@@ -184,7 +184,7 @@
'security_groups': lc['SecurityGroups'],
'kernel_id': lc['KernelId'],
'ram_disk_id': lc['RamdiskId'],
- ... | {"golden_diff": "diff --git a/cloud/amazon/ec2_lc_find.py b/cloud/amazon/ec2_lc_find.py\n--- a/cloud/amazon/ec2_lc_find.py\n+++ b/cloud/amazon/ec2_lc_find.py\n@@ -184,7 +184,7 @@\n 'security_groups': lc['SecurityGroups'],\n 'kernel_id': lc['KernelId'],\n 'ram_disk_id': lc... |
gh_patches_debug_1513 | rasdani/github-patches | git_diff | zulip__zulip-5407 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pull GCI docs into main Zulip repo.
Some of our assets, like git cheatsheets, currently live in the zulip-gci repo. We should move them to the main Zulip repo and link from appropriate places.
cc @synical... | diff --git a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py b/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
--- a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
+++ b/tools/documentation_crawler/documentation_crawler/spiders/common/... | {"golden_diff": "diff --git a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py b/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py\n--- a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py\n+++ b/tools/documentation_crawler/documentation_craw... |
gh_patches_debug_1514 | rasdani/github-patches | git_diff | pre-commit__pre-commit-1113 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
rust hook requires `--path` attribute
Cargo has changed how packages get installed and requires an extra `--path <destination>` attribute.
Symptom:
```
[INFO] Initializing environment for https://github.... | diff --git a/pre_commit/languages/rust.py b/pre_commit/languages/rust.py
--- a/pre_commit/languages/rust.py
+++ b/pre_commit/languages/rust.py
@@ -73,7 +73,7 @@
_add_dependencies(prefix.path('Cargo.toml'), lib_deps)
with clean_path_on_failure(directory):
- packages_to_install = {()}
+ pack... | {"golden_diff": "diff --git a/pre_commit/languages/rust.py b/pre_commit/languages/rust.py\n--- a/pre_commit/languages/rust.py\n+++ b/pre_commit/languages/rust.py\n@@ -73,7 +73,7 @@\n _add_dependencies(prefix.path('Cargo.toml'), lib_deps)\n \n with clean_path_on_failure(directory):\n- packages_to_inst... |
gh_patches_debug_1515 | rasdani/github-patches | git_diff | statsmodels__statsmodels-3044 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TST disable test_webuse again
see #2233
one file is being downloaded from sourceforge which has frequent connection problems
the download from our source on github worked without problems
But I want to get... | diff --git a/statsmodels/datasets/utils.py b/statsmodels/datasets/utils.py
--- a/statsmodels/datasets/utils.py
+++ b/statsmodels/datasets/utils.py
@@ -329,10 +329,11 @@
data_home = get_data_home(data_home)
shutil.rmtree(data_home)
-def check_internet():
+def check_internet(url=None):
"""Check if intern... | {"golden_diff": "diff --git a/statsmodels/datasets/utils.py b/statsmodels/datasets/utils.py\n--- a/statsmodels/datasets/utils.py\n+++ b/statsmodels/datasets/utils.py\n@@ -329,10 +329,11 @@\n data_home = get_data_home(data_home)\n shutil.rmtree(data_home)\n \n-def check_internet():\n+def check_internet(url=None)... |
gh_patches_debug_1516 | rasdani/github-patches | git_diff | geopandas__geopandas-94 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
to_file(): 'long' isn't a valid Fiona property type
The question http://gis.stackexchange.com/questions/89206/geopandas-error-when-writing-to-file-valueerror-long-is-not-in-list revealed a bug to me.
If you ... | diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py
--- a/geopandas/geodataframe.py
+++ b/geopandas/geodataframe.py
@@ -283,7 +283,10 @@
def convert_type(in_type):
if in_type == object:
return 'str'
- return type(np.asscalar(np.zeros(1, in_type))).__name_... | {"golden_diff": "diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py\n--- a/geopandas/geodataframe.py\n+++ b/geopandas/geodataframe.py\n@@ -283,7 +283,10 @@\n def convert_type(in_type):\n if in_type == object:\n return 'str'\n- return type(np.asscalar(np.zer... |
gh_patches_debug_1517 | rasdani/github-patches | git_diff | cloud-custodian__cloud-custodian-5339 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Put retention days on Cloud Watch logs. with the TRaceback
Here is the Policy that I'm running periodically. I'm getting throttling Errors.
policies:
- name: Custodian-loggroup-retention
resource: ... | diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py
--- a/c7n/resources/cw.py
+++ b/c7n/resources/cw.py
@@ -196,7 +196,8 @@
client = local_session(self.manager.session_factory).client('logs')
days = self.data['days']
for r in resources:
- client.put_retention_policy(
+ ... | {"golden_diff": "diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py\n--- a/c7n/resources/cw.py\n+++ b/c7n/resources/cw.py\n@@ -196,7 +196,8 @@\n client = local_session(self.manager.session_factory).client('logs')\n days = self.data['days']\n for r in resources:\n- client.put_reten... |
gh_patches_debug_1518 | rasdani/github-patches | git_diff | ray-project__ray-8491 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Time to initialize a policy grows linearly with the number of agents
<!--
General questions should be asked on the mailing list ray-dev@googlegroups.com.
Questions about how to use Ray should be asked on
[... | diff --git a/python/ray/experimental/tf_utils.py b/python/ray/experimental/tf_utils.py
--- a/python/ray/experimental/tf_utils.py
+++ b/python/ray/experimental/tf_utils.py
@@ -161,10 +161,7 @@
Dictionary mapping variable names to their weights.
"""
self._check_sess()
- return {
- ... | {"golden_diff": "diff --git a/python/ray/experimental/tf_utils.py b/python/ray/experimental/tf_utils.py\n--- a/python/ray/experimental/tf_utils.py\n+++ b/python/ray/experimental/tf_utils.py\n@@ -161,10 +161,7 @@\n Dictionary mapping variable names to their weights.\n \"\"\"\n self._check_ses... |
gh_patches_debug_1519 | rasdani/github-patches | git_diff | bookwyrm-social__bookwyrm-1639 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Some translation strings missing/not applied
**Describe the bug**
Some translations are not being applied.
**To Reproduce**
change Bookwyrm language to other than English (tested with Lithuanian)
ht... | diff --git a/bookwyrm/utils/isni.py b/bookwyrm/utils/isni.py
--- a/bookwyrm/utils/isni.py
+++ b/bookwyrm/utils/isni.py
@@ -19,7 +19,7 @@
"recordPacking": "xml",
"sortKeys": "RLV,pica,0,,",
}
- result = requests.get("http://isni.oclc.org/sru/", params=query_params, timeout=10)
+ result = req... | {"golden_diff": "diff --git a/bookwyrm/utils/isni.py b/bookwyrm/utils/isni.py\n--- a/bookwyrm/utils/isni.py\n+++ b/bookwyrm/utils/isni.py\n@@ -19,7 +19,7 @@\n \"recordPacking\": \"xml\",\n \"sortKeys\": \"RLV,pica,0,,\",\n }\n- result = requests.get(\"http://isni.oclc.org/sru/\", params=query_par... |
gh_patches_debug_1520 | rasdani/github-patches | git_diff | edgedb__edgedb-6313 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
InternalServerError: missing FROM-clause entry for table "ins_contents~3" when access policies are applied
<!-- Please search existing issues to avoid creating duplicates. -->
The `InternalServerError: mis... | diff --git a/edb/pgsql/compiler/context.py b/edb/pgsql/compiler/context.py
--- a/edb/pgsql/compiler/context.py
+++ b/edb/pgsql/compiler/context.py
@@ -420,6 +420,7 @@
self.path_scope = collections.ChainMap()
self.rel_hierarchy = {}
self.scope_tree = prevlevel.scope_tre... | {"golden_diff": "diff --git a/edb/pgsql/compiler/context.py b/edb/pgsql/compiler/context.py\n--- a/edb/pgsql/compiler/context.py\n+++ b/edb/pgsql/compiler/context.py\n@@ -420,6 +420,7 @@\n self.path_scope = collections.ChainMap()\n self.rel_hierarchy = {}\n self.scope_tre... |
gh_patches_debug_1521 | rasdani/github-patches | git_diff | ivy-llc__ivy-23796 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
mod
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/tensorflow/raw_ops.py`
Conten... | diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py
--- a/ivy/functional/frontends/tensorflow/raw_ops.py
+++ b/ivy/functional/frontends/tensorflow/raw_ops.py
@@ -170,6 +170,7 @@
)
)
)
+Mod = to_ivy_arrays_and_back(map_raw_ops_alias(tf_frontend.math... | {"golden_diff": "diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py\n--- a/ivy/functional/frontends/tensorflow/raw_ops.py\n+++ b/ivy/functional/frontends/tensorflow/raw_ops.py\n@@ -170,6 +170,7 @@\n )\n )\n )\n+Mod = to_ivy_arrays_and_back(map_raw_op... |
gh_patches_debug_1522 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-contrib-172 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove unused import
As per comment https://github.com/open-telemetry/opentelemetry-python-contrib/pull/107#discussion_r516262746, there appears to be an unused import in the jinja2 instrumentation
--- END I... | diff --git a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py b/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py
--- a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/... | {"golden_diff": "diff --git a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py b/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py\n--- a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetr... |
gh_patches_debug_1523 | rasdani/github-patches | git_diff | carpentries__amy-932 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Date(?) stamp when updating record from url
When updating an event from url, the list of instructors/helpers is recorded in the notes field with a heading that looks like a date but isn't. For example an upd... | diff --git a/workshops/forms.py b/workshops/forms.py
--- a/workshops/forms.py
+++ b/workshops/forms.py
@@ -359,6 +359,7 @@
# thanks to this, {{ form.media }} in the template will generate
# a <link href=""> (for CSS files) or <script src=""> (for JS files)
js = (
+ 'date_yyyymmdd.j... | {"golden_diff": "diff --git a/workshops/forms.py b/workshops/forms.py\n--- a/workshops/forms.py\n+++ b/workshops/forms.py\n@@ -359,6 +359,7 @@\n # thanks to this, {{ form.media }} in the template will generate\n # a <link href=\"\"> (for CSS files) or <script src=\"\"> (for JS files)\n js = (\n+... |
gh_patches_debug_1524 | rasdani/github-patches | git_diff | pex-tool__pex-577 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 1.4.8
User facing issues on the docket:
+ non-zip_safe pex extraction has a race on renaming #557
+ Execute pex archive at runtime with -m parameter #547
+ OSX's python 2.7.10 interpreter reports a... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,7 +1,7 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = '1.4.7'
+__version__ = '1.4.8'
# Versions 34.0.0 through 35.0.2 ... | {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,7 +1,7 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = '1.4.7'\n+__version__ = '1.4.8'\n \n # Vers... |
gh_patches_debug_1525 | rasdani/github-patches | git_diff | sopel-irc__sopel-1527 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Broken interrupt handling when connection is inactive
For the record, I'm testing on macOS today because that's what I have available. However, the same behavior occurs with identical or similar tracebacks on... | diff --git a/sopel/cli/run.py b/sopel/cli/run.py
--- a/sopel/cli/run.py
+++ b/sopel/cli/run.py
@@ -67,7 +67,11 @@
tools.stderr('Got restart signal.')
p.restart('Restarting')
+ # Define empty variable `p` for bot
+ p = None
while True:
+ if p and p.hasquit: # Check if `hasq... | {"golden_diff": "diff --git a/sopel/cli/run.py b/sopel/cli/run.py\n--- a/sopel/cli/run.py\n+++ b/sopel/cli/run.py\n@@ -67,7 +67,11 @@\n tools.stderr('Got restart signal.')\n p.restart('Restarting')\n \n+ # Define empty variable `p` for bot\n+ p = None\n while True:\n+ if p and p... |
gh_patches_debug_1526 | rasdani/github-patches | git_diff | pallets__click-2714 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Docs wrongly links PRs and Issues to flask

Environment:
- Python version: N/A
- Click version: N/A
Docs... | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -23,8 +23,8 @@
autodoc_typehints = "description"
autodoc_preserve_defaults = True
extlinks = {
- "issue": ("https://github.com/pallets/flask/issues/%s", "#%s"),
- "pr": ("https://github.com/pallets/flask/pull/%s", "#%s"),
+ "i... | {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -23,8 +23,8 @@\n autodoc_typehints = \"description\"\n autodoc_preserve_defaults = True\n extlinks = {\n- \"issue\": (\"https://github.com/pallets/flask/issues/%s\", \"#%s\"),\n- \"pr\": (\"https://github.com/pal... |
gh_patches_debug_1527 | rasdani/github-patches | git_diff | python__mypy-3593 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Typing for @contextmanager doesn't play well with generic functions
```
from contextlib import contextmanager
from typing import TypeVar, Iterator
_T = TypeVar('_T')
@contextmanager
def yield_id(item... | diff --git a/mypy/plugin.py b/mypy/plugin.py
--- a/mypy/plugin.py
+++ b/mypy/plugin.py
@@ -247,7 +247,9 @@
return ctx.default_return_type.copy_modified(
arg_types=arg_type.arg_types,
arg_kinds=arg_type.arg_kinds,
- arg_names=arg_type.arg_names)
+ ... | {"golden_diff": "diff --git a/mypy/plugin.py b/mypy/plugin.py\n--- a/mypy/plugin.py\n+++ b/mypy/plugin.py\n@@ -247,7 +247,9 @@\n return ctx.default_return_type.copy_modified(\n arg_types=arg_type.arg_types,\n arg_kinds=arg_type.arg_kinds,\n- arg_names=arg_type.... |
gh_patches_debug_1528 | rasdani/github-patches | git_diff | koxudaxi__datamodel-code-generator-1669 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Impossible to get the json schema of a json schema object
**Describe the bug**
```python
from datamodel_code_generator.parser.jsonschema import JsonSchemaObject
if __name__ == "__main__":
print(Js... | diff --git a/datamodel_code_generator/types.py b/datamodel_code_generator/types.py
--- a/datamodel_code_generator/types.py
+++ b/datamodel_code_generator/types.py
@@ -129,7 +129,7 @@
)
return core_schema.json_or_python_schema(
- json_schema=core_schema.no_info_plain_validator_function(cls... | {"golden_diff": "diff --git a/datamodel_code_generator/types.py b/datamodel_code_generator/types.py\n--- a/datamodel_code_generator/types.py\n+++ b/datamodel_code_generator/types.py\n@@ -129,7 +129,7 @@\n )\n \n return core_schema.json_or_python_schema(\n- json_schema=core_schema.no_info_plai... |
gh_patches_debug_1529 | rasdani/github-patches | git_diff | keras-team__keras-13342 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
NameError: name 'math_ops' is not defined
**System information**
- Have I written custom code (as opposed to using example directory):
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
- Ten... | diff --git a/keras/engine/training_utils.py b/keras/engine/training_utils.py
--- a/keras/engine/training_utils.py
+++ b/keras/engine/training_utils.py
@@ -1019,7 +1019,7 @@
mask=None):
"""Invokes metric function and returns the metric result tensor."""
if mask is not None:
- m... | {"golden_diff": "diff --git a/keras/engine/training_utils.py b/keras/engine/training_utils.py\n--- a/keras/engine/training_utils.py\n+++ b/keras/engine/training_utils.py\n@@ -1019,7 +1019,7 @@\n mask=None):\n \"\"\"Invokes metric function and returns the metric result tensor.\"\"\"\n if... |
gh_patches_debug_1530 | rasdani/github-patches | git_diff | aio-libs-abandoned__aioredis-py-658 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Transaction data decoding is incorrect
Transaction data always decoded two times if connection encoding was defined:
Test case:
```python
@pytest.mark.run_loop
async def test_global_encoding(redis, crea... | diff --git a/aioredis/connection.py b/aioredis/connection.py
--- a/aioredis/connection.py
+++ b/aioredis/connection.py
@@ -336,6 +336,7 @@
cb = self._start_transaction
elif command in ('EXEC', b'EXEC'):
cb = partial(self._end_transaction, discard=False)
+ encoding = None
... | {"golden_diff": "diff --git a/aioredis/connection.py b/aioredis/connection.py\n--- a/aioredis/connection.py\n+++ b/aioredis/connection.py\n@@ -336,6 +336,7 @@\n cb = self._start_transaction\n elif command in ('EXEC', b'EXEC'):\n cb = partial(self._end_transaction, discard=False)\n+ ... |
gh_patches_debug_1531 | rasdani/github-patches | git_diff | google__personfinder-328 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Load third party libraries with PIP
We should probably follow "Using pip requirements files" section here to install third-party libraries:
https://cloud.google.com/appengine/docs/python/tools/using-libraries... | diff --git a/app/main.py b/app/main.py
--- a/app/main.py
+++ b/app/main.py
@@ -21,6 +21,9 @@
import mimetypes
import re
import os
+import sys
+sys.path.append(os.path.join(os.path.dirname(__file__), 'vendors'))
+
import urlparse
from google.appengine.api import memcache
@@ -597,4 +600,4 @@
if __name__ == '__m... | {"golden_diff": "diff --git a/app/main.py b/app/main.py\n--- a/app/main.py\n+++ b/app/main.py\n@@ -21,6 +21,9 @@\n import mimetypes\n import re\n import os\n+import sys\n+sys.path.append(os.path.join(os.path.dirname(__file__), 'vendors'))\n+\n import urlparse\n \n from google.appengine.api import memcache\n@@ -597,4 +6... |
gh_patches_debug_1532 | rasdani/github-patches | git_diff | joke2k__faker-640 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
MacOS 10.13 OSError: [Errno 24] Too many open files
```shell
return [i for i in os.listdir(path) if os.path.isdir(os.path.join(path, i)) and not i.startswith('_')]
OSError: [Errno 24] Too many open file... | diff --git a/faker/utils/loading.py b/faker/utils/loading.py
--- a/faker/utils/loading.py
+++ b/faker/utils/loading.py
@@ -6,9 +6,7 @@
def list_module(module):
path = os.path.dirname(module.__file__)
modules = [name for finder, name, is_pkg in pkgutil.iter_modules([path]) if is_pkg]
- if len(modules) > 0:... | {"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@@ -6,9 +6,7 @@\n def list_module(module):\n path = os.path.dirname(module.__file__)\n modules = [name for finder, name, is_pkg in pkgutil.iter_modules([path]) if is_pkg]\n-... |
gh_patches_debug_1533 | rasdani/github-patches | git_diff | microsoft__AzureTRE-524 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Service bus message times out on deployment of workspace template
**Describe the bug**
When deploying a template that takes > 10 minutes, although deployment is successful the status is not updated.
... | diff --git a/processor_function/vm_porter/runner.py b/processor_function/vm_porter/runner.py
--- a/processor_function/vm_porter/runner.py
+++ b/processor_function/vm_porter/runner.py
@@ -33,7 +33,7 @@
"""
async with service_bus_client:
q_name = env_vars["resource_request_queue"]
- renewer = Au... | {"golden_diff": "diff --git a/processor_function/vm_porter/runner.py b/processor_function/vm_porter/runner.py\n--- a/processor_function/vm_porter/runner.py\n+++ b/processor_function/vm_porter/runner.py\n@@ -33,7 +33,7 @@\n \"\"\"\n async with service_bus_client:\n q_name = env_vars[\"resource_request_qu... |
gh_patches_debug_1534 | rasdani/github-patches | git_diff | pypa__pip-8124 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
'pip cache info' fails when no-cache-dir set
pip version: pip 20.1b1
Python version: CPython 3.8.1
OS: Win 10 64
Testing 20.1 beta, execute 'pip cache info' and crashes. I'm guessing it's due to pip.ini... | diff --git a/src/pip/_internal/commands/cache.py b/src/pip/_internal/commands/cache.py
--- a/src/pip/_internal/commands/cache.py
+++ b/src/pip/_internal/commands/cache.py
@@ -48,6 +48,11 @@
"purge": self.purge_cache,
}
+ if not options.cache_dir:
+ logger.error("pip cache comma... | {"golden_diff": "diff --git a/src/pip/_internal/commands/cache.py b/src/pip/_internal/commands/cache.py\n--- a/src/pip/_internal/commands/cache.py\n+++ b/src/pip/_internal/commands/cache.py\n@@ -48,6 +48,11 @@\n \"purge\": self.purge_cache,\n }\n \n+ if not options.cache_dir:\n+ lo... |
gh_patches_debug_1535 | rasdani/github-patches | git_diff | edgedb__edgedb-3087 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
EdgeDB server doesn't always correctly recognize PostgreSQL server startup
<!-- Please search existing issues to avoid creating duplicates. -->
- EdgeDB Version: 1.0-rc.2+dev6093.d2021102414.gec7d60ef3.cv202... | diff --git a/edb/server/pgcluster.py b/edb/server/pgcluster.py
--- a/edb/server/pgcluster.py
+++ b/edb/server/pgcluster.py
@@ -678,8 +678,10 @@
sockdir = os.path.normpath(
os.path.join(self._data_dir, sockdir))
host_str = sockdir
- else:
+ elif hostaddr:
... | {"golden_diff": "diff --git a/edb/server/pgcluster.py b/edb/server/pgcluster.py\n--- a/edb/server/pgcluster.py\n+++ b/edb/server/pgcluster.py\n@@ -678,8 +678,10 @@\n sockdir = os.path.normpath(\n os.path.join(self._data_dir, sockdir))\n host_str = sockdir\n- else:\... |
gh_patches_debug_1536 | rasdani/github-patches | git_diff | pydantic__pydantic-391 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Include a PEP 561 marker file
# Feature Request
Hi,
The new version 0.19 has improved typing support which is great, but looks like it doesn't work out of the box. I had similar problems as described in... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -68,8 +68,9 @@
url='https://github.com/samuelcolvin/pydantic',
license='MIT',
packages=['pydantic'],
+ package_data={'pydantic': ['py.typed']},
python_requires='>=3.6',
- zip_safe=True,
+ zip_safe=False, # https://mypy.readt... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -68,8 +68,9 @@\n url='https://github.com/samuelcolvin/pydantic',\n license='MIT',\n packages=['pydantic'],\n+ package_data={'pydantic': ['py.typed']},\n python_requires='>=3.6',\n- zip_safe=True,\n+ zip_safe=F... |
gh_patches_debug_1537 | rasdani/github-patches | git_diff | e-valuation__EvaP-1241 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Single result publishing fails
Single results can't be published because https://github.com/fsr-itse/EvaP/blob/master/evap/evaluation/models.py#L449 asserts `self._voter_count is None` which it is not for sin... | diff --git a/evap/evaluation/models.py b/evap/evaluation/models.py
--- a/evap/evaluation/models.py
+++ b/evap/evaluation/models.py
@@ -446,7 +446,7 @@
@transition(field=state, source='reviewed', target='published')
def publish(self):
- assert self._voter_count is None and self._participant_count is N... | {"golden_diff": "diff --git a/evap/evaluation/models.py b/evap/evaluation/models.py\n--- a/evap/evaluation/models.py\n+++ b/evap/evaluation/models.py\n@@ -446,7 +446,7 @@\n \n @transition(field=state, source='reviewed', target='published')\n def publish(self):\n- assert self._voter_count is None and self... |
gh_patches_debug_1538 | rasdani/github-patches | git_diff | analysiscenter__batchflow-593 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Typo
https://github.com/analysiscenter/batchflow/blob/cd9062150811665b5a4e51a1080da5855f1c4dcb/batchflow/decorators.py#L337
`random_stat` -> `random_state`
--- END ISSUE ---
Below are some code segments,... | diff --git a/batchflow/decorators.py b/batchflow/decorators.py
--- a/batchflow/decorators.py
+++ b/batchflow/decorators.py
@@ -334,7 +334,7 @@
def make_random_seed(self):
if getattr(self, 'random_state', None) is None:
return make_seed_sequence()
- return self.random_st... | {"golden_diff": "diff --git a/batchflow/decorators.py b/batchflow/decorators.py\n--- a/batchflow/decorators.py\n+++ b/batchflow/decorators.py\n@@ -334,7 +334,7 @@\n def make_random_seed(self):\n if getattr(self, 'random_state', None) is None:\n return make_seed_sequence()\n- ... |
gh_patches_debug_1539 | rasdani/github-patches | git_diff | avocado-framework__avocado-2276 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
why this is "<" not ">" ?
https://github.com/avocado-framework/avocado/blob/d1503a1dcfe684a1b6ab03fd79546eb0f2bfb511/optional_plugins/runner_remote/avocado_runner_remote/__init__.py#L107
--- END ISSUE ---
B... | diff --git a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py b/optional_plugins/runner_remote/avocado_runner_remote/__init__.py
--- a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py
+++ b/optional_plugins/runner_remote/avocado_runner_remote/__init__.py
@@ -104,7 +104,7 @@
exce... | {"golden_diff": "diff --git a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py b/optional_plugins/runner_remote/avocado_runner_remote/__init__.py\n--- a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py\n+++ b/optional_plugins/runner_remote/avocado_runner_remote/__init__.py\n@@ -104,7 +10... |
gh_patches_debug_1540 | rasdani/github-patches | git_diff | chanzuckerberg__single-cell-curation-428 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Feat(curation notebooks): display the x-request-id in the error response
When an error occurs especially 500 errors, the only piece of debug information the user has is the x-request-id. Making this value vis... | diff --git a/notebooks/curation_api/python/src/utils/logger.py b/notebooks/curation_api/python/src/utils/logger.py
--- a/notebooks/curation_api/python/src/utils/logger.py
+++ b/notebooks/curation_api/python/src/utils/logger.py
@@ -40,6 +40,8 @@
logger.error("\n\033[1m\033[38;5;9mFAILED\033[0m\n") # 'FAILED' in bo... | {"golden_diff": "diff --git a/notebooks/curation_api/python/src/utils/logger.py b/notebooks/curation_api/python/src/utils/logger.py\n--- a/notebooks/curation_api/python/src/utils/logger.py\n+++ b/notebooks/curation_api/python/src/utils/logger.py\n@@ -40,6 +40,8 @@\n logger.error(\"\\n\\033[1m\\033[38;5;9mFAILED\\03... |
gh_patches_debug_1541 | rasdani/github-patches | git_diff | statsmodels__statsmodels-6518 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix simple typo: variuos -> various
# Issue Type
[x] Bug (Typo)
# Steps to Replicate
1. Examine statsmodels/sandbox/multilinear.py.
2. Search for `variuos`.
# Expected Behaviour
1. Should read `various`.... | diff --git a/statsmodels/sandbox/multilinear.py b/statsmodels/sandbox/multilinear.py
--- a/statsmodels/sandbox/multilinear.py
+++ b/statsmodels/sandbox/multilinear.py
@@ -284,7 +284,7 @@
>>> url = url + "Rdatasets/csv/HistData/Guerry.csv"
>>> df = pd.read_csv(url, index_col='dept')
- evaluate the relatio... | {"golden_diff": "diff --git a/statsmodels/sandbox/multilinear.py b/statsmodels/sandbox/multilinear.py\n--- a/statsmodels/sandbox/multilinear.py\n+++ b/statsmodels/sandbox/multilinear.py\n@@ -284,7 +284,7 @@\n >>> url = url + \"Rdatasets/csv/HistData/Guerry.csv\"\n >>> df = pd.read_csv(url, index_col='dept')\n \... |
gh_patches_debug_1542 | rasdani/github-patches | git_diff | holoviz__panel-645 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Port not being released after stopping threaded holoviz panel app server
Closing a threaded panel app holds on to the port it started on. This is different behavior than closing an app initialized without thr... | diff --git a/panel/io/server.py b/panel/io/server.py
--- a/panel/io/server.py
+++ b/panel/io/server.py
@@ -122,6 +122,15 @@
if self.stopped:
self._cb.stop()
self.io_loop.stop()
+
+ def run(self):
+ try:
+ if self._target:
+ bokeh_server = self._... | {"golden_diff": "diff --git a/panel/io/server.py b/panel/io/server.py\n--- a/panel/io/server.py\n+++ b/panel/io/server.py\n@@ -122,6 +122,15 @@\n if self.stopped:\n self._cb.stop()\n self.io_loop.stop()\n+ \n+ def run(self):\n+ try:\n+ if self._target:\n+ ... |
gh_patches_debug_1543 | rasdani/github-patches | git_diff | hylang__hy-2328 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
F-strings don't allow `\N{…}`
```
Hy 0.24.0 using CPython(default) 3.9.6 on Darwin
=> (print "\N{slightly smiling face}")
🙂
=> (print f"\N{slightly smiling face}")
Traceback (most recent call last):
... | diff --git a/hy/reader/hy_reader.py b/hy/reader/hy_reader.py
--- a/hy/reader/hy_reader.py
+++ b/hy/reader/hy_reader.py
@@ -448,7 +448,7 @@
s = s[:-n_closing_chars]
break
# check if c is start of component
- if is_fstring and c == "{":
+ if is_fstring ... | {"golden_diff": "diff --git a/hy/reader/hy_reader.py b/hy/reader/hy_reader.py\n--- a/hy/reader/hy_reader.py\n+++ b/hy/reader/hy_reader.py\n@@ -448,7 +448,7 @@\n s = s[:-n_closing_chars]\n break\n # check if c is start of component\n- if is_fstring and c == \"{\":\n... |
gh_patches_debug_1544 | rasdani/github-patches | git_diff | mosaicml__composer-182 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add venv into docker image to enable editable `pip install`
When trying to install composer with `pip install -e .` from within the docker image, we are seeing this error:
```
Traceback (most recent call la... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,12 +1,16 @@
# Copyright 2021 MosaicML. All Rights Reserved.
import os
+import site
import sys
import textwrap
import setuptools
from setuptools import setup
+# From https://github.com/pypa/pip/issues/7953#issuecomment-645133255
+site.ENABL... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,12 +1,16 @@\n # Copyright 2021 MosaicML. All Rights Reserved.\n \n import os\n+import site\n import sys\n import textwrap\n \n import setuptools\n from setuptools import setup\n \n+# From https://github.com/pypa/pip/issues/7953#iss... |
gh_patches_debug_1545 | rasdani/github-patches | git_diff | python__mypy-4106 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
No constraint inferred for Any vs. Type[T]
I'd expect the revealed type to be `Any` instead of `<nothing>` for this example:
```py
from typing import Type, Any, TypeVar
T = TypeVar('T')
def f(c: Typ... | diff --git a/mypy/constraints.py b/mypy/constraints.py
--- a/mypy/constraints.py
+++ b/mypy/constraints.py
@@ -506,6 +506,8 @@
self.direction)
elif isinstance(self.actual, TypeType):
return infer_constraints(template.item, self.actual.item, self.direction)
+ ... | {"golden_diff": "diff --git a/mypy/constraints.py b/mypy/constraints.py\n--- a/mypy/constraints.py\n+++ b/mypy/constraints.py\n@@ -506,6 +506,8 @@\n self.direction)\n elif isinstance(self.actual, TypeType):\n return infer_constraints(template.item, self.actual.it... |
gh_patches_debug_1546 | rasdani/github-patches | git_diff | elastic__helm-charts-516 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
helm upgrade fails due to 'cannot patch "elasticsearch-master" with kind StatefulSet'
**Chart version:**
7.6.0
**Kubernetes version:**
v1.14.9-eks-c0eccc
**Kubernetes provider:** E.g. GKE (Google Kube... | diff --git a/helpers/helpers.py b/helpers/helpers.py
--- a/helpers/helpers.py
+++ b/helpers/helpers.py
@@ -9,7 +9,7 @@
with tempfile.NamedTemporaryFile() as temp:
with open(temp.name, "w") as values:
values.write(config)
- helm_cmd = "helm template -f {0} --namespace default ./".format... | {"golden_diff": "diff --git a/helpers/helpers.py b/helpers/helpers.py\n--- a/helpers/helpers.py\n+++ b/helpers/helpers.py\n@@ -9,7 +9,7 @@\n with tempfile.NamedTemporaryFile() as temp:\n with open(temp.name, \"w\") as values:\n values.write(config)\n- helm_cmd = \"helm template -f {0} --n... |
gh_patches_debug_1547 | rasdani/github-patches | git_diff | pre-commit__pre-commit-1709 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
running `pre-commit autoupdate` fails because tip of HEAD is missing hook
Hello 👋
I'm setting up `pre-commit` on a project and came across an issue when adding hook `destroyed-symlinks`. The error message ... | diff --git a/pre_commit/commands/autoupdate.py b/pre_commit/commands/autoupdate.py
--- a/pre_commit/commands/autoupdate.py
+++ b/pre_commit/commands/autoupdate.py
@@ -79,8 +79,8 @@
hooks_missing = hooks - {hook['id'] for hook in manifest}
if hooks_missing:
raise RepositoryCannotBeUpdatedError(
- ... | {"golden_diff": "diff --git a/pre_commit/commands/autoupdate.py b/pre_commit/commands/autoupdate.py\n--- a/pre_commit/commands/autoupdate.py\n+++ b/pre_commit/commands/autoupdate.py\n@@ -79,8 +79,8 @@\n hooks_missing = hooks - {hook['id'] for hook in manifest}\n if hooks_missing:\n raise RepositoryCanno... |
gh_patches_debug_1548 | rasdani/github-patches | git_diff | secdev__scapy-1007 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BERcodec_STRING With RandString cause length incorrect
Scapy Version: 2.3.3.dev929
System: OSX 10.13.1
Python Version: 2.7.13
Using RandString with ASN1_STRING will cause length enc incorrect.
This code... | diff --git a/scapy/asn1/ber.py b/scapy/asn1/ber.py
--- a/scapy/asn1/ber.py
+++ b/scapy/asn1/ber.py
@@ -337,7 +337,8 @@
tag = ASN1_Class_UNIVERSAL.STRING
@classmethod
def enc(cls,s):
- return chb(hash(cls.tag))+BER_len_enc(len(s))+raw(s) # Be sure we are encoding bytes
+ s = raw(s)
+ ... | {"golden_diff": "diff --git a/scapy/asn1/ber.py b/scapy/asn1/ber.py\n--- a/scapy/asn1/ber.py\n+++ b/scapy/asn1/ber.py\n@@ -337,7 +337,8 @@\n tag = ASN1_Class_UNIVERSAL.STRING\n @classmethod\n def enc(cls,s):\n- return chb(hash(cls.tag))+BER_len_enc(len(s))+raw(s) # Be sure we are encoding bytes\n+ ... |
gh_patches_debug_1549 | rasdani/github-patches | git_diff | pytorch__audio-1339 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Making `AudioMetaData` print friendly
`AudioMetaData` class reports meta-data of audio source. It is however not print friendly.
```python
print(torchaudio.info(src))
>>> <torchaudio.backend.common.Audio... | diff --git a/torchaudio/backend/common.py b/torchaudio/backend/common.py
--- a/torchaudio/backend/common.py
+++ b/torchaudio/backend/common.py
@@ -38,3 +38,14 @@
self.num_channels = num_channels
self.bits_per_sample = bits_per_sample
self.encoding = encoding
+
+ def __str__(self):
+ ... | {"golden_diff": "diff --git a/torchaudio/backend/common.py b/torchaudio/backend/common.py\n--- a/torchaudio/backend/common.py\n+++ b/torchaudio/backend/common.py\n@@ -38,3 +38,14 @@\n self.num_channels = num_channels\n self.bits_per_sample = bits_per_sample\n self.encoding = encoding\n+\n+ de... |
gh_patches_debug_1550 | rasdani/github-patches | git_diff | cython__cython-2497 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
submodule with name "cython.pyx" doesn't build
The[ fix for #2422](https://github.com/cython/cython/commit/6c91bf8e5bc99b625405919f9318d5626ecfa782#diff-26945d164aa2d5cb24bbe2cb4b8903ed) introduced a regressi... | diff --git a/Cython/Utils.py b/Cython/Utils.py
--- a/Cython/Utils.py
+++ b/Cython/Utils.py
@@ -491,5 +491,5 @@
def raise_error_if_module_name_forbidden(full_module_name):
#it is bad idea to call the pyx-file cython.pyx, so fail early
- if full_module_name == 'cython' or full_module_name.endswith('.cython'):... | {"golden_diff": "diff --git a/Cython/Utils.py b/Cython/Utils.py\n--- a/Cython/Utils.py\n+++ b/Cython/Utils.py\n@@ -491,5 +491,5 @@\n \n def raise_error_if_module_name_forbidden(full_module_name):\n #it is bad idea to call the pyx-file cython.pyx, so fail early\n- if full_module_name == 'cython' or full_module_n... |
gh_patches_debug_1551 | rasdani/github-patches | git_diff | vyperlang__vyper-1465 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Vyper treats strings as having length 32
### Version Information
* vyper Version: 0.1.0b9
* OS: osx
### What's your issue about?
When using `concat` Vyper treats all strings as having length 32. The... | diff --git a/vyper/functions/functions.py b/vyper/functions/functions.py
--- a/vyper/functions/functions.py
+++ b/vyper/functions/functions.py
@@ -232,7 +232,7 @@
# Maximum length of the output
total_maxlen = sum([
- arg.typ.maxlen if isinstance(arg.typ, ByteArrayType) else 32 for arg in args
+ ... | {"golden_diff": "diff --git a/vyper/functions/functions.py b/vyper/functions/functions.py\n--- a/vyper/functions/functions.py\n+++ b/vyper/functions/functions.py\n@@ -232,7 +232,7 @@\n \n # Maximum length of the output\n total_maxlen = sum([\n- arg.typ.maxlen if isinstance(arg.typ, ByteArrayType) else 32... |
gh_patches_debug_1552 | rasdani/github-patches | git_diff | python-discord__bot-822 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
!clean command returns malformed API request
Since we added attachments to the deleted message logs the clean command was not updated to store this.
When running a clean command the following error is retu... | diff --git a/bot/cogs/moderation/modlog.py b/bot/cogs/moderation/modlog.py
--- a/bot/cogs/moderation/modlog.py
+++ b/bot/cogs/moderation/modlog.py
@@ -67,7 +67,7 @@
'embeds': [embed.to_dict() for embed in message.embeds],
'attachments': attachment,
... | {"golden_diff": "diff --git a/bot/cogs/moderation/modlog.py b/bot/cogs/moderation/modlog.py\n--- a/bot/cogs/moderation/modlog.py\n+++ b/bot/cogs/moderation/modlog.py\n@@ -67,7 +67,7 @@\n 'embeds': [embed.to_dict() for embed in message.embeds],\n 'attachments': attachment,... |
gh_patches_debug_1553 | rasdani/github-patches | git_diff | beetbox__beets-3905 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Lyrics plugin crashing on tekstowo.pl
I just found it crashing while searching tekstowo.pl (I'm on https://github.com/beetbox/beets/commit/afc072801c4a254e6b4114d89133d6bebc3e34b9).
These are the relevant ... | diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py
--- a/beetsplug/lyrics.py
+++ b/beetsplug/lyrics.py
@@ -437,8 +437,14 @@
except HTMLParseError:
return None
- song_row = html.find("div", class_="content"). \
- find_all("div", class_="box-przeboje")[0]
+ song_rows =... | {"golden_diff": "diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py\n--- a/beetsplug/lyrics.py\n+++ b/beetsplug/lyrics.py\n@@ -437,8 +437,14 @@\n except HTMLParseError:\n return None\n \n- song_row = html.find(\"div\", class_=\"content\"). \\\n- find_all(\"div\", class_=\"box-p... |
gh_patches_debug_1554 | rasdani/github-patches | git_diff | getredash__redash-3323 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Exporting to Excel file fails when one of the columns is a dictionary
<!--
We use GitHub only for bug reports 🐛
Anything else should be posted to https://discuss.redash.io 👫
🚨For support, help & q... | diff --git a/redash/models/__init__.py b/redash/models/__init__.py
--- a/redash/models/__init__.py
+++ b/redash/models/__init__.py
@@ -351,7 +351,7 @@
for (r, row) in enumerate(query_data['rows']):
for (c, name) in enumerate(column_names):
v = row.get(name)
- if isi... | {"golden_diff": "diff --git a/redash/models/__init__.py b/redash/models/__init__.py\n--- a/redash/models/__init__.py\n+++ b/redash/models/__init__.py\n@@ -351,7 +351,7 @@\n for (r, row) in enumerate(query_data['rows']):\n for (c, name) in enumerate(column_names):\n v = row.get(name)\... |
gh_patches_debug_1555 | rasdani/github-patches | git_diff | jschneier__django-storages-762 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dropbox base path / should be an empty string
Using `django-storages` `1.7.2`, a base path (`'/`) is provided, the Dropbox API is rejecting it:
```
File "/usr/local/lib/python3.7/site-packages/dbbackup/... | diff --git a/storages/backends/dropbox.py b/storages/backends/dropbox.py
--- a/storages/backends/dropbox.py
+++ b/storages/backends/dropbox.py
@@ -96,6 +96,10 @@
def listdir(self, path):
directories, files = [], []
full_path = self._full_path(path)
+
+ if full_path == '/':
+ ful... | {"golden_diff": "diff --git a/storages/backends/dropbox.py b/storages/backends/dropbox.py\n--- a/storages/backends/dropbox.py\n+++ b/storages/backends/dropbox.py\n@@ -96,6 +96,10 @@\n def listdir(self, path):\n directories, files = [], []\n full_path = self._full_path(path)\n+\n+ if full_path... |
gh_patches_debug_1556 | rasdani/github-patches | git_diff | getnikola__nikola-2593 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Archives (CREATE_MONTHLY_ARCHIVE = True) think all months are "None"
https://irclogs.getnikola.com/2015/
To reproduce locally: get https://github.com/getnikola/irclogs-site create any random files in `post... | diff --git a/nikola/plugins/task/archive.py b/nikola/plugins/task/archive.py
--- a/nikola/plugins/task/archive.py
+++ b/nikola/plugins/task/archive.py
@@ -97,7 +97,7 @@
elif len(classification) == 1:
return classification[0]
elif len(classification) == 2:
- nikola.utils.LocaleB... | {"golden_diff": "diff --git a/nikola/plugins/task/archive.py b/nikola/plugins/task/archive.py\n--- a/nikola/plugins/task/archive.py\n+++ b/nikola/plugins/task/archive.py\n@@ -97,7 +97,7 @@\n elif len(classification) == 1:\n return classification[0]\n elif len(classification) == 2:\n- ... |
gh_patches_debug_1557 | rasdani/github-patches | git_diff | microsoft__DeepSpeed-5134 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] TypeError: Can't instantiate abstract class MPS_Accelerator with abstract methods
**Describe the bug**
TypeError: Can't instantiate abstract class MPS_Accelerator with abstract methods handles_memory_b... | diff --git a/accelerator/mps_accelerator.py b/accelerator/mps_accelerator.py
--- a/accelerator/mps_accelerator.py
+++ b/accelerator/mps_accelerator.py
@@ -24,6 +24,15 @@
def is_synchronized_device(self):
return False
+ def use_host_timers(self):
+ return self.is_synchronized_device()
+
+ de... | {"golden_diff": "diff --git a/accelerator/mps_accelerator.py b/accelerator/mps_accelerator.py\n--- a/accelerator/mps_accelerator.py\n+++ b/accelerator/mps_accelerator.py\n@@ -24,6 +24,15 @@\n def is_synchronized_device(self):\n return False\n \n+ def use_host_timers(self):\n+ return self.is_synchr... |
gh_patches_debug_1558 | rasdani/github-patches | git_diff | kovidgoyal__kitty-5932 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Permission Error when using SSH kitten on FreeBSD
Good morning. I was hoping you or someone could point me in the right direction, or is this possibly a bug?
When attempting to use the SSH kitten on FreeB... | diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py
--- a/kittens/ssh/main.py
+++ b/kittens/ssh/main.py
@@ -50,9 +50,6 @@
shm.unlink()
if shm.stats.st_uid != os.geteuid() or shm.stats.st_gid != os.getegid():
raise ValueError('Incorrect owner on pwfile')
- mode = stat.S_IMODE(shm... | {"golden_diff": "diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py\n--- a/kittens/ssh/main.py\n+++ b/kittens/ssh/main.py\n@@ -50,9 +50,6 @@\n shm.unlink()\n if shm.stats.st_uid != os.geteuid() or shm.stats.st_gid != os.getegid():\n raise ValueError('Incorrect owner on pwfile')\n- ... |
gh_patches_debug_1559 | rasdani/github-patches | git_diff | django-oscar__django-oscar-1766 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
In cases where the stock is lower than the number of allocated products incorrect message appears
To reproduce:
1. Add 2 products to basket
2. On one of them set num of allocated products as 1 and stock as 0.... | diff --git a/src/oscar/apps/partner/availability.py b/src/oscar/apps/partner/availability.py
--- a/src/oscar/apps/partner/availability.py
+++ b/src/oscar/apps/partner/availability.py
@@ -83,7 +83,7 @@
self.num_available = num_available
def is_purchase_permitted(self, quantity):
- if self.num_avai... | {"golden_diff": "diff --git a/src/oscar/apps/partner/availability.py b/src/oscar/apps/partner/availability.py\n--- a/src/oscar/apps/partner/availability.py\n+++ b/src/oscar/apps/partner/availability.py\n@@ -83,7 +83,7 @@\n self.num_available = num_available\n \n def is_purchase_permitted(self, quantity):\n-... |
gh_patches_debug_1560 | rasdani/github-patches | git_diff | readthedocs__readthedocs.org-3693 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
After build is triggered, state is shown as failed
To reproduce, fire off a new build, make sure to catch the build list page while VCS operations are happening. Build will be in a failure state. This is a re... | diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py
--- a/readthedocs/vcs_support/backends/git.py
+++ b/readthedocs/vcs_support/backends/git.py
@@ -122,8 +122,8 @@
@property
def branches(self):
# Only show remote branches
- retcode, stdout, _ = self.r... | {"golden_diff": "diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py\n--- a/readthedocs/vcs_support/backends/git.py\n+++ b/readthedocs/vcs_support/backends/git.py\n@@ -122,8 +122,8 @@\n @property\n def branches(self):\n # Only show remote branches\n- ret... |
gh_patches_debug_1561 | rasdani/github-patches | git_diff | canonical__microk8s-3573 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
microk8s suggests command hiding error info
<!--
Thank you for submitting an issue. Please fill in the template below
information about the bug you encountered.
-->
#### Summary
<!-- Please expla... | diff --git a/scripts/wrappers/common/utils.py b/scripts/wrappers/common/utils.py
--- a/scripts/wrappers/common/utils.py
+++ b/scripts/wrappers/common/utils.py
@@ -197,7 +197,7 @@
)
print("")
print(" sudo usermod -a -G microk8s {}".format(user))
- print(" sudo chown -f -R $USER ~/... | {"golden_diff": "diff --git a/scripts/wrappers/common/utils.py b/scripts/wrappers/common/utils.py\n--- a/scripts/wrappers/common/utils.py\n+++ b/scripts/wrappers/common/utils.py\n@@ -197,7 +197,7 @@\n )\n print(\"\")\n print(\" sudo usermod -a -G microk8s {}\".format(user))\n- print(\"... |
gh_patches_debug_1562 | rasdani/github-patches | git_diff | Flexget__Flexget-3648 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error on scheduler: Only timezones from the pytz library are supported
### Steps to reproduce:
- Step 1: `flexget -L verbose daemon start`
#### Config:
```yaml
schedules:
- tasks: ['some-task']
... | diff --git a/flexget/components/scheduler/scheduler.py b/flexget/components/scheduler/scheduler.py
--- a/flexget/components/scheduler/scheduler.py
+++ b/flexget/components/scheduler/scheduler.py
@@ -1,4 +1,3 @@
-import datetime
import hashlib
import logging
import os
@@ -126,7 +125,6 @@
scheduler = BackgroundSc... | {"golden_diff": "diff --git a/flexget/components/scheduler/scheduler.py b/flexget/components/scheduler/scheduler.py\n--- a/flexget/components/scheduler/scheduler.py\n+++ b/flexget/components/scheduler/scheduler.py\n@@ -1,4 +1,3 @@\n-import datetime\n import hashlib\n import logging\n import os\n@@ -126,7 +125,6 @@\n ... |
gh_patches_debug_1563 | rasdani/github-patches | git_diff | ray-project__ray-3109 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ship Modin with Ray
### Describe the problem
<!-- Describe the problem clearly here. -->
I think it makes sense to ship Modin with Ray. I suggest doing this similar to how pyarrow is shipped with Ray.
We... | diff --git a/python/ray/__init__.py b/python/ray/__init__.py
--- a/python/ray/__init__.py
+++ b/python/ray/__init__.py
@@ -46,6 +46,9 @@
e.args += (helpful_message, )
raise
+modin_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "modin")
+sys.path.insert(0, modin_path)
+
from ray.ray... | {"golden_diff": "diff --git a/python/ray/__init__.py b/python/ray/__init__.py\n--- a/python/ray/__init__.py\n+++ b/python/ray/__init__.py\n@@ -46,6 +46,9 @@\n e.args += (helpful_message, )\n raise\n \n+modin_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), \"modin\")\n+sys.path.insert(0, ... |
gh_patches_debug_1564 | rasdani/github-patches | git_diff | web2py__web2py-1871 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
contrib/pg8000 is old and causes weird postgres errors
Please update the contrib/pg8000 driver to the current version.
Otherwise errors like Broken Pipe, Operationalerror,.. occur,
- at least for postgres 9... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -63,7 +63,6 @@
'gluon/contrib/pymysql',
'gluon/contrib/pyrtf',
'gluon/contrib/pysimplesoap',
- 'gluon/contrib/pg8000',
'gluon/contrib/plural_rules',
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -63,7 +63,6 @@\n 'gluon/contrib/pymysql',\n 'gluon/contrib/pyrtf',\n 'gluon/contrib/pysimplesoap',\n- 'gluon/contrib/pg8000',\n 'gluon/... |
gh_patches_debug_1565 | rasdani/github-patches | git_diff | holoviz__panel-1044 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support src urls and alt texts on Images
#### My Pain
I would like to use images in Panel via `pn.pane.Markdown` and/ or `pn.pane.PNG`.
Currently the Bokeh layout engine does not layout markdown with im... | diff --git a/panel/pane/image.py b/panel/pane/image.py
--- a/panel/pane/image.py
+++ b/panel/pane/image.py
@@ -114,7 +114,7 @@
w, h = '%spx' % width, '%spx' % height
elif smode == 'stretch_both':
w, h = '100%', '100%'
- elif smode == 'stretch_height':
+ elif smode == 'st... | {"golden_diff": "diff --git a/panel/pane/image.py b/panel/pane/image.py\n--- a/panel/pane/image.py\n+++ b/panel/pane/image.py\n@@ -114,7 +114,7 @@\n w, h = '%spx' % width, '%spx' % height\n elif smode == 'stretch_both':\n w, h = '100%', '100%'\n- elif smode == 'stretch_height':\n+... |
gh_patches_debug_1566 | rasdani/github-patches | git_diff | quantumlib__Cirq-423 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
MergeInteractions optimization is creating bad circuits
Not sure how this made it past the tests yet.
```python
def main():
circuit = make_inefficient_circuit()
print("BEFORE:")
print(circu... | diff --git a/cirq/google/merge_interactions.py b/cirq/google/merge_interactions.py
--- a/cirq/google/merge_interactions.py
+++ b/cirq/google/merge_interactions.py
@@ -95,9 +95,9 @@
if op.qubits == (q2, q1):
return MergeInteractions._flip_kron_order(m), True
if op.qubits == (q1,):
- ... | {"golden_diff": "diff --git a/cirq/google/merge_interactions.py b/cirq/google/merge_interactions.py\n--- a/cirq/google/merge_interactions.py\n+++ b/cirq/google/merge_interactions.py\n@@ -95,9 +95,9 @@\n if op.qubits == (q2, q1):\n return MergeInteractions._flip_kron_order(m), True\n if op.qu... |
gh_patches_debug_1567 | rasdani/github-patches | git_diff | kivy__kivy-4584 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove and Re-add of Highest Widget in a Layout leaves the Widget Invisible
I have noticed that adding widgets to a Layout Manager does not seem to work correctly. I have tested with BoxLayout, GridLayout, an... | diff --git a/kivy/uix/widget.py b/kivy/uix/widget.py
--- a/kivy/uix/widget.py
+++ b/kivy/uix/widget.py
@@ -546,7 +546,7 @@
children = self.children
if index >= len(children):
index = len(children)
- next_index = 0
+ next_index = canvas.indexof(chi... | {"golden_diff": "diff --git a/kivy/uix/widget.py b/kivy/uix/widget.py\n--- a/kivy/uix/widget.py\n+++ b/kivy/uix/widget.py\n@@ -546,7 +546,7 @@\n children = self.children\n if index >= len(children):\n index = len(children)\n- next_index = 0\n+ next_i... |
gh_patches_debug_1568 | rasdani/github-patches | git_diff | oppia__oppia-14800 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Schema validation error on uploading an exploration YAML
<!--
- Thanks for taking the time to report a bug in the Oppia project.
- Before filing a new issue, please do a quick search to check that it ha... | diff --git a/core/controllers/creator_dashboard.py b/core/controllers/creator_dashboard.py
--- a/core/controllers/creator_dashboard.py
+++ b/core/controllers/creator_dashboard.py
@@ -352,7 +352,7 @@
@acl_decorators.can_upload_exploration
def post(self):
"""Handles POST requests."""
- yaml_cont... | {"golden_diff": "diff --git a/core/controllers/creator_dashboard.py b/core/controllers/creator_dashboard.py\n--- a/core/controllers/creator_dashboard.py\n+++ b/core/controllers/creator_dashboard.py\n@@ -352,7 +352,7 @@\n @acl_decorators.can_upload_exploration\n def post(self):\n \"\"\"Handles POST reque... |
gh_patches_debug_1569 | rasdani/github-patches | git_diff | google__pytype-807 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AssertionError: Don't know how to match <class 'pytype.pytd.pytd.Name…
…dType'> against <class 'pytype.pytd.pytd.Literal'>
I opened an issue for this error. If this a possible fix for this issue, feel free... | diff --git a/pytype/pytd/type_match.py b/pytype/pytd/type_match.py
--- a/pytype/pytd/type_match.py
+++ b/pytype/pytd/type_match.py
@@ -347,6 +347,8 @@
return booleq.FALSE
else:
return booleq.Eq(t1.name, t2.name)
+ elif isinstance(t1, pytd.NamedType) and isinstance(t2, pytd.Literal):
+ r... | {"golden_diff": "diff --git a/pytype/pytd/type_match.py b/pytype/pytd/type_match.py\n--- a/pytype/pytd/type_match.py\n+++ b/pytype/pytd/type_match.py\n@@ -347,6 +347,8 @@\n return booleq.FALSE\n else:\n return booleq.Eq(t1.name, t2.name)\n+ elif isinstance(t1, pytd.NamedType) and isinstance(t2,... |
gh_patches_debug_1570 | rasdani/github-patches | git_diff | electricitymaps__electricitymaps-contrib-2656 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The import/export between Menorca and Mallorca appears reversed
Our data is showing the export going one way, but our data source is showing the reverse according to one user. See screenshots:

)
- if any(packaging.version.Version(spec.version).local for spec in req... | {"golden_diff": "diff --git a/warehouse/forklift/legacy.py b/warehouse/forklift/legacy.py\n--- a/warehouse/forklift/legacy.py\n+++ b/warehouse/forklift/legacy.py\n@@ -252,11 +252,6 @@\n \"Can't have direct dependency: {!r}\".format(requirement)\n )\n \n- if any(packaging.version.Version(spec.vers... |
gh_patches_debug_1572 | rasdani/github-patches | git_diff | pypa__pip-10029 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Vendoring of `tenacity` is leaky
### Description
Tenacity contains a [conditional import of tornado](https://github.com/pypa/pip/blob/88eb4f092e58f3aee1d389ad4f9047df46e44bb4/src/pip/_vendor/tenacity/__init_... | diff --git a/src/pip/_vendor/tenacity/__init__.py b/src/pip/_vendor/tenacity/__init__.py
--- a/src/pip/_vendor/tenacity/__init__.py
+++ b/src/pip/_vendor/tenacity/__init__.py
@@ -22,10 +22,12 @@
except ImportError:
iscoroutinefunction = None
-try:
- import tornado
-except ImportError:
- tornado = None
+# ... | {"golden_diff": "diff --git a/src/pip/_vendor/tenacity/__init__.py b/src/pip/_vendor/tenacity/__init__.py\n--- a/src/pip/_vendor/tenacity/__init__.py\n+++ b/src/pip/_vendor/tenacity/__init__.py\n@@ -22,10 +22,12 @@\n except ImportError:\n iscoroutinefunction = None\n \n-try:\n- import tornado\n-except ImportErro... |
gh_patches_debug_1573 | rasdani/github-patches | git_diff | spotify__luigi-2323 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TypeError: 'str' does not support the buffer interface in luigi.contrib.hive
Hi,
I'm running luigi task with python3.4 and trying call print(HiveTableTarget(table = "tbl", database = "db").exists()).
I'm get... | diff --git a/luigi/contrib/hive.py b/luigi/contrib/hive.py
--- a/luigi/contrib/hive.py
+++ b/luigi/contrib/hive.py
@@ -68,7 +68,7 @@
if check_return_code and p.returncode != 0:
raise HiveCommandError("Hive command: {0} failed with error code: {1}".format(" ".join(cmd), p.returncode),
... | {"golden_diff": "diff --git a/luigi/contrib/hive.py b/luigi/contrib/hive.py\n--- a/luigi/contrib/hive.py\n+++ b/luigi/contrib/hive.py\n@@ -68,7 +68,7 @@\n if check_return_code and p.returncode != 0:\n raise HiveCommandError(\"Hive command: {0} failed with error code: {1}\".format(\" \".join(cmd), p.returnco... |
gh_patches_debug_1574 | rasdani/github-patches | git_diff | kivy__kivy-3066 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SDL2 window crash on (atleast) Windows
Run the following
``` python
from kivy.app import App
from kivy.uix.label import Label
class TestApp(App):
def build(self):
return Label(text='Use scroll wh... | diff --git a/kivy/core/window/window_sdl2.py b/kivy/core/window/window_sdl2.py
--- a/kivy/core/window/window_sdl2.py
+++ b/kivy/core/window/window_sdl2.py
@@ -99,6 +99,7 @@
def __init__(self, **kwargs):
self._win = _WindowSDL2Storage()
super(WindowSDL, self).__init__()
+ self._mouse_x = se... | {"golden_diff": "diff --git a/kivy/core/window/window_sdl2.py b/kivy/core/window/window_sdl2.py\n--- a/kivy/core/window/window_sdl2.py\n+++ b/kivy/core/window/window_sdl2.py\n@@ -99,6 +99,7 @@\n def __init__(self, **kwargs):\n self._win = _WindowSDL2Storage()\n super(WindowSDL, self).__init__()\n+ ... |
gh_patches_debug_1575 | rasdani/github-patches | git_diff | conda__conda-5426 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Launching navigator via prompt warnings appear
_From @RidaZubair on May 24, 2017 9:47_
**OS:** Windows
**Anaconda: 4.4.0**
**Actual:**
On launching navigator via prompt following warning appears on prom... | diff --git a/conda/common/platform.py b/conda/common/platform.py
--- a/conda/common/platform.py
+++ b/conda/common/platform.py
@@ -19,12 +19,12 @@
return False
try:
from ctypes import windll
- return windll.shell32.IsUserAnAdmin()() != 0
+ return windll.shell32.IsUserAnAdmin() != 0
... | {"golden_diff": "diff --git a/conda/common/platform.py b/conda/common/platform.py\n--- a/conda/common/platform.py\n+++ b/conda/common/platform.py\n@@ -19,12 +19,12 @@\n return False\n try:\n from ctypes import windll\n- return windll.shell32.IsUserAnAdmin()() != 0\n+ return windll.shel... |
gh_patches_debug_1576 | rasdani/github-patches | git_diff | modin-project__modin-3390 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Do not check ASV benchmarks on test data, where the number of rows is much less than the number of columns
These sizes can be removed because such cases are not used in benchmarking: https://github.com/modin-... | diff --git a/asv_bench/benchmarks/utils/data_shapes.py b/asv_bench/benchmarks/utils/data_shapes.py
--- a/asv_bench/benchmarks/utils/data_shapes.py
+++ b/asv_bench/benchmarks/utils/data_shapes.py
@@ -30,7 +30,6 @@
],
"small": [
[[250, 250], [250, 250]],
- [[20, 10_000], [10, 25_000]],
... | {"golden_diff": "diff --git a/asv_bench/benchmarks/utils/data_shapes.py b/asv_bench/benchmarks/utils/data_shapes.py\n--- a/asv_bench/benchmarks/utils/data_shapes.py\n+++ b/asv_bench/benchmarks/utils/data_shapes.py\n@@ -30,7 +30,6 @@\n ],\n \"small\": [\n [[250, 250], [250, 250]],\n- [[20, 10_000]... |
gh_patches_debug_1577 | rasdani/github-patches | git_diff | gratipay__gratipay.com-1750 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
regression w/ unglobalizing of gittip.db
We fixed a bunch (!m). I'm seeing one more on community pages:
https://www.gittip.com/for/python/
```
Traceback (most recent call last):
File "aspen/website.py", l... | diff --git a/gittip/models/_mixin_elsewhere.py b/gittip/models/_mixin_elsewhere.py
--- a/gittip/models/_mixin_elsewhere.py
+++ b/gittip/models/_mixin_elsewhere.py
@@ -413,11 +413,12 @@
# Utter Hack
# ==========
-def utter_hack(records):
+def utter_hack(db, records):
for rec in records:
- yield UtterHack... | {"golden_diff": "diff --git a/gittip/models/_mixin_elsewhere.py b/gittip/models/_mixin_elsewhere.py\n--- a/gittip/models/_mixin_elsewhere.py\n+++ b/gittip/models/_mixin_elsewhere.py\n@@ -413,11 +413,12 @@\n # Utter Hack\n # ==========\n \n-def utter_hack(records):\n+def utter_hack(db, records):\n for rec in records... |
gh_patches_debug_1578 | rasdani/github-patches | git_diff | cloudtools__troposphere-605 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: IAM Role title should not be validated
The title specified in troposphere is not the actual physical resource name and should be validated as such (https://github.com/cloudtools/troposphere/blob/fe72f7d3... | diff --git a/troposphere/iam.py b/troposphere/iam.py
--- a/troposphere/iam.py
+++ b/troposphere/iam.py
@@ -50,9 +50,6 @@
class Group(AWSObject):
- def validate_title(self):
- iam_group_name(self.title)
-
resource_type = "AWS::IAM::Group"
props = {
@@ -73,9 +70,6 @@
class Role(AWSObject):... | {"golden_diff": "diff --git a/troposphere/iam.py b/troposphere/iam.py\n--- a/troposphere/iam.py\n+++ b/troposphere/iam.py\n@@ -50,9 +50,6 @@\n \n \n class Group(AWSObject):\n- def validate_title(self):\n- iam_group_name(self.title)\n-\n resource_type = \"AWS::IAM::Group\"\n \n props = {\n@@ -73,9 +70,... |
gh_patches_debug_1579 | rasdani/github-patches | git_diff | mne-tools__mne-bids-pipeline-139 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
config.trigger_time_shift is currently unused
And also lacks clarification of what exactly it is supposed to do.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of the... | diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -461,17 +461,6 @@
tmax = 0.5
-# ``trigger_time_shift`` : float | None
-# If float it specifies the offset for the trigger and the stimulus
-# (in seconds). You need to measure this value for your specific
-# experiment/setup.
-#
-# Exam... | {"golden_diff": "diff --git a/config.py b/config.py\n--- a/config.py\n+++ b/config.py\n@@ -461,17 +461,6 @@\n \n tmax = 0.5\n \n-# ``trigger_time_shift`` : float | None\n-# If float it specifies the offset for the trigger and the stimulus\n-# (in seconds). You need to measure this value for your specific\n-# e... |
gh_patches_debug_1580 | rasdani/github-patches | git_diff | plone__Products.CMFPlone-3093 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
sorting in control panel
The items of the control panel are completely unsorted (should be sorted in alphabetical order (depending on the current language in Plone).
![screenshot-dev1 veit-schiele de 8080 201... | diff --git a/Products/CMFPlone/PloneControlPanel.py b/Products/CMFPlone/PloneControlPanel.py
--- a/Products/CMFPlone/PloneControlPanel.py
+++ b/Products/CMFPlone/PloneControlPanel.py
@@ -143,9 +143,10 @@
a['title'] = translate(title,
context=self.REQUEST)
- ... | {"golden_diff": "diff --git a/Products/CMFPlone/PloneControlPanel.py b/Products/CMFPlone/PloneControlPanel.py\n--- a/Products/CMFPlone/PloneControlPanel.py\n+++ b/Products/CMFPlone/PloneControlPanel.py\n@@ -143,9 +143,10 @@\n a['title'] = translate(title,\n context... |
gh_patches_debug_1581 | rasdani/github-patches | git_diff | bridgecrewio__checkov-5936 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CKV_GCP_79 SQL Server latest version is 2022 instead of 2019
**Describe the issue**
The `CKV_GCP_79` about SQL server is pinned at 2019 but 2022 is the latest version :
https://learn.microsoft.com/en-us/tr... | diff --git a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py
--- a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py
+++ b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py
@@ -14,8 +14,8 @@
return 'database_v... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py\n--- a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py\n+++ b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py\n@@ -14,8 +14,8 @@\n ... |
gh_patches_debug_1582 | rasdani/github-patches | git_diff | freedomofpress__securedrop-3429 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[QA] Tails GUI updater reporting new versions
# Bug
## Description
The 0.7.0 GUI updater reports new versions even when it's running the latest. Just ran a pre-flight check with the 0.7.0 tag, checked o... | diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py
--- a/admin/securedrop_admin/__init__.py
+++ b/admin/securedrop_admin/__init__.py
@@ -588,7 +588,8 @@
sdlog.info("Checking for SecureDrop updates...")
# Determine what branch we are on
- current_tag = subprocess.check_ou... | {"golden_diff": "diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py\n--- a/admin/securedrop_admin/__init__.py\n+++ b/admin/securedrop_admin/__init__.py\n@@ -588,7 +588,8 @@\n sdlog.info(\"Checking for SecureDrop updates...\")\n \n # Determine what branch we are on\n- current... |
gh_patches_debug_1583 | rasdani/github-patches | git_diff | vyperlang__vyper-2513 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
test fail with web3.py 5.21.0
### Version Information
* vyper Version (output of `vyper --version`): latest master (cff69d63)
* OS: macos
* Python Version (output of `python --version`): 3.9.6
### Wha... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@
"pytest-xdist>=1.32,<2.0",
"eth-tester[py-evm]>=0.5.0b1,<0.6",
"py-evm==0.4.0a4", # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+
- "web3==5.12.3",
+ "web3==5.21.0",
"... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -15,7 +15,7 @@\n \"pytest-xdist>=1.32,<2.0\",\n \"eth-tester[py-evm]>=0.5.0b1,<0.6\",\n \"py-evm==0.4.0a4\", # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+\n- \"web3==5.12.3\",\n+ ... |
gh_patches_debug_1584 | rasdani/github-patches | git_diff | fossasia__open-event-server-5151 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
For the edit action button in admin/users the super admin should be allowed to make the users as an admin.
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
The patch for the... | diff --git a/app/api/users.py b/app/api/users.py
--- a/app/api/users.py
+++ b/app/api/users.py
@@ -183,7 +183,7 @@
if data.get('email') and data['email'] != user.email:
view_kwargs['email_changed'] = user.email
- if data.get('is_admin') != user.is_admin:
+ if has_access('is_super_a... | {"golden_diff": "diff --git a/app/api/users.py b/app/api/users.py\n--- a/app/api/users.py\n+++ b/app/api/users.py\n@@ -183,7 +183,7 @@\n if data.get('email') and data['email'] != user.email:\n view_kwargs['email_changed'] = user.email\n \n- if data.get('is_admin') != user.is_admin:\n+ ... |
gh_patches_debug_1585 | rasdani/github-patches | git_diff | feast-dev__feast-3588 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
to_remote_storage() resulting in undeleted temporary tables in Snowflake
## Expected Behavior
When calling get_historical_features.to_remote_storage(), any temporary tables created in Snowflake are deleted ... | diff --git a/sdk/python/feast/infra/offline_stores/snowflake.py b/sdk/python/feast/infra/offline_stores/snowflake.py
--- a/sdk/python/feast/infra/offline_stores/snowflake.py
+++ b/sdk/python/feast/infra/offline_stores/snowflake.py
@@ -556,7 +556,7 @@
)
table = f"temporary_{uuid.uuid4().hex}"
- ... | {"golden_diff": "diff --git a/sdk/python/feast/infra/offline_stores/snowflake.py b/sdk/python/feast/infra/offline_stores/snowflake.py\n--- a/sdk/python/feast/infra/offline_stores/snowflake.py\n+++ b/sdk/python/feast/infra/offline_stores/snowflake.py\n@@ -556,7 +556,7 @@\n )\n \n table = f\"temporary... |
gh_patches_debug_1586 | rasdani/github-patches | git_diff | kubeflow__pipelines-4187 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
allow output artifact store configuration (vs hard coded)
it seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`... | diff --git a/samples/core/loop_parallelism/loop_parallelism.py b/samples/core/loop_parallelism/loop_parallelism.py
--- a/samples/core/loop_parallelism/loop_parallelism.py
+++ b/samples/core/loop_parallelism/loop_parallelism.py
@@ -21,9 +21,9 @@
print(s)
@dsl.pipeline(name='my-pipeline')
-def pipeline2(my_pipe_p... | {"golden_diff": "diff --git a/samples/core/loop_parallelism/loop_parallelism.py b/samples/core/loop_parallelism/loop_parallelism.py\n--- a/samples/core/loop_parallelism/loop_parallelism.py\n+++ b/samples/core/loop_parallelism/loop_parallelism.py\n@@ -21,9 +21,9 @@\n print(s)\n \n @dsl.pipeline(name='my-pipeline')\n... |
gh_patches_debug_1587 | rasdani/github-patches | git_diff | mitmproxy__mitmproxy-6866 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
httpauth is not attached to replay request
#### Problem Description
I set mitmproxy to run in reverse mode as a proxy to real server, and then protect mitmproxy with a pair of user:pass in the proxyauth opt... | diff --git a/mitmproxy/addons/proxyauth.py b/mitmproxy/addons/proxyauth.py
--- a/mitmproxy/addons/proxyauth.py
+++ b/mitmproxy/addons/proxyauth.py
@@ -76,6 +76,8 @@
# Is this connection authenticated by a previous HTTP CONNECT?
if f.client_conn in self.authenticated:
f.metadat... | {"golden_diff": "diff --git a/mitmproxy/addons/proxyauth.py b/mitmproxy/addons/proxyauth.py\n--- a/mitmproxy/addons/proxyauth.py\n+++ b/mitmproxy/addons/proxyauth.py\n@@ -76,6 +76,8 @@\n # Is this connection authenticated by a previous HTTP CONNECT?\n if f.client_conn in self.authenticated:\n ... |
gh_patches_debug_1588 | rasdani/github-patches | git_diff | bridgecrewio__checkov-2740 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Check Azure Front Door WAF enabled fails even when a WAF is correctly assigned
**Describe the issue**
[`CKV_AZURE_121`](https://github.com/bridgecrewio/checkov/blob/master/checkov/terraform/checks/resource/a... | diff --git a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py
--- a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py
+++ b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py
@@ -12,7 +12,7 @@
... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py\n--- a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py\n+++ b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py\n@... |
gh_patches_debug_1589 | rasdani/github-patches | git_diff | data-for-change__anyway-1244 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Set default values of 0 to elements in head_on_collisions_comparison
Example for the element that is missing
:
dict_merge = defaultdict(int)
+ dict_merge[field_name] = 0
+ dict_merge['תאונות... | {"golden_diff": "diff --git a/anyway/infographics_utils.py b/anyway/infographics_utils.py\n--- a/anyway/infographics_utils.py\n+++ b/anyway/infographics_utils.py\n@@ -338,6 +338,9 @@\n \n def sum_road_accidents_by_specific_type(road_data, field_name):\n dict_merge = defaultdict(int)\n+ dict_merge[field_name] = 0... |
gh_patches_debug_1590 | rasdani/github-patches | git_diff | pyca__cryptography-7406 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
release.py should link to GH create PAT page
We can pre-fill what permissions are needed to improve the UX of doing a release. Example URL: https://github.com/settings/tokens/new?description=foo&scopes=repo,w... | diff --git a/release.py b/release.py
--- a/release.py
+++ b/release.py
@@ -103,6 +103,11 @@
"""
``version`` should be a string like '0.4' or '1.0'.
"""
+ print(
+ f"Create a new GH PAT at: "
+ f"https://github.com/settings/tokens/new?"
+ f"description={version}&scopes=repo"
+ )... | {"golden_diff": "diff --git a/release.py b/release.py\n--- a/release.py\n+++ b/release.py\n@@ -103,6 +103,11 @@\n \"\"\"\n ``version`` should be a string like '0.4' or '1.0'.\n \"\"\"\n+ print(\n+ f\"Create a new GH PAT at: \"\n+ f\"https://github.com/settings/tokens/new?\"\n+ f\"des... |
gh_patches_debug_1591 | rasdani/github-patches | git_diff | Project-MONAI__MONAI-2375 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
error in multi-process accessing of the same non-exist persistent cache
**Is your feature request related to a problem? Please describe.**
the persistent dataset will first check the existence of a cache dir... | diff --git a/monai/data/dataset.py b/monai/data/dataset.py
--- a/monai/data/dataset.py
+++ b/monai/data/dataset.py
@@ -168,7 +168,7 @@
self.hash_func = hash_func
if self.cache_dir is not None:
if not self.cache_dir.exists():
- self.cache_dir.mkdir(parents=True)
+ ... | {"golden_diff": "diff --git a/monai/data/dataset.py b/monai/data/dataset.py\n--- a/monai/data/dataset.py\n+++ b/monai/data/dataset.py\n@@ -168,7 +168,7 @@\n self.hash_func = hash_func\n if self.cache_dir is not None:\n if not self.cache_dir.exists():\n- self.cache_dir.mkdir(pa... |
gh_patches_debug_1592 | rasdani/github-patches | git_diff | nonebot__nonebot2-61 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
修复阻止事件传递信号无效的问题
抛出的异常应为 StopPropagation 的一个实例
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `nonebot/messa... | diff --git a/nonebot/message.py b/nonebot/message.py
--- a/nonebot/message.py
+++ b/nonebot/message.py
@@ -244,7 +244,7 @@
results = await asyncio.gather(*pending_tasks, return_exceptions=True)
for result in results:
- if result is StopPropagation:
+ if isinstance(result, StopP... | {"golden_diff": "diff --git a/nonebot/message.py b/nonebot/message.py\n--- a/nonebot/message.py\n+++ b/nonebot/message.py\n@@ -244,7 +244,7 @@\n results = await asyncio.gather(*pending_tasks, return_exceptions=True)\n \n for result in results:\n- if result is StopPropagation:\n+ if... |
gh_patches_debug_1593 | rasdani/github-patches | git_diff | cisagov__manage.get.gov-1551 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
User/Contact bug: Signals double saving, overwriting data for test cases
### Current Behavior
A bug was introduced [with a PR](https://github.com/cisagov/manage.get.gov/pull/1491) that fixed our oidc login... | diff --git a/src/registrar/models/contact.py b/src/registrar/models/contact.py
--- a/src/registrar/models/contact.py
+++ b/src/registrar/models/contact.py
@@ -64,7 +64,7 @@
super().save(*args, **kwargs)
# Update the related User object's first_name and last_name
- if self.user:
+ if se... | {"golden_diff": "diff --git a/src/registrar/models/contact.py b/src/registrar/models/contact.py\n--- a/src/registrar/models/contact.py\n+++ b/src/registrar/models/contact.py\n@@ -64,7 +64,7 @@\n super().save(*args, **kwargs)\n \n # Update the related User object's first_name and last_name\n- if s... |
gh_patches_debug_1594 | rasdani/github-patches | git_diff | mars-project__mars-679 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Web session doesn't work with large data source
**Describe the bug**
The default `max_buffer_size` of tornado HTTP server is 100M, when constructing dataframes from large pandas dataframes it will ra... | diff --git a/mars/web/server.py b/mars/web/server.py
--- a/mars/web/server.py
+++ b/mars/web/server.py
@@ -214,6 +214,7 @@
handlers, allow_websocket_origin=['*'],
address='0.0.0.0', port=use_port,
extra_patterns=extra_patterns,
+ http_ser... | {"golden_diff": "diff --git a/mars/web/server.py b/mars/web/server.py\n--- a/mars/web/server.py\n+++ b/mars/web/server.py\n@@ -214,6 +214,7 @@\n handlers, allow_websocket_origin=['*'],\n address='0.0.0.0', port=use_port,\n extra_patterns=extra_patterns,\n+ ... |
gh_patches_debug_1595 | rasdani/github-patches | git_diff | mozmeao__snippets-service-1017 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create a preview with background (light and dark) for Icons
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path... | diff --git a/snippets/base/admin/adminmodels.py b/snippets/base/admin/adminmodels.py
--- a/snippets/base/admin/adminmodels.py
+++ b/snippets/base/admin/adminmodels.py
@@ -142,8 +142,8 @@
super().save_model(request, obj, form, change)
def preview(self, obj):
- text = f'<img style="max-width:120px;... | {"golden_diff": "diff --git a/snippets/base/admin/adminmodels.py b/snippets/base/admin/adminmodels.py\n--- a/snippets/base/admin/adminmodels.py\n+++ b/snippets/base/admin/adminmodels.py\n@@ -142,8 +142,8 @@\n super().save_model(request, obj, form, change)\n \n def preview(self, obj):\n- text = f'<img... |
gh_patches_debug_1596 | rasdani/github-patches | git_diff | awslabs__gluonts-1132 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update pandas dependency
As documented in #967, pandas will be fixing the breaking change that led us to fix the dependency to `<1.1`, see pandas-dev/pandas#37267
Once that is resolved, we could remove the... | diff --git a/src/gluonts/time_feature/_base.py b/src/gluonts/time_feature/_base.py
--- a/src/gluonts/time_feature/_base.py
+++ b/src/gluonts/time_feature/_base.py
@@ -136,8 +136,8 @@
"""
features_by_offsets = {
- offsets.YearOffset: [],
- offsets.MonthOffset: [MonthOfYear],
+ offsets.Ye... | {"golden_diff": "diff --git a/src/gluonts/time_feature/_base.py b/src/gluonts/time_feature/_base.py\n--- a/src/gluonts/time_feature/_base.py\n+++ b/src/gluonts/time_feature/_base.py\n@@ -136,8 +136,8 @@\n \"\"\"\n \n features_by_offsets = {\n- offsets.YearOffset: [],\n- offsets.MonthOffset: [Month... |
gh_patches_debug_1597 | rasdani/github-patches | git_diff | holoviz__panel-956 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fileinput widget always returns `None` for name of uploaded file
As of panel 0.7.0 (with bokeh 1.4.0), the Fileinput widget does not set the name of the uploaded file.
E.g. in the following code
```python... | diff --git a/panel/widgets/input.py b/panel/widgets/input.py
--- a/panel/widgets/input.py
+++ b/panel/widgets/input.py
@@ -72,7 +72,7 @@
def _filter_properties(self, properties):
properties = super(FileInput, self)._filter_properties(properties)
- return properties + ['value', 'mime_type']
+ ... | {"golden_diff": "diff --git a/panel/widgets/input.py b/panel/widgets/input.py\n--- a/panel/widgets/input.py\n+++ b/panel/widgets/input.py\n@@ -72,7 +72,7 @@\n \n def _filter_properties(self, properties):\n properties = super(FileInput, self)._filter_properties(properties)\n- return properties + ['val... |
gh_patches_debug_1598 | rasdani/github-patches | git_diff | electricitymaps__electricitymaps-contrib-3796 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CA-PE production parser down
## Description
This is an automatic error report generated for Canada Prince Edward Island (CA-PE).
Issues:
- No recent data found for `production` parser
## Suggestions
- Try ... | diff --git a/parsers/CA_PE.py b/parsers/CA_PE.py
--- a/parsers/CA_PE.py
+++ b/parsers/CA_PE.py
@@ -24,7 +24,7 @@
def _get_pei_info(requests_obj):
- url = 'https://wdf.princeedwardisland.ca/workflow'
+ url = 'https://wdf.princeedwardisland.ca/api/workflow'
request = {'featureName': 'WindEnergy', 'queryNa... | {"golden_diff": "diff --git a/parsers/CA_PE.py b/parsers/CA_PE.py\n--- a/parsers/CA_PE.py\n+++ b/parsers/CA_PE.py\n@@ -24,7 +24,7 @@\n \n \n def _get_pei_info(requests_obj):\n- url = 'https://wdf.princeedwardisland.ca/workflow'\n+ url = 'https://wdf.princeedwardisland.ca/api/workflow'\n request = {'featureNam... |
gh_patches_debug_1599 | rasdani/github-patches | git_diff | openshift__openshift-ansible-8921 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
installation of Logging fails on "Gather OpenShift Logging Facts"
#### Description
On a developer setup, using Fedora 25 as the OS and executing `cd ${GOPATH}/src/github.com/openshift/origin/_output/local/... | diff --git a/roles/openshift_logging/library/openshift_logging_facts.py b/roles/openshift_logging/library/openshift_logging_facts.py
--- a/roles/openshift_logging/library/openshift_logging_facts.py
+++ b/roles/openshift_logging/library/openshift_logging_facts.py
@@ -76,6 +76,7 @@
try:
process = Po... | {"golden_diff": "diff --git a/roles/openshift_logging/library/openshift_logging_facts.py b/roles/openshift_logging/library/openshift_logging_facts.py\n--- a/roles/openshift_logging/library/openshift_logging_facts.py\n+++ b/roles/openshift_logging/library/openshift_logging_facts.py\n@@ -76,6 +76,7 @@\n try:\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.