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

Abhsag/linebreak #653

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Abhsag/linebreak #653

wants to merge 6 commits into from

Conversation

abh3po
Copy link
Member

@abh3po abh3po commented Aug 4, 2016

basic LineBreakBear

language: str,
dependency_results,
use_spaces=True,
tab_width: int=4,
Copy link
Member

@AsnelChristian AsnelChristian Aug 4, 2016

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

Copy link
Member Author

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

@abh3po abh3po force-pushed the abhsag/linebreak branch 2 times, most recently from f5042a4 to f273bca Compare August 5, 2016 05:29
@@ -0,0 +1,162 @@
from coala_utils.string_processing.Core import unescaped_search_for
Copy link

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?

Copy link
Member Author

@abh3po abh3po Aug 5, 2016

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?

Copy link
Member Author

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.

Copy link

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.

@abh3po abh3po force-pushed the abhsag/linebreak branch from f273bca to 503a477 Compare August 5, 2016 14:31
file, filename,
encapsulator, encapsulators[encapsulator],
annotation_dict)
encaps_pos=tuple(sorted(encaps_pos, key=lambda x: (x.start.line,
Copy link
Collaborator

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"

@abh3po abh3po force-pushed the abhsag/linebreak branch 2 times, most recently from 7bebb16 to f40524b Compare August 8, 2016 06:20
@abh3po abh3po force-pushed the abhsag/linebreak branch 3 times, most recently from 26eb7a8 to 88df146 Compare August 10, 2016 03:10
file for language.
"""
encapsulators = dict(LanguageDefinition(
language, coalang_dir=coalang_dir)["encapsulators"])
Copy link

Choose a reason for hiding this comment

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

line break please

@gitmate-bot
Copy link
Collaborator

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
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

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

Successfully merging this pull request may close these issues.

7 participants