Commit ec94fcf5 authored by Tom Niget's avatar Tom Niget

Remove unnecessary type hints from examples

parent 9a209460
...@@ -23,7 +23,7 @@ class StatResult: ...@@ -23,7 +23,7 @@ class StatResult:
def __init__(self): def __init__(self):
pass pass
def stat_result_to_ours(stat_result: os.stat_result): def stat_result_to_ours(stat_result):
res = StatResult() res = StatResult()
res.st_mode = stat_result.st_mode res.st_mode = stat_result.st_mode
res.st_ino = stat_result.st_ino res.st_ino = stat_result.st_ino
...@@ -51,7 +51,7 @@ class Tree: ...@@ -51,7 +51,7 @@ class Tree:
self.stat = stat self.stat = stat
self.childs = {} self.childs = {}
def compute_hashes(entry_path, tree: Tree): def compute_hashes(entry_path, tree):
with open(entry_path, "rb") as f: with open(entry_path, "rb") as f:
md5 = hashlib.md5() md5 = hashlib.md5()
sha1 = hashlib.sha1() sha1 = hashlib.sha1()
...@@ -75,7 +75,7 @@ def compute_hashes(entry_path, tree: Tree): ...@@ -75,7 +75,7 @@ def compute_hashes(entry_path, tree: Tree):
tree.sha512 = sha512.hexdigest() tree.sha512 = sha512.hexdigest()
def construct_fs_tree(cur_tree: Tree, path: str, dev_whitelist, ignored_dirs: list[str]): def construct_fs_tree(cur_tree, path, dev_whitelist, ignored_dirs):
path_stat = cur_tree.stat path_stat = cur_tree.stat
if not path_stat.st_dev in dev_whitelist: if not path_stat.st_dev in dev_whitelist:
return cur_tree return cur_tree
......
...@@ -20,7 +20,7 @@ glob = 5 ...@@ -20,7 +20,7 @@ glob = 5
# e = d + 1 # e = d + 1
# print(e) # print(e)
def f(x: int): def f(x):
return x + 1 return x + 1
......
from typon import fork, sync from typon import fork, sync
def fibo(n: int) -> int: def fibo(n):
if n < 2: if n < 2:
return n return n
a = fibo(n - 1) a = fibo(n - 1)
......
from typon import fork, sync from typon import fork, sync
def fibo(n: int) -> int: def fibo(n):
if n < 2: if n < 2:
return n return n
a = fork(lambda: fibo(n - 1)) a = fork(lambda: fibo(n - 1))
......
from typon import future from typon import future
def fibo(n: int) -> int: def fibo(n):
if n < 2: if n < 2:
return n return n
a = future(lambda: fibo(n - 1)) a = future(lambda: fibo(n - 1))
......
def fibo(n: int): def fibo(n):
if n < 2: if n < 2:
return n return n
a = fibo(n - 1) a = fibo(n - 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment