Skip to content

Commit

Permalink
fix: fix logger
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Kisler <[email protected]>
  • Loading branch information
kislerdm committed Aug 12, 2023
1 parent 3cc57e4 commit 117a7ef
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pyarch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def __init__(self, dsl_puml: str) -> None:

def __eq__(self, other: "Link") -> bool: # type: ignore
return (
self.start == other.start
and self.end == other.end
and self.arrow == other.arrow
and self.description == other.description
self.start == other.start
and self.end == other.end
and self.arrow == other.arrow
and self.description == other.description
)

def to_dict(self) -> Dict[str, str]:
Expand Down Expand Up @@ -397,11 +397,12 @@ def get_args() -> argparse.Namespace:
)
parser.add_argument("-i", "--input", required=True, type=str, help="Directory with {classes,packages}.puml files.")
parser.add_argument("-o", "--output", required=True, type=str, help="Directory to output index.html file.")
parser.add_argument("-v", "--verbose", required=False, type=bool, default=False, help="Verbosity.")
parser.add_argument("-v", "--verbose", required=False, default=False, action="store_true", help="Verbosity.")
return parser.parse_args()


_LOGS = logging.getLogger(__name__)
logging.basicConfig(format="%(asctime)s [%(levelname)s] %(message)s", level=logging.INFO)
_LOGS = logging.getLogger("pyarch")


def read_input_puml(path: str) -> str:
Expand All @@ -417,8 +418,8 @@ def read_input_puml(path: str) -> str:
FileNotFoundError: raised when the file is not found.
IOError: raised upon reading error.
"""
if not os.path.isfile(path_classes_puml):
raise FileNotFoundError(path_classes_puml)
if not os.path.isfile(path):
raise FileNotFoundError("file %s not found" % path)

try:
with open(path, "r") as f:
Expand All @@ -428,7 +429,6 @@ def read_input_puml(path: str) -> str:


if __name__ == "__main__":

args = get_args()

path_classes_puml = f"{args.input}/classes.puml"
Expand Down

0 comments on commit 117a7ef

Please sign in to comment.