Skip to content

Commit ead1f4e

Browse files
authored
Merge pull request #9 from cloudblue/LITE-27806-add-isort-black
LITE-27806 Add isort and black
2 parents b47da8b + cc3e36b commit ead1f4e

File tree

7 files changed

+311
-197
lines changed

7 files changed

+311
-197
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,6 @@ dmypy.json
129129

130130
# Pyre type checker
131131
.pyre/
132+
133+
# Idea IDE
134+
.idea

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ Due to implementation and Mongo engine features there may be some limitations in
8686
## Development
8787

8888
1. Python 3.8+
89-
0. Install dependencies `pip install poetry && poetry install`
89+
2. Install dependencies `pip install poetry && poetry install`
90+
3. We use `isort` library to order and format our imports, and `black` - to format the code.
91+
We check it using `flake8-isort` and `flake8-black` libraries (automatically on `flake8` run).
92+
For convenience you may run `docker compose run format` to format the code.
9093

9194
## Testing
9295

docker-compose.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010

1111
app_test:
1212
container_name: django_mongoengine_rql_test
13-
image: django_mongoengine_rql_test
13+
image: django_mongoengine_rql
1414
build:
1515
context: .
1616
dockerfile: Dockerfile
@@ -23,3 +23,14 @@ services:
2323
MONGO_HOST: mongo
2424
MONGO_USER: root
2525
MONGO_PASSWORD: 1q2w3e
26+
27+
format:
28+
container_name: django_mongoengine_rql_format
29+
image: django_mongoengine_rql
30+
build:
31+
context: .
32+
dockerfile: Dockerfile
33+
command: >
34+
bash -c 'poetry run isort . && poetry run black .'
35+
volumes:
36+
- ./:/app

0 commit comments

Comments
 (0)