prettytable 3.10.2__tar.gz → 3.12.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.
- prettytable-3.12.0/.github/FUNDING.yml +2 -0
- prettytable-3.12.0/.github/SECURITY.md +5 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/workflows/lint.yml +11 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/workflows/release-drafter.yml +1 -1
- prettytable-3.12.0/.github/workflows/release.yml +76 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/workflows/test.yml +19 -8
- {prettytable-3.10.2 → prettytable-3.12.0}/.gitignore +3 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.pre-commit-config.yaml +18 -14
- {prettytable-3.10.2 → prettytable-3.12.0}/CHANGELOG.md +1 -1
- {prettytable-3.10.2 → prettytable-3.12.0}/PKG-INFO +24 -14
- {prettytable-3.10.2 → prettytable-3.12.0}/README.md +16 -6
- prettytable-3.12.0/RELEASING.md +25 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/pyproject.toml +27 -22
- prettytable-3.12.0/src/prettytable/__init__.py +62 -0
- prettytable-3.12.0/src/prettytable/_version.py +16 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/src/prettytable/colortable.py +42 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/src/prettytable/prettytable.py +531 -268
- {prettytable-3.10.2 → prettytable-3.12.0}/tests/test_colortable.py +35 -4
- {prettytable-3.10.2 → prettytable-3.12.0}/tests/test_prettytable.py +366 -70
- {prettytable-3.10.2 → prettytable-3.12.0}/tox.ini +9 -1
- prettytable-3.10.2/.github/workflows/release.yml +0 -48
- prettytable-3.10.2/CODE_OF_CONDUCT.md +0 -46
- prettytable-3.10.2/CONTRIBUTING.md +0 -5
- prettytable-3.10.2/RELEASING.md +0 -29
- prettytable-3.10.2/src/prettytable/__init__.py +0 -57
- {prettytable-3.10.2 → prettytable-3.12.0}/.coveragerc +0 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/dependabot.yml +0 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/labels.yml +0 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/release-drafter.yml +0 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/workflows/labels.yml +0 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/.github/workflows/require-pr-label.yml +0 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/LICENSE +0 -0
- {prettytable-3.10.2 → prettytable-3.12.0}/src/prettytable/py.typed +0 -0
|
@@ -4,6 +4,7 @@ on: [push, pull_request, workflow_dispatch]
|
|
|
4
4
|
|
|
5
5
|
env:
|
|
6
6
|
FORCE_COLOR: 1
|
|
7
|
+
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
|
7
8
|
|
|
8
9
|
permissions:
|
|
9
10
|
contents: read
|
|
@@ -19,3 +20,13 @@ jobs:
|
|
|
19
20
|
python-version: "3.x"
|
|
20
21
|
cache: pip
|
|
21
22
|
- uses: pre-commit/action@v3.0.1
|
|
23
|
+
|
|
24
|
+
mypy:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- name: Install uv
|
|
30
|
+
uses: hynek/setup-cached-uv@v2
|
|
31
|
+
- name: Mypy
|
|
32
|
+
run: uvx --with tox-uv tox -e mypy
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Build package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
release:
|
|
7
|
+
types:
|
|
8
|
+
- published
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
FORCE_COLOR: 1
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
# Always build & lint package.
|
|
19
|
+
build-package:
|
|
20
|
+
name: Build & verify package
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
|
|
28
|
+
- uses: hynek/build-and-inspect-python-package@v2
|
|
29
|
+
|
|
30
|
+
# Publish to Test PyPI on every commit on main.
|
|
31
|
+
release-test-pypi:
|
|
32
|
+
name: Publish in-dev package to test.pypi.org
|
|
33
|
+
if: |
|
|
34
|
+
github.repository_owner == 'prettytable'
|
|
35
|
+
&& github.event_name == 'push'
|
|
36
|
+
&& github.ref == 'refs/heads/main'
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
needs: build-package
|
|
39
|
+
|
|
40
|
+
permissions:
|
|
41
|
+
id-token: write
|
|
42
|
+
|
|
43
|
+
steps:
|
|
44
|
+
- name: Download packages built by build-and-inspect-python-package
|
|
45
|
+
uses: actions/download-artifact@v4
|
|
46
|
+
with:
|
|
47
|
+
name: Packages
|
|
48
|
+
path: dist
|
|
49
|
+
|
|
50
|
+
- name: Publish to Test PyPI
|
|
51
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
52
|
+
with:
|
|
53
|
+
repository-url: https://test.pypi.org/legacy/
|
|
54
|
+
|
|
55
|
+
# Publish to PyPI on GitHub Releases.
|
|
56
|
+
release-pypi:
|
|
57
|
+
name: Publish to PyPI
|
|
58
|
+
# Only run for published releases.
|
|
59
|
+
if: |
|
|
60
|
+
github.repository_owner == 'prettytable'
|
|
61
|
+
&& github.event.action == 'published'
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
needs: build-package
|
|
64
|
+
|
|
65
|
+
permissions:
|
|
66
|
+
id-token: write
|
|
67
|
+
|
|
68
|
+
steps:
|
|
69
|
+
- name: Download packages built by build-and-inspect-python-package
|
|
70
|
+
uses: actions/download-artifact@v4
|
|
71
|
+
with:
|
|
72
|
+
name: Packages
|
|
73
|
+
path: dist
|
|
74
|
+
|
|
75
|
+
- name: Publish to PyPI
|
|
76
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -2,6 +2,9 @@ name: Test
|
|
|
2
2
|
|
|
3
3
|
on: [push, pull_request, workflow_dispatch]
|
|
4
4
|
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
|
|
5
8
|
env:
|
|
6
9
|
FORCE_COLOR: 1
|
|
7
10
|
|
|
@@ -11,30 +14,38 @@ jobs:
|
|
|
11
14
|
strategy:
|
|
12
15
|
fail-fast: false
|
|
13
16
|
matrix:
|
|
14
|
-
python-version: ["pypy3.10", "3.
|
|
17
|
+
python-version: ["pypy3.10", "3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
15
18
|
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
16
19
|
|
|
17
20
|
steps:
|
|
18
21
|
- uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
persist-credentials: false
|
|
19
24
|
|
|
20
25
|
- name: Set up Python ${{ matrix.python-version }}
|
|
21
26
|
uses: actions/setup-python@v5
|
|
22
27
|
with:
|
|
23
28
|
python-version: ${{ matrix.python-version }}
|
|
24
29
|
allow-prereleases: true
|
|
25
|
-
cache: pip
|
|
26
30
|
|
|
27
|
-
- name: Install
|
|
28
|
-
|
|
29
|
-
python -m pip install -U pip
|
|
30
|
-
python -m pip install -U tox
|
|
31
|
+
- name: Install uv
|
|
32
|
+
uses: hynek/setup-cached-uv@v2
|
|
31
33
|
|
|
32
34
|
- name: Tox tests
|
|
33
35
|
run: |
|
|
34
|
-
tox -e py
|
|
36
|
+
uvx --with tox-uv tox -e py
|
|
35
37
|
|
|
36
38
|
- name: Upload coverage
|
|
37
|
-
uses: codecov/codecov-action@
|
|
39
|
+
uses: codecov/codecov-action@v4
|
|
38
40
|
with:
|
|
39
41
|
flags: ${{ matrix.os }}
|
|
40
42
|
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
|
|
43
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
44
|
+
|
|
45
|
+
success:
|
|
46
|
+
needs: test
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
name: Test successful
|
|
49
|
+
steps:
|
|
50
|
+
- name: Success
|
|
51
|
+
run: echo Test successful
|
|
@@ -1,52 +1,56 @@
|
|
|
1
1
|
repos:
|
|
2
2
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
-
rev: v0.
|
|
3
|
+
rev: v0.6.9
|
|
4
4
|
hooks:
|
|
5
5
|
- id: ruff
|
|
6
6
|
args: [--exit-non-zero-on-fix]
|
|
7
7
|
|
|
8
8
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
9
|
-
rev: 24.
|
|
9
|
+
rev: 24.8.0
|
|
10
10
|
hooks:
|
|
11
11
|
- id: black
|
|
12
12
|
|
|
13
13
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
14
|
-
rev:
|
|
14
|
+
rev: v5.0.0
|
|
15
15
|
hooks:
|
|
16
|
+
- id: check-added-large-files
|
|
16
17
|
- id: check-case-conflict
|
|
17
18
|
- id: check-merge-conflict
|
|
18
19
|
- id: check-toml
|
|
19
20
|
- id: check-yaml
|
|
20
21
|
- id: debug-statements
|
|
21
22
|
- id: end-of-file-fixer
|
|
23
|
+
- id: forbid-submodules
|
|
22
24
|
- id: trailing-whitespace
|
|
23
25
|
exclude: .github/ISSUE_TEMPLATE/bug_report.md|tests/test_prettytable.py
|
|
24
26
|
|
|
25
|
-
- repo: https://github.com/
|
|
26
|
-
rev:
|
|
27
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
28
|
+
rev: 0.29.3
|
|
27
29
|
hooks:
|
|
28
|
-
- id:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
- id: check-github-workflows
|
|
31
|
+
|
|
32
|
+
- repo: https://github.com/rhysd/actionlint
|
|
33
|
+
rev: v1.7.3
|
|
34
|
+
hooks:
|
|
35
|
+
- id: actionlint
|
|
32
36
|
|
|
33
37
|
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
34
|
-
rev: 2.
|
|
38
|
+
rev: 2.2.4
|
|
35
39
|
hooks:
|
|
36
40
|
- id: pyproject-fmt
|
|
37
41
|
|
|
38
42
|
- repo: https://github.com/abravalheri/validate-pyproject
|
|
39
|
-
rev: v0.
|
|
43
|
+
rev: v0.21
|
|
40
44
|
hooks:
|
|
41
45
|
- id: validate-pyproject
|
|
42
46
|
|
|
43
47
|
- repo: https://github.com/tox-dev/tox-ini-fmt
|
|
44
|
-
rev: 1.
|
|
48
|
+
rev: 1.4.1
|
|
45
49
|
hooks:
|
|
46
50
|
- id: tox-ini-fmt
|
|
47
51
|
|
|
48
|
-
- repo: https://github.com/
|
|
49
|
-
rev:
|
|
52
|
+
- repo: https://github.com/rbubley/mirrors-prettier
|
|
53
|
+
rev: v3.3.3
|
|
50
54
|
hooks:
|
|
51
55
|
- id: prettier
|
|
52
56
|
args: [--prose-wrap=always, --print-width=88]
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: prettytable
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.12.0
|
|
4
4
|
Summary: A simple Python library for easily displaying tabular data in a visually appealing ASCII table format
|
|
5
|
-
Project-URL: Changelog, https://github.com/
|
|
6
|
-
Project-URL:
|
|
7
|
-
Project-URL:
|
|
5
|
+
Project-URL: Changelog, https://github.com/prettytable/prettytable/releases
|
|
6
|
+
Project-URL: Funding, https://tidelift.com/subscription/pkg/pypi-prettytable?utm_source=pypi-prettytable&utm_medium=pypi
|
|
7
|
+
Project-URL: Homepage, https://github.com/prettytable/prettytable
|
|
8
|
+
Project-URL: Source, https://github.com/prettytable/prettytable
|
|
8
9
|
Author-email: Luke Maurits <luke@maurits.id.au>
|
|
9
|
-
Maintainer:
|
|
10
|
-
License: BSD
|
|
10
|
+
Maintainer: Hugo van Kemenade
|
|
11
|
+
License-Expression: BSD-3-Clause
|
|
11
12
|
License-File: LICENSE
|
|
12
13
|
Classifier: License :: OSI Approved :: BSD License
|
|
13
14
|
Classifier: Programming Language :: Python
|
|
14
15
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -22,7 +22,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
|
22
22
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
23
23
|
Classifier: Topic :: Text Processing
|
|
24
24
|
Classifier: Typing :: Typed
|
|
25
|
-
Requires-Python: >=3.
|
|
25
|
+
Requires-Python: >=3.9
|
|
26
26
|
Requires-Dist: wcwidth
|
|
27
27
|
Provides-Extra: tests
|
|
28
28
|
Requires-Dist: pytest; extra == 'tests'
|
|
@@ -32,13 +32,13 @@ Description-Content-Type: text/markdown
|
|
|
32
32
|
|
|
33
33
|
# PrettyTable
|
|
34
34
|
|
|
35
|
-
[](https://jazzband.co/)
|
|
36
35
|
[](https://pypi.org/project/prettytable/)
|
|
37
36
|
[](https://pypi.org/project/prettytable/)
|
|
38
37
|
[](https://pypistats.org/packages/prettytable)
|
|
39
|
-
[](https://github.com/prettytable/prettytable/actions)
|
|
39
|
+
[](https://codecov.io/gh/prettytable/prettytable)
|
|
40
|
+
[](https://github.com/psf/black)
|
|
41
|
+
[](https://tidelift.com/subscription/pkg/pypi-prettytable?utm_source=pypi-prettytable&utm_medium=badge)
|
|
42
42
|
|
|
43
43
|
PrettyTable lets you print tables in an attractive ASCII form:
|
|
44
44
|
|
|
@@ -64,11 +64,11 @@ Install via pip:
|
|
|
64
64
|
|
|
65
65
|
Install latest development version:
|
|
66
66
|
|
|
67
|
-
python -m pip install -U git+https://github.com/
|
|
67
|
+
python -m pip install -U git+https://github.com/prettytable/prettytable
|
|
68
68
|
|
|
69
69
|
Or from `requirements.txt`:
|
|
70
70
|
|
|
71
|
-
-e git://github.com/
|
|
71
|
+
-e git://github.com/prettytable/prettytable.git#egg=prettytable
|
|
72
72
|
|
|
73
73
|
## Tutorial on how to use the PrettyTable API
|
|
74
74
|
|
|
@@ -707,6 +707,16 @@ will print:
|
|
|
707
707
|
</table>
|
|
708
708
|
```
|
|
709
709
|
|
|
710
|
+
#### Setting HTML escaping
|
|
711
|
+
|
|
712
|
+
By default, PrettyTable will escape the data contained in the header and data fields
|
|
713
|
+
when sending output to HTML. This can be disabled by setting the `escape_header` and
|
|
714
|
+
`escape_data` to false. For example:
|
|
715
|
+
|
|
716
|
+
```python
|
|
717
|
+
print(table.get_html_string(escape_header=False, escape_data=False))
|
|
718
|
+
```
|
|
719
|
+
|
|
710
720
|
### Miscellaneous things
|
|
711
721
|
|
|
712
722
|
#### Copying a table
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# PrettyTable
|
|
2
2
|
|
|
3
|
-
[](https://jazzband.co/)
|
|
4
3
|
[](https://pypi.org/project/prettytable/)
|
|
5
4
|
[](https://pypi.org/project/prettytable/)
|
|
6
5
|
[](https://pypistats.org/packages/prettytable)
|
|
7
|
-
[](https://github.com/prettytable/prettytable/actions)
|
|
7
|
+
[](https://codecov.io/gh/prettytable/prettytable)
|
|
8
|
+
[](https://github.com/psf/black)
|
|
9
|
+
[](https://tidelift.com/subscription/pkg/pypi-prettytable?utm_source=pypi-prettytable&utm_medium=badge)
|
|
10
10
|
|
|
11
11
|
PrettyTable lets you print tables in an attractive ASCII form:
|
|
12
12
|
|
|
@@ -32,11 +32,11 @@ Install via pip:
|
|
|
32
32
|
|
|
33
33
|
Install latest development version:
|
|
34
34
|
|
|
35
|
-
python -m pip install -U git+https://github.com/
|
|
35
|
+
python -m pip install -U git+https://github.com/prettytable/prettytable
|
|
36
36
|
|
|
37
37
|
Or from `requirements.txt`:
|
|
38
38
|
|
|
39
|
-
-e git://github.com/
|
|
39
|
+
-e git://github.com/prettytable/prettytable.git#egg=prettytable
|
|
40
40
|
|
|
41
41
|
## Tutorial on how to use the PrettyTable API
|
|
42
42
|
|
|
@@ -675,6 +675,16 @@ will print:
|
|
|
675
675
|
</table>
|
|
676
676
|
```
|
|
677
677
|
|
|
678
|
+
#### Setting HTML escaping
|
|
679
|
+
|
|
680
|
+
By default, PrettyTable will escape the data contained in the header and data fields
|
|
681
|
+
when sending output to HTML. This can be disabled by setting the `escape_header` and
|
|
682
|
+
`escape_data` to false. For example:
|
|
683
|
+
|
|
684
|
+
```python
|
|
685
|
+
print(table.get_html_string(escape_header=False, escape_data=False))
|
|
686
|
+
```
|
|
687
|
+
|
|
678
688
|
### Miscellaneous things
|
|
679
689
|
|
|
680
690
|
#### Copying a table
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Release checklist
|
|
2
|
+
|
|
3
|
+
- [ ] Get `main` to the appropriate code release state.
|
|
4
|
+
[GitHub Actions](https://github.com/hugovk/tinytext/actions) should be running
|
|
5
|
+
cleanly for all merges to `main`.
|
|
6
|
+
[](https://github.com/hugovk/tinytext/actions)
|
|
7
|
+
|
|
8
|
+
- [ ] Edit release draft, adjust text if needed:
|
|
9
|
+
https://github.com/hugovk/tinytext/releases
|
|
10
|
+
|
|
11
|
+
- [ ] Check next tag is correct, amend if needed
|
|
12
|
+
|
|
13
|
+
- [ ] Publish release
|
|
14
|
+
|
|
15
|
+
- [ ] Check the tagged
|
|
16
|
+
[GitHub Actions build](https://github.com/hugovk/tinytext/actions/workflows/deploy.yml)
|
|
17
|
+
has deployed to [PyPI](https://pypi.org/project/tinytext/#history)
|
|
18
|
+
|
|
19
|
+
- [ ] Check installation:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip uninstall -y prettytable
|
|
23
|
+
pip install -U prettytable
|
|
24
|
+
python3 -c "import prettytable; print(prettytable.__version__)"
|
|
25
|
+
```
|
|
@@ -9,19 +9,14 @@ requires = [
|
|
|
9
9
|
name = "prettytable"
|
|
10
10
|
description = "A simple Python library for easily displaying tabular data in a visually appealing ASCII table format"
|
|
11
11
|
readme = "README.md"
|
|
12
|
-
license =
|
|
13
|
-
maintainers = [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
authors = [
|
|
17
|
-
{ name = "Luke Maurits", email = "luke@maurits.id.au" },
|
|
18
|
-
]
|
|
19
|
-
requires-python = ">=3.8"
|
|
12
|
+
license = "BSD-3-Clause"
|
|
13
|
+
maintainers = [ { name = "Hugo van Kemenade" } ]
|
|
14
|
+
authors = [ { name = "Luke Maurits", email = "luke@maurits.id.au" } ]
|
|
15
|
+
requires-python = ">=3.9"
|
|
20
16
|
classifiers = [
|
|
21
17
|
"License :: OSI Approved :: BSD License",
|
|
22
18
|
"Programming Language :: Python",
|
|
23
19
|
"Programming Language :: Python :: 3 :: Only",
|
|
24
|
-
"Programming Language :: Python :: 3.8",
|
|
25
20
|
"Programming Language :: Python :: 3.9",
|
|
26
21
|
"Programming Language :: Python :: 3.10",
|
|
27
22
|
"Programming Language :: Python :: 3.11",
|
|
@@ -32,9 +27,7 @@ classifiers = [
|
|
|
32
27
|
"Topic :: Text Processing",
|
|
33
28
|
"Typing :: Typed",
|
|
34
29
|
]
|
|
35
|
-
dynamic = [
|
|
36
|
-
"version",
|
|
37
|
-
]
|
|
30
|
+
dynamic = [ "version" ]
|
|
38
31
|
dependencies = [
|
|
39
32
|
"wcwidth",
|
|
40
33
|
]
|
|
@@ -43,13 +36,17 @@ optional-dependencies.tests = [
|
|
|
43
36
|
"pytest-cov",
|
|
44
37
|
"pytest-lazy-fixtures",
|
|
45
38
|
]
|
|
46
|
-
urls.Changelog = "https://github.com/
|
|
47
|
-
urls.
|
|
48
|
-
urls.
|
|
39
|
+
urls.Changelog = "https://github.com/prettytable/prettytable/releases"
|
|
40
|
+
urls.Funding = "https://tidelift.com/subscription/pkg/pypi-prettytable?utm_source=pypi-prettytable&utm_medium=pypi"
|
|
41
|
+
urls.Homepage = "https://github.com/prettytable/prettytable"
|
|
42
|
+
urls.Source = "https://github.com/prettytable/prettytable"
|
|
49
43
|
|
|
50
44
|
[tool.hatch]
|
|
51
45
|
version.source = "vcs"
|
|
52
46
|
|
|
47
|
+
[tool.hatch.build.hooks.vcs]
|
|
48
|
+
version-file = "src/prettytable/_version.py"
|
|
49
|
+
|
|
53
50
|
[tool.hatch.version.raw-options]
|
|
54
51
|
local_scheme = "no-local-version"
|
|
55
52
|
|
|
@@ -62,26 +59,34 @@ lint.select = [
|
|
|
62
59
|
"EM", # flake8-errmsg
|
|
63
60
|
"F", # pyflakes errors
|
|
64
61
|
"I", # isort
|
|
62
|
+
"ICN", # flake8-import-conventions
|
|
65
63
|
"ISC", # flake8-implicit-str-concat
|
|
66
64
|
"LOG", # flake8-logging
|
|
67
65
|
"PGH", # pygrep-hooks
|
|
66
|
+
"PYI", # flake8-pyi
|
|
67
|
+
"RUF022", # unsorted-dunder-all
|
|
68
68
|
"RUF100", # unused noqa (yesqa)
|
|
69
69
|
"UP", # pyupgrade
|
|
70
70
|
"W", # pycodestyle warnings
|
|
71
71
|
"YTT", # flake8-2020
|
|
72
72
|
]
|
|
73
|
-
lint.
|
|
73
|
+
lint.ignore = [
|
|
74
74
|
"E203", # Whitespace before ':'
|
|
75
75
|
"E221", # Multiple spaces before operator
|
|
76
76
|
"E226", # Missing whitespace around arithmetic operator
|
|
77
77
|
"E241", # Multiple spaces after ','
|
|
78
78
|
]
|
|
79
|
-
lint.
|
|
80
|
-
|
|
81
|
-
]
|
|
82
|
-
lint.isort.required-imports = [
|
|
83
|
-
"from __future__ import annotations",
|
|
84
|
-
]
|
|
79
|
+
lint.flake8-import-conventions.aliases.datetime = "dt"
|
|
80
|
+
lint.flake8-import-conventions.banned-from = [ "datetime" ]
|
|
81
|
+
lint.isort.known-first-party = [ "prettytable" ]
|
|
82
|
+
lint.isort.required-imports = [ "from __future__ import annotations" ]
|
|
85
83
|
|
|
86
84
|
[tool.pyproject-fmt]
|
|
87
85
|
max_supported_python = "3.13"
|
|
86
|
+
|
|
87
|
+
[tool.pytest.ini_options]
|
|
88
|
+
filterwarnings = [
|
|
89
|
+
# Python <= 3.11
|
|
90
|
+
"ignore:sys.monitoring isn't available, using default core:coverage.exceptions.CoverageWarning",
|
|
91
|
+
]
|
|
92
|
+
testpaths = [ "tests" ]
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from ._version import __version__
|
|
6
|
+
from .prettytable import ( # noqa: F401
|
|
7
|
+
_DEPRECATED_ALL,
|
|
8
|
+
_DEPRECATED_DEFAULT,
|
|
9
|
+
_DEPRECATED_DOUBLE_BORDER,
|
|
10
|
+
_DEPRECATED_FRAME,
|
|
11
|
+
_DEPRECATED_HEADER,
|
|
12
|
+
_DEPRECATED_MARKDOWN,
|
|
13
|
+
_DEPRECATED_MSWORD_FRIENDLY,
|
|
14
|
+
_DEPRECATED_NONE,
|
|
15
|
+
_DEPRECATED_ORGMODE,
|
|
16
|
+
_DEPRECATED_PLAIN_COLUMNS,
|
|
17
|
+
_DEPRECATED_RANDOM,
|
|
18
|
+
_DEPRECATED_SINGLE_BORDER,
|
|
19
|
+
HRuleStyle,
|
|
20
|
+
PrettyTable,
|
|
21
|
+
RowType,
|
|
22
|
+
TableHandler,
|
|
23
|
+
TableStyle,
|
|
24
|
+
VRuleStyle,
|
|
25
|
+
_warn_deprecation,
|
|
26
|
+
from_csv,
|
|
27
|
+
from_db_cursor,
|
|
28
|
+
from_html,
|
|
29
|
+
from_html_one,
|
|
30
|
+
from_json,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
__all__ = [
|
|
34
|
+
"ALL",
|
|
35
|
+
"DEFAULT",
|
|
36
|
+
"DOUBLE_BORDER",
|
|
37
|
+
"SINGLE_BORDER",
|
|
38
|
+
"FRAME",
|
|
39
|
+
"HEADER",
|
|
40
|
+
"MARKDOWN",
|
|
41
|
+
"MSWORD_FRIENDLY",
|
|
42
|
+
"NONE",
|
|
43
|
+
"ORGMODE",
|
|
44
|
+
"PLAIN_COLUMNS",
|
|
45
|
+
"RANDOM",
|
|
46
|
+
"HRuleStyle",
|
|
47
|
+
"PrettyTable",
|
|
48
|
+
"RowType",
|
|
49
|
+
"TableHandler",
|
|
50
|
+
"TableStyle",
|
|
51
|
+
"VRuleStyle",
|
|
52
|
+
"from_csv",
|
|
53
|
+
"from_db_cursor",
|
|
54
|
+
"from_html",
|
|
55
|
+
"from_html_one",
|
|
56
|
+
"from_json",
|
|
57
|
+
"__version__",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def __getattr__(name: str) -> Any:
|
|
62
|
+
return _warn_deprecation(name, module_globals=globals())
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# file generated by setuptools_scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
TYPE_CHECKING = False
|
|
4
|
+
if TYPE_CHECKING:
|
|
5
|
+
from typing import Tuple, Union
|
|
6
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
|
+
else:
|
|
8
|
+
VERSION_TUPLE = object
|
|
9
|
+
|
|
10
|
+
version: str
|
|
11
|
+
__version__: str
|
|
12
|
+
__version_tuple__: VERSION_TUPLE
|
|
13
|
+
version_tuple: VERSION_TUPLE
|
|
14
|
+
|
|
15
|
+
__version__ = version = '3.12.0'
|
|
16
|
+
__version_tuple__ = version_tuple = (3, 12, 0)
|
|
@@ -45,12 +45,54 @@ class Theme:
|
|
|
45
45
|
|
|
46
46
|
class Themes:
|
|
47
47
|
DEFAULT = Theme()
|
|
48
|
+
DYSLEXIA_FRIENDLY = Theme(
|
|
49
|
+
default_color="38;5;223",
|
|
50
|
+
vertical_color="38;5;22",
|
|
51
|
+
horizontal_color="38;5;22",
|
|
52
|
+
junction_color="38;5;58",
|
|
53
|
+
)
|
|
54
|
+
EARTH = Theme(
|
|
55
|
+
default_color="33",
|
|
56
|
+
vertical_color="38;5;94",
|
|
57
|
+
horizontal_color="38;5;22",
|
|
58
|
+
junction_color="38;5;130",
|
|
59
|
+
)
|
|
60
|
+
GLARE_REDUCTION = Theme(
|
|
61
|
+
default_color="38;5;252",
|
|
62
|
+
vertical_color="38;5;240",
|
|
63
|
+
horizontal_color="38;5;240",
|
|
64
|
+
junction_color="38;5;246",
|
|
65
|
+
)
|
|
66
|
+
HIGH_CONTRAST = Theme(
|
|
67
|
+
default_color="97",
|
|
68
|
+
vertical_color="91",
|
|
69
|
+
horizontal_color="94",
|
|
70
|
+
junction_color="93",
|
|
71
|
+
)
|
|
72
|
+
LAVENDER = Theme(
|
|
73
|
+
default_color="38;5;183",
|
|
74
|
+
vertical_color="35",
|
|
75
|
+
horizontal_color="38;5;147",
|
|
76
|
+
junction_color="38;5;219",
|
|
77
|
+
)
|
|
48
78
|
OCEAN = Theme(
|
|
49
79
|
default_color="96",
|
|
50
80
|
vertical_color="34",
|
|
51
81
|
horizontal_color="34",
|
|
52
82
|
junction_color="36",
|
|
53
83
|
)
|
|
84
|
+
OCEAN_DEEP = Theme(
|
|
85
|
+
default_color="96",
|
|
86
|
+
vertical_color="34",
|
|
87
|
+
horizontal_color="36",
|
|
88
|
+
junction_color="94",
|
|
89
|
+
)
|
|
90
|
+
PASTEL = Theme(
|
|
91
|
+
default_color="38;5;223",
|
|
92
|
+
vertical_color="38;5;152",
|
|
93
|
+
horizontal_color="38;5;187",
|
|
94
|
+
junction_color="38;5;157",
|
|
95
|
+
)
|
|
54
96
|
|
|
55
97
|
|
|
56
98
|
class ColorTable(PrettyTable):
|