Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 18, 2023
1 parent d2eb047 commit c3a04d6
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions wagtail_wordpress_import/importers/wordpress.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def run(self, *args, **kwargs):
item.get("wp:post_type") in kwargs["page_types"]
and item.get("wp:status") in kwargs["page_statuses"]
):

wordpress_item = WordpressItem(item, self.logger)

try:
Expand Down Expand Up @@ -263,7 +262,6 @@ def analyze_html(self, html_analyzer, *, page_types, page_statuses):
item.get("wp:post_type") in page_types
and item.get("wp:status") in page_statuses
):

html_analyzer.analyze(
filter_linebreaks_wp(item.get("content:encoded"))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Command(BaseCommand):

help = """Utils to output xml structure to a json file."""

# def __init__(self, *args, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def add_arguments(self, parser):
)

def handle(self, *args, **options):

parent = None
pages_to_delete = None

Expand Down
2 changes: 0 additions & 2 deletions wagtail_wordpress_import/management/commands/reduce_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def generate_stats_file(file_path, type_stats):


class Command(BaseCommand):

help = """Utils to reduce xml file size by removing unwanted tags."""

"""
Expand All @@ -31,7 +30,6 @@ def add_arguments(self, parser):
parser.add_argument("xml_file", type=str, help="The full path to your xml file")

def get_xml_file(self, xml_file):

if os.path.exists(xml_file):
return xml_file

Expand Down
1 change: 0 additions & 1 deletion wagtail_wordpress_import/prefilters/handle_shortcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def _wrapper(cls):


class BlockShortcodeHandler:

shortcode_name: str

is_top_level_html_tag = True
Expand Down
1 change: 0 additions & 1 deletion wagtail_wordpress_import/test/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


class Migration(migrations.Migration):

streamfield_kwargs = {"use_json_field": True} if WAGTAIL_VERSION >= (3, 0) else {}

initial = True
Expand Down
1 change: 0 additions & 1 deletion wagtail_wordpress_import/test/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class Meta:


class TestPage(WPImportedPageMixin, Page):

streamfield_kwargs = {"use_json_field": True} if WAGTAIL_VERSION >= (3, 0) else {}
body = StreamField(WPImportStreamBlocks, **streamfield_kwargs)

Expand Down
1 change: 0 additions & 1 deletion wagtail_wordpress_import/test/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def test_run_with_xml_and_parent_id(self):
WAGTAIL_WORDPRESS_IMPORTER_SOURCE_DOMAIN="http://www.example.com",
)
class TestImportXmlCommandCompletes(TestCase):

fixtures = [
f"{FIXTURES_PATH}/dump.json",
]
Expand Down
1 change: 0 additions & 1 deletion wagtail_wordpress_import/test/tests/xml_boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def build_xml_stream(xml_tags_fragment="", xml_items_fragment=""):


def generate_temporay_file(xml_stream):

temp_file = tempfile.NamedTemporaryFile(delete=False)

with open(temp_file.name, "w") as f:
Expand Down
1 change: 0 additions & 1 deletion wagtail_wordpress_import/xml_boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def build_xml_stream(xml_tags_fragment="", xml_items_fragment=""):


def generate_temporary_file(xml_stream):

temp_file = tempfile.NamedTemporaryFile(delete=False)

with open(temp_file.name, "w") as f:
Expand Down

0 comments on commit c3a04d6

Please sign in to comment.