DefangLabs / DefangLabs/docs-chatbot

Clean up remaining ruff findings ignored in pyproject.toml

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
1
Avg merge
14h 50m
Merged PRs (30d)
21

Description

Follow-up to the Build CI fix (pin ruff + scope its rule set): 39 findings needed a deliberate code review rather than a mechanical fix, so they're ignored in pyproject.toml for now:

  • LOG015 (20x) / LOG014 (1x) — calls on the root logger; needs per-module loggers introduced deliberately across app.py, rag_system.py, get_knowledge_base.py, get_samples_examples.py.
  • BLE001 (6x) — blind except Exception; some of these look intentional (top-level request/error handling), needs a per-call decision.
  • RUF012 (5x) — mutable class-attribute defaults, mostly in test mock classes (test_intercom.py).
  • PLW1510 (2x) — subprocess.run without an explicit check= argument.
  • DTZ011 (1x) — datetime.date.today(), needs a timezone decision.
  • SIM102, SIM103, PIE810, EXE001 (1x each) — small mechanical cleanups, lowest risk of the bunch.

None of these are urgent; they're just deferred out of the CI-unblocking PR to keep that change safe and reviewable.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pyproject.toml, then review the listed findings in app.py, rag_system.py, get_knowledge_base.py, get_samples_examples.py, and test_intercom.py. Check each ignored rule, including the subprocess and date cases, and make the per-call decisions described in the issue. Done means the remaining findings are addressed deliberately and the temporary ignores can be removed without breaking CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.