Skip to content

Commit c05025a

Browse files
committed
Code quality improvements
1 parent afa79ac commit c05025a

16 files changed

+1652
-84
lines changed

.github/workflows/publish-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ on:
1818
push:
1919
branches:
2020
- never
21-
tags:
22-
- "*"
21+
# tags:
22+
# - "*"
2323
# release:
2424
# types: [published]
2525

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ on:
1717
push:
1818
branches:
1919
- never
20-
tags:
21-
- "*"
20+
# tags:
21+
# - "*"
2222
# on:
2323
# release:
2424
# types: [published]

.github/workflows/run-tests.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,35 @@ on:
88
- "*"
99

1010
jobs:
11-
build-older-python:
12-
runs-on: ubuntu-20.04
13-
strategy:
14-
matrix:
15-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
11+
# build-older-python:
12+
# runs-on: ubuntu-20.04
13+
# strategy:
14+
# matrix:
15+
# python-version: ["3.9", "3.10"]
1616

17-
steps:
18-
- uses: actions/checkout@v3
19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
21-
with:
22-
python-version: ${{ matrix.python-version }}
23-
cache: "pip"
24-
- name: Display Python version
25-
run: python -c "import sys; print(sys.version)"
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install pytest
30-
- name: Test with pytest
31-
run: |
32-
pip install pytest
33-
pytest -vv -s
17+
# steps:
18+
# - uses: actions/checkout@v3
19+
# - name: Set up Python ${{ matrix.python-version }}
20+
# uses: actions/setup-python@v4
21+
# with:
22+
# python-version: ${{ matrix.python-version }}
23+
# cache: "pip"
24+
# - name: Display Python version
25+
# run: python -c "import sys; print(sys.version)"
26+
# - name: Install dependencies
27+
# run: |
28+
# python -m pip install --upgrade pip
29+
# pip install pytest
30+
# - name: Test with pytest
31+
# run: |
32+
# pip install pytest
33+
# pytest -vv -s
3434

3535
build-newer-python:
3636
runs-on: ubuntu-22.04
3737
strategy:
3838
matrix:
39-
python-version: ["3.11", "3.12"]
39+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
4040

4141
steps:
4242
- uses: actions/checkout@v3

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Tinta is a magical console output tool with support for printing in beautiful colors and with rich formatting, like bold and underline, using static, chain-able methods. It's so pretty, it's almost like a unicorn!
66

7-
![version](https://img.shields.io/badge/version-0.1.7b5-post1-green.svg) [_![GitHub Actions Badge](https://img.shields.io/github/actions/workflow/status/brandonscript/tinta/run-tests.yml)_](https://github.com/brandonscript/tinta/actions) [_![Codacy Badge](https://app.codacy.com/project/badge/Grade/32bf3e3172cf434b914647f06569a836)_](https://www.codacy.com/gh/brandonscript/tinta/dashboard?utm_source=github.com&utm_medium=referral&utm_content=brandonscript/tinta&utm_campaign=Badge_Grade) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tinta) ![MIT License](https://img.shields.io/github/license/brandonscript/tinta) [_![](https://img.shields.io/badge/ethical-source-%23bb8c3c?labelColor=393162)_](https://img.shields.io/badge/ethical-source-%23bb8c3c?labelColor=393162) [_![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)_](code_of_conduct.md)
7+
![version](https://img.shields.io/badge/version-0.1.7-green.svg) [_![GitHub Actions Badge](https://img.shields.io/github/actions/workflow/status/brandonscript/tinta/run-tests.yml)_](https://github.com/brandonscript/tinta/actions) [_![Codacy Badge](https://app.codacy.com/project/badge/Grade/32bf3e3172cf434b914647f06569a836)_](https://www.codacy.com/gh/brandonscript/tinta/dashboard?utm_source=github.com&utm_medium=referral&utm_content=brandonscript/tinta&utm_campaign=Badge_Grade) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tinta) ![MIT License](https://img.shields.io/github/license/brandonscript/tinta) [_![](https://img.shields.io/badge/ethical-source-%23bb8c3c?labelColor=393162)_](https://img.shields.io/badge/ethical-source-%23bb8c3c?labelColor=393162) [_![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)_](code_of_conduct.md)
88

99
## Features and Tinta Basics
1010

@@ -193,7 +193,7 @@ All "add" methods (each color and style method, `Tinta()`, `push()`, and `tint`)
193193

194194
- `s (str)` – A sequence of one or more text strings, to be joined together.
195195
- `sep (str)` – Used to join segment strings. Defaults to `' '`.
196-
> _Note: `sep` behavior has been changed in v0.1.7b5-post1 - if passing a `sep` argument in `print()`, it will overwrite any segment's individual `sep` argument._
196+
> _Note: `sep` behavior has been changed in v0.1.7 - if passing a `sep` argument in `print()`, it will overwrite any segment's individual `sep` argument._
197197
198198
For example:
199199

@@ -228,7 +228,7 @@ All `Tinta` and dynamic color methods will make available the following attribut
228228

229229
_See below for detailed usage and arguments._
230230

231-
> (Note: breaking changes in v0.1.7b5-post1 - several methods have been renamed for better semantics).
231+
> (Note: breaking changes in v0.1.7 - several methods have been renamed for better semantics).
232232
233233
- `print()` – Prints to the console.
234234
- `to_str() -> str` – Returns a joined text string.

dist/publish.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
#!/bin/bash
22
# check for --test option
33
TEST=false
4+
VERBOSE=""
45
if [ "$1" = "--test" ]; then
56
echo -e "[test mode] – will publish to test.pypi.org\n"
67
TEST=true
8+
shift
9+
fi
10+
11+
# check for --verbose option
12+
if [ "$1" = "--verbose" ]; then
13+
VERBOSE="--verbose"
14+
shift
715
fi
816

917
# grab credentials from .pypirc file in .
@@ -29,7 +37,7 @@ PASSWORD=$(echo $PASSWORD | xargs)
2937
LATEST=$(ls -t $ROOT/dist/*.gz | head -n1)
3038

3139
if [ "$TEST" = true ]; then
32-
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --username $USERNAME --password $PASSWORD $LATEST
40+
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --username $USERNAME --password $PASSWORD $VERBOSE $LATEST
3341
else
34-
python3 -m twine upload --username $USERNAME --password $PASSWORD $LATEST
42+
python3 -m twine upload --username $USERNAME --password $PASSWORD $VERBOSE $LATEST
3543
fi
29 KB
Binary file not shown.
-29.3 KB
Binary file not shown.

examples/basic_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def basic():
6262
# Here we tried to print in pink, but used the plaintext arg in print.
6363
# You'll notice we still support Python's multiline \ feature.
6464
Tinta().pink(
65-
"But it's equally important to be able " "to print things in plaintext, too"
65+
"But it's equally important to be able ", "to print things in plaintext, too"
6666
).print(plaintext=True)
6767

6868
# Let's try some f-strings.
@@ -83,7 +83,7 @@ def basic():
8383

8484
# You could do the same using multiple segments, or ()
8585
Tinta().vanilla(
86-
"I like ice cream", "it comes in all sorts" "of great and yummy flavors."
86+
"I like ice cream", "it comes in all sorts", "of great and yummy flavors."
8787
).print()
8888

8989
(

0 commit comments

Comments
 (0)