Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #17

Merged
merged 1 commit into from
May 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -255,7 +255,7 @@ $ pipenv sync
$ pipenv shell
```

- Update depedencies in `Pipfile.lock`
- Update dependencies in `Pipfile.lock`
```sh
$ pipenv lock --pre
```
Expand Down
2 changes: 1 addition & 1 deletion pysen/dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pysen/ext/isort_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pysen/plugin_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pysen/pyproject_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion pysen/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_process_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down