Skip to content

Commit 401f532

Browse files
stub for project and resulting changes in api as paths are Paths not strings
1 parent a340bcb commit 401f532

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

pythonanywhere/api.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from pathlib import Path
12
from typing import Dict, List, Any
23

34
from requests import Response
@@ -15,8 +16,8 @@ class Webapp:
1516
def __init__(self, domain: str) -> None: ...
1617
def __eq__(self, other: Webapp) -> bool: ...
1718
def sanity_checks(self, nuke: bool) -> None: ...
18-
def create(self, python_version: str, virtualenv_path: str, project_path: str, nuke: bool) -> None: ...
19-
def add_default_static_files_mappings(self, project_path: str) -> None: ...
19+
def create(self, python_version: str, virtualenv_path: Path, project_path: Path, nuke: bool) -> None: ...
20+
def add_default_static_files_mappings(self, project_path: Path) -> None: ...
2021
def reload(self) -> None: ...
2122
def set_ssl(self, certificate: str, private_key: str) -> None: ...
2223
def get_ssl_info(self) -> Dict[str, Any]: ...

pythonanywhere/project.pyi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from pathlib import Path
2+
3+
from pythonanywhere.api import Webapp
4+
from pythonanywhere.virtualenvs import Virtualenv
5+
6+
class Project:
7+
domain: str = ...
8+
python_version: str = ...
9+
project_path: Path = ...
10+
virtualenv: Virtualenv = ...
11+
wsgi_file_path: Path = ...
12+
webapp: Webapp = ...
13+
def __init__(self, domain: str, python_version: str) -> None: ...
14+
def sanity_checks(self, nuke: bool) -> None: ...
15+
def create_webapp(self, nuke: bool) -> None: ...
16+
def add_static_file_mappings(self) -> None: ...
17+
def start_bash(self) -> None: ...

0 commit comments

Comments
 (0)