Skip to content

Commit

Permalink
update dev deps (#1510)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 authored Mar 14, 2024
1 parent 709404e commit b39a7ef
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: no-commit-to-branch
args: ['--branch', 'main']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
rev: v0.3.2
hooks:
- id: ruff
args: [ --fix ]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ quality:

# this target runs checks on all files and potentially modifies some of them
style:
ruff --fix .
ruff check --fix .
ruff format .

# Run tests for the library
Expand Down
22 changes: 12 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ dev = [
"requests>=2.20.0",
"psutil>=5.9.5",
# Quality
"ruff>=0.1.5",
"mypy>=0.812",
"pre-commit>=2.17.0",
"ruff>=0.3.0",
"mypy>=1.0",
"pre-commit>=3.0.0",
# Docs
"sphinx>=3.0.0,!=3.5.0",
"sphinxemoji>=0.1.8",
Expand Down Expand Up @@ -168,22 +168,24 @@ module = [
ignore_missing_imports = true

[tool.ruff]
exclude = [".git", "venv*", "build", "**/__init__.py"]
line-length = 120
target-version = "py38"
preview=true

[tool.ruff.lint]
select = [
# https://docs.astral.sh/ruff/rules/
"E", "W", "F", "I", "N", "Q", "C4", "T10", "LOG",
"D101", "D103", "D201","D202","D207","D208","D214","D215","D300","D301","D417", "D419", "D207" # pydocstyle
]
ignore = ["E402", "E203", "F403", "E731", "N812", "N817", "C408"]
exclude = [".git", "venv*", "build", "**/__init__.py"]
line-length = 120
target-version = "py38"
preview=true

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["doctr", "app", "utils"]
known-third-party = ["tensorflow", "torch", "torchvision", "wandb", "tqdm", "fastapi"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"doctr/models/**.py" = ["N806", "F841"]
"doctr/datasets/**.py" = ["N806"]
"tests/**.py" = ["D"]
Expand All @@ -195,7 +197,7 @@ known-third-party = ["tensorflow", "torch", "torchvision", "wandb", "tqdm", "fas
".github/**.py" = ["D"]


[tool.ruff.flake8-quotes]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"

[tool.coverage.run]
Expand Down
3 changes: 1 addition & 2 deletions references/classification/latency_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# This program is licensed under the Apache License 2.0.
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.

"""Image classification latency benchmark
"""
"""Image classification latency benchmark"""

import argparse
import os
Expand Down
3 changes: 1 addition & 2 deletions references/classification/latency_tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# This program is licensed under the Apache License 2.0.
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.

"""Image classification latency benchmark
"""
"""Image classification latency benchmark"""

import argparse
import os
Expand Down
3 changes: 1 addition & 2 deletions references/detection/latency_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# This program is licensed under the Apache License 2.0.
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.

"""Text detection latency benchmark
"""
"""Text detection latency benchmark"""

import argparse
import os
Expand Down
3 changes: 1 addition & 2 deletions references/detection/latency_tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# This program is licensed under the Apache License 2.0.
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.

"""Text detection latency benchmark
"""
"""Text detection latency benchmark"""

import argparse
import os
Expand Down
3 changes: 1 addition & 2 deletions references/obj_detection/latency_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# This program is licensed under the Apache License 2.0.
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.

"""Object detection latency benchmark
"""
"""Object detection latency benchmark"""

import argparse
import os
Expand Down
3 changes: 1 addition & 2 deletions references/recognition/latency_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# This program is licensed under the Apache License 2.0.
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.

"""Text recognition latency benchmark
"""
"""Text recognition latency benchmark"""

import argparse
import os
Expand Down
3 changes: 1 addition & 2 deletions references/recognition/latency_tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# This program is licensed under the Apache License 2.0.
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.

"""Text recognition latency benchmark
"""
"""Text recognition latency benchmark"""

import argparse
import os
Expand Down

0 comments on commit b39a7ef

Please sign in to comment.