Skip to content

Commit 11b5894

Browse files
committed
_utils.py: fix lint and format errors
1 parent d333a35 commit 11b5894

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ warn_no_return = True
2828

2929
# Ignore missing stubs for third-party packages.
3030
# In future, these should be re-enabled if/when stubs for them become available.
31-
[mypy-copyreg,grpc,pluginbase,psutil,pyroaring,ruamel,multiprocessing.forkserver]
31+
[mypy-copyreg,grpc,pluginbase,psutil,pyroaring,ruamel,multiprocessing.forkserver,cython.*]
3232
ignore_missing_imports=True
3333

3434
# Ignore issues with generated files and vendored code

src/buildstream/_utils.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
This module contains utilities that have been optimized in Cython
2323
"""
2424

25-
import cython
26-
from cython.cimports.cpython.pystate import PyThreadState_SetAsyncExc
27-
from cython.cimports.cpython.ref import PyObject
25+
import cython # pylint: disable=import-error
26+
from cython.cimports.cpython.pystate import PyThreadState_SetAsyncExc # pylint: disable=import-error
27+
from cython.cimports.cpython.ref import PyObject # pylint: disable=import-error
2828
from ._signals import TerminateException
2929

3030

@@ -37,8 +37,7 @@ def url_directory_name(url: str):
3737
Returns:
3838
A string which can be used as a directory name
3939
"""
40-
return ''.join([_transl(x) for x in url])
41-
40+
return "".join([_transl(x) for x in url])
4241

4342

4443
# terminate_thread()

0 commit comments

Comments
 (0)