Unnamed: 0
int64
0
2.44k
repo
stringlengths
32
81
hash
stringlengths
40
40
diff
stringlengths
113
1.17k
old_path
stringlengths
5
84
rewrite
stringlengths
34
79
initial_state
stringlengths
75
980
final_state
stringlengths
76
980
2,400
https://:@github.com/benemery/filewatch.git
3fbf9780eb51d3efe869bfbeb85e7e6bb25f152e
@@ -58,4 +58,4 @@ class Watcher(object): def _get_key(self, full_path): """Build a checksum used to identify this filepath""" full_path_checksum = hashlib.sha1(full_path).digest() - return full_path + return full_path_checksum
filewatch/watcher.py
ReplaceText(target='full_path_checksum' @(61,15)->(61,24))
class Watcher(object): def _get_key(self, full_path): """Build a checksum used to identify this filepath""" full_path_checksum = hashlib.sha1(full_path).digest() return full_path
class Watcher(object): def _get_key(self, full_path): """Build a checksum used to identify this filepath""" full_path_checksum = hashlib.sha1(full_path).digest() return full_path_checksum
2,401
https://:@github.com/akrzos/collectd-swift-stat.git
59c358b8b3b5c90fe62fa2157ece5fc2be480535
@@ -47,7 +47,7 @@ def read(data=None): metric.plugin = 'swift_stat' metric.interval = INTERVAL metric.type = 'gauge' - metric.type_instance = m_instance + metric.type_instance = name metric.values = [stats[m_instance]] metric.dispatch() else:
collectd_swift_stat/__init__.py
ReplaceText(target='name' @(50,35)->(50,45))
def read(data=None): metric.plugin = 'swift_stat' metric.interval = INTERVAL metric.type = 'gauge' metric.type_instance = m_instance metric.values = [stats[m_instance]] metric.dispatch() else:
def read(data=None): metric.plugin = 'swift_stat' metric.interval = INTERVAL metric.type = 'gauge' metric.type_instance = name metric.values = [stats[m_instance]] metric.dispatch() else:
2,402
https://:@github.com/luidale/starpa.git
5abc255ec0b0e4a08b2df4ce43687bd8725c840f
@@ -260,7 +260,7 @@ class identify(): #index bam samtools_index_command = ( settings["samtools_call"], "index", - length_split_bam + strand_split_bam ) os.system(" ".join(samtools_index_command))
src/starpa/identify.py
ReplaceText(target='strand_split_bam' @(263,16)->(263,32))
class identify(): #index bam samtools_index_command = ( settings["samtools_call"], "index", length_split_bam ) os.system(" ".join(samtools_index_command))
class identify(): #index bam samtools_index_command = ( settings["samtools_call"], "index", strand_split_bam ) os.system(" ".join(samtools_index_command))
2,403
https://:@github.com/luidale/starpa.git
1b6ffa79af68393e10d9bfb610f5a8e4427d4247
@@ -693,7 +693,7 @@ class identify(): input_bam # input_bam, "2>", featurecounts_info ) - with open(output_SAF) as f_out: + with open(input_SAF) as f_out: for line in f_out: print(line)
src/starpa/identify.py
ReplaceText(target='input_SAF' @(696,18)->(696,28))
class identify(): input_bam # input_bam, "2>", featurecounts_info ) with open(output_SAF) as f_out: for line in f_out: print(line)
class identify(): input_bam # input_bam, "2>", featurecounts_info ) with open(input_SAF) as f_out: for line in f_out: print(line)
2,404
https://:@github.com/luidale/starpa.git
9d0b06a03151b6790c58e244b1dc9b420b1e5480
@@ -850,7 +850,7 @@ class quantify(): for j,pos in enumerate(genomic_seq): if pos == "*": genomic_seq_conv.append("*") - elif pos == consensus_seq[i]: + elif pos == consensus_seq[j]: genomic_seq_conv.append(".") else: genomic_seq_conv.append(pos)
src/starpa/quantify.py
ReplaceText(target='j' @(853,42)->(853,43))
class quantify(): for j,pos in enumerate(genomic_seq): if pos == "*": genomic_seq_conv.append("*") elif pos == consensus_seq[i]: genomic_seq_conv.append(".") else: genomic_seq_conv.append(pos)
class quantify(): for j,pos in enumerate(genomic_seq): if pos == "*": genomic_seq_conv.append("*") elif pos == consensus_seq[j]: genomic_seq_conv.append(".") else: genomic_seq_conv.append(pos)
2,405
https://:@github.com/chris17453/python-vipaccess.git
91818b4487f75b3de8758e5634b9f1661cab720e
@@ -120,7 +120,7 @@ def main(): help="Specify the token secret on the command line (base32 encoded)") m.add_argument('-f', '--dotfile', type=PathType(exists=True), default=os.path.expanduser('~/.vipaccess'), help="File in which the credential is stored (default ~/.vipaccess") - m.add_argument('-v', '--verbose', action='store_true') + pshow.add_argument('-v', '--verbose', action='store_true') pshow.set_defaults(func=show) p.set_default_subparser('show')
vipaccess/cli.py
ReplaceText(target='pshow' @(123,4)->(123,5))
def main(): help="Specify the token secret on the command line (base32 encoded)") m.add_argument('-f', '--dotfile', type=PathType(exists=True), default=os.path.expanduser('~/.vipaccess'), help="File in which the credential is stored (default ~/.vipaccess") m.add_argument('-v', '--verbose', action='store_true') pshow.set_defaults(func=show) p.set_default_subparser('show')
def main(): help="Specify the token secret on the command line (base32 encoded)") m.add_argument('-f', '--dotfile', type=PathType(exists=True), default=os.path.expanduser('~/.vipaccess'), help="File in which the credential is stored (default ~/.vipaccess") pshow.add_argument('-v', '--verbose', action='store_true') pshow.set_defaults(func=show) p.set_default_subparser('show')
2,406
https://:@github.com/thrau/pymq.git
3b7c4e61b1e5a9387085ac91448070df0a8b6f73
@@ -233,7 +233,7 @@ class AbstractEventBus(EventBus, abc.ABC): callbacks = self._subscribers.get((channel, pattern)) - if callback: + if callbacks: callbacks.remove(callback) if len(callbacks) == 0: del self._subscribers[(channel, pattern)]
pymq/provider/base.py
ReplaceText(target='callbacks' @(236,11)->(236,19))
class AbstractEventBus(EventBus, abc.ABC): callbacks = self._subscribers.get((channel, pattern)) if callback: callbacks.remove(callback) if len(callbacks) == 0: del self._subscribers[(channel, pattern)]
class AbstractEventBus(EventBus, abc.ABC): callbacks = self._subscribers.get((channel, pattern)) if callbacks: callbacks.remove(callback) if len(callbacks) == 0: del self._subscribers[(channel, pattern)]
2,407
https://:@github.com/DFE/MONK.git
3b791f19cdc3176fa917ec66fec8d31d1fc05141
@@ -89,7 +89,7 @@ class Device(object): "awk '{print $1}'",])) ips = out.split("\n") if out and not out.startswith("127.0.0.1"): - self._logger.debug("found IP addresses:" + str(out)) + self._logger.debug("found IP addresses:" + str(ips)) return out.split('\n') else: raise NoIPException("couldn't receive any IP address:'{}'".format(
monk_tf/dev.py
ReplaceText(target='ips' @(92,59)->(92,62))
class Device(object): "awk '{print $1}'",])) ips = out.split("\n") if out and not out.startswith("127.0.0.1"): self._logger.debug("found IP addresses:" + str(out)) return out.split('\n') else: raise NoIPException("couldn't receive any IP address:'{}'".format(
class Device(object): "awk '{print $1}'",])) ips = out.split("\n") if out and not out.startswith("127.0.0.1"): self._logger.debug("found IP addresses:" + str(ips)) return out.split('\n') else: raise NoIPException("couldn't receive any IP address:'{}'".format(
2,408
https://:@github.com/mush42/oy-cms.git
9ca054ae384ec1ab1efee4aead448b647662176f
@@ -79,7 +79,7 @@ class Page(StarlitModule): return rv def set_page_and_response_if_appropriate(self): - if isinstance(request.routing_exception, NotFound) and current_page: + if not isinstance(request.routing_exception, NotFound) and current_page: return self.page_view() def _add_contenttype_handler(
starlit/contrib/page/__init__.py
ReplaceText(target='not ' @(82,11)->(82,11))
class Page(StarlitModule): return rv def set_page_and_response_if_appropriate(self): if isinstance(request.routing_exception, NotFound) and current_page: return self.page_view() def _add_contenttype_handler(
class Page(StarlitModule): return rv def set_page_and_response_if_appropriate(self): if not isinstance(request.routing_exception, NotFound) and current_page: return self.page_view() def _add_contenttype_handler(
2,409
https://:@github.com/Brian-Williams/robotframework-testlink.git
1a86edf13d65fc36c268b4f600f937303ccd778b
@@ -29,7 +29,7 @@ class RobotTestLinkHelper(TestLinkHelper): def _get_missing_params_from_robot_variables(self, param_dict): for testlink_param, robot_variable in robot_report_params.items(): - setdefault_if_not_none(param_dict, testlink_param, self._get_param_from_robot(testlink_param)) + setdefault_if_not_none(param_dict, testlink_param, self._get_param_from_robot(robot_variable)) def _setParamsFromRobot(self): """
robottestlink/robottestlinkhelper.py
ReplaceText(target='robot_variable' @(32,90)->(32,104))
class RobotTestLinkHelper(TestLinkHelper): def _get_missing_params_from_robot_variables(self, param_dict): for testlink_param, robot_variable in robot_report_params.items(): setdefault_if_not_none(param_dict, testlink_param, self._get_param_from_robot(testlink_param)) def _setParamsFromRobot(self): """
class RobotTestLinkHelper(TestLinkHelper): def _get_missing_params_from_robot_variables(self, param_dict): for testlink_param, robot_variable in robot_report_params.items(): setdefault_if_not_none(param_dict, testlink_param, self._get_param_from_robot(robot_variable)) def _setParamsFromRobot(self): """
2,410
https://:@github.com/FRESNA/atlite.git
923bbb453e31e43220f786e48a89266f976d787b
@@ -160,7 +160,7 @@ def compute_indicatormatrix(orig, dest, orig_proj='latlong', dest_proj='latlong' def maybe_swap_spatial_dims(ds, namex='x', namey='y'): swaps = {} lx, rx = ds.indexes[namex][[0, -1]] - uy, ly = ds.indexes[namex][[0, -1]] + uy, ly = ds.indexes[namey][[0, -1]] if lx > rx: swaps[namex] = slice(None, None, -1)
atlite/gis.py
ReplaceText(target='namey' @(163,24)->(163,29))
def compute_indicatormatrix(orig, dest, orig_proj='latlong', dest_proj='latlong' def maybe_swap_spatial_dims(ds, namex='x', namey='y'): swaps = {} lx, rx = ds.indexes[namex][[0, -1]] uy, ly = ds.indexes[namex][[0, -1]] if lx > rx: swaps[namex] = slice(None, None, -1)
def compute_indicatormatrix(orig, dest, orig_proj='latlong', dest_proj='latlong' def maybe_swap_spatial_dims(ds, namex='x', namey='y'): swaps = {} lx, rx = ds.indexes[namex][[0, -1]] uy, ly = ds.indexes[namey][[0, -1]] if lx > rx: swaps[namex] = slice(None, None, -1)
2,411
https://:@github.com/bpeschier/django-compressor-requirejs.git
cdd6170db7941d8cdc584a832098a2964a4ba2ff
@@ -96,7 +96,7 @@ class RequireJSCompiler(FilterBase): output = compressor.filter_output(filtered) path = compressor.get_filepath(output, basename=basename) # Write it - compressor.storage.save(path, ContentFile(content.encode(compressor.charset))) + compressor.storage.save(path, ContentFile(output.encode(compressor.charset))) return mark_safe(compressor.storage.url(path)) #
requirejs/filter.py
ReplaceText(target='output' @(99,50)->(99,57))
class RequireJSCompiler(FilterBase): output = compressor.filter_output(filtered) path = compressor.get_filepath(output, basename=basename) # Write it compressor.storage.save(path, ContentFile(content.encode(compressor.charset))) return mark_safe(compressor.storage.url(path)) #
class RequireJSCompiler(FilterBase): output = compressor.filter_output(filtered) path = compressor.get_filepath(output, basename=basename) # Write it compressor.storage.save(path, ContentFile(output.encode(compressor.charset))) return mark_safe(compressor.storage.url(path)) #
2,412
https://:@github.com/kemerelab/jagular.git
a192f4fe9b90d49acd6d67d51ae6e08e71fae165
@@ -385,7 +385,7 @@ class JagularFileMap(object): timestamps = timestamps + timestamps_ # list concatenation channel_data = np.hstack((channel_data, channel_data_)) if timestamps: - yield timestamps, channel_data_ + yield timestamps, channel_data else: ii+=1 except IndexError:
jagular/io.py
ReplaceText(target='channel_data' @(388,42)->(388,55))
class JagularFileMap(object): timestamps = timestamps + timestamps_ # list concatenation channel_data = np.hstack((channel_data, channel_data_)) if timestamps: yield timestamps, channel_data_ else: ii+=1 except IndexError:
class JagularFileMap(object): timestamps = timestamps + timestamps_ # list concatenation channel_data = np.hstack((channel_data, channel_data_)) if timestamps: yield timestamps, channel_data else: ii+=1 except IndexError:
2,413
https://:@github.com/lucis-fluxum/matisse-controller.git
3f8ad49e02ea4d6cab798a5828e228242093d3e2
@@ -54,7 +54,7 @@ class StatusUpdateThread(QThread): slow_pz_pos_text = f"Slow Pz:{slow_pz_pos:.3f}" refcell_pos_text = f"RefCell:{refcell_pos:.3f}" stabilizing_text = f"Stabilize:{green_text('ON') if is_stabilizing else red_text('OFF')}" - scanning_text = f"Scanning:{green_text('ON') if is_stabilizing else red_text('OFF')}" + scanning_text = f"Scanning:{green_text('ON') if is_scanning else red_text('OFF')}" locked_text = f"{green_text('LOCKED') if is_locked else red_text('NO LOCK')}" wavemeter_text = f"Wavemeter:{wavemeter_value}"
matisse_controller/gui/threads/status_update_thread.py
ReplaceText(target='is_scanning' @(57,68)->(57,82))
class StatusUpdateThread(QThread): slow_pz_pos_text = f"Slow Pz:{slow_pz_pos:.3f}" refcell_pos_text = f"RefCell:{refcell_pos:.3f}" stabilizing_text = f"Stabilize:{green_text('ON') if is_stabilizing else red_text('OFF')}" scanning_text = f"Scanning:{green_text('ON') if is_stabilizing else red_text('OFF')}" locked_text = f"{green_text('LOCKED') if is_locked else red_text('NO LOCK')}" wavemeter_text = f"Wavemeter:{wavemeter_value}"
class StatusUpdateThread(QThread): slow_pz_pos_text = f"Slow Pz:{slow_pz_pos:.3f}" refcell_pos_text = f"RefCell:{refcell_pos:.3f}" stabilizing_text = f"Stabilize:{green_text('ON') if is_stabilizing else red_text('OFF')}" scanning_text = f"Scanning:{green_text('ON') if is_scanning else red_text('OFF')}" locked_text = f"{green_text('LOCKED') if is_locked else red_text('NO LOCK')}" wavemeter_text = f"Wavemeter:{wavemeter_value}"
2,414
https://:@github.com/pozytywnie/raven-python.git
dedca8e5c98124f6a43a18986e142e8cb7ecc3cf
@@ -59,7 +59,7 @@ def setup_logging(handler, exclude=['raven', 'sentry.errors']): Returns a boolean based on if logging was configured or not. """ logger = logging.getLogger() - if handler.__class__ not in map(type, logger.handlers): + if handler.__class__ in map(type, logger.handlers): return False logger.addHandler(handler)
raven/conf/__init__.py
ReplaceText(target=' in ' @(62,24)->(62,32))
def setup_logging(handler, exclude=['raven', 'sentry.errors']): Returns a boolean based on if logging was configured or not. """ logger = logging.getLogger() if handler.__class__ not in map(type, logger.handlers): return False logger.addHandler(handler)
def setup_logging(handler, exclude=['raven', 'sentry.errors']): Returns a boolean based on if logging was configured or not. """ logger = logging.getLogger() if handler.__class__ in map(type, logger.handlers): return False logger.addHandler(handler)
2,415
https://:@github.com/pozytywnie/raven-python.git
f0ad0ca6a9de44128982de50c30157b779b69d71
@@ -16,7 +16,7 @@ class TransportRegistry(object): self.register_transport(transport) def register_transport(self, transport): - if not hasattr(transport, 'scheme') and not hasattr(transport.scheme, '__iter__'): + if not hasattr(transport, 'scheme') or not hasattr(transport.scheme, '__iter__'): raise AttributeError('Transport %s must have a scheme list', transport.__class__.__name__) for scheme in transport.scheme:
raven/transport/registry.py
ReplaceText(target='or' @(19,44)->(19,47))
class TransportRegistry(object): self.register_transport(transport) def register_transport(self, transport): if not hasattr(transport, 'scheme') and not hasattr(transport.scheme, '__iter__'): raise AttributeError('Transport %s must have a scheme list', transport.__class__.__name__) for scheme in transport.scheme:
class TransportRegistry(object): self.register_transport(transport) def register_transport(self, transport): if not hasattr(transport, 'scheme') or not hasattr(transport.scheme, '__iter__'): raise AttributeError('Transport %s must have a scheme list', transport.__class__.__name__) for scheme in transport.scheme:
2,416
https://:@github.com/drakantas/Ryoken.git
fb88049c62556d929525509f5e9c192ae2fc6f3b
@@ -29,4 +29,4 @@ class StrLengthDict(dict): if key in self: raise KeyError('Key already exists') - super().__setitem__(key, (len(key), value)) + super().__setitem__(key, (len(value), value))
ryoken/collections.py
ReplaceText(target='value' @(32,38)->(32,41))
class StrLengthDict(dict): if key in self: raise KeyError('Key already exists') super().__setitem__(key, (len(key), value))
class StrLengthDict(dict): if key in self: raise KeyError('Key already exists') super().__setitem__(key, (len(value), value))
2,417
https://:@gitlab.com/aaron235/gemini-python.git
78c0df38e2193875c19167cd4dd42028e973352a
@@ -30,7 +30,7 @@ class Gemini( object ): argStringb64 = b64encode( bytes( argString, "utf-8" ) ).decode( "utf-8" ) signature = hmac.new( bytes( self.__private, 'utf-8' ), - bytes( argString, 'utf-8' ), + bytes( argStringb64, 'utf-8' ), sha384 ) headerPayload = { 'X-GEMINI-APIKEY': self.__public,
gemini/gemini.py
ReplaceText(target='argStringb64' @(33,11)->(33,20))
class Gemini( object ): argStringb64 = b64encode( bytes( argString, "utf-8" ) ).decode( "utf-8" ) signature = hmac.new( bytes( self.__private, 'utf-8' ), bytes( argString, 'utf-8' ), sha384 ) headerPayload = { 'X-GEMINI-APIKEY': self.__public,
class Gemini( object ): argStringb64 = b64encode( bytes( argString, "utf-8" ) ).decode( "utf-8" ) signature = hmac.new( bytes( self.__private, 'utf-8' ), bytes( argStringb64, 'utf-8' ), sha384 ) headerPayload = { 'X-GEMINI-APIKEY': self.__public,
2,418
https://:@github.com/Haufe-Lexware/hl.plone.boardnotifications.git
fe26e02ea6c31a95c8ab89e41a136d1ac4519ad5
@@ -316,7 +316,7 @@ class Notifier(Persistent): di['commenttext'] = safe_unicode(comment.getText()) subscriptions = getUtility(ISubscriptions) subscribers = set(subscriptions.subscribers_for(thread)) | set(subscriptions.subscribers_for(forum)) - mdtool = getToolByName(comment, 'portal_memberdata') + mdtool = getToolByName(thread, 'portal_memberdata') keys = mdtool.propertyIds() for mdata in subscribers: if (comment is not None) and (mdata.getId() == comment.Creator()):
hl/plone/boardnotifications/notify.py
ReplaceText(target='thread' @(319,31)->(319,38))
class Notifier(Persistent): di['commenttext'] = safe_unicode(comment.getText()) subscriptions = getUtility(ISubscriptions) subscribers = set(subscriptions.subscribers_for(thread)) | set(subscriptions.subscribers_for(forum)) mdtool = getToolByName(comment, 'portal_memberdata') keys = mdtool.propertyIds() for mdata in subscribers: if (comment is not None) and (mdata.getId() == comment.Creator()):
class Notifier(Persistent): di['commenttext'] = safe_unicode(comment.getText()) subscriptions = getUtility(ISubscriptions) subscribers = set(subscriptions.subscribers_for(thread)) | set(subscriptions.subscribers_for(forum)) mdtool = getToolByName(thread, 'portal_memberdata') keys = mdtool.propertyIds() for mdata in subscribers: if (comment is not None) and (mdata.getId() == comment.Creator()):
2,419
https://:@github.com/agorinenko/drf-toolkit.git
537a2f9d0a9c740e706c377dd7aa07121b77ca74
@@ -10,7 +10,7 @@ def validate_request(schema): context = DrfUtils.get_request_parameters(request) context = SchemaValidator.validate(context, schema) kwargs['context'] = context - return view_func(request, *args, **kwargs) + return view_func(view, *args, **kwargs) return _wrapped_view
drf_toolkit/decorators.py
ReplaceText(target='view' @(13,29)->(13,36))
def validate_request(schema): context = DrfUtils.get_request_parameters(request) context = SchemaValidator.validate(context, schema) kwargs['context'] = context return view_func(request, *args, **kwargs) return _wrapped_view
def validate_request(schema): context = DrfUtils.get_request_parameters(request) context = SchemaValidator.validate(context, schema) kwargs['context'] = context return view_func(view, *args, **kwargs) return _wrapped_view
2,420
https://:@gitlab.com/sehnem/pynmet.git
256a7fdab2287ba0f65440766ea6ecf825b058b4
@@ -51,7 +51,7 @@ class inmet: self.lat = inmet.sites.loc[code].lat self.lon = inmet.sites.loc[code].lon self.alt = inmet.sites.loc[code].alt - self.dados = get_from_ldb(code, db, local) + self.dados = get_from_ldb(code, local, db) def resample(self, periodo): metodos = {'Temperatura': np.mean, 'Temperatura_max': np.max,
pynmet/inmet.py
ArgSwap(idxs=1<->2 @(54,21)->(54,33))
class inmet: self.lat = inmet.sites.loc[code].lat self.lon = inmet.sites.loc[code].lon self.alt = inmet.sites.loc[code].alt self.dados = get_from_ldb(code, db, local) def resample(self, periodo): metodos = {'Temperatura': np.mean, 'Temperatura_max': np.max,
class inmet: self.lat = inmet.sites.loc[code].lat self.lon = inmet.sites.loc[code].lon self.alt = inmet.sites.loc[code].alt self.dados = get_from_ldb(code, local, db) def resample(self, periodo): metodos = {'Temperatura': np.mean, 'Temperatura_max': np.max,
2,421
https://:@github.com/noobermin/lspplot.git
b384a18d8f70361e1a92ce11e76213b00f396be5
@@ -86,7 +86,7 @@ trajdefaults = dict( ); def trajectories(ret,trajs,**kw): - getkw=mk_getkw(trajdefaults, kw); + getkw=mk_getkw(kw, trajdefaults); x,y = getkw("coords"); if not test(kw, "no_resize"): xlim, ylim = ret['axes'].get_xlim(), ret['axes'].get_ylim();
lspplot/pc.py
ArgSwap(idxs=0<->1 @(89,10)->(89,18))
trajdefaults = dict( ); def trajectories(ret,trajs,**kw): getkw=mk_getkw(trajdefaults, kw); x,y = getkw("coords"); if not test(kw, "no_resize"): xlim, ylim = ret['axes'].get_xlim(), ret['axes'].get_ylim();
trajdefaults = dict( ); def trajectories(ret,trajs,**kw): getkw=mk_getkw(kw, trajdefaults); x,y = getkw("coords"); if not test(kw, "no_resize"): xlim, ylim = ret['axes'].get_xlim(), ret['axes'].get_ylim();
2,422
https://:@github.com/plures/xnd.git
5af6cf49bfa52ba6381de63c836ca0dcbcd20fe1
@@ -25,7 +25,7 @@ class xnd(_xnd): "the 'type' and 'levels' arguments are mutually exclusive") elif isinstance(type, str): type = ndt(type) - return _xnd(value, type) + return _xnd(type, value) @classmethod def empty(cls, t):
python/xnd/__init__.py
ArgSwap(idxs=0<->1 @(28,15)->(28,19))
class xnd(_xnd): "the 'type' and 'levels' arguments are mutually exclusive") elif isinstance(type, str): type = ndt(type) return _xnd(value, type) @classmethod def empty(cls, t):
class xnd(_xnd): "the 'type' and 'levels' arguments are mutually exclusive") elif isinstance(type, str): type = ndt(type) return _xnd(type, value) @classmethod def empty(cls, t):
2,423
https://:@github.com/OCA/wms.git
c1c96372dd2ecbe990cc33eb630d243bd748804b
@@ -243,7 +243,7 @@ class SinglePackPutaway(Component): if not pack_transfer.is_dest_location_valid(move, scanned_location): return self._response_for_forbidden_location() - if not pack_transfer.is_dest_location_to_confirm(move, scanned_location): + if pack_transfer.is_dest_location_to_confirm(move, scanned_location): if confirmation: # keep the move in sync otherwise we would have a move line outside # the dest location of the move
shopfloor/services/single_pack_putaway.py
ReplaceText(target='' @(246,11)->(246,15))
class SinglePackPutaway(Component): if not pack_transfer.is_dest_location_valid(move, scanned_location): return self._response_for_forbidden_location() if not pack_transfer.is_dest_location_to_confirm(move, scanned_location): if confirmation: # keep the move in sync otherwise we would have a move line outside # the dest location of the move
class SinglePackPutaway(Component): if not pack_transfer.is_dest_location_valid(move, scanned_location): return self._response_for_forbidden_location() if pack_transfer.is_dest_location_to_confirm(move, scanned_location): if confirmation: # keep the move in sync otherwise we would have a move line outside # the dest location of the move
2,424
https://:@github.com/OCA/wms.git
47a835c99aa0b8c1c4db3fd8b73fa04b8eca6d95
@@ -40,7 +40,7 @@ class PackTransferValidateAction(Component): zone_locations = self.env["stock.location"].search( [("id", "child_of", move_dest_location.id)] ) - return scanned_location in zone_locations + return scanned_location not in zone_locations def set_destination_and_done(self, move, scanned_location):
shopfloor/actions/pack_transfer_validate.py
ReplaceText(target=' not in ' @(43,31)->(43,35))
class PackTransferValidateAction(Component): zone_locations = self.env["stock.location"].search( [("id", "child_of", move_dest_location.id)] ) return scanned_location in zone_locations def set_destination_and_done(self, move, scanned_location):
class PackTransferValidateAction(Component): zone_locations = self.env["stock.location"].search( [("id", "child_of", move_dest_location.id)] ) return scanned_location not in zone_locations def set_destination_and_done(self, move, scanned_location):
2,425
https://:@github.com/OCA/wms.git
47a835c99aa0b8c1c4db3fd8b73fa04b8eca6d95
@@ -245,7 +245,7 @@ class SinglePackTransfer(Component): if not pack_transfer.is_dest_location_valid(move, scanned_location): return self._response_for_forbidden_location() - if not pack_transfer.is_dest_location_to_confirm(move, scanned_location): + if pack_transfer.is_dest_location_to_confirm(move, scanned_location): if confirmation: # keep the move in sync otherwise we would have a move line outside # the dest location of the move
shopfloor/services/single_pack_transfer.py
ReplaceText(target='' @(248,11)->(248,15))
class SinglePackTransfer(Component): if not pack_transfer.is_dest_location_valid(move, scanned_location): return self._response_for_forbidden_location() if not pack_transfer.is_dest_location_to_confirm(move, scanned_location): if confirmation: # keep the move in sync otherwise we would have a move line outside # the dest location of the move
class SinglePackTransfer(Component): if not pack_transfer.is_dest_location_valid(move, scanned_location): return self._response_for_forbidden_location() if pack_transfer.is_dest_location_to_confirm(move, scanned_location): if confirmation: # keep the move in sync otherwise we would have a move line outside # the dest location of the move
2,426
https://:@github.com/OCA/wms.git
0355f73436ee7b90b46f3e740313a8a7bdc5dd8a
@@ -19,7 +19,7 @@ class SelectDestPackageMixin: "partner": {"id": self.customer.id, "name": self.customer.name}, }, "packages": [ - self._package_data(picking, package) for package in packages + self._package_data(package, picking) for package in packages ], "selected_move_lines": [ self._move_line_data(ml) for ml in selected_lines.sorted()
shopfloor/tests/test_checkout_list_package.py
ArgSwap(idxs=0<->1 @(22,20)->(22,38))
class SelectDestPackageMixin: "partner": {"id": self.customer.id, "name": self.customer.name}, }, "packages": [ self._package_data(picking, package) for package in packages ], "selected_move_lines": [ self._move_line_data(ml) for ml in selected_lines.sorted()
class SelectDestPackageMixin: "partner": {"id": self.customer.id, "name": self.customer.name}, }, "packages": [ self._package_data(package, picking) for package in packages ], "selected_move_lines": [ self._move_line_data(ml) for ml in selected_lines.sorted()
2,427
https://:@github.com/OCA/wms.git
6901f38959994d8c64f55a8ab3aad53896f34655
@@ -193,7 +193,7 @@ class StockMove(models.Model): new_move_per_location[routing_location.id].append(new_move_id) new_moves = self.browse(chain.from_iterable(new_move_per_location.values())) - return self + new_moves + return self | new_moves def _apply_routing_rule_pull(self): """Apply routing operations
stock_routing_operation/models/stock_move.py
ReplaceText(target='|' @(196,20)->(196,21))
class StockMove(models.Model): new_move_per_location[routing_location.id].append(new_move_id) new_moves = self.browse(chain.from_iterable(new_move_per_location.values())) return self + new_moves def _apply_routing_rule_pull(self): """Apply routing operations
class StockMove(models.Model): new_move_per_location[routing_location.id].append(new_move_id) new_moves = self.browse(chain.from_iterable(new_move_per_location.values())) return self | new_moves def _apply_routing_rule_pull(self): """Apply routing operations
2,428
https://:@github.com/yassersouri/fandak.git
c75c70e67f2839cbb16b79fded8694c085d7fb24
@@ -77,7 +77,7 @@ class ScalarMetricCollection: else: value = attr self.writer.add_scalar(tag_name, scalar_value=value, global_step=step) - self.values[attr_name].append(dc_value) + self.values[attr_name].append(value) def epoch_finished(self, epoch_num: int): if self.report_average:
fandak/utils/metrics.py
ReplaceText(target='value' @(80,42)->(80,50))
class ScalarMetricCollection: else: value = attr self.writer.add_scalar(tag_name, scalar_value=value, global_step=step) self.values[attr_name].append(dc_value) def epoch_finished(self, epoch_num: int): if self.report_average:
class ScalarMetricCollection: else: value = attr self.writer.add_scalar(tag_name, scalar_value=value, global_step=step) self.values[attr_name].append(value) def epoch_finished(self, epoch_num: int): if self.report_average:
2,429
https://:@gitlab.com/pelops/alcathous.git
df1f1b67170560bac0eb6273711f3f8787965e24
@@ -86,7 +86,7 @@ class DataPointManager(AbstractMicroservice): _config_methods[key] = m for config_data_point in self._config["datapoints"]: - dp = DataPoint(config_data_point, _config_methods, self._logger, self._mqtt_client, + dp = DataPoint(config_data_point, _config_methods, self._mqtt_client, self._logger, self._no_data_behavior) self._purges.append(dp.purge_old_values) for method in dp.methods:
alcathous/datapointmanager.py
ArgSwap(idxs=2<->3 @(89,17)->(89,26))
class DataPointManager(AbstractMicroservice): _config_methods[key] = m for config_data_point in self._config["datapoints"]: dp = DataPoint(config_data_point, _config_methods, self._logger, self._mqtt_client, self._no_data_behavior) self._purges.append(dp.purge_old_values) for method in dp.methods:
class DataPointManager(AbstractMicroservice): _config_methods[key] = m for config_data_point in self._config["datapoints"]: dp = DataPoint(config_data_point, _config_methods, self._mqtt_client, self._logger, self._no_data_behavior) self._purges.append(dp.purge_old_values) for method in dp.methods:
2,430
https://:@github.com/miracle2k/docker-deploy.git
f91f61ec18461b9f88802f2c01ed463565b66f19
@@ -61,7 +61,7 @@ class DomainPlugin(Plugin): strowger = StrowgerClient(api_ip) for domain, data in domains.items(): - service_name = domain.get('http') + service_name = data.get('http') if not service_name: continue strowger.set_http_route(domain, service_name)
deploylib/plugins/domains.py
ReplaceText(target='data' @(64,27)->(64,33))
class DomainPlugin(Plugin): strowger = StrowgerClient(api_ip) for domain, data in domains.items(): service_name = domain.get('http') if not service_name: continue strowger.set_http_route(domain, service_name)
class DomainPlugin(Plugin): strowger = StrowgerClient(api_ip) for domain, data in domains.items(): service_name = data.get('http') if not service_name: continue strowger.set_http_route(domain, service_name)
2,431
https://:@github.com/ttm/participation.git
205208b5b8f477ae40de7453c98fba77d7faf6ef
@@ -43,7 +43,7 @@ def connectMongo(): client=pymongo.MongoClient(aa.mongouri) shouts=client.aaserver.shouts.find({}) shouts_=[shout for shout in shouts] - return shouts + return shouts_ def accessIrcLog(): with codecs.open("../../social/data/irc/labmacambira_lalenia3.txt","rb","iso-8859-1") as f:
participation/aa/access.py
ReplaceText(target='shouts_' @(46,11)->(46,17))
def connectMongo(): client=pymongo.MongoClient(aa.mongouri) shouts=client.aaserver.shouts.find({}) shouts_=[shout for shout in shouts] return shouts def accessIrcLog(): with codecs.open("../../social/data/irc/labmacambira_lalenia3.txt","rb","iso-8859-1") as f:
def connectMongo(): client=pymongo.MongoClient(aa.mongouri) shouts=client.aaserver.shouts.find({}) shouts_=[shout for shout in shouts] return shouts_ def accessIrcLog(): with codecs.open("../../social/data/irc/labmacambira_lalenia3.txt","rb","iso-8859-1") as f:
2,432
https://:@github.com/malicialab/avclass.git
4850b49eb120c39ebcdb4c1b77a3717b00b9666c
@@ -399,7 +399,7 @@ class Update: tagging.expand_all_destinations() tagging.to_file(tag_filepath) log.info('[-] Output %d tagging rules to %s' % ( - len(tagging), tax_filepath)) + len(tagging), tag_filepath)) expansion.to_file(exp_filepath) log.info('[-] Output %d expansion rules to %s' % ( len(expansion), exp_filepath))
avclass2/avclass2_update_module.py
ReplaceText(target='tag_filepath' @(402,38)->(402,50))
class Update: tagging.expand_all_destinations() tagging.to_file(tag_filepath) log.info('[-] Output %d tagging rules to %s' % ( len(tagging), tax_filepath)) expansion.to_file(exp_filepath) log.info('[-] Output %d expansion rules to %s' % ( len(expansion), exp_filepath))
class Update: tagging.expand_all_destinations() tagging.to_file(tag_filepath) log.info('[-] Output %d tagging rules to %s' % ( len(tagging), tag_filepath)) expansion.to_file(exp_filepath) log.info('[-] Output %d expansion rules to %s' % ( len(expansion), exp_filepath))
2,433
https://:@gitlab.com/crem-repository/dhd.git
ffbb2435ba6d85b4ad2008e8268fbbe66781a4be
@@ -288,7 +288,7 @@ def test_get_best_terminal_steiner_tree(load_pkl_evolve): evolution = evolve.run_evolution(vertices, terminals, 5, n=16, n1=2, n2=8) genes = evolve.get_best_individual(evolution) - tst = evolve.get_best_terminal_steiner_tree(vertices, terminals, genes) + tst = evolve.get_best_terminal_steiner_tree(vertices, terminals, evolution) w1 = tst['weight'].sum() w2 = evolution.at[len(evolution)-1,'weight']
tests/test_evolve.py
ReplaceText(target='evolution' @(291,69)->(291,74))
def test_get_best_terminal_steiner_tree(load_pkl_evolve): evolution = evolve.run_evolution(vertices, terminals, 5, n=16, n1=2, n2=8) genes = evolve.get_best_individual(evolution) tst = evolve.get_best_terminal_steiner_tree(vertices, terminals, genes) w1 = tst['weight'].sum() w2 = evolution.at[len(evolution)-1,'weight']
def test_get_best_terminal_steiner_tree(load_pkl_evolve): evolution = evolve.run_evolution(vertices, terminals, 5, n=16, n1=2, n2=8) genes = evolve.get_best_individual(evolution) tst = evolve.get_best_terminal_steiner_tree(vertices, terminals, evolution) w1 = tst['weight'].sum() w2 = evolution.at[len(evolution)-1,'weight']
2,434
https://:@github.com/xia2/xia2.git
904123ce19ff3a06c124ad2ca3ee8ca905e7ffa8
@@ -102,7 +102,7 @@ def reconstruct_rogues(params): for j, rogue in enumerate(rogues): reflections['id'][ann.nn[j]] = 1701 - rogues = reflections.select(reflections['id'] == 1701) + reflections = reflections.select(reflections['id'] == 1701) if params.extract: reflections["shoebox"] = flex.shoebox(
command_line/rogues_gallery.py
ReplaceText(target='reflections' @(105,4)->(105,10))
def reconstruct_rogues(params): for j, rogue in enumerate(rogues): reflections['id'][ann.nn[j]] = 1701 rogues = reflections.select(reflections['id'] == 1701) if params.extract: reflections["shoebox"] = flex.shoebox(
def reconstruct_rogues(params): for j, rogue in enumerate(rogues): reflections['id'][ann.nn[j]] = 1701 reflections = reflections.select(reflections['id'] == 1701) if params.extract: reflections["shoebox"] = flex.shoebox(
2,435
https://:@github.com/xia2/xia2.git
849c882a900c44d75c5d4112ca2dc279398b17a6
@@ -330,7 +330,7 @@ class DialsScaler(Scaler): Debug.write('X1698: %s: %s' % (pointgroup, reindex_op)) if ntr: - integrater.integrater_reset_reindex_operator() + intgr.integrater_reset_reindex_operator() need_to_return = True if pt and not probably_twinned:
Modules/Scaler/DialsScaler.py
ReplaceText(target='intgr' @(333,12)->(333,22))
class DialsScaler(Scaler): Debug.write('X1698: %s: %s' % (pointgroup, reindex_op)) if ntr: integrater.integrater_reset_reindex_operator() need_to_return = True if pt and not probably_twinned:
class DialsScaler(Scaler): Debug.write('X1698: %s: %s' % (pointgroup, reindex_op)) if ntr: intgr.integrater_reset_reindex_operator() need_to_return = True if pt and not probably_twinned: