Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

#364: WHED appendix title handling rewritten to complement #359 #367

Merged
merged 2 commits into from
Apr 6, 2017

Conversation

gregoryfoster
Copy link
Contributor

@gregoryfoster gregoryfoster commented Apr 5, 2017

Based on @cmc333333's comments on #365, I've added a get_appendix_title function to regparser/tree/gpo_cfr/appendices.py, removed get_app_title from interpparser/gpo_cfr.py, and replaced all references.

@@ -11,7 +11,7 @@
from regparser.tree.depth import markers as mtypes
from regparser.tree.depth import heuristics, rules
from regparser.tree.depth.derive import derive_depths
from regparser.tree.gpo_cfr.appendices import appendix_headers
from regparser.tree.gpo_cfr import appendices
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted to only import the required function (get_appendix_title) but my environment complained so I imported the entire module.

if titles:
return titles[0].text
else:
return node.xpath("./RESERVED")[0]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced by get_appendix_title.

@cmc333333
Copy link
Member

Code looks good to me, though the linter's complaining that you need a newline above get_appendix_title's definition. Happy to do that for you (there should be a checkbox on your PR to allow maintainers to edit your PR) if you don't have time.

@gregoryfoster
Copy link
Contributor Author

Thank you! Can you point me to how the project is linting code?

@cmc333333
Copy link
Member

Excellent, thanks! We're currently installing a bunch of flake8 plugins and then running flake8 . in travis.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 91.94% when pulling e06cee9 on gregoryfoster:37_cfr_1_appendix_title into 0c650cd on eregs:master.

@cmc333333
Copy link
Member

Thanks @gregoryfoster !

@cmc333333 cmc333333 merged commit 89535d0 into eregs:master Apr 6, 2017
@gregoryfoster gregoryfoster deleted the 37_cfr_1_appendix_title branch April 12, 2017 16:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants