MCPcopy
hub / github.com/psycopg/psycopg / parse_cmdline

Function parse_cmdline

tools/update_backer.py:92–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90
91
92def parse_cmdline():
93 from argparse import ArgumentParser
94
95 parser = ArgumentParser(description=__doc__)
96 parser.add_argument(
97 "--file",
98 help="the file to update [default: %(default)s]",
99 default=Path(__file__).parent.parent / "BACKERS.yaml",
100 type=Path,
101 )
102 parser.add_argument(
103 "--add",
104 metavar="USERNAME",
105 nargs="+",
106 help="add USERNAME to the backers",
107 )
108
109 parser.add_argument(
110 "--top",
111 action="store_true",
112 help="add to the top tier",
113 )
114
115 parser.add_argument(
116 "--update",
117 metavar="USERNAME",
118 nargs="+",
119 help="update USERNAME data",
120 )
121
122 parser.add_argument(
123 "--update-all",
124 action="store_true",
125 help="update all the existing backers data",
126 )
127
128 opt = parser.parse_args()
129
130 return opt
131
132
133if __name__ == "__main__":

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected