File tree Expand file tree Collapse file tree 5 files changed +16
-9
lines changed
docs/adr/assets/ADR-003/examples/python
scripts/docker/examples/python/assets/hello_world Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22
3- import jwt
3+ import jwt # type: ignore
44import os
5- import requests
5+ import requests # type: ignore
66import time
77
88
@@ -13,7 +13,9 @@ def main():
1313 gh_org = os .environ .get ("GITHUB_ORG" )
1414
1515 if not gh_app_id or not gh_app_pk_file or not gh_org :
16- raise ValueError ("Environment variables GITHUB_APP_ID, GITHUB_APP_PK_FILE and GITHUB_ORG must be passed to this program." )
16+ raise ValueError (
17+ "Environment variables GITHUB_APP_ID, GITHUB_APP_PK_FILE and GITHUB_ORG must be passed to this program."
18+ )
1719
1820 jwt_token = get_jwt_token (gh_app_id , gh_app_pk_file )
1921 installation_id = get_installation_id (jwt_token , gh_org )
Original file line number Diff line number Diff line change 1- from playwright .sync_api import Page , expect
1+ from playwright .sync_api import Page
2+
3+
24class BcssLoginPage :
35
46 def __init__ (self , page : Page ):
@@ -8,8 +10,7 @@ def __init__(self, page: Page):
810 self .password = page .get_by_role ("textbox" , name = "Password" )
911 self .submit_button = page .get_by_role ("button" , name = "submit" )
1012
11-
1213 def login (self , username , password ):
1314 self .username .fill (username )
1415 self .password .fill (password )
15- self .submit_button .click ()
16+ self .submit_button .click ()
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ markers =
1717
1818# This fixes the issue where python cannot find modules
1919pythonpath = .
20+ MYPYPATH = .
2021
2122# Seting for the retry plugin
2223# timeout is in seconds and effects each individual test, not the entire run
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ mypy tests/* .py pages/* .py utils/* .py --disallow-untyped-defs --explicit-package-bases
34pytest
Original file line number Diff line number Diff line change 1- from flask import Flask
2- from flask_wtf .csrf import CSRFProtect
1+ from flask import Flask # type: ignore
2+ from flask_wtf .csrf import CSRFProtect # type: ignore
33
44app = Flask (__name__ )
55csrf = CSRFProtect ()
66csrf .init_app (app )
77
8+
89@app .route ("/" )
910def index ():
1011 return "Hello World!"
1112
12- app .run (host = '0.0.0.0' , port = 8000 )
13+
14+ app .run (host = "0.0.0.0" , port = 8000 )
You can’t perform that action at this time.
0 commit comments