Skip to content

Commit c6bd085

Browse files
authored
Fix: comment.id type is int (#37)
* fix: comment.id type is int * chore: update ruff * chore: add ruff format * chore: remove black * chore: remove black from docs
1 parent 21c4a0e commit c6bd085

File tree

6 files changed

+21
-40
lines changed

6 files changed

+21
-40
lines changed

.github/workflows/linters.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ on:
1010
- master
1111

1212
jobs:
13-
black:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v3
17-
- uses: psf/black@stable
18-
with:
19-
options: "--check --verbose"
20-
2113
ruff:
2214
runs-on: ubuntu-latest
2315
steps:

.pre-commit-config.yaml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: 'v4.6.0'
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
77
- id: check-yaml
88
- id: check-toml
9-
- id: check-added-large-files
10-
- id: name-tests-test
119

12-
- repo: https://github.com/charliermarsh/ruff-pre-commit
13-
rev: 'v0.0.287'
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
rev: 'v0.4.1'
1412
hooks:
1513
- id: ruff
16-
args: [--fix, --exit-non-zero-on-fix]
17-
18-
- repo: https://github.com/pre-commit/mirrors-mypy
19-
rev: 'v1.5.1'
20-
hooks:
21-
- id: mypy
22-
additional_dependencies: ["msgspec"]
23-
args: [ --ignore-missing-imports ]
24-
exclude: tests|examples
25-
26-
- repo: https://github.com/psf/black
27-
rev: 23.7.0
28-
hooks:
29-
- id: black
30-
language_version: python3
14+
args: [ --fix ]
15+
- id: ruff-format

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ YaTracker
44
Asyncio Yandex Tracker API client
55

66
[![Python](https://img.shields.io/badge/python-^3.10-blue)](https://www.python.org/)
7-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
87
[![Code linter: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
98
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
109
[![Linters](https://github.com/Olegt0rr/YaTracker/actions/workflows/linters.yml/badge.svg)](https://github.com/Olegt0rr/YaTracker/actions/workflows/linters.yml)

pyproject.toml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ dependencies = [
4343
[project.optional-dependencies]
4444
dev = [
4545
"ruff>=0",
46-
"black>=23",
4746
"mypy>=1",
4847
"pre-commit>=3",
4948
]
@@ -156,10 +155,7 @@ ignore_errors = true
156155

157156
[tool.ruff]
158157
src = ["app", "tools", "tests"]
159-
select = ["ALL"]
160-
ignore = ["A003", "ANN002", "ANN003", "ANN101", "ANN102", "D100", "D101", "D106", "D107", "D104", "D203", "D213", "RUF001", "RUF002", "RUF003", "S101", "TCH001", "TCH002", "PT015", "PT017", "B011"]
161-
fixable = ["ALL"]
162-
unfixable = []
158+
163159

164160
# Exclude a variety of commonly ignored directories.
165161
exclude = [
@@ -187,20 +183,28 @@ exclude = [
187183
# Same as Black.
188184
line-length = 88
189185

190-
# Allow unused variables when underscore-prefixed.
191-
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
186+
192187

193188
# Assume Python 3.10.
194189
target-version = "py310"
195190

196-
[tool.ruff.mccabe]
191+
[tool.ruff.lint]
192+
select = ["ALL"]
193+
ignore = ["A003", "ANN002", "ANN003", "ANN101", "ANN102", "D100", "D101", "D106", "D107", "D104", "D203", "D213", "RUF001", "RUF002", "RUF003", "S101", "TCH001", "TCH002", "PT015", "PT017", "B011"]
194+
fixable = ["ALL"]
195+
unfixable = []
196+
197+
# Allow unused variables when underscore-prefixed.
198+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
199+
200+
[tool.ruff.lint.mccabe]
197201
# Unlike Flake8, default to a complexity level of 10.
198202
max-complexity = 10
199203

200-
[tool.ruff.flake8-type-checking]
204+
[tool.ruff.lint.flake8-type-checking]
201205
runtime-evaluated-base-classes = ["msgspec.Struct", "yatracker.types.base.Base"]
202206

203-
[tool.ruff.per-file-ignores]
207+
[tool.ruff.lint.per-file-ignores]
204208
"tests/*" = ["S101", "INP001"]
205209
"tools/*" = ["INP001"]
206210
"examples/*" = ["INP001", "T201"]

yatracker/types/comment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class Comment(Base, kw_only=True):
1212
url: str = field(name="self")
13-
id: str
13+
id: int
1414
text: str
1515
created_by: User
1616
updated_by: User | None = None

yatracker/types/priority.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Priority(Base, kw_only=True):
1919
the names in other languages.
2020
order - The weight of the priority. This parameter affects the order
2121
for displaying the priority in the interface.
22+
2223
"""
2324

2425
url: str = field(name="self")

0 commit comments

Comments
 (0)