From b6dfeebe1eb9eac545b4afa644953708bebfa6ed Mon Sep 17 00:00:00 2001 From: Ismail Date: Mon, 1 Feb 2016 10:00:53 +0000 Subject: [PATCH 1/2] Move webbrowser.pyi to 2and3 folder --- stdlib/{3 => 2and3}/webbrowser.pyi | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename stdlib/{3 => 2and3}/webbrowser.pyi (100%) diff --git a/stdlib/3/webbrowser.pyi b/stdlib/2and3/webbrowser.pyi similarity index 100% rename from stdlib/3/webbrowser.pyi rename to stdlib/2and3/webbrowser.pyi From 8f2e1ac8859e5b682242aa57c012e60a83475794 Mon Sep 17 00:00:00 2001 From: Ismail Date: Mon, 1 Feb 2016 10:02:54 +0000 Subject: [PATCH 2/2] Only define Chrome class on py2.7 or >3.2 --- stdlib/2and3/webbrowser.pyi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/stdlib/2and3/webbrowser.pyi b/stdlib/2and3/webbrowser.pyi index 0faa40c62..95b340e2b 100644 --- a/stdlib/2and3/webbrowser.pyi +++ b/stdlib/2and3/webbrowser.pyi @@ -2,6 +2,7 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. +import sys from typing import Any, Optional, Callable, List class Error(Exception): ... @@ -56,12 +57,13 @@ class Galeon(UnixBrowser): remote_action_newwin = ... # type: str background = ... # type: bool -class Chrome(UnixBrowser): - remote_args = ... # type: List[str] - remote_action = ... # type: str - remote_action_newwin = ... # type: str - remote_action_newtab = ... # type: str - background = ... # type: bool +if sys.version_info[:2] == (2, 7) or sys.version_info >= (3, 3): + class Chrome(UnixBrowser): + remote_args = ... # type: List[str] + remote_action = ... # type: str + remote_action_newwin = ... # type: str + remote_action_newtab = ... # type: str + background = ... # type: bool class Opera(UnixBrowser): raise_opts = ... # type: List[str]