From 54efa1857b82fc90ae518b29e9a2f081c11577f3 Mon Sep 17 00:00:00 2001 From: Quinten Steenhuis Date: Tue, 5 Apr 2022 09:57:03 -0400 Subject: [PATCH] Give more latitude about heading length (#7) * Fix #5; double wiggle-room for heading length * Keep original DA header lengths in pixels So it's clearer that the main numbers are still the above values in the comment (firefox, pixel 2, and 5SE), but that we're fudging them a bit. * Don't remove plumbum Co-authored-by: Bryce Willey --- LICENSE | 2 +- docassemble/ALLinter/linter.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index d8f3096..cd41792 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Bryce Willey +Copyright (c) 2022 Bryce Willey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docassemble/ALLinter/linter.py b/docassemble/ALLinter/linter.py index 1427581..fd740b5 100644 --- a/docassemble/ALLinter/linter.py +++ b/docassemble/ALLinter/linter.py @@ -86,7 +86,7 @@ def headings_violations(headings): # The widest DA headers get (in px), on a standard mobile device, and on a narrow mobile device # (firefox, Pixel 2, and iPhone 5SE) violations = [] - stages = [540, 381, 290] + stages = [540 * 2, 381 * 2, 290 * 2] for key, heading in headings.items(): heading_width = get_heading_width(heading) longer_than_count = sum([heading_width > stage for stage in stages]) diff --git a/setup.py b/setup.py index 0d5c1d6..6ec694d 100644 --- a/setup.py +++ b/setup.py @@ -53,7 +53,7 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d url='https://docassemble.org', packages=find_packages(), namespace_packages=['docassemble'], - install_requires=['Mako>=1.1.4', 'ruamel.yaml>=0.17.4', 'plumbum>=1.7.2', 'textstat>=0.7.0'], + install_requires=['Mako>=1.1.4', 'ruamel.yaml>=0.17.4', 'plumbum>=1.7.2', 'textstat>=0.7.0'], zip_safe=False, package_data=find_package_data(where='docassemble/ALLinter/', package='docassemble.ALLinter'), )