Skip to content

Commit 763066e

Browse files
committed
Add fix for runngin stream_generator
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
1 parent c9d7e08 commit 763066e

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: black
1010
language_version: python3.6
1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v2.2.3
12+
rev: v5.0.0
1313
hooks:
1414
- id: check-added-large-files
1515
- id: check-ast
@@ -19,12 +19,8 @@ repos:
1919
exclude: tests/integration/conftest.py
2020
- id: end-of-file-fixer
2121
- id: trailing-whitespace
22-
- id: flake8
23-
args:
24-
- --max-line-length=100
25-
- --per-file-ignores=files/packit.wsgi:F401,E402
2622
- repo: https://github.com/pre-commit/mirrors-mypy
27-
rev: v0.711
23+
rev: v1.2.0
2824
hooks:
2925
- id: mypy
3026
args: [--no-strict-optional, --ignore-missing-imports]

ocp-stream-generator/ocp_stream_generator/stream_generator.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,16 @@
2626
import yaml
2727
import json
2828
import sys
29-
from distribution_data import abbreviations, images, latest_description
29+
30+
from pathlib import Path
31+
32+
sys.path.append(str(Path(__file__).parent.parent.absolute()))
33+
34+
from ocp_stream_generator.distribution_data import (
35+
abbreviations,
36+
images,
37+
latest_description,
38+
)
3039

3140

3241
class YamlLoader:

ocp-stream-generator/tests/test_imagestream_file.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python3
22

3-
43
from ocp_stream_generator.stream_generator import ImagestreamFile
54

65

0 commit comments

Comments
 (0)