Skip to content

Commit 35b30ed

Browse files
committed
feat(ruff): remove magic-value-comparison (PLR2004) rule
1 parent a5e2356 commit 35b30ed

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Publish a Python package to PyPI
2+
3+
`uv`를 사용하면 간단합니다. (build, twine 설치 필요 X).
4+
5+
PYPI_API_TOKEN도 쓰지 마세요. 보안상 좋지 않습니다. 대신, trusted publisher에 Github Action yml파일 경로를 등록하면 됩니다.
6+
프로젝트가 존재하지 않는 경우 (업로드 하기 전) pending publisher로 등록하면 됩니다.
7+
8+
<https://docs.pypi.org/trusted-publishers/adding-a-publisher/>
9+
10+
11+
```bash
12+
uv build --sdist
13+
uv publish
14+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ nav:
3030
- LSP (pylance): python_tools/lsp.md
3131
- TODO highlights: python_tools/todo_highlights.md
3232
- 기타 플러그인: python_tools/other_vscode_extensions.md
33+
- PyPI 등록: python_tools/publish_to_pypi.md
3334
- Python:
3435
- logging: python/logging.md
3536
- Version from Git Tag: python/versioneer.md

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ ignore = [
147147
"UP017", # datetime.timezone.utc -> datetime.UTC
148148
"SIM108", # use ternary operator instead of if-else
149149
"TRY003", # long message in except
150+
"PLR2004", # magic value comparison
150151
]
151152

152153
[tool.ruff.lint.per-file-ignores]
@@ -194,10 +195,10 @@ known-first-party = [
194195
"easydict".msg = "Use typing.TypedDict instead (also consider dataclasses and pydantic)"
195196

196197
[tool.ruff.lint.pylint]
197-
max-args = 10
198+
max-args = 15
198199
max-bool-expr = 10
199200
max-statements = 100
200-
max-returns = 10
201+
max-returns = 6
201202
max-public-methods = 30
202203
max-nested-blocks = 10
203204
max-locals = 30

0 commit comments

Comments
 (0)