Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use pathlib.Path for template paths #244

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

reedjones
Copy link
Contributor

Description

note (haven't tested yet will do asap)
This commit modifies utils.py to use pathlib.Path for template paths. This ensures that the paths are handled consistently across different operating systems, including Windows. The following functions have been modified to use pathlib.Path: path_to_section()
section_for()
get_template_dirs()
get_pattern_config_str()
get_pattern_markdown()
Additionally, the TemplateRenderer.get_pattern_templates() method has been updated to use pathlib.Path for template paths.

Fixes #116
possibly related issue: #116

Checklist

  • [ x ] My code follows the style guidelines of this project
  • [ x ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added an appropriate CHANGELOG entry

This commit modifies the django-pattern-library to use pathlib.Path for template paths. This ensures that the paths are handled consistently across different operating systems, including Windows.
The following functions have been modified to use pathlib.Path:
path_to_section()
section_for()
get_template_dirs()
get_pattern_config_str()
get_pattern_markdown()
Additionally, the TemplateRenderer.get_pattern_templates() method has been updated to use pathlib.Path for template paths.
possibly related issue: torchbox#116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error PatternLibraryEmpty
1 participant