Skip to content

Commit

Permalink
Placate flake8-comprehensions
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jan 15, 2023
1 parent 36108d3 commit 4597970
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
50 changes: 25 additions & 25 deletions codepy/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,19 +400,19 @@ def _guess_toolchain_kwargs_from_python_config():
cflags.append(lib)

ld, *ldflags = config_vars["LDSHARED"].split()
return dict(
cc=cc_cmdline[0],
ld=ld,
cflags=cflags,
ldflags=ldflags + config_vars["LINKFORSHARED"].split(),
libraries=libraries,
include_dirs=[config_vars["INCLUDEPY"]],
library_dirs=[config_vars["LIBDIR"]],
so_ext=config_vars.get("EXT_SUFFIX", ".so"),
o_ext=object_suffix,
defines=defines,
undefines=undefines,
)
return {
"cc": cc_cmdline[0],
"ld": ld,
"cflags": cflags,
"ldflags": ldflags + config_vars["LINKFORSHARED"].split(),
"libraries": libraries,
"include_dirs": [config_vars["INCLUDEPY"]],
"library_dirs": [config_vars["LIBDIR"]],
"so_ext": config_vars.get("EXT_SUFFIX", ".so"),
"o_ext": object_suffix,
"defines": defines,
"undefines": undefines,
}


def call_capture_output(*args):
Expand Down Expand Up @@ -456,18 +456,18 @@ def guess_toolchain():
def guess_nvcc_toolchain():
gcc_kwargs = _guess_toolchain_kwargs_from_python_config()

kwargs = dict(
cc="nvcc",
ldflags=[],
libraries=gcc_kwargs["libraries"],
cflags=["-Xcompiler", ",".join(gcc_kwargs["cflags"])],
include_dirs=gcc_kwargs["include_dirs"],
library_dirs=gcc_kwargs["library_dirs"],
so_ext=gcc_kwargs["so_ext"],
o_ext=gcc_kwargs["o_ext"],
defines=gcc_kwargs["defines"],
undefines=gcc_kwargs["undefines"],
)
kwargs = {
"cc": "nvcc",
"ldflags": [],
"libraries": gcc_kwargs["libraries"],
"cflags": ["-Xcompiler", ",".join(gcc_kwargs["cflags"])],
"include_dirs": gcc_kwargs["include_dirs"],
"library_dirs": gcc_kwargs["library_dirs"],
"so_ext": gcc_kwargs["so_ext"],
"o_ext": gcc_kwargs["o_ext"],
"defines": gcc_kwargs["defines"],
"undefines": gcc_kwargs["undefines"],
}
kwargs.setdefault("undefines", []).append("__BLOCKS__")
kwargs["cc"] = "nvcc"

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = E126,E127,E128,E123,E226,E241,E242,E265,W503,E402
ignore = E126,E127,E128,E123,E226,E241,E242,E265,W503,E402,B028
max-line-length=85

inline-quotes = "
Expand Down

0 comments on commit 4597970

Please sign in to comment.