Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #36 from janopae/patch-1
Browse files Browse the repository at this point in the history
Fix Python < 3.9 compatibility
  • Loading branch information
limburgher authored Oct 24, 2022
2 parents 8584bff + be95a48 commit ccb64c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/myimport.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional
from typing import Optional, List

import config
import gutil
Expand Down Expand Up @@ -742,7 +742,7 @@ def isRetPrevType(t):
# import text file from fileName, return list of Line objects for the
# screenplay or None if something went wrong. returned list always
# contains at least one line.
def importTextFile(fileName: str, frame: wx.Frame)->Optional[list[screenplay.Line]]:
def importTextFile(fileName: str, frame: wx.Frame)->Optional[List[screenplay.Line]]:

# the 1 MB limit is arbitrary, we just want to avoid getting a
# MemoryError exception for /dev/zero etc.
Expand Down
4 changes: 3 additions & 1 deletion src/screenplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
NOTE = 8
ACTBREAK = 9

from typing import Tuple

import autocompletion
import config
import error
Expand Down Expand Up @@ -408,7 +410,7 @@ def getConfigPart(lines, name, startIndex):
# already. returns a (key, value) tuple. if line doesn't match the
# format, (None, None) is returned.
@staticmethod
def parseConfigLine(s: str)->tuple[str,str]:
def parseConfigLine(s: str)->Tuple[str,str]:
pattern = re.compile("#([a-zA-Z0-9\-]+) (.*)")
m = pattern.search(s)
if m:
Expand Down

0 comments on commit ccb64c8

Please sign in to comment.