mirror of
https://github.com/django-components/django-components.git
synced 2025-08-15 11:40:14 +00:00
refactor: linter fixes
This commit is contained in:
parent
003c8ba4d5
commit
78503de0ec
2 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ def import_file(file_path: Path) -> None:
|
||||||
rel_path = os.path.relpath(file_path, start=project_root)
|
rel_path = os.path.relpath(file_path, start=project_root)
|
||||||
rel_path_without_suffix = str(Path(rel_path).with_suffix(""))
|
rel_path_without_suffix = str(Path(rel_path).with_suffix(""))
|
||||||
module_name = rel_path_without_suffix.replace(os.sep, ".")
|
module_name = rel_path_without_suffix.replace(os.sep, ".")
|
||||||
|
|
||||||
# This imports the file and runs it's code. So if the file defines any
|
# This imports the file and runs it's code. So if the file defines any
|
||||||
# django components, they will be registered.
|
# django components, they will be registered.
|
||||||
importlib.import_module(module_name)
|
importlib.import_module(module_name)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import glob
|
import glob
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional, NamedTuple
|
from typing import List, NamedTuple, Optional
|
||||||
|
|
||||||
from django.template.engine import Engine
|
from django.template.engine import Engine
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue