Skip to content

Commit

Permalink
docs: optimize format usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Undertone0809 committed Sep 3, 2024
1 parent 53ed43e commit 1d35e47
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ make pre-commit-install
After installation you may execute code formatting. We use [ruff](https://github.com/astral-sh/ruff) to format our code.

```bash
make formatting
make format
```

### Checks
Expand All @@ -42,7 +42,7 @@ Before submitting your code please do the following steps:
1. Add any changes you want
1. Add tests for the new changes
1. Edit documentation if you have changed something significant
1. Run `make formatting` to format your changes.
1. Run `make format` to format your changes.
1. Run `make lint` to ensure that types, security and docstrings are okay.

## Other help
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ polish-codestyle:
poetry run ruff format --config pyproject.toml hooks tests p3g
poetry run ruff check --fix --config pyproject.toml hooks tests p3g

formatting: polish-codestyle
format: polish-codestyle

test:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Automatic formatting uses `ruff`.
make polish-codestyle

# or use synonym
make formatting
make format
```

Codestyle checks only, without rewriting files:
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ make pre-commit-install
make polish-codestyle

# 或使用同义词
make formatting
make format
```

仅检查代码风格,不重写文件:
Expand Down
3 changes: 2 additions & 1 deletion hooks/post_gen_project.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module is called after project is created."""

import textwrap
from pathlib import Path
from shutil import move, rmtree
Expand Down Expand Up @@ -89,7 +90,7 @@ def print_further_instructions(project_name: str, github: str) -> None:
4) Run codestyle:
$ make formatting
$ make format
5) Upload initial code to GitHub:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ make pre-commit-install
After installation you may execute code formatting. We use [ruff](https://github.com/astral-sh/ruff) to format our code.

```bash
make formatting
make format
```

### Checks
Expand All @@ -42,7 +42,7 @@ Before submitting your code please do the following steps:
1. Add any changes you want
1. Add tests for the new changes
1. Edit documentation if you have changed something significant
1. Run `make formatting` to format your changes.
1. Run `make format` to format your changes.
1. Run `make lint` to ensure that types, security and docstrings are okay.

## Other help
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Automatic formatting uses `ruff`.
make polish-codestyle

# or use synonym
make formatting
make format
```

Codestyle checks only, without rewriting files:
Expand Down

0 comments on commit 1d35e47

Please sign in to comment.