Skip to content

Commit

Permalink
Add default locators
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Jan 17, 2021
1 parent 33fc786 commit 1b0e31b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pomace/models.py
Expand Up @@ -204,8 +204,8 @@ def _verb(self) -> Verb:

@datafile
class Locators:
inclusions: List[Locator]
exclusions: List[Locator]
inclusions: List[Locator] = field(default_factory=lambda: [Locator()])
exclusions: List[Locator] = field(default_factory=lambda: [Locator()])

@property
def sorted_inclusions(self) -> List[Locator]:
Expand Down Expand Up @@ -261,7 +261,7 @@ class Page:
path: str = URL.ROOT
variant: str = "default"

locators: Locators = field(default_factory=lambda: Locators([], []))
locators: Locators = field(default_factory=Locators)
actions: List[Action] = field(default_factory=lambda: [Action()])

@classmethod
Expand Down Expand Up @@ -347,7 +347,7 @@ def __dir__(self):
log.info(f"Adding placeholder action for {self}")
self.actions.append(Action())
else:
log.debug("Placholder actions are disabled")
log.debug("Placeholder actions are disabled")
return names

def __getattr__(self, value: str) -> Action:
Expand Down

0 comments on commit 1b0e31b

Please sign in to comment.