Skip to content

Commit 7e7b5de

Browse files
Fix F841 and E127 linting errors: remove unused _app assignments and fix continuation line indentation
1 parent 9236e0a commit 7e7b5de

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/tests/ContentProcessorWorkflow/libs/test_application_base_extended.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_initialization_with_app_config_endpoint(self, tmp_path, monkeypatch):
8181
mock_app_config_instance = Mock()
8282
mock_app_config.return_value = mock_app_config_instance
8383

84-
_app = ConcreteApplication(env_file_path=str(env_file))
84+
ConcreteApplication(env_file_path=str(env_file))
8585

8686
mock_app_config.assert_called_once()
8787
mock_app_config_instance.read_and_set_environmental_variables.assert_called_once()
@@ -101,7 +101,7 @@ def test_initialization_with_logging_enabled(self, tmp_path, monkeypatch):
101101

102102
mock_cred.return_value = Mock()
103103

104-
_app = ConcreteApplication(env_file_path=str(env_file))
104+
ConcreteApplication(env_file_path=str(env_file))
105105

106106
# Verify logging was configured
107107
mock_logging.assert_called_once()
@@ -122,7 +122,7 @@ def test_initialization_without_logging(self, tmp_path, monkeypatch):
122122

123123
mock_cred.return_value = Mock()
124124

125-
_app = ConcreteApplication(env_file_path=str(env_file))
125+
ConcreteApplication(env_file_path=str(env_file))
126126

127127
# Verify logging was NOT configured
128128
mock_logging.assert_not_called()
@@ -158,7 +158,7 @@ def test_load_env_with_explicit_path(self, tmp_path):
158158
patch('libs.base.application_base.AgentFrameworkSettings'), \
159159
patch('libs.base.application_base.load_dotenv') as mock_load_dotenv:
160160

161-
_app = ConcreteApplication(env_file_path=str(env_file))
161+
ConcreteApplication(env_file_path=str(env_file))
162162

163163
# Verify load_dotenv was called at least once
164164
assert mock_load_dotenv.call_count >= 1
@@ -257,7 +257,7 @@ def test_empty_app_config_endpoint_skipped(self, tmp_path, monkeypatch):
257257
patch('libs.base.application_base.AppConfigurationHelper') as mock_app_config, \
258258
patch('libs.base.application_base.AgentFrameworkSettings'):
259259

260-
_app = ConcreteApplication(env_file_path=str(env_file))
260+
ConcreteApplication(env_file_path=str(env_file))
261261

262262
# AppConfigurationHelper should not be called with empty endpoint
263263
mock_app_config.assert_not_called()

src/tests/ContentProcessorWorkflow/libs/test_final_80_percent_push.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_get_azure_credential_with_all_env_vars(self):
221221
'AZURE_TENANT_ID': 'test-tenant-id',
222222
'AZURE_CLIENT_SECRET': 'test-secret'
223223
}), \
224-
patch('utils.credential_util.DefaultAzureCredential') as mock_cred:
224+
patch('utils.credential_util.DefaultAzureCredential') as mock_cred:
225225

226226
mock_cred.return_value = Mock()
227227

src/tests/ContentProcessorWorkflow/libs/test_push_to_80_percent.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def run(self):
2626
mock_env_config.return_value.app_config_endpoint = ""
2727

2828
# Test with explicit path
29-
_app = TestApp(env_file_path="/custom/path/.env")
29+
TestApp(env_file_path="/custom/path/.env")
3030

3131
# Should have loaded from explicit path
3232
mock_load_dotenv.assert_called_with(dotenv_path="/custom/path/.env")
@@ -53,7 +53,7 @@ def run(self):
5353
mock_env_config.return_value.app_config_endpoint = "https://myconfig.azconfig.io"
5454
mock_config.return_value.app_logging_enable = False
5555

56-
_app = TestApp()
56+
TestApp()
5757

5858
# Should have created AppConfigurationHelper
5959
assert mock_app_config.called
@@ -85,7 +85,7 @@ def run(self):
8585
config_instance.app_logging_level = "DEBUG"
8686
mock_config.return_value = config_instance
8787

88-
_app = TestApp()
88+
TestApp()
8989

9090
# Should have configured logging
9191
mock_logging.assert_called_once()
@@ -120,7 +120,7 @@ def test_validate_azure_authentication_azure_hosted(self):
120120
'WEBSITE_SITE_NAME': 'my-webapp',
121121
'MSI_ENDPOINT': 'http://localhost:8081/msi/token'
122122
}), \
123-
patch('utils.credential_util.get_azure_credential') as mock_get_cred:
123+
patch('utils.credential_util.get_azure_credential') as mock_get_cred:
124124

125125
mock_get_cred.return_value = Mock()
126126

@@ -139,7 +139,7 @@ def test_validate_azure_authentication_with_client_id(self):
139139
'AZURE_CLIENT_ID': 'client-id-123',
140140
'IDENTITY_ENDPOINT': 'http://localhost:8081/token'
141141
}), \
142-
patch('utils.credential_util.get_azure_credential') as mock_get_cred:
142+
patch('utils.credential_util.get_azure_credential') as mock_get_cred:
143143

144144
mock_get_cred.return_value = Mock()
145145

src/tests/ContentProcessorWorkflow/libs/test_ultra_focused_80.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def run(self):
101101
mock_config.return_value.app_logging_enable = False
102102

103103
# Create app with no explicit env path
104-
_app = TestApp()
104+
TestApp()
105105

106106
# Should have called load_dotenv
107107
assert mock_load.called
@@ -118,7 +118,7 @@ def test_validate_authentication_with_kubernetes(self):
118118
'KUBERNETES_SERVICE_HOST': 'kubernetes.default.svc',
119119
'IDENTITY_ENDPOINT': 'http://169.254.169.254/metadata/identity'
120120
}), \
121-
patch('utils.credential_util.get_azure_credential') as mock_cred:
121+
patch('utils.credential_util.get_azure_credential') as mock_cred:
122122

123123
mock_cred.return_value = Mock()
124124

0 commit comments

Comments
 (0)