Skip to content

Commit

Permalink
fix black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Krande committed Jan 18, 2024
1 parent 3bf0027 commit e9b986e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/paradoc/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def from_markdown_str(table_str: str) -> Table:
data.append([x.strip() for x in line.split("|")[1:-1]])

caption = table_caption_str.split("Table:")[1].strip()
caption = caption.split('{')[0].strip()
caption = caption.split("{")[0].strip()
# Create a pandas DataFrame using the extracted header and data rows
df = pd.DataFrame(data, columns=header)
name = str(df.values[0][0])
Expand Down Expand Up @@ -143,7 +143,7 @@ def get_figures(self):
yield from regx.finditer(self.read_original_file())

def get_tables(self):
regx = re.compile(r'(\|.*?\nTable:.*?$)', re.MULTILINE | re.DOTALL)
regx = re.compile(r"(\|.*?\nTable:.*?$)", re.MULTILINE | re.DOTALL)
yield from regx.finditer(self.read_original_file())


Expand Down
22 changes: 11 additions & 11 deletions src/paradoc/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ class OneDoc:
FORMATS = ExportFormats

def __init__(
self,
source_dir=None,
main_prefix="00-main",
app_prefix="01-app",
clean_build_dir=True,
create_dirs=False,
output_dir=None,
work_dir="temp",
use_default_html_style=True,
**kwargs,
self,
source_dir=None,
main_prefix="00-main",
app_prefix="01-app",
clean_build_dir=True,
create_dirs=False,
output_dir=None,
work_dir="temp",
use_default_html_style=True,
**kwargs,
):
self.source_dir = pathlib.Path().resolve().absolute() if source_dir is None else pathlib.Path(source_dir)
self.work_dir = pathlib.Path(work_dir).resolve().absolute()
Expand Down Expand Up @@ -138,7 +138,7 @@ def _setup(self, create_dirs, clean_build_dir):
# Check if the figure is commented out
# Get first newline right before regex search found start and till the end (capture entire line)
start = fig.string[: fig.start()].rfind("\n") + 1
end = fig.string[fig.start():].find("\n") + fig.start()
end = fig.string[fig.start() :].find("\n") + fig.start()
line = fig.string[start:end]
if line.startswith("[//]: #"):
continue
Expand Down

0 comments on commit e9b986e

Please sign in to comment.