Coverage for sources/frigid/__init__.py: 100%

24 statements  

« prev     ^ index     » next       coverage.py v7.6.8, created at 2024-12-05 01:36 +0000

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''' Immutable data structures. ''' 

22 

23# ruff: noqa: F401,F403 

24 

25 

26from . import __ 

27from . import classes 

28from . import dictionaries 

29from . import exceptions 

30from . import modules 

31from . import namespaces 

32from . import objects 

33from . import qaliases 

34 

35from .classes import * 

36from .dictionaries import * 

37from .modules import * 

38from .namespaces import * 

39from .objects import * 

40 

41 

42__version__ = '1.0a0' 

43 

44 

45_attribute_visibility_includes_ = frozenset( ( '__version__', ) ) 

46 

47class _InternalModule( __.InternalObject, __.Module ): pass # type: ignore 

48def _reclassify_modules( 

49 attributes: __.cabc.Mapping[ str, __.a.Any ] 

50) -> None: 

51 from inspect import ismodule 

52 for attribute in attributes.values( ): 

53 if not ismodule( attribute ): continue 

54 if isinstance( attribute, _InternalModule ): 

55 continue # pragma: no coverage 

56 attribute.__class__ = _InternalModule 

57 

58_reclassify_modules( globals( ) ) 

59__.modules[ __name__ ].__class__ = _InternalModule