-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #194 インデントの設定をテンプレートファイルに反映する #195
Conversation
#193と一緒にレビューやります |
# Successfully estimated the indents of template | ||
if 'indent' in kwargs: | ||
indent = kwargs['indent'] | ||
else : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: elseの後にスペース
https://github.com/kyuridenamida/atcoder-tools/blob/stable/.travis.yml
多分ここにあるpythonのフォーマッターかけると一網打尽です!
- flake8 --ignore=E501,W503,W605 --exclude=atcodertools/tools/templates/,tests/resources/test_codegen/ atcodertools tests
- autopep8 -r . --exclude 'default_template.py,test_codegen' --diff | tee check_autopep8
@@ -58,3 +81,15 @@ def old_render(template, **kwargs): | |||
def render_by_jinja(template, **kwargs): | |||
return Environment(trim_blocks=True, | |||
lstrip_blocks=True).from_string(template).render(**kwargs) + "\n" | |||
|
|||
def estimate_indent(code): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このへんのロジック、テスト追加してもらえるとどういうケースでどういう挙動が期待されるのか分かって嬉しいです
参考:
nosetests tests --exe -v --with-coverage --cover-package=atcodertools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contributionありがとうございます。テストの追加とフォーマッターの適用後はマージできるかと思います。よろしくお願いします。
だいぶお返事が遅くなりました。色々整備してようやくメンテ再開できそうです。 大変申し訳無いのですが。masterが今かなりoutdatedな状態になっていて、もしまだコントリビュートしていただける気持ちがありましたらstable branchに対してPRを作り直してもらえたりしませんか? もしくは言っていただければこちらで差分頑張って作ってマージしますが僕のマージリクエストになってしまいます。 |
最後のコミュニケーションからだいぶ期間が経ってしまったため、申し訳ないですが一旦Closeします。再開する場合はReopenしていただけるとありがたいです。この度はせっかくコントリビューション頂いたのに申し訳ありませんでした。 |
Fix #194
インデントの設定によって、テンプレートファイルのインデントを修正するようにしました。