<commit_before>import modules

class ModuleManager( object ):
	def __init__( self, bot ):
		self.bot = bot
		self.modules = {}
		self.loaded_modules = {}
		for module_name in modules.get_modules():
			self.add_module( module_name )

	def unload( self ):
		for module_name in self.modules:
			self.remove_module( module_name )

	def reload_modules( self ):
		pass

	def get_modules( self ):
		"""Get all found modules"""
		return self.modules.iterkeys()

	def get_loaded_modules( self ):<commit_msg>ModuleManager: implemented reload_modules<commit_after>import modules

class ModuleManager( object ):
	def __init__( self, bot ):
		self.bot = bot
		self.modules = {}
		self.loaded_modules = {}
		for module_name in modules.get_modules():
			self.add_module( module_name )

	def unload( self ):
		for module_name in self.modules:
			self.remove_module( module_name )

	def reload_modules( self ):
		# add modules that are not added yet
		for module_name in [ m for m in modules.get_modules() if m not in self.modules ]:
			self.add_module( module_name )
		# remove modules that no longer exist
		for module_name in [ m for in m self.modules.iterkeys() if m not in modules.get_modules() ]:
			self.remove_module( module_name )

	def get_modules( self ):
		"""Get all found modules"""
		return self.modules.iterkeys()

	def get_loaded_modules( self ):
{'fraction_non_alphanumeric': 0.09955423476968796, 'fraction_numerical': 0.0, 'mean_word_length': 4.06390977443609, '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': '2174035', 'n_tokens_mistral': 461, 'n_tokens_neox': 418, 'n_words': 132}