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

Address toml reformatting #370

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,5 @@ ansible_collections

# Generated by setuptools-scm
src/ansible_compat/_version.py
package-lock.json
node_modules
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ repos:
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: "v4.0.0-alpha.8"
Expand Down
3 changes: 3 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
proseWrap: always
plugins:
- prettier-plugin-sort-json
- prettier-plugin-toml
jsonRecursiveSort: true # prettier-plugin-sort-json
tabWidth: 2
useTabs: false
Expand Down
40 changes: 20 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"setuptools >= 65.3.0", # required by pyproject+setuptools_scm integration and editable installs
"setuptools_scm[toml] >= 7.0.5" # required for "no-local-version" scheme
"setuptools >= 65.3.0", # required by pyproject+setuptools_scm integration and editable installs
"setuptools_scm[toml] >= 7.0.5", # required for "no-local-version" scheme
]
build-backend = "setuptools.build_meta"

Expand All @@ -12,9 +12,9 @@ dynamic = ["version", "dependencies", "optional-dependencies"]
name = "ansible-compat"
description = "Ansible compatibility goodies"
readme = "README.md"
authors = [{"name" = "Sorin Sbarnea", "email" = "[email protected]"}]
maintainers = [{"name" = "Sorin Sbarnea", "email" = "[email protected]"}]
license = {text = "MIT"}
authors = [{ "name" = "Sorin Sbarnea", "email" = "[email protected]" }]
maintainers = [{ "name" = "Sorin Sbarnea", "email" = "[email protected]" }]
license = { text = "MIT" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
Expand All @@ -33,7 +33,7 @@ classifiers = [
"Topic :: Software Development :: Bug Tracking",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Topic :: Utilities"
"Topic :: Utilities",
]
keywords = ["ansible"]

Expand Down Expand Up @@ -79,14 +79,14 @@ ignore_missing_imports = true

[tool.pylint.BASIC]
good-names = [
"f", # filename
"f", # filename
"i",
"j",
"k",
"ns", # namespace
"ns", # namespace
"ex",
"Run",
"_"
"_",
]

[tool.pylint.IMPORTS]
Expand All @@ -102,7 +102,7 @@ disable = [
"too-many-arguments", # PLR0913
"raise-missing-from",
# Temporary disable duplicate detection we remove old code from prerun
"duplicate-code"
"duplicate-code",
]

[tool.pytest.ini_options]
Expand All @@ -111,7 +111,7 @@ filterwarnings = [
"error",
# py312 ansible-core
# https://github.com/ansible/ansible/issues/81906
"ignore:'importlib.abc.TraversableResources' is deprecated and slated for removal in Python 3.14:DeprecationWarning"
"ignore:'importlib.abc.TraversableResources' is deprecated and slated for removal in Python 3.14:DeprecationWarning",
]
testpaths = ["test"]

Expand All @@ -120,17 +120,17 @@ select = ["ALL"]
ignore = [
# Disabled on purpose:
"ANN101", # Missing type annotation for `self` in method
"D203", # incompatible with D211
"D203", # incompatible with D211
"D211",
"D213", # incompatible with D212
"E501", # we use black
"D213", # incompatible with D212
"E501", # we use black
"RET504", # Unnecessary variable assignment before `return` statement
# Temporary disabled during adoption:
"S607", # Starting a process with a partial executable path
"S607", # Starting a process with a partial executable path
"PLR0912", # Bug https://github.com/charliermarsh/ruff/issues/4244
"PLR0913", # Bug https://github.com/charliermarsh/ruff/issues/4244
"RUF012",
"PERF203"
"PERF203",
]
target-version = "py39"

Expand All @@ -148,9 +148,9 @@ known-third-party = ["packaging"]
convention = "pep257"

[tool.setuptools.dynamic]
dependencies = {file = [".config/requirements.in"]}
optional-dependencies.docs = {file = [".config/requirements-docs.in"]}
optional-dependencies.test = {file = [".config/requirements-test.in"]}
dependencies = { file = [".config/requirements.in"] }
optional-dependencies.docs = { file = [".config/requirements-docs.in"] }
optional-dependencies.test = { file = [".config/requirements-test.in"] }

[tool.setuptools_scm]
local_scheme = "no-local-version"
Expand All @@ -164,5 +164,5 @@ git_describe_command = [
"--tags",
"--long",
"--match",
"v*.*"
"v*.*",
]
Loading