mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 21:49:24 +08:00
[9/N] Apply ruff UP035 rule (#165515)
This is follow-up of #165214 to continue applying ruff UP035 rule to the code base. Pull Request resolved: https://github.com/pytorch/pytorch/pull/165515 Approved by: https://github.com/Lucaskabela
This commit is contained in:
committed by
PyTorch MergeBot
parent
470e2f61c3
commit
b2953f5643
@ -4,12 +4,16 @@ from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
from typing import Any, Callable, cast
|
||||
from typing import Any, cast, TYPE_CHECKING
|
||||
from urllib.error import HTTPError
|
||||
from urllib.parse import quote
|
||||
from urllib.request import Request, urlopen
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
def gh_fetch_url_and_headers(
|
||||
url: str,
|
||||
*,
|
||||
|
Reference in New Issue
Block a user