Coverage for sources/detextive/nomina.py: 100%
11 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-20 18:02 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-20 18:02 +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( ''' Default character set to use when detection fails. ''' ),
44]
45CharsetSupplementArgument: __.typx.TypeAlias = __.typx.Annotated[
46 __.Absential[ str ],
47 __.ddoc.Doc(
48 ''' Supplemental character set to use for trial decodes. ''' ),
49]
50HttpContentTypeArgument: __.typx.TypeAlias = __.typx.Annotated[
51 __.Absential[ str ],
52 __.ddoc.Doc( ''' HTTP Content-Type header for parsing context. ''' ),
53]
54LocationArgument: __.typx.TypeAlias = __.typx.Annotated[
55 __.Absential[ Location ],
56 __.ddoc.Doc( ''' File location or URL for error reporting context. ''' ),
57]
58MimetypeAssumptionArgument: __.typx.TypeAlias = __.typx.Annotated[
59 __.Absential[ str ],
60 __.ddoc.Doc(
61 ''' MIME type hint to influence character set detection. ''' ),
62]
63MimetypeDefaultArgument: __.typx.TypeAlias = __.typx.Annotated[
64 str,
65 __.ddoc.Doc( ''' Default MIME type to use when detection fails. ''' ),
66]
67MimetypeSupplementArgument: __.typx.TypeAlias = __.typx.Annotated[
68 __.Absential[ str ],
69 __.ddoc.Doc( ''' Supplemental MIME type to use for inference. ''' ),
70]