Skip to content

Commit efff682

Browse files
committed
Copier Template: Split names and type aliases out of internal imports module.
1 parent 64ce962 commit efff682

3 files changed

Lines changed: 33 additions & 3 deletions

File tree

template/sources/{{ package_name }}/__/__init__.py.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@
2222

2323

2424
from .imports import *
25+
from .nomina import *

template/sources/{{ package_name }}/__/imports.py.jinja

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,3 @@ import typing_extensions as typx
3434
import tyro
3535
{%- endif %}
3636
# --- END: Injected by Copier ---
37-
38-
39-
ComparisonResult: typx.TypeAlias = bool | types.NotImplementedType
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# vim: set filetype=python fileencoding=utf-8:
2+
# -*- coding: utf-8 -*-
3+
4+
#============================================================================#
5+
# #
6+
# Licensed under the Apache License, Version 2.0 (the "License"); #
7+
# you may not use this file except in compliance with the License. #
8+
# You may obtain a copy of the License at #
9+
# #
10+
# http://www.apache.org/licenses/LICENSE-2.0 #
11+
# #
12+
# Unless required by applicable law or agreed to in writing, software #
13+
# distributed under the License is distributed on an "AS IS" BASIS, #
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15+
# See the License for the specific language governing permissions and #
16+
# limitations under the License. #
17+
# #
18+
#============================================================================#
19+
20+
21+
''' Common names and type aliases. '''
22+
23+
24+
from . import imports as __
25+
26+
27+
ComparisonResult: __.typx.TypeAlias = bool | __.types.NotImplementedType
28+
NominativeArguments: __.typx.TypeAlias = __.cabc.Mapping[ str, __.typx.Any ]
29+
PositionalArguments: __.typx.TypeAlias = __.cabc.Sequence[ __.typx.Any ]
30+
31+
32+
package_name = __name__.split( '.', maxsplit = 1 )[ 0 ]

0 commit comments

Comments
 (0)