Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs_test_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
uses: "actions/checkout@v6"

- name: Check for changed files
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v4
id: changes
with:
list-files: "json"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
uses: "actions/checkout@v6"

- name: Check for changed files
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v4
id: changes
with:
list-files: "json"
Expand All @@ -32,7 +32,7 @@ jobs:

- name: Setup Python 🐍
if: steps.changes.outputs.code == 'true'
uses: "actions/setup-python@v5"
uses: "actions/setup-python@v6"
with:
python-version: "3.9"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
uses: "actions/checkout@v6"

- name: Check for changed files
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v4
id: changes
with:
list-files: "json"
Expand All @@ -37,7 +37,7 @@ jobs:

- name: Setup Python 🐍
if: steps.changes.outputs.code == 'true'
uses: "actions/setup-python@v5"
uses: "actions/setup-python@v6"
with:
python-version: "3.9"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ jobs:
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: False}
- {python-version: "pypy-3.8", testenvs: "pypy38", experimental: False}
- {python-version: "pypy-3.9-v7.3.16", testenvs: "pypy39", experimental: True}
- {python-version: "pypy-3.10-v7.3.19", testenvs: "pypy310,build", experimental: True}
- {python-version: "pypy-3.10-v7.3.19", testenvs: "pypy310", experimental: True}

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
uses: "actions/checkout@v6"

- name: Check for changed files
if: startsWith(github.ref, 'refs/tags/') != true
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v4
id: changes
with:
list-files: "json"
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Setup Python 🐍
id: setup-python
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
uses: "actions/setup-python@v5"
uses: "actions/setup-python@v6"
with:
python-version: "${{ matrix.config.python-version }}"

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
uses: "actions/checkout@v6"

- name: Check for changed files
if: startsWith(github.ref, 'refs/tags/') != true
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v4
id: changes
with:
list-files: "json"
Expand All @@ -57,7 +57,7 @@ jobs:
- name: Setup Python 🐍
id: setup-python
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
uses: "actions/setup-python@v5"
uses: "actions/setup-python@v6"
with:
python-version: "${{ matrix.config.python-version }}"

Expand Down Expand Up @@ -91,10 +91,10 @@ jobs:
runs-on: "ubuntu-22.04"
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
uses: "actions/checkout@v6"

- name: Setup Python 🐍
uses: "actions/setup-python@v5"
uses: "actions/setup-python@v6"
with:
python-version: 3.8

Expand Down Expand Up @@ -144,11 +144,11 @@ jobs:
runs-on: "ubuntu-22.04"
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
uses: "actions/checkout@v6"
if: startsWith(github.ref, 'refs/tags/')

- name: Setup Python 🐍
uses: "actions/setup-python@v5"
uses: "actions/setup-python@v6"
if: startsWith(github.ref, 'refs/tags/')
with:
python-version: 3.8
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jobs:

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
uses: "actions/checkout@v6"

- name: Check for changed files
if: startsWith(github.ref, 'refs/tags/') != true
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v4
id: changes
with:
list-files: "json"
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Setup Python 🐍
id: setup-python
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
uses: "actions/setup-python@v5"
uses: "actions/setup-python@v6"
with:
python-version: "${{ matrix.config.python-version }}"

Expand Down
12 changes: 10 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exclude: ^domdf_python_tools/compat/importlib_resources.py$

ci:
autoupdate_schedule: quarterly
skip: [taplo-lint]

repos:
- repo: https://github.com/repo-helper/pyproject-parser
Expand All @@ -21,7 +22,6 @@ repos:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-toml
- id: check-yaml
- id: check-merge-conflict
- id: check-symlinks
Expand All @@ -31,6 +31,12 @@ repos:
- id: mixed-line-ending
- id: end-of-file-fixer

- repo: https://github.com/domdfcoding/taplo-pre-commit
rev: v0.10.0
hooks:
- id: taplo-lint
args: []

- repo: https://github.com/domdfcoding/pre-commit-hooks
rev: v0.7.0
hooks:
Expand Down Expand Up @@ -78,9 +84,11 @@ repos:
- id: forbid-crlf

- repo: https://github.com/python-formate/snippet-fmt
rev: v0.1.5
rev: v0.2.0
hooks:
- id: snippet-fmt
additional_dependencies:
- formate-trailing-commas>=0.1.1

- repo: https://github.com/python-formate/formate
rev: v1.2.1
Expand Down
4 changes: 2 additions & 2 deletions domdf_python_tools/doctools.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ def sphinxify_docstring() -> Callable[[_F], _F]:
.. code-block:: python

intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
}
"python": ("https://docs.python.org/3/", None),
}
"""

def wrapper(target: _F) -> _F:
Expand Down
2 changes: 0 additions & 2 deletions domdf_python_tools/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ def maybe_make(directory: PathLike, mode: int = 0o777, parents: bool = False):
:no-default parents:

.. versionchanged:: 1.6.0 Removed the ``'exist_ok'`` option, since it made no sense in this context.

"""

if not isinstance(directory, pathlib.Path):
Expand Down Expand Up @@ -455,7 +454,6 @@ def maybe_make(

This will fail silently if a file with the same name already exists.
This appears to be due to the behaviour of :func:`os.mkdir`.

"""

try:
Expand Down
6 changes: 3 additions & 3 deletions domdf_python_tools/stringlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def with_indent(self, indent: Union[String, Indent], size: int = 0):

>>> sl = StringList()
>>> with sl.with_indent(" ", 1):
... sl.append("Hello World")
... sl.append("Hello World")

:param indent: The :class:`~.Indent` to use within the ``with`` block, or the indent type.
:param size: If ``indent`` is an indent type, the indent size to use within the ``with`` block.
Expand All @@ -428,7 +428,7 @@ def with_indent_size(self, size: int = 0):

>>> sl = StringList()
>>> with sl.with_indent_size(1):
... sl.append("Hello World")
... sl.append("Hello World")

:param size: The indent size to use within the ``with`` block.
"""
Expand All @@ -450,7 +450,7 @@ def with_indent_type(self, indent_type: str = '\t'):

>>> sl = StringList()
>>> with sl.with_indent_type(" "):
... sl.append("Hello World")
... sl.append("Hello World")

:param indent_type: The type of indent to use within the ``with`` block.
"""
Expand Down
1 change: 0 additions & 1 deletion domdf_python_tools/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def interrupt() -> None:

>>> interrupt()
(Press Ctrl-C to quit at any time)

"""

print(f"(Press Ctrl-{'C' if os.name == 'nt' else 'D'} to quit at any time)")
Expand Down
1 change: 0 additions & 1 deletion domdf_python_tools/words.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,6 @@ class PluralPhrase(NamedTuple):
'The farmer has 2 cows.'

.. _valid syntax: https://docs.python.org/3/library/string.html#formatstrings

"""

template: str
Expand Down
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ bare-ignore:

lint: unused-imports incomplete-defs bare-ignore
tox -n qa

uncomm:
git status -uall --ignored

# Custom commands can be added below this comment
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,11 @@ setenv =
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py313]
download = True
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1

[testenv:py312]
download = True
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
Expand Down
Loading