File tree Expand file tree Collapse file tree
pipenv/patched/pip/_internal/models
tasks/vendoring/patches/patched Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import os
44import posixpath
55import urllib .parse
6- from dataclasses import dataclass , field
6+ from dataclasses import dataclass
77
88from pipenv .patched .pip ._vendor .packaging .utils import canonicalize_name
99
1414logger = logging .getLogger (__name__ )
1515
1616
17- @dataclass (frozen = True )
17+ @dataclass (frozen = True , slots = True )
1818class SearchScope :
1919 """
2020 Encapsulates the locations that pip is configured to search.
2121 """
2222
23- __slots__ = [
24- "find_links" ,
25- "index_urls" ,
26- "no_index" ,
27- "index_lookup" ,
28- "index_restricted" ,
29- ]
30-
3123 find_links : list [str ]
3224 index_urls : list [str ]
3325 no_index : bool
34- index_lookup : dict [str , list [str ]] | None = field ( default = None )
35- index_restricted : bool = field ( default = False )
26+ index_lookup : dict [str , list [str ]] | None = None
27+ index_restricted : bool = False
3628
3729 @classmethod
3830 def create (
Original file line number Diff line number Diff line change @@ -39,34 +39,23 @@ diff --git a/pipenv/patched/pip/_internal/models/search_scope.py b/pipenv/patche
3939index 136163ca0..a41193a6e 100644
4040--- a/pipenv/patched/pip/_internal/models/search_scope.py
4141+++ b/pipenv/patched/pip/_internal/models/search_scope.py
42- @@ -1,6 +1,6 @@
43- import itertools
44- import logging
45- import os
46- import posixpath
47- import urllib.parse
48- - from dataclasses import dataclass
49- + from dataclasses import dataclass, field
42+ @@ -17,14 +17,13 @@ logger = logging.getLogger(__name__)
5043
51- from pip._vendor.packaging.utils import canonicalize_name
52- @@ -20,11 +20,19 @@ class SearchScope:
44+
45+ - @dataclass(frozen=True)
46+ + @dataclass(frozen=True, slots=True)
47+ class SearchScope:
48+ """
5349 Encapsulates the locations that pip is configured to search.
5450 """
5551
5652- __slots__ = ["find_links", "index_urls", "no_index"]
57- + __slots__ = [
58- + "find_links",
59- + "index_urls",
60- + "no_index",
61- + "index_lookup",
62- + "index_restricted",
63- + ]
64-
53+ -
6554 find_links: list[str]
6655 index_urls: list[str]
6756 no_index: bool
68- + index_lookup: dict[str, list[str]] | None = field(default= None)
69- + index_restricted: bool = field(default= False)
57+ + index_lookup: dict[str, list[str]] | None = None
58+ + index_restricted: bool = False
7059
7160 @classmethod
7261 def create(
You can’t perform that action at this time.
0 commit comments