Skip to content

Commit

Permalink
Merge pull request #16 from tomicapretto/support_more_python_versions
Browse files Browse the repository at this point in the history
Test Python 3.9-3.12 and update Black and Pylint
  • Loading branch information
tomicapretto authored Jan 19, 2025
2 parents b2cadb7 + 4bbcc65 commit 63f9fca
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

name: Set up Python ${{ matrix.python-version }}
steps:
Expand Down
9 changes: 4 additions & 5 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ disable=missing-docstring,
too-many-locals,
too-many-branches,
too-many-statements,
no-self-use,
too-few-public-methods,
bad-continuation
too-many-positional-arguments


# Enable the message, report, category or checker with the given id(s). You can
Expand Down Expand Up @@ -135,8 +134,8 @@ max-module-lines=1000
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator
# no-space-check=trailing-comma,
# dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
Expand Down Expand Up @@ -465,4 +464,4 @@ min-public-methods=2

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtins.Exception
2 changes: 1 addition & 1 deletion flexitext/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __call__(self, string):
def __repr__(self):
specs = [f"{k}={v}" for k, v in self.props.items()]

if sum([len(s) for s in specs]) < 100:
if sum(len(s) for s in specs) < 100:
arg = ", ".join(specs)
else:
arg = spacify(multilinify(specs)) + "\n"
Expand Down
1 change: 1 addition & 0 deletions flexitext/tests/test_flexitext.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from flexitext import flexitext


# These tests are quite poor for now
def test_flexitext():
text = "<color:green, alpha:0.3>a piece of text</>"
Expand Down
2 changes: 1 addition & 1 deletion flexitext/textgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def make_grid(texts):
grid: list
A nested list with `Text` instances.
"""
row_n = sum([text.string.count("\n") for text in texts]) + 1
row_n = sum(text.string.count("\n") for text in texts) + 1
grid = [[] for _ in range(row_n)]
row_idx = 0
for text in texts:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tool.black]
line-length = 100
target-version = ['py37', 'py38']
target-version = ["py310"]
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==22.3.0
pylint==2.10.2
black==24.10.0
pylint==3.3.3
pytest-cov>=2.6.1
pytest>=4.4.0

0 comments on commit 63f9fca

Please sign in to comment.