Skip to content

Commit

Permalink
Merge pull request #132 from ninoseki/update
Browse files Browse the repository at this point in the history
chore: update deps
  • Loading branch information
ninoseki authored Sep 10, 2023
2 parents 47bcfd2 + aef41af commit 5e30a68
Show file tree
Hide file tree
Showing 8 changed files with 640 additions and 741 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ jobs:
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.5.1"]
poetry-version: ["1.6.1"]

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt-get -yqq install build-essential
run: sudo apt-get -yqq install build-essential

- name: Setup poetry
uses: abatilo/actions-poetry@v2
Expand Down
51 changes: 33 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,59 @@
repos:
- repo: https://github.com/pycqa/autoflake
rev: v2.2.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: autoflake
- id: check-added-large-files
- id: check-toml
- id: check-yaml
args:
[
"--in-place",
"--remove-all-unused-imports",
"--remove-unused-variable",
]
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/python-poetry/poetry
rev: 1.6.1
hooks:
- id: poetry-check

- repo: https://github.com/andrei-shabanski/poetry-plugin-sort
rev: v0.2.0
hooks:
- id: poetry-sort

- repo: https://github.com/asottile/pyupgrade
rev: v3.7.0
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py311-plus]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
- repo: https://github.com/pycqa/autoflake
rev: v2.2.1
hooks:
- id: isort
args: ["--profile", "black"]
- id: autoflake
args:
[
"--in-place",
"--remove-all-unused-imports",
"--remove-unused-variable",
]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.275
rev: v0.0.287
hooks:
- id: ruff
args:
- --fix

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.9.0
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.0
rev: v1.5.1
hooks:
- id: mypy
additional_dependencies:
- types-all
- pydantic[mypy]
- returns[mypy]
- returns==0.22.0
- pydantic==1.10.12
2 changes: 1 addition & 1 deletion mihama/core/datastructures/database_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __str__(self) -> str:
return self._url

def __repr__(self) -> str:
return f"{self.__class__.__name__}({repr(self.obscure_password)})"
return f"{self.__class__.__name__}({self.obscure_password!r})"

def __eq__(self, other: typing.Any) -> bool:
return str(self) == str(other)
2 changes: 1 addition & 1 deletion mihama/schemas/osv.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class ExcludePkMixin(BaseModel):
class Config:
fields = {"pk": {"exclude": True}}
fields = {"pk": {"exclude": True}} # noqa: RUF012


class Severity(models.Severity, ExcludePkMixin):
Expand Down
1,254 changes: 571 additions & 683 deletions poetry.lock

Large diffs are not rendered by default.

60 changes: 29 additions & 31 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,41 @@ python = "^3.11"
aiometer = "^0.4.0"
arq = "^0.25.0"
decorator = "^5.1.1"
fastapi = "0.100.0"
gunicorn = "^20.1.0"
loguru = "^0.7.0"
orjson = "^3.9.1"
packageurl-python = "^0.11.1"
fastapi = "^0.103"
gunicorn = "^21.2"
loguru = "^0.7"
orjson = "^3.9"
packageurl-python = "^0.11"
purl = "^1.6"
pyhumps = "^3.8.0"
redis = "^4.5.5"
redis-om = "0.1.2"
pydantic = "1.10.12"
pyhumps = "^3.8"
redis = "^4.0"
redis-om = "^0.1"
requests = "2.31.0"
returns = "^0.20.1"
semver = "^3.0.0"
typer = "^0.9.0"
ujson = "^5.7.0"
uvicorn = {extras = ["standard"], version = "^0.22"}
returns = "^0.22"
semver = "^3.0"
typer = "^0.9"
uvicorn = { extras = ["standard"], version = "^0.23" }

[tool.poetry.group.dev.dependencies]
autoflake = "^2.2"
autopep8 = "^2.0"
black = "^23.3"
flake8 = "^6.0"
httpx = "^0.24"
isort = "^5.12"
mypy = "^1.4"
nest-asyncio = "^1.5.6"
pre-commit = "^3.3"
mypy = "^1.5"
nest-asyncio = "^1.5"
pre-commit = "^3.4"
pytest = "^7.4"
pytest-asyncio = "^0.21"
pytest-cov = "^4.1"
pytest-mock = "^3.11"
pytest-randomly = "^3.12.0"
pytest-sugar = "^0.9.7"
pyupgrade = "^3.7"
pytest-randomly = "^3.15"
pytest-sugar = "^0.9"
pyupgrade = "^3.10"
ruff = "^0.0"
types-requests = "2.31"
vcrpy = "^5.0.0"
urllib3 = "^1.0"
vcrpy = "^5.0"

[build-system]
requires = ["poetry-core"]
Expand All @@ -63,15 +61,15 @@ ignore_missing_imports = true

[tool.ruff]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"T20", # flake8-print
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"C", # flake8-comprehensions
"B", # flake8-bugbear
"T20", # flake8-print
"I", # isort
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function call `...` in argument defaults
"E501", # line too long, handled by black
]
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
poetry==1.5.1
poetry==1.6.1
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ def check_redis_host(redis_url: DatabaseURL = settings.REDIS_OM_URL):


@pytest_asyncio.fixture
async def setup_redis(
vulnerabilities: list[models.Vulnerability], _=check_redis_host()
):
async def setup_redis(vulnerabilities: list[models.Vulnerability]):
check_redis_host()
# setup migrations for using redis-om
await setup_redis_om()

Expand Down

0 comments on commit 5e30a68

Please sign in to comment.