Skip to content

Commit

Permalink
merge to main
Browse files Browse the repository at this point in the history
  • Loading branch information
dwreeves committed Apr 5, 2024
2 parents bc6977f + 04f9e91 commit d391265
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 85 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ repos:
# hooks:
# - id: prettier

- repo: https:/tox-dev/pyproject-fmt
rev: 1.7.0
hooks:
- id: pyproject-fmt

- repo: https:/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.7
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Fix bug with regex highlighter for options and switches.
- `RichHelpConfiguration()` is now asserted to be JSON serializable, as an option for porting configurations. That said, serialization is not a fully supported feature of the high-level API, so serialize the config at your own risk.
- Related: `highlighter` is now deprecated in `RichHelpConfiguration`; please use `highlighter_patterns` instead.
- Moved exclusively to `pyproject.toml` and removed `setup.py` / `setup.cfg`; thank you [@Stealthii](github.com/Stealthii)!

## Version 1.7.3

Expand Down
107 changes: 82 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,64 @@
[project]
name = "rich-click"
description = "Format click help output nicely with rich"
readme = "README.md"
license = { file = "LICENSE" }
maintainers = [{ name = "Phil Ewels", email = "[email protected]" }]
authors = [{ name = "Phil Ewels", email = "[email protected]" }]
requires-python = ">=3.7"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = [
"version",
]
dependencies = [
"click>=7",
'importlib-metadata; python_version < "3.8"',
"rich>=10.7",
"typing_extensions",
]
optional-dependencies.dev = [
"mypy",
"packaging",
"pre-commit",
"pytest",
"pytest-cov",
"ruff",
"types-setuptools",
]
[project.urls]
Documentation = "https:/ewels/rich-click"
Homepage = "https:/ewels/rich-click"
Issues = "https:/ewels/rich-click/issues"
Repository = "https:/ewels/rich-click"
[project.scripts]
rich-click = "rich_click.cli:main"

[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=45",
]

[tool.setuptools.dynamic]
version = { attr = "rich_click.__version__" }

[tool.black]
line-length = 120
target-version = ['py37']

[tool.mypy]
python_version = "3.8"
scripts_are_modules = "True"
strict = "True"
exclude = [
'.*?live_style_editor\.py$'
]

[tool.ruff]
exclude = [
".git",
Expand All @@ -23,21 +72,21 @@ exclude = [
"docs/"
]
ignore = [
"D100",
"D102",
"D205",
"E731",
"D105",
"D203",
"D212"
"D100", # Missing docstring in public module
"D102", # Missing docstring in public method
"D105", # Missing docstring in magic method
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"E731", # Do not assign a lambda expression, use a def
]
line-length = 120
select = [
"D",
"E",
"F",
"W",
"I001"
"D", # pydocstyle
"E", # pycodestyle
"F", # flake8
"W", # pycodestyle
"I001", # isort
]

[tool.ruff.isort]
Expand All @@ -47,6 +96,19 @@ select = [
lines-after-imports = 2
known-first-party = ["rich_click"]

[tool.pytest.ini_options]
addopts = "-s -rP -vv --showlocals"
pythonpath = ["tests", "src"]
testpaths = ["tests"]

[tool.mypy]
python_version = "3.8"
scripts_are_modules = "True"
strict = "True"
exclude = [
'.*?live_style_editor\.py$'
]

[tool.pyright]
include = ["src"]
pythonVersion = "3.7"
Expand All @@ -57,8 +119,3 @@ executionEnvironments = [
"src",
] },
]

[tool.pytest.ini_options]
addopts = "-s -rP -vv --showlocals"
pythonpath = ["tests", "src"]
testpaths = ["tests"]
42 changes: 0 additions & 42 deletions setup.cfg

This file was deleted.

18 changes: 0 additions & 18 deletions setup.py

This file was deleted.

0 comments on commit d391265

Please sign in to comment.