-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
486 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Ruff Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
ruff: | ||
name: Ruff Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Run Ruff Lint | ||
uses: chartboost/ruff-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,7 @@ | |
name = "nb-cli" | ||
version = "1.2.2" | ||
description = "CLI for nonebot2" | ||
authors = [ | ||
{ name = "yanyongyu", email = "[email protected]" } | ||
] | ||
authors = [{ name = "yanyongyu", email = "[email protected]" }] | ||
license = { text = "MIT" } | ||
readme = "README.md" | ||
keywords = ["bot", "qq", "nonebot", "bot", "qq", "nonebot"] | ||
|
@@ -14,7 +12,7 @@ classifiers = [ | |
"Framework :: Robot Framework :: Library", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3" | ||
"Programming Language :: Python :: 3", | ||
] | ||
|
||
requires-python = ">=3.8, <4.0" | ||
|
@@ -41,30 +39,40 @@ homepage = "https://cli.nonebot.dev/" | |
repository = "https://github.com/nonebot/nb-cli" | ||
|
||
[tool.pdm.dev-dependencies] | ||
i18n = [ | ||
"babel ~=2.11" | ||
] | ||
i18n = ["babel ~=2.11"] | ||
dev = [ | ||
"isort ~=5.10", | ||
"black >=22.3.0", | ||
"nonemoji ~=0.1", | ||
"pre-commit ~=3.1", | ||
"importlib-metadata" | ||
] | ||
docs = [ | ||
"nb-autodoc >=1.0.0a5" | ||
"importlib-metadata", | ||
"ruff>=0.0.281,<0.1.0", | ||
] | ||
docs = ["nb-autodoc >=1.0.0a5"] | ||
|
||
[tool.pdm.scripts] | ||
autodoc = { shell = "rm -rf ./website/docs/api/* && nb-autodoc nb_cli -s nb_cli.template && cp -r ./build/nb_cli/* ./website/docs/api/" } | ||
extract = "pybabel extract -o messages.pot --project nb-cli --version 1.0.0 nb_cli/" | ||
_init = "pybabel init -D nb-cli -i messages.pot -d nb_cli/locale/ -l {args}" | ||
init = { composite = ["extract", "_init {args}"] } | ||
_update = "pybabel update -D nb-cli -i messages.pot -d nb_cli/locale/" | ||
update = { composite = ["extract", "_update"] } | ||
compile = "pybabel compile -D nb-cli -d nb_cli/locale/" | ||
|
||
[project.scripts] | ||
nb = "nb_cli.__main__:main" | ||
|
||
[tool.pdm.build] | ||
setup-script = "build.py" | ||
run-setuptools = false | ||
|
||
[tool.pyright] | ||
pythonPlatform = "All" | ||
reportPrivateImportUsage = false | ||
reportShadowedImports = false | ||
executionEnvironments = [ | ||
{ root = "./website", pythonVersion = "3.10" }, | ||
{ root = "./", pythonVersion = "3.8" } | ||
{ root = "./", pythonVersion = "3.8" }, | ||
] | ||
|
||
[tool.black] | ||
|
@@ -82,23 +90,13 @@ force_sort_within_sections = true | |
extra_standard_library = ["typing_extensions"] | ||
extend_skip = ["nb_cli/template/"] | ||
|
||
[tool.pycln] | ||
path = "." | ||
all = false | ||
|
||
[tool.pdm.scripts] | ||
autodoc = { shell = "rm -rf ./website/docs/api/* && nb-autodoc nb_cli -s nb_cli.template && cp -r ./build/nb_cli/* ./website/docs/api/"} | ||
extract = "pybabel extract -o messages.pot --project nb-cli --version 1.0.0 nb_cli/" | ||
_init = "pybabel init -D nb-cli -i messages.pot -d nb_cli/locale/ -l {args}" | ||
init = { composite = ["extract", "_init {args}"] } | ||
_update = "pybabel update -D nb-cli -i messages.pot -d nb_cli/locale/" | ||
update = { composite = ["extract", "_update"] } | ||
compile = "pybabel compile -D nb-cli -d nb_cli/locale/" | ||
|
||
[tool.ruff] | ||
select = ["E", "W", "F", "UP", "C", "T", "PT", "Q"] | ||
ignore = ["E402", "C901", "UP037"] | ||
extend-exclude = ["nb_cli/template/"] | ||
|
||
[tool.pdm.build] | ||
setup-script = "build.py" | ||
run-setuptools = false | ||
line-length = 88 | ||
target-version = "py38" | ||
|
||
[build-system] | ||
requires = ["pdm-pep517>=1.0.0", "babel~=2.11"] | ||
|