Skip to content

Commit

Permalink
Replace black with ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
KapJI committed Sep 13, 2024
1 parent e83580e commit 7006e39
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 62 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ repos:
- id: trailing-whitespace
- repo: local
hooks:
- id: black
name: black
entry: uv run black
- id: ruff-format
name: ruff format
entry: uv run ruff format
language: system
types: [python]
require_serial: true
Expand Down
1 change: 1 addition & 0 deletions glocaltokens/client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Client"""

from __future__ import annotations

from datetime import datetime
Expand Down
1 change: 1 addition & 0 deletions glocaltokens/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Globally used constants"""

from __future__ import annotations

from typing import Final
Expand Down
1 change: 1 addition & 0 deletions glocaltokens/scanner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Zeroconf based scanner"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions glocaltokens/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Types used for package typing"""

from __future__ import annotations

from typing import TypedDict
Expand Down
1 change: 1 addition & 0 deletions glocaltokens/utils/logs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Log utilities"""

from __future__ import annotations


Expand Down
1 change: 1 addition & 0 deletions glocaltokens/utils/network.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Network utilities"""

from __future__ import annotations

import socket
Expand Down
1 change: 1 addition & 0 deletions glocaltokens/utils/token.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Token utilities"""

import random
import string

Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ dependencies = [

[tool.uv]
dev-dependencies = [
"black >= 23.12.1",
"codespell >= 2.3.0",
"faker >= 20.1.0",
"flake8 >= 6.1.0",
Expand All @@ -54,6 +53,7 @@ dev-dependencies = [
"pre-commit >= 3.8.0",
"pylint >= 3.2.7",
"pytest >= 7.4.4",
"ruff>=0.6.4",
"types-protobuf >= 4.25.0.20240417",
]

Expand All @@ -64,6 +64,10 @@ build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"

[tool.ruff]
required-version = ">=0.6.0"
target-version = "py39"

[tool.pylint.master]
extension-pkg-whitelist = [
"_socket",
Expand Down
1 change: 1 addition & 0 deletions tests/assertions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Common assertion helper classes used for unittesting
"""

# pylint: disable=invalid-name
from unittest import TestCase

Expand Down
1 change: 1 addition & 0 deletions tests/factory/providers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test factory providers"""

from __future__ import annotations

from faker import Faker
Expand Down
1 change: 1 addition & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Client specific unittests"""

from __future__ import annotations

from datetime import datetime, timedelta
Expand Down
1 change: 1 addition & 0 deletions tests/test_scanner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Scanner specific tests"""

from __future__ import annotations

from unittest import TestCase, mock
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility tests"""

from unittest import TestCase

from faker import Faker
Expand Down
86 changes: 28 additions & 58 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7006e39

Please sign in to comment.