Skip to content

Commit

Permalink
style: apply toml-sort selectively on styles without breaking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Nov 5, 2023
1 parent 578bfb5 commit 5cca920
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 27 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ max-complexity = 10
"tests/**" = ["ANN", "PLR0913", "S101", "S105", "T201", "T203"]
"tests/data/**" = ["INP001"]

# https://github.com/pappasam/toml-sort
[tool.tomlsort]
all = true
ignore_case = true
Expand Down
4 changes: 2 additions & 2 deletions src/nitpick/resources/any/codeclimate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ version = "2"
threshold = 1000

[".codeclimate.yml".checks.method-complexity.config]
threshold = 10 # Same as [flake8]max-complexity
threshold = 10 # Same as [flake8]max-complexity

[".codeclimate.yml".plugins.fixme] # https://docs.codeclimate.com/docs/fixme
[".codeclimate.yml".plugins.fixme] # https://docs.codeclimate.com/docs/fixme
# https://github.com/codeclimate/codeclimate-fixme
enabled = false
46 changes: 23 additions & 23 deletions src/nitpick/resources/presets/nitpick.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ minimum_version = "0.10.0"

[nitpick.styles]
include = [
# Suggest the current stable Python version for projects
"py://nitpick/resources/python/39",
# Suggest the current stable Python version for projects
"py://nitpick/resources/python/39",

"py://nitpick/resources/python/absent",
"py://nitpick/resources/python/black",
"py://nitpick/resources/python/pre-commit-hooks",
"py://nitpick/resources/python/mypy",
"py://nitpick/resources/python/poetry",
"py://nitpick/resources/python/pylint",
"py://nitpick/resources/python/radon",
"py://nitpick/resources/python/readthedocs",
"py://nitpick/resources/python/sonar-python",
"py://nitpick/resources/python/tox",
"py://nitpick/resources/python/github-workflow",
"py://nitpick/resources/python/absent",
"py://nitpick/resources/python/black",
"py://nitpick/resources/python/pre-commit-hooks",
"py://nitpick/resources/python/mypy",
"py://nitpick/resources/python/poetry",
"py://nitpick/resources/python/pylint",
"py://nitpick/resources/python/radon",
"py://nitpick/resources/python/readthedocs",
"py://nitpick/resources/python/sonar-python",
"py://nitpick/resources/python/tox",
"py://nitpick/resources/python/github-workflow",

"py://nitpick/resources/any/prettier",
"py://nitpick/resources/any/codeclimate",
"py://nitpick/resources/any/commitizen",
"py://nitpick/resources/any/editorconfig",
"py://nitpick/resources/any/git-legal",
"py://nitpick/resources/any/pre-commit-hooks",
"py://nitpick/resources/markdown/markdownlint",
"py://nitpick/resources/any/prettier",
"py://nitpick/resources/any/codeclimate",
"py://nitpick/resources/any/commitizen",
"py://nitpick/resources/any/editorconfig",
"py://nitpick/resources/any/git-legal",
"py://nitpick/resources/any/pre-commit-hooks",
"py://nitpick/resources/markdown/markdownlint",

"py://nitpick/resources/shell/bashate",
"py://nitpick/resources/shell/shellcheck",
"py://nitpick/resources/shell/bashate",
"py://nitpick/resources/shell/shellcheck",

"py://nitpick/resources/javascript/package-json",
"py://nitpick/resources/javascript/package-json",
]
4 changes: 2 additions & 2 deletions src/nitpick/resources/python/absent.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "Files that should not exist"

[nitpick.files.absent]
"requirements.txt" = "Install poetry, run 'poetry init' to create pyproject.toml, and move dependencies to it"
".isort.cfg" = "Move values to setup.cfg, section [isort]"
".pyup.yml" = "Configure safety instead: https://github.com/pyupio/safety#using-safety-with-a-ci-service"
"Pipfile" = "Use pyproject.toml instead"
"Pipfile.lock" = "Use pyproject.toml instead"
".pyup.yml" = "Configure safety instead: https://github.com/pyupio/safety#using-safety-with-a-ci-service"
"requirements.txt" = "Install poetry, run 'poetry init' to create pyproject.toml, and move dependencies to it"
1 change: 1 addition & 0 deletions src/nitpick/resources/python/radon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ url = "https://github.com/rubik/radon"

[".codeclimate.yml".plugins.radon] # https://docs.codeclimate.com/docs/radon
enabled = true

[".codeclimate.yml".plugins.radon.config]
# https://radon.readthedocs.io/en/latest/commandline.html#the-cc-command
threshold = "C"

0 comments on commit 5cca920

Please sign in to comment.