You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update CLAUDE.md and format code with Black and isort
Improve CLAUDE.md with comprehensive build/test commands and code style guidelines.
Apply code formatting across the repository for consistency.
Co-authored-by: Claude <[email protected]>
Closes: #5
- Format code: `poetry run black .` and `poetry run isort .`
9
+
- Format code: `make format` or `poetry run black . && poetry run isort .`
10
+
- Lint code: `make lint` or `poetry run flake8 . && poetry run mypy .`
11
+
- Type check: `make typecheck` or `poetry run mypy .`
11
12
- Run all tests: `make test` or `poetry run pytest tests/`
12
-
- Run single test: `poetry run pytest tests/test_file.py::TestClass::test_method -v`
13
+
- Run single test file: `make test-file FILE=tests/test_file.py` or `poetry run pytest tests/test_file.py -v`
14
+
- Run single test function: `make test-function FILE=tests/test_file.py::test_function` or `poetry run pytest tests/test_file.py::TestClass::test_method -v`
13
15
- Run tests in exercises: `cd exercises && poetry run pytest test_file.py`
14
16
15
17
## Code Style Guidelines
16
18
17
19
- Use Python 3.11+ features and syntax
18
-
- Follow PEP 8 style guidelines
19
-
- Use Black for code formatting and isort for import sorting
20
-
- Use type hints for function parameters and return values
21
-
- Use docstrings for all classes and functions
20
+
- Follow PEP 8 style guidelines with Black (line-length=88) and isort
21
+
- Use strict type hints throughout (mypy with disallow_untyped_defs=true)
22
+
- Use snake_case for variables/functions, PascalCase for classes
22
23
- Organize imports: standard library, third-party, local
23
-
- Use snake_case for variables and functions, PascalCase for classes
24
-
- Prefer context managers for file handling
25
-
- Use proper error handling with specific exceptions
26
-
- Organize code using modules and packages appropriately
24
+
- Include docstrings for all modules, classes, and functions
25
+
- Use context managers for resource handling
26
+
- Raise specific exceptions with descriptive messages
27
+
- Validate input parameters with assertions or value checks
28
+
- Structure code using modules and packages appropriately
27
29
28
-
## Documentation Standards
30
+
## Language Implementation Notes
29
31
30
-
- Include a docstring for each module, class, and function
31
-
- Use descriptive variable and function names
32
-
- When creating examples, follow the existing patterns in the repository
33
-
34
-
## Simple Language Implementation
35
-
36
-
- The repository includes a simple language implementation with lexer, parser, and evaluator
- The language supports basic arithmetic, conditionals, and functional programming constructs
39
-
- The interpreter includes reflection capabilities and a meta-circular evaluator
32
+
The repository includes a simple language implementation with lexer, parser, and evaluator supporting functional programming constructs and reflection capabilities.
0 commit comments