Add metadata main (#8247)

This commit is contained in:
Pere Miquel Brull 2022-10-19 10:02:36 +02:00 committed by GitHub
parent 62a1092245
commit 26efe40e87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,17 @@
# Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
metadata module entry point to call the cli
"""
from metadata.cmd import metadata
if __name__ == "__main__":
metadata()

View File

@ -58,7 +58,7 @@ def check() -> None:
help="Log level",
required=False,
)
def metadata(debug: bool, log_level: str) -> None:
def metadata(debug: bool = False, log_level: str = "INFO") -> None:
"""Method to set logger information"""
if debug:
set_loggers_level(logging.DEBUG)