Skip to content

Commit

Permalink
Update dependencies and replace black with ruff (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee authored Feb 15, 2024
1 parent ebd48fd commit 132bd09
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
12 changes: 6 additions & 6 deletions fastapi_storages/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ class BaseStorage: # pragma: no cover
if the name is the same or add a suffix to the filename."""

def get_name(self, name: str) -> str:
...
raise NotImplementedError()

def get_path(self, name: str) -> str:
...
raise NotImplementedError()

def get_size(self, name: str) -> int:
...
raise NotImplementedError()

def open(self, name: str) -> BinaryIO:
...
raise NotImplementedError()

def write(self, file: BinaryIO, name: str) -> str:
...
raise NotImplementedError()

def generate_new_filename(self, filename: str) -> str:
...
raise NotImplementedError()


class StorageFile(str):
Expand Down
25 changes: 12 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,39 +60,38 @@ exclude = [

[tool.hatch.envs.default]
dependencies = [
"black==22.10.0",
"build==0.9.0",
"coverage==6.5.0",
"moto==4.1.2",
"mypy==0.982",
"build==1.0.3",
"coverage==7.3.3",
"moto==4.2.11",
"mypy==1.7.1",
"peewee>=3",
"Pillow==9.4.0",
"pytest==7.2.0",
"ruff==0.0.237",
"Pillow==10.1.0",
"pytest==7.4.3",
"ruff==0.1.8",
"sqlalchemy>=1.4",
]

[tool.hatch.envs.default.scripts]
check = [
"ruff .",
"black --check .",
"ruff format --check .",
"mypy fastapi_storages",
]
cov = [
"coverage report --show-missing --skip-covered --fail-under=99",
"coverage xml",
]
format = [
"black .",
"ruff format .",
"ruff --fix .",
]
test = "coverage run -m pytest {args}"

[tool.hatch.envs.docs]
dependencies = [
"mkdocs-material==9.1.18",
"mkdocs==1.4.3",
"mkdocstrings[python]==0.22.0",
"mkdocs-material==9.5.2",
"mkdocs==1.5.3",
"mkdocstrings[python]==0.24.0",
]

[tool.hatch.envs.docs.scripts]
Expand Down

0 comments on commit 132bd09

Please sign in to comment.