<commit_before>var fs = require('fs');
var shell = require('shelljs');

exports.setVersion = function (version, cb) {
  if (shell.test('-f', 'setup.py')) {
    var pythonSetup = fs.readFileSync('setup.py', 'utf8');
    var output = pythonSetup.replace(/version='\d+\.\d+\.\d+'/, 'version=\'' + version + '\'');
    fs.writeFile('setup.py', output, 'utf8', cb);
  } else {
    process.nextTick(cb);
  }
};

exports.register = function (version, cb) {
  // TODO: Don't miss out on testing .private for Python
  if (shell.test('-f', 'setup.py') && !shell.test('-f', '.pypi-private')) {
    shell.exec('python setup.py register');
  }

  // Callback
  cb();
};<commit_msg>Moved python's callback to be async<commit_after>var fs = require('fs');
var shell = require('shelljs');

exports.setVersion = function (version, cb) {
  if (shell.test('-f', 'setup.py')) {
    var pythonSetup = fs.readFileSync('setup.py', 'utf8');
    var output = pythonSetup.replace(/version='\d+\.\d+\.\d+'/, 'version=\'' + version + '\'');
    fs.writeFile('setup.py', output, 'utf8', cb);
  } else {
    process.nextTick(cb);
  }
};

exports.register = function (version, cb) {
  // TODO: Don't miss out on testing .private for Python
  if (shell.test('-f', 'setup.py') && !shell.test('-f', '.pypi-private')) {
    shell.exec('python setup.py register');
  }

  // Callback
  process.nextTick(cb);
};
{'fraction_non_alphanumeric': 0.22125181950509462, 'fraction_numerical': 0.002911208151382824, 'mean_word_length': 3.568106312292359, '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': '3354982', 'n_tokens_mistral': 482, 'n_tokens_neox': 476, 'n_words': 107}