From 712260437cb72783c66dbf449b7675ea8d23c545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Mon, 23 Aug 2021 19:52:43 +0200 Subject: [PATCH] Fix spelling --- CHANGELOG.md | 10 +++++----- docs/docs/plugin.md | 2 +- docs/docs/pyproject/tool-pdm.md | 2 +- docs/docs/usage/project.md | 4 ++-- pdm/builders/base.py | 2 +- pdm/cli/commands/base.py | 2 +- pdm/installers/manager.py | 2 +- pdm/installers/synchronizers.py | 2 +- pdm/installers/uninstallers.py | 14 +++++++------- pdm/models/auth.py | 2 +- pdm/models/environment.py | 2 +- pdm/models/markers.py | 2 +- pdm/models/pip_shims.py | 2 +- pdm/project/config.py | 2 +- pdm/resolver/providers.py | 2 +- tests/conftest.py | 2 +- .../projects/demo-parent-package/README.md | 2 +- 17 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a427564..dd565001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,7 @@ Release v1.7.1 (2021-07-29) ### Bug Fixes - Accept non-canonical distribution name in the wheel's dist-info directory name. [#529](https://github.com/pdm-project/pdm/issues/529) -- Prefer requirments with narrower version constraints or allowing prereleases to find matches. [#551](https://github.com/pdm-project/pdm/issues/551) +- Prefer requirements with narrower version constraints or allowing prereleases to find matches. [#551](https://github.com/pdm-project/pdm/issues/551) - Use the underlying real executable path for writing shebangs. [#553](https://github.com/pdm-project/pdm/issues/553) - Fix a bug that extra markers cannot be extracted when combined with other markers with "and". [#559](https://github.com/pdm-project/pdm/issues/559) - Fix a bug that redacted credentials in source urls get overwritten with the plain text after locking. [#561](https://github.com/pdm-project/pdm/issues/561) @@ -81,7 +81,7 @@ Release v1.7.0 (2021-07-20) ### Refactor -- Seperate the build env into two different levels for better caching. [#541](https://github.com/pdm-project/pdm/issues/541) +- Separate the build env into two different levels for better caching. [#541](https://github.com/pdm-project/pdm/issues/541) - Refactor the build part into smaller functions. [#543](https://github.com/pdm-project/pdm/issues/543) @@ -139,7 +139,7 @@ Release v1.6.0 (2021-05-31) - Use a new approach to determine the packages to be installed. This requires a quick resolution step before installation. [#456](https://github.com/pdm-project/pdm/issues/456) - `pdm export` no longer produces requirements file applicable for all platforms due to the new approach. [#456](https://github.com/pdm-project/pdm/issues/456) -- Add structural typing for requirements module. Refactor the requirments module for that purpose. [#433](https://github.com/pdm-project/pdm/issues/433) +- Add structural typing for requirements module. Refactor the requirements module for that purpose. [#433](https://github.com/pdm-project/pdm/issues/433) - Introduce `--no-editable` option to install non-editable versions of all packages. [#443](https://github.com/pdm-project/pdm/issues/443) - Introduce `--no-self` option to prevent the project itself from being installed. [#444](https://github.com/pdm-project/pdm/issues/444) - Add a default `.gitignore` file in the `__pypackages__` directory. [#446](https://github.com/pdm-project/pdm/issues/446) @@ -289,7 +289,7 @@ Release v1.5.0b0 (2021-04-03) - Add a special value `:all` given to `-s/--section` to refer to all sections under the same species. Adjust `add`, `sync`, `install`, `remove` and `update` to support the new `dev-dependencies` groups. Old behavior will be kept the same. [#351](https://github.com/pdm-project/pdm/issues/351) - `dev-dependencies` is now a table of dependencies groups, where key is the group name and value is an array of dependencies. These dependencies won't appear in the distribution's metadata. `dev-depedencies` of the old format will turn into `dev` group under `dev-dependencies`. [#351](https://github.com/pdm-project/pdm/issues/351) -- Move `dev-dependencies`, `includes`, `excludes` and `package-dir` out from `[project]` table to `[tool.pdm]` table. The migration will be done automaticaly if old format is detected. [#351](https://github.com/pdm-project/pdm/issues/351) +- Move `dev-dependencies`, `includes`, `excludes` and `package-dir` out from `[project]` table to `[tool.pdm]` table. The migration will be done automatically if old format is detected. [#351](https://github.com/pdm-project/pdm/issues/351) - Throws an error with meaningful message when no candidate is found for one requirement. [#357](https://github.com/pdm-project/pdm/issues/357) - Support `--dry-run` option for `update` command to display packages that need update, install or removal. Add `--top` option to limit to top level packages only. [#358](https://github.com/pdm-project/pdm/issues/358) - Full-featured completion scripts for Zsh and Powershell - section selection, package name autocompletion and so on. Windows is a first-class citizen! [#367](https://github.com/pdm-project/pdm/issues/367) @@ -486,7 +486,7 @@ Release v1.3.0 (2021-02-09) - Increase the default value of the max rounds of resolution to 1000, make it configurable. [#238](https://github.com/pdm-project/pdm/issues/238) - Rewrite the project's `egg-info` directory when dependencies change. So that `pdm list --graph` won't show invalid entries. [#240](https://github.com/pdm-project/pdm/issues/240) -- When importing requirments from a `requirments.txt` file, build the package to find the name if not given in the URL. [#245](https://github.com/pdm-project/pdm/issues/245) +- When importing requirements from a `requirements.txt` file, build the package to find the name if not given in the URL. [#245](https://github.com/pdm-project/pdm/issues/245) - When initializing the project, prompt user for whether the project is a library, and give empty `name` and `version` if not. [#253](https://github.com/pdm-project/pdm/issues/253) ### Bug Fixes diff --git a/docs/docs/plugin.md b/docs/docs/plugin.md index bede09cc..a4ac30c9 100644 --- a/docs/docs/plugin.md +++ b/docs/docs/plugin.md @@ -42,7 +42,7 @@ class HelloCommand(BaseCommand): print(f"Hello, {name}") ``` -First, let's create a new `HelloCommand` class inherting from `pdm.cli.commands.base.BaseCommand`. It has two major functions: +First, let's create a new `HelloCommand` class inheriting from `pdm.cli.commands.base.BaseCommand`. It has two major functions: - `add_arguments()` to manipulate the argument parser passed as the only argument, where you can add additional command line arguments to it diff --git a/docs/docs/pyproject/tool-pdm.md b/docs/docs/pyproject/tool-pdm.md index 63029a3f..5524b607 100644 --- a/docs/docs/pyproject/tool-pdm.md +++ b/docs/docs/pyproject/tool-pdm.md @@ -85,7 +85,7 @@ If you don't specify any of these fields, PDM also provides smart default values - `src` directory will be detected as the `package-dir` if it exists. If your project follows the above conventions you don't need to config any of these fields and it just works. -Be awared PDM won't add [PEP 420 implicit namespace packages](https://www.python.org/dev/peps/pep-0420/) automatically and they should always be specified in `includes` explicitly. +Be aware PDM won't add [PEP 420 implicit namespace packages](https://www.python.org/dev/peps/pep-0420/) automatically and they should always be specified in `includes` explicitly. ## Select another package directory to look for packages diff --git a/docs/docs/usage/project.md b/docs/docs/usage/project.md index 001518f1..42b272cf 100644 --- a/docs/docs/usage/project.md +++ b/docs/docs/usage/project.md @@ -246,7 +246,7 @@ Plain text scripts are regarded as normal command, or you can explicitly specify start_server = {cmd = "flask run -p 54321"} ``` -In some cases, such as when wanting to add comments between parameters, it might be more convinient +In some cases, such as when wanting to add comments between parameters, it might be more convenient to specify the command as an array instead of a string: ```toml @@ -333,7 +333,7 @@ PDM provides a convenient command group to manage the cache, there are four kind 1. `wheels/` stores the built results of non-wheel distributions and files. 1. `http/` stores the HTTP response content. -1. `metadata/` stores package metadata retreived by the resolver. +1. `metadata/` stores package metadata retrieved by the resolver. 1. `hashes/` stores the file hashes fetched from the package index or calculated locally. See the current cache usage by typing `pdm cache info`. Besides, you can use `add`, `remove` and `list` subcommands to manage the cache content. diff --git a/pdm/builders/base.py b/pdm/builders/base.py index a9b13824..da258fd4 100644 --- a/pdm/builders/base.py +++ b/pdm/builders/base.py @@ -267,7 +267,7 @@ class EnvBuilder: self, out_dir: str, config_settings: Mapping[str, Any] | None = None ) -> str: """Prepare metadata and store in the out_dir. Some backends doesn't provide that API, - in that case the metadata will be retreived from the built result. + in that case the metadata will be retrieved from the built result. """ raise NotImplementedError("Should be implemented in subclass") diff --git a/pdm/cli/commands/base.py b/pdm/cli/commands/base.py index 94a9abb1..59e33d96 100644 --- a/pdm/cli/commands/base.py +++ b/pdm/cli/commands/base.py @@ -14,7 +14,7 @@ class BaseCommand: name: Optional[str] = None # The subcommand's help string, if not given, __doc__ will be used. description: Optional[str] = None - # A list of pre-defined options which will be loaded on initailizing + # A list of pre-defined options which will be loaded on initializing # Rewrite this if you don't want the default ones arguments: List[Option] = [verbose_option, global_option, project_option] diff --git a/pdm/installers/manager.py b/pdm/installers/manager.py index 7398ab03..c41fe640 100644 --- a/pdm/installers/manager.py +++ b/pdm/installers/manager.py @@ -32,7 +32,7 @@ class InstallManager: def get_paths_to_remove(self, dist: Distribution) -> BaseRemovePaths: """Get the path collection to be removed from the disk""" - return StashedRemovePaths.from_dist(dist, envrionment=self.environment) + return StashedRemovePaths.from_dist(dist, environment=self.environment) def uninstall(self, dist: Distribution) -> None: """Perform the uninstallation for a given distribution""" diff --git a/pdm/installers/synchronizers.py b/pdm/installers/synchronizers.py index f540f119..a89feb8d 100644 --- a/pdm/installers/synchronizers.py +++ b/pdm/installers/synchronizers.py @@ -40,7 +40,7 @@ class DummyFuture: class DummyExecutor: - """A synchronous pool class to mimick ProcessPoolExecuter's interface. + """A synchronous pool class to mimic ProcessPoolExecuter's interface. functions are called and awaited for the result """ diff --git a/pdm/installers/uninstallers.py b/pdm/installers/uninstallers.py index 255ea1d5..76dda2fe 100644 --- a/pdm/installers/uninstallers.py +++ b/pdm/installers/uninstallers.py @@ -104,9 +104,9 @@ def _get_file_root(path: str, base: str) -> str | None: class BaseRemovePaths(abc.ABC): """A collection of paths and/or pth entries to remove""" - def __init__(self, dist: Distribution, envrionment: Environment) -> None: + def __init__(self, dist: Distribution, environment: Environment) -> None: self.dist = dist - self.envrionment = envrionment + self.environment = environment self._paths: set[str] = set() self._pth_entries: set[str] = set() self.refer_to: str | None = None @@ -122,10 +122,10 @@ class BaseRemovePaths(abc.ABC): """Roll back the removal operations""" @classmethod - def from_dist(cls: Type[_T], dist: Distribution, envrionment: Environment) -> _T: + def from_dist(cls: Type[_T], dist: Distribution, environment: Environment) -> _T: """Create an instance from the distribution""" - scheme = envrionment.get_paths() - instance = cls(dist, envrionment) + scheme = environment.get_paths() + instance = cls(dist, environment) meta_location = os.path.normcase(dist._path.absolute()) # type: ignore dist_location = os.path.dirname(meta_location) if is_egg_link(dist): # pragma: no cover @@ -197,7 +197,7 @@ class StashedRemovePaths(BaseRemovePaths): def __init__(self, dist: Distribution, environment: Environment) -> None: super().__init__(dist, environment) self._pth_file = os.path.join( - self.envrionment.get_paths()["purelib"], self.PTH_REGISTRY + self.environment.get_paths()["purelib"], self.PTH_REGISTRY ) self._saved_pth: bytes | None = None self._stashed: list[tuple[str, str]] = [] @@ -233,7 +233,7 @@ class StashedRemovePaths(BaseRemovePaths): # Don't stash cache files, remove them directly os.unlink(old_path) root = _get_file_root( - old_path, os.path.abspath(self.envrionment.get_paths()["prefix"]) + old_path, os.path.abspath(self.environment.get_paths()["prefix"]) ) if root is None: termui.logger.debug( diff --git a/pdm/models/auth.py b/pdm/models/auth.py index 3262fd74..1650c6f2 100644 --- a/pdm/models/auth.py +++ b/pdm/models/auth.py @@ -16,7 +16,7 @@ class PdmBasicAuth(MultiDomainBasicAuth): """A custom auth class that differs from Pip's implementation in the following ways: - - It shows an error message when credentials are not provided or correect. + - It shows an error message when credentials are not provided or correct. """ def __init__( diff --git a/pdm/models/environment.py b/pdm/models/environment.py index bf89e7de..f52c327e 100644 --- a/pdm/models/environment.py +++ b/pdm/models/environment.py @@ -105,7 +105,7 @@ class Environment: python_abi_tag, ignore_requires_python, ) - # Reuse the auth across sessions to avoid prompting repeatly. + # Reuse the auth across sessions to avoid prompting repeatedly. finder.session.auth = self.auth # type: ignore yield finder finder.session.close() # type: ignore diff --git a/pdm/models/markers.py b/pdm/models/markers.py index 2ea63dd3..b34c03bb 100644 --- a/pdm/models/markers.py +++ b/pdm/models/markers.py @@ -56,7 +56,7 @@ def split_marker_extras( marker: PackageMarker, ) -> Tuple[List[str], Optional[PackageMarker]]: """An element can be stripped from the marker only if all parts are connected - with `and` operater. The rest part are returned as a string or `None` if all are + with `and` operator. The rest part are returned as a string or `None` if all are stripped. :param marker: the input marker string diff --git a/pdm/models/pip_shims.py b/pdm/models/pip_shims.py index 226266c0..290aabf8 100644 --- a/pdm/models/pip_shims.py +++ b/pdm/models/pip_shims.py @@ -1,7 +1,7 @@ # flake8: noqa """ This module provides a middle layer between pdm and pip. -All pip members are imported here for compatiblity purpose. +All pip members are imported here for compatibility purpose. """ from __future__ import annotations diff --git a/pdm/project/config.py b/pdm/project/config.py index a36e189e..062f4c10 100644 --- a/pdm/project/config.py +++ b/pdm/project/config.py @@ -80,7 +80,7 @@ class Config(MutableMapping[str, str]): "Check if there is any newer version available", True, True ), "auto_global": ConfigItem( - "Use global package implicity if no local project is found", + "Use global package implicitly if no local project is found", False, True, "PDM_AUTO_GLOBAL", diff --git a/pdm/resolver/providers.py b/pdm/resolver/providers.py index 3b882831..4f9adc5f 100644 --- a/pdm/resolver/providers.py +++ b/pdm/resolver/providers.py @@ -31,7 +31,7 @@ class BaseProvider(AbstractProvider): - Editable requirements are preferered. - File links are preferred. - - The one with narrower specifierset is perferred. + - The one with narrower specifierset is preferred. """ editable = requirement.editable is_file = requirement.is_file_or_url diff --git a/tests/conftest.py b/tests/conftest.py index 0d2cf263..74bce5fc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -282,7 +282,7 @@ def copytree(src: Path, dst: Path) -> None: @pytest.fixture() def fixture_project(project_no_init): - """Initailize a project from a fixture project""" + """Initialize a project from a fixture project""" def func(project_name): source = FIXTURES / "projects" / project_name diff --git a/tests/fixtures/projects/demo-parent-package/README.md b/tests/fixtures/projects/demo-parent-package/README.md index a5e45504..000cfa45 100644 --- a/tests/fixtures/projects/demo-parent-package/README.md +++ b/tests/fixtures/projects/demo-parent-package/README.md @@ -1 +1 @@ -# Pacakge Package +# Package Package -- GitLab