<commit_before>from merc import errors
from merc import feature
from merc import message
from merc import util


class SidFeature(feature.Feature):
  NAME = __name__


install = SidFeature.install


@SidFeature.register_server_command
class Sid(message.Command):
  NAME = "SID"
  MIN_ARITY = 4

  def __init__(self, server_name, hopcount, sid, description, *args):
    self.server_name = server_name
    self.hopcount = hopcount
    self.sid = sid
    self.description = description

  def as_command_params(self):
    return [self.server_name, self.hopcount, self.sid, self.description]

  def handle_for(self, app, server, prefix):
    # TODO: handle me!


@SidFeature.hook("network.burst.sid")
def burst_sids(app, server):
  for source, target in app.network.all_links():
    server.send(source.sid, Sid(target.name, "1", target.sid,
                                target.description))
<commit_msg>Fix typo breaking the TS6 feature.<commit_after>from merc import errors
from merc import feature
from merc import message
from merc import util


class SidFeature(feature.Feature):
  NAME = __name__


install = SidFeature.install


@SidFeature.register_server_command
class Sid(message.Command):
  NAME = "SID"
  MIN_ARITY = 4

  def __init__(self, server_name, hopcount, sid, description, *args):
    self.server_name = server_name
    self.hopcount = hopcount
    self.sid = sid
    self.description = description

  def as_command_params(self):
    return [self.server_name, self.hopcount, self.sid, self.description]

  def handle_for(self, app, server, prefix):
    # TODO: handle me!
    pass


@SidFeature.hook("network.burst.sid")
def burst_sids(app, server):
  for source, target in app.network.all_links():
    server.send(source.sid, Sid(target.name, "1", target.sid,
                                target.description))

{'fraction_non_alphanumeric': 0.09978189749182116, 'fraction_numerical': 0.0027262813522355507, 'mean_word_length': 3.7051282051282053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3794424', 'n_tokens_mistral': 582, 'n_tokens_neox': 554, 'n_words': 152}