5
.gitignore
vendored
5
.gitignore
vendored
@@ -193,9 +193,8 @@ cython_debug/
|
|||||||
# jieba
|
# jieba
|
||||||
jieba.cache
|
jieba.cache
|
||||||
|
|
||||||
|
# .vscode
|
||||||
# vscode
|
!.vscode/settings.json
|
||||||
/.vscode
|
|
||||||
|
|
||||||
# direnv
|
# direnv
|
||||||
/.direnv
|
/.direnv
|
||||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"editor.formatOnSave": true
|
||||||
|
}
|
||||||
@@ -19,7 +19,7 @@ services:
|
|||||||
mongodb:
|
mongodb:
|
||||||
container_name: mongodb
|
container_name: mongodb
|
||||||
environment:
|
environment:
|
||||||
- tz=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
# - MONGO_INITDB_ROOT_USERNAME=your_username
|
# - MONGO_INITDB_ROOT_USERNAME=your_username
|
||||||
# - MONGO_INITDB_ROOT_PASSWORD=your_password
|
# - MONGO_INITDB_ROOT_PASSWORD=your_password
|
||||||
expose:
|
expose:
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
pythonEnv = pkgs.python3.withPackages (
|
pythonEnv = pkgs.python3.withPackages (
|
||||||
ps: with ps; [
|
ps: with ps; [
|
||||||
|
ruff
|
||||||
pymongo
|
pymongo
|
||||||
python-dotenv
|
python-dotenv
|
||||||
pydantic
|
pydantic
|
||||||
|
|||||||
@@ -1,23 +1,37 @@
|
|||||||
[project]
|
|
||||||
name = "Megbot"
|
|
||||||
version = "0.1.0"
|
|
||||||
description = "New Bot Project"
|
|
||||||
|
|
||||||
[tool.nonebot]
|
|
||||||
plugins = ["src.plugins.chat"]
|
|
||||||
plugin_dirs = ["src/plugins"]
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
# 设置 Python 版本
|
include = ["*.py"]
|
||||||
target-version = "py39"
|
fixable = ["ALL"]
|
||||||
|
|
||||||
# 启用的规则
|
# 启用的规则
|
||||||
select = [
|
select = [
|
||||||
"E", # pycodestyle 错误
|
"E", # pycodestyle 错误
|
||||||
"F", # pyflakes
|
"F", # pyflakes
|
||||||
"I", # isort
|
"B", # flake8-bugbear
|
||||||
"B", # flake8-bugbear
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
ignore = ["E711"]
|
||||||
|
|
||||||
|
# 如果一个变量的名称以下划线开头,即使它未被使用,也不应该被视为错误或警告。
|
||||||
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||||
|
|
||||||
# 行长度设置
|
# 行长度设置
|
||||||
line-length = 88
|
line-length = 120
|
||||||
|
|
||||||
|
[tool.ruff.format]
|
||||||
|
docstring-code-format = true
|
||||||
|
indent-style = "space"
|
||||||
|
|
||||||
|
# 使用双引号表示字符串
|
||||||
|
quote-style = "double"
|
||||||
|
|
||||||
|
# 尊重魔法尾随逗号
|
||||||
|
# 例如:
|
||||||
|
# items = [
|
||||||
|
# "apple",
|
||||||
|
# "banana",
|
||||||
|
# "cherry",
|
||||||
|
# ]
|
||||||
|
skip-magic-trailing-comma = false
|
||||||
|
|
||||||
|
# 自动检测合适的换行符
|
||||||
|
line-ending = "auto"
|
||||||
|
|||||||
Reference in New Issue
Block a user