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

More type fixes #361

Merged
merged 3 commits into from
May 22, 2022
Merged
Changes from 1 commit
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
Next Next commit
a couple of type generics missed last time
  • Loading branch information
dimbleby committed May 21, 2022
commit 460cfa5f6f0e62af41e0937901cbda527888701c
4 changes: 2 additions & 2 deletions src/poetry/core/packages/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,14 +526,14 @@ def with_python_versions(self, python_versions: str) -> Iterator[None]:

self.python_versions = original_python_versions

def with_features(self, features: Iterable[str]) -> Package:
def with_features(self: T, features: Iterable[str]) -> T:
package = self.clone()

package._features = frozenset(features)

return package

def without_features(self) -> Package:
def without_features(self: T) -> T:
return self.with_features([])

def clone(self: T) -> T:
Expand Down