diff
stringlengths
139
3.65k
message
stringlengths
8
627
diff_languages
stringclasses
1 value
diff --git a/spacy/lang/es/__init__.py b/spacy/lang/es/__init__.py index <HASH>..<HASH> 100644 --- a/spacy/lang/es/__init__.py +++ b/spacy/lang/es/__init__.py @@ -21,7 +21,7 @@ class SpanishDefaults(Language.Defaults): tokenizer_exceptions = update_exc(BASE_EXCEPTIONS, TOKENIZER_EXCEPTIONS) tag_map = TAG_MAP ...
Fix Spanish noun_chunks failure caused by typo
py
diff --git a/geomdl/Abstract.py b/geomdl/Abstract.py index <HASH>..<HASH> 100644 --- a/geomdl/Abstract.py +++ b/geomdl/Abstract.py @@ -1399,6 +1399,16 @@ class Multi(six.with_metaclass(abc.ABCMeta, object)): return self @property + def dimension(self): + """ Shape dimension. + + :getter...
Add dimension property to Abstract.Multi class
py
diff --git a/dbaas_zabbix/dbaas_api.py b/dbaas_zabbix/dbaas_api.py index <HASH>..<HASH> 100644 --- a/dbaas_zabbix/dbaas_api.py +++ b/dbaas_zabbix/dbaas_api.py @@ -68,7 +68,3 @@ class DatabaseAsAServiceApi(object): @property def engine_name(self): return self.databaseinfra.engine.engine_type.name - - ...
Remove database_project_name from api
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -6,13 +6,11 @@ from setuptools import setup _version_re = re.compile(r'__version__\s+=\s+(.*)') -with open('internetarchive/__init__.py', 'rb') as f: - version = str(literal_eval(_version_re.search( - f.read().d...
Don't read a text file as a bytes file Mypy got confused reading this code and I did too. We can simplify on Python 3. ``` setup.py:<I>: error: Item "None" of "Optional[Match[str]]" has no attribute "group" setup.py:<I>: error: "str" has no attribute "decode"; maybe "encode"? ```
py
diff --git a/format_elements/bfe_video_platform_suggestions.py b/format_elements/bfe_video_platform_suggestions.py index <HASH>..<HASH> 100644 --- a/format_elements/bfe_video_platform_suggestions.py +++ b/format_elements/bfe_video_platform_suggestions.py @@ -26,7 +26,7 @@ from invenio.config import CFG_SITE_URL fro...
intbitset: usage of separate package NOTE: beware, patch amended by Tibor to use new file names
py
diff --git a/salt/transport/ipc.py b/salt/transport/ipc.py index <HASH>..<HASH> 100644 --- a/salt/transport/ipc.py +++ b/salt/transport/ipc.py @@ -344,6 +344,16 @@ class IPCClient(object): if self.stream is not None and not self.stream.closed(): self.stream.close() + # Remove the entry fr...
For IPCClient, remove entry from instance map on close Remove the entry from the instance map so that a closed entry may not be reused. This forces this operation even if the reference count of the entry has not yet gone to zero.
py
diff --git a/done/done.py b/done/done.py index <HASH>..<HASH> 100755 --- a/done/done.py +++ b/done/done.py @@ -43,6 +43,7 @@ def handle_error(error, op): def maybe_init_db(): db_path = Config.db_path if not os.path.isfile(db_path): + os.makedirs(os.path.dirname(db_path)) db = sqlite3.connect(...
init db path. closes issue <I>
py
diff --git a/consul/base.py b/consul/base.py index <HASH>..<HASH> 100644 --- a/consul/base.py +++ b/consul/base.py @@ -175,6 +175,9 @@ class Consul(object): params['keys'] = True if separator: params['separator'] = separator + dc = dc or self.agent.dc + ...
added dc support for kv
py
diff --git a/airflow/models.py b/airflow/models.py index <HASH>..<HASH> 100644 --- a/airflow/models.py +++ b/airflow/models.py @@ -467,12 +467,14 @@ class TaskInstance(Base): TI.state == State.SUCCESS, ).first() if not previous_ti: + logging.info('depends_on_pas...
More precise logging around dependencies not being fulfilled
py
diff --git a/src/recipe/shelf.py b/src/recipe/shelf.py index <HASH>..<HASH> 100644 --- a/src/recipe/shelf.py +++ b/src/recipe/shelf.py @@ -86,20 +86,6 @@ def tokenize(s): def parse_field(fld, table, aggregated=True, default_aggregation='sum'): """ Parse a field object from yaml into a sqlalchemy expression """ ...
RECIPE-<I> Remove old string based aggregation
py
diff --git a/purplex/grammar.py b/purplex/grammar.py index <HASH>..<HASH> 100644 --- a/purplex/grammar.py +++ b/purplex/grammar.py @@ -10,7 +10,7 @@ class Production(object): def __init__(self, rule, func): items = rule.split(':', 1) self.lhs = items[0].strip() - self.rhs = items[1].strip(...
The RHS of epsilon rules can now be empty
py
diff --git a/saltcloud/cloud.py b/saltcloud/cloud.py index <HASH>..<HASH> 100644 --- a/saltcloud/cloud.py +++ b/saltcloud/cloud.py @@ -272,8 +272,6 @@ class Map(Cloud): for miniondict in self.map[tvm['profile']]: if isinstance(miniondict, dict): if name in miniondict: ...
left some pprints in there :)
py
diff --git a/profiling/__main__.py b/profiling/__main__.py index <HASH>..<HASH> 100644 --- a/profiling/__main__.py +++ b/profiling/__main__.py @@ -12,7 +12,6 @@ """ from __future__ import absolute_import -import __builtin__ from datetime import datetime from functools import partial, wraps import importlib @@ -3...
Import six.moves.builtins instead of __builtin__
py
diff --git a/salt/states/mysql_query.py b/salt/states/mysql_query.py index <HASH>..<HASH> 100644 --- a/salt/states/mysql_query.py +++ b/salt/states/mysql_query.py @@ -353,9 +353,17 @@ def run(name, ) ) else: - output_file.write( - ...
Accounting for certain situations when the query result is not a string, but actually a dictionary.
py
diff --git a/jax/lax/lax.py b/jax/lax/lax.py index <HASH>..<HASH> 100644 --- a/jax/lax/lax.py +++ b/jax/lax/lax.py @@ -2386,8 +2386,11 @@ def _pad_shape_rule(operand, padding_value, padding_config): return tuple(out_shape) def _pad_transpose(t, operand, padding_value, padding_config): - lo, hi, interior = zip(*p...
fix symbolic zero handling in _pad_transpose tested manually against example from @matthewdhoffman
py
diff --git a/src/socketServer.py b/src/socketServer.py index <HASH>..<HASH> 100644 --- a/src/socketServer.py +++ b/src/socketServer.py @@ -34,7 +34,7 @@ class SocketServer(Module): con, addr, self.n_conn) return True def _handle_connection(self,...
Use LoggerAdapter instead of separate logger for each connection
py
diff --git a/micawber/contrib/providers.py b/micawber/contrib/providers.py index <HASH>..<HASH> 100644 --- a/micawber/contrib/providers.py +++ b/micawber/contrib/providers.py @@ -31,7 +31,7 @@ class GoogleMapsProvider(Provider): pr = micawber.bootstrap_basic() pr.register(GoogleMapsProvider.regex, GoogleMapsP...
Support https google maps, refs #<I>
py
diff --git a/asyncpg/connection.py b/asyncpg/connection.py index <HASH>..<HASH> 100644 --- a/asyncpg/connection.py +++ b/asyncpg/connection.py @@ -2065,6 +2065,9 @@ async def connect(dsn=None, *, in the *dsn* argument now have consistent default values of files under ``~/.postgresql/`` as libpq. + ...
Document direct_tls support version
py
diff --git a/commands.py b/commands.py index <HASH>..<HASH> 100755 --- a/commands.py +++ b/commands.py @@ -386,7 +386,7 @@ def upload_dists( """Upload distributions in ./dist using ``twine``.""" if make: printer.header("Making and uploading distributions") - make_dist(quiet=quiet) + mak...
Pass version from upload_dists command to make_dist
py
diff --git a/scapy/contrib/automotive/scanner/enumerator.py b/scapy/contrib/automotive/scanner/enumerator.py index <HASH>..<HASH> 100644 --- a/scapy/contrib/automotive/scanner/enumerator.py +++ b/scapy/contrib/automotive/scanner/enumerator.py @@ -251,7 +251,8 @@ class ServiceEnumerator(AutomotiveTestCase): if ...
Fix division by zero bug in automotive scanners
py
diff --git a/Lib/glyphsLib/builder/axes.py b/Lib/glyphsLib/builder/axes.py index <HASH>..<HASH> 100644 --- a/Lib/glyphsLib/builder/axes.py +++ b/Lib/glyphsLib/builder/axes.py @@ -520,10 +520,18 @@ def get_regular_master(font): """ if not font.masters: return None - regular_name = font.customParame...
[builder.axes] add support for "Variable Font Origin" custom parameter also refactors master.name to master.id as the custom parameter value in the dictionary is an ID, not the name of the master
py
diff --git a/tests/integration/modules/file.py b/tests/integration/modules/file.py index <HASH>..<HASH> 100644 --- a/tests/integration/modules/file.py +++ b/tests/integration/modules/file.py @@ -293,6 +293,16 @@ class FileModuleTest(integration.ModuleCase): else: self.assertItemsEqual(ret, ['file:...
Added integration test for issue #<I>
py
diff --git a/imtools/qmisc.py b/imtools/qmisc.py index <HASH>..<HASH> 100644 --- a/imtools/qmisc.py +++ b/imtools/qmisc.py @@ -102,7 +102,7 @@ def combinecrinfo(crinfo1, crinfo2): return crinfo -def crinfo_from_specific_data(data, margin): +def crinfo_from_specific_data(data, margin=0): """ Create cr...
deleteLater on widtets and QApplication - working gui tests
py
diff --git a/devassistant/dapi/dapicli.py b/devassistant/dapi/dapicli.py index <HASH>..<HASH> 100644 --- a/devassistant/dapi/dapicli.py +++ b/devassistant/dapi/dapicli.py @@ -294,7 +294,16 @@ def install_dap_from_path(path, update=False): for f in glob.glob(_dapdir + '/*'): dst = os.path.join(_install_pat...
Walk the directories to copy Fixes #<I>
py
diff --git a/beekeeper/variables.py b/beekeeper/variables.py index <HASH>..<HASH> 100644 --- a/beekeeper/variables.py +++ b/beekeeper/variables.py @@ -133,7 +133,8 @@ class Variables(dict): output = set() for _, var in self.items(): for var_type in var.types(): - output.add...
Adding logic to ensure that we only return types that have a defined value available - basically, we don't want to send any blank variables
py
diff --git a/channelpack/datautils.py b/channelpack/datautils.py index <HASH>..<HASH> 100644 --- a/channelpack/datautils.py +++ b/channelpack/datautils.py @@ -82,9 +82,7 @@ def masked(a, b): if np.any([a.dtype.kind.startswith(c) for c in ['i', 'u', 'f', 'c']]): n = np.array([np.nan for i in range(len(a)...
remove debug prints I let the commented 'astype' remain as a reminder of what I decided not to do.
py
diff --git a/gffutils/feature.py b/gffutils/feature.py index <HASH>..<HASH> 100644 --- a/gffutils/feature.py +++ b/gffutils/feature.py @@ -1,7 +1,6 @@ import collections import simplejson import helpers -import helper_classes import constants import parser import bins
don't import helper_classes
py
diff --git a/pylama/lint/pylama_pyflakes.py b/pylama/lint/pylama_pyflakes.py index <HASH>..<HASH> 100644 --- a/pylama/lint/pylama_pyflakes.py +++ b/pylama/lint/pylama_pyflakes.py @@ -22,6 +22,13 @@ CODES = { m.ReturnOutsideFunction.message: "E0104", } +# RedefinedInListComp and ReturnWithArgsInsideGenerator wer...
Modify to keep backward compatibility
py
diff --git a/OMMBV/__init__.py b/OMMBV/__init__.py index <HASH>..<HASH> 100644 --- a/OMMBV/__init__.py +++ b/OMMBV/__init__.py @@ -5,9 +5,11 @@ __version__ = '0.5.5' on_rtd = os.environ.get('ONREADTHEDOCS') == 'True' -if not on_rtd: +try: from OMMBV import igrf -else: +except ImportError: + print("ERROR: i...
BUG: Improve robustness without compiled fortran
py
diff --git a/atlassian/utils.py b/atlassian/utils.py index <HASH>..<HASH> 100644 --- a/atlassian/utils.py +++ b/atlassian/utils.py @@ -330,7 +330,7 @@ def parse_cookie_file(cookie_file): cookies = {} with open(cookie_file, "r") as fp: for line in fp: - if not re.match(r"^#", line): + ...
Fix #<I> Ignore empty lines in cookie files (#<I>)
py
diff --git a/mapchete/mapchete.py b/mapchete/mapchete.py index <HASH>..<HASH> 100644 --- a/mapchete/mapchete.py +++ b/mapchete/mapchete.py @@ -276,9 +276,13 @@ class Mapchete(object): if messages[1] == "failed": logger.error(messages) raise IOError(messages) + ...
fix returning cropped metatile, if metatile had to be processed
py
diff --git a/airflow/www/views.py b/airflow/www/views.py index <HASH>..<HASH> 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -2187,6 +2187,13 @@ class KnownEventView(wwwutils.DataProfilingMixin, AirflowModelView): 'reported_by', ) column_default_sort = ("start_date", True) + colum...
[AIRFLOW-<I>] Fix known event column sorting Closes #<I> from skudriashev/airflow-<I>
py
diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py index <HASH>..<HASH> 100644 --- a/sos/plugins/postgresql.py +++ b/sos/plugins/postgresql.py @@ -57,4 +57,9 @@ class postgresql(Plugin, RedHatPlugin): def postproc(self): import shutil - shutil.rmtree(self.tmp_dir) + if self...
Fix exception in postgresql postproc method Do not assume that tmp_dir has been set and wrap tree deletion in a try block.
py
diff --git a/mwtab/mwschema.py b/mwtab/mwschema.py index <HASH>..<HASH> 100755 --- a/mwtab/mwschema.py +++ b/mwtab/mwschema.py @@ -9,7 +9,12 @@ This module provides schema definitions for different sections of the ``mwTab`` Metabolomics Workbench format. """ -from schema import Schema, Optional +import sys + +from ...
Fixed Python2/3 compatibility issues for MW Schema definitions.
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ except: setup( name = 'flask-whooshee', - version = '0.0.6', + version = '0.0.7', description = 'Flask - SQLAlchemy - Whoosh integration', long_description = 'Flask - SQLAlchemy - Whoosh in...
Bump to version <I>
py
diff --git a/pingdomlib/pingdom.py b/pingdomlib/pingdom.py index <HASH>..<HASH> 100644 --- a/pingdomlib/pingdom.py +++ b/pingdomlib/pingdom.py @@ -220,6 +220,11 @@ class Pingdom(object): check.getDetails() return check + def getResults(self, checkid): + """ Returns detailed results for a s...
Modified pingdomlib to include getResults.
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ def read(fname): setup( name='artifactory', - version='0.1.4', + version='0.1.5', py_modules=['artifactory'], license='MIT License', description='A Python to Artifactory interface',
Bump patch level to <I>
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ license: GNU-GPL2 from setuptools import setup setup(name='pyprofiler', - version='47', + version='48', description='Profiler utility for python, graphical and textual, whole program or segmen...
Joseph Jackson: Its all about the money. Thursday <I> June <I> (week:<I> day:<I>), <I>:<I>:<I>
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( description=("A generic MediaWiki OAuth handshake helper."), license="MIT", url="https://github.com/halfak/MediaWiki-OAuth", - py_modules=['mwoauth'], + packages=find_packages(), ...
Fixes a minor issue in setup.py build by using find_packages()
py
diff --git a/zipline/protocol.py b/zipline/protocol.py index <HASH>..<HASH> 100644 --- a/zipline/protocol.py +++ b/zipline/protocol.py @@ -165,6 +165,12 @@ class Account(object): def __repr__(self): return "Account({0})".format(self.__dict__) + def serialize(self): + return 'Account', self.__...
ENH: Add serialization to account
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except: Make sure pypandoc is installed. """ -version = '0.2.9' +version = '0.2.10' setup( name="funcserver", version=version,
fixes #<I>, bumped version
py
diff --git a/django_undeletable/models.py b/django_undeletable/models.py index <HASH>..<HASH> 100644 --- a/django_undeletable/models.py +++ b/django_undeletable/models.py @@ -3,6 +3,7 @@ from django.db import models from django.db.models.query import QuerySet from django.utils.datetime_safe import datetime + # bas...
rename get query set method to be compliant to Django <I>
py
diff --git a/apitools/gen/util.py b/apitools/gen/util.py index <HASH>..<HASH> 100644 --- a/apitools/gen/util.py +++ b/apitools/gen/util.py @@ -241,7 +241,7 @@ class SimplePrettyPrinter(object): line = line.encode('ascii', 'backslashreplace') print >>self.__out, '%s%s' % (self.__indent, line) else: - ...
Fix an unbound local error. (I swear I fixed this before.)
py
diff --git a/charmhelpers/contrib/openstack/amulet/utils.py b/charmhelpers/contrib/openstack/amulet/utils.py index <HASH>..<HASH> 100644 --- a/charmhelpers/contrib/openstack/amulet/utils.py +++ b/charmhelpers/contrib/openstack/amulet/utils.py @@ -544,7 +544,7 @@ class OpenStackAmuletUtils(AmuletUtils): return ...
Allow forcing keystone preferred-api-version (#<I>) The get_default_keystone_session function is useful for handling the fact that queens deployments may have preferred-api-version unset. However, it assumes v2 for < queens. This change allows the caller to force the preferred api version. This is useful for t...
py
diff --git a/ipyrad/assemble/jointestimate.py b/ipyrad/assemble/jointestimate.py index <HASH>..<HASH> 100644 --- a/ipyrad/assemble/jointestimate.py +++ b/ipyrad/assemble/jointestimate.py @@ -383,7 +383,9 @@ def stackarray(data, sample): [np.sum(arrayed == i, axis=0) for i in list("CATG")], ...
Fix a nasty error in jointestimate.stackarray() where some long reads were slipping in over the maxlen length and causing a broadcast error
py
diff --git a/pyvisa-py/usb.py b/pyvisa-py/usb.py index <HASH>..<HASH> 100644 --- a/pyvisa-py/usb.py +++ b/pyvisa-py/usb.py @@ -75,6 +75,25 @@ class USBSession(Session): return 'via PyUSB (%s). Backend: %s' % (ver, backend) + @property + def timeout(self): + value = self.interface.timeout + + ...
Pass timeout to USB-TMC code.
py
diff --git a/autolens/pipeline/phase/phase_imaging.py b/autolens/pipeline/phase/phase_imaging.py index <HASH>..<HASH> 100644 --- a/autolens/pipeline/phase/phase_imaging.py +++ b/autolens/pipeline/phase/phase_imaging.py @@ -97,6 +97,7 @@ class PhaseImaging(Phase): if self.inversion_pixel_limit is not None: ...
Inversion pixel limit is set to cluster pixel limit, to prevent GaussianPriors on pixels leading to incorrect kmeans.
py
diff --git a/hypermap/aggregator/tasks.py b/hypermap/aggregator/tasks.py index <HASH>..<HASH> 100644 --- a/hypermap/aggregator/tasks.py +++ b/hypermap/aggregator/tasks.py @@ -2,7 +2,7 @@ from __future__ import absolute_import from django.conf import settings -from celery import shared_task, chain +from celery impo...
For now getting rid of task chains as it is failing with a large number of tasks, for example when checking WM service
py
diff --git a/tests/test_nxviz.py b/tests/test_nxviz.py index <HASH>..<HASH> 100644 --- a/tests/test_nxviz.py +++ b/tests/test_nxviz.py @@ -47,12 +47,8 @@ def test_correct_negative_angle(angle): @given(lists(integers(), unique=True), lists(integers(), unique=True, min_size=2, max_size=2)) def test_initializati...
moved assume_small_graph back into initialization test
py
diff --git a/ros_buildfarm/templates/__init__.py b/ros_buildfarm/templates/__init__.py index <HASH>..<HASH> 100644 --- a/ros_buildfarm/templates/__init__.py +++ b/ros_buildfarm/templates/__init__.py @@ -156,14 +156,15 @@ def _expand_template(template_name, **kwargs): interpreter.invoke('afterInclude') -def cre...
Adding verbose argument to suppress print outs
py
diff --git a/python/dllib/test/dev/diff.py b/python/dllib/test/dev/diff.py index <HASH>..<HASH> 100755 --- a/python/dllib/test/dev/diff.py +++ b/python/dllib/test/dev/diff.py @@ -29,7 +29,9 @@ scala_to_python = {"Graph": "Model"} def extract_scala_class(class_path): exclude_key_words = set(["*", "abstract", "Co...
[New feature] Add attention layer and ffn layer (#<I>) * add attention layer * add ffn layer and more unit tests * refactor according to pr comments * add SerializationTest * fix unit tests * add python api
py
diff --git a/source/rafcon/gui/controllers/states_editor.py b/source/rafcon/gui/controllers/states_editor.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/controllers/states_editor.py +++ b/source/rafcon/gui/controllers/states_editor.py @@ -52,7 +52,7 @@ def create_button(toggle, font, font_size, icon_code, relea...
fix(states_editor): Remove height request of state editor tab button
py
diff --git a/lib/makewcs.py b/lib/makewcs.py index <HASH>..<HASH> 100644 --- a/lib/makewcs.py +++ b/lib/makewcs.py @@ -172,7 +172,13 @@ quiet=quiet,instrument=_instrument,prepend=_prepend, nrchip=Nrefchip, nrext = Nr if not quiet: print 'Restoring original WCS values for',_img ...
A problem with the logic for setting TDDCORR to COMPLETE was corrected in 'makewcs'. WJH git-svn-id: <URL>
py
diff --git a/windpowerlib/tests/modelchain_tests.py b/windpowerlib/tests/modelchain_tests.py index <HASH>..<HASH> 100644 --- a/windpowerlib/tests/modelchain_tests.py +++ b/windpowerlib/tests/modelchain_tests.py @@ -121,7 +121,7 @@ class TestModelChain: # Ideal gas equation and density corrected power coeffic...
Delete unexpected spaces (PEP8)
py
diff --git a/msaf_io.py b/msaf_io.py index <HASH>..<HASH> 100644 --- a/msaf_io.py +++ b/msaf_io.py @@ -172,12 +172,11 @@ def save_boundaries(out_file, times, annot_beats, alg_name, **params): if est["annot_beats"] == annot_beats: found = True for k...
Fixed writing estimations bug. Pretty good results with Foote algorithm Former-commit-id: <I>ce9c<I>b7ce<I>d<I>a<I>bb<I>a<I>e7 Former-commit-id: fb3a<I>b1a6a<I>e<I>a5bcc<I>e0f<I>c2b<I>c<I>
py
diff --git a/test.py b/test.py index <HASH>..<HASH> 100644 --- a/test.py +++ b/test.py @@ -2,7 +2,7 @@ import logging; logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) -from luminoso_api import Account +from luminoso_api import Account, Database from luminoso_api.utils import get_sessio...
Implementing a relevance() test in test.py
py
diff --git a/mockito/mocking.py b/mockito/mocking.py index <HASH>..<HASH> 100644 --- a/mockito/mocking.py +++ b/mockito/mocking.py @@ -176,19 +176,10 @@ class Mock(object): def restore_method(self, method_name, original_method): # If original_method is None, we *added* it to mocked_obj, so we # m...
Simplify `restore_method` Drastically reducing the conditionals does *not* break any test. Probably introducing the better `was_in_spec` test in `get_original_method` is enough and can be used here safely. Comparing this to Python's `mock` library from the standard lib suggest this to be true as well.
py
diff --git a/proxalgs.py b/proxalgs.py index <HASH>..<HASH> 100644 --- a/proxalgs.py +++ b/proxalgs.py @@ -228,7 +228,7 @@ class Optimizer(object): self.theta = mu[-1].reshape(orig_shape) return self.theta - def hyperopt(self, regularizers, validation_loss, theta_init, num_runs): + def hyperop...
added option for number of runs in hyperopt()
py
diff --git a/cobe/brain.py b/cobe/brain.py index <HASH>..<HASH> 100644 --- a/cobe/brain.py +++ b/cobe/brain.py @@ -199,6 +199,12 @@ class Brain: if len(output_tokens) == 0: return 0. + # If input_tokens is empty (i.e. we didn't know any words in + # the input), use output == input ...
Make _evaluate_reply effective when we don't know any input words
py
diff --git a/GPy/testing/model_tests.py b/GPy/testing/model_tests.py index <HASH>..<HASH> 100644 --- a/GPy/testing/model_tests.py +++ b/GPy/testing/model_tests.py @@ -126,6 +126,23 @@ class MiscTests(unittest.TestCase): m2.kern[:] = m.kern[''].values() np.testing.assert_equal(m.log_likelihood(), m2.lo...
[tests] added some unfix fix print and gradcheck tests, it basically just behaves as a user would do with a model
py
diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py index <HASH>..<HASH> 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py @@ -1597,6 +1597,10 @@ def mod_repo(repo, saltenv='base', **kwargs): elif 'key_url' in kwargs: key_url = kwargs['key_url'] fn_ = __salt__['cp.cache_fi...
aptpkg.mod_repo: Raise when key_url doesn't exist _cmd_quote would raise with unexplicit error if _fn = False
py
diff --git a/lib/svtplay_dl/service/viaplay.py b/lib/svtplay_dl/service/viaplay.py index <HASH>..<HASH> 100644 --- a/lib/svtplay_dl/service/viaplay.py +++ b/lib/svtplay_dl/service/viaplay.py @@ -69,7 +69,8 @@ class Viaplay(Service, OpenGraphThumbMixin): if live == "true": options.live = Tr...
viaplay: check if subtitle is None before yield it. this fixes #<I>
py
diff --git a/pgmpy/models/BayesianModel.py b/pgmpy/models/BayesianModel.py index <HASH>..<HASH> 100644 --- a/pgmpy/models/BayesianModel.py +++ b/pgmpy/models/BayesianModel.py @@ -177,6 +177,10 @@ class BayesianModel(DirectedGraph): The node whose CPD we want. If node not specified returns all the ...
updated some docstrings in BayesinaModel
py
diff --git a/storage/tests/system.py b/storage/tests/system.py index <HASH>..<HASH> 100644 --- a/storage/tests/system.py +++ b/storage/tests/system.py @@ -83,10 +83,9 @@ class TestStorageBuckets(unittest.TestCase): self.case_buckets_to_delete = [] def tearDown(self): - with Config.CLIENT.batch():...
Remove use of batch when cleaning up buckets. (#<I>) Allows <I> errors to be handled by retry. See: <URL>
py
diff --git a/staticjinja/staticjinja.py b/staticjinja/staticjinja.py index <HASH>..<HASH> 100755 --- a/staticjinja/staticjinja.py +++ b/staticjinja/staticjinja.py @@ -54,7 +54,7 @@ class Renderer(object): @property def template_names(self): - return self._env.list_templates(filter_func=self.filter_fu...
Remove filter_func There is no reason to include `filter_func` anymore, since its role is to filter for templates and the Renderer already has a method, `is_template` to do so.
py
diff --git a/python/unitytrainers/trainer_controller.py b/python/unitytrainers/trainer_controller.py index <HASH>..<HASH> 100644 --- a/python/unitytrainers/trainer_controller.py +++ b/python/unitytrainers/trainer_controller.py @@ -5,6 +5,7 @@ import logging import os import yaml +import re import numpy as np imp...
Adding back import that was accidentally removed.
py
diff --git a/alerta/app/auth.py b/alerta/app/auth.py index <HASH>..<HASH> 100644 --- a/alerta/app/auth.py +++ b/alerta/app/auth.py @@ -87,8 +87,8 @@ def auth_required(f): @wraps(f) def decorated(*args, **kwargs): - if 'api-key' in request.args: - key = request.args['api-key'] + key ...
Only assign api-key if param has a value
py
diff --git a/angr/analyses/decompiler/structurer.py b/angr/analyses/decompiler/structurer.py index <HASH>..<HASH> 100644 --- a/angr/analyses/decompiler/structurer.py +++ b/angr/analyses/decompiler/structurer.py @@ -1024,7 +1024,7 @@ class Structurer(Analysis): for idx, _, _ in node_0_kids + node_1_kids: ...
Fixed address for new ITE ConditionNodes (#<I>)
py
diff --git a/neo4j/v1/connection.py b/neo4j/v1/connection.py index <HASH>..<HASH> 100644 --- a/neo4j/v1/connection.py +++ b/neo4j/v1/connection.py @@ -215,7 +215,7 @@ class Connection(object): # Determine auth details try: self.auth_dict = vars(config["auth"]) - except KeyError: + ...
fix for un-authed servers
py
diff --git a/spyderlib/spyder.py b/spyderlib/spyder.py index <HASH>..<HASH> 100644 --- a/spyderlib/spyder.py +++ b/spyderlib/spyder.py @@ -1706,13 +1706,15 @@ Please provide any additional information below. def execute_python_code_in_external_console(self, lines): """Execute lines in external...
Execute selection or block in current interpreter: now forcing the console plugin widget to show up if it's hidden ("raise" the console widget before executing code)
py
diff --git a/isort/parse.py b/isort/parse.py index <HASH>..<HASH> 100644 --- a/isort/parse.py +++ b/isort/parse.py @@ -478,6 +478,7 @@ def identify_contiguous_imports( in_quote: str = "" first_comment_index_start: int = -1 first_comment_index_end: int = -1 + contains_imports: bool = False for ind...
Only sort on sections that contain imports
py
diff --git a/furious/context/context.py b/furious/context/context.py index <HASH>..<HASH> 100644 --- a/furious/context/context.py +++ b/furious/context/context.py @@ -55,11 +55,12 @@ class Context(object): NOTE: Use the module's new function to get a context, do not manually instantiate. """ - def __i...
Convert Context to take options kwargs. To facilitate future extensions, switch from named insert_tasks injection parameter to fetching it from options. This will keep the API cleaner as additional injection points are added.
py
diff --git a/mdx_attr_cols.py b/mdx_attr_cols.py index <HASH>..<HASH> 100644 --- a/mdx_attr_cols.py +++ b/mdx_attr_cols.py @@ -37,6 +37,7 @@ class AttrColTreeProcessor(Treeprocessor): row, row_cols = None, 0 continue cols = int(child.attrib[self.attr]) + del...
Remove cols attribute from final HTML.
py
diff --git a/qa_tests/hazard/event_based/spatial_correlation/_utils.py b/qa_tests/hazard/event_based/spatial_correlation/_utils.py index <HASH>..<HASH> 100644 --- a/qa_tests/hazard/event_based/spatial_correlation/_utils.py +++ b/qa_tests/hazard/event_based/spatial_correlation/_utils.py @@ -62,5 +62,5 @@ def get_gmvs_fo...
Tried with a cast to GEOMETRY Former-commit-id: <I>c<I>fdf<I>c7af2d<I>d<I>f
py
diff --git a/ereuse_utils/usb_flash_drive.py b/ereuse_utils/usb_flash_drive.py index <HASH>..<HASH> 100644 --- a/ereuse_utils/usb_flash_drive.py +++ b/ereuse_utils/usb_flash_drive.py @@ -1,8 +1,9 @@ import usb.core import usb.util -from ereuse_utils.naming import Naming from usb import CLASS_MASS_STORAGE +from ere...
Fix dying when device has no interface; better handling non-permission
py
diff --git a/exa/core/editor.py b/exa/core/editor.py index <HASH>..<HASH> 100644 --- a/exa/core/editor.py +++ b/exa/core/editor.py @@ -324,7 +324,7 @@ class Editor(object): def to_stream(self): """Create an StringIO object from the current editor text.""" - return six.StringIO(six.u(self)) + ...
Finish migrating to six.StringIO
py
diff --git a/urbansim/developer/sqftproforma.py b/urbansim/developer/sqftproforma.py index <HASH>..<HASH> 100644 --- a/urbansim/developer/sqftproforma.py +++ b/urbansim/developer/sqftproforma.py @@ -377,10 +377,10 @@ class SqFtProForma(object): c.parking_sqft_d[parking_config]) ...
change cap of stories for surface parking from 3 to 5 I think the test was more right than my code, although there's some room for debate here
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -53,7 +53,7 @@ extras_require = { 'invenio-admin>=1.0.0a3', ], 'docs': [ - 'Sphinx>=1.4.2', + 'Sphinx>=1.5.1', ], 'github': [ 'github3.py>=1.0.0a4',
installation: sphinx version fix
py
diff --git a/scapy/contrib/mpls.py b/scapy/contrib/mpls.py index <HASH>..<HASH> 100644 --- a/scapy/contrib/mpls.py +++ b/scapy/contrib/mpls.py @@ -18,6 +18,8 @@ class MPLS(Packet): def guess_payload_class(self, payload): if len(payload) >= 1: + if not self.s: + return MPLS ...
MPLS - improve payload guess
py
diff --git a/missingno/missingno.py b/missingno/missingno.py index <HASH>..<HASH> 100644 --- a/missingno/missingno.py +++ b/missingno/missingno.py @@ -221,7 +221,8 @@ def matrix(df, for value in ts_array: ts_list.append(df.index.get_loc(value)) except KeyError: - return...
Fixed incorrect syntax on line <I> which interrupted import
py
diff --git a/src/chisel/__init__.py b/src/chisel/__init__.py index <HASH>..<HASH> 100644 --- a/src/chisel/__init__.py +++ b/src/chisel/__init__.py @@ -6,7 +6,7 @@ Chisel is a light-weight Python WSGI application framework with tools for buildi well-tested, schema-validated JSON web APIs. """ -__version__ = '1.0.4' ...
chisel <I>
py
diff --git a/pydocmd/__main__.py b/pydocmd/__main__.py index <HASH>..<HASH> 100644 --- a/pydocmd/__main__.py +++ b/pydocmd/__main__.py @@ -64,6 +64,8 @@ def write_mkdocs_config(inconf): config['docs_dir'] = inconf['gens_dir'] config['site_dir'] = inconf['site_dir'] config['theme'] = inconf['theme'] + if 'mark...
support markdown_extensions: config key and fix copying files in subfolders from docs_dir into gens_dir
py
diff --git a/py/_io/capture.py b/py/_io/capture.py index <HASH>..<HASH> 100644 --- a/py/_io/capture.py +++ b/py/_io/capture.py @@ -58,6 +58,7 @@ class FDCapture: if self.targetfd == 0 and not self.tmpfile: fd = os.open(devnullpath, os.O_RDONLY) os.dup2(fd, 0) + os.close(fd)...
a crucial close() to prevent too-many-open-files --HG-- branch : trunk
py
diff --git a/pysat/tests/test_utils_io.py b/pysat/tests/test_utils_io.py index <HASH>..<HASH> 100644 --- a/pysat/tests/test_utils_io.py +++ b/pysat/tests/test_utils_io.py @@ -96,7 +96,6 @@ class TestLoadNetCDF(object): # Test the standard data structures assert np.all(self.testInst[dke...
STY: removed extra line Removed an extra line from the file.
py
diff --git a/kubespawner/objects.py b/kubespawner/objects.py index <HASH>..<HASH> 100644 --- a/kubespawner/objects.py +++ b/kubespawner/objects.py @@ -11,7 +11,7 @@ from kubernetes.client.models import \ V1ObjectMeta, \ V1LocalObjectReference, \ V1Volume, V1VolumeMount, \ - V1Container, V1ContainerPor...
Add missing import Lost in a rebase!
py
diff --git a/backtrader/strategy.py b/backtrader/strategy.py index <HASH>..<HASH> 100644 --- a/backtrader/strategy.py +++ b/backtrader/strategy.py @@ -71,7 +71,14 @@ class Strategy(six.with_metaclass(MetaStrategy, StrategyBase)): self.advance() self._notify() - self.next() + + l = len(...
strategy _oncepost correction for at once execution - minperiod was not being taken into account and next was being called from the first bar
py
diff --git a/cms_shiny/models.py b/cms_shiny/models.py index <HASH>..<HASH> 100644 --- a/cms_shiny/models.py +++ b/cms_shiny/models.py @@ -16,6 +16,7 @@ class ShinyApp(models.Model): name = models.CharField( help_text='Enter a brief, yet descriptive name for the Shiny app.', max_length=64, + ...
Require that ShinyApp name and slug are unique
py
diff --git a/manticore/platforms/linux.py b/manticore/platforms/linux.py index <HASH>..<HASH> 100644 --- a/manticore/platforms/linux.py +++ b/manticore/platforms/linux.py @@ -1450,7 +1450,7 @@ class Linux(Platform): f = self._sys_open_get_file(filename, flags) logger.debug(f"Opening file {file...
Add missing `f`-string (#<I>)
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,11 @@ data that lives inside of RabbitMQ, and manipulate the resources there.""", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Pyt...
Added more Python language version trove classifiers to setup.py
py
diff --git a/aioblescan/__main__.py b/aioblescan/__main__.py index <HASH>..<HASH> 100644 --- a/aioblescan/__main__.py +++ b/aioblescan/__main__.py @@ -96,16 +96,10 @@ def my_process(data): else: ev.show(0) -try: - mydev=int(sys.argv[1]) -except: - mydev=0 - - event_loop = asyncio.get_event_loop()...
BUGFIX: -D|--device option was not working
py
diff --git a/cobra/topology/__init__.py b/cobra/topology/__init__.py index <HASH>..<HASH> 100644 --- a/cobra/topology/__init__.py +++ b/cobra/topology/__init__.py @@ -5,5 +5,5 @@ if __name == 'java': warn("%s is not yet supported on jython"%__modules[__name__]) else: - from reporter_metabolites import * + ...
Fix import issue in cobra.topology
py
diff --git a/tests/test_toolbox_file_tools.py b/tests/test_toolbox_file_tools.py index <HASH>..<HASH> 100644 --- a/tests/test_toolbox_file_tools.py +++ b/tests/test_toolbox_file_tools.py @@ -46,7 +46,7 @@ class TestToolboxFileTools(unittest.TestCase): file_tools.delete_file('test_results' + os.sep + test_file,...
test for file in subfolder fix using full pathname
py
diff --git a/pushbullet_cli/app.py b/pushbullet_cli/app.py index <HASH>..<HASH> 100755 --- a/pushbullet_cli/app.py +++ b/pushbullet_cli/app.py @@ -1,16 +1,26 @@ #!/usr/bin/env python import argparse +import os import os.path import requests import re import sys +from contextlib import contextmanager PUSH_URL...
Key file should be created with private permissions
py
diff --git a/SpiffWorkflow/dmn/specs/BuisnessRuleTask.py b/SpiffWorkflow/dmn/specs/BuisnessRuleTask.py index <HASH>..<HASH> 100644 --- a/SpiffWorkflow/dmn/specs/BuisnessRuleTask.py +++ b/SpiffWorkflow/dmn/specs/BuisnessRuleTask.py @@ -20,7 +20,8 @@ class BusinessRuleTask(Simple, BpmnSpecMixin): def _on_complete_...
In some cases a set of rules in a DMN will not produce a value. This should not result in an error
py
diff --git a/tests/test_streams.py b/tests/test_streams.py index <HASH>..<HASH> 100644 --- a/tests/test_streams.py +++ b/tests/test_streams.py @@ -87,7 +87,7 @@ def test_streamer_infinite(): def test_streamer_bad_function(): def __fail(): - return 5 + return 6 pescador.Streamer(__fail)
pointless update of tests to trigger a build
py
diff --git a/localshop/apps/packages/pypi.py b/localshop/apps/packages/pypi.py index <HASH>..<HASH> 100644 --- a/localshop/apps/packages/pypi.py +++ b/localshop/apps/packages/pypi.py @@ -67,4 +67,5 @@ def get_package_data(name, package=None): release_file.save() package.update_timestamp = datetime.d...
Actually save updated timestamps for packages
py
diff --git a/keylib/private_key.py b/keylib/private_key.py index <HASH>..<HASH> 100644 --- a/keylib/private_key.py +++ b/keylib/private_key.py @@ -69,7 +69,7 @@ class ECPrivateKey(): def to_wif(self): if self._compressed: return encode_privkey( - self._ecdsa_private_key.to_stri...
don't forget vbyte when encoding as wif-compressed
py
diff --git a/salt/modules/virt.py b/salt/modules/virt.py index <HASH>..<HASH> 100644 --- a/salt/modules/virt.py +++ b/salt/modules/virt.py @@ -20,9 +20,9 @@ import logging import yaml import jinja2 import jinja2.exceptions +from xml.dom import minidom try: import libvirt - from xml.dom import minidom H...
Move minidom import out of try block
py
diff --git a/libexec/sendmailservice.py b/libexec/sendmailservice.py index <HASH>..<HASH> 100755 --- a/libexec/sendmailservice.py +++ b/libexec/sendmailservice.py @@ -73,7 +73,13 @@ msg['To'] = args.to # # According to RFC 2046, the last part of a multipart message, in this # case the HTML message, is best and prefe...
Add comments about work still to do (encoding, escaping).
py
diff --git a/pycm/pycm_obj.py b/pycm/pycm_obj.py index <HASH>..<HASH> 100644 --- a/pycm/pycm_obj.py +++ b/pycm/pycm_obj.py @@ -182,8 +182,8 @@ class ConfusionMatrix(): self.IS = statistic_result["IS"] self.CEN = statistic_result["CEN"] self.MCEN = statistic_result["MCEN"] + self.AUC = ...
fix : minor edit in AUC in object #<I>
py