lupaxa-lupe 0.1.0__tar.gz
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.
- lupaxa_lupe-0.1.0/.gitignore +24 -0
- lupaxa_lupe-0.1.0/LICENCE +21 -0
- lupaxa_lupe-0.1.0/PKG-INFO +150 -0
- lupaxa_lupe-0.1.0/README.md +87 -0
- lupaxa_lupe-0.1.0/docs/README.md +23 -0
- lupaxa_lupe-0.1.0/pyproject.toml +147 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/__init__.py +13 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/__main__.py +10 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/ast.py +345 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/builtins.py +470 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/cli.py +109 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/engine.py +88 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/errors.py +64 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/interpreter.py +668 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/lexer.py +256 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/modules.py +80 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/parser.py +482 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/repl.py +61 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/runtime.py +37 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/source.py +72 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/tokens.py +151 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/values.py +110 -0
- lupaxa_lupe-0.1.0/src/lupaxa/lupe/version.py +10 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# OS
|
|
2
|
+
.DS_Store
|
|
3
|
+
|
|
4
|
+
# Cursor
|
|
5
|
+
.cursor/
|
|
6
|
+
.superpowers/
|
|
7
|
+
.worktrees/
|
|
8
|
+
cursor-docs
|
|
9
|
+
|
|
10
|
+
# Make
|
|
11
|
+
.makefiles/
|
|
12
|
+
|
|
13
|
+
# MkDocs
|
|
14
|
+
site/
|
|
15
|
+
|
|
16
|
+
# Python
|
|
17
|
+
.venv/
|
|
18
|
+
__pycache__/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
dist/
|
|
23
|
+
build/
|
|
24
|
+
*.egg-info/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) The Lupaxa Project
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: lupaxa-lupe
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A small general-purpose interpreted scripting language for learning how languages are designed and executed.
|
|
5
|
+
Project-URL: Homepage, https://github.com/lupaxa-after-hours/lupe
|
|
6
|
+
Project-URL: Documentation, https://lupe.thelupaxaproject.org/
|
|
7
|
+
Project-URL: Repository, https://github.com/lupaxa-after-hours/lupe
|
|
8
|
+
Project-URL: Issues, https://github.com/lupaxa-after-hours/lupe/issues
|
|
9
|
+
Author: The Lupaxa Project
|
|
10
|
+
License: MIT License
|
|
11
|
+
|
|
12
|
+
Copyright (c) The Lupaxa Project
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
License-File: LICENCE
|
|
32
|
+
Keywords: education,interpreter,lupe,scripting-language
|
|
33
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
34
|
+
Classifier: Environment :: Console
|
|
35
|
+
Classifier: Intended Audience :: Developers
|
|
36
|
+
Classifier: Intended Audience :: Education
|
|
37
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
38
|
+
Classifier: Operating System :: OS Independent
|
|
39
|
+
Classifier: Programming Language :: Python :: 3
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
45
|
+
Classifier: Topic :: Education
|
|
46
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
47
|
+
Classifier: Topic :: Software Development :: Interpreters
|
|
48
|
+
Requires-Python: >=3.11
|
|
49
|
+
Provides-Extra: dev
|
|
50
|
+
Requires-Dist: bump-my-version>=1.2.0; extra == 'dev'
|
|
51
|
+
Requires-Dist: hatch>=1.12.0; extra == 'dev'
|
|
52
|
+
Requires-Dist: mkdocs-material==9.7.7; extra == 'dev'
|
|
53
|
+
Requires-Dist: mkdocs==1.6.1; extra == 'dev'
|
|
54
|
+
Requires-Dist: mypy>=1.12.0; extra == 'dev'
|
|
55
|
+
Requires-Dist: pip-audit>=2.7.0; extra == 'dev'
|
|
56
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
57
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
58
|
+
Requires-Dist: ruff>=0.6.0; extra == 'dev'
|
|
59
|
+
Provides-Extra: test
|
|
60
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'test'
|
|
61
|
+
Requires-Dist: pytest>=8.0; extra == 'test'
|
|
62
|
+
Description-Content-Type: text/markdown
|
|
63
|
+
|
|
64
|
+
<p align="center">
|
|
65
|
+
<a href="https://github.com/lupaxa-after-hours">
|
|
66
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/after-hours/readme-logo.png" alt="After Hours" />
|
|
67
|
+
</a>
|
|
68
|
+
</p>
|
|
69
|
+
|
|
70
|
+
<h1 align="center">Lupe</h1>
|
|
71
|
+
|
|
72
|
+
Lupe is a small interpreted scripting language for learning how a language
|
|
73
|
+
is designed and run. Scripts use the `.lupe` extension. The reference
|
|
74
|
+
interpreter is this Python package: a handwritten lexer, a recursive-descent
|
|
75
|
+
parser, and a tree-walking interpreter.
|
|
76
|
+
|
|
77
|
+
A script is ordinary text. Blank lines and indentation are insignificant,
|
|
78
|
+
and a block ends with `end`.
|
|
79
|
+
|
|
80
|
+
## Install
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pip install lupaxa-lupe
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Requires Python 3.11 or newer. The standard library is enough.
|
|
87
|
+
|
|
88
|
+
From a checkout of this repository:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install -e ".[dev]"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Run
|
|
95
|
+
|
|
96
|
+
`lupe`, `lupaxa-lupe`, and `python -m lupaxa.lupe` are the same program.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
lupe run hello.lupe
|
|
100
|
+
lupe check hello.lupe
|
|
101
|
+
lupe tokens hello.lupe
|
|
102
|
+
lupe ast hello.lupe
|
|
103
|
+
lupe repl
|
|
104
|
+
lupe --version
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`run` executes a file. `check` parses it and stops. `tokens` and `ast`
|
|
108
|
+
print the two stages before execution. `repl` keeps names between lines
|
|
109
|
+
and prints the value of a line that is only an expression.
|
|
110
|
+
|
|
111
|
+
### Shebang
|
|
112
|
+
|
|
113
|
+
A file may start with `#!/usr/bin/env lupe`. Once `lupe` is on `PATH`, the
|
|
114
|
+
shell runs that file the same way it runs a shell script. The kernel invokes
|
|
115
|
+
`lupe` with the script path and any arguments that follow it.
|
|
116
|
+
`examples/hello.lupe` is this program:
|
|
117
|
+
|
|
118
|
+
```lupe
|
|
119
|
+
#!/usr/bin/env lupe
|
|
120
|
+
|
|
121
|
+
let name = input("Enter your name: ")
|
|
122
|
+
print "Hello, " + name
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
chmod +x hello.lupe
|
|
127
|
+
./hello.lupe
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`lupe hello.lupe` is the same direct form. Arguments after the file name
|
|
131
|
+
are the script's arguments.
|
|
132
|
+
|
|
133
|
+
### Script Arguments
|
|
134
|
+
|
|
135
|
+
`args()` returns those arguments. `lupe run` takes them after `--`.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
./hello.lupe first second
|
|
139
|
+
lupe hello.lupe first second
|
|
140
|
+
lupe run hello.lupe -- first second
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Documentation
|
|
144
|
+
|
|
145
|
+
`mkdocs/` holds Getting Started, Usage, the Reference, Examples, and
|
|
146
|
+
Internals. The published site is <https://lupe.thelupaxaproject.org/>.
|
|
147
|
+
|
|
148
|
+
<a href="https://github.com/the-lupaxa-project">
|
|
149
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
|
|
150
|
+
</a>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/lupaxa-after-hours">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/after-hours/readme-logo.png" alt="After Hours" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">Lupe</h1>
|
|
8
|
+
|
|
9
|
+
Lupe is a small interpreted scripting language for learning how a language
|
|
10
|
+
is designed and run. Scripts use the `.lupe` extension. The reference
|
|
11
|
+
interpreter is this Python package: a handwritten lexer, a recursive-descent
|
|
12
|
+
parser, and a tree-walking interpreter.
|
|
13
|
+
|
|
14
|
+
A script is ordinary text. Blank lines and indentation are insignificant,
|
|
15
|
+
and a block ends with `end`.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install lupaxa-lupe
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Requires Python 3.11 or newer. The standard library is enough.
|
|
24
|
+
|
|
25
|
+
From a checkout of this repository:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install -e ".[dev]"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Run
|
|
32
|
+
|
|
33
|
+
`lupe`, `lupaxa-lupe`, and `python -m lupaxa.lupe` are the same program.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
lupe run hello.lupe
|
|
37
|
+
lupe check hello.lupe
|
|
38
|
+
lupe tokens hello.lupe
|
|
39
|
+
lupe ast hello.lupe
|
|
40
|
+
lupe repl
|
|
41
|
+
lupe --version
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`run` executes a file. `check` parses it and stops. `tokens` and `ast`
|
|
45
|
+
print the two stages before execution. `repl` keeps names between lines
|
|
46
|
+
and prints the value of a line that is only an expression.
|
|
47
|
+
|
|
48
|
+
### Shebang
|
|
49
|
+
|
|
50
|
+
A file may start with `#!/usr/bin/env lupe`. Once `lupe` is on `PATH`, the
|
|
51
|
+
shell runs that file the same way it runs a shell script. The kernel invokes
|
|
52
|
+
`lupe` with the script path and any arguments that follow it.
|
|
53
|
+
`examples/hello.lupe` is this program:
|
|
54
|
+
|
|
55
|
+
```lupe
|
|
56
|
+
#!/usr/bin/env lupe
|
|
57
|
+
|
|
58
|
+
let name = input("Enter your name: ")
|
|
59
|
+
print "Hello, " + name
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
chmod +x hello.lupe
|
|
64
|
+
./hello.lupe
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`lupe hello.lupe` is the same direct form. Arguments after the file name
|
|
68
|
+
are the script's arguments.
|
|
69
|
+
|
|
70
|
+
### Script Arguments
|
|
71
|
+
|
|
72
|
+
`args()` returns those arguments. `lupe run` takes them after `--`.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
./hello.lupe first second
|
|
76
|
+
lupe hello.lupe first second
|
|
77
|
+
lupe run hello.lupe -- first second
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Documentation
|
|
81
|
+
|
|
82
|
+
`mkdocs/` holds Getting Started, Usage, the Reference, Examples, and
|
|
83
|
+
Internals. The published site is <https://lupe.thelupaxaproject.org/>.
|
|
84
|
+
|
|
85
|
+
<a href="https://github.com/the-lupaxa-project">
|
|
86
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
|
|
87
|
+
</a>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/lupaxa-after-hours">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/after-hours/readme-logo.png" alt="Organisation Logo" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">Core Documentation</h1>
|
|
8
|
+
|
|
9
|
+
The following documents define the standards that apply across **The Lupaxa Project**:
|
|
10
|
+
|
|
11
|
+
| Document | Purpose |
|
|
12
|
+
| :------------------------------------ | :---------------------------------------------------------------- |
|
|
13
|
+
| [Code of Conduct](CODE_OF_CONDUCT.md) | Expected behaviour and reporting procedures. |
|
|
14
|
+
| [How to Contribute](CONTRIBUTING.md) | Development workflow, coding standards, and contribution process. |
|
|
15
|
+
| [Governance](GOVERNANCE.md) | Project governance, roles, and decision-making. |
|
|
16
|
+
| [Maintainers](MAINTAINERS.md) | Maintainer responsibilities and expectations. |
|
|
17
|
+
| [Projects Overview](PROJECTS.md) | Overview of organisations, repositories, and project structure. |
|
|
18
|
+
| [Security Policy](SECURITY.md) | Responsible disclosure and secure development practices. |
|
|
19
|
+
| [Support Guide](SUPPORT.md) | How to obtain help and support. |
|
|
20
|
+
|
|
21
|
+
<a href="https://github.com/the-lupaxa-project">
|
|
22
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
|
|
23
|
+
</a>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.18"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "lupaxa-lupe"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "A small general-purpose interpreted scripting language for learning how languages are designed and executed."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { file = "LICENCE" }
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "The Lupaxa Project" }
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
keywords = ["lupe", "interpreter", "scripting-language", "education"]
|
|
18
|
+
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
21
|
+
"Environment :: Console",
|
|
22
|
+
"Intended Audience :: Developers",
|
|
23
|
+
"Intended Audience :: Education",
|
|
24
|
+
"License :: OSI Approved :: MIT License",
|
|
25
|
+
"Operating System :: OS Independent",
|
|
26
|
+
"Programming Language :: Python :: 3",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Programming Language :: Python :: 3.13",
|
|
30
|
+
"Programming Language :: Python :: 3.14",
|
|
31
|
+
"Programming Language :: Python :: 3.15",
|
|
32
|
+
"Topic :: Education",
|
|
33
|
+
"Topic :: Software Development :: Compilers",
|
|
34
|
+
"Topic :: Software Development :: Interpreters",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.urls]
|
|
38
|
+
Homepage = "https://github.com/lupaxa-after-hours/lupe"
|
|
39
|
+
Documentation = "https://lupe.thelupaxaproject.org/"
|
|
40
|
+
Repository = "https://github.com/lupaxa-after-hours/lupe"
|
|
41
|
+
Issues = "https://github.com/lupaxa-after-hours/lupe/issues"
|
|
42
|
+
|
|
43
|
+
[project.scripts]
|
|
44
|
+
lupe = "lupaxa.lupe.cli:main"
|
|
45
|
+
lupaxa-lupe = "lupaxa.lupe.cli:main"
|
|
46
|
+
|
|
47
|
+
[project.optional-dependencies]
|
|
48
|
+
dev = [
|
|
49
|
+
"pytest>=8.0",
|
|
50
|
+
"pytest-cov>=5.0",
|
|
51
|
+
"ruff>=0.6.0",
|
|
52
|
+
"mypy>=1.12.0",
|
|
53
|
+
"hatch>=1.12.0",
|
|
54
|
+
"bump-my-version>=1.2.0",
|
|
55
|
+
"pip-audit>=2.7.0",
|
|
56
|
+
"mkdocs==1.6.1",
|
|
57
|
+
"mkdocs-material==9.7.7",
|
|
58
|
+
]
|
|
59
|
+
test = [
|
|
60
|
+
"pytest>=8.0",
|
|
61
|
+
"pytest-cov>=5.0",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[tool.hatch.version]
|
|
65
|
+
path = "src/lupaxa/lupe/version.py"
|
|
66
|
+
|
|
67
|
+
[tool.hatch.build.targets.sdist]
|
|
68
|
+
include = [
|
|
69
|
+
"src/**",
|
|
70
|
+
"README.md",
|
|
71
|
+
"LICENCE",
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
[tool.hatch.build.targets.wheel]
|
|
75
|
+
packages = ["src/lupaxa"]
|
|
76
|
+
|
|
77
|
+
[tool.ruff]
|
|
78
|
+
line-length = 200
|
|
79
|
+
target-version = "py311"
|
|
80
|
+
|
|
81
|
+
[tool.ruff.lint]
|
|
82
|
+
select = [
|
|
83
|
+
"E",
|
|
84
|
+
"F",
|
|
85
|
+
"I",
|
|
86
|
+
"B",
|
|
87
|
+
"S",
|
|
88
|
+
"UP",
|
|
89
|
+
"SIM",
|
|
90
|
+
"C4",
|
|
91
|
+
"ISC",
|
|
92
|
+
"D",
|
|
93
|
+
"ANN",
|
|
94
|
+
"PT",
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
ignore = [
|
|
98
|
+
"D200",
|
|
99
|
+
"D201",
|
|
100
|
+
"D202",
|
|
101
|
+
"D203",
|
|
102
|
+
"D204",
|
|
103
|
+
"D205",
|
|
104
|
+
"D206",
|
|
105
|
+
"D207",
|
|
106
|
+
"D208",
|
|
107
|
+
"D209",
|
|
108
|
+
"D210",
|
|
109
|
+
"D211",
|
|
110
|
+
"D212",
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
[tool.ruff.lint.per-file-ignores]
|
|
114
|
+
"tests/**/*.py" = [
|
|
115
|
+
"S101",
|
|
116
|
+
"S105",
|
|
117
|
+
"S311",
|
|
118
|
+
"S603",
|
|
119
|
+
"ANN001",
|
|
120
|
+
"ANN201",
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
[tool.ruff.lint.pydocstyle]
|
|
124
|
+
convention = "numpy"
|
|
125
|
+
|
|
126
|
+
[tool.ruff.format]
|
|
127
|
+
quote-style = "double"
|
|
128
|
+
|
|
129
|
+
[tool.pyright]
|
|
130
|
+
pythonVersion = "3.11"
|
|
131
|
+
|
|
132
|
+
[tool.basedpyright]
|
|
133
|
+
pythonVersion = "3.11"
|
|
134
|
+
|
|
135
|
+
[tool.mypy]
|
|
136
|
+
python_version = "3.11"
|
|
137
|
+
files = ["src", "tests"]
|
|
138
|
+
mypy_path = "src"
|
|
139
|
+
explicit_package_bases = true
|
|
140
|
+
namespace_packages = true
|
|
141
|
+
warn_unused_configs = true
|
|
142
|
+
ignore_missing_imports = true
|
|
143
|
+
|
|
144
|
+
[tool.pytest.ini_options]
|
|
145
|
+
addopts = "-ra -q --disable-warnings"
|
|
146
|
+
testpaths = ["tests"]
|
|
147
|
+
pythonpath = ["src", "."]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Lupe reference interpreter.
|
|
2
|
+
|
|
3
|
+
Lupe is a small interpreted scripting language. This package is the Python
|
|
4
|
+
reference implementation: a handwritten lexer, a recursive-descent parser, and
|
|
5
|
+
a tree-walking interpreter. It does not execute Lupe source with Python's
|
|
6
|
+
``eval`` or ``exec``.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from lupaxa.lupe.version import __version__, get_version
|
|
12
|
+
|
|
13
|
+
__all__ = ["__version__", "get_version"]
|