Skip to content

Commit c1f2daa

Browse files
committed
Fix TODO comments and typos
1 parent ba24375 commit c1f2daa

File tree

8 files changed

+12
-15
lines changed

8 files changed

+12
-15
lines changed

pkg_resources/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3326,9 +3326,6 @@ def has_version(self) -> bool:
33263326
except ValueError:
33273327
issue_warning("Unbuilt egg for " + repr(self))
33283328
return False
3329-
except SystemError:
3330-
# TODO: remove this except clause when python/cpython#103632 is fixed.
3331-
return False
33323329
return True
33333330

33343331
def clone(self, **kw: str | int | IResourceProvider | None) -> Self:

setuptools/_static.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Static:
2727
def _prevent_modification(target: type, method: str, copying: str) -> None:
2828
"""
2929
Because setuptools is very flexible we cannot fully prevent
30-
plugins and user customisations from modifying static values that were
30+
plugins and user customizations from modifying static values that were
3131
parsed from config files.
3232
But we can attempt to block "in-place" mutations and identify when they
3333
were done.

setuptools/_vendor/autocommand/autoparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _add_arguments(param, parser, used_char_args, add_nos):
137137
arg_spec['type'] = str
138138

139139
# TODO: special case for list type.
140-
# - How to specificy type of list members?
140+
# - How to specify type of list members?
141141
# - param: [int]
142142
# - param: int =[]
143143
# - action='append' vs nargs='*'

setuptools/_vendor/packaging/metadata.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ def _parse_project_urls(data: list[str]) -> dict[str, str]:
193193
# be the missing value, then they'd have multiple '' values that
194194
# overwrite each other in a accumulating dict.
195195
#
196-
# The other potentional issue is that it's possible to have the
196+
# The other potential issue is that it's possible to have the
197197
# same label multiple times in the metadata, with no solid "right"
198198
# answer with what to do in that case. As such, we'll do the only
199-
# thing we can, which is treat the field as unparseable and add it
199+
# thing we can, which is treat the field as unparsable and add it
200200
# to our list of unparsed fields.
201201
parts = [p.strip() for p in pair.split(",", 1)]
202202
parts.extend([""] * (max(0, 2 - len(parts)))) # Ensure 2 items
@@ -209,8 +209,8 @@ def _parse_project_urls(data: list[str]) -> dict[str, str]:
209209
label, url = parts
210210
if label in urls:
211211
# The label already exists in our set of urls, so this field
212-
# is unparseable, and we can just add the whole thing to our
213-
# unparseable data and stop processing it.
212+
# is unparsable, and we can just add the whole thing to our
213+
# unparsable data and stop processing it.
214214
raise KeyError("duplicate labels in project urls")
215215
urls[label] = url
216216

setuptools/command/editable_wheel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def _run_build_subcommands(self) -> None:
278278
This method implements a temporary workaround to support the ecosystem
279279
while the implementations catch up.
280280
"""
281-
# TODO: Once plugins/customisations had the chance to catch up, replace
281+
# TODO: Once plugins/customizations had the chance to catch up, replace
282282
# `self._run_build_subcommands()` with `self.run_command("build")`.
283283
# Also remove _safely_run, TestCustomBuildPy. Suggested date: Aug/2023.
284284
build = self.get_finalized_command("build")
@@ -309,7 +309,7 @@ def _safely_run(self, cmd_name: str):
309309
https://setuptools.pypa.io/en/latest/userguide/extension.html.
310310
311311
For the time being `setuptools` will silence this error and ignore
312-
the faulty command, but this behaviour will change in future versions.
312+
the faulty command, but this behavior will change in future versions.
313313
""",
314314
# TODO: define due_date
315315
# There is a series of shortcomings with the available editable install
@@ -564,7 +564,7 @@ def _encode_pth(content: str) -> bytes:
564564
.pth files are always read with 'locale' encoding, the recommendation
565565
from the cpython core developers is to write them as ``open(path, "w")``
566566
and ignore warnings (see python/cpython#77102, pypa/setuptools#3937).
567-
This function tries to simulate this behaviour without having to create an
567+
This function tries to simulate this behavior without having to create an
568568
actual file, in a way that supports a range of active Python versions.
569569
(There seems to be some variety in the way different version of Python handle
570570
``encoding=None``, not all of them use ``locale.getpreferredencoding(False)``

setuptools/command/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def initialize_options(self):
6868
""",
6969
see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
7070
# TODO: Document how to bootstrap setuptools without install
71-
# (e.g. by unziping the wheel file)
71+
# (e.g. by unzipping the wheel file)
7272
# and then add a due_date to this warning.
7373
)
7474

setuptools/tests/test_build_py.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def test_excluded_subpackages(tmpdir_cwd):
168168
with pytest.warns(SetuptoolsDeprecationWarning, match=msg):
169169
# TODO: To fix #3260 we need some transition period to deprecate the
170170
# existing behavior of `include_package_data`. After the transition, we
171-
# should remove the warning and fix the behaviour.
171+
# should remove the warning and fix the behavior.
172172

173173
if os.getenv("SETUPTOOLS_USE_DISTUTILS") == "stdlib":
174174
# pytest.warns reset the warning filter temporarily

setuptools/unicode_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class _Utf8EncodingNeeded(SetuptoolsDeprecationWarning):
8686
"""
8787

8888
_DETAILS = """
89-
Fallback behaviour for UTF-8 is considered **deprecated** and future versions of
89+
Fallback behavior for UTF-8 is considered **deprecated** and future versions of
9090
`setuptools` may not implement it.
9191
9292
Please encode {file!r} with "utf-8" to ensure future builds will succeed.

0 commit comments

Comments
 (0)