Skip to content

Commit

Permalink
Additional fix for #9
Browse files Browse the repository at this point in the history
  • Loading branch information
lolipopshock committed Apr 10, 2021
1 parent 425966e commit 96d6116
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/layoutparser/elements.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Union, Dict, Dict, Any
from typing import List, Union, Dict, Dict, Any, Optional
from abc import ABC, abstractmethod
from collections.abc import Iterable, MutableSequence
from copy import copy, deepcopy
Expand Down Expand Up @@ -1485,8 +1485,8 @@ class Layout(MutableSequence):
Defaults to None.
"""

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

def __getitem__(self, key):
Expand Down

0 comments on commit 96d6116

Please sign in to comment.