Skip to content

Commit f0c9cb5

Browse files
chore: update references to black
1 parent fa8325d commit f0c9cb5

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

.claude/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This project has custom skills that provide specialized workflows. **Always chec
2323
**Use whenever:** Formatting code, validating style/types/security, or before committing changes.
2424

2525
**Purpose:** Runs targeted linting and code quality checks using `hatch run lint:*`:
26-
- Formats code with Black and Ruff auto-fixes
26+
- Formats code with `ruff check` and `ruff format`
2727
- Validates style, types, and security
2828
- Checks spelling and documentation
2929
- Validates test infrastructure (suitespec, riotfile, etc.)

.claude/skills/lint/SKILL.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ hatch run lint:typing -- path/to/file.py
4848
### Code Formatting
4949

5050
#### `fmt` - Format code (recommended for most edits)
51-
Formats and validates code style using Black and Ruff.
51+
Formats and validates code style using Ruff.
5252

5353
**Usage:**
5454
```bash
@@ -63,7 +63,7 @@ hatch run lint:fmt -- ddtrace/contrib/flask/
6363
```
6464

6565
**What it does:**
66-
1. Runs Black formatter
66+
1. Runs the Ruff formatter
6767
2. Runs Ruff with --fix to auto-fix issues
6868
3. Re-validates with style checks
6969

@@ -94,20 +94,21 @@ hatch run lint:style -- ddtrace/
9494
```
9595

9696
**What it validates:**
97-
- Black formatting
97+
- Ruff formatting
9898
- Ruff linting rules
9999
- Cython linting
100100
- C code formatting
101101
- CMake formatting
102102

103103
**When to use:** To verify style compliance before committing without auto-fixes.
104104

105-
#### `black_check` - Check Black formatting
106-
Validates Python code formatting with Black (no auto-fix).
105+
#### `format_check` - Check formatting
106+
107+
Validates Python code formatting with `ruff format` (no auto-fix).
107108

108109
**Usage:**
109110
```bash
110-
hatch run lint:black_check -- ddtrace/tracer.py
111+
hatch run lint:format_check -- ddtrace/tracer.py
111112
```
112113

113114
**When to use:** Quick check of Python formatting before committing.

docs/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ suite passes.
3535
Within a few business days, one of the maintainers will respond with a code review. The review will
3636
primarily focus on idiomatic Python usage, efficiency, testing, and adherence to the versioning policy.
3737
Correctness and code style are automatically checked in continuous integration, with style linting managed by
38-
various tools including Flake8, Black, and MyPy. This means that code reviews don't need to worry about style
38+
various tools including Flake8, Ruff, and MyPy. This means that code reviews don't need to worry about style
3939
and can focus on substance.
4040

4141
Pull Request Requirements

hatch.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ dependencies = [
2525
]
2626

2727
[envs.lint.scripts]
28-
black_check = [
29-
"ruff format {args:.}",
28+
format_check = [
29+
"ruff format --check {args:.}",
3030
]
3131
cmakeformat_check = [
3232
"bash scripts/cmake-format.sh"
@@ -35,7 +35,7 @@ cformat_check = [
3535
"bash scripts/cformat.sh"
3636
]
3737
style = [
38-
"black_check",
38+
"format_check",
3939
"ruff check {args:.}",
4040
"cython-lint {args:.}",
4141
"cformat_check",
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/sh
2+
23
staged_files=$(git diff --staged --name-only HEAD --diff-filter=ACMR | grep -E '\.py$')
34
if [ -n "$staged_files" ]; then
4-
hatch -v run lint:black_check $staged_files
5+
hatch -v run lint:format_check $staged_files
56
else
67
echo 'hatch style check skipped: No Python files were found in `git diff --staged`'
78
fi

0 commit comments

Comments
 (0)