Skip to content

Commit 4ab4ca0

Browse files
authored
Merge pull request #25 from stevenhua0320/fix-cli
fix: fixed command-line-control usability
2 parents f8c7bc2 + 7d7c8c0 commit 4ab4ca0

3 files changed

Lines changed: 34 additions & 11 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ repos:
5757
- id: prettier
5858
additional_dependencies:
5959
- "prettier@^3.2.4"
60-
# docformatter - PEP 257 compliant docstring formatter
61-
- repo: https://github.com/s-weigand/docformatter
62-
rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c
60+
# ruff - An extremely fast Python linter and code formatter, written in Rust.
61+
- repo: https://github.com/astral-sh/ruff-pre-commit
62+
rev: v0.15.12
6363
hooks:
64-
- id: docformatter
65-
additional_dependencies: [tomli]
66-
args: [--in-place, --config, ./pyproject.toml]
64+
- id: ruff-check
65+
args: [--fix, --config, ./pyproject.toml]

news/fix-cli.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* Fixed command line control usability
20+
21+
**Security:**
22+
23+
* <news item>

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ exclude = [] # exclude packages matching these glob patterns (empty by default)
4949
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
5050

5151
[project.scripts]
52-
diffpy-distanceprinter = "diffpy.distanceprinter.distanceprinter_app:main"
52+
distanceprinter = "diffpy.distanceprinter.distanceprinter:main"
5353

5454
[tool.setuptools.dynamic]
5555
dependencies = {file = ["requirements/pip.txt"]}
@@ -59,10 +59,11 @@ exclude-file = ".codespell/ignore_lines.txt"
5959
ignore-words = ".codespell/ignore_words.txt"
6060
skip = "*.cif,*.dat"
6161

62-
[tool.docformatter]
63-
recursive = true
64-
wrap-summaries = 72
65-
wrap-descriptions = 72
62+
[tool.ruff]
63+
line-length = 72
64+
65+
[tool.ruff.lint.pydocstyle]
66+
convention = "numpy"
6667

6768
[tool.black]
6869
line-length = 79

0 commit comments

Comments
 (0)