mirror of https://github.com/zulip/zulip.git
mypy: Minor zthumbor annotation changes.
- Any->Text in helpers.py; - Remove ignore and add generic params. revert thumbor except type.
This commit is contained in:
parent
21033669a8
commit
aa48929f66
|
@ -35,7 +35,7 @@ else:
|
|||
secrets_file.read(os.path.join(DEPLOY_ROOT, "zproject/dev-secrets.conf"))
|
||||
|
||||
def get_secret(key):
|
||||
# type: (str) -> Any
|
||||
# type: (str) -> Optional[Text]
|
||||
if secrets_file.has_option('secrets', key):
|
||||
return secrets_file.get('secrets', key)
|
||||
return None
|
||||
|
|
|
@ -19,9 +19,9 @@ def get_not_found_result():
|
|||
result.successful = False
|
||||
return result
|
||||
|
||||
@return_future # type: ignore # This was giving mypy error for missing generic datatype?
|
||||
@return_future
|
||||
def load(context, url, callback):
|
||||
# type: (Context, str, Callable) -> None
|
||||
# type: (Context, str, Callable[..., Any]) -> None
|
||||
url = urllib.parse.unquote(url)
|
||||
url_params = get_url_params(url)
|
||||
source_type = url_params.get('source_type')
|
||||
|
|
Loading…
Reference in New Issue