-
Notifications
You must be signed in to change notification settings - Fork 581
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
Abhsag/linebreak #653
base: master
Are you sure you want to change the base?
Abhsag/linebreak #653
Conversation
efdb211
to
20c297a
Compare
language: str, | ||
dependency_results, | ||
use_spaces=True, | ||
tab_width: int=4, |
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.
please can you name this indentation_width
😅
also can you use this SpacingHelper.DEFAULT_TAB_WIDTH
for consistency
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.
hehe :P 👍 i thought i'd make it consistent with other bears :P
f5042a4
to
f273bca
Compare
@@ -0,0 +1,162 @@ | |||
from coala_utils.string_processing.Core import unescaped_search_for |
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.
while it's fine to make these methods available, I don't really like the file name "GenericHelpers". It's not neccesarily where people would go looking if they need the functionality you provide here. Also it might be a good idea to move the error definition somewhere else, but we don't have any other custom errors/ exceptions so far, do we?
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.
i have another one in the IndentationBear itself, move that one too?
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.
also what name do you suggest? it's got to do with finding ranges of things specified within a start and end.
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.
Not sure about a name.... maybe just "RangeHelpers" or something?
And yes, maybe put the errors in an own file and we collect them there.
Makes things more tidy if everybody does that.
f273bca
to
503a477
Compare
file, filename, | ||
encapsulator, encapsulators[encapsulator], | ||
annotation_dict) | ||
encaps_pos=tuple(sorted(encaps_pos, key=lambda x: (x.start.line, |
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.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/bears/general/LineBreakBear.py
+++ b/bears/general/LineBreakBear.py
@@ -74,7 +74,7 @@
file, filename,
encapsulator, encapsulators[encapsulator],
annotation_dict)
- encaps_pos=tuple(sorted(encaps_pos, key=lambda x: (x.start.line,
+ encaps_pos = tuple(sorted(encaps_pos, key=lambda x: (x.start.line,
x.start.column)))
indent = indentation_width*" " if use_spaces else "\t"
7bebb16
to
f40524b
Compare
26eb7a8
to
88df146
Compare
file for language. | ||
""" | ||
encapsulators = dict(LanguageDefinition( | ||
language, coalang_dir=coalang_dir)["encapsulators"]) |
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.
line break please
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
28 similar comments
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
basic LineBreakBear