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
33 changes: 0 additions & 33 deletions .github/workflows/quality.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .pre-commit-config.yaml

This file was deleted.

28 changes: 4 additions & 24 deletions docs/python/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Ruff is a fast, Python-native code linter that helps maintain code quality and c
## Installation

```bash
uv add ruff
uv add ruff --dev
```

## Configuration
Expand Down Expand Up @@ -93,13 +93,7 @@ Perhaps one of the first effects of ruff you'll notice is that it'll break long
```python
# Example 1: Complex Boolean Logic
# Bad - Hard to understand the logic and spot errors
if (
user.is_active
and user.email_verified
and (user.role == "admin" or user.role == "moderator")
and user.has_permission("edit_posts")
and not user.is_banned
):
if user.is_active and user.email_verified and (user.role == "admin" or user.role == "moderator") and user.has_permission("edit_posts") and not user.is_banned:
allow_access()

# Good - Logic is clear and errors are easy to spot
Expand All @@ -116,14 +110,7 @@ if (
# Bad - Exception types are hard to read and modify
try:
process_data()
except (
ValueError,
TypeError,
KeyError,
DatabaseError,
NetworkTimeout,
ValidationError,
) as e:
except (ValueError, TypeError, KeyError, DatabaseError, NetworkTimeout, ValidationError) as e:
log_error(e)

# Good - Each exception is clear and git diffs will show exactly what changed
Expand All @@ -141,14 +128,7 @@ except (

# Example 3: Function Calls with Named Parameters
# Bad - Parameter names and values are hard to scan
create_user(
username="johndoe",
email="john@example.com",
role="admin",
department="engineering",
active=True,
send_welcome_email=True,
)
create_user(username="johndoe", email="john@example.com", role="admin", department="engineering", active=True, send_welcome_email=True)

# Good - Each parameter is clearly visible and self-documenting
create_user(
Expand Down
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ requires-python = ">=3.12"
dependencies = [
"mkdocs-material>=9.6.4",
"mkdocs>=1.6.1",
"pre-commit>=4.1.0",
"mdformat-gfm>=0.4.1",
"mdformat-tables>=1.0.0",
"mdformat-black>=0.1.1",
"mdformat-mkdocs[recommended]>=4.1.2",
"mkdocs-awesome-nav>=3.0.0",
"material-plausible-plugin>=0.3.0",
]
Loading
Loading