1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-08 18:02:05 +03:00

use python 3 type annotations

Summary: We don't support Python 2 anymore.

Reviewed By: xavierd

Differential Revision: D33715602

fbshipit-source-id: 6cf3dba83f8207f956cab8eb8dbb3a748e1d9f89
This commit is contained in:
Chad Austin
2022-01-24 20:12:34 -08:00
committed by Facebook GitHub Bot
parent 4fb4756ec9
commit 5c779d26ba
2 changed files with 9 additions and 25 deletions

View File

@@ -10,6 +10,7 @@ import os
import subprocess
import sys
import tempfile
from typing import Optional, Mapping
from .copytree import containing_repo_type
from .envfuncs import Env, add_path_entry
@@ -18,12 +19,6 @@ from .manifest import ContextGenerator
from .platform import HostType, is_windows
try:
import typing # noqa: F401
except ImportError:
pass
def detect_project(path):
repo_type, repo_root = containing_repo_type(path)
if repo_type is None:
@@ -312,10 +307,9 @@ def list_win32_subst_letters():
def find_existing_win32_subst_for_path(
path, # type: str
subst_mapping, # type: typing.Mapping[str, str]
):
# type: (...) -> typing.Optional[str]
path: str,
subst_mapping: Mapping[str, str],
) -> Optional[str]:
path = ntpath.normcase(ntpath.normpath(path))
for letter, target in subst_mapping.items():
if ntpath.normcase(target) == path: