Skip to content

Commit

Permalink
remove unused 'already_processed' arg from _preload_css_files_of_asse…
Browse files Browse the repository at this point in the history
…t and _load_css_files_of_asset
  • Loading branch information
Niicck committed Oct 14, 2023
1 parent b72a032 commit 1ff26b8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions django_vite/templatetags/django_vite.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def generate_vite_asset(
scripts_attrs = {"type": "module", "crossorigin": "", **kwargs}

# Add dependent CSS
tags.extend(self._load_css_files_of_asset(path, [], config_key))
tags.extend(self._load_css_files_of_asset(path, config_key))

# Add the script by itself
tags.append(
Expand Down Expand Up @@ -259,7 +259,7 @@ def preload_vite_asset(
)

# Add dependent CSS
tags.extend(self._preload_css_files_of_asset(path, [], config_key))
tags.extend(self._preload_css_files_of_asset(path, config_key))

# Preload imports
for dependency_path in manifest_entry.imports:
Expand All @@ -279,25 +279,23 @@ def preload_vite_asset(
def _preload_css_files_of_asset(
self,
path: str,
already_processed: List[str],
config_key: str = DEFAULT_CONFIG_KEY,
) -> List[str]:
return self._generate_css_files_of_asset(
path,
already_processed,
[],
DjangoViteAssetLoader._generate_stylesheet_preload_tag,
config_key,
)

def _load_css_files_of_asset(
self,
path: str,
already_processed: List[str],
config_key: str = DEFAULT_CONFIG_KEY,
) -> List[str]:
return self._generate_css_files_of_asset(
path,
already_processed,
[],
DjangoViteAssetLoader._generate_stylesheet_tag,
config_key,
)
Expand Down

0 comments on commit 1ff26b8

Please sign in to comment.