Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style/new formating configuration #506

Merged
merged 3 commits into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: reconfigure formatting tools (flake8 and black)
  • Loading branch information
aseure committed Aug 7, 2020
commit 3df922d0bd7932b0af7c53f1d23b625efee6de86
62 changes: 33 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defaults: &defaults
- image: circleci/python:<< parameters.version >>

jobs:
test_unit:
test:
description: Runs unit tests against python << parameters.version >>
<<: *defaults
steps:
Expand All @@ -34,8 +34,8 @@ jobs:
command: |
if [[ "$(python -V)" == "Python 3."* ]]; then sh tests/run_tests_async.sh; fi

test_lint:
description: Runs lint tests
format:
description: Run formatter and linter checks
<<: *defaults
steps:
- checkout
Expand All @@ -45,11 +45,15 @@ jobs:
command: |
pip install -r requirements/requirements-code-style-checker.txt
- run:
name: Run lint tests
name: Run formatter check
command: |
black algoliasearch tests
- run:
name: Run linter check
command: |
flake8 algoliasearch tests

test_types:
types:
description: Runs types tests
<<: *defaults
steps:
Expand Down Expand Up @@ -93,41 +97,41 @@ workflows:
version: 2
ci:
jobs:
- test_unit:
name: 'test_unit_2.7.18'
- test:
name: 'test_27'
version: '2.7.18'
- test_unit:
name: 'test_unit_3.4.10'
- test:
name: 'test_34'
version: '3.4.10'
- test_unit:
name: 'test_unit_3.5.9'
- test:
name: 'test_35'
version: '3.5.9'
- test_unit:
name: 'test_unit_3.6.9'
- test:
name: 'test_36'
version: '3.6.9'
- test_unit:
name: 'test_unit_3.7.7'
- test:
name: 'test_37'
version: '3.7.7'
- test_unit:
name: 'test_unit_3.8.2'
- test:
name: 'test_38'
version: '3.8.2'
- test_lint:
name: 'test_lint'
- format:
name: 'format'
version: '3.8.2'
- test_types:
name: 'test_types'
- types:
name: 'types'
version: '3.8.2'
- release:
version: '3.8.2'
requires:
- test_unit_2.7.18
- test_unit_3.4.10
- test_unit_3.5.9
- test_unit_3.6.9
- test_unit_3.7.7
- test_unit_3.8.2
- test_lint
- test_types
- test_27
- test_34
- test_35
- test_36
- test_37
- test_38
- format
- types
filters:
branches:
only: master
Expand Down
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[flake8]
ignore = F401, F821, F841 local variable '_' is assigned to but never used, E126 continuation line over-indented for hanging indent
max-line-length = 88
ignore = F401, F821, F841 local variable '_' is assigned to but never used, E126 continuation line over-indented for hanging indent, W503
3 changes: 2 additions & 1 deletion requirements/requirements-code-style-checker.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
flake8>=3.6,<4.0
flake8==3.8.3
black==19.10b0