Skip to content

Commit

Permalink
context_locals generic to private
Browse files Browse the repository at this point in the history
- refactor(context_locals): T and P to private module variables _T and _P
- docs: clean up toc remove headers module objects and module private variables
- docs: author contact mastodon not telegram
  • Loading branch information
msftcangoblowm committed Oct 16, 2024
1 parent 59b37ba commit fabad05
Show file tree
Hide file tree
Showing 23 changed files with 73 additions and 86 deletions.
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ Changelog

.. scriv-start-here
.. _changes_1-3-3:

Version 1.3.3 — 2024-10-16
--------------------------

- refactor(context_locals): T and P to private module variables _T and _P
- docs: clean up toc remove headers module objects and module private variables
- docs: author contact mastodon not telegram

.. _changes_1-3-2:

Version 1.3.2 — 2024-10-15
Expand Down
3 changes: 1 addition & 2 deletions docs/code/constants/version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ Install
make install force=1
Module private variables
-------------------------
**Module private variables**

.. py:data:: __version__
:type: str
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
# @@@ editable
copyright = "2023–2024, Dave Faulkmore"
# The short X.Y.Z version.
version = "1.3.2"
version = "1.3.3"
# The full version, including alpha/beta/rc tags.
release = "1.3.2"
release = "1.3.3"
# The date of release, in "monthname day, year" format.
release_date = "October 15, 2024"
release_date = "October 16, 2024"
# @@@ end

# release = config.version
Expand Down
Binary file modified docs/objects-logging-strict.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/objects-logging-strict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ logging_strict.tech_niques.is_class_attrib_kind.params.cls py:parameter 1 code/t
logging_strict.tech_niques.is_class_attrib_kind.params.str_m py:parameter 1 code/tech_niques/index.html#module-$ -
logging_strict.tech_niques.is_class_attrib_kind.params.kind py:parameter 1 code/tech_niques/index.html#module-$ -
logging_strict.tech_niques.context_locals py:module 0 code/tech_niques/context_locals.html#$ -
logging_strict.tech_niques.context_locals._P py:data 1 code/tech_niques/context_locals.html#$ -
logging_strict.tech_niques.context_locals._P py:class 1 code/tech_niques/context_locals.html#$ -
logging_strict.tech_niques.context_locals._T py:class 1 code/tech_niques/context_locals.html#$ -
logging_strict.tech_niques.context_locals.__all__ py:data 1 code/tech_niques/context_locals.html#$ -
logging_strict.tech_niques.context_locals.get_locals py:function 1 code/tech_niques/context_locals.html#$ -
Expand Down
8 changes: 3 additions & 5 deletions src/logging_strict/constants.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
Seperate constants out so independent of any dependencies
Module private variables
-------------------------
**Module private variables**
.. py:data:: _map_release
:type: types.MappingProxyType
Expand All @@ -20,8 +19,7 @@
Module exports
Module objects
---------------
**Module objects**
.. py:data:: g_app_name
:type: str
Expand Down
5 changes: 2 additions & 3 deletions src/logging_strict/ep_validate_yaml.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Entrypoint to validate :py:mod:`logging.config` yaml file(s)
Module objects
---------------
**Module objects**
"""

Expand Down
8 changes: 3 additions & 5 deletions src/logging_strict/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
Custom exceptions
Expand All @@ -15,8 +15,7 @@
LoggingStrictGenreRequired,
)
Module private variables
-------------------------
**Module private variables**
.. py:data:: __all__
:type: tuple[str, str, str, str, str]
Expand All @@ -26,8 +25,7 @@
Module exports
Module objects
---------------
**Module objects**
"""

Expand Down
2 changes: 1 addition & 1 deletion src/logging_strict/logging_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Expand Down
8 changes: 3 additions & 5 deletions src/logging_strict/logging_yaml_abc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
Base class of logging_yaml implementations
Expand All @@ -11,8 +11,7 @@
``QA Tester`` can edit the yaml config files, **before using**,
ensure validation passes!
Module private variables
-------------------------
**Module private variables**
.. py:data:: __all__
:type: tuple[str, str, str]
Expand All @@ -33,8 +32,7 @@
Initial version of :py:mod:`logging.config` YAML files
Module objects
---------------
**Module objects**
"""

Expand Down
8 changes: 7 additions & 1 deletion src/logging_strict/logging_yaml_validate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
.. py:data:: __all__
:type: tuple[str, str]
:value: ("schema_logging_config", "validate_yaml_dirty")
Module exports
"""

Expand Down
8 changes: 3 additions & 5 deletions src/logging_strict/tech_niques/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Conveniently exports all technique helpers
Module private variables
----------------------------
**Module private variables**
.. py:data:: __all__
:type: tuple[str, str, str, str, str, str, str]
Expand All @@ -15,8 +14,7 @@
This modules exports
Module objects
----------------------------
**Module objects**
"""

Expand Down
24 changes: 11 additions & 13 deletions src/logging_strict/tech_niques/context_locals.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Expand Down Expand Up @@ -126,29 +126,27 @@ def main():
`Credit <https://stackoverflow.com/a/56469201>`_
Module private variables
----------------------------
**Module private variables**
.. py:data:: __all__
:type: tuple[str]
:value: ("get_locals",)
This modules exports
.. py:data:: T
.. py:data:: _T
:type: typing.TypeVar
:value: typing.TypeVar("T")
:value: typing.TypeVar("_T")
Equivalent to :py:data:`~typing.Any`
.. py:data:: P
.. py:data:: _P
:type: typing.ParamSpec
:value: typing_extensions.ParamSpec('P')
:value: typing_extensions.ParamSpec('_P')
Equivalent to :py:data:`~typing.Any`
Module objects
----------------------------
**Module objects**
"""

Expand Down Expand Up @@ -239,16 +237,16 @@ def __call__( # type: ignore[misc] # missing self non-static method
A generic module level function. Is modified and executed. piggy backing
the module level function ``locals`` onto the return statement
:type mock_instance: collections.abc.Callable[_P, _T]
:type mock_instance: collections.abc.Callable[logging_strict.tech_niques.context_locals._P, logging_strict.tech_niques.context_locals._T]
:param args: Generic positional args
:type args: _P.args
:type args: logging_strict.tech_niques.context_locals._P.args
:param kwargs: Generic keyword args
:type kwargs: _P.kwargs
:type kwargs: logging_strict.tech_niques.context_locals._P.kwargs
:returns:
Module levels function normal return value
:rtype: _T
:rtype: logging_strict.tech_niques.context_locals._T
.. seealso::
Expand Down
8 changes: 3 additions & 5 deletions src/logging_strict/tech_niques/coverage_misbehaves.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Detect runner to adjust logging level inconsistencies
Module private variables
-------------------------
**Module private variables**
.. py:data:: __all__
:type: tuple[str]
:value: ("detect_coverage",)
This modules exports
Module objects
---------------
**Module objects**
"""

Expand Down
8 changes: 3 additions & 5 deletions src/logging_strict/tech_niques/logger_redirect.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
In unittest class, redirect stdout/stderr. Essential for synchronous logging
Module private variables
-------------------------
**Module private variables**
.. py:data: __all__
:type: tuple[str]
:value: ("LoggerRedirector",)
This module exports
Module objects
---------------
**Module objects**
"""

Expand Down
8 changes: 3 additions & 5 deletions src/logging_strict/tech_niques/logging_capture.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Expand Down Expand Up @@ -163,17 +163,15 @@ def test_assert_logging_output(self):
https://github.com/python/cpython/blob/db6f297d448ce46e58a5b90239a4779553333198/Lib/unittest/case.py#L193
Module private variables
-------------------------
**Module private variables**
.. py:data:: __all__
:type: tuple[str, str]
:value: ("captureLogs", "captureLogsMany")
Exported objects from this module
Module objects
---------------
**Module objects**
"""

Expand Down
2 changes: 1 addition & 1 deletion src/logging_strict/tech_niques/stream_capture.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Expand Down
8 changes: 3 additions & 5 deletions src/logging_strict/util/check_logging.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Checks dealing with logging module
Module private variables
-------------------------
**Module private variables**
.. py:data:: __all__
:type: tuple[str, str, str, str, str, str]
Expand All @@ -15,8 +14,7 @@
Exported objects from this module
Module objects
---------------
**Module objects**
"""

Expand Down
8 changes: 3 additions & 5 deletions src/logging_strict/util/check_type.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Check utility functions
Module private variables
-------------------------
**Module private variables**
.. py:attribute:: __all__
:type: tuple[str, str, str, str, str]
Expand All @@ -16,8 +15,7 @@
Exported objects from this module
Module objects
-------------------------
**Module objects**
"""

Expand Down
2 changes: 1 addition & 1 deletion src/logging_strict/util/package_resource.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
.. moduleauthor:: Dave Faulkmore <faulkmore telegram>
.. moduleauthor:: Dave Faulkmore <https://mastodon.social/@msftcangoblowme>
..
Expand Down
Loading

0 comments on commit fabad05

Please sign in to comment.