Skip to content

[enhancement]: fix typing of untyped-defs #5445

@aciba90

Description

@aciba90

Enhancement

In #5409 we enabled the check_untyped_defs mypy lint to not include more type issues and disabled modules not passing the check. Fix them all!

If you want to work any of the modules listed below, please add a comment with the name of the module you are working on so that work isn't duplicated.

Disabled modules

  • cloudinit.analyze
  • cloudinit.analyze.dump
  • cloudinit.analyze.show
  • cloudinit.cmd.devel.hotplug_hook
  • cloudinit.cmd.devel.make_mime
  • cloudinit.cmd.devel.net_convert
  • cloudinit.cmd.main
  • cloudinit.config.cc_apt_configure
  • cloudinit.config.cc_ca_certs
  • cloudinit.config.cc_growpart
  • cloudinit.config.cc_ntp
  • cloudinit.config.cc_power_state_change
  • cloudinit.config.cc_rsyslog
  • cloudinit.config.cc_ubuntu_pro
  • cloudinit.config.modules
  • cloudinit.distros
  • cloudinit.distros.alpine
  • cloudinit.distros.azurelinux
  • cloudinit.distros.bsd
  • cloudinit.distros.opensuse
  • cloudinit.distros.parsers.hostname
  • cloudinit.distros.parsers.hosts
  • cloudinit.distros.parsers.resolv_conf
  • cloudinit.distros.ubuntu
  • cloudinit.distros.ug_util
  • cloudinit.helpers
  • cloudinit.net.cmdline
  • cloudinit.net.eni
  • cloudinit.net.ephemeral
  • cloudinit.net.freebsd
  • cloudinit.net.netbsd
  • cloudinit.net.network_manager
  • cloudinit.net.network_state
  • cloudinit.net.networkd
  • cloudinit.net.sysconfig
  • cloudinit.netinfo
  • cloudinit.sources.DataSourceAzure
  • cloudinit.sources.DataSourceBigstep
  • cloudinit.sources.DataSourceCloudSigma
  • cloudinit.sources.DataSourceCloudStack
  • cloudinit.sources.DataSourceConfigDrive
  • cloudinit.sources.DataSourceDigitalOcean
  • cloudinit.sources.DataSourceEc2
  • cloudinit.sources.DataSourceExoscale
  • cloudinit.sources.DataSourceGCE
  • cloudinit.sources.DataSourceHetzner
  • cloudinit.sources.DataSourceMAAS
  • cloudinit.sources.DataSourceNoCloud
  • cloudinit.sources.DataSourceOVF
  • cloudinit.sources.DataSourceOpenNebula
  • cloudinit.sources.DataSourceOpenStack
  • cloudinit.sources.DataSourceOracle
  • cloudinit.sources.DataSourceRbxCloud
  • cloudinit.sources.DataSourceScaleway
  • cloudinit.sources.DataSourceSmartOS
  • cloudinit.sources.DataSourceVMware
  • cloudinit.sources
  • cloudinit.sources.helpers.azure
  • cloudinit.sources.helpers.ec2
  • cloudinit.sources.helpers.netlink
  • cloudinit.sources.helpers.openstack
  • cloudinit.sources.helpers.vmware.imc.config_file
  • cloudinit.sources.helpers.vmware.imc.config_nic
  • cloudinit.sources.helpers.vultr
  • cloudinit.ssh_util
  • cloudinit.stages
  • cloudinit.temp_utils
  • cloudinit.templater
  • cloudinit.user_data
  • tests.integration_tests.instances
  • tests.unittests.analyze.test_show
  • tests.unittests.cmd.devel.test_hotplug_hook
  • tests.unittests.cmd.devel.test_render
  • tests.unittests.cmd.test_clean
  • tests.unittests.cmd.test_query
  • tests.unittests.cmd.test_status
  • tests.unittests.config.test_apt_configure_sources_list_v1
  • tests.unittests.config.test_apt_configure_sources_list_v3
  • tests.unittests.config.test_apt_source_v1
  • tests.unittests.config.test_apt_source_v3
  • tests.unittests.config.test_cc_ansible
  • tests.unittests.config.test_cc_apk_configure
  • tests.unittests.config.test_cc_apt_pipelining
  • tests.unittests.config.test_cc_bootcmd
  • tests.unittests.config.test_cc_ca_certs
  • tests.unittests.config.test_cc_chef
  • tests.unittests.config.test_cc_disable_ec2_metadata
  • tests.unittests.config.test_cc_final_message
  • tests.unittests.config.test_cc_growpart
  • tests.unittests.config.test_cc_grub_dpkg
  • tests.unittests.config.test_cc_install_hotplug
  • tests.unittests.config.test_cc_keys_to_console
  • tests.unittests.config.test_cc_landscape
  • tests.unittests.config.test_cc_locale
  • tests.unittests.config.test_cc_mcollective
  • tests.unittests.config.test_cc_mounts
  • tests.unittests.config.test_cc_phone_home
  • tests.unittests.config.test_cc_power_state_change
  • tests.unittests.config.test_cc_puppet
  • tests.unittests.config.test_cc_resizefs
  • tests.unittests.config.test_cc_resolv_conf
  • tests.unittests.config.test_cc_rh_subscription
  • tests.unittests.config.test_cc_rsyslog
  • tests.unittests.config.test_cc_runcmd
  • tests.unittests.config.test_cc_snap
  • tests.unittests.config.test_cc_ssh
  • tests.unittests.config.test_cc_timezone
  • tests.unittests.config.test_cc_ubuntu_autoinstall
  • tests.unittests.config.test_cc_ubuntu_drivers
  • tests.unittests.config.test_cc_ubuntu_pro
  • tests.unittests.config.test_cc_update_etc_hosts
  • tests.unittests.config.test_cc_users_groups
  • tests.unittests.config.test_cc_wireguard
  • tests.unittests.config.test_cc_yum_add_repo
  • tests.unittests.config.test_cc_zypper_add_repo
  • tests.unittests.config.test_modules
  • tests.unittests.config.test_schema
  • tests.unittests.conftest
  • tests.unittests.distros.test_alpine
  • tests.unittests.distros.test_hosts
  • tests.unittests.distros.test_ifconfig
  • tests.unittests.distros.test_netbsd
  • tests.unittests.distros.test_netconfig
  • tests.unittests.distros.test_opensuse
  • tests.unittests.distros.test_user_data_normalize
  • tests.unittests.helpers
  • tests.unittests.net.test_dhcp
  • tests.unittests.net.test_init
  • tests.unittests.net.test_network_state
  • tests.unittests.net.test_networkd
  • tests.unittests.runs.test_merge_run
  • tests.unittests.runs.test_simple_run
  • tests.unittests.sources.azure.test_errors
  • tests.unittests.sources.azure.test_imds
  • tests.unittests.sources.helpers.test_openstack
  • tests.unittests.sources.test_aliyun
  • tests.unittests.sources.test_altcloud
  • tests.unittests.sources.test_azure
  • tests.unittests.sources.test_azure_helper
  • tests.unittests.sources.test_cloudsigma
  • tests.unittests.sources.test_common
  • tests.unittests.sources.test_configdrive
  • tests.unittests.sources.test_digitalocean
  • tests.unittests.sources.test_ec2
  • tests.unittests.sources.test_exoscale
  • tests.unittests.sources.test_gce
  • tests.unittests.sources.test_init
  • tests.unittests.sources.test_lxd
  • tests.unittests.sources.test_maas
  • tests.unittests.sources.test_nocloud
  • tests.unittests.sources.test_opennebula
  • tests.unittests.sources.test_openstack
  • tests.unittests.sources.test_oracle
  • tests.unittests.sources.test_ovf
  • tests.unittests.sources.test_rbx
  • tests.unittests.sources.test_scaleway
  • tests.unittests.sources.test_smartos
  • tests.unittests.sources.test_upcloud
  • tests.unittests.sources.test_vultr
  • tests.unittests.sources.test_wsl
  • tests.unittests.sources.vmware.test_vmware_config_file
  • tests.unittests.test__init__
  • tests.unittests.test_apport
  • tests.unittests.test_builtin_handlers
  • tests.unittests.test_cli
  • tests.unittests.test_conftest
  • tests.unittests.test_data
  • tests.unittests.test_ds_identify
  • tests.unittests.test_helpers
  • tests.unittests.test_log
  • tests.unittests.test_merging
  • tests.unittests.test_net
  • tests.unittests.test_net_activators
  • tests.unittests.test_ssh_util
  • tests.unittests.test_stages
  • tests.unittests.test_subp
  • tests.unittests.test_templating
  • tests.unittests.test_upgrade
  • tests.unittests.test_url_helper
  • tests.unittests.test_util
  • tests.unittests.util
  • netplan_schema_check
  • mock-meta

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issuehacktoberfestIssues to be completed during Hacktoberfest. Curated list of good first issue tags.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions