Skip to content

Commit

Permalink
Give more latitude about heading length (#7)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
nonprofittechy and BryceStevenWilley authored Apr 5, 2022
1 parent c9a0040 commit 54efa18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docassemble/ALLinter/linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
)
Expand Down

0 comments on commit 54efa18

Please sign in to comment.