From 6a3224eeec68768b4ad1657f16c2be982913497a Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 11 Feb 2023 17:37:02 +0100 Subject: [PATCH] Bugfix/715 merge (#719) * Fix pre-commit flake8 repo url And autoupdate module to their latest versions, unless flake8 (5.0.4) because flake8-broken-line is not compatible with flake8 6.0.0 * Reformat for black update * Remove python 3.6 from test matrix * Fix langyage * Skip towncrier in precommit-ci --------- Co-authored-by: Adrien Delhorme --- .github/workflows/test.yml | 2 +- .pre-commit-config.yaml | 18 +++++++++------ changes/715.bugfix | 1 + djangocms_blog/feeds.py | 2 +- .../liveblog/migrations/0001_initial.py | 1 - .../migrations/0002_liveblog_title.py | 1 - .../migrations/0003_auto_20160917_0123.py | 1 - djangocms_blog/migrations/0001_initial.py | 1 - djangocms_blog/migrations/0002_post_sites.py | 1 - .../migrations/0003_auto_20141201_2252.py | 1 - .../migrations/0004_auto_20150108_1435.py | 1 - .../migrations/0005_auto_20150212_1118.py | 1 - .../migrations/0006_auto_20150214_1907.py | 1 - .../migrations/0007_auto_20150719_0933.py | 1 - .../migrations/0008_auto_20150814_0831.py | 1 - .../0009_latestpostsplugin_tags_new.py | 1 - .../migrations/0010_auto_20150923_1151.py | 1 - .../migrations/0011_auto_20151024_1809.py | 1 - .../migrations/0012_auto_20151220_1734.py | 1 - .../migrations/0013_auto_20160201_2235.py | 1 - .../migrations/0014_auto_20160215_1331.py | 1 - .../migrations/0015_auto_20160408_1849.py | 1 - .../migrations/0016_auto_20160502_1741.py | 1 - .../migrations/0017_thumbnail_move.py | 1 - .../migrations/0018_thumbnail_move2.py | 1 - .../migrations/0020_thumbnail_move4.py | 1 - .../migrations/0021_auto_20160823_2008.py | 1 - .../migrations/0021_post_liveblog.py | 1 - .../migrations/0022_auto_20160605_2305.py | 1 - .../migrations/0023_auto_20160626_1539.py | 1 - .../migrations/0024_auto_20160706_1524.py | 1 - .../migrations/0025_auto_20160803_0858.py | 1 - djangocms_blog/migrations/0026_merge.py | 1 - .../migrations/0027_post_date_featured.py | 1 - .../migrations/0029_post_related.py | 1 - .../migrations/0030_auto_20170509_1831.py | 1 - .../migrations/0031_auto_20170610_1744.py | 1 - .../migrations/0032_auto_20180109_0023.py | 1 - .../migrations/0033_auto_20180226_1410.py | 1 - djangocms_blog/migrations/0034_merge.py | 1 - .../0035_posttranslation_subtitle.py | 1 - .../migrations/0036_auto_20180913_1809.py | 1 - .../migrations/0037_auto_20190806_0743.py | 1 - djangocms_blog/migrations/0038_post_media.py | 1 - .../migrations/0039_auto_20200331_2227.py | 1 - djangocms_blog/search_indexes.py | 1 - docs/conf.py | 2 +- tasks.py | 22 +++++++++---------- tests/media_app/migrations/0001_initial.py | 1 - tests/test_extension.py | 8 +++---- tests/test_setup.py | 2 -- tests/test_utils/migrations/0001_initial.py | 1 - .../migrations/0002_auto_20200516_1230.py | 1 - tests/test_views.py | 2 -- 54 files changed, 30 insertions(+), 74 deletions(-) create mode 100644 changes/715.bugfix diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 68ae348b..244d8f57 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.8, 3.7, 3.6] + python-version: [3.9, 3.8, 3.7] django: [31, 30, 22] cms: [38, 37] exclude: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 30dc5aac..be0db05c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: "(.idea|node_modules|.tox)" repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -17,15 +17,15 @@ repos: args: - --remove - repo: https://github.com/timothycrosley/isort - rev: "5.6.4" + rev: "5.12.0" hooks: - id: isort - repo: https://github.com/psf/black - rev: 20.8b1 + rev: 23.1.0 hooks: - id: black - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.4 + - repo: https://github.com/PyCQA/flake8 + rev: 5.0.4 hooks: - id: flake8 additional_dependencies: @@ -40,14 +40,14 @@ repos: - flake8-tidy-imports - pep8-naming - repo: https://github.com/econchick/interrogate - rev: 1.3.1 + rev: 1.5.0 hooks: - id: interrogate args: - "-cpyproject.toml" - "--quiet" - repo: https://github.com/asottile/pyupgrade - rev: v2.7.3 + rev: v3.3.1 hooks: - id: pyupgrade args: @@ -60,3 +60,7 @@ repos: language: system pass_filenames: false always_run: true + +ci: + skip: + - towncrier diff --git a/changes/715.bugfix b/changes/715.bugfix new file mode 100644 index 00000000..eab9f2a9 --- /dev/null +++ b/changes/715.bugfix @@ -0,0 +1 @@ +Fix pre-commit flake8 repo url diff --git a/djangocms_blog/feeds.py b/djangocms_blog/feeds.py index e7ba0c1d..5e215298 100644 --- a/djangocms_blog/feeds.py +++ b/djangocms_blog/feeds.py @@ -1,4 +1,5 @@ from html import unescape +from io import BytesIO from aldryn_apphooks_config.utils import get_app_instance from django.contrib.sites.models import Site @@ -12,7 +13,6 @@ from django.utils.text import normalize_newlines from django.utils.translation import get_language_from_request, gettext as _ from lxml import etree -from six import BytesIO from djangocms_blog.settings import get_setting from djangocms_blog.views import PostDetailView diff --git a/djangocms_blog/liveblog/migrations/0001_initial.py b/djangocms_blog/liveblog/migrations/0001_initial.py index 03bc51ce..a1d6ff18 100644 --- a/djangocms_blog/liveblog/migrations/0001_initial.py +++ b/djangocms_blog/liveblog/migrations/0001_initial.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("cms", "0013_urlconfrevision"), ("filer", "0003_thumbnailoption"), diff --git a/djangocms_blog/liveblog/migrations/0002_liveblog_title.py b/djangocms_blog/liveblog/migrations/0002_liveblog_title.py index dfecb9c8..0066e286 100644 --- a/djangocms_blog/liveblog/migrations/0002_liveblog_title.py +++ b/djangocms_blog/liveblog/migrations/0002_liveblog_title.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("liveblog", "0001_initial"), ] diff --git a/djangocms_blog/liveblog/migrations/0003_auto_20160917_0123.py b/djangocms_blog/liveblog/migrations/0003_auto_20160917_0123.py index d58cf6ee..5c131aac 100644 --- a/djangocms_blog/liveblog/migrations/0003_auto_20160917_0123.py +++ b/djangocms_blog/liveblog/migrations/0003_auto_20160917_0123.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("liveblog", "0002_liveblog_title"), ] diff --git a/djangocms_blog/migrations/0001_initial.py b/djangocms_blog/migrations/0001_initial.py index 529d5355..9de0d29c 100644 --- a/djangocms_blog/migrations/0001_initial.py +++ b/djangocms_blog/migrations/0001_initial.py @@ -14,7 +14,6 @@ class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), migrations.swappable_dependency(ACTUAL_FILER_IMAGE_MODEL), diff --git a/djangocms_blog/migrations/0002_post_sites.py b/djangocms_blog/migrations/0002_post_sites.py index b9dedfc0..2f86f2bd 100644 --- a/djangocms_blog/migrations/0002_post_sites.py +++ b/djangocms_blog/migrations/0002_post_sites.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("sites", "__first__"), ("djangocms_blog", "0001_initial"), diff --git a/djangocms_blog/migrations/0003_auto_20141201_2252.py b/djangocms_blog/migrations/0003_auto_20141201_2252.py index ba35353d..87d99653 100644 --- a/djangocms_blog/migrations/0003_auto_20141201_2252.py +++ b/djangocms_blog/migrations/0003_auto_20141201_2252.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0002_post_sites"), ] diff --git a/djangocms_blog/migrations/0004_auto_20150108_1435.py b/djangocms_blog/migrations/0004_auto_20150108_1435.py index 6d77faa1..245bb3fb 100644 --- a/djangocms_blog/migrations/0004_auto_20150108_1435.py +++ b/djangocms_blog/migrations/0004_auto_20150108_1435.py @@ -9,7 +9,6 @@ class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(ACTUAL_FILER_IMAGE_MODEL), ("djangocms_blog", "0003_auto_20141201_2252"), diff --git a/djangocms_blog/migrations/0005_auto_20150212_1118.py b/djangocms_blog/migrations/0005_auto_20150212_1118.py index 676f4a11..f449070d 100644 --- a/djangocms_blog/migrations/0005_auto_20150212_1118.py +++ b/djangocms_blog/migrations/0005_auto_20150212_1118.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0004_auto_20150108_1435"), ] diff --git a/djangocms_blog/migrations/0006_auto_20150214_1907.py b/djangocms_blog/migrations/0006_auto_20150214_1907.py index 63f37ada..514b0690 100644 --- a/djangocms_blog/migrations/0006_auto_20150214_1907.py +++ b/djangocms_blog/migrations/0006_auto_20150214_1907.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0005_auto_20150212_1118"), ] diff --git a/djangocms_blog/migrations/0007_auto_20150719_0933.py b/djangocms_blog/migrations/0007_auto_20150719_0933.py index cf0be381..3bcd5f3a 100644 --- a/djangocms_blog/migrations/0007_auto_20150719_0933.py +++ b/djangocms_blog/migrations/0007_auto_20150719_0933.py @@ -12,7 +12,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0006_auto_20150214_1907"), migrations.swappable_dependency(ACTUAL_FILER_IMAGE_MODEL), diff --git a/djangocms_blog/migrations/0008_auto_20150814_0831.py b/djangocms_blog/migrations/0008_auto_20150814_0831.py index ba20b3e7..8342efaa 100644 --- a/djangocms_blog/migrations/0008_auto_20150814_0831.py +++ b/djangocms_blog/migrations/0008_auto_20150814_0831.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0007_auto_20150719_0933"), ] diff --git a/djangocms_blog/migrations/0009_latestpostsplugin_tags_new.py b/djangocms_blog/migrations/0009_latestpostsplugin_tags_new.py index de2858ae..7a56c3a8 100644 --- a/djangocms_blog/migrations/0009_latestpostsplugin_tags_new.py +++ b/djangocms_blog/migrations/0009_latestpostsplugin_tags_new.py @@ -28,7 +28,6 @@ def migrate_tags_reverse(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("taggit", "__first__"), ("djangocms_blog", "0008_auto_20150814_0831"), diff --git a/djangocms_blog/migrations/0010_auto_20150923_1151.py b/djangocms_blog/migrations/0010_auto_20150923_1151.py index 4fccef5b..f6bf1ddc 100644 --- a/djangocms_blog/migrations/0010_auto_20150923_1151.py +++ b/djangocms_blog/migrations/0010_auto_20150923_1151.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("cms", "__first__"), ("djangocms_blog", "0009_latestpostsplugin_tags_new"), diff --git a/djangocms_blog/migrations/0011_auto_20151024_1809.py b/djangocms_blog/migrations/0011_auto_20151024_1809.py index 26e308e1..a5fa9551 100644 --- a/djangocms_blog/migrations/0011_auto_20151024_1809.py +++ b/djangocms_blog/migrations/0011_auto_20151024_1809.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0010_auto_20150923_1151"), ] diff --git a/djangocms_blog/migrations/0012_auto_20151220_1734.py b/djangocms_blog/migrations/0012_auto_20151220_1734.py index 395b21c4..e572438f 100644 --- a/djangocms_blog/migrations/0012_auto_20151220_1734.py +++ b/djangocms_blog/migrations/0012_auto_20151220_1734.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0011_auto_20151024_1809"), ] diff --git a/djangocms_blog/migrations/0013_auto_20160201_2235.py b/djangocms_blog/migrations/0013_auto_20160201_2235.py index 62763f04..d8ec9b1f 100644 --- a/djangocms_blog/migrations/0013_auto_20160201_2235.py +++ b/djangocms_blog/migrations/0013_auto_20160201_2235.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0012_auto_20151220_1734"), ] diff --git a/djangocms_blog/migrations/0014_auto_20160215_1331.py b/djangocms_blog/migrations/0014_auto_20160215_1331.py index 1e4f560c..1fed23cc 100644 --- a/djangocms_blog/migrations/0014_auto_20160215_1331.py +++ b/djangocms_blog/migrations/0014_auto_20160215_1331.py @@ -33,7 +33,6 @@ def backwards(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("cms", "0004_auto_20140924_1038"), ("djangocms_blog", "0013_auto_20160201_2235"), diff --git a/djangocms_blog/migrations/0015_auto_20160408_1849.py b/djangocms_blog/migrations/0015_auto_20160408_1849.py index a22e1d32..4f1a3c96 100644 --- a/djangocms_blog/migrations/0015_auto_20160408_1849.py +++ b/djangocms_blog/migrations/0015_auto_20160408_1849.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0014_auto_20160215_1331"), ] diff --git a/djangocms_blog/migrations/0016_auto_20160502_1741.py b/djangocms_blog/migrations/0016_auto_20160502_1741.py index 54244b86..26803eee 100644 --- a/djangocms_blog/migrations/0016_auto_20160502_1741.py +++ b/djangocms_blog/migrations/0016_auto_20160502_1741.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0015_auto_20160408_1849"), ] diff --git a/djangocms_blog/migrations/0017_thumbnail_move.py b/djangocms_blog/migrations/0017_thumbnail_move.py index 1c90b634..fdbd4485 100644 --- a/djangocms_blog/migrations/0017_thumbnail_move.py +++ b/djangocms_blog/migrations/0017_thumbnail_move.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("filer", "0003_thumbnailoption"), ("djangocms_blog", "0016_auto_20160502_1741"), diff --git a/djangocms_blog/migrations/0018_thumbnail_move2.py b/djangocms_blog/migrations/0018_thumbnail_move2.py index 9bc3946c..2ba21a5c 100644 --- a/djangocms_blog/migrations/0018_thumbnail_move2.py +++ b/djangocms_blog/migrations/0018_thumbnail_move2.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - if "cmsplugin_filer" not in thumbnail_model: dependencies = [ ("djangocms_blog", "0017_thumbnail_move"), diff --git a/djangocms_blog/migrations/0020_thumbnail_move4.py b/djangocms_blog/migrations/0020_thumbnail_move4.py index 695c87d1..2015970e 100644 --- a/djangocms_blog/migrations/0020_thumbnail_move4.py +++ b/djangocms_blog/migrations/0020_thumbnail_move4.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - if "cmsplugin_filer" not in thumbnail_model: dependencies = [ ("djangocms_blog", "0019_thumbnail_move3"), diff --git a/djangocms_blog/migrations/0021_auto_20160823_2008.py b/djangocms_blog/migrations/0021_auto_20160823_2008.py index f0a2dcc2..4d9efb3f 100644 --- a/djangocms_blog/migrations/0021_auto_20160823_2008.py +++ b/djangocms_blog/migrations/0021_auto_20160823_2008.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0020_thumbnail_move4"), ] diff --git a/djangocms_blog/migrations/0021_post_liveblog.py b/djangocms_blog/migrations/0021_post_liveblog.py index 8f13abac..46048d97 100644 --- a/djangocms_blog/migrations/0021_post_liveblog.py +++ b/djangocms_blog/migrations/0021_post_liveblog.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("cms", "__first__"), ("djangocms_blog", "0020_thumbnail_move4"), diff --git a/djangocms_blog/migrations/0022_auto_20160605_2305.py b/djangocms_blog/migrations/0022_auto_20160605_2305.py index 27d98d9e..3c42e30f 100644 --- a/djangocms_blog/migrations/0022_auto_20160605_2305.py +++ b/djangocms_blog/migrations/0022_auto_20160605_2305.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0021_post_liveblog"), ] diff --git a/djangocms_blog/migrations/0023_auto_20160626_1539.py b/djangocms_blog/migrations/0023_auto_20160626_1539.py index b6d07946..11f6db46 100644 --- a/djangocms_blog/migrations/0023_auto_20160626_1539.py +++ b/djangocms_blog/migrations/0023_auto_20160626_1539.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0022_auto_20160605_2305"), ] diff --git a/djangocms_blog/migrations/0024_auto_20160706_1524.py b/djangocms_blog/migrations/0024_auto_20160706_1524.py index 806bc16f..267d41ef 100644 --- a/djangocms_blog/migrations/0024_auto_20160706_1524.py +++ b/djangocms_blog/migrations/0024_auto_20160706_1524.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0023_auto_20160626_1539"), ] diff --git a/djangocms_blog/migrations/0025_auto_20160803_0858.py b/djangocms_blog/migrations/0025_auto_20160803_0858.py index 7ca7c20e..755af986 100644 --- a/djangocms_blog/migrations/0025_auto_20160803_0858.py +++ b/djangocms_blog/migrations/0025_auto_20160803_0858.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0024_auto_20160706_1524"), ] diff --git a/djangocms_blog/migrations/0026_merge.py b/djangocms_blog/migrations/0026_merge.py index a056b6b6..4c11c80e 100644 --- a/djangocms_blog/migrations/0026_merge.py +++ b/djangocms_blog/migrations/0026_merge.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0021_auto_20160823_2008"), ("djangocms_blog", "0025_auto_20160803_0858"), diff --git a/djangocms_blog/migrations/0027_post_date_featured.py b/djangocms_blog/migrations/0027_post_date_featured.py index ade5a88d..359ae45d 100644 --- a/djangocms_blog/migrations/0027_post_date_featured.py +++ b/djangocms_blog/migrations/0027_post_date_featured.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0026_merge"), ] diff --git a/djangocms_blog/migrations/0029_post_related.py b/djangocms_blog/migrations/0029_post_related.py index a3abfd1c..7043ea67 100644 --- a/djangocms_blog/migrations/0029_post_related.py +++ b/djangocms_blog/migrations/0029_post_related.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0028_auto_20170304_1040"), ] diff --git a/djangocms_blog/migrations/0030_auto_20170509_1831.py b/djangocms_blog/migrations/0030_auto_20170509_1831.py index 1412c6e2..dcc979c0 100644 --- a/djangocms_blog/migrations/0030_auto_20170509_1831.py +++ b/djangocms_blog/migrations/0030_auto_20170509_1831.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0029_post_related"), ] diff --git a/djangocms_blog/migrations/0031_auto_20170610_1744.py b/djangocms_blog/migrations/0031_auto_20170610_1744.py index e86742fe..956e2824 100644 --- a/djangocms_blog/migrations/0031_auto_20170610_1744.py +++ b/djangocms_blog/migrations/0031_auto_20170610_1744.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0030_auto_20170509_1831"), ] diff --git a/djangocms_blog/migrations/0032_auto_20180109_0023.py b/djangocms_blog/migrations/0032_auto_20180109_0023.py index 0d71c3ea..c6588027 100644 --- a/djangocms_blog/migrations/0032_auto_20180109_0023.py +++ b/djangocms_blog/migrations/0032_auto_20180109_0023.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0031_auto_20170610_1744"), ] diff --git a/djangocms_blog/migrations/0033_auto_20180226_1410.py b/djangocms_blog/migrations/0033_auto_20180226_1410.py index 4e639e93..33107ae5 100644 --- a/djangocms_blog/migrations/0033_auto_20180226_1410.py +++ b/djangocms_blog/migrations/0033_auto_20180226_1410.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0032_auto_20180109_0023"), ] diff --git a/djangocms_blog/migrations/0034_merge.py b/djangocms_blog/migrations/0034_merge.py index 43144a4f..3f502d1b 100644 --- a/djangocms_blog/migrations/0034_merge.py +++ b/djangocms_blog/migrations/0034_merge.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0022_auto_20170304_1040"), ("djangocms_blog", "0033_auto_20180226_1410"), diff --git a/djangocms_blog/migrations/0035_posttranslation_subtitle.py b/djangocms_blog/migrations/0035_posttranslation_subtitle.py index bc721dc1..01aad1f6 100644 --- a/djangocms_blog/migrations/0035_posttranslation_subtitle.py +++ b/djangocms_blog/migrations/0035_posttranslation_subtitle.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0034_merge"), ] diff --git a/djangocms_blog/migrations/0036_auto_20180913_1809.py b/djangocms_blog/migrations/0036_auto_20180913_1809.py index 920f7017..8b3fe7b5 100644 --- a/djangocms_blog/migrations/0036_auto_20180913_1809.py +++ b/djangocms_blog/migrations/0036_auto_20180913_1809.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0035_posttranslation_subtitle"), ] diff --git a/djangocms_blog/migrations/0037_auto_20190806_0743.py b/djangocms_blog/migrations/0037_auto_20190806_0743.py index 5057c127..13e3501d 100644 --- a/djangocms_blog/migrations/0037_auto_20190806_0743.py +++ b/djangocms_blog/migrations/0037_auto_20190806_0743.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0036_auto_20180913_1809"), ] diff --git a/djangocms_blog/migrations/0038_post_media.py b/djangocms_blog/migrations/0038_post_media.py index 771e63e2..a8490ca6 100644 --- a/djangocms_blog/migrations/0038_post_media.py +++ b/djangocms_blog/migrations/0038_post_media.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("cms", "0020_old_tree_cleanup"), ("djangocms_blog", "0037_auto_20190806_0743"), diff --git a/djangocms_blog/migrations/0039_auto_20200331_2227.py b/djangocms_blog/migrations/0039_auto_20200331_2227.py index d6ca25a8..fa4445c8 100644 --- a/djangocms_blog/migrations/0039_auto_20200331_2227.py +++ b/djangocms_blog/migrations/0039_auto_20200331_2227.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("djangocms_blog", "0038_post_media"), ] diff --git a/djangocms_blog/search_indexes.py b/djangocms_blog/search_indexes.py index f7b688bb..970d9217 100644 --- a/djangocms_blog/search_indexes.py +++ b/djangocms_blog/search_indexes.py @@ -77,6 +77,5 @@ def get_search_data(self, post, language, request): return " ".join(text_bits) - except ImportError: pass diff --git a/docs/conf.py b/docs/conf.py index 850acb94..6e013bbb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -81,7 +81,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/tasks.py b/tasks.py index 82261dda..753283c4 100644 --- a/tasks.py +++ b/tasks.py @@ -13,7 +13,7 @@ @task def clean(c): - """ Remove artifacts and binary files. """ + """Remove artifacts and binary files.""" c.run("python setup.py clean --all") patterns = ["build", "dist"] patterns.extend(glob("*.egg*")) @@ -25,19 +25,19 @@ def clean(c): @task def lint(c): - """ Run linting tox environments. """ + """Run linting tox environments.""" c.run("tox -epep8,isort,black,pypi-description") @task # NOQA def format(c): # NOQA - """ Run code formatting tasks. """ + """Run code formatting tasks.""" c.run("tox -eblacken,isort_format") @task def towncrier_check(c): # NOQA - """ Check towncrier files. """ + """Check towncrier files.""" output = io.StringIO() c.run("git branch --contains HEAD", out_stream=output) skipped_branch_prefix = ["pull/", "develop", "master", "HEAD"] @@ -90,19 +90,19 @@ def towncrier_check(c): # NOQA @task def test(c): - """ Run test in local environment. """ + """Run test in local environment.""" c.run("python setup.py test") @task def test_all(c): - """ Run all tox environments. """ + """Run all tox environments.""" c.run("tox") @task def coverage(c): - """ Run test with coverage in local environment. """ + """Run test with coverage in local environment.""" c.run("coverage erase") c.run("run setup.py test") c.run("report -m") @@ -110,19 +110,19 @@ def coverage(c): @task def tag_release(c, level): - """ Tag release version. """ + """Tag release version.""" c.run("bumpversion --list %s --no-tag" % level) @task def tag_dev(c, level="patch"): - """ Tag development version. """ + """Tag development version.""" c.run("bumpversion --list %s --message='Bump develop version [ci skip]' --no-tag" % level) @task(pre=[clean]) def docbuild(c): - """ Build documentation. """ + """Build documentation.""" os.chdir("docs") build_dir = os.environ.get("BUILD_DIR", "_build/html") c.run("python -msphinx -W -b html -d _build/doctrees . %s" % build_dir) @@ -130,7 +130,7 @@ def docbuild(c): @task(docbuild) def docserve(c): - """ Serve docs at http://localhost:$DOCS_PORT/ (default port is 8000). """ + """Serve docs at http://localhost:$DOCS_PORT/ (default port is 8000).""" from livereload import Server server = Server() diff --git a/tests/media_app/migrations/0001_initial.py b/tests/media_app/migrations/0001_initial.py index cb54fa84..9b286ea1 100644 --- a/tests/media_app/migrations/0001_initial.py +++ b/tests/media_app/migrations/0001_initial.py @@ -7,7 +7,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/tests/test_extension.py b/tests/test_extension.py index 0b1b742f..15e034a0 100644 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -21,19 +21,19 @@ def test_register_placeholder_extension(self): def test_register_placeholder_extension_twice(self): djangocms_blog.admin.register_extension(PostPlaceholderExtension) - with self.assertRaises(Exception): + with self.assertRaises(Exception): # noqa: B017 djangocms_blog.admin.register_extension(PostPlaceholderExtension) djangocms_blog.admin.unregister_extension(PostPlaceholderExtension) - with self.assertRaises(Exception): + with self.assertRaises(Exception): # noqa: B017 djangocms_blog.admin.unregister_extension(PostPlaceholderExtension) def test_register_other(self): class X: pass - with self.assertRaises(Exception): + with self.assertRaises(Exception): # noqa: B017 djangocms_blog.admin.register_extension(X) - with self.assertRaises(Exception): + with self.assertRaises(Exception): # noqa: B017 djangocms_blog.admin.register_extension(X) def test_placeholder_object_auto_created(self): diff --git a/tests/test_setup.py b/tests/test_setup.py index 06399477..17a7b983 100644 --- a/tests/test_setup.py +++ b/tests/test_setup.py @@ -38,7 +38,6 @@ def setUp(self): apphook_pool.clear() def test_setup_from_url(self): - # Tests starts with no page and no config self.assertFalse(Page.objects.exists()) self.assertFalse(BlogConfig.objects.exists()) @@ -51,7 +50,6 @@ def test_setup_from_url(self): self.assertEqual(BlogConfig.objects.count(), 1) def test_setup_filled(self): - # Tests starts with no page and no config self.assertFalse(Page.objects.exists()) self.assertFalse(BlogConfig.objects.exists()) diff --git a/tests/test_utils/migrations/0001_initial.py b/tests/test_utils/migrations/0001_initial.py index 5d770e7a..ff623cbb 100644 --- a/tests/test_utils/migrations/0001_initial.py +++ b/tests/test_utils/migrations/0001_initial.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("auth", "__first__"), ("sites", "__first__"), diff --git a/tests/test_utils/migrations/0002_auto_20200516_1230.py b/tests/test_utils/migrations/0002_auto_20200516_1230.py index 54798997..b48462f9 100644 --- a/tests/test_utils/migrations/0002_auto_20200516_1230.py +++ b/tests/test_utils/migrations/0002_auto_20200516_1230.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [ ("cms", "0022_auto_20180620_1551"), ("djangocms_blog", "0039_auto_20200331_2227"), diff --git a/tests/test_views.py b/tests/test_views.py index cdf3dc43..0b76409e 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -185,7 +185,6 @@ def test_post_list_view_fallback(self): PARLER_FALLBACK = add_default_language_settings(PARLER_FALLBACK) # noqa: N806 with override_parler_settings(PARLER_LANGUAGES=PARLER_FALLBACK): - view_obj = PostListView() request = self.get_page_request(pages[1], self.user, lang="fr", edit=True) view_obj.request = request @@ -398,7 +397,6 @@ def test_feed(self): with smart_override("en"): with switch_language(posts[0], "en"): - request = self.get_page_request(pages[1], self.user, path=posts[0].get_absolute_url()) feed = LatestEntriesFeed()