Skip to content

Add section after imports and before dependencies #44

@ialarmedalien

Description

@ialarmedalien

Describe

When generating classes with a custom template, I need to add some extra initialisation matter after the imports and before the list of classes, e.g.

from pydantic import Field
import pydantic
from typing import Any, Dict, List, Literal, Optional, Union
import dataclasses
[ ... ]

# some additional initialisations here
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

class WeakRefBaseModel(pydantic.BaseModel):
    __slots__ = '__weakref__'

# class list starts here

Do you have any objections to the module being extended in this manner?

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLICommand line agruments and related codeenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions