Skip to content

Commit

Permalink
test: Fix flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
danigm committed Sep 26, 2024
1 parent 186f230 commit 9970e36
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 36 deletions.
2 changes: 0 additions & 2 deletions rpmlint/checks/DocCheck.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from pathlib import Path
import stat

import rpm
from rpmlint.checks.AbstractCheck import AbstractCheck
from rpmlint.helpers import byte_to_string


class DocCheck(AbstractCheck):
Expand Down
2 changes: 2 additions & 0 deletions test/mockdata/mock_doc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import stat

import rpm

from Testing import get_tested_mock_package


Expand Down
2 changes: 0 additions & 2 deletions test/mockdata/mock_logrotate.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import stat

from rpm import RPMFILE_CONFIG, RPMFILE_NOREPLACE

from Testing import get_tested_mock_package


Expand Down
2 changes: 1 addition & 1 deletion test/test_binaries.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from mockdata.mock_pkgconfig import LibReiserFSCoreDevelPackage
import pytest
from rpmlint.checks.BinariesCheck import BinariesCheck
from rpmlint.filter import Filter

Expand Down
2 changes: 1 addition & 1 deletion test/test_build_date.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re

from mockdata.mock_build_date import BuildDatePackage
from mockdata.mock_bashisms import BashismsPackage
from mockdata.mock_build_date import BuildDatePackage
import pytest
from rpmlint.checks.BuildRootAndDateCheck import BuildRootAndDateCheck
from rpmlint.filter import Filter
Expand Down
6 changes: 3 additions & 3 deletions test/test_doc.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import pytest
from mockdata.mock_doc import (
MyDocPackage,
DocFileDependencyPackage,
InstallFileInDocPackage,
MyDocPackage,
)
import pytest
from rpmlint.checks.DocCheck import DocCheck
from rpmlint.filter import Filter

from Testing import CONFIG, get_tested_package
from Testing import CONFIG


@pytest.fixture(scope='function', autouse=True)
Expand Down
36 changes: 18 additions & 18 deletions test/test_files.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import re

from mockdata.mock_files import (
UnexpandedMacroFilesPackage,
Python3PowerPackage,
Python3PowerBrokenPackage,
TestDocumentationPackage,
NetmaskDebugsourcePackage,
MakefileJunkPackage,
SphinxInvPackage,
FileChecksPackage,
TclPackage,
RustFilesPackage,
ManPagesPackage,
DevelopmentPackage,
Shlib1Package,
Shlib2DevelPackage,
FileZeroLengthPackage,
ManualPagesPackage,
PythonShebangLinkPackage,
PythonShebangLinkOkPackage,
DirectoryWithoutXPermPackage,
DirectoryWithoutXPerm2Package,
DirectoryWithoutXPermPackage,
FileChecksPackage,
FilesWithoutPermsPackage,
FilesWithoutPermsTmpfilesPackage,
FileZeroLengthPackage,
MakefileJunkPackage,
ManPagesPackage,
ManualPagesPackage,
NetmaskDebugsourcePackage,
Python3PowerBrokenPackage,
Python3PowerPackage,
PythonShebangLinkOkPackage,
PythonShebangLinkPackage,
RustFilesPackage,
Shlib1Package,
Shlib2DevelPackage,
SphinxInvPackage,
TclPackage,
TestDocumentationPackage,
UnexpandedMacroFilesPackage,
)
import pytest
from rpmlint.checks.FilesCheck import FilesCheck
Expand Down
2 changes: 1 addition & 1 deletion test/test_i18n.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from mockdata.mock_i18n import InvalidI18NPackage, I18NPackage
from mockdata.mock_i18n import I18NPackage, InvalidI18NPackage
import pytest
from rpmlint.checks.I18NCheck import I18NCheck
from rpmlint.filter import Filter
Expand Down
4 changes: 2 additions & 2 deletions test/test_logrotate.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import pytest
from mockdata.mock_logrotate import LogrotatePackage
import pytest
from rpmlint.checks.LogrotateCheck import LogrotateCheck
from rpmlint.filter import Filter

from Testing import CONFIG, get_tested_package
from Testing import CONFIG


@pytest.fixture(scope='function', autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion test/test_menuxdg.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from mockdata.mock_menuxdg import (
MenuXDGInvalidPackage,
MenuXDGBadBinPackage,
MenuXDGBadDupPackage,
MenuXDGBadSecPackage,
MenuXDGBadUTF8Package,
MenuXDGInvalidPackage,
MenuXDGPackage,
)
import pytest
Expand Down
2 changes: 1 addition & 1 deletion test/test_pkgconfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from mockdata.mock_pkgconfig import PCPackage, LibReiserFSCoreDevelPackage
from mockdata.mock_pkgconfig import LibReiserFSCoreDevelPackage, PCPackage
import pytest
from rpmlint.checks.PkgConfigCheck import PkgConfigCheck
from rpmlint.filter import Filter
Expand Down
2 changes: 1 addition & 1 deletion test/test_shlib_policy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from mockdata.mock_shlib_policy import (
LibslpMissingSuffixPackage,
Libslp1234Package,
LibslpMissingSuffixPackage,
Libtest1Package,
)
import pytest
Expand Down
4 changes: 2 additions & 2 deletions test/test_tmp_files.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from mockdata.mock_tmp_files import (
TempfiledPackage,
SystemdTempfilesPackage,
SystemdTempfilesOkPackage,
SystemdTempfilesPackage,
TempfiledPackage,
)
import pytest
from rpmlint.checks.TmpFilesCheck import TmpFilesCheck
Expand Down
2 changes: 1 addition & 1 deletion test/test_zypp_syntax.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from mockdata.mock_zypp_syntax import (
SyntaxPackageandPackage,
SyntaxAndPackage,
SyntaxPackageandPackage,
)
import pytest
from rpmlint.checks.ZyppSyntaxCheck import ZyppSyntaxCheck
Expand Down

0 comments on commit 9970e36

Please sign in to comment.