Code cleanups and cornercase bugfixes - #179
Open
PJBrs wants to merge 10 commits into
Open
Conversation
Docutils spews a truckload of FutureWarnings: The default for the setting "use_latex_citations" will change to "True" in Docutils 1.0. The default for the setting "legacy_column_widths" will change to "False" in Docutils 1.0. This patch sets both use_latex_citations to True, which means that it might be necessary in the future to set legacy_column_widths to False. However, at present that causes various latex errors.
Docutils are planning to set legacy_column_widths to False in the future. Follow suit, add the required DUcolumnwidth definition to our latex preamble, and make our own code a bit simpler as well!
Feature options have long been treated using the FeatureSelector class. This also holds for fighting styles. Remove the redundant code from the Features property in character.py
Spells were sorted in various places where it wasn't really necessary. Probably doesn't make a lot of difference, but it is a little cleaner.
Previously, dungeonsheets assumed a halfcaster sheet when the character didn't have any spell slots of sixth level and higher. However, there are cases when a player would add such a spell to their character sheet despite not having associated spell slots, for instance when granted through a magic item. This would cause a bug in the latex character template (cpu go to 100%, compilation never finishes). This patch instead checks whether no such spells have been added. Incidentally, the fillable forms have a similar problem. However, they will just forget about spells at levels for which the player doesn't have spell slots and finish compilation.
Previously, dungeonsheets assumed a halfcaster sheet when the character didn't have any spell slots of sixth level and higher. However, there are cases when a player would add such a spell to their character sheet despite not having associated spell slots, for instance when granted through a magic item. This patch instead checks whether no such spells have been added.
Pytest complains about missing preamble.html. Make sure that it gets packaged by explicitly adding all html files to pyproject.toml.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes a couple of fixes and some removal of unused / unnecessary code: