From 627ce100520eaf0cab86e87cb0ad5825a7b1251d Mon Sep 17 00:00:00 2001 From: Dan Frankowski Date: Thu, 26 Oct 2023 12:20:02 -0500 Subject: [PATCH] Fix failures from pre-commit run --all, and add to github checks --- .coveragerc | 1 - .github/workflows/main.yml | 6 ++++++ MANIFEST.in | 2 +- RELEASE.md | 3 +++ docs/_static/pelican-logo.svg | 2 +- docs/_static/theme_overrides.css | 1 - pelican/tests/TestPages/draft_page_markdown.md | 2 +- .../content/2012-11-30_md_w_filename_meta#foo-bar.md | 1 - .../content/article_with_markdown_markup_extensions.md | 1 - .../tests/content/article_with_uppercase_metadata.rst | 1 - pelican/tests/content/article_without_category.rst | 1 - pelican/tests/content/bloggerexport.xml | 2 +- pelican/tests/content/empty_with_bom.md | 2 +- pelican/tests/content/wordpress_content_encoded | 1 - pelican/tests/content/wordpressexport.xml | 2 +- pelican/themes/notmyidea/static/css/reset.css | 2 +- pelican/themes/simple/templates/author.html | 1 - pelican/themes/simple/templates/category.html | 1 - samples/content/pages/hidden_page.rst | 1 - samples/content/unbelievable.rst | 10 +++++----- 20 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 RELEASE.md diff --git a/.coveragerc b/.coveragerc index 2cb24879..fdd2cad6 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,2 @@ [report] omit = pelican/tests/* - diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f5a709b6..f950d9e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,6 +55,12 @@ jobs: python --version echo "===== PANDOC =====" pandoc --version | head -2 + # see https://github.com/pre-commit/action/#using-this-action + - name: pre-commit checks + uses: pre-commit/action@v2.0.0 + env: + # it's okay for github to commit to main/master + SKIP: no-commit-to-branch - name: Run tests run: tox -e py${{ matrix.config.python }} diff --git a/MANIFEST.in b/MANIFEST.in index 87d433a8..2416ce79 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,4 +3,4 @@ recursive-include pelican *.html *.css *png *.rst *.markdown *.md *.mkd *.xml *. include LICENSE THANKS docs/changelog.rst pyproject.toml graft samples global-exclude __pycache__ -global-exclude *.py[co] \ No newline at end of file +global-exclude *.py[co] diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..b4fa5da3 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: minor + +Added pre-commit check to github workflows diff --git a/docs/_static/pelican-logo.svg b/docs/_static/pelican-logo.svg index 95b947bf..f36b42fa 100644 --- a/docs/_static/pelican-logo.svg +++ b/docs/_static/pelican-logo.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/docs/_static/theme_overrides.css b/docs/_static/theme_overrides.css index 83afc78e..e840ab6b 100644 --- a/docs/_static/theme_overrides.css +++ b/docs/_static/theme_overrides.css @@ -9,4 +9,3 @@ .wy-table-responsive { overflow: visible !important; } - diff --git a/pelican/tests/TestPages/draft_page_markdown.md b/pelican/tests/TestPages/draft_page_markdown.md index fda71868..0f378a55 100644 --- a/pelican/tests/TestPages/draft_page_markdown.md +++ b/pelican/tests/TestPages/draft_page_markdown.md @@ -9,4 +9,4 @@ Used for pelican test The quick brown fox . -This page is a draft \ No newline at end of file +This page is a draft diff --git a/pelican/tests/content/2012-11-30_md_w_filename_meta#foo-bar.md b/pelican/tests/content/2012-11-30_md_w_filename_meta#foo-bar.md index cdccfc8a..8b3c0bcf 100644 --- a/pelican/tests/content/2012-11-30_md_w_filename_meta#foo-bar.md +++ b/pelican/tests/content/2012-11-30_md_w_filename_meta#foo-bar.md @@ -3,4 +3,3 @@ author: Alexis Métaireau Markdown with filename metadata =============================== - diff --git a/pelican/tests/content/article_with_markdown_markup_extensions.md b/pelican/tests/content/article_with_markdown_markup_extensions.md index 6cf56403..7eff4dcb 100644 --- a/pelican/tests/content/article_with_markdown_markup_extensions.md +++ b/pelican/tests/content/article_with_markdown_markup_extensions.md @@ -5,4 +5,3 @@ Title: Test Markdown extensions ## Level1 ### Level2 - diff --git a/pelican/tests/content/article_with_uppercase_metadata.rst b/pelican/tests/content/article_with_uppercase_metadata.rst index e26cdd13..ee79f55a 100644 --- a/pelican/tests/content/article_with_uppercase_metadata.rst +++ b/pelican/tests/content/article_with_uppercase_metadata.rst @@ -3,4 +3,3 @@ This is a super article ! ######################### :Category: Yeah - diff --git a/pelican/tests/content/article_without_category.rst b/pelican/tests/content/article_without_category.rst index ff47f6ef..1cfcba71 100644 --- a/pelican/tests/content/article_without_category.rst +++ b/pelican/tests/content/article_without_category.rst @@ -3,4 +3,3 @@ This is an article without category ! ##################################### This article should be in the DEFAULT_CATEGORY. - diff --git a/pelican/tests/content/bloggerexport.xml b/pelican/tests/content/bloggerexport.xml index 4bc0985a..a3b9cdf2 100644 --- a/pelican/tests/content/bloggerexport.xml +++ b/pelican/tests/content/bloggerexport.xml @@ -1064,4 +1064,4 @@ - \ No newline at end of file + diff --git a/pelican/tests/content/empty_with_bom.md b/pelican/tests/content/empty_with_bom.md index 5f282702..e02abfc9 100644 --- a/pelican/tests/content/empty_with_bom.md +++ b/pelican/tests/content/empty_with_bom.md @@ -1 +1 @@ - \ No newline at end of file + diff --git a/pelican/tests/content/wordpress_content_encoded b/pelican/tests/content/wordpress_content_encoded index da35de3b..eefff1e9 100644 --- a/pelican/tests/content/wordpress_content_encoded +++ b/pelican/tests/content/wordpress_content_encoded @@ -52,4 +52,3 @@ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - diff --git a/pelican/tests/content/wordpressexport.xml b/pelican/tests/content/wordpressexport.xml index 4f5b3651..81ed7ea3 100644 --- a/pelican/tests/content/wordpressexport.xml +++ b/pelican/tests/content/wordpressexport.xml @@ -838,7 +838,7 @@ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]>_edit_last - + A 2nd custom post type also in category 5 http://thisisa.test/?p=177 diff --git a/pelican/themes/notmyidea/static/css/reset.css b/pelican/themes/notmyidea/static/css/reset.css index c88e6196..f5123cf6 100644 --- a/pelican/themes/notmyidea/static/css/reset.css +++ b/pelican/themes/notmyidea/static/css/reset.css @@ -49,4 +49,4 @@ del {text-decoration: line-through;} table { border-collapse: collapse; border-spacing: 0; -} \ No newline at end of file +} diff --git a/pelican/themes/simple/templates/author.html b/pelican/themes/simple/templates/author.html index 79d22c7d..3a5d70b7 100644 --- a/pelican/themes/simple/templates/author.html +++ b/pelican/themes/simple/templates/author.html @@ -5,4 +5,3 @@ {% block content_title %}

Articles by {{ author }}

{% endblock %} - diff --git a/pelican/themes/simple/templates/category.html b/pelican/themes/simple/templates/category.html index d73f6e31..56902bd2 100644 --- a/pelican/themes/simple/templates/category.html +++ b/pelican/themes/simple/templates/category.html @@ -5,4 +5,3 @@ {% block content_title %}

Articles in the {{ category }} category

{% endblock %} - diff --git a/samples/content/pages/hidden_page.rst b/samples/content/pages/hidden_page.rst index ab8704ed..b1f52d95 100644 --- a/samples/content/pages/hidden_page.rst +++ b/samples/content/pages/hidden_page.rst @@ -6,4 +6,3 @@ This is a test hidden page This is great for things like error(404) pages Anyone can see this page but it's not linked to anywhere! - diff --git a/samples/content/unbelievable.rst b/samples/content/unbelievable.rst index 209e3557..afa502cf 100644 --- a/samples/content/unbelievable.rst +++ b/samples/content/unbelievable.rst @@ -45,7 +45,7 @@ Testing more sourcecode directives :lineseparator:
:linespans: foo :nobackground: - + def run(self): self.assert_has_content() try: @@ -76,8 +76,8 @@ Testing even more sourcecode directives .. sourcecode:: python :linenos: table :nowrap: - - + + formatter = self.options and VARIANTS[self.options.keys()[0]] @@ -90,8 +90,8 @@ Even if the default is line numbers, we can override it here .. sourcecode:: python :linenos: none - - + + formatter = self.options and VARIANTS[self.options.keys()[0]]