Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main(arguments):
"""Process QRC files."""
parser = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('--qrc_dir',
default=PACKAGE_PATH,
type=str,
help="QRC file directory, relative to current directory.",)
parser.add_argument('--create',
default='qtpy',
choices=['pyqt', 'pyqt5', 'pyside', 'pyside2', 'qtpy', 'pyqtgraph', 'qt', 'qt5', 'all'],
type=str,
help="Choose which one would be generated.")
parser.add_argument('--watch', '-w',
action='store_true',
help="Watch for file changes.")
args = parser.parse_args(arguments)
if args.watch:
path = PACKAGE_PATH
observer = Observer()
default=PACKAGE_PATH,
type=str,
help="QRC file directory, relative to current directory.",)
parser.add_argument('--create',
default='qtpy',
choices=['pyqt', 'pyqt5', 'pyside', 'pyside2', 'qtpy', 'pyqtgraph', 'qt', 'qt5', 'all'],
type=str,
help="Choose which one would be generated.")
parser.add_argument('--watch', '-w',
action='store_true',
help="Watch for file changes.")
args = parser.parse_args(arguments)
if args.watch:
path = PACKAGE_PATH
observer = Observer()
handler = QSSFileHandler(parser_args=args)
observer.schedule(handler, path, recursive=True)
try:
print('\nWatching QSS file for changes...\nPress Ctrl+C to exit\n')
observer.start()
except KeyboardInterrupt:
observer.stop()
observer.join()
else:
run_process(args)