Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: reformat for black 23.1.0 #4029

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-devel.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
astroid==2.13.2
attrs==22.2.0
black==22.12.0
black==23.1.0
cachetools==5.2.0
catkin-pkg==0.5.2
certifi==2022.9.24
Expand Down
1 change: 0 additions & 1 deletion snapcraft/elf/_elf_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def __init__(
arch_tuple: _ElfArchitectureTuple,
soname_cache: SonameCache,
) -> None:

self.soname = soname
self.soname_path = soname_path
self.search_paths = search_paths
Expand Down
1 change: 0 additions & 1 deletion snapcraft/linters/linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def _ignore_matching_filenames(
return

for issue in issues:

files = lint.ignored_files(issue.name)
for pattern in files:
if (
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy/fake_servers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def __init__(self, server_address):


class FakePartsRequestHandler(BaseHTTPRequestHandler):

_date_format = "%a, %d %b %Y %H:%M:%S GMT"
_parts_date = datetime(2016, 7, 7, 10, 0, 20)

Expand Down Expand Up @@ -244,7 +243,6 @@ def __init__(self, fake_store, server_address):


class FakeSSORequestHandler(BaseHTTPRequestHandler):

_API_PATH = "/api/v2/"

def do_POST(self):
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/fake_servers/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@


class FakeStoreAPIServer(base.BaseFakeServer):

_DEV_API_PATH = "/dev/api/"
_V2_DEV_API_PATH = "/api/v2/snaps/"

Expand Down
1 change: 0 additions & 1 deletion tests/legacy/fake_servers/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@


class FakeStoreSearchServer(base.BaseFakeServer):

# XXX This fake server as reused as download server, to avoid passing a
# port as an argument. --elopio - 2016-05-01

Expand Down
1 change: 0 additions & 1 deletion tests/legacy/fake_servers/snapd.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


class FakeSnapdRequestHandler(fake_servers.BaseHTTPRequestHandler):

snaps_result = [] # type: List[Dict[str, Any]]
snap_details_func = None
find_result = [] # type: List[Dict[str, Any]]
Expand Down
7 changes: 0 additions & 7 deletions tests/legacy/fixture_setup/_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,22 +292,18 @@ def _stop_fake_server(self, thread):


class FakePartsWikiOriginRunning(FakeServerRunning):

fake_server = fake_servers.FakePartsWikiOriginServer


class FakePartsWikiRunning(FakeServerRunning):

fake_server = fake_servers.FakePartsWikiServer


class FakePartsWikiWithSlashesRunning(FakeServerRunning):

fake_server = fake_servers.FakePartsWikiWithSlashesServer


class FakePartsServerRunning(FakeServerRunning):

fake_server = fake_servers.FakePartsServer


Expand All @@ -318,7 +314,6 @@ def __init__(self, fake_store):


class FakeStoreUploadServerRunning(FakeServerRunning):

fake_server = upload.FakeStoreUploadServer


Expand All @@ -329,7 +324,6 @@ def __init__(self, fake_store):


class FakeStoreSearchServerRunning(FakeServerRunning):

fake_server = search.FakeStoreSearchServer


Expand Down Expand Up @@ -658,7 +652,6 @@ def setUp(self) -> None:


class FakeBaseEnvironment(fixtures.Fixture):

_LINKER_FOR_ARCH = dict(
armv7l="lib/ld-linux-armhf.so.3",
aarch64="lib/ld-linux-aarch64.so.1",
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy/unit/build_providers/multipass/test_multipass.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ def test_destroy_instance_with_stop_delay_invalid(self):


class TestMultipassWithBases:

scenarios = (
("linux", dict(base="core20", expected_image="snapcraft:core20")),
("linux", dict(base="core18", expected_image="snapcraft:core18")),
Expand Down Expand Up @@ -525,7 +524,6 @@ def test_lifecycle(
def test_mount_prime_directory(
self, xdg_dirs, in_snap, snap_injector, multipass_cmd, base, expected_image
):

with MultipassTestImpl(
project=get_project(base), echoer=mock.Mock(), is_ephemeral=False
) as instance:
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/build_providers/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


class TestErrorFormatting:

scenarios = [
(
"ProviderNotSupportedError",
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/cache/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


class TestFileCache:

scenarios = [
("sha384", dict(algo="sha384")),
("md5", dict(algo="md5")),
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/cli/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@


class SnapcraftTError(snapcraft_legacy.internal.errors.SnapcraftError):

fmt = "{message}"

def __init__(self, message):
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/commands/test_build_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@


class LifecycleCommandsBaseTestCase(CommandBaseTestCase):

yaml_template = """name: {step}-test
version: "1.0"
summary: test {step}
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/commands/test_list_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@


class ListKeysCommandTestCase(FakeStoreCommandsBaseTestCase):

command_name = "list-keys"

def test_command_without_login_must_ask(self):
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/commands/test_list_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@


class ListPluginsCommandTestCase(CommandBaseTestCase):

command_name = "list-plugins"

default_plugin_output = (
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/commands/test_refresh.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


class RefreshCommandBaseTestCase(CommandBaseTestCase, TestWithFakeRemoteParts):

yaml_template = dedent(
"""\
name: snap-test
Expand Down
3 changes: 0 additions & 3 deletions tests/legacy/unit/extractors/test_appstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def _create_desktop_file(desktop_file_path, icon: str = None) -> None:


class TestAppstream:

scenarios = testscenarios.multiply_scenarios(
[
(
Expand Down Expand Up @@ -726,7 +725,6 @@ def test_unhandled_file_test_case(self):


class TestAppstreamLaunchable:

scenarios = (
(
"usr/share",
Expand Down Expand Up @@ -765,7 +763,6 @@ def test(self, tmp_work_path, desktop_file_path):


class TestAppstreamLegacyDesktop:

scenarios = (
(
"usr/share",
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/extractors/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def test_to_dict_is_a_copy(self):


class TestExtractedMetadataGetters:

scenarios = [
("common_id", {"prop": "common_id", "value": "test-value"}),
("summary", {"prop": "summary", "value": "test-value"}),
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/extractors/test_setuppy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@


class TestSetupPy:

metadata = [
(
"description",
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/lifecycle/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


class TestErrorFormatting:

scenarios = (
(
"PackVerificationError",
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/lifecycle/test_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,6 @@ def test_prime_rebuild(self):
self.run_test()

def test_all_build_rebuild(self):

self.set_attributes(
{
"initial_step": steps.BUILD,
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy/unit/meta/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


class TestErrorFormatting:

scenarios = (
(
"MissingSnapcraftYamlKeysError",
Expand Down Expand Up @@ -153,7 +152,6 @@ def test_error_formatting(self, exception_class, kwargs, expected_message):


class TestSnapcraftException:

scenarios = (
(
"GradeDevelRequiredError",
Expand Down
3 changes: 0 additions & 3 deletions tests/legacy/unit/meta/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ def test_adapter_none(self):


class StopModeTestCase(CreateBaseTestCase):

stop_modes = [
"sigterm",
"sigterm-all",
Expand All @@ -405,7 +404,6 @@ def test_valid(self):


class RefreshModeTestCase(CreateBaseTestCase):

refresh_modes = ["endure", "restart"]

def test_valid(self):
Expand Down Expand Up @@ -523,7 +521,6 @@ def test_warn_once_only(self):


class PassthroughPropagateTestCase(PassthroughBaseTestCase):

cases = [
(
"new",
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy/unit/pluginhandler/test_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ def test_clean_stage_old_stage_state(self):


class TestCleanPrime:

scenarios = [
("all", {"fileset": ["*"]}),
("no1", {"fileset": ["-1"]}),
Expand Down Expand Up @@ -343,7 +342,6 @@ def test_clean_prime(self, monkeypatch, tmp_work_path, fileset):


class TestCleanStage:

scenarios = [
("all", {"fileset": ["*"]}),
("no1", {"fileset": ["-1"]}),
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy/unit/pluginhandler/test_dirty_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@


class TestDirtyReportGetReport:

property_scenarios = [
("no properties", dict(dirty_properties=None, properties_report="")),
(
Expand Down Expand Up @@ -122,7 +121,6 @@ def test_get_report(


class TestDirtyReportGetSummary:

scenarios = [
(
"single property",
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy/unit/pluginhandler/test_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ def test_conflicting_patchelf_build_attributes(


class TestPrimeTypeExcludesPatching:

scenarios = (
(
"kernel",
Expand Down Expand Up @@ -237,7 +236,6 @@ def test_no_patcher_called(


class TestPrimeTypeIncludesPatching:

scenarios = (
(
"classic",
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy/unit/pluginhandler/test_pluginhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ def __init__(self, *args, **kwargs):


class TestMigratePartFiles:

scenarios = [
("nothing", {"fileset": ["-*"], "result": []}),
(
Expand Down Expand Up @@ -616,7 +615,6 @@ def test_migratable_filesets_single_really_really_nested_file(self):


class TestOrganize:

scenarios = [
(
"simple_file",
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy/unit/pluginhandler/test_scriptlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def test_scriptlet_after_repull(self):


class TestScriptletSetter:

scenarios = [
(
"set-version",
Expand Down Expand Up @@ -180,7 +179,6 @@ def test_set_in_prime(self, tmp_work_path, setter, getter, value):


class TestScriptletMultipleSettersError:

scriptlet_scenarios = [
(
"override-pull/build",
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/unit/plugins/v1/python/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class TestErrorFormatting:

scenarios = (
(
"PipListInvalidLegacyFormatError",
Expand Down
Loading