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

fix: use built-in preset as default style #450

Merged
merged 4 commits into from
Jan 28, 2022

Conversation

andreoliwa
Copy link
Owner

@andreoliwa andreoliwa commented Jan 28, 2022

Proposed changes

  • Instead of defaulting to a GitHub URL style, default to a py:// URL from the resources dir
  • What's the impact on existing projects? No impact.
    • The default style file will disappear from the GitHub repo root The old nitpick-style.toml will remain on the root of the repo, for backwards compatibility
  • This change might make nitpick init: Interactively select styles to add to the config file #330 easier to develop
  • No more GitHub requests to resolve URLs and get the default branch of the repo
  • Make sure that all (or most) tests are not doing HTTP requests (remove responses decorators)
  • GitHub URLs should still work if someone has styles on a shared repo

Checklist

  • Read the contribution guidelines
  • Run make locally before pushing commits
  • Add tests for the relevant parts:
    • API
    • CLI
    • flake8 plugin (normal mode)
    • flake8 plugin (offline mode)
  • Write documentation when there's a new API or functionality

@coveralls
Copy link

coveralls commented Jan 28, 2022

Pull Request Test Coverage Report for Build 1759393232

  • 10 of 10 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 97.009%

Totals Coverage Status
Change from base Build 1758972174: 0.01%
Covered Lines: 2038
Relevant Lines: 2084

💛 - Coveralls

@andreoliwa andreoliwa marked this pull request as ready for review January 28, 2022 01:48
@andreoliwa andreoliwa merged commit 68fa2ce into develop Jan 28, 2022
@andreoliwa andreoliwa deleted the change-default-style-to-builtin branch January 28, 2022 13:31
github-actions bot pushed a commit that referenced this pull request Mar 27, 2022
# [0.32.0](v0.31.0...v0.32.0) (2022-03-27)

### Bug Fixes

* **deps:** update dependency pytest-socket to a commit hash ([#440](#440)) ([61ac278](61ac278))
* GitHub URL should preserve query args ([#453](#453)) ([a2b97b1](a2b97b1))
* use built-in preset as default style ([#450](#450)) ([68fa2ce](68fa2ce))

### Features

* add --version cli switch (thanks to [@mjpieters](https://github.com/mjpieters)) ([#468](#468)) ([6a85f79](6a85f79))
* resolve relative URIs in nitpick.styles.include ([#470](#470)) ([ec934dc](ec934dc))
* set initial style url(s) with nitpick init ([#473](#473)) ([0100f2b](0100f2b))
* switch to requests-cache for style caching ([#467](#467)) ([c586d7f](c586d7f))
@github-actions
Copy link

🎉 This PR is included in version 0.32.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Feature/fix is released label Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Feature/fix is released
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants