Skip to content

Commit 96d6116

Browse files
committed
Additional fix for #9
1 parent 425966e commit 96d6116

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/layoutparser/elements.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List, Union, Dict, Dict, Any
1+
from typing import List, Union, Dict, Dict, Any, Optional
22
from abc import ABC, abstractmethod
33
from collections.abc import Iterable, MutableSequence
44
from copy import copy, deepcopy
@@ -1485,8 +1485,8 @@ class Layout(MutableSequence):
14851485
Defaults to None.
14861486
"""
14871487

1488-
def __init__(self, blocks: List = [], page_data: Dict = None):
1489-
self._blocks = blocks
1488+
def __init__(self, blocks: Optional[List] = None, page_data: Dict = None):
1489+
self._blocks = blocks if blocks is not None else []
14901490
self.page_data = page_data or {}
14911491

14921492
def __getitem__(self, key):

0 commit comments

Comments
 (0)