Skip to content
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

Double brackets using MW template format #2

Open
xZise opened this issue Sep 8, 2015 · 2 comments
Open

Double brackets using MW template format #2

xZise opened this issue Sep 8, 2015 · 2 comments

Comments

@xZise
Copy link
Owner

xZise commented Sep 8, 2015

The MW uses {{…}} for templates and {{:Bla}} is a valid name which shouldn't be considered a problem. One way to mitigate (at the moment) would be to use {{ :Bla}} because Python doesn't allow { }.format(42).

Another way would be to ignore constellations where there are an even number of brackets on each side as they aren't parsed but its number gets halved.

@xZise
Copy link
Owner Author

xZise commented Sep 10, 2015

It may be possible to avoid this by adding an option to only check calls which use format, and not to use all strings. Also ca9b86f did alleviate that problem a bit as it now only checks fields discovered by Formatter.parse which will automatically exclude {{foo}}.

xZise added a commit that referenced this issue Sep 10, 2015
To make it easier to skip other strings which might use `{}` (for example in
regexes) it separates those strings where `format` is called and every other
(apart from the docstrings which are already split).

It now uses the code 103 which was previously used for cases when both
implicit and explicit were used. Moved this into the 200 range using 205 as
this makes it possible to ignore all 2.6 related issues by just adding `P1`.

Also fixes the tests accordingly.
@jayvdb
Copy link

jayvdb commented Oct 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants