Skip to content

Commit

Permalink
add type hint for system
Browse files Browse the repository at this point in the history
  • Loading branch information
Prodesire committed Mar 7, 2018
1 parent 5674d4c commit 285c9ef
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions stubs/pydu/system.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os
from typing import Callable, List
from pydu.platform import WINDOWS


def makedirs(path: str, mode: int=0o755, ignore_errors: bool=False, exist_ok: bool=False) -> None: ...
def remove(path: str, ignore_errors: bool=False, onerror: Callable=None) -> None: ...
def removes(paths: List[str], ignore_errors: bool=False, onerror: Callable=None) -> None: ...
def open_file(path: str, mode: str='wb+', buffer_size: int=-1, ignore_errors: bool=False) -> None: ...
def copy(src: str, dst: str, ignore_errors: bool=False, follow_symlinks: bool=True) -> None: ...
def touch(path: str) -> None: ...
def chmod(path: str, mode: int, recursive: bool=False) -> None: ...
def which(cmd: str, mode: int=os.F_OK | os.X_OK, path: str=None) -> None: ...
if WINDOWS:
class chcp(object):
def __init__(self, code: str) -> None: ...
else:
def symlink(src: str, dst: str, overwrite: bool=False, ignore_errors: bool=False) -> None: ...
def link(src: str, dst: str, overwrite: bool=False, ignore_errors: bool=False) -> None: ...

0 comments on commit 285c9ef

Please sign in to comment.