Skip to content

Commit

Permalink
fixed crash on python <= 3.8 (fixes #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
marzer committed Sep 8, 2022
1 parent c508fdb commit b32defb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v0.7.1 - 2022-08-17
- fixed crash on python &lt;= 3.8 (#9) (@wroyca)

## v0.7.0 - 2022-08-16
- fixed some `<link>`, `<meta>` and `<script>` tags not being included in `<head>` when a file was excluded from post-processing
- added `theme` command-line option
Expand Down
5 changes: 3 additions & 2 deletions poxy/css.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import re
from .utils import *
from typing import Tuple


RX_COMMENT = re.compile(r'''/[*].+?[*]/''', flags=re.DOTALL)
Expand All @@ -25,7 +26,7 @@ def strip_comments(text) -> str:



def resolve_imports(text, cwd=None, mcss_dir = None) -> tuple[str, bool]:
def resolve_imports(text, cwd=None, mcss_dir = None) -> Tuple[str, bool]:
if cwd is None:
cwd = Path.cwd()
cwd = coerce_path(cwd).resolve()
Expand Down Expand Up @@ -139,7 +140,7 @@ def minify(text) -> str:



def regenerate_builtin_themes(mcss_dir = None):
def regenerate_builtin_styles(mcss_dir = None):
if mcss_dir is None:
mcss_dir = find_mcss_dir()
else:
Expand Down
2 changes: 1 addition & 1 deletion poxy/data/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.0
0.7.1
6 changes: 3 additions & 3 deletions poxy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def main(invoker=True):
help=r'the CSS theme to use (default: %(default)s)'
)
args.add_argument(
r'--themegen',
r'--genstyles',
action=r'store_true',
help=argparse.SUPPRESS
)
Expand All @@ -152,8 +152,8 @@ def main(invoker=True):

mcss_dir = args.mcss if args.mcss is not None else args.mcss_deprecated_old_arg

if args.themegen:
css.regenerate_builtin_themes(mcss_dir = mcss_dir)
if args.genstyles:
css.regenerate_builtin_styles(mcss_dir = mcss_dir)
return

with ScopeTimer(r'All tasks', print_start=False, print_end=not args.dry) as timer:
Expand Down

0 comments on commit b32defb

Please sign in to comment.