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
19 changes: 11 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
exclude: ^(.idea/)
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.15.6"
rev: "v0.16.7"
hooks:
- id: ruff
name: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 9.0.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 26.3.1
rev: 26.5.1
hooks:
- id: black
args:
- "--line-length=120"
- "--target-version=py311"
- "--target-version=py312"
- "--target-version=py313"
- "--target-version=py314"
Expand All @@ -27,8 +28,10 @@ repos:
rev: 1.20.0
hooks:
- id: blacken-docs
# Use the same Black as the hook above so docstring/code-block formatting
# matches the rest of the codebase (the old 23.3.0 pin disagreed with Black 26).
additional_dependencies:
- "black==23.3.0"
- "black==26.5.1"
args:
- "--line-length=120"

Expand Down Expand Up @@ -59,20 +62,20 @@ repos:
exclude: \.(html|svg)$

- repo: https://github.com/fredrikaverpil/creosote.git
rev: v5.1.1
rev: v5.2.0
hooks:
- id: creosote
files: ^quickup/
args: ["--path", "quickup", "--exclude-dep", "python-dotenv"]
exclude: ^tests/

- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
rev: v2.4.3
hooks:
- id: codespell

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.408
rev: v1.1.414
hooks:
- id: pyright
additional_dependencies:
Expand All @@ -87,4 +90,4 @@ repos:
rev: v3.21.2
hooks:
- id: pyupgrade
args: ["--py312-plus"]
args: ["--py311-plus"]
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version: 2

build:
os: "ubuntu-22.04"
os: "ubuntu-24.04"
tools:
python: "3.14"
jobs:
Expand Down
39 changes: 26 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,30 @@ classifiers = [
"Topic :: Software Development",
]
dependencies = [
"python-dotenv", "colorist", "pyclickup", "inquirer", "cyclopts"
"python-dotenv>=1.2.3,<2",
"colorist>=1.8.15,<2",
# pyclickup is unmaintained (0.1.4, last release 2019, classifiers stop at 3.7).
# Upper-bound pinned so an unexpected release cannot silently break the client.
"pyclickup>=0.1.4,<0.2",
"inquirer>=3.4.1,<4",
# 5.0 is in beta with breaking changes; stay on the 4.x line.
"cyclopts>=4.25.2,<5",
]

[project.optional-dependencies]
dev = [
"pytest", "pytest-mock", "pytest-cov", "coverage",
"pytest>=9.1.1,<10",
"pytest-mock>=3.15.1,<4",
"pytest-cov>=7.1.0,<8",
"coverage>=7.16.1,<8",
"pre-commit>=4.6.2,<5",
]
docs = [
"sphinx>=7.1.2,<8",
"sphinx_rtd_theme>=2.0.0",
"gitpython>=3.1.31",
"sphinx-copybutton>=0.5.2",
# Sphinx 9.1+ requires Python 3.12; 9.0.x is the last line supporting the 3.11 floor.
"sphinx>=9.0.4,<10",
"sphinx_rtd_theme>=3.1.0,<4",
"gitpython>=3.1.62,<4",
"sphinx-copybutton>=0.5.2,<1",
]

[project.scripts]
Expand All @@ -59,12 +71,12 @@ path = "__about__.py"

[tool.hatch.envs.default]
dependencies = [
"ipython", "ipdb"
"ipython>=9.17.1,<10", "ipdb>=0.13.13,<0.14"
]

[tool.hatch.envs.test]
dependencies = [
"pytest", "pytest-mock", "pytest-cov"
"pytest>=9.1.1,<10", "pytest-mock>=3.15.1,<4", "pytest-cov>=7.1.0,<8"
]

[tool.hatch.envs.default.scripts]
Expand All @@ -73,18 +85,18 @@ install = "pip install -e .[dev]"

[tool.hatch.envs.docs]
dependencies = [
"sphinx>=7.1.2,<8",
"sphinx_rtd_theme>=2.0.0",
"gitpython>=3.1.31",
"sphinx-copybutton>=0.5.2",
"sphinx>=9.0.4,<10",
"sphinx_rtd_theme>=3.1.0,<4",
"gitpython>=3.1.62,<4",
"sphinx-copybutton>=0.5.2,<1",
]

[tool.hatch.envs.docs.scripts]
build = "sphinx-build -b html docs/source docs/build"
serve = "python -m http.server 8000 --directory docs/build"

[tool.hatch.envs.debug]
dependencies = ["ipdb>=0.13.9", "line_profiler>=3.5.1"]
dependencies = ["ipdb>=0.13.13", "line_profiler>=5.0.2"]

[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12", "3.13", "3.14"]
Expand All @@ -97,6 +109,7 @@ cov = ["test-cov", "cov-report"]
app = "python quickup.py"

[tool.ruff]
target-version = "py311"
line-length = 120

[tool.ruff.lint]
Expand Down
9 changes: 7 additions & 2 deletions quickup/cli/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,19 @@ def _respond(self, status: int, message: str) -> None:
self.send_response(status)
self.send_header("Content-Type", "text/html")
self.end_headers()
# NOTE: keep the emoji choice out of the f-string. pyupgrade corrupts
# multi-line f-strings that embed `{'x' if cond else 'y'}` with non-ASCII
# literals: it re-emits the literal with shifted offsets and appends junk
# to the closing quote on every run (pyupgrade 3.21.2, all --pyNN-plus tiers).
icon = "✅" if status == 200 else "❌"
html = f"""<!DOCTYPE html>
<html><head><title>QuickUp! Login</title></head>
<body style="font-family: system-ui, sans-serif; display: flex; justify-content: center;
align-items: center; height: 100vh; margin: 0; background: #f5f5f5;">
<div style="text-align: center; padding: 2rem; background: white; border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
<h2>{'✅' if status == 200 else '❌'} {message}</h2>
</div></body></html>l>l>l>l>"""
<h2>{icon} {message}</h2>
</div></body></html>"""
self.wfile.write(html.encode())

def log_message(self, format: str, *args: object) -> None:
Expand Down
Loading