Skip to content

Commit 6ecc778

Browse files
themohitkhareclaude
andcommitted
chore: rename source package python_doctor → pycodegate
Renames the Python module directory and all imports to match the PyPI package name 'pycodegate'. The CLI command stays 'py-gate'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 416a510 commit 6ecc778

64 files changed

Lines changed: 138 additions & 138 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The JSON output includes the score, label, per-diagnostic severity and file loca
2020

2121
- MUST: Use `uv` for all Python operations. `uv run` to execute, `uv sync` to install.
2222
- MUST: Follow existing code patterns — AST-based rule checks extending `BaseRules`.
23-
- MUST: Keep all types in `src/python_doctor/types.py`.
23+
- MUST: Keep all types in `src/pycodegate/types.py`.
2424
- MUST: Use dataclasses (frozen) for data containers.
2525
- MUST: Never comment unless absolutely necessary.
2626
- If the code is a hack, prefix with `# HACK: reason`
@@ -43,15 +43,15 @@ uv run py-gate . --verbose # dogfood on ourselves
4343

4444
## Adding Rules
4545

46-
1. Create a new file in `src/python_doctor/rules/` extending `BaseRules`
46+
1. Create a new file in `src/pycodegate/rules/` extending `BaseRules`
4747
2. Implement `check(self, source: str, filename: str) -> list[Diagnostic]`
48-
3. Register in `src/python_doctor/rules/__init__.py`
48+
3. Register in `src/pycodegate/rules/__init__.py`
4949
4. Add tests in `tests/rules/`
5050

5151
## Architecture
5252

5353
```
54-
src/python_doctor/
54+
src/pycodegate/
5555
cli.py — Click CLI entry point
5656
api.py — Programmatic API (diagnose function)
5757
scan.py — Orchestrator: parallel lint + dead code

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,9 @@ uv run py-gate . --verbose # dogfood it
313313

314314
To add a new rule:
315315

316-
1. Create a file in `src/python_doctor/rules/` extending `BaseRules`
316+
1. Create a file in `src/pycodegate/rules/` extending `BaseRules`
317317
2. Implement `check(self, source: str, filename: str) -> list[Diagnostic]`
318-
3. Register it in `src/python_doctor/rules/__init__.py`
318+
3. Register it in `src/pycodegate/rules/__init__.py`
319319
4. Add tests in `tests/rules/`
320320

321321
## License

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ dev = [
4141
]
4242

4343
[project.scripts]
44-
py-gate = "python_doctor.cli:main"
44+
py-gate = "pycodegate.cli:main"
4545

4646
[build-system]
4747
requires = ["hatchling"]
4848
build-backend = "hatchling.build"
4949

5050
[tool.hatch.build.targets.wheel]
51-
packages = ["src/python_doctor"]
51+
packages = ["src/pycodegate"]
5252

5353
[tool.pytest.ini_options]
5454
testpaths = ["tests"]
@@ -64,10 +64,10 @@ select = ["E", "F", "I", "N", "UP", "B", "SIM", "TCH"]
6464
ignore = ["SIM102"] # nested ifs in AST walking are clearer than combined conditions
6565

6666
[tool.ruff.lint.per-file-ignores]
67-
"src/python_doctor/rules/*.py" = ["E501"] # rule messages are naturally long
68-
"src/python_doctor/rules/__init__.py" = ["TC001"] # runtime imports needed
69-
"src/python_doctor/rules/base.py" = ["TC001"] # runtime import in abstract method
70-
"src/python_doctor/utils/*.py" = ["E501"]
67+
"src/pycodegate/rules/*.py" = ["E501"] # rule messages are naturally long
68+
"src/pycodegate/rules/__init__.py" = ["TC001"] # runtime imports needed
69+
"src/pycodegate/rules/base.py" = ["TC001"] # runtime import in abstract method
70+
"src/pycodegate/utils/*.py" = ["E501"]
7171

7272
[tool.py-gate]
7373
[tool.py-gate.ignore]
299 Bytes
Binary file not shown.
2.86 KB
Binary file not shown.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
from typing import TYPE_CHECKING
66

7-
from python_doctor.config import load_config
8-
from python_doctor.scan import scan_project
7+
from pycodegate.config import load_config
8+
from pycodegate.scan import scan_project
99

1010
if TYPE_CHECKING:
11-
from python_doctor.types import ScanResult
11+
from pycodegate.types import ScanResult
1212

1313

1414
def diagnose(
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
import click
88

9-
from python_doctor import __version__
10-
from python_doctor.config import load_config
11-
from python_doctor.output import output_json, print_scan_result
12-
from python_doctor.scan import scan_project
13-
from python_doctor.types import Severity
14-
from python_doctor.utils.badge import generate_badge, generate_ci_workflow
15-
from python_doctor.utils.fixer import run_ruff_fix
16-
from python_doctor.utils.precommit import install_precommit_hook
9+
from pycodegate import __version__
10+
from pycodegate.config import load_config
11+
from pycodegate.output import output_json, print_scan_result
12+
from pycodegate.scan import scan_project
13+
from pycodegate.types import Severity
14+
from pycodegate.utils.badge import generate_badge, generate_ci_workflow
15+
from pycodegate.utils.fixer import run_ruff_fix
16+
from pycodegate.utils.precommit import install_precommit_hook
1717

1818

1919
@click.command(context_settings={"help_option_names": ["-h", "--help"]})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from dataclasses import dataclass, field
66
from pathlib import Path
77

8-
from python_doctor._compat import tomllib
8+
from pycodegate._compat import tomllib
99

1010

1111
@dataclass

0 commit comments

Comments
 (0)