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

Enable pyright reportPrivateImportUsage #610

Merged
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ reportMissingTypeStubs = false
reportOptionalMemberAccess = false
reportOptionalOperand = false
reportOptionalSubscript = false
reportPrivateImportUsage = false
reportPrivateImportUsage = true
reportUnboundVariable = false
reportUndefinedVariable = false
venv = ".venv"
Expand Down
15 changes: 7 additions & 8 deletions quetz/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from typing import List, Optional, Tuple, Type

import pydantic
import pydantic.error_wrappers
import requests
from fastapi import (
APIRouter,
Expand All @@ -41,13 +42,11 @@
from starlette.middleware.base import BaseHTTPMiddleware
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.middleware.sessions import SessionMiddleware
from tenacity import (
after_log,
retry,
retry_if_result,
stop_after_attempt,
wait_exponential,
)
from tenacity import retry
from tenacity.after import after_log
from tenacity.retry import retry_if_result
from tenacity.stop import stop_after_attempt
from tenacity.wait import wait_exponential

from quetz import (
authorization,
Expand Down Expand Up @@ -1596,7 +1595,7 @@ def _delete_file(condainfo, filename):
summary=str(condainfo.about.get("summary", "n/a")),
description=str(condainfo.about.get("description", "n/a")),
)
except pydantic.main.ValidationError as err:
except pydantic.error_wrappers.ValidationError as err:
_delete_file(condainfo, file.filename)
raise errors.ValidationError(
"Validation Error for package: "
Expand Down
4 changes: 3 additions & 1 deletion quetz/pkgstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
from typing import IO, List, Tuple, Union

import fsspec
from tenacity import retry, retry_if_exception_type, stop_after_attempt
from tenacity import retry
from tenacity.retry import retry_if_exception_type
from tenacity.stop import stop_after_attempt

try:
import xattr
Expand Down
5 changes: 4 additions & 1 deletion quetz/tasks/mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

import requests
from fastapi import HTTPException, status
from tenacity import TryAgain, after_log, retry, stop_after_attempt, wait_exponential
from tenacity import TryAgain, retry
from tenacity.after import after_log
from tenacity.stop import stop_after_attempt
from tenacity.wait import wait_exponential

from quetz import authorization, rest_models
from quetz.condainfo import CondaInfo, get_subdir_compat
Expand Down