From 7d7c8c01d0a0df6de43ae78067ff1e17f33466f4 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Sun, 10 May 2026 22:57:28 -0400 Subject: [PATCH] fix: fixed command-line-control usability --- .pre-commit-config.yaml | 11 +++++------ news/fix-cli.rst | 23 +++++++++++++++++++++++ pyproject.toml | 11 ++++++----- 3 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 news/fix-cli.rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e4a84d..6a92d57 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,10 +57,9 @@ repos: - id: prettier additional_dependencies: - "prettier@^3.2.4" - # docformatter - PEP 257 compliant docstring formatter - - repo: https://github.com/s-weigand/docformatter - rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c + # ruff - An extremely fast Python linter and code formatter, written in Rust. + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.15.12 hooks: - - id: docformatter - additional_dependencies: [tomli] - args: [--in-place, --config, ./pyproject.toml] + - id: ruff-check + args: [--fix, --config, ./pyproject.toml] diff --git a/news/fix-cli.rst b/news/fix-cli.rst new file mode 100644 index 0000000..854af04 --- /dev/null +++ b/news/fix-cli.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Fixed command line control usability + +**Security:** + +* diff --git a/pyproject.toml b/pyproject.toml index eb6f98b..dca3168 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ exclude = [] # exclude packages matching these glob patterns (empty by default) namespaces = false # to disable scanning PEP 420 namespaces (true by default) [project.scripts] -diffpy-distanceprinter = "diffpy.distanceprinter.distanceprinter_app:main" +distanceprinter = "diffpy.distanceprinter.distanceprinter:main" [tool.setuptools.dynamic] dependencies = {file = ["requirements/pip.txt"]} @@ -59,10 +59,11 @@ exclude-file = ".codespell/ignore_lines.txt" ignore-words = ".codespell/ignore_words.txt" skip = "*.cif,*.dat" -[tool.docformatter] -recursive = true -wrap-summaries = 72 -wrap-descriptions = 72 +[tool.ruff] +line-length = 72 + +[tool.ruff.lint.pydocstyle] +convention = "numpy" [tool.black] line-length = 79