Skip to content

Commit e39f79c

Browse files
committed
style: rename _OPEN to _open
[invalid-name] in Pylint 4.0 considers the type of the variable being assigned. Callable types should match the function naming convention, rather than the constant naming convention. Adjust the name appropriately. Signed-off-by: Kevin Locke <[email protected]>
1 parent 6e076de commit e39f79c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_argcomplete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# Note: Path not created on the filesystem. Only used for mocking.
1414
_COMPLETIONS_FILENAME = 'unittest/mock/argcomplete'
15-
_OPEN = open
15+
_open = open
1616

1717

1818
def _open_mock_for(for_file: str) -> Callable[..., Any]:
@@ -52,7 +52,7 @@ def maybe_mock_open(file: str, *args: Any, **kwargs: Any) -> Any:
5252
# No need to ignore it if it doesn't exist
5353
pass
5454

55-
return _OPEN(file, *args, **kwargs)
55+
return _open(file, *args, **kwargs)
5656

5757
# Save created Mocks so the caller can test them
5858
maybe_mock_open.mock_files = [] # type: ignore

0 commit comments

Comments
 (0)