Skip to content

Commit

Permalink
flake8 and NoReturn
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Sep 4, 2024
1 parent e265d50 commit 5e46347
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spinn_utilities/make_tools/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import os
import sys
from typing import Optional
from typing import NoReturn, Optional

from .file_converter import FileConverter
from .log_sqllite_database import LogSqlLiteDatabase
Expand All @@ -26,7 +26,7 @@
"neural_build.mk", "Makefile.neural_build"])


def convert(src: str, dest: str, new_dict: bool):
def convert(src: str, dest: str, new_dict: bool) -> NoReturn:
"""
Converts a whole directory including sub-directories.
Expand All @@ -48,7 +48,7 @@ def convert(src: str, dest: str, new_dict: bool):


def _convert_dir(src_path: str, dest_path: str,
make_directories:Optional[bool]=False):
make_directories: Optional[bool] = False) -> NoReturn:
"""
Converts a whole directory including sub directories.
Expand All @@ -73,7 +73,7 @@ def _convert_dir(src_path: str, dest_path: str,
print(f"Unexpected file {source}")


def _mkdir(destination: str):
def _mkdir(destination: str) -> NoReturn:
if not os.path.exists(destination):
os.mkdir(destination)
if not os.path.exists(destination):
Expand Down

0 comments on commit 5e46347

Please sign in to comment.