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

fix(python): proscribe multiline assignments #330

Closed
wants to merge 1 commit into from
Closed

Conversation

jorpic
Copy link

@jorpic jorpic commented Nov 7, 2023

This fixes aws/jsii#3968 by disallowing line breaks before regularCallExpression and newExpression.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

auto-merge was automatically disabled November 7, 2023 19:10

Head branch was pushed to by a user without write access

@jorpic
Copy link
Author

jorpic commented Nov 15, 2023

The testsuite fails because mocking fs.*Sync methods is broken on node 20.8. (tschaub/mock-fs#380).

mock-fs is used in tests to create a fake file

test('Backwards compatibility with literate integ tests', async () => {
mockfs({
'/package/test/integ.example.lit.ts': '# Some literate source file',
});

which then should be read in

function loadLiterateSource(directory: string, literateFileName: string) {
const fullPath = path.join(directory, literateFileName);
const exists = fs.existsSync(fullPath);
if (!exists) {
// This couldn't really happen in practice, but do the check anyway
throw new Error(`Sample uses literate source ${literateFileName}, but not found: ${fullPath}`);
}

but this fails due to the mock-fs issue.

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.

jsii-rosetta: Multi-line assignment statement where function is on the right hand side breaks in Python
1 participant