Skip to content

Commit b45e8c8

Browse files
committed
linter
1 parent 180601d commit b45e8c8

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/datacustomcode/client.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,23 @@ def __new__(
167167
raise ValueError(
168168
"Proxy config is required when reader is built from config"
169169
)
170+
assert (
171+
spark is not None
172+
) # set in "reader is None or writer is None" branch
173+
assert config.reader_config is not None # ensured by branch condition
170174
proxy_init = config.proxy_config.to_object(spark)
171175

172-
reader_init = config.reader_config.to_object(spark) # type: ignore
176+
reader_init = config.reader_config.to_object(spark)
173177
else:
174178
reader_init = reader
175179
if proxy is not None:
176180
proxy_init = proxy
177181
elif config.proxy_config is None:
178182
raise ValueError("Proxy config is required when reader is provided")
179183
else:
184+
assert (
185+
spark is not None
186+
) # set in "both provided; proxy from config" branch
180187
proxy_init = config.proxy_config.to_object(spark)
181188
if config.writer_config is None and writer is None:
182189
raise ValueError(
@@ -185,7 +192,9 @@ def __new__(
185192
elif writer is None or (
186193
config.writer_config is not None and config.writer_config.force
187194
):
188-
writer_init = config.writer_config.to_object(spark) # type: ignore
195+
assert spark is not None # set when reader or writer from config
196+
assert config.writer_config is not None # ensured by branch condition
197+
writer_init = config.writer_config.to_object(spark)
189198
else:
190199
writer_init = writer
191200
cls._instance._reader = reader_init

src/datacustomcode/credentials.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ def from_available(cls, profile: str = "default") -> Credentials:
192192
Raises:
193193
ValueError: If no credentials are found in any source
194194
"""
195-
# print(f"Chuy profile: {profile}")
196-
197195
# Check environment variables first
198196
if os.environ.get("SFDC_LOGIN_URL"):
199197
logger.debug("Loading credentials from environment variables")

0 commit comments

Comments
 (0)