diff options
author | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-10-10 16:57:46 +0200 |
---|---|---|
committer | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-10-10 21:20:58 +0200 |
commit | 1cf4f30d5b313ba8bb63d974fb3e8a87100d5a9b (patch) | |
tree | 41efa39e2c4d0cd85695f09bdb4ca7c451f1d7d5 /pylint/utils/utils.py | |
parent | f2b0c48536c008410e6c3eab51ea1042b96829e2 (diff) | |
download | pylint-git-1cf4f30d5b313ba8bb63d974fb3e8a87100d5a9b.tar.gz |
Remove calls to ``os.linesep`` and add misc. typing
Diffstat (limited to 'pylint/utils/utils.py')
-rw-r--r-- | pylint/utils/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pylint/utils/utils.py b/pylint/utils/utils.py index d8d4baf0a..96f8a6acc 100644 --- a/pylint/utils/utils.py +++ b/pylint/utils/utils.py @@ -302,10 +302,11 @@ def _check_csv(value): return _splitstrip(value) -def _comment(string): +def _comment(string: str) -> str: """return string as a comment""" lines = [line.strip() for line in string.splitlines()] - return "# " + f"{os.linesep}# ".join(lines) + sep = "\n" + return "# " + f"{sep}# ".join(lines) def _format_option_value(optdict, value): |