Coverage for sources/accretive/__/doctab.py: 100%

3 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-03-01 20:40 +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''' Docstrings table for reuse across entities. ''' 

22 

23# pylint: disable=unused-wildcard-import,wildcard-import 

24# ruff: noqa: F403,F405 

25 

26 

27from __future__ import annotations 

28 

29from .imports import * 

30 

31 

32TABLE: types.MappingProxyType[ str, str ] = types.MappingProxyType( { 

33 

34 'class attributes accretion': ''' 

35Prevents reassignment or deletion of class attributes after they have been 

36assigned. Only assignment of new class attributes is permitted. 

37''', 

38 

39 'description of class factory class': ''' 

40Derived from :py:class:`type`, this is a metaclass. A metaclass is a class 

41factory class. I.e., it is a class that produces other classes as its 

42instances. 

43''', 

44 

45 'description of module': ''' 

46Derived from :py:class:`types.ModuleType`, this class is suitable for use as a 

47Python module class. 

48''', 

49 

50 'description of namespace': ''' 

51A namespace is an object, whose attributes can be determined from iterables and 

52keyword arguments, at initialization time. The string representation of the 

53namespace object reflects its current instance attributes. Modeled after 

54:py:class:`types.SimpleNamespace`. 

55''', 

56 

57 'dictionary entries accretion': ''' 

58Prevents alteration or removal of dictionary entries after they have been 

59added. Only addition of new dictionary entries is permitted. 

60''', 

61 

62 'dictionary entries production': ''' 

63When an attempt to access a missing entry is made, then the entry is added with 

64a default value. Modeled after :py:class:`collections.defaultdict`. 

65''', 

66 

67 'dictionary entries validation': ''' 

68When an attempt to add a new entry is made, then the entry is validated against 

69supplied criteria. If validation fails, then the entry is rejected. 

70''', 

71 

72 'instance attributes accretion': ''' 

73Prevents reassignment or deletion of instance attributes after they have been 

74assigned. Only assignment of new instance attributes is permitted. 

75''', 

76 

77 'module attributes accretion': ''' 

78Prevents reassignment or deletion of module attributes after they have been 

79assigned. Only assignment of new module attributes is permitted. 

80 

81This behavior helps ensure that module-level constants remain constant and that 

82module interfaces remain stable during runtime. 

83''', 

84 

85} )