Skip to content

Commit

Permalink
Enable pyright reportPrivateImportUsage. (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
janjagusch authored Feb 18, 2023
1 parent 7bea725 commit 7ed1e4a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
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

0 comments on commit 7ed1e4a

Please sign in to comment.