Skip to content

Commit

Permalink
Fixes TypeError from type hint incompatible to older Python
Browse files Browse the repository at this point in the history
  • Loading branch information
dkratzert committed Jun 22, 2023
1 parent 231d169 commit e67af5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11" ]
os: [ ubuntu-latest ]

steps:
- name: Install xclip
run: sudo apt-get install -y xclip
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions src/dsr_shelx/dbfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def __init__(self, maindb_path: str = '', userdb_path: str = ''):
if userdb_path:
self.parse(userdb_path, 'dsr_user_db')

def parse(self, dbpath: str = '', dbname: str = 'dsr_db') -> dict[str, dict[str, str]]:
def parse(self, dbpath: str = '', dbname: str = 'dsr_db') -> Dict[str, Dict[str, str]]:
"""
This method returns all fragment name tags in the database
Expand Down Expand Up @@ -207,7 +207,7 @@ def parse(self, dbpath: str = '', dbname: str = 'dsr_db') -> dict[str, dict[str,
[]
"""
frag_tag = ''
db: dict[str, dict[str, str]] = dict()
db: Dict[str, Dict[str, str]] = dict()
start_regex = re.compile(r'<[^/].*>', re.IGNORECASE) # regular expression for db tag.
starttag = False
fraglines = []
Expand Down

0 comments on commit e67af5e

Please sign in to comment.