diff --git a/README.md b/README.md index 681acc9..e9e4851 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ We currently provide tasks that manage setting files for the following tools: ## What isn't pysen? * pysen is not a linting tool per se. Rather, `pysen run lint` orchestrates multiple python linting tools by automatically setting up their configurations from a more abstract setting for pysen. -* pysen does not manage your depedencies and packages. We recommend using package managers such as [pipenv](https://github.com/pypa/pipenv) or [poetry](https://python-poetry.org/) to lock your dependecy versions, **including the versions for the linting tools that pysen coordinates** (i.e., isort, mypy, flake8, black). The supported versions for these tools can be found in the `extra_requires/lint` section in pysen's [setup.py](https://github.com/pfnet/pysen/blob/main/setup.py). You should **not** rely on `pip install pysen[lint]` to control the versions of your linting tools. +* pysen does not manage your dependencies and packages. We recommend using package managers such as [pipenv](https://github.com/pypa/pipenv) or [poetry](https://python-poetry.org/) to lock your dependency versions, **including the versions for the linting tools that pysen coordinates** (i.e., isort, mypy, flake8, black). The supported versions for these tools can be found in the `extra_requires/lint` section in pysen's [setup.py](https://github.com/pfnet/pysen/blob/main/setup.py). You should **not** rely on `pip install pysen[lint]` to control the versions of your linting tools. * pysen is not limited to linting purposes or python. See the [plugin section](README.md#create-a-plugin-to-customize-pysen) for details. ## How it works: Settings file directory @@ -255,7 +255,7 @@ $ pipenv sync $ pipenv shell ``` -- Update depedencies in `Pipfile.lock` +- Update dependencies in `Pipfile.lock` ```sh $ pipenv lock --pre ``` diff --git a/pysen/dumper.py b/pysen/dumper.py index 3d25271..3f715ac 100644 --- a/pysen/dumper.py +++ b/pysen/dumper.py @@ -17,7 +17,7 @@ def dump_toml(path: pathlib.Path, setting: SettingFile) -> None: with path.open("r") as f: document = tomlkit.loads(f.read()) - # NOTE(igarashi): TOMLDocument inherists Dict + # NOTE(igarashi): TOMLDocument inherits Dict entry = setting.entries() for p, d in sorted(entry): updated = SettingFile.update_by_entry(document, p, d) diff --git a/pysen/ext/isort_wrapper.py b/pysen/ext/isort_wrapper.py index 0495986..a551d56 100644 --- a/pysen/ext/isort_wrapper.py +++ b/pysen/ext/isort_wrapper.py @@ -73,7 +73,7 @@ def to_black_compatible(self) -> "IsortSetting": # include_trailing_comma: black appends trailing comma # force_grid_wrap: the property means isort grid-wrap the statement regardless # of line length if the number of `from` imports is greater than - # the property. black doesn't grid wrap the statemenet if it + # the property. black doesn't grid wrap the statement if it # doesn't exceed the line length. # use_parentheses: use parenthesis for line continuation instead of `\` new = copy.deepcopy(self) diff --git a/pysen/plugin_loader.py b/pysen/plugin_loader.py index 254fa9b..c5c0e27 100644 --- a/pysen/plugin_loader.py +++ b/pysen/plugin_loader.py @@ -53,7 +53,7 @@ def load_plugin( raise TypeError("must specify either function or script") if function is not None and script is not None: - raise TypeError("only one of function or script must be speicifed") + raise TypeError("only one of function or script must be specified") if function is not None: try: diff --git a/pysen/pyproject_model.py b/pysen/pyproject_model.py index 0772480..236dc1e 100644 --- a/pysen/pyproject_model.py +++ b/pysen/pyproject_model.py @@ -98,7 +98,7 @@ def _parse_plugin_configs(base_dir: pathlib.Path, data: Any) -> List[PluginConfi ) if config.function is not None and config.script is not None: - raise dacite.DaciteError("only one of function or script must be speicifed") + raise dacite.DaciteError("only one of function or script must be specified") result.append(config) diff --git a/pysen/reporter.py b/pysen/reporter.py index 569a61a..6e6b880 100644 --- a/pysen/reporter.py +++ b/pysen/reporter.py @@ -146,7 +146,7 @@ def format_summary(self) -> str: def format_error_summary(self) -> str: with io.StringIO() as buf: - buf.write("Errored:\n") + buf.write("Error:\n") for r in self._reporters: if not r.success: buf.write(" - {}\n".format(r.name)) diff --git a/tests/test_process_utils.py b/tests/test_process_utils.py index fca17f4..e5d5cf2 100644 --- a/tests/test_process_utils.py +++ b/tests/test_process_utils.py @@ -60,7 +60,7 @@ class HandlerException(Exception): class FailingHandler(logging.Handler): def emit(self, record: logging.LogRecord) -> None: - raise HandlerException("somebody screwded up") + raise HandlerException("somebody screwed up") @pytest.mark.parametrize( diff --git a/tests/test_source.py b/tests/test_source.py index fee79f3..56078be 100644 --- a/tests/test_source.py +++ b/tests/test_source.py @@ -57,7 +57,7 @@ def test__resolve() -> None: assert len(resolved) > 1 assert all(str(x).startswith(str(BASE_DIR)) and x.suffix == ".py" for x in resolved) - # NOTE(igarashi): check base_dir of glob is overriden by setting + # NOTE(igarashi): check base_dir of glob is overridden by setting setting = SourceEntrySetting(glob=True, base_dir=BASE_DIR / "fakes") resolved_with_base = _resolve(BASE_DIR, "**/*.py", setting) assert len(resolved_with_base) > 1