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

feat(amber): indent multiline strings, close #193 #194

Merged
merged 2 commits into from
Apr 17, 2020

Conversation

noahnu
Copy link
Collaborator

@noahnu noahnu commented Apr 17, 2020

Description

Indents multiline strings only when the parent itself is indented, this is to keep snapshots of multiline strings that are not nested in any data structure, simple.

Related Issues

Checklist

  • This PR has sufficient test coverage.
  • I will merge this pull request with a semantic title.

@noahnu noahnu requested a review from iamogbz April 17, 2020 12:17
@codecov
Copy link

codecov bot commented Apr 17, 2020

Codecov Report

Merging #194 into next-v0.4.0 will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff              @@
##           next-v0.4.0      #194   +/-   ##
=============================================
  Coverage       100.00%   100.00%           
=============================================
  Files               16        16           
  Lines              867       867           
=============================================
  Hits               867       867           

@@ -142,8 +153,8 @@
# name: test_list_in_dict
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is weirdly named, more like multi_line_in_dict

@@ -28,6 +28,12 @@ def test_list_in_dict(snapshot):
assert {"value": lines} == snapshot


def test_deeply_nested_list_in_dict(snapshot):
Copy link
Collaborator

Choose a reason for hiding this comment

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

nb. technically not a list?

Suggested change
def test_deeply_nested_list_in_dict(snapshot):
def test_deeply_nested_multi_line_in_dict(snapshot):

Copy link
Collaborator

@iamogbz iamogbz left a comment

Choose a reason for hiding this comment

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

LGTM

@noahnu noahnu merged commit d731fb3 into next-v0.4.0 Apr 17, 2020
@noahnu noahnu deleted the multiline_indent branch April 17, 2020 14:10
noahnu pushed a commit that referenced this pull request Apr 18, 2020
noahnu pushed a commit that referenced this pull request Apr 19, 2020
syrupy-bot pushed a commit that referenced this pull request Apr 19, 2020
# [0.4.0](v0.3.12...v0.4.0) (2020-04-19)

### Bug Fixes

* remove added trailing whitespace from multiline string ([24f3d57](24f3d57))

### Features

* **amber:** indent multiline strings, close [#193](#193) ([#194](#194)) ([de5af3e](de5af3e))
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

Successfully merging this pull request may close these issues.

2 participants