Skip to content
Merged
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
9 changes: 9 additions & 0 deletions dev-guidelines/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,15 @@ Integration tests need OAuth tokens in the `credentials/` folder, and the env va

- Prefer simple code that is easy to read. Avoid deeply nested dict and list comprehensions with
complicated control flow.
- When a condition combines more than two checks, give each check a variable that says what it
checks, then combine the variables:

```python
has_file = path in self.file_hashes
in_immutable_collection = any(path.is_relative_to(p) for p in immutable_subpaths)
denied = self.freeze_private_datasets and has_file and in_immutable_collection
```

- Put a repeated or magic value in a module-level constant.
- Build strings with f-strings.
- Keep imports at the top of the file where possible, in this order: standard library,
Expand Down
Loading