Skip to content

Enforcing of flake8 linter #348

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

Merged
merged 2 commits into from
May 11, 2017
Merged

Conversation

sliverc
Copy link
Member

@sliverc sliverc commented May 11, 2017

When I created PR #347 I noticed many flake8 linting errors and it was difficult to differentiate between the errors I have possibly made in my new code block and errors which have been there before.

To avoid this and improve code quality I have adjusted the code so flake8 linting is enforced by CI. I have used autopep8 and some manual adjustments to do so.

Following flake8 flags changed:

  • Allow F405 (star imports) as this is part of drf json api concept
  • Remove E501 so defined max-line-length won't be ignored (otherwise max-line-length doesn't make any sense)

* Allow F405 (star imports) as this is part of drf json api concept
* Remove E501 so defined max-line-length won't be ignored
@codecov-io
Copy link

codecov-io commented May 11, 2017

Codecov Report

Merging #348 into develop will increase coverage by 0.4%.
The diff coverage is 77.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop     #348     +/-   ##
==========================================
+ Coverage    76.45%   76.86%   +0.4%     
==========================================
  Files           50       50             
  Lines         6036     6013     -23     
==========================================
+ Hits          4615     4622      +7     
+ Misses        1421     1391     -30
Impacted Files Coverage Δ
example/api/serializers/post.py 100% <ø> (ø) ⬆️
example/tests/test_multiple_id_mixin.py 100% <ø> (ø) ⬆️
example/factories/__init__.py 97.67% <ø> (ø) ⬆️
example/tests/test_sideload_resources.py 100% <ø> (ø) ⬆️
example/tests/test_model_viewsets.py 100% <ø> (ø) ⬆️
rest_framework_json_api/pagination.py 54.94% <ø> (-0.2%) ⬇️
example/serializers.py 100% <ø> (ø) ⬆️
example/tests/test_generic_validation.py 100% <ø> (ø) ⬆️
example/tests/test_format_keys.py 100% <ø> (ø) ⬆️
example/tests/test_generic_viewset.py 100% <ø> (ø) ⬆️
... and 36 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 76b60fe...c1deeea. Read the comment docs.

@mblayman
Copy link
Collaborator

@sliverc, This is really good stuff! Thank you very much for this contribution. Could I make two additional requests?

  • Could you add your name to the AUTHORS file to acknowledge your contribution? This is a community project and I think everyone should be recognized for their work.
  • Could you add an entry to the CHANGELOG for version v2.3.0?

Once those things happen, I'm happy to merge this. 👍

@sliverc
Copy link
Member Author

sliverc commented May 11, 2017

@mblayman Thanks. Adjusted as requested.

@mblayman mblayman merged commit dec89af into django-json-api:develop May 11, 2017
@sliverc sliverc deleted the enforce_linting branch December 28, 2021 18:52
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.

3 participants