Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Remove two unused imports and fix a type hint
  • Loading branch information
lainets committed Aug 28, 2023
1 parent 20fb2b2 commit d11f62b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion access/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from util.pydantic import Undefined, validation_error_str, validation_warning_str
from util.static import static_path, symbolic_link
from builder.models import Course as CourseModel
from .course import Course, Exercise, Parent, ExerciseConfig
from .course import Course, Exercise, ExerciseConfig
from .parser import ConfigParser, ConfigError

META = "apps.meta"
Expand Down
3 changes: 1 addition & 2 deletions builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@
from aplus_auth.payload import Permission, Permissions
from aplus_auth.requests import post

from access.config import INDEX, ConfigSource, CourseConfig, load_meta, META
from access.config import ConfigSource, CourseConfig, load_meta, META
from access.parser import ConfigError
from builder.configure import configure_graders, publish_graders
from util.files import (
copyfile,
copys_async,
is_subpath,
readfile,
renames,
rm_except,
FileLock,
Expand Down
2 changes: 1 addition & 1 deletion util/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def rm_paths(paths: Iterable[Union[str, Path]]) -> None:

def rm_except(dir: PathLike, exclude: PathLike) -> None:
"""Remove directory contents except for <exclude>"""
def inner(dir: PathLike, exclude: PathLike, exclude_parents: Set[Path]):
def inner(dir: PathLike, exclude: PathLike, exclude_parents: Set[str]):
with os.scandir(dir) as it:
for direntry in it:
if exclude == direntry.path:
Expand Down

0 comments on commit d11f62b

Please sign in to comment.