Skip to content

Commit 6447308

Browse files
committed
Lint Fixes
1 parent 35f3869 commit 6447308

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

cppython/plugins/conan/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __str__(self) -> str:
5555
return version
5656

5757
@classmethod
58-
def from_string(cls, version_str: str) -> 'ConanVersion':
58+
def from_string(cls, version_str: str) -> ConanVersion:
5959
"""Parse a version string into a ConanVersion."""
6060
if '-' in version_str:
6161
version_part, prerelease = version_str.split('-', 1)
@@ -219,7 +219,7 @@ def requires(self) -> str:
219219
return result
220220

221221
@classmethod
222-
def from_conan_reference(cls, reference: str) -> 'ConanDependency':
222+
def from_conan_reference(cls, reference: str) -> ConanDependency:
223223
"""Parse a Conan reference string into a ConanDependency.
224224
225225
Examples:

cppython/test/pytest/mixins.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def fixture_provider_type(plugin_type: type[T]) -> type[T]:
193193

194194
@staticmethod
195195
@pytest.fixture(name='generator_type', scope='session')
196-
def fixture_generator_type(request: 'pytest.FixtureRequest') -> type[Generator]:
196+
def fixture_generator_type(request: pytest.FixtureRequest) -> type[Generator]:
197197
"""Provide generator variants for cross-plugin testing
198198
199199
Args:
@@ -207,7 +207,7 @@ def fixture_generator_type(request: 'pytest.FixtureRequest') -> type[Generator]:
207207

208208
@staticmethod
209209
@pytest.fixture(name='scm_type', scope='session')
210-
def fixture_scm_type(request: 'pytest.FixtureRequest') -> type[SCM]:
210+
def fixture_scm_type(request: pytest.FixtureRequest) -> type[SCM]:
211211
"""Provide SCM variants for cross-plugin testing
212212
213213
Args:
@@ -252,7 +252,7 @@ def fixture_plugin_group_data(
252252
# Cross-plugin testing fixtures for ensuring compatibility
253253
@staticmethod
254254
@pytest.fixture(name='provider_type', scope='session')
255-
def fixture_provider_type(request: 'pytest.FixtureRequest') -> type[Provider]:
255+
def fixture_provider_type(request: pytest.FixtureRequest) -> type[Provider]:
256256
"""Provide provider variants for cross-plugin testing
257257
258258
Args:
@@ -279,7 +279,7 @@ def fixture_generator_type(plugin_type: type[T]) -> type[T]:
279279

280280
@staticmethod
281281
@pytest.fixture(name='scm_type', scope='session')
282-
def fixture_scm_type(request: 'pytest.FixtureRequest') -> type[SCM]:
282+
def fixture_scm_type(request: pytest.FixtureRequest) -> type[SCM]:
283283
"""Provide SCM variants for cross-plugin testing
284284
285285
Args:
@@ -324,7 +324,7 @@ def fixture_plugin_group_data(
324324
# Cross-plugin testing fixtures for ensuring compatibility
325325
@staticmethod
326326
@pytest.fixture(name='provider_type', scope='session')
327-
def fixture_provider_type(request: 'pytest.FixtureRequest') -> type[Provider]:
327+
def fixture_provider_type(request: pytest.FixtureRequest) -> type[Provider]:
328328
"""Provide provider variants for cross-plugin testing
329329
330330
Args:
@@ -338,7 +338,7 @@ def fixture_provider_type(request: 'pytest.FixtureRequest') -> type[Provider]:
338338

339339
@staticmethod
340340
@pytest.fixture(name='generator_type', scope='session')
341-
def fixture_generator_type(request: 'pytest.FixtureRequest') -> type[Generator]:
341+
def fixture_generator_type(request: pytest.FixtureRequest) -> type[Generator]:
342342
"""Provide generator variants for cross-plugin testing
343343
344344
Args:

tests/unit/core/test_plugin_schema.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,7 @@ def test_sync_flow(self) -> None:
107107
types = consumer.sync_types()
108108

109109
for test in types:
110-
if producer.supported_sync_type(test) and (data := producer.sync_data(consumer)):
111-
consumer.sync(data)
110+
if producer.supported_sync_type(test):
111+
data = producer.sync_data(consumer)
112+
if data:
113+
consumer.sync(data)

0 commit comments

Comments
 (0)