Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/scrape_images.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import re

from statemachine.contrib.diagram import DotGraphMachine
Expand All @@ -13,7 +14,8 @@ class MachineScraper:

def __init__(self, project_root):
self.project_root = project_root
self.re_machine_module_name = re.compile(f"{self.project_root}/(.*).py$")
sanitized_path = re.escape(os.path.abspath(self.project_root))
self.re_machine_module_name = re.compile(f"{sanitized_path}[\\/](.*)\\.py$")
Comment thread
fgmacedo marked this conversation as resolved.
Outdated
self.seen = set()

def __repr__(self):
Expand Down
Loading