moat-src 0.6.0__py3-none-any.whl → 0.8.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
moat/src/inspect.py CHANGED
@@ -3,6 +3,9 @@ This Trio inspector is geared towards figuring out why the *censored* a
3
3
  task is cancelled when no exception shows up.
4
4
 
5
5
  """
6
+
7
+ from __future__ import annotations
8
+
6
9
  import inspect
7
10
  import logging
8
11
 
moat/src/test.py CHANGED
@@ -1,6 +1,9 @@
1
1
  """
2
2
  MoaT test support
3
3
  """
4
+
5
+ from __future__ import annotations
6
+
4
7
  import io
5
8
  import logging
6
9
  import shlex
@@ -23,9 +26,10 @@ async def run(*args, expect_exit=0, do_stdout=True):
23
26
  logger.debug(" moat %s", " ".join(shlex.quote(str(x)) for x in args))
24
27
  try:
25
28
  res = None
26
- async with OptCtx(
27
- main_scope(name="run") if scope.get() is None else None
28
- ), scope.using_scope():
29
+ async with (
30
+ OptCtx(main_scope(name="run") if scope.get() is None else None),
31
+ scope.using_scope(),
32
+ ):
29
33
  res = await wrap_main(
30
34
  args=args,
31
35
  wrap=True,
@@ -43,7 +47,7 @@ async def run(*args, expect_exit=0, do_stdout=True):
43
47
  assert exc.code == expect_exit, exc.code
44
48
  return exc
45
49
  except Exception as exc:
46
- while isinstance(exc,ExceptionGroup) and len(exc.exceptions) == 1:
50
+ while isinstance(exc, ExceptionGroup) and len(exc.exceptions) == 1:
47
51
  exc = exc.exceptions[0]
48
52
  raise exc
49
53
  except BaseException as exc:
@@ -73,12 +77,11 @@ def raises(*exc):
73
77
  yield res
74
78
  except exc as e:
75
79
  res.value = e
76
- pass
77
80
  except ExceptionGroup as e:
78
- while isinstance(e,ExceptionGroup) and len(e.exceptions) == 1:
81
+ while isinstance(e, ExceptionGroup) and len(e.exceptions) == 1:
79
82
  e = e.exceptions[0]
80
83
  res.value = e
81
- if isinstance(e,exc):
84
+ if isinstance(e, exc):
82
85
  return
83
86
  raise
84
87
  else:
@@ -1,23 +1,23 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: moat-src
3
- Version: 0.6.0
3
+ Version: 0.8.1
4
4
  Summary: Tools for managing the MoaT sources
5
5
  Author-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
7
- Project-URL: repository, https://github.com/M-o-a-T/moat-src
7
+ Project-URL: repository, https://github.com/M-o-a-T/moat
8
8
  Keywords: MoaT
9
9
  Classifier: Intended Audience :: Developers
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Framework :: AsyncIO
12
12
  Classifier: Framework :: Trio
13
13
  Classifier: Framework :: AnyIO
14
- Classifier: License :: OSI Approved
15
14
  Classifier: Development Status :: 4 - Beta
16
15
  Requires-Python: >=3.8
17
16
  Description-Content-Type: text/x-rst
18
- Requires-Dist: anyio (~=3.0)
17
+ License-File: LICENSE.txt
18
+ Requires-Dist: anyio~=3.0
19
+ Requires-Dist: tomlkit~=0.12
19
20
  Requires-Dist: asyncclick
20
21
  Requires-Dist: gitpython
21
22
  Requires-Dist: packaging
22
- Requires-Dist: tomlkit (~=0.12)
23
-
23
+ Dynamic: license-file
@@ -0,0 +1,9 @@
1
+ moat/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ moat/src/_main.py,sha256=JsPNPLDgEtCHnaCF1UlZ6jhygd24vN5iayCGU_UI78o,34686
3
+ moat/src/inspect.py,sha256=rUU-FQyQoQP8LJCebbtdL6lgzz9KPH7KGSq11kD4nmU,1489
4
+ moat/src/test.py,sha256=Xn7tIyKt9V0CL_Vt0vauKsZUeNmZTftiHUpnGgk4wyA,2191
5
+ moat_src-0.8.1.dist-info/licenses/LICENSE.txt,sha256=L5vKJLVOg5t0CEEPpW9-O_0vzbP0PEjEF06tLvnIDuk,541
6
+ moat_src-0.8.1.dist-info/METADATA,sha256=pJMaFV-apjHD9OUa3oAzF0Mp-pPqixWAvwws_tOIwS0,733
7
+ moat_src-0.8.1.dist-info/WHEEL,sha256=xcaH6rP_nCxh1LBIPM7Q0uOnzSGjsIye-Q44j_zbzw8,104
8
+ moat_src-0.8.1.dist-info/top_level.txt,sha256=pcs9fl5w5AB5GVi4SvBqIVmFrkRwQkVw_dEvW0Q0cSA,5
9
+ moat_src-0.8.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.38.4)
2
+ Generator: setuptools (77.0.3.post20250321)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,14 @@
1
+ The code in this repository, and all MoaT submodules it refers to,
2
+ is part of the MoaT project.
3
+
4
+ Unless a submodule's LICENSE.txt states otherwise, all included files are
5
+ licensed under the LGPL V3, as published by the FSF at
6
+ https://www.gnu.org/licenses/lgpl-3.0.html .
7
+
8
+ In addition to the LGPL's terms, the author(s) respectfully ask all users of
9
+ this code to contribute any bug fixes or enhancements. Also, please link back to
10
+ https://M-o-a-T.org.
11
+
12
+ Thank you.
13
+
14
+ Copyright © 2021 ff.: the MoaT contributor(s), as per the git changelog(s).
@@ -1,12 +0,0 @@
1
- #!/bin/sh
2
-
3
- set -x
4
- ## pre-commit hook to catch editing in "deb" branch without modifying the changelog
5
- B="$(git rev-parse --abbrev-ref HEAD)"
6
- if test "$B" = "deb" || test "$B" = "debian" ; then
7
- S="$(git status -s -- debian/changelog | head -c2 | sed -e 's/ //g')"
8
- if test "$S" != "A" && test "$S" != "M" ; then
9
- echo "You can't commit to Debian without a changelog entry."
10
- exit 1
11
- fi
12
- fi
@@ -1,12 +0,0 @@
1
- The code in this repository is part of the MoaT project.
2
-
3
- Unless stated otherwise, are files in this repository is licensed under
4
- the LGPL V3, as published by the FSF at https://www.gnu.org/licenses/lgpl-3.0.html .
5
-
6
- In addition to the license's terms, the author(s) respectfully ask all users of
7
- this code to contribute any bug fixes or enhancements, and to not
8
- distribute the source code without a link back to https://M-o-a-T.org.
9
-
10
- Thank you.
11
-
12
- Copyright © of all files: MoaT contributors, 2021 ff., as per the git changelog.
@@ -1,15 +0,0 @@
1
- #!/usr/bin/make -f
2
-
3
- PACKAGE = SUBNAME
4
- MAKEINCL ?= $(shell python3 -mmoat src path)/make/py
5
-
6
- ifneq ($(wildcard $(MAKEINCL)),)
7
- include $(MAKEINCL)
8
- # availabe via http://github.com/smurfix/sourcemgr
9
-
10
- else
11
- %:
12
- @echo "Please fix 'python3 -mmoat src path'."
13
- @exit 1
14
- endif
15
-
@@ -1,45 +0,0 @@
1
- /debian/
2
- .#*
3
- \#*
4
- /build/
5
- .cache
6
- /*.cfg
7
- *,cover
8
- .coverage
9
- .coverage.*
10
- /.coverage
11
- /coverage.xml
12
- /dist/
13
- docs/_build/
14
- docs/build/
15
- /downloads/
16
- /*.egg
17
- /*.egg-info/
18
- /.eggs/
19
- /eggs/
20
- /.env
21
- /env/
22
- /ENV/
23
- /htmlcov/
24
- /.hypothesis/
25
- /.installed.cfg
26
- *.log
27
- *.manifest
28
- *.mo
29
- /obj/
30
- /parts/
31
- pip-delete-this-directory.txt
32
- pip-log.txt
33
- *.pot
34
- /.pybuild/
35
- __pycache__/
36
- *.py[cod]
37
- /.pytest_cache/
38
- /sdist/
39
- *.so
40
- /tests/plugins/test.db
41
- .tox/
42
- /var/
43
- /.venv
44
- /venv/
45
- /wheels/
@@ -1,108 +0,0 @@
1
- # Makefile snippet for some standard Python stuff
2
-
3
- PACKAGE ?= $(notdir $(shell pwd))
4
- PYPI ?= $(PACKAGE)
5
-
6
- PATH := /usr/share/sphinx/scripts/python3:${PATH}
7
- export PYTHONPATH := $(PYTHONPATH)$(if $(PYTHONPATH),:)$(shell pwd)
8
-
9
- PYTHON ?= python3
10
- PYTEST ?= pytest
11
- PYTEST_OPTIONS ?= -x
12
- TESTS ?= tests/
13
- CODE ?= $(subst -,/,$(PACKAGE))
14
-
15
- BUILD_DIR ?= build
16
- INPUT_DIR ?= docs/source
17
-
18
- RQ := grep -qs tool.ruff pyproject.toml
19
-
20
- # Sphinx options (are passed to build_docs, which passes them to sphinx-build)
21
- # -W : turn warning into errors
22
- # -a : write all files
23
- # -b html : use html builder
24
- # -i [pat] : ignore pattern
25
-
26
- SPHINXOPTS ?= -a -W -b html
27
- AUTOSPHINXOPTS := -i *~ -i *.sw* -i Makefile*
28
-
29
- SPHINXBUILDDIR ?= $(BUILD_DIR)/sphinx/html
30
- ALLSPHINXOPTS ?= -d $(BUILD_DIR)/sphinx/doctrees $(SPHINXOPTS) docs
31
-
32
- ifneq ($(wildcard setup.py),)
33
- SETUP := setup.py
34
- else
35
- SETUP :=
36
- endif
37
-
38
- it: untagged test push tag format deb pypi
39
- itt: untagged test push ttag format deb pypi
40
-
41
- deb: tagged
42
- merge-to-deb
43
-
44
- tag:
45
- test $$(git ls-files -m | wc -l) = 0
46
- git nt
47
- ttag:
48
- test $$(git ls-files -m | wc -l) = 0
49
- git ntt
50
-
51
- doc:
52
- sphinx-build -a $(INPUT_DIR) $(BUILD_DIR)
53
-
54
- livehtml: docs
55
- sphinx-autobuild $(AUTOSPHINXOPTS) $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)
56
-
57
- update:
58
- pip install -r ci/test-requirements.txt
59
-
60
- cov:
61
- $(PYTEST) $(TESTS) --cov=$(CODE) --cov-report=term-missing
62
-
63
- test: statictest pytest
64
- statictest:
65
- ${RQ} || black --check $(CODE) $(TESTS) $(SETUP)
66
- ${RQ} || python3 -misort --check $(CODE) $(TESTS) $(SETUP)
67
- ${RQ} || flake8p $(CODE) $(TESTS) $(SETUP)
68
- ${RQ} || pylint $(CODE) $(TESTS) $(SETUP)
69
- ${RQ} && ruff format $(CODE) $(TESTS) $(SETUP)
70
- ${RQ} && ruff check $(CODE) $(TESTS) $(SETUP)
71
-
72
- pytest:
73
- $(PYTEST) $(PYTEST_OPTIONS) $(TESTS)
74
-
75
- format:
76
- ${RQ} || black $(CODE) $(TESTS) $(SETUP)
77
- ${RQ} || python3 -misort $(CODE) $(TESTS) $(SETUP)
78
- ${RQ} && ruff format $(CODE) $(TESTS) $(SETUP)
79
- ${RQ} && ruff check --fix $(CODE) $(TESTS) $(SETUP)
80
-
81
- precommit: format test
82
-
83
- tagged:
84
- git describe --tags --exact-match
85
- test $$(git ls-files -m | wc -l) = 0
86
-
87
- untagged:
88
- if git describe --tags --exact-match ; then exit 1; else exit 0; fi
89
-
90
- pypi: tagged
91
- if test -f dist/${PYPI}-$(shell git describe --tags --exact-match).tar.gz ; then \
92
- echo "Source package exists."; \
93
- elif test -f setup.py ; then \
94
- python3 setup.py sdist bdist_wheel ; \
95
- else \
96
- python3 -mbuild -snw ; \
97
- fi
98
- twine upload \
99
- dist/${PYPI}-$(shell git describe --tags --exact-match).tar.gz \
100
- dist/$(subst -,_,${PYPI})-$(shell git describe --tags --exact-match)-py3-none-any.whl
101
-
102
- upload: pypi
103
- git push --tags
104
-
105
- push:
106
- git push-all
107
-
108
- .PHONY: all tagged pypi upload precommit format test cov update doc livehtml statictest pytest it deb tag untagged push ttag itt
@@ -1,5 +0,0 @@
1
- __path__ = __import__("pkgutil").extend_path(__path__, __name__)
2
-
3
- from moat._dev_fix import _fix
4
-
5
- _fix()
@@ -1,145 +0,0 @@
1
- project:
2
- authors:
3
- - email: matthias@urlichs.de
4
- name: Matthias Urlichs
5
- classifiers:
6
- - 'Intended Audience :: Developers'
7
- - 'Programming Language :: Python :: 3'
8
- - 'Framework :: AsyncIO'
9
- - 'Framework :: Trio'
10
- - 'Framework :: Trio'
11
- - 'Intended Audience :: Developers'
12
- - 'License :: OSI Approved'
13
- - 'Development Status :: 4 - Beta'
14
- dependencies:
15
- - anyio ~= 3.0
16
- description: REPLACE ME
17
- dynamic:
18
- - version
19
- keywords:
20
- - MoaT
21
- license:
22
- file: LICENSE.txt
23
- name: SUBUNDER
24
- readme: README.rst
25
- requires-python: '>=3.8'
26
- urls:
27
- homepage: https://m-o-a-t.org
28
- repository: https://github.com/M-o-a-T/SUBNAME
29
- tool:
30
- pytest:
31
- ini_options:
32
- log_cli_level: DEBUG
33
- ruff:
34
- select:
35
- - ALL
36
- ignore:
37
- - ANN
38
- - PTH
39
- - PERF
40
- - D105
41
- - D107
42
- - A003
43
- - S101
44
- - RUF001
45
- - RUF002
46
- - PLW1514
47
- - D2
48
- - D3
49
- - D4
50
- - T2
51
- - FBT
52
- - TRY003
53
- - EM10
54
- - PLR
55
- - C
56
- - RET50
57
- - TD
58
- - FIX
59
- - N
60
- - ERA
61
- - BLE001
62
- preview: true
63
- explicit-preview-rules: true
64
- line-length: 99
65
- flake8-comprehensions:
66
- allow-dict-calls-with-keyword-arguments: true
67
- flake8-builtins:
68
- builtins-ignorelist:
69
- - id
70
- - help
71
- isort:
72
- no-lines-before:
73
- - future
74
- required-imports:
75
- - "from __future__ import annotations"
76
- section-order:
77
- - future
78
- - typing
79
- - standard-library
80
- - first-party
81
- - upy
82
- - moat
83
- - local-folder
84
- - third-party
85
- extra-standard-library:
86
- - pytest
87
- - anyio
88
- force-to-top:
89
- - moat.util
90
- sections:
91
- moat:
92
- - moat
93
- upy:
94
- - micropython
95
- - machine
96
- - esp
97
- typing:
98
- - typing
99
- black:
100
- line-length: 99
101
- flake8:
102
- max-line-length: 99
103
- ignore:
104
- - E123
105
- - E127
106
- - E203
107
- - E231
108
- - E402
109
- - E502
110
- - E731
111
- - F401 # covered by pylint
112
- - F841 # covered by pylint
113
- - W503
114
- setuptools:
115
- packages:
116
- - SUBDOT
117
- package-data:
118
- "*": [ "*.yaml" ]
119
- setuptools_scm: {}
120
- pylint:
121
- messages_control:
122
- disable:
123
- - fixme
124
- - invalid-name
125
- - no-else-continue
126
- - no-else-return
127
- - superfluous-parens
128
- - too-few-public-methods
129
- - too-many-arguments
130
- - too-many-branches
131
- - too-many-instance-attributes
132
- - too-many-locals
133
- - too-many-nested-blocks
134
- - too-many-return-statements
135
- - too-many-statements
136
- - ungrouped-imports
137
- - unspecified-encoding
138
- - use-dict-literal
139
- - wrong-import-order
140
- tox:
141
- tox:
142
- isolated_build: True
143
- envlist:
144
- - check
145
-
@@ -1,77 +0,0 @@
1
- build-system:
2
- build-backend: setuptools.build_meta
3
- requires:
4
- - setuptools
5
- - wheel
6
- - setuptools-scm
7
- project:
8
- classifiers:
9
- - 'Intended Audience :: Developers'
10
- - 'Programming Language :: Python :: 3'
11
- - 'Framework :: AsyncIO'
12
- - 'Framework :: Trio'
13
- - 'Framework :: AnyIO'
14
- - 'Intended Audience :: Developers'
15
- - 'License :: OSI Approved'
16
- - 'Development Status :: 4 - Beta'
17
- dependencies:
18
- - anyio ~= 3.0
19
- dynamic:
20
- - version
21
- keywords:
22
- - MoaT
23
- license:
24
- file: LICENSE.txt
25
- requires-python: '>=3.8'
26
- urls:
27
- homepage: https://m-o-a-t.org
28
- name: SUBNAME
29
- tool:
30
- moat:
31
- fixup: |
32
- try:
33
- toml["tool"]["tox"]["tox"]["envlist"].remove("py39")
34
- except(KeyError,ValueError):
35
- pass
36
- flake8:
37
- max-line-length: 99
38
- ignore:
39
- - W503
40
- - E231
41
- - E203
42
-
43
- isort:
44
- line_length: 99
45
- multi_line_output: 3
46
- trailing_comma: DELETE
47
- profile: black
48
- setuptools_scm: {}
49
-
50
- tox:
51
- tox:
52
- isolated_build: True
53
- envlist:
54
- - check
55
- - py310
56
-
57
- testenv:
58
- setenv:
59
- - "PYTHONPATH = {env:PYTHONPATH}{:}{toxinidir}"
60
- deps:
61
- - pytest
62
- - trio
63
- commands:
64
- - python3 -mpytest tests/
65
-
66
- "testenv:check":
67
- commands:
68
- - black --check moat tests
69
- - flake8p moat tests
70
- - pylint moat tests
71
- deps:
72
- - flake8
73
- - flake8-pyproject
74
- - black
75
- - pylint
76
- - pytest
77
-
@@ -1,11 +0,0 @@
1
- """
2
- Empty test file
3
- """
4
-
5
- import moat.SUBDOT # pylint: disable=unused-import
6
-
7
- def test_nothing():
8
- """
9
- Empty test
10
- """
11
- pass # pylint: disable=unnecessary-pass
@@ -1,17 +0,0 @@
1
- moat/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- moat/src/_main.py,sha256=mIWguSJeHJtS46ndtWZCvHXIK34rXFZKTeRj35QdmnY,25486
3
- moat/src/inspect.py,sha256=Rb5x7Qgyb7W1UpGRTPMHB-XLy6J9yZ4Iw4sOhATrOHA,1452
4
- moat/src/test.py,sha256=7jOUUwgrbtPS3clwiUgf6sIS7Kb1Yv3XcpZc-hajBP0,2149
5
- moat/src/_hooks/pre-commit,sha256=_2IeAh-Gq5YjHtA08TBYAMbrDslNSRue59a1Y6mykns,412
6
- moat/src/_templates/LICENSE.txt,sha256=X6cpfPmXmOftxOF5o9xedKUWPzU69OiCRrOW1CmRBjs,528
7
- moat/src/_templates/Makefile,sha256=fdTxSrMJbQO02XTRatmM-QA6iibYw_il4UrNff0Nkss,268
8
- moat/src/_templates/gitignore,sha256=F1dVTKg7mLHLp--Z-KBwU-HyyPOGm-uN0qfS_yK8vz0,436
9
- moat/src/_templates/pyproject.default.yaml,sha256=0ImapzFaJhs-dJXngnGpk--hPDeUAsDk_EXALWJBjvE,2665
10
- moat/src/_templates/pyproject.forced.yaml,sha256=djfcy3hgfoIgrn2pRrxDWTyN3EEsA1y5NhkzYrGjgNY,1427
11
- moat/src/_templates/test_basic_py,sha256=Lr5dq8C04DiRabA0rCURsZdcc2mVAUGPzjLU6iR8LTE,174
12
- moat/src/_templates/make/py,sha256=UbEujNqUNcMTzPfO4nKkJtu6JfvyBnQBe6S-m-GFf3E,2722
13
- moat/src/_templates/moat/__init__.py,sha256=DDN1IA3oN2R1OTIhJCNOOSCpfbqXIByh2WUNYDFcuzw,105
14
- moat_src-0.6.0.dist-info/METADATA,sha256=sBz66pkWn7Nkg1LyFHcbI9joQj-UXckP-wlWaJfBePU,732
15
- moat_src-0.6.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
16
- moat_src-0.6.0.dist-info/top_level.txt,sha256=pcs9fl5w5AB5GVi4SvBqIVmFrkRwQkVw_dEvW0Q0cSA,5
17
- moat_src-0.6.0.dist-info/RECORD,,