Skip to content

Commit

Permalink
build: copier-auto-update
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Oct 30, 2024
1 parent 4f50b1d commit 125a8f4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Answer file maintained by Copier for: https://github.com/KyleKing/mdformat-plugin-template
# DO NOT MODIFY THIS FILE. Edit by re-running copier and changing responses to the questions
# Check into version control.
_commit: 1.0.0
_commit: 1.0.2
_src_path: gh:KyleKing/mdformat-plugin-template
author_email: [email protected]
author_name: Kyle King
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Installation (deps and package)
# we install with flit --pth-file,
# so that coverage will be recorded for the module
# We install with flit --pth-file, so that coverage will be recorded for the module
# Flit could be installed with pipx and use '--python=$(which python)', but
# there are issues with the Windows Runner
run: |
pipx install flit
pip install flit~=3.9
flit install --deps=production --extras=test --pth-file
- name: Run pytest
run: |
pytest --cov=$(ls | grep "mdformat_" | head) --cov-report=xml --cov-report=term-missing
# Not currently configured
# - name: Upload to Codecov
# if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
# uses: codecov/codecov-action@v1
Expand Down Expand Up @@ -72,7 +74,7 @@ jobs:
uses: actions/checkout@v4
- name: install flit
run: |
pipx install flit~=3.0
pipx install flit~=3.9
- name: Build and publish
run: |
flit publish
Expand Down
10 changes: 2 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
Expand All @@ -27,14 +27,8 @@ repos:
args: [--autofix, --indent=4]
- id: trailing-whitespace
exclude: __snapshots__/.*\.ambr
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.18
hooks:
- id: mdformat
additional_dependencies:
Expand Down
12 changes: 6 additions & 6 deletions mdformat_mkdocs/plugin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""`mdformat` Plugin."""
"""Public Extension."""

from __future__ import annotations

import argparse
from argparse import ArgumentParser
from collections.abc import Mapping
from functools import partial
from typing import Any
Expand Down Expand Up @@ -48,7 +48,7 @@ def cli_is_align_semantic_breaks_in_lists(options: ContextOptions) -> bool:
return options["mdformat"].get("align_semantic_breaks_in_lists", False)


def add_cli_options(parser: argparse.ArgumentParser) -> None:
def add_cli_options(parser: ArgumentParser) -> None:
"""Add options to the mdformat CLI, to be stored in `mdit.options["mdformat"]`."""
parser.add_argument(
"--align-semantic-breaks-in-lists",
Expand Down Expand Up @@ -122,9 +122,9 @@ def _render_cross_reference(node: RenderTreeNode, context: RenderContext) -> str
return _render_with_default_renderer(node, context, "link")


# A mapping from `RenderTreeNode.type` to a `Render` function that can
# render the given `RenderTreeNode` type. These override the default
# `Render` funcs defined in `mdformat.renderer.DEFAULT_RENDERERS`.
# A mapping from syntax tree node type to a function that renders it.
# This can be used to overwrite renderer functions of existing syntax
# or add support for new syntax.
RENDERERS: Mapping[str, Render] = {
"admonition_mkdocs": ADMON_RENDERS["admonition"],
"admonition_mkdocs_title": ADMON_RENDERS["admonition_title"],
Expand Down

0 comments on commit 125a8f4

Please sign in to comment.