Skip to content

Commit

Permalink
core: Update Python version and fix type hint in get_file_permissions…
Browse files Browse the repository at this point in the history
… function
  • Loading branch information
elkaboussi committed Mar 3, 2024
1 parent 78e83da commit d5b7709
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.12

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions analyzer/utils/permissions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import stat
from pathlib import Path
from typing import Set
from typing import Set, Union

from pydantic import BaseModel, constr

Expand Down Expand Up @@ -43,5 +43,5 @@ def generate_full_write_combination() -> Set[PermissionType]:
return full_write_combination


def get_file_permissions(file_path: Path | str) -> PermissionType:
def get_file_permissions(file_path: Union[Path, str]) -> PermissionType:
return PermissionType(permission=stat.filemode(os.stat(file_path).st_mode)[1:])

0 comments on commit d5b7709

Please sign in to comment.