提交 71226043 编写于 作者: T Timothée Mazzucotelli

Fix spelling

上级 34e9ef09
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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.
......
......@@ -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")
......
......@@ -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]
......
......@@ -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"""
......
......@@ -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
"""
......
......@@ -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(
......
......@@ -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__(
......
......@@ -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
......
......@@ -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
......
# 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
......
......@@ -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",
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册