Skip to content

Conversation

@hamirmahal
Copy link

Closes #607

"too-many-positional-arguments",
"too-many-branches",
"too-many-instance-attributes",
"unspecified-encoding",
Copy link
Author

Choose a reason for hiding this comment

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

Without this removal, tests fail with

>               assert_that(len(diagnostics), is_(greater_than(0)))
E               AssertionError: 
E               Expected: a value greater than <0>
E                    but: was <0>

src/test/python_tests/test_code_actions.py:406: AssertionError
------------------------------------------------------------------------------------------ Captured log call ------------------------------------------------------------------------------------------
ERROR    concurrent.futures:_base.py:344 exception calling callback for <Future at 0x729661915600 state=finished returned NoneType>

@hamirmahal
Copy link
Author

Without this change

Screencast.from.04-28-2025.09.10.45.PM.webm

@hamirmahal
Copy link
Author

With this change

Screencast.from.04-28-2025.08.57.49.PM.webm

@hamirmahal
Copy link
Author

@karthiknadig are there any changes you'd like me to make here?

@karthiknadig karthiknadig added the feature-request Request for new features or functionality label May 18, 2025
@hamirmahal
Copy link
Author

@eleanorjboyd are there any changes you'd like me to make here?

@vs-code-engineering vs-code-engineering bot added this to the June 2025 milestone Jul 2, 2025
Copy link
Member

@karthiknadig karthiknadig left a comment

Choose a reason for hiding this comment

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

I think we need a few more cases:

open(path, 'r', newline='\n')  => open(path, 'r', encoding='utf-8', newline='\n')

cases for multi line open:

open(
path,
'r'
)

open(
path,
'r',
newline='\n',
)

@eleanorjboyd eleanorjboyd modified the milestones: June 2025, July 2025 Jul 2, 2025
@eleanorjboyd eleanorjboyd modified the milestones: July 2025, August 2025 Jul 29, 2025
@eleanorjboyd eleanorjboyd removed this from the September 2025 milestone Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-request Request for new features or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature request] Quick-fix for Using open without explicitly specifying an encoding W1514:unspecified-encoding

4 participants