File tree Expand file tree Collapse file tree
vortex-python/python/vortex Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,13 +130,13 @@ class LocalStore:
130130 ```
131131 """
132132
133- def __init__ (
133+ def __new__ (
134134 self ,
135135 prefix : str | Path | None = None ,
136136 * ,
137137 automatic_cleanup : bool = False ,
138138 mkdir : bool = False ,
139- ) -> None :
139+ ) -> Self :
140140 """Create a new LocalStore.
141141
142142 Args:
Original file line number Diff line number Diff line change @@ -457,8 +457,8 @@ class S3Store:
457457 set in the environment.
458458 """
459459
460- def __init__ ( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "bucket"
461- self ,
460+ def __new__ ( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "bucket"
461+ cls ,
462462 bucket : str | None = None ,
463463 * ,
464464 prefix : str | None = None ,
@@ -467,7 +467,7 @@ class S3Store:
467467 retry_config : RetryConfig | None = None ,
468468 credential_provider : S3CredentialProvider | None = None ,
469469 ** kwargs : Unpack [S3Config ], # type: ignore # noqa: PGH003 (bucket key overlaps with positional arg)
470- ) -> None :
470+ ) -> Self :
471471 """Create a new S3Store.
472472
473473 Args:
Original file line number Diff line number Diff line change @@ -315,8 +315,8 @@ class AzureStore:
315315 [`AzureConfig`][vortex.store.AzureConfig] for valid environment variables.
316316 """
317317
318- def __init__ ( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "container_name"
319- self ,
318+ def __new__ ( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "container_name"
319+ cls ,
320320 container_name : str | None = None ,
321321 * ,
322322 prefix : str | None = None ,
@@ -325,7 +325,7 @@ class AzureStore:
325325 retry_config : RetryConfig | None = None ,
326326 credential_provider : AzureCredentialProvider | None = None ,
327327 ** kwargs : Unpack [AzureConfig ], # type: ignore # noqa: PGH003 (container_name key overlaps with positional arg)
328- ) -> None :
328+ ) -> Self :
329329 """Construct a new AzureStore.
330330
331331 Args:
Original file line number Diff line number Diff line change @@ -134,8 +134,8 @@ class GCSStore:
134134 [here](https://cloud.google.com/docs/authentication/application-default-credentials).
135135 """
136136
137- def __init__ ( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "bucket"
138- self ,
137+ def __new__ ( # type: ignore[misc] # Overlap between argument names and ** TypedDict items: "bucket"
138+ cls ,
139139 bucket : str | None = None ,
140140 * ,
141141 prefix : str | None = None ,
@@ -144,7 +144,7 @@ class GCSStore:
144144 retry_config : RetryConfig | None = None ,
145145 credential_provider : GCSCredentialProvider | None = None ,
146146 ** kwargs : Unpack [GCSConfig ], # type: ignore # noqa: PGH003 (bucket key overlaps with positional arg)
147- ) -> None :
147+ ) -> Self :
148148 """Construct a new GCSStore.
149149
150150 Args:
Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ from ._retry import RetryConfig
99class HTTPStore :
1010 """Configure a connection to a generic HTTP server."""
1111
12- def __init__ (
12+ def __new__ (
1313 self ,
1414 url : str ,
1515 * ,
1616 client_options : ClientConfig | None = None ,
1717 retry_config : RetryConfig | None = None ,
18- ) -> None :
18+ ) -> Self :
1919 """Construct a new HTTPStore from a URL.
2020
2121 Any path on the URL will be assigned as the `prefix` for the store. So if you
Original file line number Diff line number Diff line change @@ -116,13 +116,13 @@ def from_url( # type: ignore[misc] # docstring in pyi file
116116 kwargs: per-store configuration passed down to store-specific builders.
117117
118118 """
119- return _store .from_url (
119+ return _store .from_url ( # pyright: ignore[reportCallIssue, reportUnknownVariableType]
120120 url ,
121- config = config ,
121+ config = config , # pyright: ignore[reportArgumentType]
122122 client_options = client_options ,
123123 retry_config = retry_config ,
124- credential_provider = credential_provider ,
125- ** kwargs ,
124+ credential_provider = credential_provider , # pyright: ignore[reportArgumentType]
125+ ** kwargs , # pyright: ignore[reportArgumentType]
126126 )
127127
128128
Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ def __new__(
439439 retry_config : RetryConfig | None = None ,
440440 credential_provider : S3CredentialProvider | None = None ,
441441 ** kwargs : Unpack [S3Config ], # pyright: ignore[reportGeneralTypeIssues]
442- ):
442+ ) -> Self :
443443 """Create a new S3Store.
444444
445445 Args:
@@ -459,15 +459,15 @@ def __new__(
459459 S3Store
460460
461461 """
462- return super ().__new__ (
462+ return super ().__new__ ( # pyright: ignore[reportUnknownVariableType]
463463 cls ,
464464 bucket ,
465465 prefix = prefix ,
466466 config = config ,
467467 client_options = client_options ,
468468 retry_config = retry_config ,
469469 credential_provider = credential_provider ,
470- ** kwargs , # pyright: ignore[reportCallIssue]
470+ ** kwargs , # pyright: ignore[reportCallIssue] bucket appears in both S3Config and explicitly above
471471 )
472472
473473 @override
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ def __new__( # type: ignore[misc] # Overlap between argument names and ** Typed
274274 retry_config : RetryConfig | None = None ,
275275 credential_provider : AzureCredentialProvider | None = None ,
276276 ** kwargs : Unpack [AzureConfig ], # pyright: ignore[reportGeneralTypeIssues]
277- ):
277+ ) -> Self :
278278 """Construct a new AzureStore.
279279
280280 Args:
@@ -294,7 +294,7 @@ def __new__( # type: ignore[misc] # Overlap between argument names and ** Typed
294294 AzureStore
295295
296296 """
297- return super ().__new__ (
297+ return super ().__new__ ( # pyright: ignore[reportUnknownVariableType]
298298 cls ,
299299 container_name ,
300300 prefix = prefix ,
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ def __new__( # type: ignore[misc] # Overlap between argument names and ** Typed
118118 retry_config : RetryConfig | None = None ,
119119 credential_provider : GCSCredentialProvider | None = None ,
120120 ** kwargs : Unpack [GCSConfig ], # pyright: ignore[reportGeneralTypeIssues]
121- ):
121+ ) -> Self :
122122 """Construct a new GCSStore.
123123
124124 Args:
@@ -138,7 +138,7 @@ def __new__( # type: ignore[misc] # Overlap between argument names and ** Typed
138138 GCSStore
139139
140140 """
141- return super ().__new__ ( # type : ignore[misc] # Overlap between argument names and ** TypedDict items: "bucket"
141+ return super ().__new__ ( # pyright : ignore[reportUnknownVariableType]
142142 cls ,
143143 bucket ,
144144 prefix = prefix ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def __new__(
2727 * ,
2828 automatic_cleanup : bool = False ,
2929 mkdir : bool = False ,
30- ):
30+ ) -> Self :
3131 """Create a new LocalStore.
3232
3333 Args:
You can’t perform that action at this time.
0 commit comments