Skip to content
Merged
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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.0.0
rev: v9.22.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@open-turo/commitlint-config-conventional"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
rev: v4.0.0-alpha.8
hooks:
- id: prettier
stages: [pre-commit]
Expand All @@ -26,13 +26,13 @@ repos:
# - id: shellcheck
# - id: shfmt
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.11.0
rev: v0.18.1
hooks:
- id: markdownlint-cli2
args: ["--fix", ".cursorrules"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.4
rev: v0.11.13
hooks:
# Run the Ruff linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build:
create_environment:
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
install:
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group docs
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --all-extras

# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand Down
21 changes: 11 additions & 10 deletions pytool/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
"""
Copyright 2012 Jacob Alheid
Copyright 2012 Jacob Alheid

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

"""

from pytool import (
cmd,
json,
Expand Down
1 change: 1 addition & 0 deletions pytool/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
into JSON automatically.

"""

from datetime import datetime

import simplejson as json
Expand Down
1 change: 1 addition & 0 deletions pytool/lang.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This module contains items that are "missing" from the Python standard library,
that do miscelleneous things.
"""

import copy
import functools
import inspect
Expand Down
1 change: 1 addition & 0 deletions pytool/time.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This module contains time related things that make life easier.
"""

# The regular 'import time' fails, because for some insane reason, Python lets
# a module import itself. This is a work around to import the non-relative
# module.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_text.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests for pytool.text.
"""

import pytool


Expand Down Expand Up @@ -58,6 +59,5 @@ def test_wrap_preserves_first_line_whitespace():

text = pytool.text.wrap(text, width=70)
assert text == (
"This tool is used for managing all the "
"splits in dev, test and\nproduction.\n"
"This tool is used for managing all the splits in dev, test and\nproduction.\n"
)
Loading