fixed code & restected PEP8
import logging
-if __name__ == '__main__':
+if __name__ == "__main__":
import plac
import sys
from credentialdigger import download
commands = {
- 'download': download,
+ 'download': download
}
+ available_comamnds = f'{", ".join(commands)}'
if len(sys.argv) == 1:
- logging.info(msg=('Available commands', ', '.join(commands)))
+ logging.info(f'Available commands : {available_comamnds}')
command = sys.argv.pop(1)
- sys.argv[0] = 'credentialdigger %s' % command
+ sys.argv[0] = f'credentialdigger {command}'
if command in commands:
plac.call(commands[command], sys.argv[1:])
else:
- available = 'Available: {}'.format(', '.join(commands))
- logging.error(msg=('Unknown command: {}'.format(command), available))
+ logging.error(
+ f'Unknown command: {command}\nAvailable commands: {available_comamnds}')
