Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def init_config():
p = configargparse.ArgParser(default_config_files=["~/.config/pyLanguagetool.conf"],
config_file_parser_class=CustomConfigFileParser.CustomConfigFileParser)
p.add_argument("-V", "--version", default=False, action='store_true')
p.add_argument("-v", "--verbose", env_var="VERBOSE", default=False, action='store_true')
p.add_argument("-a", "--api-url", env_var="API_URL", default="https://languagetool.org/api/v2/",
help="the URL of the v2 languagetool API, should end with '/v2/'")
p.add_argument("--no-color", env_var="NO_COLOR", action='store_true', default=False, help="don't color output")
p.add_argument("-c", "--clipboard", env_var="CLIPBOARD", action='store_true', default=False,
help="get text from system clipboard")
p.add_argument("-s", "--single-line", env_var="SINGLE_LINE", action='store_true', default=False,
help="check every line on its own")
p.add_argument("-t", "--input-type", env_var="INPUT_TYPE",
choices=converters.supported_extensions,
help="if not plaintext")
p.add_argument("-u", "--explain-rule", env_var="EXPLAIN_RULE", action="store_true", default=False,
help="print URLs with more information about rules")
p.add_argument('input file', help='input file', nargs='?')
p.add_argument("-r", "--rules", env_var="RULES", action='store_true', default=False,