Skip to content

Commit dff5e91

Browse files
committedAug 16, 2021
Spelling fixes
1 parent b0007e7 commit dff5e91

12 files changed

+16
-16
lines changed
 

‎Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM python:$VERSION
44
# Install pip and poetry
55
RUN python -m pip install --upgrade pip && python -m pip install poetry
66

7-
# Setup as minimal a stub project as posible, simply to allow caching base dependencies
7+
# Setup as minimal a stub project as possible, simply to allow caching base dependencies
88
# between builds.
99
#
1010
# If error is encountered in these steps, can safely be removed locally.

‎docs/configuration/options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Additional files that isort should skip over (extending --skip-glob).
8080
## Skip Gitignore
8181

8282
Treat project as a git repository and ignore files listed in .gitignore.
83-
NOTE: This requires git to be installed and accesible from the same shell as isort.
83+
NOTE: This requires git to be installed and accessible from the same shell as isort.
8484

8585
**Type:** Bool
8686
**Default:** `False`

‎docs/configuration/pre-commit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ under the `repos` section of your projects `.pre-commit-config.yaml` file.
2626
### seed-isort-config
2727

2828
Older versions of isort used a lot of magic to determine import placement, that could easily break when running on CI/CD.
29-
To fix this, a utilitiy called `seed-isort-config` was created. Since isort 5 however, the project has drastically improved its placement
29+
To fix this, a utility called `seed-isort-config` was created. Since isort 5 however, the project has drastically improved its placement
3030
logic and ensured a good level of consistency across environments.
3131
If you have a step in your pre-commit config called `seed-isort-config` or similar, it is highly recommend that you remove this.
3232
It is guaranteed to slow things down, and can conflict with isort's own module placement logic.

‎docs/contributing/1.-contributing-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ A local test cycle might look like the following:
4949
3. if #2 fails, debug, save, and goto #1
5050
* `docker run -it isort bash` will get you into the failed environment
5151
* `docker run -v $(git rev-parse --show-toplevel):/isort` will make changes made in the docker environment persist on your local checkout.
52-
**TIP**: combine both to get an interacive docker shell that loads changes made locally, even after build, to quickly rerun that pesky failing test
52+
**TIP**: combine both to get an interactive docker shell that loads changes made locally, even after build, to quickly rerun that pesky failing test
5353
4. `./scripts/docker.sh`
5454
5. if #4 fails, debug, save and goto #1; you may need to specify a different `--build-arg VERSION=$VER`
5555
6. congrats! you are probably ready to push a contribution

‎isort/_future/_dataclasses.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def __repr__(self):
284284

285285
# This is used to support the PEP 487 __set_name__ protocol in the
286286
# case where we're using a field that contains a descriptor as a
287-
# defaul value. For details on __set_name__, see
287+
# default value. For details on __set_name__, see
288288
# https://www.python.org/dev/peps/pep-0487/#implementation-details.
289289
#
290290
# Note that in _process_class, this Field object is overwritten
@@ -680,7 +680,7 @@ def _get_field(cls, a_name, a_type):
680680
# In addition to checking for actual types here, also check for
681681
# string annotations. get_type_hints() won't always work for us
682682
# (see https://github.com/python/typing/issues/508 for example),
683-
# plus it's expensive and would require an eval for every stirng
683+
# plus it's expensive and would require an eval for every string
684684
# annotation. So, make a best effort to see if this is a ClassVar
685685
# or InitVar using regex's and checking that the thing referenced
686686
# is actually of the correct type.
@@ -1148,7 +1148,7 @@ class C(Base):
11481148
raise TypeError(f"Invalid field: {item!r}")
11491149

11501150
if not isinstance(name, str) or not name.isidentifier():
1151-
raise TypeError(f"Field names must be valid identifers: {name!r}")
1151+
raise TypeError(f"Field names must be valid identifiers: {name!r}")
11521152
if keyword.iskeyword(name):
11531153
raise TypeError(f"Field names must not be keywords: {name!r}")
11541154
if name in seen:

‎isort/hooks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def git_hook(
4444
modifying anything.
4545
:param bool lazy - if True, also check/fix unstaged files.
4646
This is useful if you frequently use ``git commit -a`` for example.
47-
If False, ony check/fix the staged files for isort errors.
47+
If False, only check/fix the staged files for isort errors.
4848
:param str settings_file - A path to a file to be used as
4949
the configuration file for this run.
5050
When settings_file is the empty string, the configuration file

‎isort/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def _build_arg_parser() -> argparse.ArgumentParser:
355355
action="store_true",
356356
dest="skip_gitignore",
357357
help="Treat project as a git repository and ignore files listed in .gitignore."
358-
"\nNOTE: This requires git to be installed and accesible from the same shell as isort.",
358+
"\nNOTE: This requires git to be installed and accessible from the same shell as isort.",
359359
)
360360
target_group.add_argument(
361361
"--ext",

‎isort/pylama_isort.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
@contextmanager
14-
def supress_stdout() -> Iterator[None]:
14+
def suppress_stdout() -> Iterator[None]:
1515
stdout = sys.stdout
1616
with open(os.devnull, "w") as devnull:
1717
sys.stdout = devnull
@@ -28,7 +28,7 @@ def run(
2828
self, path: str, params: Optional[Dict[str, Any]] = None, **meta: Any
2929
) -> List[Dict[str, Any]]:
3030
"""Lint the file. Return an array of error dicts if appropriate."""
31-
with supress_stdout():
31+
with suppress_stdout():
3232
try:
3333
if not api.check_file(path, disregard_skip=False, **params or {}):
3434
return [

‎tests/unit/test_deprecated_finders.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def test_requirements_finder(tmpdir) -> None:
158158
assert finder._normalize_name("deal") == "deal"
159159
assert finder._normalize_name("Django") == "django" # lowercase
160160
assert finder._normalize_name("django_haystack") == "haystack" # mapping
161-
assert finder._normalize_name("Flask-RESTful") == "flask_restful" # conver `-`to `_`
161+
assert finder._normalize_name("Flask-RESTful") == "flask_restful" # convert `-`to `_`
162162

163163
req_file.remove()
164164

@@ -178,7 +178,7 @@ def test_pipfile_finder(tmpdir) -> None:
178178
assert finder._normalize_name("deal") == "deal"
179179
assert finder._normalize_name("Django") == "django" # lowercase
180180
assert finder._normalize_name("django_haystack") == "haystack" # mapping
181-
assert finder._normalize_name("Flask-RESTful") == "flask_restful" # conver `-`to `_`
181+
assert finder._normalize_name("Flask-RESTful") == "flask_restful" # convert `-`to `_`
182182

183183
pipfile.remove()
184184

‎tests/unit/test_format.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_colored_printer_diff(capsys):
8585
assert colorama.Fore.GREEN + "+ added line" in out
8686
# Removed lines are red
8787
assert colorama.Fore.RED + "- removed line" in out
88-
# Normal lines are resetted back
88+
# Normal lines are reset back
8989
assert colorama.Style.RESET_ALL + "normal line" in out
9090

9191

‎tests/unit/test_regressions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def test_blank_lined_removed_issue_1283():
9898

9999

100100
def test_extra_blank_line_added_nested_imports_issue_1290():
101-
"""Ensure isort doesn't added unecessary blank lines above nested imports.
101+
"""Ensure isort doesn't add unnecessary blank lines above nested imports.
102102
See: https://github.com/pycqa/isort/issues/1290
103103
"""
104104
test_input = '''from typing import TYPE_CHECKING

‎tests/unit/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def as_stream(text: str) -> UnseekableTextIOWrapper:
1919

2020
def isort_test(code: str, expected_output: str = "", **config):
2121
"""Runs isort against the given code snippet and ensures that it
22-
gives consistent output accross multiple runs, and if an expected_output
22+
gives consistent output across multiple runs, and if an expected_output
2323
is given - that it matches that.
2424
"""
2525
expected_output = expected_output or code

0 commit comments

Comments
 (0)
Please sign in to comment.