-
Notifications
You must be signed in to change notification settings - Fork 0
/
magician.py
33 lines (29 loc) · 961 Bytes
/
magician.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import click
from typing import Union, List
from not_required_if import NotRequiredIf
@click.command()
@click.option('-r',
'--repo',
#required=True,
cls=NotRequiredIf,
not_required_if='repos_file',
type=str,
help='A remote repository URL.')
@click.option('-f',
'--repos-file',
#required=True,
cls=NotRequiredIf,
not_required_if='repo',
type=click.Path(),
help='A file containing a remote repository URL in each row.')
@click.option('-s',
'--settings-file',
required=True,
type=click.Path(),
help='A file settings to use in the given repository/repositories.')
def main(repo: str, repos_file: click.Path, settings_file: click.Path):
print(repo)
print(repos_file)
print(settings_file)
if __name__ == '__main__':
main()