8000 fix: minor fixes to get pycharm not to complain too much (#972) · Develop-Python/cibuildwheel@21df1e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 21df1e5

Browse files
authored
fix: minor fixes to get pycharm not to complain too much (pypa#972)
1 parent 4ed927c commit 21df1e5

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

cibuildwheel/docker_container.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def copy_out(self, from_path: PurePath, to_path: Path) -> None:
131131
def glob(self, path: PurePath, pattern: str) -> List[PurePath]:
132132
glob_pattern = os.path.join(str(path), pattern)
133133

134-
path_strs = json.loads(
134+
path_strings = json.loads(
135135
self.call(
136136
[
137137
self.UTILITY_PYTHON,
@@ -142,7 +142,7 @@ def glob(self, path: PurePath, pattern: str) -> List[PurePath]:
142142
)
143143
)
144144

145-
return [PurePath(p) for p in path_strs]
145+
return [PurePath(p) for p in path_strings]
146146

147147
def call(
148148
self,
@@ -170,7 +170,7 @@ def call(
170170
# can cope with spaces and strange characters in the name or value.
171171
# Finally, the remote shell is told to write a footer - this will show
172172
# up in the output so we know when to stop reading, and will include
173-
# the returncode of `command`.
173+
# the return code of `command`.
174174
self.bash_stdin.write(
175175
bytes(
176176
f"""(
@@ -199,11 +199,11 @@ def call(
199199
len(line)
200200
- 1 # newline character
201201
- len(end_of_message) # delimiter
202-
- 4 # 4 returncode decimals
202+
- 4 # 4 return code decimals
203203
)
204204
# fmt: on
205-
returncode_str = line[footer_offset : footer_offset + 4]
206-
returncode = int(returncode_str)
205+
return_code_str = line[footer_offset : footer_offset + 4]
206+
return_code = int(return_code_str)
207207
# add the last line to output, without the footer
208208
output_io.write(line[0:footer_offset])
209209
break
@@ -215,8 +215,8 @@ def call(
215215
else:
216216
output = ""
217217

218-
if returncode != 0:
219-
raise subprocess.CalledProcessError(returncode, args, output)
218+
if return_code != 0:
219+
raise subprocess.CalledProcessError(return_code, args, output)
220220

221221
return output
222222

cibuildwheel/logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"github": ("::group::{name}", "::endgroup::{name}"),
1515
}
1616

17-
PLATFORM_IDENTIFIER_DESCIPTIONS = {
17+
PLATFORM_IDENTIFIER_DESCRIPTIONS = {
1818
"manylinux_x86_64": "manylinux x86_64",
1919
"manylinux_i686": "manylinux i686",
2020
"manylinux_aarch64": "manylinux aarch64",
@@ -204,7 +204,7 @@ def build_description_from_identifier(identifier: str) -> str:
204204
build_description += f" {python_version[0]}.{python_version[1:]} "
205205

206206
try:
207-
build_description += PLATFORM_IDENTIFIER_DESCIPTIONS[platform_identifier]
207+
build_description += PLATFORM_IDENTIFIER_DESCRIPTIONS[platform_identifier]
208208
except KeyError as e:
209209
raise Exception("unknown platform") from e
210210

cibuildwheel/macos.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,10 @@ def build(options: Options) -> None:
402402
config_setting = " ".join(verbosity_flags)
403403
build_env = env.copy()
404404
if build_options.dependency_constraints:
405-
constr = build_options.dependency_constraints.get_for_python_version(
405+
constraint_path = build_options.dependency_constraints.get_for_python_version(
406406
config.version
407407
)
408-
build_env["PIP_CONSTRAINT"] = constr.as_uri()
408+
build_env["PIP_CONSTRAINT"] = constraint_path.as_uri()
409409
build_env["VIRTUALENV_PIP"] = get_pip_version(env)
410410
call(
411411
[
@@ -457,7 +457,7 @@ def build(options: Options) -> None:
457457

458458
if build_options.test_command and build_options.test_selector(config.identifier):
459459
machine_arch = platform.machine()
460-
testing_archs: List[Literal["x86_64", "arm64"]] = []
460+
testing_archs: List[Literal["x86_64", "arm64"]]
461461

462462
if config_is_arm64:
463463
testing_archs = ["arm64"]

cibuildwheel/projectfiles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def setup_py_python_requires(content: str) -> Optional[str]:
5151

5252

5353
def get_requires_python_str(package_dir: Path) -> Optional[str]:
54-
"Return the python requires string from the most canonical source available, or None"
54+
"""Return the python requires string from the most canonical source available, or None"""
5555

5656
# Read in from pyproject.toml:project.requires-python
5757
try:

cibuildwheel/windows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def get_python_configurations(
8787

8888

8989
def extract_zip(zip_src: Path, dest: Path) -> None:
90-
with ZipFile(zip_src) as zip:
91-
zip.extractall(dest)
90+
with ZipFile(zip_src) as zip_:
91+
zip_.extractall(dest)
9292

9393

9494
def install_cpython(version: str, arch: str, nuget: Path) -> Path:

0 commit comments

Comments
 (0)
0