Skip to content

Commit 8f6cc2e

Browse files
committed
Black/isort formatting
1 parent 8ac805e commit 8f6cc2e

File tree

5 files changed

+12
-18
lines changed

5 files changed

+12
-18
lines changed

alws/crud/build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import typing
33

44
import redis.asyncio as aioredis
5-
65
import sqlalchemy
76
from sqlalchemy import delete
87
from sqlalchemy.ext.asyncio import AsyncSession

alws/routers/builds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import typing
22

3+
import redis.asyncio as aioredis
34
from fastapi import APIRouter, Depends, HTTPException, status
45
from fastapi_sqla import AsyncSessionDependency
5-
import redis.asyncio as aioredis
66
from sqlalchemy.ext.asyncio import AsyncSession
77

88
from alws import models

alws/schemas/build_schema.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import urllib.parse
88

99
import aiohttp.client_exceptions
10+
import redis.asyncio as aioredis
1011
from pydantic import (
1112
AfterValidator,
1213
AnyHttpUrl,
@@ -16,8 +17,6 @@
1617
)
1718
from typing_extensions import Annotated
1819

19-
import redis.asyncio as aioredis
20-
2120
from alws import models
2221
from alws.config import settings
2322
from alws.constants import BuildTaskRefType
@@ -127,9 +126,7 @@ class BuildCreatePlatforms(BaseModel):
127126

128127
class BuildCreate(BaseModel):
129128
platforms: conlist(BuildCreatePlatforms, min_length=1)
130-
tasks: conlist(
131-
typing.Union[BuildTaskRef, BuildTaskModuleRef], min_length=1
132-
)
129+
tasks: conlist(typing.Union[BuildTaskRef, BuildTaskModuleRef], min_length=1)
133130
linked_builds: typing.List[int] = []
134131
mock_options: typing.Optional[typing.Dict[str, typing.Any]] = None
135132
platform_flavors: typing.Optional[typing.List[int]] = None

alws/scripts/git_cacher/git_cacher.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ async def run(config, logger, redis_client, gitea_client, organization):
8585
cache_record['tags'] = [tag['name'] for tag in result['tags']]
8686
if organization == 'autopatch':
8787
cache_record['branches'] = [
88-
branch for branch in result['branches']
88+
branch
89+
for branch in result['branches']
8990
if not branch['name'].endswith('-deprecated')
9091
]
9192

@@ -121,7 +122,7 @@ async def main():
121122
run(config, logger, redis_client, gitea_client, 'autopatch'),
122123
)
123124
logger.info(
124-
f'Cache has been updated, waiting for {wait} sec for next update'
125+
'Cache has been updated, waiting for %d secs for next update' % wait
125126
)
126127
await asyncio.sleep(wait)
127128

alws/utils/modularity.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99

1010
import aiohttp
1111
import gi
12+
import redis.asyncio as aioredis
1213
import requests
1314
import yaml
14-
1515
from pydantic import BaseModel
16-
import redis.asyncio as aioredis
1716

1817
gi.require_version("Modulemd", "2.0")
1918
from gi.repository import Modulemd
2019

2120
from alws.scripts.git_cacher.git_cacher import Config as GitCacherConfig
2221
from alws.scripts.git_cacher.git_cacher import load_redis_cache
2322

23+
2424
def calc_dist_macro(
2525
module_name: str,
2626
module_stream: str,
@@ -45,10 +45,9 @@ async def get_modified_refs_list(
4545

4646
cache = await load_redis_cache(redis, config.git_cache_keys['autopatch'])
4747
package_list = [
48-
repo['name'] for repo in cache.values()
49-
if any(
50-
branch.startswith(dist_prefix) for branch in repo['branches']
51-
)
48+
repo['name']
49+
for repo in cache.values()
50+
if any(branch.startswith(dist_prefix) for branch in repo['branches'])
5251
]
5352
return package_list
5453

@@ -251,9 +250,7 @@ def add_module_dependencies_from_mock_defs(self, enabled_modules: dict):
251250
if stream:
252251
new_deps.add_runtime_stream(name, stream)
253252
else:
254-
new_deps.set_empty_runtime_dependencies_for_module(
255-
name
256-
)
253+
new_deps.set_empty_runtime_dependencies_for_module(name)
257254

258255
for module in old_runtime:
259256
if module == "platform":

0 commit comments

Comments
 (0)