implement explicit Optional type hints for =None parameters

Thanks https://github.com/hauntsaninja/no_implicit_optional
This commit is contained in:
InsanePrawn 2022-11-09 15:22:06 +01:00
parent 669c82a10b
commit 82a87e7ea9
15 changed files with 34 additions and 27 deletions

View file

@ -1,8 +1,10 @@
from typing import Optional
from constants import Arch, CFLAGS_ARCHES, CFLAGS_GENERAL, COMPILE_ARCHES, GCC_HOSTSPECS
from config.state import config
def generate_makepkg_conf(arch: Arch, cross: bool = False, chroot: str = None) -> str:
def generate_makepkg_conf(arch: Arch, cross: bool = False, chroot: Optional[str] = None) -> str:
"""
Generate a makepkg.conf. For use with crosscompiling, specify `cross=True` and pass as `chroot`
the relative path inside the native chroot where the foreign chroot will be mounted.