Coverage for sources / detextive / nomina.py: 100%
11 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-02-14 04:38 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-02-14 04:38 +0000
1# vim: set filetype=python fileencoding=utf-8:
2# -*- coding: utf-8 -*-
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#============================================================================#
21''' Common names and type aliases. '''
24from . import __
27Content: __.typx.TypeAlias = __.typx.Annotated[
28 bytes,
29 __.ddoc.Doc( ''' Raw byte content for analysis. ''' ),
30]
31Location: __.typx.TypeAlias = __.typx.Annotated[
32 str | __.os.PathLike[ str ],
33 __.ddoc.Doc( ''' Local filesystem location or URL for context. ''' ),
34]
36CharsetAssumptionArgument: __.typx.TypeAlias = __.typx.Annotated[
37 __.Absential[ str ],
38 __.ddoc.Doc(
39 ''' Character set hint to influence MIME type detection. ''' ),
40]
41CharsetDefaultArgument: __.typx.TypeAlias = __.typx.Annotated[
42 str,
43 __.ddoc.Doc(
44 ''' Fallback character set returned on inference/detection failure.
45 ''' ),
46]
47CharsetSupplementArgument: __.typx.TypeAlias = __.typx.Annotated[
48 __.Absential[ str ],
49 __.ddoc.Doc(
50 ''' User-supplied character set hint for trial decode attempts. ''' ),
51]
52HttpContentTypeArgument: __.typx.TypeAlias = __.typx.Annotated[
53 __.Absential[ str ],
54 __.ddoc.Doc( ''' HTTP Content-Type header for parsing context. ''' ),
55]
56LocationArgument: __.typx.TypeAlias = __.typx.Annotated[
57 __.Absential[ Location ],
58 __.ddoc.Doc( ''' File location or URL for error reporting context. ''' ),
59]
60MimetypeAssumptionArgument: __.typx.TypeAlias = __.typx.Annotated[
61 __.Absential[ str ],
62 __.ddoc.Doc(
63 ''' MIME type hint to influence character set detection. ''' ),
64]
65MimetypeDefaultArgument: __.typx.TypeAlias = __.typx.Annotated[
66 str,
67 __.ddoc.Doc(
68 ''' Fallback MIME type returned on inference/detection failure. ''' ),
69]
70MimetypeSupplementArgument: __.typx.TypeAlias = __.typx.Annotated[
71 __.Absential[ str ],
72 __.ddoc.Doc( ''' User-supplied MIME type hint for inference. ''' ),
73]