Skip to content

Commit

Permalink
fix several nested f-string quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorTroy authored and LukeCarrier committed Apr 23, 2024
1 parent bc5a237 commit e2e2cf5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mkdocs_drawio_exporter/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def replace(match):
source = Source(filename, page_index)
source.resolve_rel_path(page_dest_path)
content_sources.append(source)
img_src = f"{filename}-{page_index}.{config["format"]}"
img_src = f"{filename}-{page_index}.{config['format']}"

# Cache the file on-demand and read file content only if we
# need to inline the file's content.
Expand Down
8 changes: 4 additions & 4 deletions mkdocs_drawio_exporter/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def on_config(self, config):

os.makedirs(self.config['cache_dir'], exist_ok=True)

log.debug(f'Using Draw.io executable "{self.config['drawio_executable']}", '
f'arguments {self.config['drawio_args']} and '
f'cache directory "{self.config['cache_dir']}"')
log.debug(f'Using Draw.io executable "{self.config["drawio_executable"]}", '
f'arguments {self.config["drawio_args"]} and '
f'cache directory "{self.config["cache_dir"]}"')

def on_post_page(self, output_content, page, **kwargs):
output_content, content_sources = self.exporter.rewrite_image_embeds(
Expand All @@ -73,7 +73,7 @@ def on_post_build(self, config):
self.sources = []

for source in sources:
dest_rel_path = f'{source.source_rel}-{source.page_index}.{self.config['format']}'
dest_rel_path = f'{source.source_rel}-{source.page_index}.{self.config["format"]}'
abs_src_path = os.path.join(config['docs_dir'], source.source_rel)
abs_dest_path = os.path.join(config['site_dir'], dest_rel_path)
cache_filename, exit_status = self.exporter.ensure_file_cached(
Expand Down

0 comments on commit e2e2cf5

Please sign in to comment.