Avoid using typing annotations so tests run with Python 3.4.

This commit is contained in:
Todd C. Miller
2020-04-07 14:03:58 -06:00
parent ee868776de
commit 02a117f336
6 changed files with 20 additions and 29 deletions

View File

@@ -1,12 +1,11 @@
import sudo
from datetime import datetime
from typing import Tuple
class BusinessHoursApprovalPlugin(sudo.Plugin):
def check(self, command_info: Tuple[str, ...], run_argv: Tuple[str, ...],
run_env: Tuple[str, ...]) -> int:
def check(self, command_info: tuple, run_argv: tuple,
run_env: tuple) -> int:
error_msg = ""
now = datetime.now()
if now.weekday() >= 5: