Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit eac2633d authored by Dorian Turba's avatar Dorian Turba
Browse files

add tomlsort

parent f97d394c
No related branches found
No related tags found
No related merge requests found
Pipeline #25286 passed
repos: repos:
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.9.0 rev: 23.9.1
hooks: hooks:
- id: black - id: black
args: [ --check, --diff, --quiet ] args: [ --check, --diff, --quiet ]
...@@ -20,16 +20,21 @@ repos: ...@@ -20,16 +20,21 @@ repos:
- id: mypy - id: mypy
exclude: ^tests/ exclude: ^tests/
- repo: https://github.com/jackdewinter/pymarkdown - repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.13.3 rev: v0.9.13.4
hooks: hooks:
- id: pymarkdown - id: pymarkdown
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.287 rev: v0.0.292
hooks: hooks:
- id: ruff - id: ruff
- repo: https://github.com/pre-commit/pre-commit-hooks/ - repo: https://github.com/pre-commit/pre-commit-hooks/
rev: v4.4.0 rev: v4.5.0
hooks: hooks:
- id: check-yaml - id: check-yaml
- id: check-case-conflict - id: check-case-conflict
- id: check-docstring-first - id: check-docstring-first
\ No newline at end of file - repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort
args: [ --check ]
...@@ -128,6 +128,7 @@ This will run the following hooks: ...@@ -128,6 +128,7 @@ This will run the following hooks:
* `isort` * `isort`
* `mypy` * `mypy`
* `pymarkdown` * `pymarkdown`
* `toml-sort`
##### Fixing quality issues ##### Fixing quality issues
...@@ -136,6 +137,7 @@ You can automatically fix some of the quality issues by running: ...@@ -136,6 +137,7 @@ You can automatically fix some of the quality issues by running:
```bash ```bash
black . black .
isort . isort .
toml-sort --in-place pyproject.toml
``` ```
#### Testing #### Testing
......
[build-system] [build-system]
requires = ["hatchling"]
build-backend = "hatchling.build" build-backend = "hatchling.build"
requires = ["hatchling"]
[project] [project]
name = "fake_session_maker" name = "fake_session_maker"
version = "0.1.0" version = "0.1.0"
authors = [ authors = [
{ name = "Dorian Turba", email = "contact.5rgbj@8shield.net" }, {email = "contact.5rgbj@8shield.net", name = "Dorian Turba"},
] ]
description = "Create a SQLAlchemy session_maker that won't commit to db for testing purposes." description = "Create a SQLAlchemy session_maker that won't commit to db for testing purposes."
readme = "README.md" readme = "README.md"
requires-python = ">=3.7" requires-python = ">=3.7"
classifiers = [ classifiers = [
"Programming Language :: Python :: 3", "Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
"Operating System :: OS Independent", "Operating System :: OS Independent",
"Development Status :: 4 - Beta", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Typing :: Typed", "Typing :: Typed",
] ]
dependencies = [ dependencies = [
...@@ -28,10 +28,6 @@ dependencies = [ ...@@ -28,10 +28,6 @@ dependencies = [
"pytest >= 7, < 8", "pytest >= 7, < 8",
] ]
[project.urls]
"Homepage" = "https://lab.frogg.it/dorianturba/fake_session_maker"
"Bug Tracker" = "https://lab.frogg.it/dorianturba/fake_session_maker"
[project.optional-dependencies] [project.optional-dependencies]
ALL = ["fake_session_maker[QUALITY]", "fake_session_maker[TEST]"] ALL = ["fake_session_maker[QUALITY]", "fake_session_maker[TEST]"]
REQUIREMENTS = ["pip-tools"] REQUIREMENTS = ["pip-tools"]
...@@ -42,34 +38,52 @@ QUALITY = [ ...@@ -42,34 +38,52 @@ QUALITY = [
"mypy", "mypy",
"ruff", "ruff",
"pre-commit", "pre-commit",
"toml-sort",
] ]
TEST = [ TEST = [
"pytest-asyncio",
"psycopg2 < 3.0",
"asyncpg < 1.0", "asyncpg < 1.0",
"coverage", "coverage",
"psycopg2 < 3.0",
"pytest-asyncio",
] ]
[project.urls]
"Bug Tracker" = "https://lab.frogg.it/dorianturba/fake_session_maker"
"Homepage" = "https://lab.frogg.it/dorianturba/fake_session_maker"
[tool.black]
line-length = 88
[tool.mypy]
disallow_untyped_defs = true
packages = "fake_session_maker"
python_version = 3.7
[tool.pymarkdown]
strict-config = true
plugins.line-length.line_length = 88
[tool.pytest.ini_options] [tool.pytest.ini_options]
minversion = "6.0"
addopts = "-rA -q --strict-markers" addopts = "-rA -q --strict-markers"
testpaths = [
"tests",
"integration",
]
markers = [ markers = [
"regression: prevent regression of functionality",
"destructive: make sure unwanted behavior raise errors", "destructive: make sure unwanted behavior raise errors",
"property: property based testing", "property: property based testing",
"regression: prevent regression of functionality",
]
minversion = "6.0"
testpaths = [
"integration",
"tests",
] ]
[tool.black] [tool.tomlsort]
line-length = 88 all = true
in_place = true
spaces_indent_inline_array = 4
trailing_comma_inline_array = true
[tool.mypy] [tool.tomlsort.overrides."project"]
packages = "fake_session_maker" table_keys = false
python_version = 3.7
disallow_untyped_defs = true
[tool.tox] [tool.tox]
legacy_tox_ini = """ legacy_tox_ini = """
...@@ -98,7 +112,3 @@ legacy_tox_ini = """ ...@@ -98,7 +112,3 @@ legacy_tox_ini = """
deps = mypy deps = mypy
commands = mypy src commands = mypy src
""" """
[tool.pymarkdown]
strict-config = true
plugins.line-length.line_length = 88
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment