Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra Ruff rules #99

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions electrolytes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import pkgutil
from pathlib import Path
from collections.abc import Collection, Iterator, Sequence, Mapping
from typing import Optional, Any, Annotated
from functools import cached_property, singledispatchmethod
from collections.abc import Collection, Iterator, Mapping, Sequence
from contextlib import ContextDecorator
from functools import cached_property, singledispatchmethod
from pathlib import Path
from typing import Annotated, Any, Optional
from warnings import warn

from filelock import FileLock
from pydantic import (
BaseModel,
Field,
field_validator,
TypeAdapter,
ValidationInfo,
field_validator,
model_validator,
TypeAdapter,
)
from filelock import FileLock
from typer import get_app_dir

__version__ = "0.4.3"
Expand Down
5 changes: 2 additions & 3 deletions electrolytes/__main__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from typing import Optional, Annotated
from typing import Annotated, Optional

import typer

from . import database, Constituent, __version__

from . import Constituent, __version__, database

app = typer.Typer()

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ packages = [
"tests",
]
strict = true

[tool.ruff.lint]
extend-select = ["I", "RUF", "UP"]
2 changes: 0 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import pytest

from typer.testing import CliRunner

import electrolytes
from electrolytes import Constituent, database
from electrolytes.__main__ import app


runner = CliRunner()


Expand Down