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

Isort fix #40

Closed
wants to merge 15 commits into from
Closed

Isort fix #40

wants to merge 15 commits into from

Conversation

euri10
Copy link
Contributor

@euri10 euri10 commented Feb 18, 2019

Fix for #38

main changes are the following appart from all imports having been reorganized

  1. Added pyproject isort config compliant with black

that should let you run isort locally without any other cli flags if you got the latest version (develop) that supports reading pyproject.toml

[tool.isort]
known_first_party = "fastapi"
default_section = "THIRDPARTY"
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parenthese = true
line_length = 88
  1. Modified test.sh

test.sh command for travis reflects that config:
isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --use-parentheses --line-width 88 --project fastapi --section-default=THIRDPARTY --recursive --check-only --diff

So now you can run isort locally and get same results after you push on travis 🤤

Can't be sure I haven't made mistakes 🐲

@codecov
Copy link

codecov bot commented Feb 18, 2019

Codecov Report

Merging #40 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #40   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files         105    105           
  Lines        2687   2690    +3     
=====================================
+ Hits         2687   2690    +3
Impacted Files Coverage Δ
...tutorial/test_sub_applications/test_tutorial001.py 100% <ø> (ø) ⬆️
fastapi/openapi/utils.py 100% <100%> (ø) ⬆️
docs/src/body_schema/tutorial001.py 100% <100%> (ø) ⬆️
fastapi/utils.py 100% <100%> (ø) ⬆️
...l/test_request_forms_and_files/test_tutorial001.py 100% <100%> (ø) ⬆️
tests/test_extra_routes.py 100% <100%> (ø) ⬆️
...test_application_configuration/test_tutorial001.py 100% <100%> (ø) ⬆️
..._tutorial/test_custom_response/test_tutorial004.py 100% <100%> (ø) ⬆️
tests/test_security_http_bearer.py 100% <100%> (ø) ⬆️
...rial/test_body_multiple_params/test_tutorial001.py 100% <100%> (ø) ⬆️
... and 61 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 712b18a...1a026d9. Read the comment docs.

@tiangolo
Copy link
Owner

Thanks! Please check the comments in #38

@euri10
Copy link
Contributor Author

euri10 commented Feb 18, 2019

Solved quite elegently by #38 (comment)

@euri10 euri10 closed this Feb 18, 2019
@euri10 euri10 deleted the isort_fix branch February 18, 2019 19:59
@tiangolo
Copy link
Owner

Hehe thanks 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants