cp.nvim/scrapers
Barrett Ruth 573b335646
feat: file conflict prompt, empty submit guard, and lint fixes (#366)
## Problem

Loading a problem whose source file already exists silently overwrites
user code. Submitting an empty file sends a blank submission to the
platform. Two ruff lint violations existed in the scrapers.

## Solution

- `setup.lua`: when the target source file exists on the filesystem
(`vim.uv.fs_stat`), show an inline `Overwrite? [y/N]:` prompt. Declining
keeps the existing file open and registers state normally. Skipped when
the file is already loaded in a buffer.
- `submit.lua`: resolve path to absolute, use `vim.uv.fs_stat` to verify
existence, abort with WARN if `stat.size == 0` ("Submit aborted: source
file has no content").
- `scrapers/atcoder.py`: remove unused `pathlib.Path` import (F401).
- `scrapers/base.py`: move local imports to top of file (E402).

Closes #364, #365.
2026-03-07 16:30:51 -05:00
..
__init__.py lol 2025-09-24 21:23:06 -04:00
atcoder.py feat: file conflict prompt, empty submit guard, and lint fixes (#366) 2026-03-07 16:30:51 -05:00
base.py feat: file conflict prompt, empty submit guard, and lint fixes (#366) 2026-03-07 16:30:51 -05:00
codechef.py feat: file conflict prompt, empty submit guard, and lint fixes (#366) 2026-03-07 16:30:51 -05:00
codeforces.py feat: file conflict prompt, empty submit guard, and lint fixes (#366) 2026-03-07 16:30:51 -05:00
cses.py fix(scrapers): login fast paths and re-auth hardening for httpx platforms (#357) 2026-03-07 02:23:43 -05:00
kattis.py feat: file conflict prompt, empty submit guard, and lint fixes (#366) 2026-03-07 16:30:51 -05:00
language_ids.py feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
models.py feat: race countdown support and language version selection (#346) 2026-03-06 18:18:21 -05:00
timeouts.py fix: codechef submit fixes and atcoder cleanup (#355) 2026-03-06 23:40:12 -05:00
usaco.py feat: file conflict prompt, empty submit guard, and lint fixes (#366) 2026-03-07 16:30:51 -05:00